Code Repo for the accompanying paper Early Brain Functional Connectivity Changes Induced by Antidepressants and Placebo, which demonstrates its applications in antidepressant treatment.
Tong, X., Fonzo, G.A., Carlisle, N.B. et al. Early brain functional connectivity changes induced by antidepressants and placebo. Nature Mental Health (2026). https://doi.org/10.1038/s44220-026-00729-y
The most straightforward way to characterize treatment-induced FC changes may be to simply calculate the pre-to-post-treatment change in FC features; however, this procedure may mix treatment effects with random fluctuations and measurement noise, especially when FC changes are assessed at the individual level. In this study, we address this challenge by introducing an explicit learning objective that maximizes the test-retest reliability of identified FC change patterns (Fig. 1b), as well as separating the overall FC changes into distinct interpretable dimensions (Fig. 1a,c).
Reliability-aware FC change analysis is a versatile framework that can be applied to either classification, regression, or unsupervised learning tasks. Essentially, it represents a family of learning objectives integrating task performance with reliability assessment. In this study, reliability of FC changes is encouraged by maximizing signal-to-noise ratio (SNR), where signal is defined as between-timepoint FC differences, and noise as within-timepoint test-retest FC differences. Namely, we sought FC change dimensions with significant, clinically meaningful between-timepoint differences and minimal test-retest variability.
In this study, reliability-aware predictive learning combines three learning objectives in the overall loss function -- SNR constraint, prediction task, and regularization:
Since the loss function is to be minimized, the SNR loss is defined as the ratio between noise power and signal power:
For classification, the task loss is:
For regression, the task loss is:
L0-regularization is implemented on both FC dimension loadings and predictive weights to enhance generalizability and interpretability.
In this study, we used reliability-aware unsupervised learning to identify active-drug-specific FC changes -- this analysis involves no prediction tasks. Essentially, we seek FC dimensions showing significant changes in the active drug arm and minimal changes in the placebo arm and test-retest differences. This learning objective can be formularized as:
See corresponding Methods sections and Appendix A of the accompanying paper for math details.
ReliabilityAwareFCchangeAnalysis/
├── Codes/
│ ├── CVQ/ # Contrastive Variance Quotient Analysis (active-drug-specific FC change identification)
│ │ ├── CVQ.m # Optimization algorithm for CVQ
│ │ └── demoMain_CVQ.m # Conceptual demo of CVQ implementation
│ ├── Classification/
│ │ ├── optimizeClassification_ContinuousSparsification.m # main optimization procedure
│ │ ├── optimizeClassification_FineTuning.m # Auxiliary function for L0-regularization
│ │ ├── optimizeClassification_Initialization.m # Initialization algorithm
│ │ └── updateG_Classification.m # Auxiliary function for main optimization procedure
│ └── Regression/
│ ├── optimizeRegression_ContinuousSparsification.m # main optimization procedure
│ ├── optimizeRegression_FineTuning.m # Auxiliary function for L0-regularization
│ └── optimizeRegression_Initialization.m # Initialization algorithm
├── assets/
│ └── Fig1.jpeg # workflow figure
└── readme.md # this file
optimizeClassification_Initialization.m --> optimizeClassification_ContinuousSparsification.m --> optimizeClassification_FineTuning.m
updateG_Classification.m is called inside optimizeClassification_ContinuousSparsification.m
optimizeRegression_Initialization.m --> optimizeRegression_ContinuousSparsification.m --> optimizeRegression_FineTuning.m
Optimization is achieved by CVQ.m
demoMain_CVQ.m demonstrates the context of CVQ implementation.
