A popular way to diagnose psychiatric disorders from brain scans is to treat each patient as a node in a "population graph", connect patients whose scans or demographics look similar, and let a graph neural network pass diagnostic labels between neighbors. The method works when similar-looking patients share a diagnosis. That property is called homophily, or assortative mixing: nodes tend to link to nodes like themselves. There is a quiet failure mode here. Nearly every patient in these cohorts takes medication, and antipsychotics and antidepressants change brain connectivity. If similar-looking patients are similar mainly because they take similar drug doses, the graph is homophilous in medication. The classifier then gets good accuracy by recognizing drug exposure, not disease.
We propose to measure this directly and remove it. Before training, we compute a conditional medication assortativity of the population graph: how strongly patients with similar doses are linked, among patients who share a diagnosis. This works as a leakage audit. We then learn the similarity metric that builds the graph under a penalty that drives this quantity to zero, using medication records only during training and never at test time. A synthetic testbed built from deterministic, exactly solvable networks provides cases where the drug effect and the disease effect are known exactly. This lets us check that the audit and the correction find what they should.
Core Claim
Population-graph classifiers turn dose-dependent drug effects into apparent diagnostic signal through within-diagnosis medication homophily. Two things are measurable. The first is the medication assortativity of the graph among patients. The second is how strongly the classifier's patient scores track dose within the patient group. Both should drop to their null values under a metric-learning penalty, at a small and quantifiable cost to headline accuracy. The accuracy that survives the penalty is the honest estimate of the disease signal.
Here is what is new relative to existing work. Contrastive Graph Learning for Population-based fMRI Classification builds dynamic nearest-neighbour population graphs from age, sex and IQ on ADHD200. It never measures or constrains medication structure in those graphs. PriFS, a prior-guided sparse feature selector across four schizophrenia cohorts, states explicitly that its biomarkers mix illness and treatment effects. Assortative-Constrained Stochastic Block Models shows that putting constraints on mixing patterns rescues inference in noisy biological graphs, raising NMI from 0.34 to 0.55 on planted partitions. Its constraint forces assortativity on the target communities. We borrow the idea of a mixing-pattern constraint but reverse it: we forbid assortativity on a nuisance attribute.
Research Program
The central quantity is a weighted Pearson assortativity restricted to edges between same-diagnosis training nodes:
$$r_{m\mid y}(W)=\frac{\sum_{i,j:\,y_i=y_j} W_{ij}(m_i-\bar m)(m_j-\bar m)}{\sum_{i,j:\,y_i=y_j} W_{ij}(m_i-\bar m)^2}$$
In this formula, $W_{ij}$ is the population-graph edge weight between subjects $i$ and $j$, $m_i$ is subject $i$'s standardized dose (for example chlorpromazine equivalents), $y_i$ is the diagnosis, and $\bar m$ is the edge-weighted mean dose over those edges. In practice we compute it only over patients, because controls all have zero dose and would make $m$ a stand-in for $y$. We compare $r_{m\mid y}$ against a null that shuffles doses among patients while keeping the graph fixed. This gives a z-score for medication homophily.
The correction learns the similarity function $s_\theta$ that defines $W$ from connectivity features, by minimizing $\mathcal{L}_{\text{cls}} + \alpha\, r_{m\mid y}(W_\theta)^2$ on training subjects. Here $\mathcal{L}_{\text{cls}}$ is the usual classification loss and $\alpha$ sets the penalty strength. At test time the graph is built from $s_\theta$ alone, with no medication or label input. This avoids the trap where medication status itself reveals diagnosis.
As a secondary analysis, we compute each subject's degree assortativity from their individual connectome and test whether it tracks dose. This asks whether drugs push brain networks toward more local clustering or toward hub-to-periphery projections. The question is motivated by the assortativity flip reported in Assortative mixing in spatially-extended networks: spatially constrained growth gives $r\approx0.6$, which turns negative as preference for hubs increases, and human anatomical brain networks sit at $r=0.3886$.
The deterministic-network component is a validation testbed with exact ground truth, and we do not use it as a model of the brain. We generate synthetic subject connectomes from Evolving Sierpinski Networks. In the unified Sierpinski model, a single parameter $q\in[0,1]$ moves the graph from a fully deterministic fractal ($q=1$) toward disorder. We apply two known perturbations to each synthetic subject. The "disease" perturbation removes long-range inter-module edges. The "drug" perturbation, scaled by dose, adds hub-to-periphery edges, which is a controlled disassortative push. At $q=1$, and for comparison graphs such as the assortative deterministic trees of Qi et al. and Zhang et al. or the disassortative pseudofractal web, degree mixing is known analytically. That lets us unit-test the metric pipeline exactly before adding noise with $q<1$.
These papers constrain the design as well as motivating it. The deterministic-stochastic gap that Zhou et al. emphasize is why we use these graphs only for controlled checks.
Baselines
The naive reference point is a population graph built from raw connectivity features (and, separately, from age, sex and IQ as in CGL+DGC), with no audit or correction. This shows how much medication homophily the standard pipeline carries.
The strongest existing population-graph method is CGL+DGC, the method from Contrastive Graph Learning for Population-based fMRI Classification. It is the most direct competitor because it relies on the homophily mechanism we target. It reports 67.00% average accuracy and AUC 0.7210 on ADHD200. We will reimplement it on the same splits and sites, and first confirm we reproduce that number within a point or two. Our penalty is then added to its graph-construction step with the same encoder, epochs and hyperparameter search budget.
On the schizophrenia cohorts, the strongest reported subject-level graph classifier is Multi-SIGATnet. It reports 81.9% accuracy on COBRE and 75.8% on UCLA. For PriFS, the file reports only relative gains of 3.89% to 11.24% over nine feature selectors; no absolute per-cohort accuracy was found on Lacuna. We run both under identical cross-validation folds.
Two further comparisons test what the penalty adds. The first is linear dose regression on the features followed by the unchanged pipeline. The second is the shuffled-dose ablation: the same penalty computed with patient doses randomly permuted. It keeps the regularization strength and optimization identical but removes the medication information, which isolates whether the gain comes from the drug signal specifically.
Beating the baselines does not mean higher accuracy. It means three things together: $r_{m\mid y}$ falls within its null band; the within-patient correlation between classifier score and dose falls to non-significance; and accuracy on the lowest-dose patient tercile and on cross-disorder transfer matches or exceeds the baselines. We also report the headline accuracy drop, and consider the method useful if that drop is smaller than the drop dose regression causes on the same leakage metrics.
Why not just…?
Why not just regress dose out of the connectivity features? This is the most serious alternative and we run it. The file's evidence points to region-specific, two-directional effects. Jensen et al.'s review reports hyperconnectivity in some circuits and hypoconnectivity in others, with antipsychotics an unresolved driver of prefrontal variability. A single linear term per edge may leave interaction structure that neighbours in the graph still share. Our graph-level audit can detect such leftover structure where edge-wise regression cannot. If regression alone brings $r_{m\mid y}$ and the dose-score correlation to null, the penalty is unnecessary. We will report that as the outcome, keeping the audit as the contribution.
Why not just use an end-to-end graph neural network and trust it to ignore the confound? Nothing in a supervised loss discourages learning a drug signature that correlates with diagnosis. Stronger models may exploit it better. The fact that Multi-SIGATnet beats plain GAT by 4.6 to 5.5 points says nothing about what signal either one uses. The within-patient dose-score correlation applied to these models settles it.
Why not just adversarially remove dose from the learned embeddings? Adversarial debiasing acts on individual embeddings. Leakage in population graphs, however, runs through edges: two patients can each look dose-neutral and still be linked because they share residual drug structure. We include an adversarial-embedding variant under the same tuning budget. If it matches our penalty on all three leakage metrics, the graph-level formulation adds nothing beyond the audit.
Why not just use a stochastic block-model simulator instead of deterministic graphs? For noisy regimes this would work about as well, and we include planted-partition synthetic subjects for that reason. The deterministic graphs earn their place only at the $q=1$ end, where degree mixing is known in closed form. That exactness catches pipeline bugs that a simulator with sampling noise would hide.
Proposed Experiments
On synthetic Sierpinski and planted-partition cohorts, we vary dose-diagnosis correlation, drug effect size and $q$. We test whether $r_{m\mid y}$ detects the planted leakage and whether the penalty recovers a classifier that relies only on the disease perturbation. Recovery is scored as accuracy on subjects given the disease perturbation without the drug perturbation.
On COBRE, FBIRN, MPRC and B-SNIP, using the cohort sizes reported for PriFS, we first check which releases include usable dose records. For those that do, we run the audit on the baseline graphs, then the corrected pipeline.
The first decisive check is the within-patient dose-score correlation before and after correction. The second is transfer within B-SNIP's psychosis-spectrum groups, where drug classes differ across disorders: a drug-driven classifier should transfer worse than a disease-driven one. The third is a negative control on the medication-naïve BECTS EEG cohort. There the audit should report null homophily, and a synthetically planted dose effect should be detected and removed. ADHD200 enters only if its phenotypic release records stimulant status, which we will verify.
A null result is still informative. If the baseline graphs show no medication homophily, published population-graph gains are cleared of this particular confound.
References
- Contrastive Graph Learning for Population-based fMRI Classification
- A prior-knowledge-guided feature selection method and its application to biomarker identification of schizophrenia
- Assortative-Constrained Stochastic Block Models
- Assortative mixing in spatially-extended networks
- A unified model for Sierpinski networks with scale-free scaling and small-world effect
- Structural and spectral properties of a family of deterministic recursive trees: rigorous solutions
- Topologies and Laplacian spectra of a deterministic uniform recursive tree
- A general geometric growth model for pseudofractal scale-free web
- Deterministic weighted scale-free small-world networks
- Multi-SIGATnet: A multimodal schizophrenia MRI classification algorithm using sparse interaction mechanisms and graph attention networks
- Aberrant cortical–subcortical-cerebellar connectivity in resting-state fMRI as an imaging marker of schizophrenia and psychosis: a systematic review of data-driven whole-brain functional connectivity analyses
- Electroencephalographic Resting-State Functional Connectivity of Benign Epilepsy with Centrotemporal Spikes