ClinGRAD is a clinically-guided heterogeneous graph neural network for dementia diagnosis. It combines MRI-derived radiomics, gene-expression profiles, clinical features, structural brain connectivity priors, and gene co-expression edges to classify subjects as Control (CTL), Mild Cognitive Impairment (MCI), Alzheimer's Disease (AD), or Vascular Dementia (VaD).
The training code is available in this repository. The main entry points are:
src/train.pyfor model training.src/infer.pyfor checkpoint evaluation/inference.src/data/dataset.pyfor the expected tabular input format.config/default.yamlfor default paths and hyperparameters.
Paper: https://papers.miccai.org/miccai-2025/0148-Paper5205.html
ClinGRAD models each subject as a heterogeneous graph with three node groups:
- patient nodes containing clinical/cognitive features;
- brain-structure nodes containing MRI radiomics features;
- gene nodes containing expression values.
The paper describes clinically informed patient, structure, and gene relationships. In the released implementation, the loader constructs parent-to-brain links, structure-to-structure links derived from anatomical distance and DWI connectivity priors, and gene-to-gene links derived from co-expression scores; patient, brain, and gene embeddings are then fused at the graph level.
The model was developed using ANMerge. ANMerge access is controlled by Synapse, and this repository does not redistribute ANMerge data, derived masks, processed radiomics tables, gene-expression tables, or subject-level clinical data.
ANMerge does not include the 32 brain-structure masks used by ClinGRAD. As described in the paper, we generated these masks from the MRI scans with SynthSeg and then used the masks to extract radiomics features with PyRadiomics. These preprocessing tools are external to this repository because their dependencies and CUDA/GPU support change regularly and can introduce environment-specific installation issues.
Relevant preprocessing references:
- ClinGRAD paper: https://papers.miccai.org/miccai-2025/0148-Paper5205.html
- SynthSeg GitHub repository: https://github.com/BBillot/SynthSeg
- SynthSeg paper: https://doi.org/10.1016/j.media.2023.102789
- MATLAB SynthSeg example: https://www.mathworks.com/help/medical-imaging/ug/Brain-MRI-Segmentation-Using-Trained-3-D-U-Net.html
- PyRadiomics documentation: https://pyradiomics.readthedocs.io/
- PyRadiomics GitHub repository: https://github.com/Radiomics/pyradiomics
- PyRadiomics paper: https://doi.org/10.1158/0008-5472.CAN-17-0339
- ANMerge paper: https://doi.org/10.3233/JAD-200948
- ANMerge Synapse DOI: https://doi.org/10.7303/syn22252881
- DWI structural-connectivity matrices: https://doi.org/10.1038/s41597-022-01596-9
- DWI matrices and processing scripts on OSF: https://osf.io/yw5vf/
- BrainLat dataset paper: https://doi.org/10.1038/s41597-023-02806-8
- GeneMANIA co-expression reference: https://doi.org/10.1093/nar/gkq537
- Human Protein Atlas: https://www.proteinatlas.org/
The released repository starts from harmonized CSV inputs. The preprocessing steps used to create those inputs are:
Start from the ANMerge MRI scans available through your approved Synapse access. ANMerge does not provide the 32 brain-structure masks required by ClinGRAD.
We generated those masks with SynthSeg:
- GitHub: https://github.com/BBillot/SynthSeg
- Paper: https://doi.org/10.1016/j.media.2023.102789
- MATLAB example using the pretrained SynthSeg network: https://www.mathworks.com/help/medical-imaging/ug/Brain-MRI-Segmentation-Using-Trained-3-D-U-Net.html
The SynthSeg repository provides command-line usage such as:
python ./scripts/commands/SynthSeg_predict.py \
--i <input_mri_or_folder> \
--o <output_segmentation_or_folder>MATLAB users can follow the MathWorks SynthSeg example linked above. That example demonstrates loading the pretrained SynthSeg network and segmenting a brain MRI into 32 anatomical classes. This repository does not include the SynthSeg model, MATLAB files, or segmentation outputs.
The output of this step is one segmentation mask per MRI scan. Keep a consistent
mapping between SynthSeg label IDs and the structure names used later in
patient_structure.
Use the MRI scan and its SynthSeg mask to extract radiomics features for each of the 32 structures.
- GitHub: https://github.com/Radiomics/pyradiomics
- Documentation: https://pyradiomics.readthedocs.io/
- Paper: https://doi.org/10.1158/0008-5472.CAN-17-0339
The paper uses 107 PyRadiomics features per structure. Store the output in long
format, with one row per patient and structure, then build the
patient_structure field as:
<patient_id>_<structure_name>
This radiomics table becomes radiomics.csv.
The DWI prior referenced in the paper comes from:
- Skoch et al., "Human brain structural connectivity matrices-ready for modelling": https://doi.org/10.1038/s41597-022-01596-9
- OSF data and scripts: https://osf.io/yw5vf/
That resource provides DWI-derived structural-connectivity matrices as both
individual CSV files and a MATLAB-readable .mat file. The OSF project also
contains the processing scripts used by the original DWI paper, including the
steps for DWI preprocessing, registration, tractography, and matrix creation.
The script sequence described by the DWI resource is:
1_dti_preprocess
2_dti_reg
3_dti_track2
4_dti_get_conn2
If using the MATLAB-readable file from OSF, the conversion step is:
S = load("SCmatrices88healthy.mat");
% Select or average the structural-connectivity matrices from S.
% Map or aggregate the source atlas regions to the 32 SynthSeg structures.
% Store the resulting 32 x 32 matrix.
writematrix(dwi32, "DWI_Matrix.csv")For ClinGRAD, convert the DWI connectivity resource into a 32 x 32 matrix that
matches the same 32 SynthSeg structures used for radiomics. The original DWI
resource uses its own atlas/parcellation, so this step requires mapping or
aggregating the available regions to your 32-structure ordering. Save the final
matrix as DWI_Matrix.csv.
The paper also reports validation/refinement using BrainLat DWI scans:
- BrainLat dataset paper: https://doi.org/10.1038/s41597-023-02806-8
Prepare the remaining model inputs from ANMerge and external gene resources:
- patient-level clinical, demographic, and cognitive-assessment features for
patient_data.csv; in our experiments this was derived fromANMerge_clinical_under_90.csv; - expression values for the 75 AD-associated genes selected from the Human
Protein Atlas for
gene_expression.csv; in our experiments this was derived fromANMerge_gene_expression_normalized_under_90.csv, filtered to the panel listed inresources/gene_panel_75.txt; - GeneMANIA-derived co-expression edges for
co_expression.csv.
The default file locations are defined in config/default.yaml:
paths:
output_dir: ./outputs
patient_csv: ./data/patient_data.csv
radiomics_csv: ./data/radiomics.csv
dwi_csv: ./data/DWI_Matrix.csv
distance_csv: ./data/structure_distance.csv
gene_expression_csv: ./data/gene_expression.csv
coexpression_csv: ./data/co_expression.csvThe released code expects harmonized intermediate CSV files, not the raw ANMerge release tables. The current loader accepts the following schemas.
patient_data.csv aligns patients across modalities. It must include a Key
column. If DIAGNOSIS, Subtype, diagnosis, or subtype is present, the
loader uses it as the label column. All columns after the first two columns are
encoded as patient-level clinical features. Numeric columns are z-scored and
categorical columns are one-hot encoded.
The paper uses patient nodes for clinical markers, including cognitive scores.
For ANMerge-derived experiments, these features should come from the available
clinical, demographic, and cognitive-assessment fields after applying the
appropriate cohort harmonization and missing-value handling. In our experiments,
patient_data.csv was derived from ANMerge_clinical_under_90.csv.
Minimal harmonized example. Age, Sex, MMSE, CDR,
Global_Deterioration_Scale, and APOE are illustrative feature names, not a
complete list of raw ANMerge clinical columns:
Key,DIAGNOSIS,Age,Sex,MMSE,CDR,Global_Deterioration_Scale,APOE
PRGCTL025,0,73,F,29,0,1,E3/E3
PRGAD014,2,78,M,19,1,4,E3/E4Alternatively, labels may be supplied in a separate labels file with:
PTID,DIAGNOSIS
PRGCTL025,0
PRGAD014,2radiomics.csv is a long table with one row per patient and brain structure.
It must include patient_structure. The value is parsed as:
<patient_id>_<structure_name>
The paper extracts 107 PyRadiomics features per structure from the SynthSeg
masks. All columns except patient_structure and optional Label are treated
as radiomics features.
Example:
patient_structure,original_firstorder_Mean,original_firstorder_Variance,original_shape_MeshVolume
PRGCTL025_left_hippocampus,42.3,18.5,3210.0
PRGCTL025_right_hippocampus,41.9,17.8,3188.0If your patient IDs contain underscores, adapt src/data/dataset.py or convert
IDs before running the loader, because the current parser splits
patient_structure at the first underscore.
gene_expression.csv is a wide table with one row per patient/sample. The ID
column must be named one of ptid, patient_id, sample, id, or key
case-insensitively. All other columns are interpreted as gene-expression values.
The paper uses 75 AD-associated genes selected from the Human Protein Atlas.
The released loader does not enforce a fixed gene list; it uses the non-ID
columns present in this CSV as gene nodes. For paper-aligned experiments, use
the panel in resources/gene_panel_75.txt and preserve gene names consistently
with the co-expression table. In our experiments, gene_expression.csv was
derived from ANMerge_gene_expression_normalized_under_90.csv, not the raw
expression table.
Example:
patient_id,APP,MAPT,PSEN1,APOE
PRGCTL025,8.42,5.17,3.91,6.28
PRGAD014,9.10,5.88,4.02,7.45co_expression.csv defines gene-to-gene edges. It must include Gene1,
Gene2, and Weight. In the paper, co-expression relationships are derived
from GeneMANIA.
Example:
Gene1,Gene2,Weight
APP,PSEN1,0.83
APOE,MAPT,0.57DWI_Matrix.csv and structure_distance.csv provide structure-to-structure
edge priors for the 32 SynthSeg-derived brain structures.
The DWI prior in the paper is based on published DWI structural-connectivity matrices and was validated/refined with BrainLat DWI scans. The Scientific Data structural-connectivity resource provides MATLAB-readable matrices and processing scripts on OSF. Users should map or aggregate the available connectivity matrix to the 32 structures used in their SynthSeg/radiomics pipeline before passing it to ClinGRAD.
The loader accepts either:
- global 32 x 32 numeric CSV matrices for both
DWI_Matrix.csvandstructure_distance.csv; or - a long
structure_distance.csvwithpatient_id,structure_1,structure_2, anddistancecolumns.
Example global matrix shape shown truncated:
0,0.12,0.03
0.12,0,0.08
0.03,0.08,0Example long distance table:
patient_id,structure_1,structure_2,distance
PRGCTL025,left_hippocampus,right_hippocampus,41.8
PRGCTL025,left_hippocampus,left_amygdala,12.6Install the Python dependencies for model training:
pip install -r requirements.txtSynthSeg, PyRadiomics, MATLAB, FSL, and DWI preprocessing environments are not installed by this repository. Use the linked project documentation for those preprocessing stages.
Edit config/default.yaml so each path points to your harmonized CSV files, or
pass paths directly on the command line:
python src/train.py --config config/default.yamlExample with explicit paths:
python src/train.py \
--patient_csv data/patient_data.csv \
--radiomics_csv data/radiomics.csv \
--dwi_csv data/DWI_Matrix.csv \
--distance_csv data/structure_distance.csv \
--gene_expression_csv data/gene_expression.csv \
--coexpression_csv data/co_expression.csv \
--num_classes 4The best checkpoint is saved under:
outputs/checkpoints/best.pt
- Raw ANMerge files must be converted into the intermediate schemas above before training.
- ANMerge MRI scans do not include the required 32 brain-structure masks; those masks must be generated externally with SynthSeg or an equivalent segmentation workflow.
- Radiomics features should be extracted per structure from each subject's MRI and corresponding segmentation mask.
- Gene-expression and co-expression tables must use matching gene symbols.
- Structure names must be consistent across radiomics rows and any per-patient structure-distance table.
- Data splits and hyperparameters should be matched to the paper for exact reproduction.
- AD vs CTL: 98.75% accuracy
- AD vs MCI: 94.25% accuracy
- MCI vs CTL: 89.66% accuracy
- AD vs VaD: 89.45% accuracy
- Four-class AD/MCI/CTL/VaD: 93.15% accuracy
If you use ClinGRAD, please cite the MICCAI 2025 paper and the preprocessing resources relevant to your pipeline, including SynthSeg, PyRadiomics, ANMerge, the DWI connectivity resource, BrainLat if used, GeneMANIA, and the Human Protein Atlas.
@InProceedings{HasSal_ClinGRAD_MICCAI2025,
author = {Hassan, Salma and Salem, Mostafa and Papineni, Vijay Ram Kumar and Elsayed, Ayman and Yaqub, Mohammad},
title = {ClinGRAD: Clinically-Guided Genomics and Radiomics Interpretable GNN for Dementia Diagnosis},
booktitle = {Proceedings of Medical Image Computing and Computer Assisted Intervention -- MICCAI 2025},
year = {2025},
publisher = {Springer Nature Switzerland},
volume = {LNCS 15971},
pages = {204--214}
}