An interactive platform is available at: https://huggingface.co/spaces/zhang0319/Multimodal_Surv
This repository contains the preprocessing, training, validation, and evaluation code for V-LINC, a multimodal survival prognostication system for individualized breast cancer prognosis. The system integrates breast DCE-MRI, radiology reports, structured clinical variables, treatment information, and optional mutation features.
Note: Study setting and V-LINC system. a, Clinical context of pretreatment breast MRI acquisition and subsequent treatment pathways, including neoadjuvant therapy and surgery-first management. b, Geographic distribution of the in-house cohort and external validation cohorts. c, Data sources used for prognostic evaluation, including DCE-MRI and radiology reports from radiological evaluation, clinicopathological variables from pathological evaluation and longitudinal follow-up for survival endpoints. d, Overview of the V-LINC system.
.
├── configs/
│ └── default.yaml
├── data/
│ ├── internal_survival.example.json
│ ├── duke_survival.json
│ └── ispy1_survival.json
├── preprocessing/
│ └── preprocess_mri.py
├── RadioLOGIC/
├── src/
│ ├── config.py
│ ├── dataset.py
│ ├── features.py
│ ├── losses.py
│ ├── metrics.py
│ ├── models.py
│ └── utils.py
├── validate_setup.py
├── train.py
├── test.py
└── requirements.txt
pip install -r requirements.txtPlace the pretrained report encoder and tokenizer files in:
RadioLOGIC/
Contains:
RadioLOGIC/
├── config.json
├── vocab.json
├── merges.txt
└── pytorch_model.bin
Tumor masks were obtained using our breast MRI segmentation tool:
https://huggingface.co/spaces/zhang0319/breast-mri-seg
The preprocessing script expects one directory per case:
CASE_ID/
├── dce1.nii.gz
├── dce2.nii.gz
└── seg.nii.gz
Run preprocessing with:
python preprocessing/preprocess_mri.py \
--input-root /path/to/segmented_cases \
--output-root /path/to/preprocessed_casesThe script selects the tumor-containing breast, applies the configured crop, and center-crops or pads the volumes to 160 × 160 × 160.
Example metadata files and the required data structure are provided in the data/ directory.
Edit:
configs/default.yaml
Set the following before running the code:
- metadata paths
- MRI directories
- RadioLOGIC directory
- output and checkpoint directories
- endpoint (
osordfs) - batch size, learning rate, and number of epochs
Check metadata and configuration:
python validate_setup.py --config configs/default.yamlAlso verify RadioLOGIC:
python validate_setup.py \
--config configs/default.yaml \
--check-radiologicVerify all MRI files:
python validate_setup.py \
--config configs/default.yaml \
--check-radiologic \
--check-imagespython train.py --config configs/default.yamlThe best checkpoint is selected using validation C-index and saved in the configured checkpoint directory.
Internal evaluation:
python test.py --config configs/default.yaml --cohort internalExternal evaluation:
python test.py --config configs/default.yaml --cohort duke
python test.py --config configs/default.yaml --cohort ispy1-
Overall survival
Note: Overall survival stratification across internal and external cohorts. a, Distribution of survival status across the in-house and external cohorts used for overall survival analysis. b–d, Kaplan–Meier curves for V-LINC-defined low-risk and high-risk groups in the NKI training, validation and test sets. e–h, Kaplan–Meier curves for the ISPY1, DUKE, Sun Yat-Sen and RUMC external test sets. -
Interpretation
Note: System interpretability and time-dependent performance for overall survival. a, Representative DCE-MRI examples with lesion masks and Grad-CAM maps before and after contrast enhancement. b, Token-level attention maps from radiology reports, with higher-intensity tokens indicating greater contribution to the text-derived representation. c, Gradient-based attribution of structured clinical variables across patients. d, Decision curve analysis for 5-year overall survival. e, Volcano plot showing feature differences between V-LINC system-defined high-risk and low-risk groups across imaging, report, clinical and treatment-prompt features. f, Time-dependent receiver operating characteristic curves for overall survival from 1 to 10 years.
Citation information will be added after publication.
If you have any questions please contact us.
Email: tianyu.zhang@radboudumc.nl / t.zhang@nki.nl (Dr. Tianyu Zhang); jakob_nikolas.kather@tu-dresden.de (Prof. Jakob Nikolas Kather); ritse.mann@radboudumc.nl (Prof. Ritse M. Mann)


