MAC-Net: A Multi-Task Deep Learning Framework for Modeling Cognitive Function From Task-Based fMRI
Authors: Md. Tanvir Rahman, Nabil Anan Orka, Asaduzzaman Khan, Mohammad Ali Moni
Organizations: School of Health and Rehabilitation Sciences, The University of Queensland, QLD 4072, Australia · Department of Information and Communication Technology, Mawlana Bhashani Science and Technology University, Tangail 1902, Bangladesh
Objective cognitive assessment from neural signals supports neurorehabilitation, but individual-level prediction from task-based fMRI (tfMRI) remains difficult because neural features coexist with substantial demographic and scanner-related variation. We present the Multi-task Activation and Contrast Network (MAC-Net), a covariate-aware deep learning framework for modeling individual cognitive function from regional tfMRI. By isolating tfMRI features into a dedicated neural pathway and restricting participant variables to a terminal late-fusion pathway, MAC-Net prevents dominant covariates from suppressing high-dimensional clinical representations during feature learning. Evaluating baseline data from 6,500 Adolescent Brain Cognitive Development Study participants under family-aware cross-validation, MAC-Net was benchmarked against linear models, random forests, and alternative deep architectures. The N-back plus Monetary Incentive Delay configuration achieved R2 values of 0.174, 0.238, and 0.277 for fluid, crystallized, and total cognition, outperforming covariate-only baselines (0.178) and alternative deep models (0.217). N-back was the most informative paradigm, whereas incorporating the Stop Signal Task marginally degraded performance. Feature attributions via Integrated Gradients, DeepLIFT, and Input Gradient were highly concordant, localizing working-memory-related frontal, parietal, and cingulate regions. These findings demonstrate that covariate-aware multi-task modeling yields reproducible cognitive-function estimations, establishing a robust neural engineering framework for clinical translation.
Figures & tables
Fold
Split
N
Males
Females
Age (months)
Gf
Gc
Gt
1
Train
3891
1947
1944
119.63 ± 7.53
94.05 ± 9.44
87.82 ± 6.50
88.57 ± 7.97
Val
1303
682
621
119.48 ± 7.54
93.84 ± 9.70
87.72 ± 6.51
88.39 ± 8.20
Test
1306
638
668
119.84 ± 7.59
93.64 ± 9.56
87.84 ± 6.47
88.36 ± 8.03
2
Train
3891
1930
1961
119.78 ± 7.53
93.99 ± 9.43
87.87 ± 6.49
88.58 ± 7.99
Val
1306
655
651
119.39 ± 7.59
93.82 ± 9.57
87.69 ± 6.47
88.33 ± 7.99
Test
1303
682
621
119.48 ± 7.54
93.84 ± 9.70
87.72 ± 6.51
88.39 ± 8.20
TABLE I : Participant characteristics and cognitive-score distributions across the training, validation, and test partitions of the five family-aware cross-validation folds.
Fig. 1 : Schematic of the MAC-Net architecture. Regional tfMRI beta estimates ( C conditions × 94 regions) are projected into a 64-dimensional embedding, flattened, and processed through a feed-forward backbone (256 → 128 → 64 units) with batch normalization, SiLU, and dropout. Participant and acquisition covariates bypass the tfMRI extractor via terminal late fusion. The primary N-back+MID configuration utilizes C=19 inputs; the N-back+MID+SST sensitivity ablation utilizes C=26 .
Fig. 2 : Distributions of continuous covariates and uncorrected NIH Toolbox cognitive outcomes. Histograms and kernel density estimates denote interview age, estimated total intracranial volume (eTIV), task-specific mean framewise displacement, and fluid, crystallized, and total intelligence scores. Categorical covariates (sex, MRI device) are omitted from visualization.
Target
Model / Modality Configuration
R2 ( ↑ )
Pearson r ( ↑ )
MAE ( ↓ )
MSE ( ↓ )
Gf
Covariate-Only Baselines
– Ridge
0.113 ± 0.006
0.338 ± 0.008
7.091 ± 0.073
80.257 ± 1.652
– Lasso
0.114 ± 0.006
0.340 ± 0.008
7.083 ± 0.075
80.112 ± 1.686
– ElasticNet
0.113 ± 0.005
0.338 ± 0.008
7.089 ± 0.091
80.207 ± 1.867
– Random Forest
0.087 ± 0.013
0.300 ± 0.018
7.207 ± 0.135
82.637 ± 2.738
Single-Task MAC-Net with Covariates
TABLE II : Baseline modeling performance. The top panel for each target displays covariate-only machine learning baselines (using age, sex, eTIV, scanner, and motion). The bottom panel displays MAC-Net performance using isolated single-task tfMRI inputs along with these common covariates. Values reflect mean ± standard deviation across five held-out test folds.
Target
Model Configuration
R2 ( ↑ )
Pearson r ( ↑ )
MAE ( ↓ )
MSE ( ↓ )
Gf
MAC-Net
0.174 ± 0.009
0.420 ± 0.009
6.855 ± 0.046
74.748 ± 1.373
Flattened Machine Learning
– Ridge
0.105 ± 0.020
0.357 ± 0.018
7.132 ± 0.100
80.939 ± 3.230
– Lasso
0.150 ± 0.017
0.392 ± 0.019
6.947 ± 0.082
76.892 ± 2.321
– ElasticNet
0.151 ± 0.015
0.395 ± 0.018
6.933 ± 0.105
76.814 ± 2.577
– Random Forest
0.119 ± 0.018
0.348 ± 0.030
7.070 ± 0.163
79.718 ± 3.194
TABLE III : Performance comparison of MAC-Net against conventional machine-learning and advanced deep-learning baselines. All models utilize N-back+MID tfMRI inputs and identical covariates under a common family-aware cross-validation framework.
Task
Condition / Contrast
Psychological Process
Total Features
N-Back
0-back (Baseline)
Baseline attention and visual processing.
846
2-back (Load)
High working memory load.
2-back vs. 0-back
Pure working memory updating signature.
Places
Visual processing of place stimuli.
Emotional Faces
Visual processing of emotional stimuli.
Face vs. Place
Category-specific visual processing.
TABLE S1 : Summary of task-fMRI conditions and functional contrasts included in the analysis. Beta estimates were extracted for each condition or contrast across 94 anatomical regions (comprising 68 Desikan–Killiany cortical parcels and 26 bilateral ASEG anatomical segments). This extraction yielded 846 features for N-back, 940 for the Monetary Incentive Delay (MID) task, and 658 for the Stop Signal Task (SST).
Target
Model
R2 ( ↑ )
Pearson r ( ↑ )
MAE ( ↓ )
MSE ( ↓ )
Gf
Ridge
0.045 ± 0.022
0.284 ± 0.022
7.382 ± 0.133
86.447 ± 3.617
Lasso
0.087 ± 0.017
0.306 ± 0.020
7.200 ± 0.114
82.599 ± 2.753
ElasticNet
0.090 ± 0.019
0.310 ± 0.024
7.183 ± 0.120
82.366 ± 3.027
Random Forest
0.084 ± 0.008
0.293 ± 0.015
7.217 ± 0.137
82.904 ± 2.529
MAC-Net
0.110 ± 0.010
0.341 ± 0.011
7.107 ± 0.125
80.532 ± 2.436
Gc
Ridge
0.093 ± 0.032
0.345 ± 0.029
4.819 ± 0.094
38.239 ± 1.439
TABLE S2 : Brain-only ablation performance using N-back+MID tfMRI inputs without participant or acquisition covariates. Values reflect mean ± standard deviation across five held-out test folds.
Inria Saclay Île-de-France, CEA, Université Paris-Saclay, Palaiseau, France · Sigma Nova · Sorbonne Université, Institut du Cerveau - Paris Brain Institute - ICM +1
Artificial Intelligence in Biomedical Imaging Lab, University of Pennsylvania · Department of Electrical and Systems Engineering, University of Pennsylvania · Florey Institute of Neuroscience and Mental Health, University of Melbourne +16