Scientific, Medical, and Social Worlds

Michael BrenndoerferJuly 30, 202660 min read

Part of World Models Handbook

Scientific, medical, and social world models connect prediction, simulation, and counterfactual inference under uncertainty and domain constraints.

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Scientific, Medical, and Social Worlds

A short case history can fit two models and still leave their answers to a new intervention far apart. In the synthetic experiment below, we observe weeks 0 through 24 of rising incidence, then reduce the simulator's contact multiplier by 70 percent at week 25. A fitted compartment model responds through its transmission term. An autoregression without a contact input continues its fitted trend. The compartment model also makes an inaccurate forecast: its recovery parameter is weakly constrained by the selected observations.

The disagreement has two sources: different transition assumptions, and uncertain parameters within the compartment model. A good fit to this history does not establish either model's intervention response. The worked example makes that distinction visible without treating a synthetic outbreak as evidence about a real disease.

We will compare fits to the same observations, not claim a held-out forecasting contest or clinically plausible parameter estimates. Within the compartment model, refitting transmission and initial prevalence at several fixed recovery rates leaves the training loss nearly unchanged while changing predicted post-intervention totals. This shallow loss profile illustrates practical uncertainty under the specified data and simulator. It is not proof of exact observational equivalence.

The previous chapter, Digital and Software Environments, asked whether a proposed action actually changed the intended software state. Here there is another question: does the model represent how that change affects later outcomes? We retain sts_t for the underlying state, oto_t for an observation, bt=p(st∣o≤t,a<t)b_t=p(s_t\mid o_{\leq t},a_{<t}) for a belief about hidden state, and ata_t for an action. An action can be a dose, a contact multiplier, or a specified external forcing. None of these mathematical action variables automatically describes an implementable or causally identified real intervention.

Scientific and medical studies can collect experimental evidence. Social experiments can randomize participants or clusters. What is unavailable is both mutually exclusive outcomes for the same unit in the same episode; an experiment instead compares suitably assigned units. Other questions concern interventions that are unsafe, expensive, or impossible to randomize, such as changing a common national policy regime. Robotics and driving also have unsafe or unsupported actions. The relevant distinction is the evidence available for the particular query, not a categorical division between experimental engineering and observational science.

The latent-state tools from Part V and the planning tools from Part VII provide a vocabulary for these problems. Whether they support an inference depends on the observation process, the action semantics, and the validation regime. This chapter develops that vocabulary through molecular and materials models, weather and climate, physiological dynamics, and economic and social simulation. The examples are educational, not clinical or policy recommendations.

Four questions help separate kinds of model quality:

  • Predictive fidelity: does the model reproduce held-out observations under the stated evaluation distribution and metric?
  • Representation quality: does its state retain the information needed for the task, such as delayed physiological effects rather than only the latest measurement?
  • Uncertainty quality: do probabilities or intervals have their claimed calibration under a specified regime? Calibration on one regime does not establish calibration after a shift.
  • Decision usefulness: does the model support better choices under the feasible actions, costs, constraints, and losses of the decision problem?

These questions can interact but are distinct. A treatment-effect error can change a preferred action; it need not do so if the action ranking remains unchanged. An emulator can fit historical observations and still give unjustified confidence under an untested forcing. Conversely, confidence alone is not evidence that a forecast is wrong. Each evaluation needs its own evidence.

Prediction, Simulation, and Counterfactual Inference

Prediction, intervention, and counterfactual queries require different information. The causal hierarchy discussed in Part IV has three levels, not four. Simulation is a computational procedure that can implement several kinds of query; decision support adds a choice criterion rather than another causal rung. Bareinboim and colleagues formalize why lower-level information generally underdetermines higher-level queries without additional assumptions.

Prediction asks for an outcome conditional on available information. A ten-day weather forecast is one example. A sequence-to-structure protein prediction is another, although it does not predict a time trajectory. A function fitted to historical inputs and outputs can support useful predictions without identifying their causal mechanism. That does not make prediction easy: noise, limited data, computation, and distribution shift can each limit accuracy.

Simulation rolls a modeled transition forward. A simulator can be autonomous, stochastic, or action-conditioned; it need not encode a valid causal intervention. For interventional use, the action must enter a justified mechanism. In our compartment simulator, reducing contacts multiplies the incidence term, changing the next susceptible and infectious states and therefore later incidence. A static outcome lookup does not implement that recursion, although a lookup table of state transitions could. What matters is the transition semantics and their evidence, not whether the implementation is an equation, a table, or a neural network.

Counterfactual inference can ask what would have happened to a unit whose factual history is already observed. For example, after observing YY under A=aA=a, we might ask about the unreceived alternative Y(a′)Y(a') for that same unit and episode. This retrospective query conditions on factual evidence and may require assumptions about how unobserved disturbances are shared across alternatives. A structural simulator can implement such inference, but its structure alone does not guarantee identification. Population potential-outcome contrasts, including the average treatment effect introduced below, are also counterfactual quantities; the term is not reserved for individuals. Pearl's discussion of causal queries separates the needed information from the mechanics of simulation.

Decision support combines evidence about action-dependent outcomes with a loss, feasible actions, and constraints. Where intervention effects matter, an observational conditional distribution is not automatically the required action-dependent distribution. Calibration alone also cannot select an action without specifying what counts as a costly error. Prediction losses themselves can be asymmetric; decision support makes the relevant consequences and choices explicit rather than introducing asymmetry for the first time.

Structural uncertainty

Model-form uncertainty concerns the choice of transition law, as distinct from parameter uncertainty within a chosen law. This separation depends on how the family is represented: a behavioral-feedback switch could be a model index or a parameter in a larger family. For a finite candidate set M\mathcal M, Bayesian model averaging writes

p(y∣D)=∑m∈Mp(y∣m,D) p(m∣D).p(y\mid\mathcal D)=\sum_{m\in\mathcal M}p(y\mid m,\mathcal D)\,p(m\mid\mathcal D).

Here D\mathcal D is the evidence, mm labels a candidate model, and each within-model prediction integrates its parameter uncertainty. Priors and posterior weights over a finite candidate set are possible; other model representations may be continuous or nonparametric. The mixture represents only the candidates and assumptions included, not every omitted mechanism. Its usefulness and the relative importance of model-form uncertainty depend on the task, horizon, and data. See the Bayesian model averaging tutorial by Hoeting and colleagues.

Our worked example separates two cases: SIR versus AR changes the transition form, while refitting several recovery rates stays within SIR. Similar training losses at those recovery rates do not create a posterior or establish exact non-identifiability.

Observational equivalence means equality of the distributions of observable variables under a specified observation regime. Write this as PM1(O∈B)=PM2(O∈B)P_{M_1}(O\in B)=P_{M_2}(O\in B) for every observable event BB in that regime. It is stronger than giving the same likelihood to one realized dataset or obtaining similar residual errors. Interventional equivalence for a specified query family means equality of the outcome distributions under each intervention in that family, for example PM1(Y∣do⁡(A=a))=PM2(Y∣do⁡(A=a))P_{M_1}(Y\mid\operatorname{do}(A=a))=P_{M_2}(Y\mid\operatorname{do}(A=a)) for all actions of interest. Observational equivalence alone does not generally imply this second equality. Identification assumptions or suitable experimental evidence can connect them.

A small structural counterexample makes the non-implication exact. Let UU be a Bernoulli variable with probability one half, and let A=UA=U in both models. In model 1, Y=UY=U; in model 2, Y=AY=A. Both produce only (A,Y)=(0,0)(A,Y)=(0,0) and (1,1)(1,1), each with probability one half. Setting A=0A=0 by intervention leaves Y=UY=U in model 1 but makes Y=0Y=0 in model 2. The interventional mean is therefore one half in the first and zero in the second. More passive observations of these same variables cannot distinguish these particular models. That is not a claim that more data never helps: additional variables, experiments, or defensible restrictions can change identification.

A separate issue is structure versus fit. Observational predictive accuracy is useful but does not by itself validate an intervention forecast. A mechanism-based model can transfer when its relevant mechanisms and parameters remain valid under the specified action. It can also fail because its parameters, boundary conditions, or omitted processes are wrong. A highly accurate associational fit can fail on intervention because an observation-only objective need not penalize the unseen action error. Our example illustrates both failures: the two-coefficient AR mean model lacks the contact input, and the fitted SIR model responds to contacts but misestimates the response.

For treatment questions, keep outcome prediction separate from effect estimation. Predicting outcomes among patients who received a drug is not the same estimand as comparing their outcomes under alternative assignments. If treatment selection depends on severity, a group difference can mix treatment response with baseline risk. The sign and size of that bias depend on the data-generating process; the synthetic cohort below stipulates one sign-reversal example.

Molecular, Climate, and Materials Dynamics

Classical molecular dynamics provides a concrete mechanistic state transition. In the idealized closed, classical system considered here, the state consists of atom positions and momenta. A differentiable potential UU determines forces, and a numerical integrator advances that state. Initial conditions and UU determine an ideal trajectory when the equations have a unique solution; numerical trajectories approximate it. Thermostats, solvent approximations, external forces, and reactions require additional modeling choices. A molecular simulation is not automatically an autonomous or exact representation of an experiment.

For NN atoms in three dimensions, positions and momenta are each N×3N\times3 arrays. For atom ii, mass mim_i times its acceleration equals the negative spatial gradient of potential energy:

mid2ridt2=−∇riU(r1,…,rN)m_i \frac{d^2 \mathbf{r}_i}{dt^2} = -\nabla_{\mathbf{r}_i} U(\mathbf{r}_1, \ldots, \mathbf{r}_N)

The left-hand side is mass times acceleration; the right-hand side is force. For example, a harmonic potential U(r)=kr2/2U(r)=kr^2/2 gives a restoring force −kr-kr. This equation defines dynamics under the chosen potential, not the accuracy of that potential for every molecular configuration.

where:

  • mim_i: the mass of atom ii
  • ri\mathbf{r}_i: the position vector of atom ii
  • U(r1,…,rN)U(\mathbf{r}_1, \ldots, \mathbf{r}_N): the potential energy surface that maps a configuration of all NN atoms to a scalar energy
  • −∇riU-\nabla_{\mathbf{r}_i} U: the force on atom ii, given by the negative gradient of the potential energy with respect to its position.

Determinism and practical predictability are different. In a chaotic dynamical regime, initially nearby trajectories can separate rapidly. The rate depends on the system and on the measured separation; there is no single picosecond horizon for every liquid. Uncertain initial conditions, an approximate potential, and finite-step integration each affect prediction. Statistical properties may remain useful even when a particular microscopic trajectory is no longer accurately tracked.

Two features of this setting matter for the world-model framing.

First, time-scale separation can be expensive. If an illustrative calculation uses a one-femtosecond step, a microsecond requires 10910^9 steps and a millisecond requires 101210^{12}. These are nine and twelve orders of magnitude in time, respectively. The appropriate step depends on the fastest retained motions and any constraints imposed; one femtosecond is not universally required. Long-timescale events motivate enhanced sampling, coarse-graining, and learned surrogates. More compute can extend direct simulations, but it does not remove the cost or establish that rare events were adequately sampled.

Second, the potential and the integration procedure must both fit the question. Empirical force fields approximate bonded and nonbonded interactions; electronic-structure calculations provide another reference whose accuracy depends on their own approximations. A learned potential UθU_\theta approximates reference energies and forces, often with cheaper evaluation after training. Cost, accuracy on relevant configurations, and reference-data coverage are separate criteria. A fast potential that fails near a transition state can give misleading kinetics even if its average test error is small.

Symmetry-aware potentials connect to the representations in Part III. For an isolated system without an external directional field, energy should not depend on rigid translation or rotation; forces should rotate with the coordinates. Relabeling identical atoms should not change physical predictions. Local energy decompositions and differentiability are additional modeling choices: long-range interactions may need explicit treatment, and a gradient can still be inaccurate.

The NequIP study by Batzner and colleagues builds equivariant internal features and obtains forces as gradients of predicted energy. It reports data-efficiency improvements on specified benchmarks. That supports this architecture in those tests, not a universal ranking over every representation or deployment regime. Useful design requirements include:

  • Permutation invariance. Relabeling identical atoms should not change the predicted energy.
  • Translation and rotation invariance. For the isolated system considered here, energy is invariant and forces rotate with coordinates.
  • Locality. A neighborhood-based approximation can reduce evaluation cost; electrostatic or other long-range contributions may require a separate mechanism.
  • Smoothness. An energy-gradient force model requires differentiability. Smoothness alone does not guarantee accurate forces or stable finite-step integration.

Enforcing a valid symmetry removes the need to learn its coordinate dependence from examples. It can prevent one kind of error even in unseen orientations. Whether it improves overall accuracy or sample efficiency depends on the task, representation, optimization, and correctness of the assumed symmetry. An external field or asymmetric boundary can change the transformations a model should respect.

Equivariance

An equivariant function ff satisfies f(ρ(g)x)=ρ′(g)f(x)f(\rho(g)x)=\rho'(g)f(x): transforming input xx by group element gg has the same effect as transforming the output by its corresponding action. Here ρ\rho acts on inputs and ρ′\rho' on outputs. For rotations of a suitable isolated atom configuration, a force predictor should rotate its force vectors along with the positions. This is a coordinate-consistency condition, not a guarantee of correct force magnitudes.

Structure prediction and dynamical simulation answer different questions. AlphaFold2 predicts protein coordinates and confidence from sequence-related inputs, including evolutionary information. Its structure prediction does not supply a calibrated time-transition law for folding, conformer populations, or ligand-binding kinetics. A predicted structure can be an input to further calculations; those calculations require their own dynamics and validation. This does not establish that structures contain no information about stability or mutation effects. It establishes that a coordinate prediction alone is not a validated kinetic or intervention forecast.

Materials discovery also separates candidate generation from validation. GNoME uses graph-network predictions and reference calculations to search candidate crystal structures. Predicted thermodynamic stability against selected competing phases is a screening criterion, not proof of a synthesis route. Sun and colleagues study observed metastable inorganic phases; ground-state stability is not a necessary condition for every realizable material. Kinetic accessibility, precursor chemistry, temperature, and processing conditions matter. A static stability score does not answer all of those questions.

Weather modeling uses spatial fields such as temperature, winds, humidity, and pressure. A discretized atmospheric state might stack CC variable-level channels on a latitude-longitude grid, giving a C×H×WC\times H\times W array, although spectral and unstructured grids use other representations. Numerical dynamics and learned forecast operators both advance this represented state; observations need not measure it completely.

The state vector advances forward at each time step through a forecast operator:

xt+Δt=M(xt)\mathbf{x}_{t+\Delta t} = \mathcal{M}(\mathbf{x}_t)

where:

  • xt\mathbf{x}_t: the atmospheric state vector at time tt, containing the discretized fields on the grid
  • M\mathcal{M}: the forecast operator that advances the state forward by one time step Δt\Delta t
  • Δt\Delta t: the forecast time step

Weather forecasting first estimates the initial state from observations, often by data assimilation, and then advances a forecast model. This reuses the filtering perspective from Part II. Chaotic error growth limits detailed trajectory prediction, but skill depends on variable, spatial scale, lead time, initial uncertainty, and metric. The familiar roughly two-week discussion is not an exact ceiling after which every weather quantity has zero information. Lorenz's multiscale analysis explicitly distinguishes predictability at different scales.

A learned model can estimate the forecast operator directly from reanalysis examples. GraphCast's 2023 report demonstrates ten-day global forecasting and reports performance against specified deterministic numerical baselines. The computation and verification targets are part of the result: a benchmark win does not establish every variable, lead time, uncertainty product, or climate application. Fast evaluation can make more ensemble or sensitivity runs affordable, provided the ensemble design itself represents relevant uncertainty.

Weather and climate queries differ in both horizon and estimand. A weather query asks about a particular evolving state; a climate query may ask about the distribution of weather under specified forcing and boundary conditions. Long-term forced change requires a response to changing drivers and relevant coupled components. The IPCC assessment of initialized decadal prediction describes contributions from initial conditions and internal variability, so climate is not simply a boundary-value problem with an irrelevant initial state.

A model fitted to historical weather transitions is constrained by data from the historical forcing regime; fitting alone is not validation, which needs a separate stated test. If an action-like forcing is absent or nearly constant in its input data, those data do not establish how its response should change when the forcing changes. That is an identification and validation concern, not a theorem that a numerical derivative must be zero. A learned emulator trained across forcing scenarios may have different evidence from a weather-only predictor.

The 2024 NeuralGCM paper combines a differentiable atmospheric dynamical core with learned physical tendencies. A schematic continuous-time description is

dxdt=fcore(x,Ft)+fθ(x,Ft,zt).\frac{d\mathbf x}{dt}=f_{\mathrm{core}}(\mathbf x,F_t)+f_\theta(\mathbf x,F_t,z_t).

Here x\mathbf x is the modeled atmospheric state, FtF_t denotes prescribed forcing, and ztz_t is optional stochastic input. The core and learned module provide rates of change; a time integrator advances the state. This schematic is not a next-state sum of a core prediction and an MLP output.

The reported multidecade simulations prescribe sea-surface temperature and sea ice; they are not unrestricted coupled future-climate projections. The paper also reports failure to extrapolate to substantially different future climates. A resolved dynamical core makes the division of processes inspectable, but learned source terms and numerical integration still require budget, stability, and regime testing. Neither the architecture nor a stable run proves exact conservation or causal validity.

Physical constraints are useful when they apply to the actual system and boundary conditions. A symmetry can enforce coordinate consistency without establishing the potential's accuracy. Conservation of an isolated continuous-time model does not establish accuracy of its trajectories or exact conservation by a numerical integrator. Driven and open systems need the appropriate sources, sinks, and fluxes rather than a blanket constant-energy rule. Representation quality, numerical quality, and empirical predictive fidelity remain separate questions.

Physiology and Treatment Response

A physiological world model describes hidden biological state, measurements, and interventions under a chosen scope. Parameters and responses can vary among patients and within a patient over time. Randomized trials and controlled perturbations provide intervention evidence, but neither gives both mutually exclusive potential outcomes for one patient in the same episode. Missing state, treatment selection, and incomplete follow-up create additional identification problems. No simulation here is a dosing recommendation.

Consider an illustrative glucose-insulin model based on the minimal-model idea. Bergman and colleagues' 1979 study used measured insulin as an input to a model of glucose disappearance. The three-state system here is a control-oriented extension, not that original model verbatim. Its states are glucose concentration GG, remote insulin action XX, and insulin concentration II. An added insulin-balance equation and prescribed glucose appearance allow a delayed-action illustration. This is not the full UVA/Padova simulator or a validated model for individual treatment. With constant positive distribution volumes and specified basal values, write:

dGdt=−(p1+X)G+p1Gb+D(t)VG(glucose balance)dXdt=−p2X+p3(I−Ib)(remote insulin action)dIdt=−n(I−Ib)+u(t)VI(insulin balance)\begin{aligned} \frac{dG}{dt} &= -(p_1 + X)G + p_1 G_b + \frac{D(t)}{V_G} && \text{(glucose balance)} \\ \frac{dX}{dt} &= -p_2 X + p_3 (I - I_b) && \text{(remote insulin action)} \\ \frac{dI}{dt} &= -n(I - I_b) + \frac{u(t)}{V_I} && \text{(insulin balance)} \end{aligned}

Read these equations as a balance under the selected approximation. The term −(p1+X)G-(p_1+X)G is nonpositive when G≥0G\geq0 and p1+X≥0p_1+X\geq0, so it removes glucose in that scope. The signed action XX can be negative when insulin is below basal; if p1+X<0p_1+X<0 and G>0G>0, this term instead adds glucose. The term p1Gbp_1G_b supplies a basal contribution, and D(t)/VGD(t)/V_G adds a glucose appearance rate divided by volume. D(t)D(t) is glucose entering the modeled compartment, not raw meal mass; absorption needs its own model. Remote action grows with insulin above basal and decays at rate p2p_2. The insulin equation is a prescribed linear relaxation toward IbI_b plus external input. These terms do not capture every feedback mechanism.

where:

  • GG: the plasma glucose concentration, the quantity the controller ultimately cares about
  • XX: a remote insulin action compartment representing insulin's delayed effect on glucose uptake
  • II: the plasma insulin concentration
  • GbG_b: the chosen basal glucose concentration
  • IbI_b: the chosen basal insulin concentration
  • D(t)D(t): glucose mass appearance per unit time in the modeled compartment
  • u(t)u(t): exogenous insulin amount per unit time
  • VGV_G: glucose distribution volume
  • VIV_I: insulin distribution volume
  • p1p_1: the insulin-independent glucose disappearance coefficient
  • p2p_2: the remote-action decay coefficient
  • p3p_3: the coefficient mapping insulin above basal into remote-action rate
  • nn: the insulin relaxation coefficient.

For consistent units, p1p_1, p2p_2, nn, and XX have inverse-time units; p3p_3 has inverse-time-squared per insulin-concentration units. The represented state st=(Gt,Xt,It)s_t=(G_t,X_t,I_t) is only partly observed through oto_t, such as a noisy glucose measurement. A belief btb_t should retain uncertainty about unmeasured action and parameters. A candidate controller must account for delayed response and the consequences of low glucose, but this set of equations alone does not establish a safe controller.

The example omits processes such as glucagon counterregulation and variation in meal absorption. Its intermediate action state is useful for explaining why the same current glucose measurement can coexist with different pending effects. A state estimate that includes recent input history can distinguish these situations better than a memoryless glucose-to-action rule under this model. It still needs parameter estimation, measurement validation, and a safe operating scope.

Delayed action can make repeated input based only on the current measurement problematic: effects from earlier inputs may arrive later. This is a reason to represent pending action, not a claim that every memoryless controller must fail or every model-based controller is safe. Filtering error, omitted counterregulation, and parameter mismatch can invalidate the apparent advantage. The model is a teaching example of partial observation and delay, not a clinical prescription.

The UVA/Padova simulator is a separate, more detailed example of scoped simulation evidence. Its authors report that FDA accepted S2008 for specified preclinical insulin-treatment and closed-loop algorithm evaluations. They subsequently found that patient trials had more hypoglycemia episodes than S2008 predicted and revised the simulator. Visentin and colleagues' 2014 comparison evaluates S2013 against glucose traces from a particular clinical trial and reports improved agreement.

This history does not make every virtual patient or treatment question validated. It identifies a version, intended use, comparison dataset, and later correction. Acceptance for that preclinical scope is not general certification of clinical accuracy, and the cited report does not establish a universal reason why regulators accepted the simulator.

Pharmacokinetics (PK) describes drug distribution and removal; a pharmacodynamic (PD) component relates exposure to a modeled effect. A two-compartment balance gives a useful unit check. Let ApA_p and AtA_t be drug amounts in central and peripheral compartments, with fixed volumes Vp,Vt>0V_p,V_t>0. Concentrations are Cp=Ap/VpC_p=A_p/V_p and Ct=At/VtC_t=A_t/V_t. An input R(t)R(t) supplies drug amount per time to the central compartment, where elimination also occurs.

With first-order transfer rates k12,k21k_{12},k_{21} and elimination rate kelk_{el}, amount balances are Ap′=−(kel+k12)Ap+k21At+R(t)A_p'=-(k_{el}+k_{12})A_p+k_{21}A_t+R(t) and At′=k12Ap−k21AtA_t'=k_{12}A_p-k_{21}A_t. Dividing by the respective volumes gives concentration dynamics:

dCpdt=−(kel+k12)Cp+k21VtVpCt+R(t)Vp,dCtdt=k12VpVtCp−k21Ct.\begin{aligned} \frac{dC_p}{dt} &= -(k_{el}+k_{12})C_p + k_{21}\frac{V_t}{V_p}C_t + \frac{R(t)}{V_p},\\ \frac{dC_t}{dt} &= k_{12}\frac{V_p}{V_t}C_p-k_{21}C_t. \end{aligned}

Transfer moves amount, not equal concentration increments between differently sized compartments. The volume ratios are dimensionless; each right-hand term has concentration-per-time units. Total modeled mass is M=VpCp+VtCtM=V_pC_p+V_tC_t, so summing the amount balances gives

dMdt=R(t)−kelVpCp.\frac{dM}{dt}=R(t)-k_{el}V_pC_p.

Transfers cancel. With no input or elimination, total mass stays constant. For example, if Vp=1V_p=1, Vt=2V_t=2, Cp=1C_p=1, Ct=0C_t=0, k12=1k_{12}=1, and all other rates and input are zero in consistent units, then Cp′=−1C_p'=-1, Ct′=1/2C_t'=1/2, and M′=−1+2(1/2)=0M'=-1+2(1/2)=0. Omitting the volume ratio in Ct′C_t' would incorrectly create mass.

This balance assumes constant volumes, nonnegative input, and the specified first-order flows. It does not incorporate saturable clearance, delays, additional organs, or changing volumes. Its mass invariant is a check on the representation, not evidence that it accurately predicts a particular patient's exposure.

A separate illustrative PD function maps central concentration to a saturating effect. For Cp≥0C_p\geq0, EC50>0EC_{50}>0, n>0n>0, and Emax⁡≥0E_{\max}\geq0, the Hill expression below gives zero at zero concentration, half the modeled maximum at EC50EC_{50}, and approaches Emax⁡E_{\max} at high concentration. Those mathematical properties do not establish that a real response is monotone or saturating over the queried range:

E(Cp)=Emax⁡Cp nEC50 n+Cp nE(C_p) = E_{\max}\frac{C_p^{\,n}}{EC_{50}^{\,n} + C_p^{\,n}}

where:

  • Cp,CtC_p,C_t: central and peripheral drug concentrations, amount per volume
  • kel,k12,k21k_{el},k_{12},k_{21}: nonnegative elimination and transfer coefficients, inverse time
  • Vp,VtV_p,V_t: fixed positive compartment volumes
  • R(t)R(t): supplied drug amount per time
  • E(Cp)E(C_p): modeled effect at central concentration
  • Emax⁡E_{\max}: asymptotic maximum in this illustrative response model
  • EC50EC_{50}: positive concentration giving half that maximum
  • nn: positive, dimensionless Hill exponent.

Between-patient variation motivates population models and individual parameter estimates. A hierarchical prior can pool information when measurements are sparse; it can also impose an inappropriate population assumption. Online filtering can update states or parameters when data support it. Neither calling a model a digital twin nor assigning physical units to its parameters establishes personalized predictive accuracy. Validation must match the patient group, intervention, horizon, and observation process.

Tumor models may describe growth and treatment response using several different mechanisms, including resistant subpopulations. The Norton–Simon hypothesis is a distinct phenomenological relation: treatment-induced regression is proportional to the unperturbed growth rate of a tumor at that size. Simon and Norton's own 2006 account describes its origin in laboratory and clinical observations and the testing of scheduling predictions in trials. It is not exclusively a resistant-clone competition model, and it does not assert that dose density always outranks dose intensity for every tumor, regimen, or toxicity constraint. The lesson here is to separate a specified model, its empirical tests, and its scope, not to infer a treatment recommendation.

To distinguish prediction from effect estimation, define patient-level potential outcomes Yi(1)Y_i(1) and Yi(0)Y_i(0) for specified treatment and control strategies. The binary assignment Ai∈{0,1}A_i\in\{0,1\} selects one strategy. Under consistency, the observed outcome is:

Yi=AiYi(1)+(1−Ai)Yi(0)Y_i = A_i Y_i(1) + (1 - A_i) Y_i(0)

For this patient and episode, we observe the potential outcome corresponding to the received strategy, not both alternatives. The average treatment effect in a stated target population is:

ATE=E[Yi(1)−Yi(0)]\mathrm{ATE} = \mathbb{E}[Y_i(1) - Y_i(0)]

where:

  • Yi(1)Y_i(1): the potential outcome for patient ii under treatment
  • Yi(0)Y_i(0): the potential outcome for patient ii under control
  • E[⋅]\mathbb{E}[\cdot]: the expectation taken over the population of patients

Identification from observational data needs conditions, not simply a good outcome predictor. One standard identification route requires well-defined strategies and consistency, conditional exchangeability given sufficient pretreatment covariates, and positivity on the target population's support. Treatment interference must also be addressed by the estimand and design. Conditional exchangeability states:

{Yi(1),Yi(0)}⊥Ai∣Xi\{Y_i(1), Y_i(0)\} \perp A_i \mid \mathbf{X}_i

where:

  • Yi(1)Y_i(1): the potential outcome for patient ii had they received treatment, a latent quantity that is observed for a patient only when Ai=1A_i = 1
  • Yi(0)Y_i(0): the potential outcome for patient ii had they received control, a latent quantity that is observed for a patient only when Ai=0A_i = 0
  • AiA_i: the treatment indicator for patient ii, equal to 1 if treated and 0 if not
  • YiY_i: the observed outcome for patient ii, equal to whichever potential outcome corresponds to the received treatment
  • Xi\mathbf{X}_i: the vector of measured covariates for patient ii, conditioned on for exchangeability

If baseline severity affects both assignment and outcome, a naive treated-versus-untreated comparison can confound effect with selection. The direction is not universal; it depends on the mechanisms and estimand. When a larger outcome value means harm, a harmful-looking effect is positive. Outcome discrimination and calibration among observed treatments do not, by themselves, identify the alternative-treatment contrast. They remain useful predictive diagnostics, but they answer a different question.

The synthetic cohort below makes one possible sign reversal numerical. Higher severity raises both treatment probability and baseline outcome, while assignment lowers the outcome by a fixed amount. An unadjusted group difference therefore mixes severity selection with treatment response. Regression adjustment uses the actual observed severity and the correct additive specification in this example; that privileged setup is why its result can be compared with the stipulated effect. It is not a claim that ordinary adjustment always recovers a clinical effect.

In[3]:
Code
# Deterministic cohort with numpy default_rng seed 11.
# True treatment effect is fixed at -1.0 (beneficial).
# "Adjusted" is the ordinary least squares coefficient on treatment with severity as a covariate.
# "Naive" is the unadjusted difference in observed group means.
import matplotlib.pyplot as plt
import numpy as np

rng_conf = np.random.default_rng(11)
N_PATIENTS = 4000
TRUE_EFFECT = -1.0

severity = rng_conf.uniform(0.0, 1.0, N_PATIENTS)
treat_prob = 0.10 + 0.80 * severity
assigned = rng_conf.uniform(0.0, 1.0, N_PATIENTS) < treat_prob
baseline = 6.0 + 8.0 * severity + rng_conf.normal(0.0, 1.0, N_PATIENTS)
outcome = baseline + TRUE_EFFECT * assigned.astype(float)

design_conf = np.column_stack(
    [np.ones(N_PATIENTS), assigned.astype(float), severity]
)
coef_conf, *_ = np.linalg.lstsq(design_conf, outcome, rcond=None)
adjusted_effect = float(coef_conf[1])
naive_effect = float(outcome[assigned].mean() - outcome[~assigned].mean())
Out[4]:
Visualization
Three labeled bars: negative stipulated and adjusted effects, positive unadjusted difference.
In this synthetic cohort, severity raises both treatment probability and baseline outcome. The stipulated treatment effect and correctly specified severity-adjusted estimate are negative; the unadjusted group difference is positive. This sign reversal depends on the constructed assignment and outcome processes, not a universal bias direction.

A target-trial approach specifies eligibility, strategies, assignment, follow-up, outcome, causal contrast, and analysis before attempting an observational emulation. For sustained treatment, confounding can vary over time and be affected by prior actions; an appropriate longitudinal analysis must address that structure. For the binary, single-time setting here, positivity requires:

0<P(Ai=a∣Xi)<10 < P(A_i = a \mid \mathbf{X}_i) < 1

where:

  • AiA_i: the treatment indicator for patient ii
  • aa: a particular treatment level
  • Xi\mathbf{X}_i: the vector of measured covariates for patient ii
  • P(Ai=a∣Xi)P(A_i = a \mid \mathbf{X}_i): the probability that patient ii receives treatment level aa given their covariates

for both treatment levels on covariate values in the target population's support. This is a condition on the population distribution, not a promise of many samples in every finite-data stratum. If an option never occurs for a relevant group, its effect there cannot be learned nonparametrically from that group's observed assignments alone. Extrapolative assumptions or other evidence can change the analysis, but they should be stated rather than hidden.

Sequential treatment introduces trajectory-level requirements. In an off-policy comparison, the observed assignment process must support the target actions at histories the target policy can reach, and sequential causal assumptions must hold. Importance weights or a fitted simulator cannot create support where none exists. State construction matters: an insufficient summary sts_t may leave confounding even when the full measured history would be adequate. This extends the planning discussion in Part VII without establishing the safety or efficacy of a learned clinical policy.

A treatment-effect claim should state the target population, strategies, identification assumptions, and sensitivity to departures from them. Prospective evidence is valuable where feasible, but it must also match the intended use. Outcome prediction alone is not a substitute for this argument. The causal estimates, their uncertainty, and the eventual action under a stated loss are three separate objects. Hernán and Robins' textbook provides the potential-outcome and longitudinal framework.

Economic and Social Simulation

Economic and social worlds often contain agents who respond to expectations, incentives, and one another. Adaptive feedback is not exclusive to these domains: robots, markets, and controlled physical systems can all form feedback loops. What matters for a particular social model is which behavioral responses and institutions its state and transition law represent.

An economic state may include stocks, flows, institutional rules, and beliefs about future outcomes. Expectations can influence contracts, prices, and investment, while outcomes can revise expectations. An expectation of inflation does not mechanically guarantee inflation: the result depends on behavior, constraints, shocks, and policy responses. Publishing or acting on a forecast can also change incentives. A model should specify these response channels rather than treat reflexivity as a universal explanation.

The Lucas critique concerns using historically estimated behavioral relationships to evaluate a changed policy regime. If decision rules respond to the regime, coefficients that fit the old regime need not remain invariant under the new one. We can write the dependence schematically as θ(ρ)\theta(\rho), with ρ\rho denoting a policy regime, rather than treating θ\theta as policy-independent. This is a warning about invariance assumptions, not a theorem that all econometric evaluation is impossible or every policy change invalidates every parameter.

For a world model, the corresponding test is whether an action changes only a represented input or also the unmodeled response rules. Learned and hand-written models both need an argument for the mechanisms they hold fixed. This connects to Part XII, where deployment assumptions and feedback are considered further.

Several modeling approaches represent these issues differently:

  • Dynamic stochastic general equilibrium models specify dynamic choices, constraints, shocks, and equilibrium conditions. Families vary in heterogeneity, financial frictions, and behavioral assumptions; they do not all consist of identical fully rational agents. Internally coherent policy calculations still depend on whether the specified responses and parameters describe the intended regime.
  • Agent-based models explicitly simulate interacting agents and can represent heterogeneous decision rules and networks. That flexibility does not establish realistic behavior or parameter identification. Different micro-level mechanisms can fit similar aggregates, so validation should include the behavior and interactions needed for the query.
  • Structural microsimulation and tax-benefit calculations can apply a specified rule to individual records. Knowing a tax formula does not eliminate uncertainty about inputs, eligibility, take-up, implementation, or behavioral response. A static arithmetic calculation and a dynamic behavioral forecast should be labeled separately.
  • Financial network models represent institutions and exposures, with losses or payment shortfalls propagating according to a selected rule. Cascades can occur in some networks and shock regimes; there is no single critical-connectivity statement valid for every clearing or default model. Exposure data and assumptions about recovery, liquidity, and response constrain the interpretation.
  • Language-model social simulations generate responses or agent actions from prompts and model outputs. Their applicability depends on whether those generated distributions reproduce the relevant human behavior under the intended conditions.

Language-model outputs depend on learned parameters, prompting, decoding, and post-training; they are not literally samples from the empirical distribution of training text. Nor does plausible language establish a representative human sample. Argyle and colleagues report agreement for particular GPT-3-conditioned survey comparisons, whereas Santurkar and colleagues find substantial opinion misalignment in their evaluated models and demographic groups. These are scoped empirical results, not universal validation or universal invalidation.

A study should examine response distributions by group and question, not only mean opinion. Potential failure modes include prompt sensitivity, excess agreement, exaggerated stereotypes, and insufficient within-group variation. Whether one occurs must be measured for the actual model and setup. A correct mean with inaccurate variance can misrepresent tails or minority responses; an inaccurate simulator may nevertheless be useful for exploratory hypotheses if it is not presented as population evidence.

In a changing multi-agent system, another agent's adaptation can alter the transition law seen by one agent. Equilibrium analysis and dynamical analysis answer different questions. For a game with specified payoff functions uiu_i and strategy sets, a Nash equilibrium π∗\pi^* means no agent improves its payoff by unilateral deviation while others keep their equilibrium strategies:

ui(π∗)≥ui(πi,π−i∗)u_i(\pi^*) \geq u_i(\pi_i, \pi^*_{-i})

for every agent ii and deviation πi\pi_i, where:

  • uiu_i: the payoff (utility) function for agent ii
  • π∗\pi^*: the joint policy profile at equilibrium
  • π−i∗\pi^*_{-i}: the policy profile of all agents other than ii
  • πi\pi_i: a deviation policy for agent ii

The Nash condition alone supplies no convergence rate, stability guarantee, or path to equilibrium. Those require a specified adjustment process. A market or agent model can have an equilibrium while its proposed learning dynamics fail to reach it. Conversely, a simulation of transients does not establish that its endpoint satisfies an equilibrium definition. General-equilibrium conditions are a different formal construction and should not be substituted for the Nash inequality.

Social experiments can randomize individuals or clusters, though some aggregate interventions cannot feasibly be assigned that way and interference may complicate interpretation. Quasi-experimental methods offer alternative identification routes under explicit assumptions:

  • Instrumental variables require a relevant instrument and justified independence and exclusion conditions; additional assumptions determine which effect is identified. Exclusion alone is insufficient.
  • Difference-in-differences uses a specified untreated-trend assumption together with conditions about anticipation, comparison groups, and interference. Similar pretrends can inform a diagnostic but do not prove the post-treatment counterfactual trend.
  • Regression discontinuity identifies a local contrast under appropriate continuity or assignment assumptions at a cutoff, with attention to manipulation and treatment definition. It does not automatically identify effects far from that cutoff.
  • Synthetic control requires an appropriate donor comparison and assumptions supporting the constructed untreated path, including attention to spillovers and post-period stability.

These designs do not universally outrank structural models. A design and a structural model can support one another, and both need a clearly defined estimand. If a query is not identified by the available evidence and assumptions, a precise simulation result should not conceal that limitation.

Domain Constraints, Uncertainty, and Misuse Risk

The domains above reuse several engineering practices. None is exclusive to scientific world models, and none establishes validity alone. They organize checks on a model's represented mechanisms and the query it is asked to answer.

Mechanistic constraints include unit consistency, nonnegative populations or concentrations, applicable symmetries, and balance laws with their sources, sinks, and boundary fluxes. A soft penalty discourages a violation; a hard parameterization can prohibit a specified violation within the represented model. Either can be appropriate depending on scope and numerical implementation. A hard energy constraint does not guarantee correct forces, trajectory accuracy, or freedom from every form of drift. For an open or driven system, forcing a constant-energy rule can itself be wrong. Test the discretized implementation rather than infer its properties from the continuous equations alone.

A surrogate approximates an expensive calculation to make repeated evaluation affordable. Its accuracy is defined relative to its reference, which can itself be approximate. A surrogate trained over a narrow regime needs separate evidence for a new composition, forcing, or patient group. Some surrogates include uncertainty models or rejection rules; smoothness and fast evaluation neither guarantee confidence nor imply an inability to signal failure. Compare interpolation, extrapolation, and decision-relevant error explicitly.

A hybrid keeps a selected mechanistic component and learns another, such as an unresolved tendency or residual correction. This makes assumptions inspectable but does not partition the system into a guaranteed-correct core and a harmless learned part. Components interact during rollout. Errors in a learned closure, a mechanistic approximation, or numerical integration can affect the whole trajectory. Validate the combined system and its supported interventions.

For a stated model and task, it helps to distinguish several sources:

  • Observation or process uncertainty describes measurement variation or modeled randomness, for example in p(ot∣st,at)p(o_t\mid s_t,a_t). Better sensors or richer state can change what is treated as irreducible.
  • Parameter uncertainty concerns quantities within a selected family. A posterior depends on its likelihood and prior. Bootstrap and ensemble estimates depend on the resampling, variation, data, and fitting assumptions actually used; neither label implies a Bayesian posterior.
  • Model-form uncertainty concerns alternative mechanisms or approximations. Candidate-model comparisons can represent included alternatives but need not cover omitted ones.
  • Numerical uncertainty concerns finite resolution, time stepping, and floating-point calculations. It can matter even when the mechanistic family is fixed.

These categories have no universal ranking by size or difficulty. Their importance can change with horizon, data, and target. Report which variations an interval represents and which it omits. A narrow interval can be appropriate for a narrow conditional query, yet inadequate if presented as covering every source of deployment error.

An ensemble can vary initialization, data, parameters, or model form. Its spread describes the chosen variation; agreement among models with shared limitations is not evidence of total uncertainty. Conformal prediction supplies a different, coverage-oriented guarantee. Under an appropriate exchangeability assumption and correctly constructed calibration procedure, a prediction set can satisfy:

P(Ynew∈C^(Xnew))≥1−αP(Y_{\text{new}} \in \hat{C}(X_{\text{new}})) \geq 1 - \alpha

where:

  • YnewY_{\text{new}}: the outcome for a new, unseen observation
  • XnewX_{\text{new}}: the covariates for the new observation
  • C^(Xnew)\hat{C}(X_{\text{new}}): the set obtained by applying the calibrated procedure to the new covariates
  • α\alpha: the desired marginal miscoverage bound.

The probability above averages over the calibration sample and a new exchangeable example. It is a marginal guarantee, not a guarantee for every covariate value or subgroup. Time-series dependence, policy intervention, and regime shift need conditions appropriate to those settings; ordinary exchangeable calibration does not automatically apply. See Angelopoulos and Bates. A conformal set can retain marginal coverage around a misspecified predictor by becoming wide. That does not identify an intervention response.

For both ensembles and calibrated sets, uncertainty statements should name the query and distribution. An ensemble using one architecture may miss an omitted mechanism. A candidate-form ensemble can vary some mechanisms but still leave others out. No method's label establishes that every source has been covered.

Choose tests that match intended deployment. A held-out random split can assess prediction under a similar distribution; it is not sufficient for a materially new regime. Hold out relevant temperatures, pressures, regions, periods, subpopulations, or forcing levels when those are the intended shifts. Also test actual intervention response where evidence is available. An ordinary regime holdout can expose a failure, but passing one does not establish every unobserved action or boundary condition. Useful implementation diagnostics include:

  • Balance checks. With the modeled input, output, and boundary fluxes accounted for, does the discrete mass or energy budget close to its stated tolerance?
  • Symmetry checks. Does the prediction transform as required when coordinates or valid equivalent labels change?
  • Gradient checks. If forces are defined by an energy gradient, do analytic and finite-difference gradients agree within numerical tolerance?
  • Domain checks. Do populations remain nonnegative, and do concentrations and action inputs stay within the model's declared domain?
  • Response checks. Where a monotonicity or dose-response restriction is actually justified, does the implementation respect it under the specified conditions?

Some internal checks do not require a measured reference trajectory. The PK transfer balance follows from its own equations; an implementation violating it is inconsistent even before empirical validation. These tests still require correct scope: energy can change in a forced system, populations can cross a boundary, and real dose responses need not always be monotone. Internal consistency is necessary for the stated model, not sufficient evidence that the model represents the world.

Observational validation establishes performance for the tested observational query and evaluation conditions. An intervention claim needs an identification argument or matching experimental evidence, not only residual accuracy. In a binary treatment example, conditional exchangeability is one condition:

{Y(1),Y(0)}⊥A∣X\{Y(1), Y(0)\} \perp A \mid \mathbf{X}

Consistency, well-defined strategies, positivity on the target support, and any relevant interference conditions are also needed for the standard identification route. When these conditions hold, observational data can contribute to estimating an interventional effect. Without them, an accurate prediction score does not settle that effect. Distinguish estimation uncertainty under stated assumptions from uncertainty about whether the assumptions hold.

Several misuse risks follow from losing those distinctions. Precision theater presents a narrow interval without its conditional scope or omitted uncertainties. Policy laundering treats a model as independent authority for a choice whose values and objectives remain unstated. Medical overreach substitutes a forecast for an identified and validated treatment claim. Social-simulation overreach treats a synthetic response distribution as a measured population. Dual-use concerns arise when a generation system can propose harmful as well as beneficial candidates. Feedback risk arises when predictions or actions change later data. These are reasons to document scope, oversight, and refusal conditions, not predictions that every deployment will fail in these ways.

The practical discipline is to state assumptions, test the intended regimes and actions where feasible, name the uncertainty sources represented, and keep predictions separate from choices under a loss. When evidence does not identify the query, a range, sensitivity analysis, or explicit nonidentification statement can be more informative than a single fitted trajectory.

A Worked Example: Two Models, One Intervention

We can make the central distinction concrete with a small simulation. Its numerical computation runs quickly once the environment is loaded; cold startup and figure rendering are separate costs. The experiment has four parts:

  1. Simulate a compartmental epidemic from a known mechanistic model, and record only the weekly case counts.
  2. Fit two very different models to those counts: a mechanistic susceptible-infectious-recovered model, and a flexible phenomenological autoregression on log cases.
  3. Introduce an intervention that was absent from the observed history, and see what each model predicts.
  4. Vary the recovery rate while refitting transmission and initial prevalence, and compare nearly unchanged training errors with different post-intervention totals.

Everything is deterministic given a fixed random seed, and everything is synthetic. The numbers below carry no medical or policy meaning. They illustrate an inference problem, not an epidemic.

The compartment model includes an action-responsive transition, but that does not make its fitted parameters correct. We will examine a shallow profile of the fitting loss over recovery rates. The autoregression, as implemented here, has no contact-action input. A different learned model could include and learn such an input; this comparison does not prove that learned transition models require hand-written mechanisms.

We observe 25 weekly reports indexed 0 through 24. All forecasts are prospective: the first unseen week is 25, when a 70 percent contact reduction begins, and the 20-week forecast window ends at week 44. The reduced-contact trajectory is withheld from fitting. The action timing and every model's plotted week must agree.

In[5]:
Code
import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import least_squares

N_POP = 400_000  # synthetic population size
OBS_STEPS = 25  # weeks 0 through 24 of reported cases
POST_STEPS = 20  # forecast weeks 25 through 44
INTERVENTION_STEP = OBS_STEPS
TOTAL_STEPS = OBS_STEPS + POST_STEPS
BETA_MULTIPLIER = 0.30  # a 70 percent reduction in effective contacts

The simulator is a discrete-time SIR model. The state st=(St,It,Rt)s_t=(S_t,I_t,R_t) contains susceptible, infectious and recovered counts at the start of week tt. The action at=mta_t=m_t multiplies the transmission rate β\beta. Weekly incidence is βmtStIt/N\beta m_t S_t I_t/N, so the noisy observation model is action-conditioned, p(ot∣st,at)p(o_t\mid s_t,a_t). All three compartments are latent to the fitted models; the simulator retains them internally. The recovered count RtR_t is distinct from the effective reproduction number, which for γ>0\gamma>0 we denote Reff,t=βmtSt/(γN)\mathcal{R}_{\mathrm{eff},t}=\beta m_t S_t/(\gamma N). Zero recovery is still a valid simulation setting, but this finite ratio is then undefined.

In[6]:
Code
def simulate_sir(
    beta,
    gamma,
    i_init,
    steps,
    intervention_step=None,
    beta_multiplier=1.0,
    return_states=False,
):
    """Weekly SIR flows; default return is incidence with shape (steps,)."""
    if not (0.0 <= beta <= 1.0 and 0.0 <= gamma <= 1.0):
        raise ValueError("Weekly beta and gamma must be in [0, 1].")
    if not (0.0 <= i_init <= N_POP and 0.0 <= beta_multiplier <= 1.0):
        raise ValueError("Invalid initial prevalence or contact multiplier.")
    if not isinstance(steps, (int, np.integer)) or steps < 1:
        raise ValueError("steps must be a positive integer.")
    if intervention_step is not None and (
        not isinstance(intervention_step, (int, np.integer))
        or not 0 <= intervention_step <= steps
    ):
        raise ValueError("Invalid intervention step.")
    s, i, r = float(N_POP - i_init), float(i_init), 0.0
    incidence = np.empty(steps)
    states = np.empty((steps + 1, 3))
    states[0] = (s, i, r)
    tolerance = 1e-9 * N_POP
    for t in range(steps):
        multiplier = (
            beta_multiplier
            if intervention_step is not None and t >= intervention_step
            else 1.0
        )
        new_infections = beta * multiplier * s * i / N_POP
        new_recoveries = gamma * i
        # Reject substantive violations before bounding roundoff at endpoints.
        assert np.all(np.isfinite([s, i, r, new_infections, new_recoveries]))
        assert -tolerance <= new_infections <= s + tolerance
        assert -tolerance <= new_recoveries <= i + tolerance
        new_infections = min(s, max(0.0, new_infections))
        new_recoveries = min(i, max(0.0, new_recoveries))
        next_state = np.array(
            [
                s - new_infections,
                i + (new_infections - new_recoveries),
                r + new_recoveries,
            ]
        )
        assert np.all(np.isfinite(next_state))
        assert np.all(next_state >= -tolerance)
        assert np.all(next_state <= N_POP + tolerance)
        np.testing.assert_allclose(
            next_state.sum(), N_POP, rtol=0.0, atol=tolerance
        )
        if np.any(next_state < 0.0) or np.any(next_state > N_POP):
            # Only endpoint roundoff is repaired. Reconcile the largest
            # compartment with the two bounded others to conserve the budget.
            next_state = np.clip(next_state, 0.0, float(N_POP))
            largest = int(np.argmax(next_state))
            next_state[largest] = float(N_POP) - sum(
                next_state[j] for j in range(3) if j != largest
            )
        assert np.all(next_state >= 0.0)
        assert np.all(next_state <= N_POP)
        s, i, r = next_state
        states[t + 1] = (s, i, r)
        incidence[t] = new_infections
    assert np.all(states >= -tolerance)
    np.testing.assert_allclose(
        states.sum(axis=1), N_POP, rtol=0.0, atol=tolerance
    )
    if return_states:
        return incidence, states
    return incidence

The compartment flows use weekly coefficients in [0,1] and a contact multiplier in [0,1]. For valid nonnegative compartments summing to NN, the infection flow cannot exceed SS and the recovery flow cannot exceed II. Updating RR explicitly closes the population budget. In floating-point arithmetic, the implementation checks raw flows and states against the stated tolerance before bounding tiny endpoint errors; it rejects substantive violations rather than masking them. If a state crosses zero or NN only by roundoff, the largest compartment is reconciled with the two bounded others. This is a sufficient safe scope for our selected discrete model, not a general-purpose continuous-time epidemic integrator. The default return is a length-steps incidence array; optional state output has shape (steps+1,3).

We generate an unmodified trajectory for observations and a second trajectory with contact reduction at week 25. Before that week, both coincide. Reports multiply incidence by independent lognormal noise with log standard deviation 0.25. The conditional median of a report equals incidence; its conditional mean is larger by the factor exp⁡(0.252/2)\exp(0.25^2/2). This illustrative observation process is not a surveillance calibration. Forecast totals below compare latent incidence, not noisy future reports.

In[8]:
Code
BETA_TRUE, GAMMA_TRUE, I_INIT_TRUE = 0.45, 0.10, 100.0

truth_natural = simulate_sir(BETA_TRUE, GAMMA_TRUE, I_INIT_TRUE, TOTAL_STEPS)
truth_intervened, truth_states = simulate_sir(
    BETA_TRUE,
    GAMMA_TRUE,
    I_INIT_TRUE,
    TOTAL_STEPS,
    intervention_step=INTERVENTION_STEP,
    beta_multiplier=BETA_MULTIPLIER,
    return_states=True,
)
np.testing.assert_allclose(
    truth_intervened[:OBS_STEPS], truth_natural[:OBS_STEPS]
)

rng = np.random.default_rng(7)
NOISE_SD = 0.25
observed = truth_natural[:OBS_STEPS] * np.exp(
    rng.normal(0.0, NOISE_SD, OBS_STEPS)
)
Out[9]:
Console
True R0 = 4.50
First five reported weeks: [ 45.   65.4  76.5  88.5 133.2]
Last five reported weeks:  [ 9000.7 16743.4 15704.1 27145.7 29868.6]

These reports mostly rise over the observed window, with noise around the underlying trajectory. Log-scale residuals match our selected multiplicative observation process; they are not the uniquely correct loss for every count-forecasting task. We will examine how well this limited record constrains recovery rather than infer identifiability from the apparent trend.

The mechanistic fit minimizes squared log residuals for the selected observation model. Its three free parameters are the transmission rate, the recovery rate, and the initial prevalence. All three have meanings in the simulator: transmission, recovery and initial infectious prevalence. Initial incidence depends jointly on transmission and initial prevalence, so one incidence measurement does not separately identify both.

In[10]:
Code
def sir_log_residuals(
    params, steps, target_log, intervention_step=None, beta_multiplier=1.0
):
    beta, gamma, i_init = params
    incidence = simulate_sir(
        beta,
        gamma,
        i_init,
        steps,
        intervention_step=intervention_step,
        beta_multiplier=beta_multiplier,
    )
    assert np.all(incidence >= 0.0)
    # Positive floor handles numerical zeros only, never negative compartments.
    return np.log(np.maximum(incidence, np.finfo(float).tiny)) - target_log


obs_log = np.log(observed)

fit = least_squares(
    sir_log_residuals,
    x0=np.array([0.35, 0.12, 150.0]),
    args=(OBS_STEPS, obs_log),
    bounds=(np.array([0.05, 0.02, 1.0]), np.array([1.0, 1.0, 5000.0])),
)
beta_hat, gamma_hat, i_init_hat = fit.x
assert fit.success
# A four-rate profile is computed and displayed below; this point estimate is not a posterior.

The competing AR(1) model regresses the next log report on the previous log report. Its two fitted mean coefficients are an intercept and slope. The code does not estimate or use an additive noise-variance parameter. One-step fitted values use observed previous reports; prospective forecasts recurse from the last observed report at week 24, with their first output at week 25. The model has no contact-action input. We also define an explicitly ad hoc output-scaled variant; it is not learned or causally identified.

In[11]:
Code
design = np.column_stack([np.ones(OBS_STEPS - 1), obs_log[:-1]])
target = obs_log[1:]
coef, *_ = np.linalg.lstsq(design, target, rcond=None)
a_hat, b_hat = coef


def ar1_rollout(a, b, log_start, steps):
    logs = np.empty(steps)
    current = float(log_start)
    for step in range(steps):
        current = a + b * current
        logs[step] = current
    return np.exp(logs)


ar_one_step = np.exp(a_hat + b_hat * obs_log[:-1])
ar_rollout_post = ar1_rollout(a_hat, b_hat, obs_log[-1], POST_STEPS)
ar_rollout_post_scaled = BETA_MULTIPLIER * ar_rollout_post

sir_fit_natural = simulate_sir(beta_hat, gamma_hat, i_init_hat, OBS_STEPS)
sir_pred_intervened = simulate_sir(
    beta_hat,
    gamma_hat,
    i_init_hat,
    TOTAL_STEPS,
    intervention_step=INTERVENTION_STEP,
    beta_multiplier=BETA_MULTIPLIER,
)

The SIR forecast applies the contact reduction to the transmission flow. The unchanged AR forecast lacks that input, while the ad hoc variant multiplies each forecast output by 0.30 without changing its recursion. All three predictions now cover exactly the same unseen weeks. Giving the scaled AR an output adjustment does not validate its transition response.

In[12]:
Code
weeks_obs = np.arange(OBS_STEPS)
weeks_post = np.arange(INTERVENTION_STEP, TOTAL_STEPS)

post_truth = truth_intervened[INTERVENTION_STEP:]
post_sir = sir_pred_intervened[INTERVENTION_STEP:]
assert np.array_equal(weeks_post, np.arange(25, 45))
assert (
    post_truth.shape == post_sir.shape == ar_rollout_post.shape == (POST_STEPS,)
)


def log_rmse(prediction, reference):
    prediction = np.asarray(prediction, dtype=float)
    reference = np.asarray(reference, dtype=float)
    assert prediction.shape == reference.shape
    assert np.all(prediction > 0.0) and np.all(reference > 0.0)
    p, r = np.log(prediction), np.log(reference)
    return float(np.sqrt(np.mean((p - r) ** 2)))


sir_fit_rmse = log_rmse(sir_fit_natural, observed)
ar_fit_rmse = log_rmse(ar_one_step, observed[1:])

post_totals = {
    "Truth under the intervention": float(post_truth.sum()),
    "Mechanistic SIR prediction": float(post_sir.sum()),
    "AR(1) prediction, unchanged": float(ar_rollout_post.sum()),
    "AR(1) prediction, ad hoc 30 percent scale": float(
        ar_rollout_post_scaled.sum()
    ),
}
Out[13]:
Console
Fitted SIR: beta=0.353, gamma=0.020, I0=131.4 -> R0=17.66
True  SIR: beta=0.450, gamma=0.100, I0=100.0 -> R0=4.50

AR(1) on log cases: log(y_next) = 0.410 + 0.980 * log(y_now)

In-sample log-scale RMSE (observation noise sd = 0.25):
  mechanistic SIR : 0.184
  AR(1), one step : 0.250

Total predicted cases over the 20 post-intervention weeks:
  Truth under the intervention                    108,047
  Mechanistic SIR prediction                      164,552
  AR(1) prediction, unchanged                   6,279,971
  AR(1) prediction, ad hoc 30 percent scale     1,883,991

The reported SIR training log RMSE is about 0.184, below the selected log-noise standard deviation of 0.25; the AR(1) value of about 0.250 is about that noise scale. They use different residual protocols: SIR is fitted recursively over the whole window, whereas AR(1) uses observed inputs for one-step predictions. This is not an apples-to-apples held-out ranking. The fitted recovery rate lands at its lower bound, and the resulting reproduction ratio is far from the simulator's true ratio. An action-responsive structure can therefore still yield a poor intervention forecast.

The first figure shows the fit window on a log scale. Both fits follow the reports, but a visual comparison on one history is neither a likelihood-equivalence proof nor an intervention test.

Out[14]:
Visualization
Growing noisy reports and fitted curves on a logarithmic incidence axis for weeks zero through twenty-four.
Reports for weeks 0–24, the recursively fitted SIR incidence, and AR(1) one-step fitted values. Both fits follow the growing reports under the chosen noise, but use different residual protocols. Visual agreement on this realized history does not establish equality of observable distributions or intervention forecasts.

Now we apply the intervention. The mechanistic model reduces its transmission parameter, and the autoregression has nothing to reduce, so it continues on its learned trend. The scaled variant gets the intervention handed to it directly, as a multiplicative reduction in predicted cases, without any of the dynamical knock-on effects. The fitted incidence initially rises before a shallow decline; the executed output reports its peak week. In this simulator, the threshold for growth of infectious prevalence is Reff,t=β^mtSt/(γ^N)\mathcal{R}_{\mathrm{eff},t}=\hat{\beta}m_t S_t/(\hat{\gamma}N), including susceptible depletion. It is not just β^mt/γ^\hat{\beta}m_t/\hat{\gamma}, and an instantaneous prevalence threshold does not by itself determine the slope of incidence. We therefore inspect the actual trajectory rather than infer its shape from a ratio.

Out[15]:
Visualization
Four forecasts on a log incidence axis: declining truth, shallow fitted SIR, and two growing autoregressive variants.
Latent weekly incidence forecasts for weeks 25–44 after the simulator reduces contact by 70 percent at week 25. The fitted SIR responds to that action but initially rises while the stipulated truth falls. Neither the unchanged AR(1) nor its ad hoc output-scaled variant reproduces the intervention trajectory. The logarithmic vertical axis keeps all four curves visible.

Three things are worth reading off this figure carefully:

  • The fitted SIR incidence starts in the same broad range as the truth, but initially rises while the truth declines. Its net decline over the window is much shallower. The estimated parameters differ substantially from the simulator's true parameters; action responsiveness alone has not established accurate intervention dynamics.
  • The unscaled autoregression diverges almost immediately and continues to diverge. It has been asked a question it has no machinery to answer, and its answer is implicitly "nothing changes."
  • The ad hoc scaled variant is the most instructive curve of the three. It was given the intervention explicitly, with the same multiplicative factor the mechanistic model used. It still fails, for a deeper reason: in a mechanistic model, reducing transmission does not merely reduce this week's cases; it also prevents those infections from generating further infections next week and depletes the susceptible pool more slowly. The effect compounds. In this simulator the intervention changes the trajectory over time, so a constant output factor does not reproduce its response. That is not a general claim about scaling: proportional trajectories could be related by a constant factor. This result concerns the specified AR baseline, not all learned or statistical simulators.

We can now probe parameter uncertainty directly. At each fixed recovery rate γ\gamma, refit transmission β\beta and initial prevalence I0I_0 to the same observations, then record training log RMSE and post-intervention totals. During approximately exponential early growth, the net growth rate is primarily related to β−γ\beta-\gamma, not the ratio β/γ\beta/\gamma. Here the fitted loss changes little across several recovery rates even though the ratio and future totals change. This is a shallow profile of the loss under noisy, limited observations, not an exact non-identifiability theorem. Every tested refitted trajectory has a net decline in this post-intervention window.

In[16]:
Code
GAMMA_GRID = np.array([0.07, 0.10, 0.14, 0.20])
sweep_rows = []
sweep_predictions = []

for gamma_value in GAMMA_GRID:

    def residuals_two(params, steps, target_log, g=gamma_value):
        return sir_log_residuals(
            np.array([params[0], g, params[1]]), steps, target_log
        )

    sol = least_squares(
        residuals_two,
        x0=np.array([0.4, 120.0]),
        args=(OBS_STEPS, obs_log),
        bounds=(np.array([0.05, 1.0]), np.array([1.0, 5000.0])),
    )
    assert sol.success
    beta_sweep, i0_sweep = sol.x
    inc_sweep = simulate_sir(
        beta_sweep,
        gamma_value,
        i0_sweep,
        TOTAL_STEPS,
        intervention_step=INTERVENTION_STEP,
        beta_multiplier=BETA_MULTIPLIER,
    )
    sweep_predictions.append(inc_sweep[INTERVENTION_STEP:])
    sweep_rows.append(
        {
            "gamma": float(gamma_value),
            "beta": float(beta_sweep),
            "r0": float(beta_sweep / gamma_value),
            "rmse": float(np.sqrt(np.mean(sol.fun**2))),
            "post_cases": float(inc_sweep[INTERVENTION_STEP:].sum()),
        }
    )
Out[17]:
Console
  gamma    beta     R0   log RMSE    post-intervention cases
   0.07    0.40   5.78      0.184                    125,473
   0.10    0.44   4.35      0.185                    105,903
   0.14    0.48   3.40      0.185                     84,591
   0.20    0.54   2.69      0.186                     61,424

Every row of that table describes a model with a similar training error. Their reproduction ratios and intervention totals differ. The executed output below computes the ratio of the largest and smallest total rather than hardcoding it in the prose. This demonstrates a shallow fitting-loss profile relevant to the forecast, not an exactly flat likelihood ridge.

The next two figures share the fixed recovery-rate axis. One shows the four training errors, and the other shows their post-intervention totals. Their separation is visible on a linear total-incidence axis.

In[18]:
Code
# Arrays are extracted from the completed recovery-rate sweep above; no fitting happens here.
ridge_gamma = np.array([row["gamma"] for row in sweep_rows])
ridge_r0 = np.array([row["r0"] for row in sweep_rows])
ridge_post = np.array([row["post_cases"] for row in sweep_rows])
ridge_rmse = np.array([row["rmse"] for row in sweep_rows])

# Use the same four refitted parameter settings for both displayed diagnostics.
ridge_fit_rmse = ridge_rmse.copy()
peak_week = int(weeks_post[np.argmax(post_sir)])
sweep_total_ratio = float(ridge_post.max() / ridge_post.min())
Out[19]:
Console
Fitted SIR peak week: 29
Selected sweep max/min total ratio: 2.043
Out[20]:
Visualization
Four similar training errors against fixed weekly recovery coefficient.
Training log RMSE at four fixed recovery rates, refitting transmission and initial prevalence at each. The errors are similar for these particular observations, not proven equivalent likelihoods.
Four distinct total incidence predictions against the same recovery coefficient.
Twenty-week intervention totals from the same four refits. A linear axis displays their differing magnitudes; the separately printed output gives the max/min ratio.
Out[21]:
Visualization
Four differently colored and styled incidence forecasts, all with net declines over the forecast window.
Weekly intervention incidence for the four fixed recovery coefficients with transmission and initial prevalence refitted. Each curve ends below its starting value over weeks 25–44, while levels and totals differ. These are selected parameter-profile forecasts, not posterior draws or opposing growth-versus-collapse outcomes.

The last figure isolates parameter uncertainty within one transition structure. All four settings decline over this window, but they disagree about how much incidence remains. Independent information about recovery or transmission could constrain this shallow fitting-loss profile. Longer or more informative observations can also help; there is no claim that additional observational data can never identify these parameters.

Three caveats on the experiment, stated plainly:

  • This is a synthetic system with three state variables and a known generative process. Real outbreaks can involve age structure, contact networks, asymptomatic transmission, behavioral feedback, waning immunity, and reporting delays. None is modeled here.
  • The AR(1) baseline is deliberately weak. A stronger learned model could include action inputs and suitable training data; this example does not evaluate such a model.
  • Nothing here is a statement about any real disease or any real policy. The exercise demonstrates forecast ambiguity within its selected models and synthetic data. Drawing a public health conclusion from it would misuse the example.

Limitations and Impact

The examples separate computational usefulness from validity for an intervention. A learned force model, a forecast benchmark, or a device simulator can provide useful evidence within a tested scope. None automatically establishes a reliable response to every new forcing, treatment, or policy.

Several limitations remain relevant to the worked experiment and the domain examples:

  • Identification. A selected history may leave a shallow fitting-loss profile, as it does for the recovery-rate sweep. Different data, longer observation windows, known mechanisms, or justified experiments can constrain an answer. Where the available evidence does not identify the query, report the assumptions and range of answers rather than treating the selected optimum as uniquely established. Similar error on one history is weaker than equality of observable distributions.
  • Extrapolation. A new composition, forcing, patient group, or institution can change relevant mechanisms. A constraint retains only its stated scope: an isolated-system energy balance is not the balance for a driven system. Uncertainty estimates, refusal rules, and held-out regimes can help diagnose a mismatch, but an architecture label cannot certify a new regime.
  • Model-form uncertainty. A finite ensemble or Bayesian model average can compare included alternatives. It does not automatically cover omitted mechanisms, and a narrow interval can be conditional on a restrictive family. Explain both the included variation and the exclusions.
  • Feedback. Deploying or publishing a model can change a system when agents respond to it. That response is a possible channel to model and test, not a universal claim that every deployment changes every target. Closed-loop physical controllers also create feedback.
  • Governance. A prediction used in triage, restrictions, resource allocation, or policy argument can affect people beyond the modeled average. Auditability, affected groups, error costs, and communication belong alongside numerical performance. Part XII takes up these reliability questions.

Scientific world models can reduce the cost of exploring an explicitly modeled system. Differentiable surrogates can support optimization when their derivatives and reference calculations are adequate for the objective. Symmetries can constrain a learned representation, and hybrids can expose the division between specified and learned components. These advantages remain conditional: a fast gradient, an invariant architecture, or a plausible rollout is not an intervention-validity certificate.

A useful model report therefore includes the target query, represented state and observations, action semantics, governing assumptions, validation regime, and remaining uncertainty. Prediction and decision support are related but separate uses. The report should let a reader tell which conclusions follow from the evidence and which depend on untested assumptions.

Summary

Scientific, medical, and social applications ask world models to connect observations with specified mechanisms and actions. The distinction between a successful fit and an identified intervention runs through each domain.

  • Molecular structure prediction, force estimation, dynamical rollout, material stability, and synthesis are distinct tasks. A potential and numerical integrator together determine a molecular trajectory. Applicable symmetries constrain the representation without guaranteeing accuracy.
  • Weather forecasts depend on initial state and horizon; climate questions concern distributions under specified forcing as well as relevant initial conditions and coupled processes. GraphCast's forecast benchmark and NeuralGCM's tested hybrid simulations have particular scopes, not blanket extrapolation guarantees.
  • Physiological models need a stated observation process, parameter scope, and intervention. The volume-correct compartment equations preserve their drug-mass balance. Predicting an outcome is not identifying a treatment contrast; consistency, exchangeability, positivity, and interference assumptions must match the estimand.
  • Social models may include expectations and adaptation. The Lucas critique concerns invariance of policy-dependent decision rules. Randomized and quasi-experimental designs are possible under different conditions; none is an assumption-free substitute for a specified causal argument.
  • Constraints should match represented boundaries and numerical implementation. Observation, parameter, model-form, and numerical uncertainty have no universal ordering. Explain what intervals and ensembles include, and test the regimes needed for the intended query.
  • Possible misuse includes presenting conditional numerical precision as established intervention evidence, treating unvalidated patient simulations as advice, or presenting generated social responses as representative population data. This chapter gives no clinical or social-policy recommendation.

The synthetic intervention begins at week 25 after observing weeks 0–24. An action-responsive SIR fit and an autoregression without action inputs produce different forecasts for weeks 25–44. The fitted SIR also misses the true recovery coefficient, and selected refits with similar errors disagree on intervention totals while all having net declines in this window. These observations concern the constructed experiment, not every statistical model or real outbreak.

The next chapter, The World-Model Evaluation Ladder, begins Part XI by asking what evidence different evaluation levels provide. The state, observation, action, identification, and validation distinctions developed here give that ladder concrete questions to test.

Quiz

Ready to test your understanding? Take this quick quiz to reinforce what you've learned about scientific, medical, and social world models.

Scientific, Medical, and Social Worlds

Question 1 of 80 of 8 completed
According to the chapter, how many levels does the causal hierarchy have, and where do simulation and decision support sit relative to it?

Comments

No comments yet. Be the first to share your thoughts!

Reference

Citation details

Cite or share this article.

BIBTEXAcademic
@misc{brenndoerfer2026scientificmedical, author = {Michael Brenndoerfer}, title = {Scientific, Medical, and Social Worlds}, year = {2026}, url = {https://mbrenndoerfer.com/writing/scientific-medical-social-world-models-intervention-inference}, organization = {mbrenndoerfer.com}, note = {Accessed: 2026-10-11} }
APAAcademic
Michael Brenndoerfer (2026). Scientific, Medical, and Social Worlds. Retrieved from https://mbrenndoerfer.com/writing/scientific-medical-social-world-models-intervention-inference
MLAAcademic
Michael Brenndoerfer. "Scientific, Medical, and Social Worlds." 2026. Web. October 11, 2026. <https://mbrenndoerfer.com/writing/scientific-medical-social-world-models-intervention-inference>.
CHICAGOAcademic
Michael Brenndoerfer. "Scientific, Medical, and Social Worlds." Accessed October 11, 2026. https://mbrenndoerfer.com/writing/scientific-medical-social-world-models-intervention-inference.
HARVARDAcademic
Michael Brenndoerfer (2026) 'Scientific, Medical, and Social Worlds'. Available at: https://mbrenndoerfer.com/writing/scientific-medical-social-world-models-intervention-inference (Accessed: October 11, 2026).
SimpleBasic
Michael Brenndoerfer (2026). Scientific, Medical, and Social Worlds. https://mbrenndoerfer.com/writing/scientific-medical-social-world-models-intervention-inference

About the author

Continue with the full handbook

This chapter is part of World Models Handbook. Use the handbook page to browse the complete table of contents and continue reading in sequence.

Explore World Models Handbook
Newsletter

Stay up to date

Get articles, book updates, and news delivered to your inbox.

No spam, unsubscribe anytime.

or

Join the community

Sign in to remove popups, track your reading progress, and join the discussion.