Time-Resolved Decomposition of Agent-Based Model Dynamics
Eleven canonical models, four decomposition methods, one pipeline
11Models
4Methods
4Structural Classes
22Animations
The browser paused automatic playback; one click starts every animation below.
Overview
An analysis project standing apart from any model library or companion publication. Eleven
agent-based models serve as test systems across four structural classes: lattice,
continuous space, network, and profile. Each model runs through the same decomposition
pipeline, rendered as a movie that advances in step with the simulation that produced
it, so spectral and correlation structure can be watched forming beside the
simulation.
Models are cited to the sources below. Rules come from the reference implementations
by Cuevas et al.
The four decompositions
Four measurements are computed for every model, adapted to the structural class of
the model but never substituted for something easier.
Wavelet transform
A continuous transform with an analytic Morlet wavelet, applied to the order parameter, resolving when a timescale appears and whether it drifts. The transform is computed once over the full record and revealed behind an advancing cursor, which avoids the edge artifacts that a transform recomputed on truncated data would introduce at every frame.
Wavenumber transform
The radially averaged power spectral density of the two-dimensional discrete Fourier transform for a lattice, averaged over the annulus of constant wavenumber magnitude. On a network the operator is replaced by the graph Fourier transform, projecting node state onto the eigenvectors of the Laplacian, where the eigenvalue is the analog of squared wavenumber. Recomputed at every frame.
Cross-correlation
Normalized circular cross-correlation by way of the correlation theorem: between species for the predator-prey lattice, between agent categories for segregation, and frame to frame otherwise. A network instead receives a node-by-node correlation matrix ordered by the Fiedler vector. Recomputed at every frame.
Phase portrait
A trajectory in a two-dimensional state space. Natural coordinate pairs are used wherever a model supplies them, such as prey against predator or prevalence against incidence, and a delay embedding is used otherwise, with the delay taken at the first minimum of the autocorrelation.
Scope
Continuous wavelet analysis of an order parameter, radially averaged spatial power
spectra, normalized cross-correlation, and phase portraits are all standard analysis
methods. Spectral analysis of cellular automata is in developed literature, alongside
graph signal processing applications to network epidemic states.
However, these methods often report on a single instant. In this gallery, decompositions are time-resolved and
shown against the generating simulation instead of reported at a single instant. One
pipeline spans four structural classes, with the wavenumber operator exchanged for the
graph Fourier transform for the network domain. Spectra are computed on indicator
fields rather than on categorical state codes as a lattice storing labels would
otherwise be transformed to treat labels as magnitudes, making a predator coded
as 2 twice a prey coded as 1. The analysis frame is selected by maximum lag-1 spatial
autocorrelation rather than defaulting to the final state, which is frequently degenerate.
The six panels
Panels 4 and 5 are re-evaluated at every frame. Panels 2, 3, and 6 are
progressive reveals of quantities defined over the whole record, which is marked in each
panel title rather than left for a viewer to assume.
Panel
Content
Behavior
1
Model state
The rendered simulation frame
2
Order parameter
Revealed to the current time, with a marker at the cursor
3
Wavelet scalogram
Revealed to the current time behind a cursor
4
Wavenumber spectrum
Recomputed at every frame
5
Cross-correlation
Recomputed at every frame
6
Phase portrait
Revealed to the current time, with the current point marked
Models and analyses
On the left, the simulation. On the right, the six-panel decomposition advancing in step
with it. Every animation starts as the page opens and loops continuously, so any pair
can be compared against any other without a click. Readings under each pair are computed
from the state file shipped with the model.
Game of Life
Alg. 7.1Lattice
The cellular automaton of Conway on a 50 by 50 lattice with a cut-off boundary. The order parameter is the live-cell count.
Simulation
Decomposition, evolving in time
Live-cell count falls from 658 to a plateau near 222, where the standard deviation across the final fifth of the run is 16.
Frame-to-frame correlation measures 0.64 at the analysis frame and decays below 0.5 by a lag of 5 steps, which bounds the lifetime of a typical structure.
The wavenumber spectrum spans barely 1.3 decades at a slope near −1.2, so no single patch size dominates.
Graph-Laplacian diffusion converging to consensus.
Simulation
Decomposition, evolving in time
Spread decays monotonically from 30.6 to 0.05 over 10000 steps, and no step increases.
The graph Fourier transform collapses onto the Fiedler mode (λ = 0.469), which retains 100 percent of the energy.
Across the three models sharing this 34-node graph, low-mode energy separates the dynamics cleanly: 100 percent for diffusion, 5 percent for the epidemic, and 3 percent for the voter model.
Cuevas, E., Avila, K., Islas Toski, M., and Escobar, H. (2025). Agent-Based Models with MATLAB. Morgan Kaufmann and Elsevier. Source of the model rules used here.
Li, W. Power Spectra of Regular Languages and Cellular Automata. Complex Systems.
Ninagawa, S. Power Spectral Analysis of Elementary Cellular Automata. Complex Systems, 17(4).
Infection Analysis on Irregular Networks through Graph Signal Processing (2018). arXiv:1808.04879.
Shuman, D. I., Narang, S. K., Frossard, P., Ortega, A., and Vandergheynst, P. The Emerging Field of Signal Processing on Graphs. IEEE Signal Processing Magazine.
Schelling, T. C. (1971). Dynamic models of segregation. Journal of Mathematical Sociology, 1(2), 143–186.
Dragulescu, A., and Yakovenko, V. M. (2000). Statistical mechanics of money. European Physical Journal B, 17(4), 723–729.
Zachary, W. W. (1977). An information flow model for conflict and fission in small groups. Journal of Anthropological Research, 33, 452–473. Contact network for the voter, epidemic, and network-diffusion models.
Allen, L. J. S. An Introduction to Stochastic Epidemic Models. Greenwood and Reed-Frost chain-binomial formulations.