Solver-Gated Constraint Mining for Metabolic Models

Computer models of cell metabolism are often reconstructed from gene-expression data. The typical model is genome-scale: a list of every known reaction, with each reaction's rate, or "flux," solved by linear programming. These models are unreliable in a specific way. When different reconstruction algorithms are applied to the same cancer data, they give significantly different flux predictions. Biologists, meanwhile, know many qualitative facts that never reach these models. Two examples are that hypoxia pushes cells toward glycolysis and that PDHK1 shuts down pyruvate entry into mitochondria in hypoxic tumor cores. We propose to have language-model agents turn such facts into candidate flux constraints, and to admit a constraint into the model only after a deterministic check passes. That check uses the solver itself and the measured data, not another language model.

The design borrows from multi-agent task decomposition, the practice of splitting a hard problem among several specialized LLM roles. Here the roles are a proposer that mines constraints, a judge that tests them, and an executor that solves the model. We use the split for a purpose the multi-agent literature has mostly not examined: as a firewall against overfitting. The agent that writes constraints never sees the data used to score them. Metabolic reprogramming supplies the application and, through E. coli models with known regulatory networks, a testbed where the answer is known.

Core Claim

The claim is narrow. Qualitative regulatory knowledge, written by an LLM as bounds on reaction fluxes and admitted only through a solver-backed gate, should do two things:

  1. Reduce the disagreement between context-specific metabolic models built by different algorithms.
  2. Recover correct flux predictions when the regulatory network is corrupted.

It should do both without the gains coming from the constraints being fitted to the evaluation data. We further claim that two ingredients do the work:

  1. The gate, meaning the feasibility and evidence checks against the solver.
  2. The firewall, meaning the proposer cannot see scoring data.

The multi-agent setup around them should matter less. If a single tool-using agent with the same gate matches the decomposed system, we will report that the decomposition is unnecessary.

Motivation and Prior Work

Two results define the problem. Exploring the Metabolic Heterogeneity of Cancers built 3,740 context-specific models from Recon3D, a generic template of human metabolism. It used four algorithms (GIMME, iMAT, INIT, FASTCORE) and six omic datasets. It found significant pairwise disagreement in flux states (Bland-Altman p < 0.05). GIMME and INIT were the most consistent with known cancer hallmarks.

Sensitivity Analysis of Genome-Scale Metabolic Flux Prediction, called TRIMER, couples a Bayesian regulatory network to flux balance analysis, the linear program that predicts fluxes under mass balance. It does this in the E. coli model iAF1260. It shows that errors in the regulatory network propagate into flux predictions. Predictions hold a Pearson correlation above 0.95 with ground-truth biomass once at least half of the critical edges are covered, and stay stable until more than 30% of expression states are noisy. Both papers motivate the proposal: they show that model-building choices and network errors drive the outputs.

On the method side, MACM supplies the template. It has a Thinker that mines intermediate conditions, a Judge that admits each condition only after checking it, and an Executor that computes. MACM raised GPT-4 Turbo on Level 5 MATH from 54.68% to 76.73%. We reuse this structure, but our Judge is the linear-programming solver plus held-in omics, not an LLM.

MALADE pairs each agent with a critic and reserves numeric work for code. Its critic corrected one agent in 44.5% of cases, and it reached an area under the ROC curve of 0.90 on the OMOP adverse-event benchmark. LLM-RDF gives six chemistry agents narrow tool access and couples them to Bayesian optimization. Both support the hybrid design and its "keep the LLM away from arithmetic" rule. Neither touches cellular metabolism, and neither tests whether the separation of roles prevents overfitting.

CaMeRe is the closest metabolic tool. It runs a deterministic, expression-weighted graph search over HumanCyc and recovers 7 of 8 canonical cancer pathways in its top three hits. It cannot use regulatory knowledge that is absent from its template. Biology papers in the file supply the kind of facts we expect agents to mine. Refining the Role of PDHKs in Glioblastoma reports PDHK1 in hypoxic cores and PDHK2 at invasive margins. AMPK regulates homeostasis of invasion and viability in trophoblasts reports glucose redirection toward phosphoenolpyruvate under AMPK activation. Absolute dynamic and relative static shows that glycolysis and oxidative phosphorylation coexist. That last paper constrains the design: constraints must be soft or ratio-based, not binary pathway switches.

Research Program

Three roles share one solver and one evidence store.

The Proposer. This is an LLM with retrieval over literature and the model's gene–reaction annotations, but no access to scoring data. It emits typed constraints, each tied to a cited mechanism. One example would be "under hypoxia, flux through pyruvate dehydrogenase is at most a fraction α of baseline." Another would be "lactate export increases relative to the TCA cycle."

The Judge. This is deterministic code. It admits a constraint only if three checks pass:

  1. The model stays feasible and keeps nonzero biomass.
  2. The direction of the constraint agrees with the held-in expression or proteomic evidence for the reactions involved.
  3. The constraint does not conflict with constraints already admitted. Pairwise feasibility is checked incrementally, in the condition-list style of MACM.

Rejected constraints go back to the Proposer together with the solver's diagnostic, such as which mass balance broke.

The Executor. This runs flux balance or flux variability analysis on the constrained model.

The firewall is enforced by tool permissions rather than by instructions in the prompt.

We will build this on two substrates. The first is iAF1260 with the EcoMAC regulatory network, following the TRIMER setup. The true network is known there, so we can corrupt a controlled fraction of edges (10–50%) and measure recovery. The second is the Recon3D benchmark setting. There we construct GIMME, INIT, iMAT and FASTCORE models per cell line, with and without admitted constraints.

Baselines

The naive reference is the unmodified pipeline. On E. coli, this is TRIMER's flux prediction from the corrupted network. TRIMER reports a Pearson correlation above 0.95 when at least 50% of focused edges are covered, and stability up to 30% noisy expression states. We will reproduce its curve on our own corruption levels rather than rely on that number. On Recon3D, the naive reference is each algorithm's model built from the identical omics. The benchmark paper reports significant disagreement (p < 0.05) and identifies GIMME and INIT as the most hallmark-consistent. We found no reported numeric hallmark score on Lacuna for these models, so we will compute one ourselves.

The strongest non-LLM competitor is a deterministic consensus model. A reaction is kept if at least k of the four algorithms include it, and k is tuned on the same held-in data our Judge uses. On the E. coli substrate, the corresponding competitor is TRIMER's own edge ranking by semidefinite programming. Consensus is the obvious fix for discordance and costs no tokens. Beating it means one of two outcomes. Either higher hallmark agreement at equal or lower inter-algorithm disagreement, or, on E. coli, higher held-out correlation at corruption levels above 30%. The second is where TRIMER is reported to degrade.

The strongest LLM competitor is a single agent with the same retrieval, the same solver tool, the same token budget, and a matched number of solver calls. It writes, tests and revises its own constraints. For this baseline, all data is visible.

Three ablations isolate the key ingredients:

  1. The Proposer's constraints are admitted without the Judge, which tests the gate.
  2. The Judge is replaced by an LLM critic, which tests whether the verifier must be deterministic.
  3. The firewall is removed so the Proposer sees scoring data, which tests leakage.

All arms use the same base model, retrieval corpus and five random seeds.

Why not just…?

Why not just use a single tool-using agent with chain-of-thought? This is a real threat. MACM's and LEGO's gains over single-model prompting were measured on math and causal-explanation text tasks, not on solver-backed modeling. Neither result transfers automatically. The matched single-agent baseline settles the question directly. If it ties, the claim reduces to "the solver gate matters," and we will report that.

The firewall predicts one specific difference. An agent that can see scoring data will produce constraints that fit the held-in data but do worse on held-out data. We will therefore measure the gap between held-in and held-out performance, not just headline accuracy.

Why not just take a consensus of the reconstruction algorithms, or run deterministic knockout scans? Consensus can only choose among reactions the algorithms already disagree about. It cannot add information such as a hypoxia-specific bound on pyruvate dehydrogenase, which is exactly the kind of fact the PDHK glioblastoma study reports. Still, consensus may reduce disagreement just as well. The decisive comparison is therefore hallmark and held-out accuracy at matched disagreement, not disagreement alone. Over-constraining any model trivially lowers disagreement, so lower disagreement by itself proves nothing.

Why not just let the LLM predict metabolic phenotypes directly, with no solver? MACM and LLM-RDF both report LLM weakness on numeric and kinetic constraints. We will include this arm on the E. coli biomass task to show how large the gap is. We expect it to fail on magnitudes even where it gets directions right.

Proposed Experiments

The decisive check runs on corrupted E. coli networks. We plot held-out biomass correlation against corruption level for five arms:

  1. TRIMER.
  2. The single agent.
  3. The gated, firewalled system.
  4. The ungated ablation.
  5. The LLM-critic ablation.

The proposal succeeds if the gated system degrades more slowly past 30% corruption than TRIMER and the ablations do.

There is a contamination risk: the model may have memorized E. coli regulation. To control for it, we also corrupt the network with plausible but false edges that are absent from public databases, and measure whether the Judge rejects the constraints those edges imply. This tests the gate rather than recall.

On Recon3D, the main test is cross-modality transfer. Constraints are mined and admitted using RNA-seq models, then scored on proteomics-based models of overlapping NCI-60 lines and on CaMeRe's eight canonical pathways. CaMeRe's reported 7 of 8 in the top three serves as the reference.

As a qualitative probe, we ask whether the system, given the glioblastoma core and margin facts, proposes compensatory routes under simulated PDHK inhibition. This bears on the reported in vivo failure of dichloroacetate. We will treat any such result as a hypothesis, not as validation.