A Memory Efficient Unified Algorithm for Online Learning of Linear Dynamical Systems

Yuval Ran-Milo, Angelos Assos, Elad Hazan

TL;DR

Before you can stabilize a complex, unstable system—like a helicopter fighting the wind—you have to be able to predict what it will do next. Existing algorithms force an unpleasant choice: either use lightweight methods that break down the moment a system has oscillating or runaway behaviors, or use general methods whose memory requirements bloat to match the entire hidden state of the system. This paper introduces a unified algorithm whose memory footprint scales only with the handful of unruly modes that actually threaten stability, ignoring the massive, well-behaved background dynamics.

What Problem Does This Paper Address?

Linear Dynamical Systems (LDS) are the workhorses for modeling how inputs affect a system with hidden internal states over time. In online learning, an algorithm watches inputs and outputs stream by and tries to predict the next output on the fly, without knowing the underlying physics or system matrices.

Historically, predicting LDS outputs meant picking your poison from three imperfect toolkits:

  1. Spectral filtering: Memory-efficient (independent of the hidden state dimension $d$), but strictly limited to well-behaved, diagonalizable systems with purely real, stable modes.
  2. Finite-memory (FIR) filters: Also dimension-free, but only work if every mode in the system decays rapidly.
  3. Autoregressive (AR) predictors: Can handle any observable system—exploding, oscillating, or non-diagonalizable—but require memory proportional to the full state dimension $d$.

What if you have a massive 500-dimensional system where 497 modes are stable and well-behaved, and only 3 modes are unstable or oscillatory? Prior to this work, capturing those 3 "hard" modes meant paying the memory cost for all 500. The authors tackle this mixed regime, aiming for the generality of AR predictors with the lightweight memory footprint of spectral filtering.

Methods

First, the authors define a new metric called instability complexity ($k$). Think of $k$ as a headcount of the system's "troublemakers": eigenvalues that explode, complex modes that oscillate slowly, or non-semisimple modes (coupled modes from Jordan blocks that don't diagonalize cleanly).

To predict any LDS using only $\widetilde{O}(k)$ parameters (linear in $k$, up to logarithmic factors), the authors build a unified hybrid predictor that delegates each part of the system's spectrum to the tool best suited for it:

  • Spectral filters compress the arbitrarily large sea of slowly decaying, real, stable modes.
  • Finite-memory input filters mop up all fast-decaying modes (real or complex) using a short window of recent inputs.
  • A compact AR block (using just $k$ past outputs) explicitly tracks the $k$ troublemaker modes.

Combining these isn't plug-and-play. Because the system has unstable modes, the AR coefficients can be exponentially large in $k$, which violently amplifies any tiny approximation errors coming from the spectral and FIR filters. The authors overcome this by making the filter approximations exponentially sharper (which, conveniently, only requires a logarithmic bump in filter count) and feeding the combined feature vector into a Vovk–Azoury–Warmuth (VAW) forecaster—a classic online regression learner whose error scales only logarithmically with weight norms.

Datasets

Rather than static benchmark datasets, the authors evaluate their method on a synthetic 503-dimensional controlled LDS over a single trajectory of $T = 200,000$ steps.

The system is designed as a stress test with scalar inputs and outputs, where $d = 503$ but the instability complexity is just $k = 3$ (one exploding mode at $1.3$ and one slow complex-conjugate pair at $0.98e^{\pm i 1.57}$). Embedded alongside them are 300 real stable modes and 100 fast-decaying complex pairs. An external control policy keeps the exploding mode from blowing up so the trajectory remains bounded while the predictors learn.

Key Insights and Ideas

  • High-$k$ systems are practically uncontrollable anyway: Why focus on small $k$? The authors prove that if a system has many exploding modes ($k$) relative to its input channels ($m$), any stabilizing control sequence will likely require an input dynamic range—the ratio of the largest to smallest control action—that grows exponentially in $k/m$. In the real world, finite precision, noise, and actuator limits make such systems impossible to control. Thus, small $k$ isn't just a convenient math assumption; it defines the boundary where stabilization is physically plausible.
  • You can't beat $k$ filters: Is $k$ just an artifact of their math, or a fundamental limit? By constructing a clever "delay-line" system, the authors prove a lower bound showing that any bounded-coefficient filter predictor needs at least $k$ total filters to avoid constant prediction error.
  • Observing under control: Studying unstable systems requires assuming the trajectory is currently being kept bounded (e.g., a human pilot flying an unstable helicopter while the AI learns the dynamics). Paradoxically, if an unstable system isn't controlled and explodes, prediction actually becomes trivial because the largest runaway mode drowns out everything else!

Key Results

  • Theoretical Guarantee: For any observable LDS with bounded outputs, the unified algorithm achieves vanishing average squared loss scaling as $O\left(\frac{k^2 \log^3(k) \log^3(T)}{T}\right)$ using $\widetilde{O}(k)$ learnable parameters—completely independent of the full hidden dimension $d$.
  • Experimental Ablation: On the 503-dimensional system ($k=3$), all methods were given an identical, tiny budget of 16 learnable parameters and evaluated over the final 10,000 steps across five seeds:
  • Finite-memory filters: $3.76 \times 10^{-1}$ to $9.60 \times 10^{-1}$ normalized MSE.
  • Spectral filtering: $5.20 \times 10^{-3}$ to $6.13 \times 10^{-2}$.
  • Autoregressive predictor: $1.73 \times 10^{-5}$ to $9.08 \times 10^{-5}$.
  • Unified predictor: $7.88 \times 10^{-9}$ to $1.65 \times 10^{-8}$—outperforming every individual paradigm by roughly four to eight orders of magnitude.

Limitations and Future Work

  • Prediction, not yet control: The algorithm predicts outputs assuming an external operator or policy keeps the outputs bounded (and excludes resonant trajectories that grow unboundedly under bounded inputs). Closing the loop—turning this compact predictor into an active, stabilizing controller—is left for future work.
  • Logarithmic gaps: While the parameter count matches the theoretical lower bound linearly in $k$, nailing down the exact optimal logarithmic factors and sharp regret constants remains an open theoretical question.

Summary updated

Abstract

Motivated by the challenge of stabilizing a general unknown linear dynamical system (LDS) from observations, we study the natural prerequisite of online prediction. Our goal is to achieve sublinear regret with a memory footprint that adapts to the intrinsic complexity of the dynamics rather than the full hidden-state dimension. We focus on the practically central regime of systems with low instability complexity - eigenvalues outside the real stable interval that do not decay rapidly, together with non-semisimple modes - potentially embedded in an otherwise stable real spectrum of much higher dimension; we write $k$ for this count. This regime is the primary setting in which stabilization is plausible: we show that many systems with high instability complexity cannot be stabilized without exponentially large controls. Thus, prediction is meaningful for stabilization precisely when the instability complexity is small. Within this regime, we introduce a unified online algorithm that handles every LDS (including non-diagonalizable systems with complex or exploding modes) with a learnable parameter count of $\widetilde{O}(k)$. Finally, we prove a lower bound showing that $k$ is a valid complexity measure: any filter-based predictor needs at least $k$ filters. Experiments corroborate our theory: on a high-dimensional system, our predictor sharply outperforms prior methods at an equal parameter budget.
BibTeX
@inproceedings{ranmilo2026memory,
  author = {Yuval Ran-Milo and Angelos Assos and Elad Hazan},
  title = {{A Memory Efficient Unified Algorithm for Online Learning of Linear Dynamical Systems}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=4D7dKjdRtk},
}

Loading related content...

Figure