Balancing the Training Set Behind Learned Brain Endophenotypes

A common recipe in imaging genetics now trains a neural network to tell Alzheimer's patients from healthy controls on brain MRI. It then treats the network's internal features as a "learned endophenotype": a brain trait, sitting between genes and diagnosis, that is supposed to carry cleaner genetic signal than diagnosis itself. Those features are then tested against hundreds of thousands of genetic variants. The weak point is the training set. Alzheimer's cases and controls in cohorts like ADNI differ in age, sex, education, head size and scanning site. A classifier trained on raw groups is rewarded for learning any brain pattern that separates them, including ordinary aging. The genetic study that follows is then searching for genes that drive a trait that is partly "looking old."

We propose to fix this at the step where the trait is built rather than the step where it is tested. The feature extractor is trained under covariate-balancing weights. These are the weights developed in observational causal inference to make treated and untreated groups comparable on measured background variables. With them, the network is rewarded only for differences between cases and controls that remain once age, sex, head size and site distributions are equalized. The claim to test is that such balanced endophenotypes carry less confounder information, recover planted and known genetic effects more reliably, and transfer better to an independent population cohort than unbalanced or linearly residualized ones. If simple residualization does just as well, that is a useful negative result for a field that currently does neither.

Why this, and not the obvious combinations

Two direct borrowings from causal inference already exist near this intersection. AI-driven Preclinical Disease Risk Assessment Using Imaging in UK Biobank builds controls by one-to-one propensity score matching on age, sex, body mass index and ethnicity, so its whole-body MRI classifiers cannot win by predicting age. It uses no genetics, and matching serves only as cohort curation. Propensity Score Alignment of Unpaired Multimodal Data uses classifiers that predict which experimental perturbation a cell received, then soft-matches unpaired single-cell RNA and microscopy samples in that shared probability space. It depends on discrete experimental knockouts, which human cohorts do not have, so porting it to ADNI would mean inventing an anchor that does not exist.

The imaging genetics pipelines that build learned traits do no sample-level balancing. Neuroimaging feature extraction using a neural network classifier for imaging genetics trains its classifier on 287 unbalanced ADNI controls and Alzheimer's patients, then passes penultimate-layer features to a Bayesian group-sparse multi-task regression to find variants. 'Diet' deep canonical correlation analysis maximizes nonlinear correlation between SNPs and amyloid PET regions across 955 subjects. The causal methods in the area address other biases. Trustworthy causal biomarker discovery removes spurious associations caused by correlation among nearby genetic variants. High-dimensional causal mediation analysis by partial sum statistic and the module-level polygenic risk NetWAS study test whether imaging traits mediate genetic risk, using regression rather than balancing. These papers motivate the gap. None of them asks whether the trait itself was learned from a confounded contrast.

There is a specific reason to expect this to matter, and it is not the textbook one. In the general population, genotype is close to randomly assigned with respect to age and sex, so simply adjusting for age in the final genetic association test removes most direct confounding there. The problem sits in the selected cohort. Among ADNI cases, carriers of APOE ε4 tend to reach diagnosis younger. A trait that partly encodes aging will therefore covary with APOE in a direction set by recruitment rather than biology. This is selection-induced (collider) bias. Adjusting at the final testing stage cannot remove it, because it is baked into what the network chose to call "disease." Balancing during training targets that mechanism directly.

Core Claim

Weighting the classifier's training loss so that cases and controls are balanced on measured confounders yields endophenotypes with three properties. They are less predictive of the confounders. They give better-calibrated genetic association tests. And they keep their association with known Alzheimer's loci when moved to a cohort with different age structure. Linear residualization of the input features does not reliably achieve these properties, because the network can recover age from nonlinear patterns in residualized regional measures.

Research Program

The method stays deliberately simple, so that any gain can be credited to balancing and not to architecture. We start from FreeSurfer regional volumes and cortical thickness in ADNI, as in the classifier pipeline paper. For the control-versus-Alzheimer's training set, we estimate balancing weights $w_i$ over a confounder vector $X_i$: age, sex, years of education, intracranial volume, scanner field strength and acquisition site.

We use the covariate balancing propensity score, which builds the moment-matching conditions directly into propensity estimation. This follows A difference-in-differences estimator by covariate balancing propensity score and the conditions analyzed in Optimal Covariate Balancing Conditions in Propensity Score Estimation. We also run isotonic-calibrated inverse weighting (Stabilized Inverse Probability Weighting via Isotonic Calibration) as a second weighting scheme. Extreme weights are trimmed following Weight Trimming and Propensity Score Weighting, and we report how the effective sample size changes. The classifier $f_\theta$ is trained by minimizing

$$\sum_i w_i \,\ell\big(f_\theta(Z_i), D_i\big),$$

where $Z_i$ are the regional imaging measures, $D_i$ is diagnosis, and $\ell$ is cross-entropy. The weights are chosen so that the weighted means of $X$ (and of age squared and age-by-sex) agree between cases and controls. Under this weighting, a direction in feature space that only tracks $X$ carries no expected discriminative signal. That is exactly the incentive we want to remove.

The penultimate-layer features are then extracted for all baseline subjects, including the mild cognitive impairment group the classifier never saw. They are passed unchanged to the same Bayesian group-sparse regression used by the classifier pipeline paper, with standard ancestry principal components. Ancestry and relatedness are handled at the association stage, as in Bayesian mixed model inference for genetic association under related samples. They are not part of $X$, because genotype legitimately differs by ancestry, and balancing on it during training would discard real signal.

Beyond the method, the program builds a diagnostic for confounder leakage. For any learned endophenotype, we measure how well a held-out nonlinear regressor predicts age, and how well a classifier predicts site, from the features alone. The question is whether this leakage score predicts how badly that endophenotype's genetic tests are miscalibrated. If it does, other groups can apply it to their own learned traits without rerunning genetics.

Baselines

The do-nothing reference is the expert-selected ROI set used as the comparison in the classifier pipeline paper, passed directly to the same Bayesian regression. It shows whether learning a trait helps at all. The strongest direct competitor is the unweighted neural classifier pipeline of Neuroimaging feature extraction using a neural network classifier for imaging genetics. It is the method our proposal modifies, and its authors report that its features beat expert ROIs in classification accuracy with p < 0.0001. The file gives only that significance statement, so no reported accuracy value was found on Lacuna for that pipeline. We will reimplement it on the same 543-subject baseline set with the same architecture, the same random seeds and the same hyperparameter search budget, so that the only difference is the loss weights.

The second strong baseline is DietDCCA from 'Diet' deep canonical correlation analysis. It builds its trait from genotype–imaging correlation rather than diagnosis, and it represents the other main route to learned traits. Its gain over standard deep canonical correlation is reported only as "large," and no numeric result was found on Lacuna for DietDCCA. We run it on our ADNI subset, with and without the same balancing weights applied to its correlation objective.

The baseline we regard as most threatening is residualization: regress age, sex, intracranial volume and site out of every regional measure before training the unweighted classifier, then also include those covariates in the association model. Two ablations isolate the key ingredient. The first is placebo weights: weights drawn to match the effective sample size and dispersion of the real balancing weights but unrelated to $X$. This shows that gains come from balance and not from reweighting noise. The second is one-to-one caliper matching in the style of the UK Biobank risk study, which balances by discarding subjects. Comparing it with weighting measures how much the sample loss in a small cohort costs. Beating the field means improving the planted-effect and transfer checks below, not only the classification accuracy, which balancing may well reduce.

Why not just…?

Why not just regress the confounders out of the imaging features first? This is the real threat. If age effects on regional volumes were linear and additive, residualization would remove them and our weighting would add nothing. We expect it to fall short for two reasons. Age interacts with sex and with region-specific nonlinear atrophy curves, and a nonlinear classifier can rebuild age from residualized inputs. Residualization also does nothing about the selection-induced link between APOE and age at diagnosis. The leakage score and the planted-effect simulation test this directly. If residualized features show the same low age predictability and the same calibration, we will report that residualization is sufficient.

Why not just add age and sex to the genetic association model and leave the extractor alone? This removes confounding between genotype and the final trait. It does not change what the trait measures. In the full population that is mostly harmless and costs only power. In a selected case–control cohort, it leaves the recruitment-driven APOE–age link inside the trait. The UK Biobank transfer test separates the two: a trait that is mostly aging should lose its APOE association in older non-demented adults once age is fixed, while a disease-specific trait should keep it.

Why not just propensity-match cases and controls one-to-one, as the UK Biobank risk study did? It works when 100,000 imaged participants are available. ADNI has 145 controls and 142 Alzheimer's patients at baseline in the analyzed set. Caliper matching on six covariates would discard a large share of them and shift the target toward a narrow overlap region. The matching ablation reports both the subjects lost and the resulting genetic power. If matching performs as well as weighting, it is the simpler recommendation and we will say so.

Why not just use an unsupervised or correlation-based trait that never sees diagnosis? This avoids the confounded case–control contrast. But age and site still drive covariation between amyloid PET and genotype across a recruited sample. Trustworthy causal biomarker discovery already shows that correlation maximization picks up spurious structure. Running DietDCCA with and without balancing weights tests whether the problem is specific to supervised traits.

Proposed Experiments

The first decisive check is semi-synthetic. Using real ADNI genotypes and real FreeSurfer features, we add a known effect of a chosen non-APOE variant on a small set of medial temporal regions, scaled to a realistic variance fraction. We also add an age-dependent atrophy pattern that is imbalanced between cases and controls. Each pipeline is scored on recovery of the planted variant (true-positive rate at fixed false discovery) and on calibration under the null (inflation of test statistics for variants with no planted effect), across many random repeats. Balanced training should recover the planted variant at least as often as the unweighted classifier, with less inflation. Residualization should fall in between, unless the confound is purely linear. We include a linear-confound condition as an explicit check where residualization is expected to tie.

The second check measures confounder leakage on real data: cross-validated accuracy for predicting age and site from each pipeline's features, alongside how well the features classify held-out mild cognitive impairment converters. The third check is transfer. Extractors trained in ADNI are applied to UK Biobank brain MRI in older participants without dementia, and we test association of the features with APOE ε4 (rs429358) after adjusting for age. That cohort has a different age and recruitment structure, so a feature that keeps its APOE association there is more plausibly disease-related than recruitment-related. The fourth check is a positive-control panel within ADNI: whether the secondary loci highlighted by DietDCCA and Ca-GPCA (ABCA7, APOC2, NECTIN2) rank higher under balanced traits.

As a secondary test of generality, we apply the same weighting to the attention model of Copy Number Variation Informs fMRI-based Prediction of Autism Spectrum Disorder, balancing on age and head motion, which that study did not balance. Its reported 69% accuracy and 0.70 AUC give a fixed reference. The question is whether the copy-number attention benefit survives once age leaves the query and enters the weights instead.

The project succeeds if balanced traits beat both the unweighted classifier and residualization on the planted-effect calibration and the UK Biobank transfer test, even at some cost in raw diagnostic accuracy. It fails informatively if residualization ties on every check.