Solution · Explainable medical imaging
For hospital research teams and medical AI developers · Since 2025
LUCID
Explainable AI for chest X-rays
The model names the findings it sees in a chest X-ray before it predicts a label, so a clinician can check, and correct, its reasoning.
Status: Available to license. Not a medical device
Shows how a concept bottleneck is used, not model output
The problem
A deep model that labels a chest X-ray gives no reason a clinician can check. When it is wrong, the only thing to correct is the answer.
What was built
A concept bottleneck model puts human-readable findings between the image and the prediction. The X-ray is mapped to clinical concepts, and the 14 chest X-ray findings are predicted from those concepts alone, so a clinician can see which concepts drove a prediction, change one, and see the prediction respond.
What it does
- Concepts mined from radiology reports, keeping whether each finding is present, negated or uncertain
- Rule-based grouping of report phrases into high-level concepts, with negation and uncertainty detection
- Patient-to-concept mapping across all 14 chest X-ray findings, with a fixed rule when a report contradicts itself
- Top-K concept selection (K = 40, 80 or 100), with the rest bundled and all three states kept
- Two training schemes: sequential, and iterative sequential with a weighted joint loss
- Post-hoc concept analysis with ICE (Invertible Concept-based Explanation)
What we did
The concept-extraction pipeline and the model training code.
- stages from report text to concepts
- 4
- chest X-ray findings
- 14
- states per concept
- 3
The research problem
Chest X-ray classifiers can be accurate and still be hard to trust, because they report a label and nothing a radiologist can verify. The goal of this work is a model whose reasoning is written in the same terms a radiologist uses, so a mistake can be traced to a specific finding.
How a concept bottleneck works
The network is split in two. A concept predictor looks at the image and estimates a set of clinical concepts. A label predictor sees only those concepts, never the image, and predicts the 14 chest X-ray findings.
Because every prediction has to pass through the concepts, the concepts are the explanation. A clinician who disagrees with one can correct it, and the label predictor runs again on the corrected concepts.
From radiology reports to concept labels
Concepts come from the radiology reports, in four stages. Each stage keeps three states per concept: present (1), negated (0) and uncertain (−1), because radiologists hedge and rule things out as often as they confirm them.
- Low-level concepts: phrases such as “opacity in the right lower lobe” or “no effusion” are extracted from the reports for each of the 14 labels.
- High-level concepts: rule-based patterns group the phrases into concepts like Atelectasis Issue or Effusion Issue, and detect negation (“no”, “without”, “resolved”) and uncertainty (“possible”, “cannot exclude”).
- Patient mapping: every X-ray gets a value for every concept. When a report says different things about one concept, present wins over uncertain, and uncertain over negated.
- Feature selection: the K most frequent concepts are kept (K = 40, 80 or 100) and the rest are bundled into one column that still carries the three states.
Counts from the repository
real counts from the repository
- Present
- Negated
- Uncertain
Atelectasis Issue
3,758 phrases
3,064 present · 455 negated · 239 uncertain
Other Opacity Issues
3,221 phrases
2,602 present · 577 negated · 42 uncertain
Lung Issue
2,663 phrases
2,008 present · 549 negated · 106 uncertain
Tuberculosis
2,208 phrases
1,633 present · 543 negated · 32 uncertain
Effusion Issue
1,714 phrases
1,182 present · 397 negated · 135 uncertain
Mediastinum Issue
998 phrases
703 present · 267 negated · 28 uncertain
Model and training
The concept predictor is a pretrained ResNet (34, 50 or 101 layers; 50 by default) adapted for grayscale X-rays, with a concept head of 1024, 512 and 256 units. The label predictor is a small network of 512, 256 and 128 units.
Two training schemes are compared. Sequential training fits the concept predictor first, freezes it, then fits the label predictor on predicted concepts, so it learns to cope with concept errors. Iterative sequential training updates both together with a joint loss, α × concept loss + β × label loss, and a grid search over α, β and layer sizes.
Uncertain labels can be merged into negative, merged into positive, or dropped. Training preloads the dataset into GPU memory and supports mixed precision.
Evaluation and interpretability
Each run reports AUC-ROC, average precision, F1, sensitivity and specificity for every concept and every label, with per-concept thresholds chosen by Youden's J statistic.
An ICE analysis extracts concept directions from inside the network with NMF, PCA or k-means, and measures how faithfully they explain its predictions.