Much of the genetic influence on human traits is still unaccounted for. Gene-by-gene interaction, called epistasis, is one suspected reason. It is hard to find because testing every pair of variants means about $10^{14}$ tests, which leaves almost no statistical power after correcting for multiple comparisons. Metabolism suggests a way to narrow the search. Molecules flow through reactions, and mass must balance at every step. Two individually mild defects in enzymes on the same route can therefore combine into a sharp drop in output, because the flow has to squeeze through whichever enzyme is weakest. That kind of non-additivity is built into the chemistry. In principle it can be predicted before looking at any trait data.
We propose to build a generative model of each person's metabolic flows (the rates at which molecules move through reactions) conditioned on their genotype. Every sample the model produces is forced onto the set of flows that respect mass balance and genotype-dependent enzyme capacity limits. We then query the model for which gene pairs it predicts to interact. The result is a short, ranked list of physically motivated interaction hypotheses, which we test in exome-plus-metabolome cohorts. The bet is that the physical constraint turns an unsearchable $p^2$ problem into a few hundred well-targeted tests. If it does not beat a plain metabolic simulation at that ranking task, we will report that and drop the generative part.
Core Claim
A conditional flow-matching model trained under hard stoichiometric constraints on paired genotype and metabolite data produces gene-pair interaction rankings that are more enriched for real non-additive effects on metabolite levels than three alternatives: a deterministic whole-body metabolic simulation, an unconstrained generative model, or a purely statistical interaction search. Flow matching here means a generator that learns a smooth transport from noise to data samples. The constraint is what makes the model's interactions meaningful. Data calibration is what makes them specific to real people rather than to one idealized optimum.
How this relates to prior work
Two lines of work motivate the gap. Coupling metabolomics and exome sequencing paired whole-exome sequencing with 1,294 plasma and 1,396 urine metabolites in 4,737 participants of the German Chronic Kidney Disease (GCKD) study. They used constraint-based whole-body models to simulate single-gene "virtual inborn errors of metabolism," which recovered graded effects of rare heterozygous variants, such as sulfate transporters affecting height. Their models are deterministic and non-differentiable, they aggregate variants with hand-made masks, and they test genes one at a time. We take their cohort, their metabolic network and their single-gene framing as our starting point. We add a learned distribution over flows and ask about pairs of genes.
Epistasis regulates genetic control of cardiac hypertrophy found interactions among CCDC141, TTN and IGF1R that conventional association studies missed, using signed iterative random forests over 15 million variants. Novel methods for epistasis detection restricts the search to anchor variants and uses propensity scores to separate real interaction from correlation between nearby variants (linkage disequilibrium). Both are purely statistical. Neither uses biochemistry to decide which pairs to test, and that is the ingredient we add. Network aggregation such as module-level NetWAS uses protein-network topology without any mass or flow law, so it serves as a topology-only comparison.
The method side borrows from physically consistent generation. Physics-Constrained Flow Matching projects intermediate predictions onto an equality-constraint manifold during sampling, reaching near-zero constraint error. It supports only equality constraints, while enzyme capacity bounds are inequalities. Extending its projection to a polytope is one of our technical pieces. Physics-Informed Diffusion Models instead add a physics residual to the training loss. That gives us the soft-constraint ablation. Physics Informed Constrained Learning of Dynamics from Static Data imposes steady-state mass balance on flows inferred from static single-cell snapshots. Its message-passing method can collapse to the trivial all-zero-flow solution, and it never touches germline genetics. We expect that anchoring exchange flows to measured plasma and urine metabolites removes the zero-flow escape. We also reuse its synthetic reaction networks for validation where ground truth is known.
Research Program
The model works on a subnetwork of the whole-body metabolic reconstruction. The subnetwork is built from the reactions within a few steps of the 235 gene–metabolite associations reported in the GCKD study. This keeps the size to hundreds of reactions, small enough to train on 4,737 people.
Each individual has a latent flow vector $v$. Their genotype $g$ is summarized as a graded capacity per gene, derived from damaging-variant burden and expression-altering common variants. Samples must lie in
$$\mathcal{F}(g) = \{\, v : S v = 0,\; \ell(g) \le v \le u(g) \,\},$$
where $S$ is the stoichiometric matrix (which molecules each reaction consumes and produces). The constraint $Sv=0$ is steady-state mass balance, and $\ell(g), u(g)$ are reaction bounds scaled by the person's enzyme capacities.
A conditional flow-matching network generates $v$ given $g$ and covariates. At each integration step, the forecast endpoint is projected onto $\mathcal{F}(g)$ by a small quadratic program, which extends the projection of the equality-only constrained flow-matching method. A learned observation model maps exchange flows to log metabolite levels in plasma and urine. Training maximizes fit to observed metabolites through that observation model.
To get interaction predictions, we query the trained model with counterfactual genotypes. For genes $i$ and $j$ and metabolite $m$, the predicted interaction contrast is
$$\Delta_{ij}^m = \mathbb{E}[y_m \mid i{\downarrow}, j{\downarrow}] - \mathbb{E}[y_m \mid i{\downarrow}] - \mathbb{E}[y_m \mid j{\downarrow}] + \mathbb{E}[y_m \mid \text{ref}],$$
where $\downarrow$ means reduced capacity and $\mathbb{E}$ is taken over model samples. Pairs are ranked by $|\Delta_{ij}^m|$.
Sample size limits what can be tested. People who carry two rare damaging variants are almost nonexistent in 4,737 individuals. The primary empirical test is therefore a rare-damaging gene crossed with a common capacity-altering variant in a partner gene, a combination for which carrier counts are workable. Rare-by-rare predictions are evaluated only on synthetic networks.
Baselines
The naive reference point is the additive gene-burden association model used by Scherer et al.. Each metabolite is regressed on per-gene burden with no interaction terms. It has no interaction ranking of its own, so for ranking it is paired with random selection among pairs of genes in the same pathway. The model counts as beaten on prediction if held-out metabolite variance explained rises under identical covariates and folds. The file reports 235 significant gene–metabolite associations and that 38% of the genes are known inborn-error genes. No reported held-out predictive accuracy was found on Lacuna for this model.
The strongest competitor is the deterministic whole-body model itself. We run in silico double knockdowns with the same subnetwork, the same genotype-to-bound mapping and the same pair candidates, and rank pairs by their predicted non-additive change in exchange flow. It is the strongest competitor because it already contains all of the stoichiometry. If our model wins, the gain must come from learning which feasible flows real people actually use. No reported result was found on Lacuna for whole-body-model double-knockout epistasis prediction. Beating it means a significantly higher enrichment of nominally significant interactions in held-out data among the top-$k$ ranked pairs, at matched $k$, tested by permutation.
The statistical interaction baselines are signed iterative random forests from the cardiac hypertrophy study and propensity-score anchored testing from epiGWAS. Both are trained on the same training folds, with hyperparameter search budgets matched to ours in compute hours. Neither paper's summary in the file gives a number transferable to this setting: no reported AUC was found on Lacuna for epiGWAS on WTCCC. A topology-only ranking by protein-network proximity, in the spirit of NetWAS, tests whether "same neighborhood" alone explains any enrichment.
Three ablations isolate the key ingredient. The first uses the same architecture with no constraint. The second replaces the hard projection with a soft residual penalty in the style of PIDM. The third keeps the hard projection but with a degree-preserving shuffle of $S$. The shuffled-stoichiometry ablation is the most important control. If it ranks pairs as well as the true network, the gain comes from capacity bounds and flexible fitting, not from biochemistry.
Why not just…?
Why not just run double knockouts in the existing whole-body model? This is the real threat. Constraint-based models return one optimum under an assumed objective, and when many flow patterns are equally feasible, a partial capacity reduction often leaves that optimum unchanged. That predicts no interaction where people may in fact reroute flow. Our model instead learns from metabolite data which feasible flows are realized. This is an argument, not evidence, and the head-to-head ranking comparison above settles it. If the whole-body model matches us, the conclusion is that its double knockouts are the cheap, sufficient tool, and that is still a useful finding for heritability research.
Why not just fit an unconstrained conditional generative model, or a flexible regressor, on genotype and metabolites? With 4,737 people and thousands of metabolites, an unconstrained model has little reason to place interactions on biochemically connected pairs. Generative models without structural biases produce statistically plausible but physically impossible outputs, as the detector-simulation taxonomic review notes. PIDM reports that physics terms reduce overfitting on sparse data. The unconstrained ablation measures this directly, through constraint violation of its implied flows and through ranking enrichment.
Why not just search for interactions statistically with random forests or anchored tests on metabolite traits? These methods search blindly over pairs and pay the full multiple-testing cost. At this sample size they have little power for rare variants. They are run as baselines on identical folds. If they match the physics-derived ranking, the constraint adds nothing, and we will say so.
Why not use existing flux-inference tools? On matched measured fluxes, MPOCtrL reports Pearson $r=0.75$, while scFEA correlated negatively and Compass predicted no change. Those tools also have no genotype input. Their failure supports using global mass balance, but it is not our comparison target.
Proposed Experiments
The first stage is synthetic. On the synthetic reaction networks from MPOCtrL (the cyclic CMMRN and the 204-factor SDFG), we simulate genotype-dependent enzyme capacities, including planted interacting pairs and noise. We then measure flow recovery by cosine similarity and interaction recovery by precision at top-$k$, against every baseline. MPOCtrL's reported cosine similarity above 0.83 on CMMRN is the reference for flow recovery, and we check that projected samples reach constraint error near zero, as PCFM reports for equalities.
The second stage uses GCKD. We train on 80% of participants and measure held-out metabolite variance explained, comparing it with the additive burden model. We compute rankings from the training data only and test the top-ranked rare-by-common pairs for interaction in the held-out 20%. The primary endpoint is enrichment over the whole-body double-knockout ranking. Where metabolite and exome data permit, the top pairs are re-tested in UK Biobank, which the GCKD study used for replication.
The decisive checks are three. First, the true network must beat the shuffled one. Second, the generative model must beat the whole-body double knockouts at matched $k$. Third, any surviving pair should show the bottleneck signature on its shared metabolite: a larger than additive drop when both capacities are low. Passing the first check while failing the second would redirect the project toward data-calibrated bounds inside classical metabolic models. Failing the first check would mean stoichiometry is not where this missing heritability hides.
References
- Coupling metabolomics and exome sequencing reveals graded effects of rare damaging heterozygous variants on gene function and human traits
- Epistasis regulates genetic control of cardiac hypertrophy
- Novel methods for epistasis detection in genome-wide association studies
- A Module-Level Polygenic Risk Score-Based NetWAS Framework for Identifying AD Genetic Modules Mediated by Amygdala: An ADNI Study
- Physics-Constrained Flow Matching: Sampling Generative Models with Hard Constraints
- Physics-Informed Diffusion Models
- Physics Informed Constrained Learning of Dynamics from Static Data
- Deep generative models for detector signature simulation: A taxonomic review