On the Stochastic Stability of Deep Markov Models

Ján Drgona, Sayak Mukherjee, Jiaxin Zhang, Frank Liu, Mahantesh Halappanavar

Abstract

Deep Markov Models (DMMs) combine the probabilistic structure of Markov models with the representational power of deep neural networks to capture complex sequential dynamics. However, the inherent expressivity of these models often leads to instability, where small prediction errors accumulate and cause trajectories to diverge. This paper presents a rigorous framework for the stochastic stability of DMMs. By treating deep networks as piecewise affine (PWA) maps, we derive sufficient conditions for mean-square stability using contraction analysis. We introduce practical methods for enforcing these stability constraints via weight factorization. Empirical evaluations on 2D dynamical systems confirm that these constraints successfully bound model behavior while preserving the capacity to model complex attractors.

Introduction

Deep Markov Models are widely used for forecasting and generative modeling in domains ranging from fluid dynamics to robotics. Despite their success, ensuring that these models remain stable over long horizons is a significant challenge. In safety-critical applications, an unstable model that produces diverging trajectories is a liability. Classical control theory provides tools for linear systems, but deep learning models lack similar formal guarantees. This research bridges that gap by providing the first theoretical "safety rails" for DMMs.

Theoretical Framework

The core of the proposed approach lies in the equivalence between Deep Neural Networks (DNNs) and Pointwise Affine (PWA) maps. Any feedforward network with standard activations (e.g., ReLU, Tanh) can be represented as a collection of linear functions $Ax + b$, where the specific parameters $A$ and $b$ are determined by the input's location in the state space.

By viewing the DMM through this PWA lens, the authors apply the Banach fixed-point theorem to analyze the stochastic process. Specifically, if the operator norm of the weight matrices (the "gain" of the linear part) is contractive—meaning its value is less than 1—the entire system is guaranteed to converge toward a stable equilibrium.

Enforcing Stability Constraints

To translate these theoretical findings into practice, the authors propose three methods for constraining model weights during training:

  1. Singular Value Decomposition (SVD): Clamping the singular values of weight matrices to ensure the operator norm remains within stable bounds.
  2. Perron-Frobenius (PF) Theory: Constraining the dominant eigenvalues of non-negative matrices.
  3. Gershgorin Discs (GD): A computationally efficient technique to bound eigenvalues using row and column sums.

Crucially, the paper distinguishes between the stability of the mean network and the variance network. For a DMM to be Mean-Square Stable, both must be bounded. If the variance network is allowed to grow unconstrained, the model reverts to a divergent random walk.

Empirical Validation

The authors validated their framework using synthetic 2D dynamical systems, which allow for the visual inspection of "phase portraits"—maps showing how trajectories evolve from various starting points.

Phase portraits illustrating the interaction between mean and variance stability constraints.

As shown in the figure above, models with stable mean and variance constraints ($||A|| < 1$) consistently converge to a single point or a tight region. When constraints are relaxed to the marginal regime ($||A|| \approx 1$), the models exhibit bounded random-walk behavior. Without these constraints ($||A|| > 1$), trajectories rapidly diverge to infinity, demonstrating the failure mode of unconstrained DMMs.

To balance stability with expressivity, the authors introduced Parametric Stability Constraints. This allows the model to remain unstable (and thus complex) in the center of the state space while forcing it to become contractive at the boundaries. This technique enables the modeling of complex limit cycles, such as periodic oscillations, without the risk of global divergence.

Conclusion

This work provides a foundational step toward making deep generative models safer and more reliable. By grounding deep learning in dynamical systems theory, it offers a principled way to design models that are both expressive and stochastically stable. While current experiments are limited to low-dimensional systems, the framework provides a roadmap for applying similar guarantees to high-dimensional latent spaces in complex real-world tasks.

Summary updated

BibTeX
@inproceedings{drgona2021stochastic,
  author = {Ján Drgona and Sayak Mukherjee and Jiaxin Zhang and Frank Liu and Mahantesh Halappanavar},
  title = {{On the Stochastic Stability of Deep Markov Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=Z2ZWIvNeVUl},
}
Figure