In traditional systems engineering, we often treat complex models as monolithic entities. If you want to model a robot navigating a warehouse, you might build a single, massive Markov Decision Process (MDP) that accounts for every motor fluctuation, sensor noise, and battery level. But as systems grow, these monoliths become mathematically intractable and impossible to reuse.
A growing body of research suggests a different path: compositionality. Instead of building one giant model, we build small, "open" components with well-defined interfaces and "snap" them together. This shift allows researchers to manage uncertainty in everything from cyber-physical systems to deep probabilistic programs by treating stochasticity as a modular building block rather than a global property.
From Closed Boxes to Open Interfaces
The fundamental hurdle in stochastic modeling is that many classical frameworks are not "closed under composition." As Kim G. Larsen and Axel Legay point out in Quantitative Modal Transition Systems, combining two valid probabilistic components often results in a system that the original framework can no longer describe.
To solve this, researchers like Florence Clerc and Harrison Humphrey propose treating Markov processes as open systems. In Bicategories of Markov Processes, they use category theory to define processes with input and output interfaces. By using categorical constructions like "pushouts," they can identify specific states where the output of one module meets the input of another, ensuring the transition logic remains consistent across the boundary.
This "interface-first" thinking allows for the construction of large-scale systems—like the Building Automation Systems described by Nathalie Cauchi—where discrete switching logic and continuous stochastic equations are maintained in separate, interconnected modules.
The Algebra of Quantitative Effects
If we can connect systems, how do we combine their internal "effects"? For instance, how do you merge a theory of probability with a theory of rewards or costs?
Giorgio Bacci, Radu Mardare, and Gordon D. Plotkin have developed a formal toolkit for this in Tensor of Quantitative Equational Theories. They use two primary operations:
- Sum: Combining two independent effects (like probability and state).
- Tensor: Combining effects such that their operations commute (allowing you to perform a probabilistic choice and then a reward update in any order).
This modular algebraic axiomatization means that complex structures like Labelled Markov Processes (LMPs) are no longer monolithic. They are built by "tensing" simpler, independent theories together. This makes it possible to extend a model with new features—like adding a "discount factor" to a transition—without rewriting the entire mathematical foundation.
Visualizing and Programming Composition
The move toward compositionality is also changing how we "write" and "see" models. In Graphical Quadratic Algebra, Dario Stein and Fabio Zanasi introduce string diagrams—a visual language for reasoning about Gaussian probability and optimization. These diagrams allow researchers to literally "wire" together probabilistic programs, making the flow of information and uncertainty visible.
In the world of software, this manifests as functional combinators. Eli Zachary Sennesh and colleagues demonstrate in Composing Modeling and Inference Operations with Probabilistic Program Combinators how to build complex inference strategies (like Sequential Monte Carlo) by composing simpler functional blocks. This mirrors the evolution of Deep Probabilistic Programming Languages (Deep PPLs) noted by Guillaume Baudart, where users assemble models from reusable neural network modules.
Why It Works: The Power of Local Priors
The intuition behind this research direction is best captured by the "autopsy" of AlphaFold1 performed by Thomas Hamelryck and Kanti V. Mardia. In Unfolding AlphaFold's Bayesian Roots in Probability Kinematics, they argue that the system's success stemmed from its ability to layer high-dimensional "soft evidence" onto simple, well-defined priors.
By decomposing a complex problem (protein folding) into modular components (local geometric constraints vs. global spatial predictions), researchers can avoid the "curse of dimensionality" that comes with trying to define a single joint likelihood function for everything. Whether it is Cyrus Neary "snapping together" Port-Hamiltonian neural networks to model physical chains or Shane Barratt using modular stochastic control to handle jumping flight regimes, the core insight is the same: complexity is best managed by composing simplicity.