On the Surprising Effectiveness of Spectral Clipping in Learning Stable Linear and Latent-Linear Dynamical Systems

Hanyao Guo, Yunhai Han, Harish RavichandararXiv 2024

TL;DR

Researchers at Georgia Tech have discovered that a "naive" post-hoc procedure called Spectral Clipping (SC) is surprisingly effective at learning stable dynamical systems. By simply clipping the eigenvalues of a learned linear model to the unit circle, they achieve provable stability and high predictive accuracy while being orders of magnitude faster and more memory-efficient than state-of-the-art constrained optimization methods.

What Problem Does This Paper Address?

Learning Linear Dynamical Systems (LDS) from data is a cornerstone of control theory, robotics, and time-series analysis. Ideally, a learned model should be accurate, computationally efficient to train, and—crucially—stable.

In a discrete-time system ($x_{t+1} = Ax_t$), stability requires that the eigenvalues of the matrix $A$ do not exceed a magnitude of one. If they do, predictions will "explode" over time. While standard Least Squares (LS) is incredibly fast, it often ignores this constraint, leading to unstable models. Conversely, existing methods that enforce stability usually rely on complex, iterative constrained optimization that doesn't scale well to high-dimensional data (like video or complex robot states). The authors tackle this "trilemma" of accuracy, stability, and efficiency.

Methods

The authors propose Spectral Clipping (SC), a straightforward four-step algorithm:

  1. Unconstrained LS: Compute the system matrix $\hat{A}_{LS}$ using standard least squares.
  2. Decomposition: Perform an eigen-decomposition to find the eigenvalues ($\Lambda$) and eigenvectors ($M$).
  3. Clipping: Identify any "unstable" eigenvalues (magnitude $\ge 1$) and surgically scale their magnitude down to $1$ (or $1-\epsilon$ for strict stability) while keeping their phase and the original eigenvectors unchanged.
  4. Recomposition: Reconstruct the final stable matrix $\hat{A}_{SC} = M\bar{\Lambda}M^{-1}$.

The geometric intuition is that SC preserves the "directions" of the dynamics (the eigenvectors) and only modifies the "speeds" (eigenvalues) along those directions to prevent divergence.

Geometric intuition: SC clips the spectral radius without altering eigenvectors.

The authors also extend this to nonlinear systems using Koopman Operator theory, which "lifts" nonlinear dynamics into a higher-dimensional space where they appear linear, allowing SC to stabilize complex behaviors like robotic hand manipulation.

Datasets

The method was evaluated across several diverse domains:

  • UCSD Highway Traffic: Video sequences reduced to lower-dimensional subspaces.
  • DTDB (Dynamic Texture Database): High-dimensional videos of natural phenomena like fire, smoke, and water.
  • DexManip: A robotic dexterous manipulation dataset featuring a 23-degree-of-freedom "Adroit" hand performing tasks like opening doors or reorienting a pen.
  • Franka Panda: Data from a 7-DOF robot arm used to test systems with control inputs.
  • Corrupted Benchmarks: The authors introduced Tool_short (truncated data) and Reloc_with_failures (including failed attempts) to test robustness.

Key Insights and Ideas

  • The Stability-Expressivity Tradeoff: The parameter $\epsilon$ allows users to tune the system. Setting $\epsilon=0$ creates a "marginally stable" system that can preserve energy (good for textures), while a larger $\epsilon$ ensures the system eventually decays to a steady state.
  • Preserving Geometric Structure: Unlike other stabilization methods that warp the entire matrix, SC only intervenes when necessary. By keeping the eigenvectors intact, it maintains the fundamental "shape" of the trajectories learned from data.
  • Computational Dominance: Because it only requires a single eigen-decomposition, SC has a time complexity of $O(n^3)$, whereas many baselines hit $O(n^6)$ due to Kronecker products, making them unusable for high-dimensional tasks.

Key Results

The results show that SC is a "free lunch" in many scenarios:

  • Speed & Memory: SC is orders of magnitude faster than baselines like SOC or CG. On the UCSD dataset, SC took milliseconds while some baselines took seconds or minutes as dimensions grew.
  • Accuracy: Despite its simplicity, SC matched or outperformed much more complex optimization-based methods in reconstruction error (see Figure 3).
  • Long-Horizon Stability: In video prediction (DTDB), unconstrained LS and some baselines eventually produced "exploding" pixels or faded to black. SC maintained recognizable dynamic patterns even 3,000 steps into the future.
  • Robustness to "Bad" Data: In robotics tasks, SC was able to learn successful policies even when the training data included failed demonstrations—a scenario where standard LS failed completely.
Comparison of computation time and memory usage across different dimensions.

Limitations and Future Work

While highly effective, the authors note a few areas for improvement:

  • Deterministic Focus: The current study focuses on deterministic systems; extending SC to stochastic dynamical systems is a logical next step.
  • Manual Tuning: The stability margin $\epsilon$ currently needs to be chosen manually. Automating this choice based on data characteristics could make the method even more "plug-and-play."
  • Non-diagonalizable Matrices: While the paper provides a theoretical workaround for non-diagonalizable matrices using tiny perturbations, more robust handling of these edge cases in practice could be explored.

Summary updated

BibTeX
@misc{guo2024surprising,
  author = {Hanyao Guo and Yunhai Han and Harish Ravichandar},
  title = {{On the Surprising Effectiveness of Spectral Clipping in Learning Stable Linear and Latent-Linear Dynamical Systems}},
  year = {2024},
  eprint = {2412.01168},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.01168},
}
Figure