Papers
Topics
Authors
Recent
Search
2000 character limit reached

Compositional System Dynamics Modeling

Updated 12 July 2026
  • Compositional system dynamics modeling is a framework that constructs complex systems by connecting modular submodels with explicit interfaces, wiring, and orchestration policies.
  • It leverages mathematical tools like decorated cospans, functorial semantics, and diagrammatic languages to enable interoperability across scales and heterogeneous domains.
  • This approach facilitates analysis and software integration, promoting model reuse, integration of learned dynamics, and scalable design in various applications.

Searching arXiv for recent and foundational papers on compositional system dynamics modeling. Compositional system dynamics modeling treats a composite dynamical system not merely as a large monolithic state equation, but as a structured assembly of submodels with explicit interfaces, explicit wiring, and, in broader formulations, an explicit orchestration policy. In the stock-and-flow setting, this means that diagrams are treated as open, reusable components that can be assembled into larger models through formal interfaces and then interpreted systematically as dynamical systems; in wider formulations the same agenda extends to multiscale systems biology, reaction networks, hybrid systems, learned physical models, and multi-view cyber-physical system representations (Baez et al., 2022, Agmon, 2024, Li et al., 22 Sep 2025).

1. Conceptual scope and defining criteria

A common formulation identifies three ingredients of composition: subsystem interfaces, composition patterns, and orchestration patterns. Interfaces specify the points of interaction; composition patterns specify how interfaces are connected; orchestration patterns specify how coupled subsystems are coordinated in time. In this view, compositional modeling is not exhausted by adding equations inside one formalism. It also includes heterogeneous co-modeling, such as coupling ODEs with FBA, stochastic kinetics with deterministic approximations, particle models with continuum fields, whole-cell models with 3D structural or spatial simulators, and agent-based models with intracellular dynamics (Agmon, 2024).

This scope immediately separates compositionality from weak modularity. Many modeling paradigms are “individually compositional” only in the sense that one can enlarge a model within a single language. The stronger claim is that models should be open, replaceable, and interoperable across scales, formalisms, and engineering views. In cyber-physical systems theory this is framed as horizontal composition within one model type and vertical composition across requirements, behaviors, and architectures; in system dynamics it appears as the demand that dynamic, structural, and requirement views compose coherently rather than being maintained as isolated artifacts (Bakirtzis et al., 2021).

A further consequence is that composition is not solely a question of dynamics. It is also a question of what a component exposes and what it hides. In process-centric systems biology, a process interface defines the types of state variables exposed by the process—its inputs, outputs, and configuration settings—while hidden internals include the simulator, numerical method, or model file. This suggests that compositional system dynamics is as much about interface discipline and substitution as about differential equations (Agmon, 2024).

2. Formal interfaces, wiring, and functorial semantics

A central mathematical pattern is to represent open models as morphisms with interfaces and then interpret them by a separate semantics functor. In compositional stock-and-flow modeling, a primitive stock-flow diagram is a functor

$F:H\to \FinSet,$

with objects {flow,stock,link}\{\mathrm{flow},\mathrm{stock},\mathrm{link}\} and incidence maps specifying upstream stocks, downstream stocks, and links from stocks to flows. A full simple stock-flow diagram is a pair (F,ϕ)(F,\phi), where each flow ff is assigned a continuous flow function

ϕf:RF(t)1(f)R.\phi_f:\mathbb{R}^{F(t)^{-1}(f)}\to\mathbb{R}.

An open stock-flow diagram from XX to YY is then such a diagram together with interface maps

XiF(stock),YoF(stock).X \xrightarrow{i} F(\mathrm{stock}), \qquad Y \xrightarrow{o} F(\mathrm{stock}).

Composition is handled with decorated cospans; composition of open diagrams is by pushout along shared interfaces; and the resulting category Open(StockFlow)Open(\mathrm{StockFlow}) is a hypergraph category, closely related to the operad of undirected wiring diagrams (Baez et al., 2022).

The corresponding ODE semantics is not built into the syntax. It is given by a functor

v:Open(StockFlow)Open(Dynam),v:Open(\mathrm{StockFlow})\to Open(\mathrm{Dynam}),

where a dynamical system on a finite set {flow,stock,link}\{\mathrm{flow},\mathrm{stock},\mathrm{link}\}0 is a continuous vector field {flow,stock,link}\{\mathrm{flow},\mathrm{stock},\mathrm{link}\}1. For a stock {flow,stock,link}\{\mathrm{flow},\mathrm{stock},\mathrm{link}\}2, the induced vector field is

{flow,stock,link}\{\mathrm{flow},\mathrm{stock},\mathrm{link}\}3

This stock-balance equation gives an incidence-style semantics in which inflows contribute positively and outflows negatively. In the simple formalism, every flow has exactly one upstream and one downstream stock, so the total value of all stocks is conserved; the paper also notes that this conservation law ceases to hold in the full-fledged formalism once partial inflows and outflows are allowed (Baez et al., 2022).

The same interface-first architecture appears in other domains. Open reaction networks are cospans {flow,stock,link}\{\mathrm{flow},\mathrm{stock},\mathrm{link}\}4 decorated by reaction networks with rates, and there is a functor from open reaction networks with rates to open dynamical systems. Their steady-state behavior is then obtained by black-boxing to semialgebraic input/output relations (Baez et al., 2017). In a more recent synthesis of learning and mechanics, the operad {flow,stock,link}\{\mathrm{flow},\mathrm{stock},\mathrm{link}\}5 of smooth adaptive arrangements provides a common syntax for parameterized learning systems and harmonic mechanical systems, with two functorial semantics {flow,stock,link}\{\mathrm{flow},\mathrm{stock},\mathrm{link}\}6 and {flow,stock,link}\{\mathrm{flow},\mathrm{stock},\mathrm{link}\}7 into polynomial coalgebras: one yields gradient-descent-like first-order dissipative dynamics, the other discrete wave-equation-like second-order conservative dynamics (Spivak, 27 Jun 2026).

Across these examples, the recurrent structure is explicit syntax, explicit interface objects, composition by universal constructions such as pushouts, and semantics as a separate functor. This is the mathematical core of compositional system dynamics.

3. Diagrammatic languages and multi-view system structure

Compositional system dynamics is not tied to a single diagram type. One foundational line of work treats causal loop diagrams, system structure diagrams, and stock-and-flow diagrams as distinct attributed {flow,stock,link}\{\mathrm{flow},\mathrm{stock},\mathrm{link}\}8-set schemas, that is, as functors from schema categories into {flow,stock,link}\{\mathrm{flow},\mathrm{stock},\mathrm{link}\}9. In this representation, a causal loop diagram is a typed relational structure with variables, links, and polarities; a system structure diagram has stocks, flows, auxiliaries, sum variables, parameters, and typed influence links; and a stock-and-flow diagram adds formula-encoding attributes such as operator fields and positional attributes for arguments. This makes diagrams machine-manipulable as structured data while preserving precise combinatorial structure (Li et al., 22 Sep 2025).

Once diagrams are treated as syntax, mappings among them can be made functorial. One paper gives an explicit functor

(F,ϕ)(F,\phi)0

together with a stock-and-flow-to-system-structure translation and the composite stock-and-flow-to-causal-loop map. The same framework uses pushouts to compose open diagrams, pullbacks to stratify aggregate models by compatible type structure, and homomorphisms to detect motifs such as first-order delays. In a more advanced treatment, causal loop diagrams are represented as signed categories so that causal pathways become morphisms and loop polarity follows by composition of signs. This makes implied pathways and feedback loops part of the internal categorical structure rather than merely graph-search artifacts (Li et al., 22 Sep 2025).

A broader architectural analogue appears in process bigraphs. There, a model has two coupled dimensions: a place graph of nested stores and a process graph connecting processes to stores via typed ports. A process is parameterized by configuration and exposes typed inputs and outputs: (F,ϕ)(F,\phi)1 Stores hold externalized values; processes read from and write to stores; and type compatibility is enforced at the interface. Composite processes contain internal process bigraphs but present external interfaces like any other process. This gives a precise notion of hierarchical encapsulation, zooming, and replacement across scales (Agmon, 2024).

At the level of knowledge-based model construction, compositionality can be pushed earlier in the workflow. A model repository may store reusable partial models, relevance assumptions, model assumptions, and composable relations such as additive and multiplicative contributions to equations. Model assembly then becomes an activity-based dynamic preference constraint satisfaction problem, so that the final scenario model is selected from compatible partial models under symbolic order-of-magnitude preferences rather than by hand-coded monolithic construction (Keppens et al., 2011).

4. Learned, stochastic, and heterogeneous compositions

A major extension of compositional system dynamics replaces hand-written subsystem laws by learned or hybrid laws while preserving explicit interconnection structure. In compositional learning with port-Hamiltonian neural networks, each subsystem is modeled as

(F,ϕ)(F,\phi)2

with (F,ϕ)(F,\phi)3 skew-symmetric, (F,ϕ)(F,\phi)4, and subsystem Hamiltonians learned from trajectory data. A composite model is obtained by summing subsystem Hamiltonians, stacking dissipation and input matrices block-diagonally, and adding a skew-symmetric composition matrix (F,ϕ)(F,\phi)5 to the interconnection: (F,ϕ)(F,\phi)6 When the interconnection is known, no additional optimization is needed; when it is unknown but constant, the paper reduces interconnection discovery to a least-squares problem. The resulting composed models preserve port-Hamiltonian structure and cyclo-passivity, and the paper reports accurate composition from independently trained subsystem models, including an experiment with only four composite-system transition datapoints for interconnection recovery and a scaling demonstration to ten interacting subsystems (Neary et al., 2022).

Another line of work learns continuous and compositional latent dynamics across environments by imposing a Lie-structured latent action representation. World modeling through Lie Action assumes a common Lie group acting across environments and learns object-centric latent states (F,ϕ)(F,\phi)7 together with latent generators (F,ϕ)(F,\phi)8 such that

(F,ϕ)(F,\phi)9

Each block of ff0 is parameterized by scaling and rotation terms ff1, and the shared latent simulator is trained from video trajectories across environments. This yields continuous latent controls, object-wise factorization, and a separation between shared dynamical structure and environment-specific controller adaptation. The paper’s scope is explicitly limited by strong assumptions, including a common abelian Lie group, deterministic dynamics, and object-centric slot decomposability (Hayashi et al., 13 Mar 2025).

When the target system is not well described by a single smooth vector field, compositionality can take the form of a mixture over local laws. MODE represents observed velocities ff2 by a mixture of sparse dynamical experts: ff3 with state-dependent neural gating ff4 or state-independent EM-based mixing. Forecasting uses stochastic switching: ff5 This framework is designed for overlapping regimes, branching, and noisy transitions. It supports unsupervised regime discovery, sparse expert laws, and stochastic commitment behavior, but it also assumes a finite number of experts and has no explicit temporal transition model beyond state-dependent switching (Quiblier et al., 10 Oct 2025).

Continuous-time stochastic composition can also be expressed at the level of generator algebra. In compositional stochastic modeling and probabilistic programming, processes proceeding in parallel have summed time-evolution operators. This yields a continuous-time operator-algebra semantics for rule-based stochastic models, supports hybridization with differential-equation evolution, and provides a basis from which simulation, inference, and model reduction can be derived systematically (Mjolsness, 2012). A very different learned continuous-to-discrete construction appears in attractor-based neural symbolic modeling, where a stochastic latent trajectory ff6 is driven toward attractor embeddings ff7 associated with token sequences, so that discrete symbolic states arise as attractor basins in a continuous latent dynamical system (Nam et al., 2023).

5. Analysis, abstraction, and software ecosystems

A distinctive promise of compositional system dynamics is that analysis should respect composition. One early result shows that the steady states of open dynamical systems can be summarized by steady-state matrices whose composition mirrors system interconnection: serial composition corresponds to matrix multiplication, parallel composition to the Kronecker product, and feedback to partial trace. This turns equilibrium analysis into a modular calculation over summaries indexed by exposed interfaces rather than a monolithic analysis over the full product state space (Spivak, 2015).

Open reaction networks provide a related static abstraction. An open reaction network with rates is mapped functorially to an open dynamical system, and then black-boxed to the semialgebraic relation it imposes between boundary concentrations and boundary flows in steady state. The result is a relational notion of external behavior for nonlinear mass-action systems, analogous to black-boxing in circuits and Markov processes but now formulated for reaction-network dynamics (Baez et al., 2017).

Sheaf-theoretic analysis pushes abstraction further by treating local compatibility conditions as the organizing principle of a model. A DSEM can be translated to a netlist and then to a netlist sheaf on the Alexandrov topology of the induced preorder. In that representation, DSEM solutions correspond bijectively to consistent netlist signal assignments and to global sections of the associated sheaf. The consistency radius

ff8

measures model-data inconsistency and supports missing-data imputation, parameter inference, and localization of outliers or mismatched local assumptions. The Bering Sea food-web example demonstrates these ideas on a real ecological mechanism (Robinson et al., 6 Nov 2025).

For hybrid systems mixing continuous dynamics with discrete dynamics over finite alphabets, compositionality appears in certificate form. Large hybrid systems are represented as interconnections of smaller subsystems, each with a local storage function, and global dissipativity, passivity, or input-output bounds follow from algebraic interconnection inequalities. The paper shows that the required certificates can be computed via semidefinite programs and, when centralized SDPs become intractable, by distributed accelerated ADMM. Its worked example has 60 continuous states and 18 discrete states (Cubuktepe et al., 2018).

These mathematical ideas have corresponding software realizations. StockFlow, in the AlgebraicJulia ecosystem, represents stock-and-flow diagrams as attributed ff9-sets, composes them using structured cospans or multicospans, and stores initial conditions and parameter values separately from the stock-flow syntax; its worked example compositionally assembles a simplified Canadian COVID-19 model from transmission/hospitalization, vaccination, and asymptomatic-infection subsystems (Baez et al., 2022). Vivarium embodies the process-bigraph style with processes, hierarchical stores, composition schemas specifying addresses, configs, and wires, and an orchestration engine for heterogeneous simulators (Agmon, 2024). BlenX provides process-algebraic boxes with typed binders and reusable templates for “unpacking” Michaelis–Menten and Hill kinetics into elementary stochastic mechanisms, culminating in a compositional circadian-clock case study (Zámborszky et al., 2010). In visual physical dynamics, compositional neural radiance fields combine object-wise latent states, individual NeRF decoders, and a graph neural network over learned interaction graphs to obtain object-count generalization and long-horizon prediction in multi-object scenes (Driess et al., 2022).

6. Limitations, misconceptions, and open research directions

A recurring misconception is that compositionality means only elaboration within a single formalism. The broader literature rejects that reduction. Composition also concerns interface exposure, interconnection laws, semantic translation, and time coordination. Another misconception is that stock-and-flow diagrams are inherently tied to ODE semantics. Foundational work explicitly separates syntax from semantics and notes that the same syntax could, in principle, support ODEs, difference equations, stochastic systems, loop-gain analysis, eigenvalue elasticity analysis, and other interpretations (Baez et al., 2022, Li et al., 22 Sep 2025).

At the same time, compositionality does not remove the ordinary difficulties of dynamical modeling. In StockFlow, current implementation still uses structured rather than decorated cospans, the domains of flow functions are not yet constrained directly by link structure at the schema level, and maps between open stock-flow diagrams are not yet supported; ongoing work includes constants inside diagrams, acyclic dependencies among auxiliary variables, hierarchical composition, dimensional consistency, and a GUI (Baez et al., 2022). In compositional systems biology, foundational issues remain open: there is no full formal semantics for process bigraph composition, no rigorous mathematical account of synchronization, causality, or numerical stability in multi-timestep co-simulation, no finalized interface standard, and no comprehensive treatment of uncertainty propagation across composed models (Agmon, 2024).

Learned compositional models inherit their own assumptions. Port-Hamiltonian neural network composition assumes known ϕf:RF(t)1(f)R.\phi_f:\mathbb{R}^{F(t)^{-1}(f)}\to\mathbb{R}.0, explicit port-Hamiltonian state-space form, and separable subsystem Hamiltonians with coupling entering through the interconnection matrix ϕf:RF(t)1(f)R.\phi_f:\mathbb{R}^{F(t)^{-1}(f)}\to\mathbb{R}.1 (Neary et al., 2022). Lie-structured world modeling assumes a common abelian Lie group, deterministic dynamics, and object-centric latent decomposition (Hayashi et al., 13 Mar 2025). Mixtures of dynamical experts assume a finite set of regimes and use memoryless state-dependent switching rather than a learned temporal transition process (Quiblier et al., 10 Oct 2025). BlenX-style mechanistic unpacking improves compositional transparency, but it introduces parameter explosion, non-uniqueness of decomposition, and a tradeoff between abstraction and realism (Zámborszky et al., 2010).

The main open direction is therefore not a single missing theorem but a unification problem. The field already contains open stock-and-flow algebras, process bigraphs, open reaction networks, subsystem sheaves, hybrid dissipativity frameworks, and several distinct learned composition paradigms. What remains is to connect compositional syntax, executable semantics, analysis, data assimilation, dimensional consistency, and multi-view engineering traceability at scale. Existing papers already point toward temporal sheaves, hybrid and agent-based modeling, richer provenance and query structures, maps between open diagrams, and community-driven registries of reusable components (Li et al., 22 Sep 2025, Agmon, 2024). Taken together, these directions define compositional system dynamics modeling as a program for making system models modular, semantics-aware, analyzable, and reusable without reducing them to a single privileged formalism.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (17)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Compositional System Dynamics Modeling.