Decorated Cospans at Work: Coupling Heterogeneous Dynamical Systems via Pushouts and Particle Filters
Wesley Phoa
Abstract
Decorated cospans provide a categorical framework for composing open systems along shared interfaces. This paper is a computational proof of concept: we show that the framework produces a working coupled dynamical system when the decorations are quantitative models from different mathematical traditions. Specifically, we couple a linearised New Keynesian DSGE, a stochastic compartmental epidemic (multi-strain SEIR), and a nonlinear vaccine adoption model with hysteresis into a single sequential Monte Carlo sampler. Each model is a decorated cospan -- interior dynamics as decoration, exposed variables as interfaces. The composite system is the pushout along variable identifications, with coupling functions encoded as factor graph constraints. The coupled system produces a rejection bifurcation: some trajectories escape via vaccination, others enter a self-reinforcing cycle of mandate backlash, vaccine refusal, sustained infection, and recession. This is a structural property of the coupling, not an input assumption. Coupling shifts the output gap by 0.78 pp and rejection by 22 pp relative to the uncoupled system. A fourth narrative -- fiscal/political dynamics, calibrated to the US COVID fiscal response -- attaches via a second pushout and introduces the first positive coupling channel. With pandemic-scale spending parameters, 14% of trajectories overshoot into positive output gap territory; the bearish bias shrinks, but persists. A computable bias decomposition separates three sources of this asymmetry -- sampling, structural, and observational -- and localises the structural component to specific coupling functions whose directional asymmetry can be tested against historical analogues.
