Latent-Stock Compartmental Models
- Latent-stock compartmental models are mathematical frameworks that partition systems into hidden stock variables and compartments using explicit stock-flow equations.
- They employ both stochastic and deterministic transition mechanisms, including non-Markovian effects and delayed kernels, to capture real-world dynamics.
- Statistical filtering and scalable simulation methods enable practical inference from partially observed data despite challenges in identifying absolute stock levels.
A latent-stock compartmental framework is a mathematical formalism in which the system evolves through a set of unobserved (“latent”) stock variables partitioned into compartments, with transitions governed by explicit, often time-dependent, stochastic or deterministic rules. Such frameworks subsume a diversity of applications, including epidemiological processes (SEIS, SEIR, and generalized delayed models), educational and demographic pipelines, and shared representation structures in statistical or neural systems. Key commonalities are: the use of stock-flow equations with states often unobservable directly; the presence of complicated, sometimes non-Markovian transition or sojourn mechanisms; and inference or control in partially observed or over-dispersed observational regimes.
1. State-Space Structure and Compartment Definitions
Latent-stock compartmental models partition a fixed or dynamic population into discrete or continuous-valued compartments , with the associated state vector (discrete time) or (continuous time). In classical epidemiological models such as SEIS, these compartments correspond to population subgroups such as susceptibles (), exposed/latent (), infectious (), and possibly additional recovery or immune compartments () (Foxall, 2014, Whitehouse, 11 May 2025, Granger et al., 2023):
- Stock variables: Let denote the numbers or densities of individuals in each compartment; total stock constraints may apply (e.g., ).
- General dynamical setting: For an integer , define as the vector of counts at time in compartments, as the matrix of transitions .
- Latent status: The stock variables are typically not directly observable; instead, only certain flows (such as exit or incidence counts) are observed, defining an indirect observation model (Topaz et al., 13 Jan 2026).
In applications beyond biology, such as modeling degree pipelines in educational systems, compartments represent successive degree statuses (e.g., master’s, PhD), with latent enrollment stocks and only completions observable (Topaz et al., 13 Jan 2026).
2. Transition Mechanisms and Flow Laws
Transition dynamics between compartments are governed by parameterized process models:
- Markovian ODE/recurrence models: In the classical SEIS framework, transitions occur at rates specified by parameters (: infection, : mean latent period, : recovery). For example, the ODEs for SEIS are:
- Compartmental kernels: In generalized latent-stock models with possibly non-exponential holding times (“retarded” transition rates), the flow from compartment to is given by
where is the probability density of sojourn times (Granger et al., 2023).
- Stock-flow system (pipeline): In latent-degree pipeline models,
with per-compartment hazards and routing fractions (Topaz et al., 13 Jan 2026).
- Stochastic particle system: A spatial (agent-based) realization is defined via a state at each site, with stochastic local transitions at given rates (e.g., infection, onset, recovery), giving rise to a generator acting on cylinder functions (Foxall, 2014).
3. Statistical Filtering and Inference with Over-Dispersed or Partial Observations
A central methodological challenge is inference in scenarios where only partial, possibly noisy, observations of compartment outflows are available. Latent-stock compartmental inference frameworks address this via:
- Hierarchical models: Observation distributions are specified at the flow level (e.g., Binomial or Poisson models for new infections, with time-varying reporting probabilities modeled as latent variables) (Whitehouse, 11 May 2025).
- Approximate likelihoods and filtering: The Poisson Approximate Likelihood (PAL) and Laplace-approximate methods integrate out latent reporting rates and transition counts using Laplace expansions about tractable mean-field points, yielding efficient and asymptotically exact filtering in large (Whitehouse, 11 May 2025).
- Parameter estimation: Model parameters (e.g., transmission rates, hazards, routing fractions) are estimated by minimizing loss functions (sum of squared log-residuals, or approximate marginal likelihoods), sometimes employing automatic differentiation and embedded in probabilistic programming environments such as Stan (Whitehouse, 11 May 2025).
- Identifiability: Only products of hazard and latent stock (i.e., flows) are directly constrained by data when stocks are unobserved, while absolute stock levels remain unidentifiable (Topaz et al., 13 Jan 2026).
4. Critical Behavior, Equilibrium, and Limiting Regimes
Latent-stock compartmental frameworks support rigorous analysis of critical thresholds, equilibrium states, and limiting process behavior:
- Phase transition thresholds: In interacting-particle SEIS on , upper and lower critical parameters for infection survival are defined, with block-construction bounds and convergence to limiting values as (reducing to the standard contact process) or (an “explosive” process with mass co-infection events) (Foxall, 2014).
- Equilibrium populations: Retarded/renewal models yield explicit formulas for the disease-free equilibrium () and endemic equilibrium in terms of basic reproduction number and mean sojourn times (Granger et al., 2023).
- Stability analysis: Local asymptotic stability is proven via characteristic equations or spectral radius conditions on next-generation operators (Granger et al., 2023).
- Identifiable features: In completion-flow-only settings, routing fractions are well-identified over time, while latent stock sizes and hazard rates cannot be disentangled from observed flows (Topaz et al., 13 Jan 2026).
5. Generalizations and Multi-Disciplinary Extensions
Latent-stock compartmental ideas extend beyond classical disease modeling:
- Arbitrary compartment networks: The “memory” equation approach naturally generalizes to compartments with arbitrary directed flow and sojourn distributions, supporting age-structured, networked or spatially extended epidemic models (Granger et al., 2023).
- Degree-pipeline applications: In academic degree production systems, master’s and PhD compartments are treated as latent stocks with unobserved enrollments and observable completions, enabling inference of time-varying routing and tenure hazards from output flows (Topaz et al., 13 Jan 2026).
- Machine learning and shared representation: Neural forecasting frameworks (e.g., HIST) implement “latent-stock” mechanisms via dynamically reweighted bipartite graphs, where shared and latent concepts are treated as information-sharing compartments with dynamic assignment based on learned similarity, and the concept-compartmental structure underlies predictive performance (Xu et al., 2021).
6. Computational and Algorithmic Aspects
Efficient simulation and inference in large or high-dimensional latent-stock models demands scalable algorithms:
| Method | Scaling | Key Technique |
|---|---|---|
| LawPAL (Laplace+Poisson) (Whitehouse, 11 May 2025) | Matrix-wise forward pass, Laplace approx. | |
| SMC (Particle Filter) | Particle-based propagation, resampling | |
| Stan implementation | No explicit latent sampling | Uses autodiff on approximate marginal likelihoods |
The LawPAL approach achieves order-of-magnitude computational speedups relative to particle filters for marginal likelihood and posterior sampling tasks in compartmental models, with practical impact in real-world outbreak analysis (Whitehouse, 11 May 2025).
7. Context, Impact, and Limitations
Latent-stock compartmental frameworks provide a unified paradigm enabling:
- Rigorous stock-flow representation of unobserved internal system dynamics in both biological and social-temporal processes.
- Systematic incorporation of time-varying and memory effects (delays, over-dispersion, non-Markovianity).
- Quantitative estimation of aggregate transition mechanisms from partial or over-dispersed observational data.
Fundamental limitations persist regarding identification of absolute underlying states when only flows are observed, and sensitivity to the specification of hazard and transition kernels. Nevertheless, the latent-stock formalism remains central in theoretical epidemiology, demographic and educational modeling, and is increasingly incorporated into statistical inference workflows and neural architectures (Foxall, 2014, Whitehouse, 11 May 2025, Topaz et al., 13 Jan 2026, Granger et al., 2023, Xu et al., 2021).