How xuexiongluomq/brainmm works
BrainMM is a multi-modal brain-graph learning and classification framework. Its principal workflow loads a dataset, prepares modality-specific graphs and node features, batches subjects, then trains and evaluates a graph model that combines modality encodings with a shared representation and attention-based classification. The README documents HIV, bipolar-disorder, and PPMI datasets; the tree includes a PPMI data file, while dataset preprocessing is implemented in the shared loader. The graph follows shown calls and imports; it does not infer wiring for unsampled code.
Main entry points: main.py Model and experiment runner · process_data.py Graph loader · enc_dec.py Modality encoders · shareLayer.py Shared representation
Components 13
Data preparation
- Brain graph datasets
- Graph loader
process_data.py - Node features
feat.py - PPMI link data
data/PPMI/PPMI_link.txt
Graph learning
- Modality encoders
models/enc_dec.py - Graph convolution
models/gcn.py - Shared representation
models/shareLayer.py - Representation attention
models/attentionLayer.py - Subject classifier
main.py
Training and evaluation
- Experiment settings
config.py - Model and experiment runner
main.py - Evaluation metrics
main.py
Other components
- Researcher
Connections 12
- Researcher → Model and experiment runner: runs
README.md - Brain graph datasets → Graph loader: loads graphs
README.md - Graph loader → Node features: computes features
process_data.py - Model and experiment runner → Graph loader: loads data
main.py - Model and experiment runner → Experiment settings: reads settings
main.py - Model and experiment runner → Modality encoders: invokes encoders
main.py - Modality encoders → Graph convolution: applies convolution
models/enc_dec.py - Model and experiment runner → Shared representation: builds shared features
main.py - Shared representation → Modality encoders: uses decoder utilities
models/shareLayer.py - Model and experiment runner → Representation attention: weights representations
main.py - Model and experiment runner → Subject classifier: classifies subjects
main.py - Model and experiment runner → Evaluation metrics: evaluates predictions
main.py