When Batch Effects Shatter Biomarker Selection: A Solvable Theory for Choosing What to Knock Out

Labs that hunt for disease-driving genes usually fit a sparse regression to expression data pooled from many studies or plates, then send the top-ranked genes for expensive wet-lab tests such as CRISPR knockouts. Two problems make this unreliable. First, technical batch effects, meaning systematic differences between plates, labs or instruments that have nothing to do with biology, can masquerade as signal. Second, the sparse penalties used to pick small gene panels are non-convex, so different runs or tunings can return different, equally plausible gene lists. This proposal argues that these two problems are one phenomenon. When batch structure is partly entangled with biology, the set of good gene lists breaks into separate competing families. In one family the selected genes explain the outcome through biology. In others they explain it by mimicking batch identity. Statistical physics has a name and a toolkit for this breakup, replica symmetry breaking. We propose to compute, from the data's batch design alone, where the breakup happens and how much of each selected gene's evidence is batch-mimicry. The result is a calibrated probability, for each gene, that it belongs in the true driver set. That probability is the quantity a lab needs when deciding which genes to validate.

The tool that makes this computable is state evolution. For a family of iterative estimators called approximate message passing, the full high-dimensional behaviour of the algorithm reduces to a few scalar recursions. Each gene's estimate behaves like the true coefficient plus Gaussian noise of a known size $\tau_t$. Those recursions are proven only for idealised random designs, and they ignore batch structure. We extend them to designs with a finite-rank batch component. This adds a small number of order parameters that track how much the estimate leans on batch directions. We then use the extension to predict when batch confounding pushes selection into the shattered regime, and to correct per-gene false-discovery estimates there.

Core Claim

Consider a pooled design. The observed features are $X = G + BM$. Here $G$ is the $n \times p$ biological expression matrix, assumed to have a rotationally invariant spectrum but otherwise arbitrary. $B$ is the $n \times K$ matrix of batch indicators, and $M$ is the $K \times p$ matrix of batch-specific feature shifts. The outcome is

$$y = G w^* + B\gamma + \varepsilon,$$

where $w^*$ is the sparse vector of true driver effects, $\gamma$ is the batch effect on the readout itself, and $\varepsilon$ is noise. We let the biology $Gw^*$ correlate with $B$ with strength $c$. This captures unbalanced designs, where perturbations or patient phenotypes are not spread evenly across plates or cohorts. Running VAMP with a sparsity penalty on $(X, y)$, the state evolution of this model needs only three overlaps per iteration, plus the usual noise variance $\tau_t^2$:

  • the overlap $m_t$ between the current estimate and the true drivers $w^*$;
  • the overlap $s_t$ between the estimate's fitted values and the batch subspace spanned by $B$, which says how much of the fit runs through batch columns;
  • the estimate's self-overlap $q_t$.

VAMP (vector approximate message passing) is the message-passing variant that tolerates correlated, ill-conditioned designs. The added overlaps are finite in number because the batch component has rank $K$. This is why the extension should stay scalar rather than requiring a new matrix ensemble.

We make three claims. The first is that the de Almeida–Thouless line in the space of $(\alpha = n/p, \rho, c, \|M\|, \|\gamma\|)$ moves toward easier problems as confounding $c$ grows. The AT line is the stability boundary where a single-valley description of the solution landscape fails, and $\rho$ is the fraction of true drivers. Past this line, a non-convex selector such as SCAD has a second family of solutions with large $s$ and small $m$, which we call a batch-mimic state. The second claim is that a one-step replica-symmetry-breaking version of the algorithm (1RSB, which tracks a two-level hierarchy of solution clusters), given the batch overlap $s$ as an explicit order parameter, can be steered into the biological state. Steering is done by a penalty $\kappa s^2$ whose best strength $\kappa$ the theory predicts. The third claim is that the resulting per-gene effective noise channel gives local false discovery rates that remain calibrated in the confounded regime. Uncorrected message passing, and the usual pipeline of batch-correct then select, both lose that calibration.

Relation to Prior Work

Two papers supply the method, and each stops where this proposal starts. Macroscopic Analysis of Vector Approximate Message Passing in a Model Mismatch Setting derives state evolution for VAMP when the assumed model is wrong. It shows that VAMP's divergence boundary coincides with the AT line. It treats mismatch as unstructured, works on synthetic rotationally invariant data, and gives no algorithm that works inside the broken-symmetry regime. We give the mismatch a specific low-rank batch structure, which yields the extra order parameter $s$, and we build an algorithm for the region beyond the line. Perfect reconstruction of sparse signals using nonconvexity control and one-step RSB message passing builds 1RSB-AMP with gradual non-convexity annealing for SCAD. It raises the recoverable sparsity at $\alpha = 0.5$, $a = 3$ from about 0.297 under the replica-symmetric version to about 0.302, against a Bayes-optimal threshold of about 0.309. That work assumes i.i.d. Gaussian designs. It also reports that choosing the cluster-weight parameter (the Parisi parameter) by the textbook zero-complexity rule was numerically unstable, so the authors fell back on a heuristic. We move the construction to VAMP on spiked rotationally invariant designs. We also test a concrete replacement for the unstable rule: when batch labels are known, choose the Parisi parameter so that the predicted batch overlap $s$ matches its value on held-out batch-permuted replicates. Asymptotic Errors for High-Dimensional Convex Penalized Linear Regression beyond Gaussian Matrices supplies the rigorous replica-symmetric baseline for convex penalties on rotationally invariant designs. It covers our convex reference arm and no more.

Three papers motivate the problem empirically. Cross-platform analysis of cancer microarray data improves gene expression based classification of phenotypes shows that samples still cluster by lab after standard normalisation. Improved Outcome Prediction Across Data Sources Through Robust Parameter Tuning shows that internal cross-validation overfits study-specific noise in Lasso and boosting, and that tuning on an external study helps. Its remedy is empirical and needs a whole extra study. It gives no prediction of the right penalty or of when selection fails. The biomarker papers, such as Identification of KIFC1 as an independent prognostic marker in renal clear cell carcinoma correlates with tumor proliferation and immune infiltration and Altered sirtuin expression is associated with node-positive breast cancer, illustrate the downstream cost. Strong associations from pooled public cohorts still need knockdown experiments because confounding cannot be ruled out. These papers motivate the output we target: a per-gene probability to decide where the validation budget goes.

Batch-correction work constrains the design. Evaluating batch correction methods for image-based cell profiling finds Harmony and Seurat-RPCA consistently among the top three across five JUMP Cell Painting scenarios. Any proposal must therefore beat harmonise-then-select, not only naive selection. BERMUDA documents over-correction when cell populations are unbalanced across batches. This is the empirical face of our confounding parameter $c$, and it is why we do not simply project out batch. Finally, we do not claim that a nonzero conditional regression coefficient proves causation. causarray addresses unmeasured confounding in differential expression by other means. Our scope is narrower: separating batch-mimic selections from biological ones and calibrating the error rate of what is sent to the bench.

Research Program

The theoretical work has three steps. First, we derive replica-symmetric state evolution for VAMP on $X = G + BM$ with known $B$ and with $B$ correlated to the signal, tracking $(\tau_t, m_t, s_t, q_t)$. We check that its fixed points match the replica free energy, following the route of Takahashi and Kabashima. Second, we derive the AT stability condition for this system and map the $(\alpha, \rho, c)$ phase diagram for SCAD and for an $\ell_1$ reference. The prediction to test is that the convex penalty stays stable but becomes biased in $s$, while SCAD shatters earlier as $c$ grows. Third, we write the 1RSB extension with the $\kappa s^2$ penalty. We combine it with non-convexity annealing as in Gu et al. and test our replacement rule for the Parisi parameter.

The algorithmic deliverable is a Python implementation that outputs, for each gene, a posterior inclusion probability computed from the effective scalar channel. It also outputs a predicted phase label (stable, or batch-shattered) for the dataset at hand. A Python implementation sidesteps the R-versus-Python friction noted in the JUMP benchmark.

Baselines

The naive reference is SCAD and Lasso fitted to the pooled data, with batch ignored and the penalty chosen by internal cross-validation. It shows what happens with no action at all.

The first strong competitor is regress-out-then-select. Batch indicators are partialled out of both $X$ and $y$, as a linear-model analogue of ComBat, and then the same selectors are fitted. This is the obvious fix for additive batch shifts.

The second is harmonise-then-select. Harmony and Seurat-RPCA are applied to the features before selection, because the Arévalo et al. benchmark ranks them consistently in the top three on JUMP. No single scalar metric is reported in the file for that benchmark ("no reported result found on Lacuna" for a numeric bio-preservation score). We therefore rerun them ourselves using the same splits.

The third is RobustTuneC and external tuning from Ellenbach et al. These are the strongest existing answer to the question of how hard to regularise across studies. The file reports no aggregate number for them, only that they consistently beat internal cross-validation.

The fourth is stability selection with leave-one-batch-out resampling. It is the empirical way to measure selection instability, and we found no paper on it in the file.

Every method gets the same data, the same splits and a matched tuning budget. Each has the same number of penalty values and the same number of restarts or resamples, and every hyperparameter grid is chosen before the test batches are touched.

Two ablations isolate the key ingredient. One runs replica-symmetric VAMP with SCAD without the $s$ order parameter. The other runs the original 1RSB-AMP of Gu et al. without the batch term. As a sanity check, before any biological use, our implementation must reproduce the reported thresholds of about 0.297 (replica-symmetric) and about 0.302 (1RSB) at $\alpha = 0.5$, $a = 3$ on Gaussian designs.

Beating the baselines means two things. In the confounded regime ($c$ above the predicted AT shift), the method must reach higher driver recall at a fixed false-discovery rate than all four competitors. Its nominal 10% local false discovery rate must also have an observed rate within a pre-registered tolerance. In the unconfounded regime it must match regress-out-then-select and lose nothing.

Why not just…?

Why not just regress out the batch indicators and run Lasso? When batch is purely additive and balanced against biology, this is exact, and our theory says so: $s$ vanishes and the problem reduces to the standard one with $n - K$ effective samples. It is a real threat in that regime, and we expect a tie there. Projection fails when biology is unbalanced across batches ($c > 0$), because it removes the part of $Gw^*$ that lies in the batch span. This is the same over-correction BERMUDA documents for unbalanced cell populations. Our semi-synthetic sweep over $c$ shows directly where projection's recall falls below the $\kappa$-penalised estimator, and whether the crossover sits where the theory predicts.

Why not just tune the penalty on an external study, as Ellenbach et al. do? Robust tuning moves one dial, the overall penalty. It therefore shrinks weak biological drivers as hard as batch-mimic ones. It also needs a held-out study and gives no error-rate calibration for individual genes. If RobustTuneC matches our recall and calibration on the microarray benchmark, the practical case for the theory reduces to predicting the penalty without an extra study. We would report that honestly.

Why not just bootstrap across batches and keep the genes that are selected often? Stability selection is the most serious competitor. It measures empirically the same instability that the replica overlaps describe. Its weakness is interpretive. A gene can be selected stably precisely because it is stably batch-aligned. Bootstrapping cannot tell that gene apart from a true driver, whereas the $s$ overlap can. The decisive test is the semi-synthetic arm with planted batch-mimic genes. If stability selection filters those genes as well as our method does, the theory has diagnostic value but not practical value, and we will say so.

Why not just use better representations, such as CWA-MSN, and then any selector? Efficient Cell Painting Image Representation Learning via Cross-Well Aligned Masked Siamese Network reports +29% gene–gene retrieval over OpenPhenom on RxRx3-core by aligning replicates across wells. Better features are complementary, not competing. We run our pipeline on CWA-MSN-style embeddings as well as on hand-crafted profiles, to check that the phase prediction still holds after representation learning.

Proposed Experiments

The first experiment is semi-synthetic, and it is the decisive check. We take real morphological profile matrices from the JUMP Cell Painting dataset, using the multi-source scenarios from Arévalo et al., so that $G$ and $BM$ carry real lab and plate structure rather than idealised randomness. On top of these we plant a sparse driver vector and an outcome with controlled batch effect $\gamma$ and confounding $c$, and we also plant decoy features built to correlate with plate identity. We sweep $\alpha$, $\rho$ and $c$, and compare three things against theory: the empirical boundary where VAMP diverges or restarts disagree, the predicted AT line, and recall at a fixed false-discovery rate. Real JUMP matrices are not rotationally invariant. The size of the gap between predicted and observed boundaries is therefore the main falsification test for the whole approach. If the predicted boundary misses by more than the finite-size variation seen in the Gaussian control, the claim fails.

The second experiment uses the 15-study microarray collection from Ellenbach et al., with one study for training, one for tuning and thirteen for testing, on sex prediction. Here the true driver set is known biologically: sex-chromosome genes. This gives a functional ground truth without any new wet-lab work. We measure how many selected genes are sex-chromosome genes against the method's predicted false-discovery rate, alongside out-of-study AUC.

The third experiment closes the loop with functional validation using JUMP's CRISPR and ORF plates. We ask whether genes ranked highly by our posterior inclusion probability, fitted only on compound-treated wells, are more likely than baseline rankings to produce a reproducible cross-source phenotype when perturbed genetically. The perturbation readout acts as a stand-in for the knockdown experiment a lab would run.

The project succeeds if three conditions hold: the predicted phase boundary tracks the semi-synthetic one, the method beats projection and stability selection only where the theory says it should, and calibration holds on the sex-gene benchmark.