Read Before You Fit: Text-Derived Constraints for Discovering Differential Equations from Noisy Biological Data
Organizations: Purdue University
Abstract
Large language models are increasingly used for scientific equation discovery. However, most existing methods are strongly data-driven and assume sufficiently clean and representative observations. This assumption is problematic in biological systems, where individual-level measurements are often sparse, noisy, heterogeneous, and expensive to obtain. While the underlying mechanisms are extensively described in scientific text, they are not explicitly used for the LLM based modeling of such systems. We introduce P2C, an agentic framework that translates textual descriptions of biological systems into a typed set of formal constraints, and use these constraints to restrict candidate ordinary differential equation (ODE) structures before numerical fitting. P2C consists of five stages: Text2Constraint extraction, ODE discovery, symbolic verification, parameter fitting, and model scoring. We evaluate P2C on four published ODE systems of acute inflammation and immune regulation, under clean and noisy observations. By progressively degrading the numerical evidence, we isolate when textual domain knowledge contributes beyond regression alone. Across the four systems, adding Text2Constraint reduces the worst form error from 1.397 to 0.499 on clean data and from 13.096 to 1.095 for data perturbed with Gaussian noise of ; P2C also achieves lower form error and trajectory error than several LLM-based baselines over the tested noise range.
Figures & tables
| Type | Predicate on |
|---|---|
| Sign | (or ) |
| Absent | |
| Sat | is finite |
| Inter | |
| Source | |
| Pos |
| Model | Dunster (4D) | Baker (2D) | Kumar (3D) | Reynolds (4D) | |
|---|---|---|---|---|---|
| 0 | LLM-SR | 2.412 | 0.056 | 0.34 | 0.089 |
| DoLQ | 1.76 | 0.043 | 0.0049 | 0.25 | |
| EDL | 4.9e-11 | 0.0027 | 8.9e-4 | 0.28 | |
| P2C (Ours) | 1.1e-9 | 0.0008 | 0.032 | 0.499 | |
| 0.05 | LLM-SR | 3.193 | 1.625 | 0.97 | 1.097 |
| DoLQ | 2.539 | 0.051 | 0.21 | 0.44 |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| System | Regime | Input | Initial state | Use | |
|---|---|---|---|---|---|
| Reynolds | health | 100 | training | ||
| aseptic | 100 | training | |||
| septic | 100 | training | |||
| held out | 100 | evaluation | |||
| Kumar | low dose | 20 | training | ||
| aseptic | 20 | training |
| System | Sent. | Empty | Sign | Abs | Sat | Int | Src | Pos | Total | |
|---|---|---|---|---|---|---|---|---|---|---|
| Reynolds | 4 | 20 | 3 | 11 | 3 | 4 | 1 | 1 | 4 | 24 |
| Kumar | 3 | 13 | 2 | 5 | 2 | 1 | 3 | 1 | 3 | 15 |
| Dunster | 4 | 13 | 0 | 9 | 3 | 1 | 1 | 0 | 4 | 18 |
| Baker | 2 | 9 | 2 | 3 | 0 | 1 | 1 | 1 | 2 | 8 |
| Total | 55 | 7 | 28 | 8 | 7 | 6 | 3 | 13 | 65 |
| # | Sentence of the description | Gold constraint | Predicate |
|---|---|---|---|
| 1 | The pathogen multiplies on its own, so its amount grows faster when more of it is present, but growth slows as the pathogen approaches the maximum load that the host can carry. | – | – |
| 2 | A fast background defence that is present before any insult removes some pathogen, but this defence is limited and is overwhelmed when the pathogen is abundant. | – | – |
| 3 | Activated phagocytes consume the pathogen on contact, so the pathogen falls faster when more activated phagocytes are present. | Sign Inter | a term of has and |
| 4 | Tissue damage does not itself act on the pathogen. | Absent | |
| 5 | The anti-inflammatory mediator reduces the ability of activated phagocytes to attack the pathogen. | Sign | |
| 6 | Resting phagocytes are recruited and activated by the pathogen and by tissue damage, so more pathogen or more damage makes activated phagocytes rise faster. | Sign Sign |
| # | Sentence of the description | Gold constraint | Predicate |
|---|---|---|---|
| 1 | The pathogen multiplies on its own, so its amount grows faster when more of it is present, but growth slows as the pathogen approaches the maximum load that the host can carry. | – | – |
| 2 | Early pro-inflammatory mediators destroy the pathogen when they encounter it, so the pathogen falls faster when more early mediators are present. | Sign Inter | a term of has and |
| 3 | Late pro-inflammatory mediators do not act on the pathogen directly; they affect it only through the early mediators. | Absent | |
| 4 | The pathogen activates the early mediators, so more pathogen makes the early response rise faster. | Sign | |
| 5 | The late mediators activate the early mediators further, which lets inflammation sustain itself after it has started. | Sign | |
| 6 | Both kinds of activation act on the early response that is already under way, and both slow as the early response approaches its maximum level. | Inter Inter | a term of has and a term of has and |
| # | Sentence of the description | Gold constraint | Predicate |
|---|---|---|---|
| 1 | The pro-inflammatory mediator attracts neutrophils into the tissue, so more mediator makes the number of neutrophils rise faster. | Sign | |
| 2 | Neutrophils are short-lived: they undergo apoptosis, which removes them from the pool of live neutrophils. | Sign | |
| 3 | Each neutrophil that undergoes apoptosis becomes an apoptotic neutrophil, so more live neutrophils make apoptotic neutrophils accumulate faster. | Sign | |
| 4 | Macrophages do not remove live neutrophils. | Absent | |
| 5 | Apoptotic neutrophils that are not removed in time break down, which removes them from the apoptotic pool. | Sign | |
| 6 | When they break down they release their contents, and this produces more of the pro-inflammatory mediator, so inflammation can feed itself. | Sign |
| # | Sentence of the description | Gold constraint | Predicate |
|---|---|---|---|
| 1 | Pro-inflammatory cytokines are produced at a low background rate even when none are present. | Source | |
| 2 | They also stimulate their own production, so inflammation can amplify itself, but this self-stimulation levels off when they are abundant. | – | – |
| 3 | Anti-inflammatory cytokines inhibit the production of pro-inflammatory cytokines, so more anti-inflammatory cytokines make pro-inflammatory cytokines rise more slowly. | Sign | |
| 4 | This inhibition acts on both the background production and the self-stimulated production. | Inter | a term of has and |
| 5 | Pro-inflammatory cytokines are cleared at a steady rate. | – | – |
| 6 | Pro-inflammatory cytokines stimulate the production of anti-inflammatory cytokines, so more pro-inflammatory cytokines make anti-inflammatory cytokines rise faster. | Sign |
| d0 | d1 | d2 | d3 | d4 | d5 | d6 | d7 | ||
|---|---|---|---|---|---|---|---|---|---|
| 0 | 16 | 0 | .011 | .228 | .451 | .552 | .777 | .987 | 1.112 |
| 2 | 16 | 0 | .005 | .104 | .277 | .379 | .603 | .703 | .727 |
| 6 | 6 | 0 | 0 | 0 | .043 | .144 | .192 | .279 | .354 |
| 12 | 6 | 0 | 0 | .031 | .104 | .167 | .279 | .367 | .478 |
| 20 | 6 | 0 | 0 | 0 | .072 | .056 | .079 | .180 | .205 |
| Note | Source |
|---|---|
| 1 | Zachs et al. (2019) |
| 2 | Tracey (2002) ; Rosas-Ballina et al. (2011) ; Wang et al. (2003) |
| 3, 4 | Cotero et al. (2019) |
| 5 | Levine et al. (2014) ; Koopman et al. (2016) |
| 6, 7 | Zachs et al. (2019) ; Cotero et al. (2019) |
| Sentence | Constraint | Predicate on | Source |
|---|---|---|---|
| The mice receive serum from arthritic donor mice, and the antibodies in this serum start an inflammation of the joints. | – | – | Zachs et al. (2019) |
| This inflammation makes the ankles swell, so ankle swelling builds up after the serum transfer even when there is no swelling yet. | Source | Zachs et al. (2019) | |
| Ankle swelling is measured as an increase above the healthy ankle, and it does not fall below zero. | Pos | measurement | |
| Ultrasound stimulation of the spleen activates the cholinergic anti-inflammatory pathway: the splenic nerve releases norepinephrine, and T cells in the spleen then release acetylcholine. | – | – | Cotero et al. (2019) ; Rosas-Ballina et al. (2011) |
| Acetylcholine acts on macrophages and suppresses their release of inflammatory cytokines, which are the signals that drive the joint inflammation. | – | – | Tracey (2002) |
| A longer daily stimulation therefore makes ankle swelling build up more slowly. | Sign | Zachs et al. (2019) |
| Method | Seed | NMSE | Violations | Returned equation |
| P2C | 0 | 0.218 | 0 | |
| P2C | 1 | 0.218 | 1 | |
| P2C | 2 | 0.218 | 0 | |
| LLM-SR | 0 | No equation returned | ||
| LLM-SR | 1 | 1.97 | 3 | |
| LLM-SR | 2 | No equation returned | ||
ODE Discovery
Ordinary differential equation discovery seeks governing equations from observed trajectories to explain and predict dynamical systems.
See all 24 papers