HEALTHCARE SYSTEM FOR BREAST CANCER DIAGNOSIS WITH EXPLAINABLE AI AND PERSONALISED LLM RECOMMENDATIONS
Bakary Gibba · Md Rashidul Islam · Faisal Rafat Faisal Khrisan
Bachelor of Computer Science (Honours), Albukhary International University
Important
Medx AI is a research prototype for clinical decision support. It does not provide medical diagnoses or replace pathologists, oncologists, confirmatory testing, or institutional clinical protocols.
Medx AI explores how an AI-assisted HER2 workflow can move beyond a standalone prediction model. The platform combines four-class histopathology classification, uncertainty-aware input checks, visual explanation, contextual LLM-generated recommendation drafts, and explicit clinician approval in one role-based web system.
| Reported model performance | Evaluation scope | Clinical roles | Public repository scope |
|---|---|---|---|
| ~96% weighted accuracy | 154 tests passed | Doctor · Nurse · Admin | Case study only |
| 4 HER2 classes | 4.5/5 average UAT | Separated responsibilities | No source or dataset |
HER2 assessment influences breast cancer treatment planning, but ambiguous staining, observer variability, resource constraints, and opaque AI predictions can limit confidence. Medx AI investigates a more responsible pattern:
flowchart LR
A[Histopathology image] --> B[Quality & distribution checks]
B --> C[HER2 ensemble prediction]
C --> D[Confidence & uncertainty]
C --> E[Grad-CAM explanation]
D --> F[Context-aware LLM draft]
E --> F
F --> G{Clinician review}
G -->|Accept| H[Traceable report]
G -->|Reject| I[Revise or investigate]
The key design decision is the review boundary: model and LLM outputs remain assistive drafts, while clinicians retain final responsibility.
| Area | Portfolio evidence |
|---|---|
| Classification | Soft-voting ensemble across Random Forest, Logistic Regression, and SVM for HER2 0, 1+, 2+, and 3+ |
| Explainability | Grad-CAM overlays place visual evidence beside predictions instead of hiding interpretation in a separate research notebook |
| Safety | Blank-slide, blur, stain-profile, distribution-shift, and entropy checks can reject or defer uncertain inputs |
| Generative AI | Structured LLM drafts incorporate prediction context, optional notes, and extracted patient-history text |
| Human oversight | Recommendations follow draft, review, acceptance, rejection, and reporting states |
| System design | Role-based dashboards, audit history, object storage, model versioning, and traceable clinical records |
| Prediction & XAI | Clinician review |
|---|---|
![]() |
![]() |
| Role-based operations | Case lifecycle visibility |
|---|---|
![]() |
![]() |
Browse all sanitized screenshots →
| HER2 class | Precision | Recall | F1 | Average precision |
|---|---|---|---|---|
0 |
0.99 | 0.93 | 0.96 | 0.994 |
1+ |
0.87 | 0.96 | 0.92 | 0.950 |
2+ |
0.87 | 0.95 | 0.91 | 0.953 |
3+ |
1.00 | 0.98 | 0.99 | 0.999 |
Note
These are project-report results from a controlled academic evaluation, not evidence of prospective clinical validity. External validation across institutions, scanners, demographics, and staining protocols remains necessary.
Bakary Gibba's assigned responsibility was model development and explainable AI. The work included the image-processing and classification pipeline, ensemble design, class-imbalance strategy, prediction confidence and safety behavior, Grad-CAM integration, model evaluation, and contribution to documentation and system testing.
The project was collaborative: Md Rashidul Islam led frontend development, Faisal Rafat Faisal Khrisan led backend development, and all team members contributed to documentation and testing. See My Contributions for the precise ownership boundary.
| Layer | Technologies and patterns |
|---|---|
| AI and imaging | Python, scikit-learn, PyTorch, OpenCV, OpenSlide, Grad-CAM, entropy analysis |
| Generative AI | Groq-hosted Llama, Gemini fallback, structured prompting, OCR-assisted context |
| Application | React, TypeScript, Vite, Tailwind CSS, Django, Django REST Framework |
| Data and storage | PostgreSQL-oriented relational design, Django ORM, MinIO object storage |
| Security and governance | JWT, RBAC, 2FA-ready flows, audit logging, soft deletion, model registry |
- Accuracy alone is insufficient in high-stakes AI; uncertainty, explanation, traceability, and escalation must shape the workflow.
- Clinician review is a system state and accountability boundary, not a disclaimer added after generation.
- Data-efficient models can be valuable when compute and labeled medical data are limited, but external validity matters more than a single benchmark.
- LLMs are better positioned as structured communication and decision-support layers than autonomous clinical authorities.
Public academic case study · January 2026
GitHub Profile · Portfolio · LinkedIn
This repository intentionally excludes source code, model weights, credentials, the private project report, patient records, and the underlying research dataset.




