Inferensys

Glossary

Dynamic Mode Decomposition Attribution

An interpretability method that decomposes a sequence model's hidden state dynamics into spatiotemporal coherent modes to attribute predictions to underlying system behaviors.
Developer building agentic RAG system, retrieval pipeline diagram on laptop, technical workspace with notes.
SPATIOTEMPORAL MODEL INTERPRETABILITY

What is Dynamic Mode Decomposition Attribution?

Dynamic Mode Decomposition Attribution is an interpretability method that applies the Dynamic Mode Decomposition (DMD) algorithm to the hidden state dynamics of a sequence model, decomposing its learned representations into spatiotemporal coherent modes to attribute predictions to specific oscillatory or transient system behaviors.

Dynamic Mode Decomposition Attribution extracts the underlying dynamical system from a temporal model's hidden states by computing the eigenvalues and eigenvectors of a best-fit linear operator that advances the state forward in time. Each resulting DMD mode corresponds to a specific frequency, growth rate, and spatial structure, allowing engineers to attribute a model's forecast to distinct physical phenomena like decaying oscillations, exponential growth, or standing waves rather than opaque time-step importance scores.

This technique is particularly valuable in fluid dynamics, climate modeling, and structural health monitoring, where predictions are driven by coherent spatiotemporal patterns. By linking a model's internal computation to interpretable dynamical modes, Dynamic Mode Decomposition Attribution bridges the gap between black-box deep learning and classical physics-based modeling, providing a rigorous, equation-free audit of what system behaviors the network has learned to exploit.

SPATIOTEMPORAL MODE DECOMPOSITION

Key Features of DMD Attribution

Dynamic Mode Decomposition (DMD) Attribution dissects a sequence model's internal dynamics into coherent spatiotemporal modes, linking predictions to underlying system behaviors rather than isolated time steps.

01

Koopman Operator Theory

DMD is a data-driven approximation of the Koopman operator, which advances observables of a nonlinear dynamical system linearly in an infinite-dimensional space. This allows DMD to extract globally linear coherent structures from complex, nonlinear sequence model hidden states. The attribution is derived from the eigenvalues and eigenvectors of the approximated linear operator, where eigenvalues dictate temporal growth/decay and oscillation frequencies, and eigenvectors define spatial mode shapes.

02

Spatiotemporal Mode Extraction

DMD decomposes the hidden state trajectory into a set of DMD modes, each characterized by:

  • Eigenvalue: Determines the mode's temporal behavior—exponential growth, decay, or oscillation at a specific frequency.
  • Eigenvector (Mode Shape): Defines the spatial structure of the mode across the model's feature dimensions.
  • Amplitude: Quantifies the mode's contribution to reconstructing the original dynamics. Attribution is performed by mapping these modes back to the input space, revealing which spatiotemporal patterns drive predictions.
03

Spectral Attribution

The DMD eigenvalue spectrum provides a compact, interpretable summary of the system's dynamics. Attribution is frequency-resolved: modes with eigenvalues on the unit circle represent persistent oscillations, while those inside/outside indicate damping or growth. This allows engineers to attribute a model's forecast to specific physical frequencies—for example, linking a load forecast to a 24-hour diurnal mode or a 7-day weekly cycle—rather than arbitrary time steps.

04

Mode Selection via Sparsity

Not all DMD modes are physically meaningful; many capture noise. Sparsity-promoting DMD uses an L1-regularized optimization to select a minimal subset of modes that optimally reconstruct the dynamics. The resulting sparse mode amplitudes serve directly as attribution scores, identifying the few dominant coherent structures responsible for a prediction. This provides a parsimonious explanation that aligns with Occam's razor.

05

Input Space Reconstruction

DMD operates on the model's hidden state, but attribution must be delivered in the original input space. This is achieved by projecting DMD modes back through the model's encoder or embedding layers using a pseudoinverse or a learned decoder. The reconstructed input-space modes show exactly which spatiotemporal patterns in the raw data—such as a propagating voltage sag in a power grid or a seasonal temperature wave—are responsible for the model's output.

06

Applications in Forecasting

DMD Attribution excels in domains governed by underlying partial differential equations or coherent structures:

  • Fluid dynamics: Attributing drag predictions to specific vortex shedding modes.
  • Power grids: Linking instability forecasts to inter-area oscillation modes.
  • Climate modeling: Decomposing temperature forecasts into seasonal and El Niño modes.
  • Finance: Identifying dominant market regimes as coherent modes in high-dimensional order flow data.
DYNAMIC MODE DECOMPOSITION ATTRIBUTION

Frequently Asked Questions

Explore the core concepts behind using Dynamic Mode Decomposition to attribute predictions in sequence models to spatiotemporal coherent structures.

Dynamic Mode Decomposition (DMD) Attribution is an interpretability method that decomposes a sequence model's hidden state dynamics into spatiotemporal coherent modes to attribute predictions to underlying system behaviors. It works by applying the DMD algorithm—a purely data-driven, equation-free technique—to the high-dimensional latent state trajectory of a recurrent or temporal model. DMD extracts the eigenvalues and eigenvectors of a best-fit linear operator that approximates the nonlinear dynamics. Each resulting DMD mode corresponds to a specific oscillation frequency and growth/decay rate. Attribution is performed by reconstructing the model's output from a subset of dominant modes and quantifying the contribution of each mode to the final prediction, revealing which physical behaviors (e.g., a specific traveling wave or instability) the model relied upon.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.