ConvNeXt-Transformer conclusion generation from mammography
Model weights for "A ConvNeXt-Transformer Approach for Automated Conclusion Generation from Mammography" (Bosques-Palomo, de Avila-Armenta, et al., IEEE JBHI, under revision).
Code: https://github.com/Tamez-Research-Group/convnext-transformer-mammo-report (archived on Zenodo: 10.5281/zenodo.24484153)
Given the four screening views of a study (LCC, LMLO, RCC, RMLO), the model writes the conclusion of the radiology report: the BI-RADS category and its follow-up or biopsy recommendation. A ConvNeXt-Small network (PyTorch) encodes each view into a 768-d embedding, and a Transformer encoder-decoder (TensorFlow/Keras) generates the text.
Files
| Path | Content |
|---|---|
convnext/trained_model.pth | ConvNeXt-S image encoder (49.5 M parameters), trained on RSNA and TecSalud 2014–2018 mammograms |
transformer/all/ | Conclusion generator trained on BI-RADS 1–5 (use this one for general use) |
transformer/1245/ | Trained on BI-RADS 1, 2, 4, 5 |
transformer/1vs5/ | Trained on BI-RADS 1 and 5 |
Each transformer/<config>/ folder holds model_config.json and a TensorFlow checkpoint
(weights/, 76.9 M parameters). These are the model-seed-42 runs of the paper's
experiments (per-configuration split, seed 42).
Usage
git clone https://github.com/Tamez-Research-Group/convnext-transformer-mammo-report
cd convnext-transformer-mammo-report && pip install -r requirements.txt
huggingface-cli download lalodeavilaarm/convnext-transformer-mammo-report --local-dir weights
# images.csv: year, patient_id, image_id, laterality (L/R), view (CC/MLO), path (DICOM)
python scripts/extract_features.py --images images.csv --checkpoint weights/convnext/trained_model.pth --out features.csv
python scripts/predict.py --features features.csv --transformer weights/transformer/all --out conclusions.csv
conclusions.csv has one row per study: the generated conclusion, the BI-RADS category
written in it, and the model's probabilities for BI-RADS 1–5.
Performance (held-out test sets, mean ± SD over 3 training seeds)
| Configuration | n | BLEU | METEOR | BERTScore | BI-RADS κ | Biopsy κ | High-risk AUPRC |
|---|---|---|---|---|---|---|---|
| BI-RADS 1 & 5 | 107 | 0.986 ± 0.003 | 0.993 ± 0.002 | 0.996 ± 0.001 | 0.96 ± 0.01 | 0.96 ± 0.01 | 0.998 |
| BI-RADS 1, 2, 4, 5 | 214 | 0.864 ± 0.004 | 0.923 ± 0.001 | 0.962 ± 0.001 | 0.55 ± 0.01 | 0.70 ± 0.02 | 0.935 |
| BI-RADS 1–5 | 267 | 0.759 ± 0.010 | 0.849 ± 0.003 | 0.925 ± 0.001 | 0.42 ± 0.03 | 0.58 ± 0.02 | 0.850 |
Test sets are BI-RADS-balanced. On the full, unbalanced cohort (4% BI-RADS 4–5), the high-risk AUROC is 0.82; see the paper's Supplementary Material.
Intended use and limitations
Research use only. Not a medical device and not validated for clinical use.
- Trained on a single institution (TecSalud, Monterrey, Mexico, 2014–2019) with single-reader radiologist reports as reference; performance on other populations, scanners or institutions is unknown.
- Training targets are seven standardised conclusion templates (one per BI-RADS category and recommendation), so the model produces those templates, not free-text reports.
- Agreement with the radiologist is moderate for the five-category task (κ ≈ 0.42); intermediate categories (BI-RADS 2–4) are often confused.
- Trained on BI-RADS-balanced data: predicted probabilities are not calibrated to screening prevalence.
Training data
TecSalud mammograms and reports (ethics protocol P000542-MIRAI-MODIFICADO-CEIC-CR002) are private and not distributed; the RSNA Screening Mammography Breast Cancer Detection data is available from Kaggle. The ConvNeXt training recipe is adapted from the RSNA 2nd-place solution (MIT License).
Citation
Paper citation to be added on publication. Software: Zenodo DOI 10.5281/zenodo.24484153.