betaFeedback

WorksComputer Science

Read Before You Fit: Text-Derived Constraints for Discovering Differential Equations from Noisy Biological Data

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 σ=0.1σ=0.1; P2C also achieves lower form error and trajectory error than several LLM-based baselines over the tested noise range.

Introduction

Differential equations are widely used to describe the dynamics of biological systems, including immune and infectious-disease processes (Vandenbon et al., 2012), inflammatory responses (Kumar et al., 2004), and biochemical reactions. However, complex biological mechanisms are often communicated through natural-language descriptions, pathway diagrams, and qualitative “word models” rather than complete mathematical formulations [12].

Symbolic regression (SR) seeks to recover interpretable equations directly from data [4] (Schmidt and Lipson 2009), making it attractive for mechanistic biological modeling (Mangan et al., 2016). Yet most equation-discovery methods remain strongly data-driven and assume that observations are sufficiently clean and informative to identify the governing dynamics. This assumption is often unrealistic in biology, where measurements may be sparse, noisy, heterogeneous, and expensive to obtain. As a result, multiple equations can fit the same observations while encoding very different mechanisms, particularly when models are extrapolated beyond the observed regime [11] (Raue et al. 2009).

Biology nevertheless provides an additional source of information: mechanistic knowledge expressed in scientific text. The literature frequently specifies whether one process activates or inhibits another, whether responses saturate, whether certain interactions are absent, and which quantities must remain positive. Recent work has incorporated domain knowledge and physics-informed structure into symbolic regression (Machado and Jones, 2023; Taskin et al., 2026; Keren et al., 2023), while LLM-SR (Shojaee et al., 2025) showed that large language models can provide scientific priors and programmatic guidance during symbolic search. However, when textual descriptions are provided directly to an LLM, it is difficult to determine what information was actually extracted from the text or whether successful equation recovery was driven primarily by numerical fitting.

We introduce P2C (Prose-to-Constraints), an agentic framework that makes the contribution of scientific language explicit and verifiable. Rather than using biological prose only as a prompt, P2C first translates it into a typed set of formal predicates describing properties such as interaction signs, saturation, structural absence, joint interactions, source terms, and positivity. Each extracted constraint is grounded to a source span and checked for entailment and consistency. Candidate ODE structures are then tested against these predicates before numerical parameter fitting. This separates what is inferred from language from what is inferred from numerical observations, and allows failures in knowledge extraction, symbolic structure discovery, and parameter estimation to be analyzed separately.

We evaluate P2C on four published models of acute inflammation and immune regulation ([9, 2] (Reynolds et al. 2006; Kumar et al. 2004)) under clean and degraded numerical observations. The results show a consistent descriptive trend as the numerical evidence weakens: P2C obtains the lowest median form error on three of four systems at σ=0.05\sigma= 0.05 and on all four systems at σ=0.1\sigma= 0.1. We additionally apply P2C to measured dose-response data from splenic focused-ultrasound treatment of inflammatory arthritis ((Zachs et al., 2019)), testing whether mechanistic knowledge can restrict equation forms when the available observations alone do not determine biologically plausible extrapolation.

Our main contributions are:

  1. We introduce P2C, a modular agentic framework that translates biological prose into attributable, typed mathematical constraints and uses them to restrict ODE discovery before numerical fitting.

  1. We develop an explicit constraint representation and symbolic verification procedure for mechanistic properties including interaction sign, saturation, structural absence, joint interaction, source, and positivity constraints, making the linguistic contribution to equation discovery inspectable and independently verifiable.

  1. We construct a controlled evaluation suite of four published mathematical-immunology models paired with literature-derived descriptions and sentence-level reference constraints, and evaluate P2C under progressively degraded observations.

  1. We demonstrate the framework on measured inflammatory-arthritis data from splenic focused ultrasound, where P2C recovers a bounded intervention-response equation with lower held-out prediction error and fewer mechanistic constraint violations than the evaluated baselines.

Problem Formulation

We consider a multimodal equation discovery task where the input consists of 3 parts: (i) the numerical time-series observation D={(ti,x(ti))}D = \{(t_i, x(t_i))\} (clean data or data with Gaussian noise N(0,σ)\mathcal{N}(0,\sigma)), (ii) a prose description of the system T\mathcal{T} (a mechanism or pathway) and (iii) state variables for the system and their corresponding words in the prose. Our goal is to discover interpretable and biologically plausible system of ODEs: x˙(t)=f(t,x)\dot{x}(t) = f(t,x), where f=[f0,⋯ ,fd−1]Tf = [f_0,\cdots,f_{d-1}]^{\mathrm{T}} is composed of functional terms proposed by an LLM.

The prose description T\mathcal{T} can be mapped to a set of formal predicates C(T)={c1,…,cK}\mathcal{C}(\mathcal{T}) = \{c_1,\ldots,c_K\}, each constraining the admissible structure of the vector field ff. These predicates define the feasible hypothesis class

FT={f∈F:ck(f)=True, ∀ck∈C(T)}.(1)\mathcal{F}_{\mathcal{T}} = \{f \in\mathcal{F}: c_k(f) = \mathrm{True},\ \forall c_k \in\mathcal{C}(\mathcal{T})\}. \tag*{(1)}

Equation discovery therefore seeks

(f^,θ^)=arg min⁡f∈FT,θ∈Θ Ldata(f,θ;D),(2)(\hat{f},\hat{\theta}) = \underset{f \in\mathcal{F}_{\mathcal{T}},\theta\in\Theta}{\operatorname{arg\,min}}\ \mathcal{L}_{\mathrm{data}}(f,\theta;D), \tag*{(2)}

so that textual knowledge restricts the space of admissible ODE structures while the numerical observations determine the fitted model within this constrained space.

Method

The P2C pipeline is shown in Figure 1. It first converts a textual description of a biological system into explicit constraints, then proposes and verifies candidate ODEs, fits their parameters to observations, and selects a model by its held-out trajectory error. The pipeline never uses the ground-truth equations to propose, fit, or select candidates.

Overview of the P2C framework for the LLM-based ODE discovery under text-derived formal constraints

Figure 1. Overview of the P2C framework for the LLM-based ODE discovery under text-derived formal constraints. (1) Text2Constraint stage: An LLM converts each sentence of the biological description into verifiable constraints. (2) ODE discovery stage: In each round, an LLM proposes candidate systems from the variable list, the description, and feedback from earlier rounds, (3) Symbolic verification stage: The verifier rejects every candidate that violates a constraint before any fitting. If all proposed equations violate constraints, go back to Stage 2. (4) Parameter fitting stage: The parameters of the remaining candidates are fitted to observations. (5) Model scoring stage: Each fitted candidate is scored by its trajectory error on held-out validation points of the same noisy observations, and the best candidates and their scores are fed back. Stages 2–5 repeat for NN rounds; and the best model over all rounds is saved.

Stage 1: Text2Constraint extraction and grounding

Instead of using natural language as a loose prompt, as in several prior LLM based equation discovery approaches ((Song et al., 2026; Holt et al., 2024)), P2C translates the biological description T\mathcal{T} into a strict set of typed constraints C^\hat{\mathcal{C}}. These constraints are described in Table 1. To prevent hallucinations or incorrect translations, every extracted constraint passes through 4 rigorous grounding checks before being appended to the final constraint set: (1) Attribution: Every constraint must be tied to a corresponding substring from the source text. (2) Entailment: A separate verifier LLM checks whether the verbatim substring logically entails the verbalized constraint template. (3) Self-Consistency: The constraint must be consistently predicted across a majority of KK independent extraction runs. (4) Logical Consistency: The final constraint set C^\hat{C} is filtered to remove contradictory predicates (e.g., mutually exclusive signs for the same state variables).

TypePredicate on fif_i
SIGN∂fi/∂xj>0\partial f_i/\partial x_j > 0 (or <0< 0) ∀x∈R≥0d\forall x \in\mathbb{R}_{\geq0}^{d}
ABSENT∂fi/∂xj≡0\partial f_i/\partial x_j \equiv0
SATlim⁡xj→∞fi\lim_{x_j \to\infty} f_i is finite
INTER∃fi∈f\exists f_i \in f such that xj,xk∈fix_j, x_k \in f_i
SOURCEfi(t,0)>0f_i(t,0)>0
POSxi=0⇒fi≥0x_i=0 \Rightarrow f_i \geq0

Table 1. Different types of constraints obtained from the prose descriptions, and checked by Stage 3.

Stage 2: LLM-Driven ODE Discovery

An LLM generator proposes HH candidate equation structures per round. To constrain the functional space, candidates are formulated as sums of at most KK terms featuring positive symbolic parameters θ\theta, explicitly defined signs, and integer exponents bounded between 1 and 6. To enforce a strict separation between hypothesis generation and verification, the generator’s prompt includes the system description, the state variable, and iterative feedback with violated constraints, but is deliberately blinded to both the numerical observations and the formally extracted constraint set C^\hat{C}.

Stage 3: Symbolic verification

Each candidate ODE is parsed as a symbolic expression and tested against every constraint in C^\hat{C} using the SymPy symbolic mathematics library (Meurer et al., 2017). We use symbolic differentiation and simplification for SIGN and ABSENT constraints, symbolic limits for SAT, and symbolic substitution for SOURCE and POS. All state variables are assumed non-negative and all free parameters positive. When the sign of a partial derivative cannot be established symbolically, we evaluate it at 400 random points with positive states and parameters and accept it only if the required sign is uniform; this provides numerical evidence rather than a proof. A candidate that violates any constraint is rejected before fitting, and the violated predicate is returned to the proposer.

Stage 4: Parameter fitting. For candidates that pass symbolic verification, unknown parameters are fitted independently for each equation. Because direct numerical differentiation severely amplifies measurement noise, P2C employs a weak-form objective, following Messenger and Bortz, 2021 to avoid directly differentiating noisy observations (details provided in Appendix § 13.§ 2). Multiplying the ODE by a compactly supported test function ϕk\phi_k and integrating by parts yields

−∫ϕ˙k(t)yi(t) dt=∫ϕk(t)fi(y(t);θi) dt,(3)-\int\dot{\phi}_k(t)y_i(t)\,dt = \int\phi_k(t)f_i(\mathbf{y}(t);\theta_i)\,dt, \tag*{(3)}

where the integrals are numerically approximated using the datapoints in D\mathcal{D}. The parameters are chosen to minimize the summed squared weak-form residuals across test functions (Appendix § 13.§ 2). Parameters that enter linearly are estimated using non-negative least squares, while nonlinear parameters are fitted using bounded optimization with multiple random restarts.

Stage 5: Model scoring and Feedback loop. Fitted ODEs are scored based on their normalized trajectory error against a held-out validation subset of the noisy observations. Let x^r(t;θ^)\hat{\mathbf{x}}^r(t;\hat{\theta}) be the trajectory of the fitted candidate from the initial state of regime rr (representing a specific initial state and set of input parameters), and yir(t)y_i^r(t) the noisy observation of state ii. The score is the normalised trajectory error (NMSE) on the validation set,

S=1Rd∑r=1R∑i=1d∑t∈Vr(x^ir(t;θ^)−yir(t))2∑t∈Vr(yir(t)−yˉir)2,(4)S = \frac{1}{Rd}\sum_{r=1}^{R}\sum_{i=1}^{d}\frac{\sum_{t\in V_r}\left(\hat{x}_i^r(t;\hat{\theta})-y_i^r(t)\right)^2}{\sum_{t\in V_r}\left(y_i^r(t)-\bar{y}_i^r\right)^2}, \tag*{(4)}

where dd is the number of state variables and yˉir\bar{y}_i^r is the mean of yiry_i^r over VrV_r. If the candidate cannot be integrated over a regime, S=∞S=\infty.

Feedback and search loop. Each scored candidate is added, with its score, to a list P\mathcal{P} that is kept for the whole run. Stage 5 does not accept or reject candidates. In every iteration Stage 2 receives the kk best candidates in P\mathcal{P} with their scores, together with the constraints violated by candidates that Stage 3 rejected in the previous iteration, and proposes new candidates. Each new candidate is verified, and if it passes it is fitted, scored and added to P\mathcal{P}; candidates already in P\mathcal{P} are not fitted again. The loop runs for a fixed number of iterations NN.

Final selection. After the last iteration, let Smin⁡S_{\min} be the lowest score in P\mathcal{P}. Among the candidates with S≤(1+τ)Smin⁡S\leq(1+\tau)S_{\min}, τ=0.1\tau=0.1, we return the one with the fewest parameters; ties in parameter count are broken by the lower validation score SS. Because fitting can drive a coefficient to zero and delete a term that a constraint requires, the selected model is verified once more with its zero-coefficient terms removed; if it violates a constraint, the next candidate in the ordering is taken. Only the final system is compared with the ground truth. The values of kk, TT and τ\tau are fixed on one development system and are not changed afterwards.

Experiments

Setup

Benchmark and Dataset To evaluate our method, we select 4 ODE systems of the inflammatory and immune system, from previously published papers, and name them according to their first author: Dunster (4 variable neutrophil-macrophage interaction model during inflammation regulation) (Dunster et al., [9]), Baker (Baker et al., [2]) (2 variable cytokine regulation model in rheumatoid arthritis), Kumar (3 variable pathogen-mediator model) (Kumar et al., 2004) and Reynolds (4 variable reduced model of acute inflammatory response) (Reynolds et al., 2006). We supplement each system with a manually created prose description of the pathways/mechanisms, derived from the original papers. Further details are provided in Appendix § 12.

Observations and noise. For each system we simulate three training regimes and one held-out regime with different initial states and input values, and sample 201 time points per regime. State trajectories were generated by numerical integration with LSODA (Petzold, 1983), using the Adams method and BDF method, depending on the problem. For the experiments testing the frameworks under noisy data, noise in the form of additive Gaussian, with mean 0 and variance σ∈{0,0.05,0.1}\sigma\in\{0,0.05,0.1\}, is applied to each state. Negative values are clipped to zero. All methods receive the same noisy observations. The held-out regime and the noise-free trajectories are used only for evaluation.

Baseline models We evaluate P2C against representative LLM-based equation discovery models via symbolic regression: LLM-SR (Shojaee et al., 2025), DoLQ (Song et al., 2026) and EDL (Du et al., [8]). These baselines were selected for comparison because of their ability to incorporate textual description of the system T\mathcal{T} via prompts and their ability to generate ODE expressions. We use the GPT-6-Luna model (OpenAI, 2026) as the default LLM backbone, unless stated otherwise.

Selected hyperparameters P2C runs for N=25N = 25 iterations with 3 candidates per iteration and returns the k=3k = 3 best candidates to the proposal stage. These settings were fixed on the Reynolds system and not changed afterwards. Each (system, noise level, method) cell is run with 10 seeds. We report medians form error and trajectory error for each system and each noise level.

Evaluation metrics

Our primary objective is to evaluate recovery of the equation form, rather than parameter estimation under a particular noise realization. Let f⋆f^\star be the ground-truth system, ff the returned model with fitted parameters θ^\hat{\theta}, and dd the number of state variables.

Trajectory error. We evaluate predictive accuracy using the normalized trajectory error (NMSE) defined in Eq. (4). During Stage 5, this quantity is computed against the noisy validation observations yry^r and is denoted by SS. For evaluation, we use the same definition but replace the noisy observations with the corresponding noise-free ground-truth trajectories x⋆rx^{\star r}. We report this NMSE on a held-out regime that is never observed by the pipeline. Trajectory error therefore reflects both structural error in the discovered equation and parameter-estimation error induced by noisy observations.

Form error. Form error isolates the quality of the discovered symbolic structure by removing the effect of noisy parameter estimation. When the observations are noisy, the fitted parameters of even a correct form are inexact, so a large trajectory error does not necessarily indicate that the form is wrong. We therefore discard θ^\hat{\theta} and re-estimate the parameters of ff on noise-free data from the training regimes,

θ~=arg min⁡θ>0 NMSE⁡(f,θ;Rtrain),\tilde{\theta} = \underset{\theta>0}{\operatorname{arg\,min}}\ \operatorname{NMSE}(f,\theta;\mathcal{R}_{\mathrm{train}}),
Eform=NMSE⁡(f,θ~;⋅),E_{\mathrm{form}} = \operatorname{NMSE}(f,\tilde{\theta};\cdot),

and report EformE_{\mathrm{form}} on the training and held-out regimes. The minimisation uses the Stage 4 procedure with multiple starts. Without noise the pipeline already fits noise-free data, so EformE_{\mathrm{form}} coincides with the trajectory error and is not reported.

Results

Form error and Robustness to Observation Noise

Table 2 compares form error across the four biological systems. On clean observations, P2C is not uniformly superior: several baselines recover highly accurate forms when the numerical evidence is informative. The difference becomes pronounced as the observations are degraded. At σ=0.05\sigma= 0.05, P2C obtains the lowest form error on three of the four systems, and at σ=0.1\sigma= 0.1 it achieves the lowest error on all four systems.

σ\sigmaModelDunster (4D)Baker (2D)Kumar (3D)Reynolds (4D)
0LLM-SR2.4120.0560.340.089
0DoLQ1.760.0430.00490.25
0EDL4.9e−114.9\mathrm{e}{-11}0.00278.9e−48.9\mathrm{e}{-4}0.28
0P2C (Ours)1.1e−91.1\mathrm{e}{-9}0.00080.0320.499
0.05LLM-SR3.1931.6250.971.097
0.05DoLQ2.5390.0510.210.44
0.05EDL0.140.00451.190.35
0.05P2C (Ours)4.2e−114.2\mathrm{e}{-11}0.00240.440.551
0.1LLM-SR10.9395.4989.32.014
0.1DoLQ3.0981.6040.23360
0.1EDL1.6050.013∞\infty1.391
0.1P2C (Ours)1.4e−101.4\mathrm{e}{-10}0.00470.0241.095

Table 2. Form error comparison across ODE systems under different noise levels. Here DD refers to the number of ODE systems, and lower values are better.

This trend supports the central hypothesis behind P2C: explicit mechanistic constraints provide relatively little advantage when the trajectory itself strongly identifies the governing equation, but become increasingly useful as numerical evidence becomes ambiguous. Errors of the unconstrained baselines increase sharply with noise while P2C remains substantially more stable.

Importance of the Text2Constraint stage

To isolate the contribution of explicitly grounding the biological description into formal constraints, we compare the full P2C pipeline with a variant in which Stage 1 is removed. All remaining components of the discovery pipeline are kept unchanged. Figure 2 shows that Text2Constraint improves form recovery across all four systems, under both clean and noisy observations.

Form recovery error on the ODEs on clean data and noisy data for P2C with and without the Text2Constraint stage

Figure 2. Form recovery error on the ODEs on clean data and noisy data (σ=0.1\sigma= 0.1) for P2C with and without the Text2Constraint stage (Stage 1). Lower values are better. P2C with stage 1 consistently performs better than the same framework without Stage 1.

The effect is particularly pronounced for Dunster: without Text2Constraint, the form error is 1.85 on clean data and 2.30 at σ=0.1\sigma= 0.1, whereas the full pipeline reduces these errors to 1.1×10−91.1 \times10^{-9} and 2.4×10−102.4 \times10^{-10}, respectively. Substantial improvements are also observed for Baker and Kumar. For Reynolds, where the overall discovery problem remains more difficult, Text2Constraint still reduces form error from 1.397 to 0.499 on clean data and from 13.096 to 1.095 under noise.

These results indicate that the gains of P2C do not arise solely from the downstream LLM search and parameter fitting. Converting the prose into explicit, verifiable constraints filters candidate structures that violate the described biological mechanism. The constraints do not uniquely determine an equation; rather, they remove mechanistically inconsistent candidates while numerical evidence distinguishes among the remaining structures.

Trajectory error

Figure 3 shows the trajectory error as the observation noise increases. P2C achieves substantially lower error than the LLM-based baselines over the evaluated noise range. As noise increases, the trajectory errors of LLM-SR, DoLQ, and EDL rise considerably, while P2C remains comparatively stable. The gap is especially notable once the observations become noisy, consistent with the form-error results in § 5.1.

Trajectory error as a function of observation noise for P2C and baselines

Figure 3. Trajectory error as a function of observation noise for P2C and baselines. While initially P2C performs comparable to some other baselines, it consistently does better than baseline models as noise increases. Lower values are better.

The difference between the two metrics is also informative. A model may recover an appropriate symbolic form yet exhibit non-negligible trajectory error because its parameters were estimated from corrupted observations. Conversely, the consistently lower trajectory error of P2C indicates that its advantage is not limited to recovering plausible symbolic structure: the constrained search also yields models that can be fitted more reliably and reproduce the underlying dynamics more accurately.

Application in Therapeutic Discovery

While the P2C framework demonstrates robust equation recovery on standard benchmark systems, its primary clinical value lies in modeling therapeutic interventions where observational data is sparse, noisy, heterogeneous, and expensive to obtain [1]. One such application is predicting optimal parameters for peripheral focused ultrasound (pFUS) therapy in treating inflammatory arthritis [5] (Zachs et al. 2019). The available arthritis data (Zachs et al., 2019) is limited (50 samples). Under these data-constrained conditions, multiple equation forms can fit the same observations equally well during the training phase, yet encode vastly different physical mechanisms when extrapolated beyond the observed regime [11] (Raue et al. 2009; Kronberger et al. 2022). Hence standard symbolic regression methods struggle to identify equations that both fit into the data as well as account for the true underlying biological mechanism.

To address this modeling gap, P2C incorporates mechanistic knowledge expressed in scientific text regarding the Cholinergic Anti-Inflammatory Pathway (CAP) (Tracey, 2002; Kelly et al., 2022; Rosas-Ballina et al., 2011). We claim that on such a real-world system, P2C discovers bounded, asymptotic ODEs that more accurately reflect the biological realities of the ultrasound-based therapy.

Experiment: Duration of splenic ultrasound

Data and model. We use the dose-response experiment of Zachs et al. (2019): mice receive arthritogenic K/BxN serum on day 0 and daily ultrasound of the spleen (1 MHz, 350 kPa) for u∈{0,2,6,12,20}u \in\{0, 2, 6, 12, 20\} minutes per day; ankle swelling AA (increase of ankle thickness, mm) is measured on days 0-7. We use the median of each group (16, 16, 6, 6 and 6 mice). The task is to find one equation A˙=f(A,u)\dot{A} = f(A,u), with uu a known input that differs between groups. The 20-minute group is held out from all methods; the other four groups are the training data.

Description. The LLM writes the description from seven short notes that summarise published work on the CAP pathway [5] (Tracey 2002; Rosas-Ballina et al. 2011; Zachs et al. 2019; Koopman et al. 2016; Levine et al. 2014; Wang et al. 2003): the LLM first traces the pathway from the stimulus to the measured variable and then writes sentences about the model variables, without equations, numbers or results of the experiment (prompt in Appendix § 14.§ 2). All methods receive the same description.

Methods and metrics. We compare P2C with the no-text variant and with LLM-SR, DoLQ and EDL, all with GPT-6-Luna and three seeds. We report the NMSE on the held-out group with the parameters returned by each method and the number of reference constraints that the returned equation violates (Appendix § 14.§ 2).

Results. Figure 4 shows that P2C produces equations that are more consistent with the mechanism described in the literature, in addition to achieving lower held-out prediction error. The reference description induces four mechanistic constraints: swelling must have a positive source after serum transfer, remain non-negative, decrease in rate as ultrasound duration increases, and exhibit a bounded effect as the duration becomes large. P2C has a median of zero violated constraints across the three runs, compared with four for LLM-SR and two for both DoLQ and EDL. In two of the three P2C runs, all four constraints are satisfied, yielding A˙=0.1531+0.31u\dot{A} = \frac{0.153}{1+0.31u}, which predicts a positive swelling rate that decreases monotonically with ultrasound duration and approaches a finite limit. The remaining P2C run violates one reference constraint. In contrast, several baseline equations violate multiple properties stated by the pathway description, despite being fitted to the same observations. Thus, the advantage of P2C in this application is not only lower held-out NMSE but also greater agreement between the discovered equation and the mechanistic knowledge expressed in scientific text.

Ankle swelling NMSE and the number of constraints violated on the held-out validation group of the Arthritis data

Figure 4. Ankle swelling NMSE and the number of constraints violated on the held-out validation group of the Arthritis data (Zachs et al., 2019). Lower is better for both metrics.

Related Work

Equation discovery. Symbolic regression searches for mathematical expressions that explain observed data [6] (Schmidt and Lipson 2009), while SINDy selects terms from a predefined library [4] and ODEFormer predicts ODEs directly from trajectories (d’Ascoli et al., 2024). Because numerical differentiation can amplify observation noise, weak-form approaches instead transfer derivatives to smooth test functions (Messenger and Bortz, 2021). Sparse and noisy observations can nevertheless leave models weakly constrained or non-identifiable [11] (Raue et al. 2009).

LLMs for equation discovery. Recent methods use LLMs to propose or refine equation structures, including LLM-SR (Shojaee et al., 2025), learned concept libraries [10], in-context refinement (Merler et al., 2024), evolutionary search [8], agentic code generation (Holt et al., 2024), and qualitative candidate assessment (Song et al., 2026). Other work incorporates LLM-derived plausibility into the regression objective (Taskin et al., 2026). These methods typically use scientific knowledge as free-text guidance or a score, rather than explicitly extracting and verifying the mechanistic information supplied by the text.

Text-derived constraints. Prior work incorporates expert-specified constraints into symbolic regression through shape constraints (Kronberger et al., 2022), formal verification [3], prior-knowledge objectives (Kubalík et al., 2020), and side information (Machado and Jones, 2023). Separately, systems such as INDRA extract executable biological models from text [12], while neuro-symbolic approaches translate language into formal representations for reasoning (Pan et al., 2023; Olausson et al., 2023). Concurrent MEDA retrieves background knowledge and generates constraints for biological ODE discovery (Krongauz et al., 2026).

P2C connects these directions by translating a fixed mechanistic description into typed, text-grounded constraints that are checked against candidate ODEs before parameter fitting. It also supports non-polynomial structures such as saturating functions.

Conclusion

We introduced P2C, an agentic framework that translates biological prose into explicit, verifiable constraints for ODE discovery before numerical fitting. Across four published models of inflammation and immune regulation, P2C becomes increasingly advantageous as observations are degraded, while ablations show that the Text2Constraint stage contributes substantially to equation-form recovery. We further demonstrate the framework on measured dose–response data from splenic ultrasound treatment of inflammatory arthritis, where mechanistic constraints help favor bounded, biologically plausible equations. Overall, our results suggest that scientific text can provide useful structural information when numerical observations alone are insufficient to identify the governing dynamics. Future work will extend P2C to larger biological systems and richer forms of mechanistic knowledge.

Limitations

Our controlled benchmark contains four ODE systems from inflammatory and immune biology and is intended to test whether text-derived constraints improve equation discovery under known mechanisms. It does not establish broad generalization across the scientific literature, substantially larger dynamical systems, or other domains. The current constraint schema also captures only a restricted subset of mechanistic properties and filters, rather than uniquely determines, the admissible equation structures.

P2C assumes that the supplied mechanistic description is a reasonably coherent summary of the relevant scientific knowledge. We do not evaluate robustness to conflicting literature, ambiguous or unsupported statements, or mechanisms requiring substantial domain-specific interpretation. The grounding checks verify consistency with the provided description, not the scientific correctness of that description.

Ethical Consideration

To the best of our knowledge, this work was conducted in accordance with applicable ethical standards. We introduce a new method for equation discovery, motivated in part by applications in biology and medicine. The discovered equations are intended as exploratory mechanistic models and do not constitute clinical recommendations, treatment-selection tools, or guarantees of a new or universally effective therapy.

Because the method relies on mechanistic descriptions derived from scientific text, incorrect, incomplete, or unsupported descriptions could lead to misleading constraints and consequently inappropriate model forms. Any biomedical use would therefore require independent experimental validation and review by domain experts before the results could inform practice.

No new human or animal experiments were conducted as part of this work. All experiments use previously published articles and existing datasets.

We release prompts, prose descriptions and implementation details in the Appendix C. Third-party datasets and source materials are not redistributed and should be obtained and cited from their original sources.

An AI assistant was used during manuscript preparation for language editing, restructuring of selected passages, and assistance with drafting and revising explanatory text. It was also used for limited support in literature-search planning and code-related discussion. All technical claims, citations, experimental results, and final manuscript content were reviewed and verified by the authors.

Acknowledgements

We would like to thank the Indiana Clinical and Translational Sciences Institute (CTSI), through its Project Development Team (PDT) program, for funding support for the project titled “Novel Ultrasound Therapy and AI-Guided Modeling for Burn Treatment.” We also thank Naman Saxena and Shaiv Mehra for their contributions to the early-stage ideation and conceptual development of this work.

Dataset description

Mechanistic models of inflammation. Our benchmark systems are reduced ODE models that were built by hand from qualitative knowledge of the kind that P2C takes as input. Kumar et al. (2004) describe acute inflammation with three variables, a pathogen and an early and a late pro-inflammatory mediator; the model reproduces the healthy outcome and several negative outcomes, depending on the initial conditions and the parameters. Reynolds et al. (2006) derive a four-variable model of the response to infection (pathogen, activated phagocytes, tissue damage and an anti-inflammatory mediator) from the direct interactions of these effectors, and use it to study how anti-inflammation promotes resolution. Dunster et al. [9] model the resolution of inflammation through the interaction of neutrophils and macrophages (our version has four variables: neutrophils, apoptotic neutrophils, macrophages and a pro-inflammatory mediator); the model has a healthy and an unhealthy outcome, and the rates of macrophage phagocytosis and neutrophil apoptosis decide between them. Baker et al. [2] reduce cytokine regulation in rheumatoid arthritis to two variables, the pro-inflammatory and the anti-inflammatory cytokines, and obtain bistability and oscillations.

Simulation protocol. For every system and regime we integrate the equations below from the listed initial state over [0,T][0,T] with LSODA (Petzold, 1983) (relative tolerance 10−1010^{-10}, absolute tolerance 10−1210^{-12}) and record 201 equally spaced time points, including both end points. Values below zero are set to zero. Each system has one known input that differs between regimes; it is given to every method. Three regimes are used for training and one, held out, is used only for evaluation. For noisy data, Gaussian noise with standard deviation σ\sigma times the root mean square of each state over the regime is added independently to every point, and values below zero are again set to zero. P2C fits on the points with even index and scores candidates on the points with odd index; the baselines receive all points of the three training regimes. Parameters are fixed to the values below in all regimes; only the input and the initial state change.

Reynolds. Four states: pathogen PP, activated phagocytes N∗N^*, tissue damage DD and anti-inflammatory mediator CC (Reynolds et al., 2006, Eqs. 9–12 and Table 1). The input is the growth rate of the pathogen, kpgk_{pg}. With the inhibition function f(V)=V/(1+(CA/c∞)2)f(V) = V/(1 + (C_A/c_\infty)^2) and R=f(knnN∗+knpP+kndD)R = f(k_{nn}N^* + k_{np}P + k_{nd}D),

P˙=kpgP(1−Pp∞)−kpmsmPμm+kmpP−kpnf(N∗)P\dot{P}=k_{pg}P\left(1-\frac{P}{p_{\infty}}\right)-\frac{k_{pm}s_mP}{\mu_m+k_{mp}P}-k_{pn}f(N^*)P
N˙∗=snrRμnr+R−μnN∗\dot{N}^*=\frac{s_{nr}R}{\mu_{nr}+R}-\mu_nN^*
D˙=kdnf(N∗)6xdn6+f(N∗)6−μdD\dot{D}=\frac{k_{dn}f(N^*)^6}{x_{dn}^6+f(N^*)^6}-\mu_dD
C˙A=sc+kcnf(N∗+kcndD)1+f(N∗+kcndD)−μcCA\dot{C}_A=s_c+\frac{k_{cn}f(N^*+k_{cnd}D)}{1+f(N^*+k_{cnd}D)}-\mu_cC_A

Ground-truth parameters: kpm=0.6k_{pm}=0.6, kmp=0.01k_{mp}=0.01, sm=0.005s_m=0.005, μm=0.002\mu_m=0.002, p∞=20p_{\infty}=20, kpn=1.8k_{pn}=1.8, knp=0.1k_{np}=0.1, knn=0.01k_{nn}=0.01, knd=0.02k_{nd}=0.02, snr=0.08s_{nr}=0.08, μnr=0.12\mu_{nr}=0.12, μn=0.05\mu_n=0.05, kdn=0.35k_{dn}=0.35, xdn=0.06x_{dn}=0.06, μd=0.02\mu_d=0.02, c∞=0.28c_{\infty}=0.28, sc=0.0125s_c=0.0125, kcn=0.04k_{cn}=0.04, kcnd=48k_{cnd}=48, μc=0.1\mu_c=0.1.

Kumar. Three states: pathogen pp, early pro-inflammatory mediators mm and late pro-inflammatory mediators ll ((Kumar et al., 2004)); pp and mm are fractions of their maximum levels. The input is the rate kpmk_{pm} at which early mediators destroy the pathogen. With f(m)=1+tanh⁡((m−θ)/w)f(m)=1+\tanh((m-\theta)/w),

p˙=kpp(1−p)−kpmmp,\dot{p}=k_pp(1-p)-k_{pm}mp,
m˙=(kmpp+l)m(1−m)−m,\dot{m}=(k_{mp}p+l)m(1-m)-m,
l˙=klmf(m)−kll.\dot{l}=k_{lm}f(m)-k_ll.

Ground-truth parameters:: kp=3k_p=3, kmp=25k_{mp}=25, klm=15k_{lm}=15, kl=1k_l=1, θ=1\theta=1, w=0.5w=0.5. Every regime starts from the resting level of the late mediators, l0=klm(1+tanh⁡(−θ/w))/kl≈0.5396l_0=k_{lm}(1+\tanh(-\theta/w))/k_l\approx0.5396.

Dunster. Four states: neutrophils nn, pro-inflammatory mediator cc, apoptotic neutrophils aa and macrophages mm ([9]). We use the model without the time-dependent external stimulus of the original, so inflammation is driven only by the initial mediator level. The input is the rate ϕ\phi at which macrophages remove apoptotic neutrophils:

n˙=c−νn,\dot{n}=c-\nu n,
c˙=βaa2βa2+a2−c,\dot{c}=\frac{\beta_a a^2}{\beta_a^2+a^2}-c,
a˙=νn−γaa−ϕam,\dot{a}=\nu n-\gamma_a a-\phi am,
m˙=c−γmm.\dot{m}=c-\gamma_m m.

Ground-truth parameters:: ν=0.1\nu=0.1, γa=1\gamma_a=1, βa=0.1\beta_a=0.1, γm=0.01\gamma_m=0.01.

Baker. Two states: anti-inflammatory cytokines aa and pro-inflammatory cytokines pp ([2]). The input is the clearance rate k5k_5 of the pro-inflammatory cytokines:

a˙=c4p2c32+p2−a,\dot{a}=\frac{c_4p^2}{c_3^2+p^2}-a,
p˙=c1+c2p2/(1+p2)1+a2−k5p.\dot{p}=\frac{c_1+c_2p^2/(1+p^2)}{1+a^2}-k_5p.

Ground-truth parameters:: c1=0.025c_1=0.025, c2=1c_2=1, c3=0.5c_3=0.5, c4=3.5c_4=3.5.

Descriptions and gold constraints

Tables 5–8 give the full description of each benchmark system, sentence by sentence, in the order in which it is given to every method. Next to each sentence are the ground truth (gold) constraints that it states, written by hand, and the predicate that the checker of Stage 3 tests for each (Table 1). Here fxf_x denotes the right-hand side of the equation for state xx, and all predicates are decided for positive states, inputs and parameters. A sentence without a constraint states a mechanism that the schema cannot express, such as logistic growth or self-amplification; these sentences are kept so that the description reads as a whole, and their content is left to the data. The descriptions contain no equation, number or name of a function.

More details on the Agentic Workflow

Implementation of symbolic constraint verification

Symbolic verification is implemented using SymPy ((Meurer et al., 2017)). Let fi(x;θ)f_i(\boldsymbol{x};\boldsymbol{\theta}) denote the right-hand side of the iith ODE, with states xj≥0x_j\geq0 and parameters θk>0\theta_k>0. For a SIGN constraint on the effect of xjx_j on fif_i, we compute and simplify the partial derivative ∂fi/∂xj\partial f_i/\partial x_j and determine whether its sign agrees with the required activation or inhibition over the positive domain; if SymPy cannot establish the sign symbolically, we use the 400-point numerical check described in § 3. For ABSENT, we compute ∂fi/∂xj\partial f_i/\partial x_j and require the simplified expression to be identically zero. For SAT, we evaluate lim⁡xj→∞fi\lim_{x_j\to\infty}f_i symbolically and require the resulting limit to be finite. For INTER, we expand fif_i into additive terms and inspect whether at least one term contains both specified state variables; this is an exact syntactic test under our definition of interaction. For SOURCE, all state variables are substituted with zero and the resulting expression is simplified and required to be positive. Finally, for POS of state xix_i, we substitute xi=0x_i=0 while leaving the other states symbolic and verify that the resulting boundary derivative satisfies fi∣xi=0≥0\left.f_i\right|_{x_i=0}\ge0. Thus, the verifier operates directly on the symbolic candidate equations rather than using trajectory data or an LLM judgment.

SystemRegimeInputInitial stateTTUse
Reynoldshealthkpg=0.30k_{pg}=0.30(P,N∗,D,CA)=(0.5,0,0,0.125)(P,N^*,D,C_A)=(0.5,0,0,0.125)100training
aseptickpg=0.30k_{pg}=0.30(1.5,0,0,0.125)(1.5,0,0,0.125)100training
septickpg=0.60k_{pg}=0.60(1.0,0,0,0.125)(1.0,0,0,0.125)100training
held outkpg=0.45k_{pg}=0.45(1.2,0,0,0.125)(1.2,0,0,0.125)100evaluation
Kumarlow dosekpm=30k_{pm}=30(p,m,l)=(0.01,0.05,l0)(p,m,l)=(0.01,0.05,l_0)20training
aseptickpm=30k_{pm}=30(0.20,0.05,l0)(0.20,0.05,l_0)20training
septickpm=3k_{pm}=3(0.01,0.05,l0)(0.01,0.05,l_0)20training
held outkpm=10k_{pm}=10(0.05,0.05,l0)(0.05,0.05,l_0)20evaluation
Dunsterchronicϕ=0.01\phi=0.01(n,c,a,m)=(0,0.2,0,0)(n,c,a,m)=(0,0.2,0,0)100training
slowϕ=0.10\phi=0.10(0,1.0,0,0)(0,1.0,0,0)100training
resolvedϕ=1.00\phi=1.00(0,1.0,0,0)(0,1.0,0,0)100training
held outϕ=0.30\phi=0.30(0,0.5,0,0)(0,0.5,0,0)100evaluation
Bakerfast clearancek5=1.25k_5=1.25(a,p)=(0,2.00)(a,p)=(0,2.00)30training
slow clearancek5=0.30k_5=0.30(0,0.05)(0,0.05)30training
medium clearancek5=0.60k_5=0.60(0,1.00)(0,1.00)30training
held outk5=0.40k_5=0.40(0,0.50)(0,0.50)30evaluation

Table 3. Regimes of the four benchmark systems. Initial state: in the order of the first row of each system (t=0t=0); TT: simulation horizon, in the time units of the original model; l0≈0.5396l_0 \approx0.5396 is the resting level of the late mediators in Kumar. Each regime has 201 equally spaced time points on [0,T][0,T]. The held-out regime is never seen by any method and is used only for evaluation.

SystemddSent.EmptySIGNABSSATINTSRCPOSTotal
REYNOLDS4203113411424
KUMAR313252131315
DUNSTER413093110418
BAKER2923011128
Total5572887631365

Table 4. Number of gold constraints by system and type. dd: states; Sent stands for sentences in the prose description. Empty stands for sentences that state no constraint. Complete prose descriptions are in Table 5–Table 8.

#Sentence of the descriptionGold constraintPredicate
1The 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.––
2A 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.––
3Activated phagocytes consume the pathogen on contact, so the pathogen falls faster when more activated phagocytes are present.SIGN⁡(P,N∗,−)\operatorname{SIGN}(P,N^*,-) INTER⁡(P;P,N∗)\operatorname{INTER}(P;P,N^*)∂fP/∂N∗<0\partial f_P/\partial N^* < 0 a term of fPf_P has PP and N∗N^*
4Tissue damage does not itself act on the pathogen.ABSENT⁡(P,D)\operatorname{ABSENT}(P,D)∂fP/∂D≡0\partial f_P/\partial D \equiv0
5The anti-inflammatory mediator reduces the ability of activated phagocytes to attack the pathogen.SIGN⁡(P,CA,+)\operatorname{SIGN}(P,C_A,+)∂fP/∂CA>0\partial f_P/\partial C_A > 0
6Resting phagocytes are recruited and activated by the pathogen and by tissue damage, so more pathogen or more damage makes activated phagocytes rise faster.SIGN⁡(N∗,P,+)\operatorname{SIGN}(N^*,P,+) SIGN⁡(N∗,D,+)\operatorname{SIGN}(N^*,D,+)∂fN∗/∂P>0\partial f_{N^*}/\partial P > 0 ∂fN∗/∂D>0\partial f_{N^*}/\partial D > 0
7Activated phagocytes also recruit further phagocytes through the signals that they release, and they die off naturally over time.––
8Recruitment cannot grow without bound, because the pool of resting phagocytes available to be activated is finite.SAT⁡(N∗,P)\operatorname{SAT}(N^*,P) SAT⁡(N∗,D)\operatorname{SAT}(N^*,D)lim⁡P→∞fN∗ finite\lim_{P\to\infty} f_{N^*}\ \text{finite} lim⁡D→∞fN∗ finite\lim_{D\to\infty} f_{N^*}\ \text{finite}
9The anti-inflammatory mediator suppresses the activation of phagocytes, so more mediator makes activated phagocytes rise more slowly.SIGN⁡(N∗,CA,−)\operatorname{SIGN}(N^*,C_A,-)∂fN∗/∂CA<0\partial f_{N^*}/\partial C_A < 0
10Activated phagocytes inflict collateral damage on healthy tissue, so more activated phagocytes make damage rise faster.SIGN⁡(D,N∗,+)\operatorname{SIGN}(D,N^*,+)∂fD/∂N∗>0\partial f_D/\partial N^* > 0
11Once phagocytes are abundant, further accumulation adds little additional damage.SAT⁡(D,N∗)\operatorname{SAT}(D,N^*)lim⁡N∗→∞fD finite\lim_{N^*\to\infty} f_D\ \text{finite}
12The pathogen does not damage tissue directly; damage arises only through the phagocytic response that it provokes.ABSENT⁡(D,P)\operatorname{ABSENT}(D,P)∂fD/∂P≡0\partial f_D/\partial P \equiv0
13The anti-inflammatory mediator also limits the damage that activated phagocytes inflict.SIGN⁡(D,CA,−)\operatorname{SIGN}(D,C_A,-)∂fD/∂CA<0\partial f_D/\partial C_A < 0
14Damaged tissue is repaired and regenerated over time, so damage falls faster when more of it is present.SIGN⁡(D,D,−)\operatorname{SIGN}(D,D,-)∂fD/∂D<0\partial f_D/\partial D < 0
15A healthy organism maintains a background production of the anti-inflammatory mediator even with no insult present.SOURCE⁡(CA)\operatorname{SOURCE}(C_A)fCA(0)>0f_{C_A}(0) > 0
16Both activated phagocytes and damaged tissue drive production of the anti-inflammatory mediator.SIGN⁡(CA,N∗,+)\operatorname{SIGN}(C_A,N^*,+) SIGN⁡(CA,D,+)\operatorname{SIGN}(C_A,D,+)∂fCA/∂N∗>0\partial f_{C_A}/\partial N^* > 0 ∂fCA/∂D>0\partial f_{C_A}/\partial D > 0
17The pathogen does not induce the anti-inflammatory mediator directly.ABSENT⁡(CA,P)\operatorname{ABSENT}(C_A,P)∂fCA/∂P≡0\partial f_{C_A}/\partial P \equiv0
18Production of the mediator reaches a ceiling at high levels of inflammation, and the mediator holds back its own production as its level rises.SAT⁡(CA,N∗)\operatorname{SAT}(C_A,N^*)lim⁡N∗→∞fCA finite\lim_{N^*\to\infty} f_{C_A}\ \text{finite}
19The mediator is cleared from the system at a steady rate.SIGN⁡(CA,CA,−)\operatorname{SIGN}(C_A,C_A,-)∂fCA/∂CA<0\partial f_{C_A}/\partial C_A < 0
20All four quantities are concentrations and remain non-negative.POS⁡(P)\operatorname{POS}(P) POS⁡(N∗)\operatorname{POS}(N^*) POS⁡(D)\operatorname{POS}(D) POS⁡(CA)\operatorname{POS}(C_A)P=0⇒fP≥0P=0 \Rightarrow f_P\geq0 N∗=0⇒fN∗≥0N^*=0 \Rightarrow f_{N^*}\geq0 D=0⇒fD≥0D=0 \Rightarrow f_D\geq0 CA=0⇒fCA≥0C_A=0 \Rightarrow f_{C_A}\geq0

Table 5. Reynolds (Reynolds et al., 2006): description and gold constraints (20 sentences, 24 constraints; 3 sentences state no constraint). States: PP (pathogen), N∗N^* (activated phagocytes), DD (tissue damage), CAC_A (anti-inflammatory mediator).

#Sentence of the descriptionGold constraintPredicate
1Pro-inflammatory cytokines are produced at a low background rate even when none are present.SOURCE⁡(p)\operatorname{SOURCE}(p)fp(0)>0f_p(0)>0
2They also stimulate their own production, so inflammation can amplify itself, but this self-stimulation levels off when they are abundant.——
3Anti-inflammatory cytokines inhibit the production of pro-inflammatory cytokines, so more anti-inflammatory cytokines make pro-inflammatory cytokines rise more slowly.SIGN⁡(p,a,−)\operatorname{SIGN}(p,a,-)∂fp/∂a<0\partial f_p/\partial a < 0
4This inhibition acts on both the background production and the self-stimulated production.INTER⁡(p;a,p)\operatorname{INTER}(p;a,p)a term of fpf_p has aa and pp
5Pro-inflammatory cytokines are cleared at a steady rate.——
6Pro-inflammatory cytokines stimulate the production of anti-inflammatory cytokines, so more pro-inflammatory cytokines make anti-inflammatory cytokines rise faster.SIGN⁡(a,p,+)\operatorname{SIGN}(a,p,+)∂fa/∂p>0\partial f_a/\partial p > 0
7This production reaches a ceiling: when pro-inflammatory cytokines are already abundant, more of them add little extra production.SAT⁡(a,p)\operatorname{SAT}(a,p)lim⁡p→∞fa finite\lim_{p\to\infty} f_a\ \text{finite}
8Anti-inflammatory cytokines are cleared at a steady rate, so their level falls when nothing stimulates their production.SIGN⁡(a,a,−)\operatorname{SIGN}(a,a,-)∂fa/∂a<0\partial f_a/\partial a < 0
9Both quantities are amounts and remain non-negative.POS⁡(a)\operatorname{POS}(a) POS⁡(p)\operatorname{POS}(p)a=0⇒fa≥0a=0 \Rightarrow f_a \ge0 p=0⇒fp≥0p=0 \Rightarrow f_p \ge0

Table 8. BAKER [2]: description and gold constraints (9 sentences, 8 constraints; 2 sentences state no constraint). States: aa (anti-inflammatory cytokines), pp (pro-inflammatory cytokines).

Weak-form parameter estimation

After symbolic verification, the remaining candidate ODE structures contain unknown numerical parameters that must be estimated from the observed trajectories. We fit the parameters of each ODE independently. For the iith state variable, let the candidate equation be

x˙i(t)=fi(x(t);θi),(5)\dot{x}_i(t)=f_i(\mathbf{x}(t);\theta_i), \tag*{(5)}

where x(t)=(x1(t),…,xd(t))\mathbf{x}(t)=(x_1(t),\ldots,x_d(t)) denotes the system state and θi\theta_i contains only the unknown

parameters of equation ii. Although other state variables may appear on the right-hand side of fif_i, the parameters of their governing equations are not optimized jointly with θi\theta_i.

Why use a weak formulation? A direct approach to fitting (5) would first estimate x˙i(t)\dot{x}_i(t) from the measured trajectory and then minimize the discrepancy between the estimated derivative and fi(x(t);θi)f_i(\mathbf{x}(t);\theta_i). This is undesirable in our setting because numerical differentiation amplifies measurement noise. If the observed trajectory is

yi(t)=xi(t)+ϵi(t),(6)y_i(t)=x_i(t)+\epsilon_i(t), \tag*{(6)}

then differentiating the observations produces

y˙i(t)=x˙i(t)+ϵ˙i(t),(7)\dot{y}_i(t)=\dot{x}_i(t)+\dot{\epsilon}_i(t), \tag*{(7)}

so even relatively small high-frequency perturbations in ϵi(t)\epsilon_i(t) can lead to large errors in the estimated derivative. This is particularly problematic for the noisy biological trajectories considered in our experiments.

We therefore use a weak-form formulation following Messenger and Bortz (Messenger and Bortz, 2021). Rather than differentiating the observations, the ODE is integrated against a smooth test function. Let ϕk(t)\phi_k(t) be a differentiable test function with compact support on an interval [ak,bk][a_k,b_k] and satisfying

ϕk(ak)=ϕk(bk)=0.(8)\phi_k(a_k)=\phi_k(b_k)=0. \tag*{(8)}
#Sentence of the descriptionGold constraintPredicate
1The 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.––
2Early pro-inflammatory mediators destroy the pathogen when they encounter it, so the pathogen falls faster when more early mediators are present.SIGN⁡(p,m,−)\operatorname{SIGN}(p,m,-)<br>INTER⁡(p;p,m)\operatorname{INTER}(p;p,m)∂fp/∂m<0\partial f_p/\partial m < 0<br>a term of fpf_p has pp and mm
3Late pro-inflammatory mediators do not act on the pathogen directly; they affect it only through the early mediators.ABSENT⁡(p,l)\operatorname{ABSENT}(p,l)∂fp/∂l≡0\partial f_p/\partial l \equiv0
4The pathogen activates the early mediators, so more pathogen makes the early response rise faster.SIGN⁡(m,p,+)\operatorname{SIGN}(m,p,+)∂fm/∂p>0\partial f_m/\partial p > 0
5The late mediators activate the early mediators further, which lets inflammation sustain itself after it has started.SIGN⁡(m,l,+)\operatorname{SIGN}(m,l,+)∂fm/∂l>0\partial f_m/\partial l > 0
6Both 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⁡(m;p,m)\operatorname{INTER}(m;p,m)<br>INTER⁡(m;l,m)\operatorname{INTER}(m;l,m)a term of fmf_m has pp and mm<br>a term of fmf_m has ll and mm
7Early mediators are also lost at a steady rate, so the early response fades when nothing activates it.––
8Early mediators drive the production of late mediators, so a stronger early response makes late mediators rise faster.SIGN⁡(l,m,+)\operatorname{SIGN}(l,m,+)∂fl/∂m>0\partial f_l/\partial m > 0
9Late mediators are produced in quantity only when the early response is strong, and their production cannot rise beyond a ceiling however strong the early response becomes.SAT⁡(l,m)\operatorname{SAT}(l,m)lim⁡m→∞fl finite\lim_{m\to\infty} f_l\ \text{finite}
10A small background production of late mediators continues even when no early mediators are present.SOURCE⁡(l)\operatorname{SOURCE}(l)fl(0)>0f_l(0) > 0
11The pathogen does not induce late mediators directly; it does so only by activating the early mediators.ABSENT⁡(l,p)\operatorname{ABSENT}(l,p)∂fl/∂p≡0\partial f_l/\partial p \equiv0
12Late mediators are cleared at a steady rate, so their level falls faster when more of them are present.SIGN⁡(l,l,−)\operatorname{SIGN}(l,l,-)∂fl/∂l<0\partial f_l/\partial l < 0
13All three quantities are amounts and remain non-negative.POS⁡(p)\operatorname{POS}(p)<br>POS⁡(m)\operatorname{POS}(m)<br>POS⁡(l)\operatorname{POS}(l)p=0⇒fp≥0p=0 \Rightarrow f_p \ge0<br>m=0⇒fm≥0m=0 \Rightarrow f_m \ge0<br>l=0⇒fl≥0l=0 \Rightarrow f_l \ge0

Table 6. KUMAR ((Kumar et al., 2004)): description and gold constraints (13 sentences, 15 constraints; 2 sentences state no constraint). States: pp (pathogen), mm (early pro-inflammatory mediators), ll (late pro-inflammatory mediators).

#Sentence of the descriptionGold constraintPredicate
1The pro-inflammatory mediator attracts neutrophils into the tissue, so more mediator makes the number of neutrophils rise faster.SIGN⁡(n,c,+)\operatorname{SIGN}(n,c,+)∂fn/∂c>0\partial f_n/\partial c > 0
2Neutrophils are short-lived: they undergo apoptosis, which removes them from the pool of live neutrophils.SIGN⁡(n,n,−)\operatorname{SIGN}(n,n,-)∂fn/∂n<0\partial f_n/\partial n < 0
3Each neutrophil that undergoes apoptosis becomes an apoptotic neutrophil, so more live neutrophils make apoptotic neutrophils accumulate faster.SIGN⁡(a,n,+)\operatorname{SIGN}(a,n,+)∂fa/∂n>0\partial f_a/\partial n > 0
4Macrophages do not remove live neutrophils.ABSENT⁡(n,m)\operatorname{ABSENT}(n,m)∂fn/∂m≡0\partial f_n/\partial m \equiv0
5Apoptotic neutrophils that are not removed in time break down, which removes them from the apoptotic pool.SIGN⁡(a,a,−)\operatorname{SIGN}(a,a,-)∂fa/∂a<0\partial f_a/\partial a < 0
6When they break down they release their contents, and this produces more of the pro-inflammatory mediator, so inflammation can feed itself.SIGN⁡(c,a,+)\operatorname{SIGN}(c,a,+)∂fc/∂a>0\partial f_c/\partial a > 0
7This release reaches a ceiling: when apoptotic neutrophils are already abundant, more of them add little extra mediator.SAT⁡(c,a)\operatorname{SAT}(c,a)lim⁡a→∞fc finite\lim_{a\to\infty} f_c\ \text{finite}
8Live neutrophils and macrophages do not themselves produce the mediator.ABSENT⁡(c,n)\operatorname{ABSENT}(c,n) ABSENT⁡(c,m)\operatorname{ABSENT}(c,m)∂fc/∂n≡0\partial f_c/\partial n \equiv0 ∂fc/∂m≡0\partial f_c/\partial m \equiv0
9The mediator is cleared at a steady rate, so its level falls when nothing produces it.SIGN⁡(c,c,−)\operatorname{SIGN}(c,c,-)∂fc/∂c<0\partial f_c/\partial c < 0
10The mediator also attracts macrophages, so more mediator makes the number of macrophages rise faster.SIGN⁡(m,c,+)\operatorname{SIGN}(m,c,+)∂fm/∂c>0\partial f_m/\partial c > 0
11Macrophages engulf apoptotic neutrophils on contact, so more macrophages remove apoptotic neutrophils faster, before they can break down.SIGN⁡(a,m,−)\operatorname{SIGN}(a,m,-) INTER⁡(a;a,m)\operatorname{INTER}(a;a,m)∂fa/∂m<0\partial f_a/\partial m < 0 a term of faf_a has aa and mm
12Macrophages leave the tissue at a steady rate, so their number falls when the mediator no longer attracts new ones.SIGN⁡(m,m,−)\operatorname{SIGN}(m,m,-)∂fm/∂m<0\partial f_m/\partial m < 0
13All four quantities are amounts and remain non-negative.POS⁡(n)\operatorname{POS}(n) POS⁡(c)\operatorname{POS}(c) POS⁡(a)\operatorname{POS}(a) POS⁡(m)\operatorname{POS}(m)n=0⇒fn≥0n=0 \Rightarrow f_n \ge0 c=0⇒fc≥0c=0 \Rightarrow f_c \ge0 a=0⇒fa≥0a=0 \Rightarrow f_a \ge0 m=0⇒fm≥0m=0 \Rightarrow f_m \ge0

Table 7. DUNSTER [9]: description and gold constraints (13 sentences, 18 constraints; 0 sentences state no constraint). States: nn (neutrophils), cc (pro-inflammatory mediator), aa (apoptotic neutrophils), mm (macrophages).

Multiplying Eq. (5) by ϕk(t)\phi_k(t) and integrating gives

∫akbkϕk(t)x˙i(t) dt=∫akbkϕk(t)fi(x(t);θi) dt.(9)\int_{a_k}^{b_k} \phi_k(t)\dot{x}_i(t)\,\mathrm{d}t = \int_{a_k}^{b_k} \phi_k(t)f_i(\mathbf{x}(t);\boldsymbol{\theta}_i)\,\mathrm{d}t. \tag*{(9)}

Applying integration by parts to the left-hand side,

∫akbkϕk(t)x˙i(t) dt=[ϕk(t)xi(t)]akbk−∫akbkϕ˙k(t)xi(t) dt.(10)\int_{a_k}^{b_k} \phi_k(t)\dot{x}_i(t)\,\mathrm{d}t = \left[\phi_k(t)x_i(t)\right]_{a_k}^{b_k} - \int_{a_k}^{b_k} \dot{\phi}_k(t)x_i(t)\,\mathrm{d}t. \tag*{(10)}

Because ϕk(ak)=ϕk(bk)=0\phi_k(a_k)=\phi_k(b_k)=0, the boundary term vanishes, yielding

−∫akbkϕ˙k(t)xi(t) dt=∫akbkϕk(t)fi(x(t);θi) dt.(11)-\int_{a_k}^{b_k} \dot{\phi}_k(t)x_i(t)\,\mathrm{d}t = \int_{a_k}^{b_k} \phi_k(t)f_i(\mathbf{x}(t);\boldsymbol{\theta}_i)\,\mathrm{d}t. \tag*{(11)}

Replacing the unknown states by the measured trajectories y(t)\mathbf{y}(t) gives the empirical weak-form relation

−∫akbkϕ˙k(t)yi(t) dt≈∫akbkϕk(t)fi(y(t);θi) dt.(12)-\int_{a_k}^{b_k} \dot{\phi}_k(t)y_i(t)\,\mathrm{d}t \approx\int_{a_k}^{b_k} \phi_k(t)f_i(\mathbf{y}(t);\boldsymbol{\theta}_i)\,\mathrm{d}t. \tag*{(12)}

The important consequence is that differentiation is transferred from the noisy trajectory yi(t)y_i(t) to the known smooth function ϕk(t)\phi_k(t). The observations therefore enter the objective only through numerical integration, which is substantially less sensitive to measurement noise than pointwise numerical differentiation.

Weak-form residual. For each test function ϕk\phi_k, we define the residual

rik(θi)=−∫akbkϕ˙k(t)yi(t) dt−∫akbkϕk(t)fi(y(t);θi) dt.(13)r_{ik}(\boldsymbol{\theta}_i) = -\int_{a_k}^{b_k} \dot{\phi}_k(t)y_i(t)\,\mathrm{d}t - \int_{a_k}^{b_k} \phi_k(t)f_i(\mathbf{y}(t);\boldsymbol{\theta}_i)\,\mathrm{d}t. \tag*{(13)}

The parameters of equation ii are then estimated independently by

θ^i=arg⁡min⁡θi>0∑k=1Krik(θi)2.(14)\hat{\boldsymbol{\theta}}_i = \underset{\boldsymbol{\theta}_i>0}{\arg\min}\sum_{k=1}^{K}r_{ik}(\boldsymbol{\theta}_i)^2. \tag*{(14)}

Using multiple test functions produces multiple integral constraints from different portions of the trajectory and therefore provides an overdetermined system from which the parameters can be estimated.

Parameters entering linearly. When the candidate equation is linear in its unknown parameters, it can be written as

fi(x;θi)=∑ℓ=1piθiℓgiℓ(x),(15)f_i(\mathbf{x};\boldsymbol{\theta}_i)=\sum_{\ell=1}^{p_i}\theta_{i\ell}g_{i\ell}(\mathbf{x}), \tag*{(15)}

where the basis functions giℓg_{i\ell} are fixed by the symbolic structure proposed in Stage 2. Substituting Eq. (15) into the weak form gives

bik=∑ℓ=1piGikℓθiℓ,(16)b_{ik}=\sum_{\ell=1}^{p_i}G_{ik\ell}\theta_{i\ell}, \tag*{(16)}

where

bik=−∫akbkϕ˙k(t)yi(t) dt(17)b_{ik}=-\int_{a_k}^{b_k}\dot{\phi}_k(t)y_i(t)\,\mathrm{d}t \tag*{(17)}

and

Gikℓ=∫akbkϕk(t)giℓ(y(t)) dt.(18)G_{ik\ell}=\int_{a_k}^{b_k}\phi_k(t)g_{i\ell}(\mathbf{y}(t))\,\mathrm{d}t. \tag*{(18)}

Stacking the KK test functions yields

bi=Giθi.(19)\mathbf{b}_i=\mathbf{G}_i\boldsymbol{\theta}_i. \tag*{(19)}

Because all free kinetic parameters are constrained to be positive in P2C, we estimate them using non-negative least squares,

θ^i=arg⁡min⁡θi≥0∥Giθi−bi∥22.(20)\hat{\boldsymbol{\theta}}_i=\underset{\boldsymbol{\theta}_i\ge0}{\arg\min}\left\lVert\mathbf{G}_i\boldsymbol{\theta}_i-\mathbf{b}_i\right\rVert_2^2. \tag*{(20)}

Importantly, an ODE may be nonlinear in its state variables while still being linear in its parameters. For example,

x˙i=θi1xi−θi2xixj(21)\dot{x}_i=\theta_{i1}x_i-\theta_{i2}x_ix_j \tag*{(21)}

is nonlinear in (xi,xj)(x_i,x_j) but linear in (θi1,θi2)(\theta_{i1},\theta_{i2}), and can therefore be fit using Eq. (20).

Parameters entering nonlinearly. Some candidate structures contain parameters inside nonlinear expressions. For example,

x˙i=θi1xjθi2+xj−θi3xi(22)\dot{x}_i=\theta_{i1}\frac{x_j}{\theta_{i2}+x_j}-\theta_{i3}x_i \tag*{(22)}

contains θi2\theta_{i2} inside a saturation term and cannot be reduced to a linear least-squares problem. For such candidates, we minimize the weak-form objective in Eq. (14) directly using a bounded numerical optimizer, constraining all parameters to remain positive. Because the resulting objective may be non-convex, the optimization is repeated from multiple random initializations and the solution with the lowest weak-form residual is retained.

Numerical implementation. Test functions. We use polynomial function

ϕk(t)={Zk−1(1−sk(t)2)4,∣sk(t)∣<1,0,otherwise,(23)\phi_k(t) = \begin{cases} Z_k^{-1}\left(1-s_k(t)^2\right)^4, & |s_k(t)| < 1,\\ 0, & \text{otherwise}, \end{cases} \tag*{(23)}

where sk(t)=(t−ck)/hks_k(t)=(t-c_k)/h_k, and with derivative

ϕ˙k(t)=−8sk(t)Zkhk(1−sk(t)2)3(24)\dot{\phi}_k(t)=-\frac{8s_k(t)}{Z_kh_k}\left(1-s_k(t)^2\right)^3 \tag*{(24)}

on the support. The power four makes ϕk\phi_k and ϕ˙k\dot{\phi}_k vanish at both ends of the support, so the boundary term in Eq. (10) is zero. ZkZ_k normalises each bump to unit integral, so that all test functions carry equal weight. The half-widths are hk∈{0.04,0.08,0.16} Th_k \in\{0.04, 0.08, 0.16\}\,T, where TT is the length of the time window (supports of 8%, 16% and 32% of the window), and for each width the centres ckc_k run from hkh_k to T−hkT-h_k in steps of hk/2h_k/2. This gives 47+22+9=7847+22+9=78 test functions per regime and state, or 234 weak-form equations per state over the three training regimes.

Quadrature. Both integrals in Eq. (12) are computed with the composite trapezoid rule on the fitting points of each regime (the 101 points with even index, spacing T/100T/100). The left-hand side bik=−∫ϕ˙kyi dtb_{ik}=-\int\dot{\phi}_k y_i\,\mathrm{d}t is computed once per candidate; the right-hand side is recomputed for every parameter value. Observations are clipped at zero before integration.

Scaling. The residuals of equation ii are divided by the root mean square of bikb_{ik} over all test functions and regimes, so that every state contributes equally regardless of its magnitude.

Linear parameters. Parameters that multiply a whole term are solved, for each equation separately and for every value of the nonlinear parameters, by non-negative least squares after normalising each column of Gi\mathbf{G}_i to unit norm. This is a variable-projection scheme: the outer optimiser sees only the nonlinear parameters.

Nonlinear parameters. The remaining parameters are optimised jointly over all equations in log space, θ=exp⁡(η)\theta=\exp(\eta), with SciPy’s trust-region reflective least-squares solver, bounds θ∈[10−4,104]\theta\in[10^{-4},10^{4}] and at most 200 residual evaluations per start.

We use 24 starts drawn uniformly in log⁡θ∈[log⁡10−2,log⁡102]\log\theta\in[\log10^{-2},\log10^{2}] from a seeded generator, and keep the start with the lowest mean squared scaled residual. A candidate without nonlinear parameters is solved in one step.

Trajectory refinement. The weak-form estimate initialises a refinement of all parameters jointly, again in log space, with the same solver, bounds of ±6\pm6 around the initial log values, at most 60 residual evaluations and a finite-difference step of 10−310^{-3}. The residual is (x^i(t)−yi(t))/RMS⁡(yi)(\hat{x}_i(t)-y_i(t))/\operatorname{RMS}(y_i) over all fitting points, states and training regimes, where x^\hat{x} is simulated with LSODA (relative tolerance 10−610^{-6}, absolute tolerance 10−910^{-9}); a failed simulation contributes a residual of 10 at every point. A fit that takes longer than 240 s is stopped and the candidate is treated as failed.

Measured data (§6.1). For series with fewer than 30 points the half-widths are two and three sampling intervals instead, which gives five test functions per eight-point series.

Baseline implementation and comparison protocol

The comparisons with LLM-SR, DoLQ, and EDL evaluate the complete discovery systems rather than isolating a single algorithmic component. The methods differ in their candidate-generation strategies, search dynamics, and parameter-estimation procedures, as these components are intrinsic to the respective methods. We therefore do not interpret differences between P2C and these baselines as being caused solely by the text-derived constraints.

To make the comparison as controlled as possible, all methods receive the same state variables, biological description, training trajectories, and noise realization for each system–noise–seed configuration. The held-out regime and the corresponding noise-free trajectory are used only for evaluation. We use the same LLM backbone for all LLM-based methods unless otherwise stated.

P2C uses its weak-form parameter estimator described above, whereas the baselines retain their method-specific fitting and search procedures. This choice evaluates each method as a complete equation-discovery framework, but means that the cross-method comparison reflects differences in both structural search and numerical estimation.

Computational Resources

P2C trains no model and uses no GPU. All LLM calls, namely Stage 1 extraction (K=3K=3 runs per system) with its entailment checks, the Stage 2 proposals, and the LLM-SR, DoLQ and EDL baselines, use GPT-6-Luna through the OpenAI API with its default sampling settings; its parameter count is not publicly disclosed. The only parameters estimated in this work are the coefficients of the candidate ODEs, fitted for each candidate as described in Appendix B.2. Stage 1 runs once per system. A P2C run then makes N=25N = 25 proposal calls with three candidates each, so it fits at most 75 candidates, each fit limited to 240 s. Symbolic verification, parameter fitting and simulation run on CPU in Google Colab ([CPU: Intel(R) Xeon(R) CPU @ 2.20GHz, RAM: 13.61]). The benchmark uses ten seeds for each (system, noise level, method) cell, and the application uses three seeds per method; in total the experiments used about 500 CPU-hours and 2250 API calls.

uunnd0d1d2d3d4d5d6d7
0160.011.228.451.552.777.9871.112
2160.005.104.277.379.603.703.727
66000.043.144.192.279.354
12600.031.104.167.279.367.478
206000.072.056.079.180.205

Table 9. Median ankle swelling (mm) by day. uu: minutes of splenic ultrasound per day (0 = sham); nn: mice per group. u=20u = 20 group is held out for validation.

Application: data, descriptions and evaluation

This appendix gives the material needed to repeat Experiment 1 (§ 6.1): the data (§C.1), the prompt and the description written by the LLM (§C.2), the changes to the pipeline for measured data, the evaluation (§C.3) and all runs (§C.4).

Data

Table 9 lists the series. The values are the group medians of Figure 3c of Zachs et al. (2019), read from the box plots: the increase of ankle thickness above day 0, in mm. On day 0 the mice receive K/BxN serum; from then on each group receives ultrasound of the spleen (1 MHz, 350 kPa) for a fixed number of minutes per day. The sham group has the probe in place with the ultrasound switched off. The input uu is the daily duration, and u=0u = 0 for the sham group. The initial condition of every series is the measured value on day 0, and time is in days.

NoteSource
1Zachs et al. (2019)
2Tracey (2002); Rosas-Ballina et al. (2011); Wang et al. (2003)
3, 4Cotero et al. [5]
5Levine et al. (2014); Koopman et al. (2016)
6, 7Zachs et al. (2019); Cotero et al. [5]

Table 10. Sources of the notes in the description prompt.

Description written by the LLM

Prompt. The description is written once by the LLM and is then given unchanged to every method and every seed. The prompt below gives the experiment, the model variables and seven notes on the cholinergic anti-inflammatory pathway. The notes are short statements from the literature (Table 10); none of them says how the swelling changes with the duration of stimulation, so this relation must be reasoned from the pathway. The prompt first asks the LLM to follow the pathway link by link and to answer five questions per link, which correspond to the constraint types SIGN, SAT, SOURCE, POS and ABSENT; it then asks for 8–12 sentences without equations, numbers, names of functions or results of the experiment. The prompt is shown with its slots filled in.

You are a biomedical scientist. You write a short
mechanistic description of an experiment.
A second program reads your description sentence by
sentence and turns it into formal constraints on a
differential-equation model. So each sentence must say
one clear thing about the variables of the model.

EXPERIMENT
Mice receive an injection of serum from arthritic donor
mice on day 0 (the K/BxN serum-transfer model of
inflammatory arthritis). In the following days their
ankles swell. Each group of mice receives noninvasive
ultrasound stimulation of the spleen every day, for a
fixed number of minutes per day that differs between the
groups. One group receives no stimulation. All other
ultrasound settings are the same in all groups.

VARIABLES OF THE MODEL
A: ankle swelling (the increase of the ankle thickness
above its value before the serum transfer, in
millimetres)
u (known input, a positive number that differs between
experiments): daily duration of the ultrasound
stimulation of the spleen, in minutes
Time is in days. The input u is zero in the group
without stimulation.

NOTES FROM THE LITERATURE
1. In the serum-transfer model, the transferred
   antibodies cause an inflammation of the joints. The
   ankles and paws swell during the week after the
   transfer. The measurements cover this week.
2. The cholinergic anti-inflammatory pathway: nerve
   signals reach the spleen through the splenic nerve,
   which releases norepinephrine. A group of T cells in
   the spleen then releases acetylcholine. Acetylcholine
   acts on the alpha-7 nicotinic receptor of macrophages
   and suppresses their release of inflammatory
   cytokines such as TNF.
3. Ultrasound that is focused on the spleen activates
   this pathway without surgery. It raises
   norepinephrine and acetylcholine in the spleen and
   lowers the TNF response. The effect is lost in

animals without acetylcholine-producing T cells and in animals without the alpha-7 receptor.

  1. After one session of ultrasound, the cytokine response stays lowered for many hours.

  1. Stimulation of this pathway lowers cytokine production and disease severity in arthritis, in animals and in patients.

  1. Ultrasound of other body sites, for example the leg or the side opposite to the spleen, does not have this effect.

  1. With the settings of this experiment, the ultrasound causes no relevant heating of the tissue.

STEP 1. FOLLOW THE PATHWAY

Go from the known input to each state variable, one link at a time: what the stimulus acts on, which signals and cells carry the effect, what they do to the process that drives the state variable, and what the state variable does when there is no stimulus. For each link, answer these questions:

(a) Direction: does more of the cause make the state variable rise faster or more slowly?

(b) Limit: can the effect grow without bound, or does the mechanism give it a ceiling? Say why.

(c) Baseline: does the state variable change when all variables of the model are zero?

(d) Range: can the state variable become negative?

(e) Absence: is there an effect that the notes deny?

STEP 2. WRITE THE DESCRIPTION

Write 8 to 12 sentences in plain English.

  1. One sentence states one mechanism or one property. Use the plain names of the variables, not the symbols.

  1. Say how a cause changes the RATE at which a state variable rises or falls (for example "makes it build up more slowly"). Do not describe only the final level.

  1. State direction, ceiling, baseline production, nonnegativity and denied effects in separate sentences, if the pathway supports them. If the pathway does not decide a point, leave it out. Do not guess.

  1. Do not write equations, symbols, numbers, units, or names of functions (for example "linear", "exponential", "proportional", "Hill").

  1. Do not report results of this experiment (no comparison of groups, no statistics). Describe the mechanism that is expected to hold.

  1. Do not name papers or authors.

OUTPUT

JSON only: {"pathway": ["<link 1>", "<link 2>", "..."], "description": "<the sentences as one paragraph>"}

Output. With GPT-6-Luna the LLM returned the following pathway and description. Both are reproduced without changes. The description passed the automatic check for numbers, equations and names of functions.

Pathway. (1) Spleen-focused ultrasound activates splenic nerve signaling and increases norepinephrine in the spleen. (2) Norepinephrine stimulates acetylcholine-producing T cells in the spleen to release acetylcholine. (3) Acetylcholine activates alpha-seven nicotinic receptors on macrophages. (4) Receptor activation suppresses macrophage release of inflammatory cytokines, including TNF. (5) Reduced cytokine production slows joint inflammation, which slows the rise in ankle swelling. (6) Transferred antibodies drive joint inflammation and ankle swelling even without ultrasound stimulation.

Description. Spleen-focused ultrasound activates splenic nerve signaling and increases norepinephrine in the spleen. Norepinephrine stimulates acetylcholine-producing T cells in the spleen to release acetylcholine. Acetylcholine activates alpha-seven nicotinic receptors on macrophages.

Receptor activation suppresses macrophage release of TNF and other inflammatory cytokines. Reduced cytokine production makes joint inflammation build more slowly. Slower joint inflammation makes ankle swelling rise more slowly. Transferred antibodies continue to drive joint inflammation and ankle swelling without ultrasound stimulation. The ultrasound-induced cytokine suppression depends on acetylcholine-producing T cells and macrophage alpha-seven nicotinic receptors. The cytokine response remains lowered for many hours after a session. Ultrasound at other body sites does not produce this anti-inflammatory effect. These ultrasound settings do not cause relevant tissue heating.

Evaluation

Held-out error. For the held-out group, NMSE=1T∑t(A^t−At)2/Var⁡(A)\mathrm{NMSE} = \frac{1}{T}\sum_t(\hat{A}_t-A_t)^2/\operatorname{Var}(A), where A^\hat{A} is the simulation of the returned equation from the measured value on day 0 and T=8T=8. For the u=20u=20 series, a model that predicts no swelling has an NMSE of 1+Aˉ2/Var⁡(A)=1.971+\bar{A}^2/\operatorname{Var}(A)=1.97; this value appears in several rows of Table 12.

MethodSeedNMSEViolationsReturned equation A˙\dot{A}
P2C00.21800.153/(1+0.31u)0.153/(1+0.31u)
P2C10.21810.153(1−2.48×10−7A)/(1+0.31u)0.153(1-2.48\times10^{-7}A)/(1+0.31u)
P2C20.21800.153/(1+0.31u)0.153/(1+0.31u)
LLM-SR0No equation returned
LLM-SR11.9730.0674+0.0842A+0.00991Au−0.00389u0.0674+0.0842A+0.00991Au-0.00389u
LLM-SR2No equation returned
DoLQ05.762−1.36A2+0.212Ae−u2−4.3A/(A2+1)+5.45−5.44e−A-1.36A^{2}+0.212Ae^{-u^{2}}-4.3A/(A^{2}+1)+5.45-5.44e^{-A}
DoLQ11.973−0.316A2+0.381A−0.00285u+0.0313-0.316A^{2}+0.381A-0.00285u+0.0313
DoLQ26.960−0.21Au/(u2+1)−0.0286Au/(u+1)+0.309A/(A+1)+0.0361-0.21Au/(u^{2}+1)-0.0286Au/(u+1)+0.309A/(A+1)+0.0361
EDL05.7620.00279u+0.155e−0.133utanh⁡(83.9A)0.00279u+0.155e^{-0.133u}\tanh(83.9A)
EDL11.9720.179A0.28−63.9A18.7log⁡(u+1)0.179A^{0.28}-63.9A^{18.7}\log(u+1)
EDL21.972−0.249A0.0441/(e−0.589u−2.34)−0.0164-0.249A^{0.0441}/(e^{-0.589u}-2.34)-0.0164

Table 12. Returned equations and held-out performance for all seeds in Experiment 1 (u=20u=20). Parameters are rounded to three significant figures. Lower NMSE is better.

Violated reference constraints. The generated equation is first simplified: a term whose size on the training data is below 10−310^{-3} of the largest term of its equation is removed. The checker of Stage 3 then tests the four reference constraints of Table 11 on the simplified form, for all positive parameter values. A run that returns no equation is counted as violating all four.

SentenceConstraintPredicate on ffSource
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⁡(A)\operatorname{SOURCE}(A)f(0,u)>0f(0,u)>0Zachs et al. (2019)
Ankle swelling is measured as an increase above the healthy ankle, and it does not fall below zero.POS⁡(A)\operatorname{POS}(A)A=0⇒f≥0A=0\Rightarrow f\ge0measurement
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. [5]; 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⁡(A,u,−)\operatorname{SIGN}(A,u,-)∂f/∂u<0\partial f/\partial u<0Zachs et al. (2019)
The pathway can only suppress the cytokine release and cannot do more than switch it off, so the benefit of stimulation has a ceiling: however long the daily stimulation, it cannot slow the build-up of swelling beyond that ceiling.SAT⁡(A,u)\operatorname{SAT}(A,u)lim⁡u→∞f finite\lim_{u\to\infty} f\ \text{finite}inference
Ultrasound applied to other parts of the body does not have this effect, which shows that it acts through the spleen and not on the joint itself.––Zachs et al. (2019); Cotero et al. [5]

Table 11. Reference description for Experiment 1, sentence by sentence, with the constraint each sentence states.

Behaviour beyond the tested durations. We evaluate f(0,u)f(0,u), the rate of change at zero swelling, at u∈{40,60,120,240}u \in\{40, 60, 120, 240\} minutes per day. If it is negative at any of these durations, the model predicts that swelling falls below zero, which the measurement does not allow; we report this as a negative rate. In Experiment 1 this holds for LLM-SR (seed 1), DoLQ (seed 1) and EDL (seed 2), and for no P2C run.

All runs

Table 12 lists the equation returned in every run.

A˙=f(A,u)\dot{A}=f(A,u). All predicates are decided for A>0A>0, u>0u>0 and positive parameters (Table 1).

References

  1. [1]Mark Alber, Adrian Buganza Tepole, William R. Cannon, Suvranu De, Salvador Dura-Bernal, Krishna Garikipati, George Karniadakis, William W. Lytton, Paris Perdikaris, Linda Petzold, and Ellen Kuhl. 2019. Integrating machine learning and multiscale modeling—perspectives, challenges, and opportunities in the biological, biomedical, and behavioral sciences. npj Digital Medicine, 2:115.DOI
  2. [2]M. Baker, S. Denman-Johnson, B. S. Brook, I. Gaywood, and M. R. Owen. 2013. Mathematical modelling of cytokine-mediated inflammation in rheumatoid arthritis. Mathematical Medicine and Biology, 30(4):311–337.DOI
  3. [3]Iwo Błądek and Krzysztof Krawiec. 2019. Solving symbolic regression problems with formal constraints. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO), pages 977–984.DOI
  4. [4]Steven L. Brunton, Joshua L. Proctor, and J. Nathan Kutz. 2016. Discovering governing equations from data by sparse identification of nonlinear dynamical systems. Proceedings of the National Academy of Sciences, 113(15):3932–3937.DOI
  5. [5]V. Cotero, Y. Fan, T. Tsaava, A. M. Kressel, I. Hancu, P. Fitzgerald, K. Wallace, S. Kaanumalle, J. Graf, W. Rigby, T. J. Kao, J. Roberts, C. Bhushan, S. Joel, T. R. Coleman, S. Zanos, K. J. Tracey, J. Ashe, S. S. Chavan, and C. Puleo. 2019. Noninvasive sub-organ ultrasound stimulation for targeted neuromodulation. Nature Communications, 10:952.DOI
  6. [6]Miles Cranmer. 2023. Interpretable machine learning for science with PySR and SymbolicRegression.jl. arXiv preprint arXiv:2305.01582.arxiv.org/abs/2305.01582
  7. [8]Mengge Du, Yuntian Chen, Zhongzheng Wang, Longfeng Nie, and Dongxiao Zhang. 2024. Large language models for automatic equation discovery of nonlinear dynamics. Physics of Fluids, 36(9):097121.DOI
  8. [9]Joanne L. Dunster, Helen M. Byrne, and John R. King. 2014. The resolution of inflammation: a mathematical model of neutrophil and macrophage interactions. Bulletin of Mathematical Biology, 76(8):1953–1980.DOI
  9. [10]Arya Grayeli, Atharva Sehgal, Omar Costilla-Reyes, Miles Cranmer, and Swarat Chaudhuri. 2024. Symbolic regression with a learned concept library. In Advances in Neural Information Processing Systems (NeurIPS), volume 37.arxiv.org/abs/2409.09359
  10. [11]Ryan N. Gutenkunst, Joshua J. Waterfall, Fergal P. Casey, Kevin S. Brown, Christopher R. Myers, and James P. Sethna. 2007. Universally sloppy parameter sensitivities in systems biology models. PLoS Computational Biology, 3(10):1871–1878.
  11. [12]Benjamin M. Gyori, John A. Bachman, Kartik Subramanian, Jeremy L. Muhlich, Lucian Galescu, and Peter K. Sorger. 2017. From word models to executable models of signaling networks using automated assembly. Molecular Systems Biology, 13(11):954.DOI

Paper details

vlnc:W_6tbbsc4a
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 3

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents