We study the fundamental problem of one-step prediction of a marginally stable unknown nonlinear dynamical system. We describe an algorithm for this problem, based on the technique of spectral filtering, which learns a mapping from past observations to the next based on a spectral representation of the system. Using techniques from online convex optimization, we prove vanishing prediction error for any nonexpansive nonlinear dynamical system with finitely many marginally stable modes, with rates governed by a novel quantitative control-theoretic notion of learnability. The main technical component of our method is a new spectral filtering algorithm for linear dynamical systems, which incorporates past observations and applies to general noisy and marginally stable systems. This generalizes the original spectral filtering algorithm to both asymmetric dynamics as well as incorporating noise correction, and is of independent interest.
Figure 1: Instantaneous losses ∥y^t−yt∥2 plotted on log scale as a function of t for the fully and partially observed Lorenz system, respectively, averaged over 12 random seeds with a smoothing filter of length 1000. Shading indicates ±1 standard deviation.
Figure 2: Two sets of autoregressive trajectories of length 512, plotted alongside the ground truth trajectory given by continuing to simulate the Lorenz ODE. The initial positions at which the rollouts start are marked with a red star.
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Method
Marginally stable
dhidden -free
asymmetric
adversarial noise
Sys-ID
×
×
✓
×
Regression, open-loop
×
✓
✓
✓
Regression, closed-loop
✓
×
✓
✓
Spectral filtering ( Hazan et al., 2017 )
✓
✓
×
×
USP ( Marsden and Hazan, 2025 )
✓
✓
∼✓
×
OSF (ours)
✓
✓
✓
✓
Appendix
Table 1: Methods for learning LDS.
Figure 3: Instantaneous losses ∥y^t−yt∥2 plotted as a function of t for experiments (1) and (2), averaged over 12 random seeds with a smoothing filter of length 100 and 1000, respectively. Shading indicates ±1 standard deviation.
Figure 4: Instantaneous losses ∥y^t−yt∥2 plotted on log scale as a function of t for the fully and partially observed double pendulum, respectively, averaged over 12 random seeds with a smoothing filter of length 1000. Shading indicates ±1 standard deviation.
Figure 5: Predictions y^t of the four algorithms along with the ground truth yt plotted as a function of t for the fully and partially observed double pendulum, respectively, on a single random seed. We zoom in on the last 100 steps of the trajectory. For the full observation case, since we cannot plot the full state we choose to plot the sine of the angle between the two arms of the pendulum, which is a representative coordinate for the task of next-state prediction.
Figure 6: Densities of the stationary distribution π corresponding to the chosen potential V for dX equal to 1 and 2, respectively. We see a number of asymmetric wells that is exponential in the dimension.
Figure 7: Instantaneous losses ∥y^t−yt∥2 plotted on log scale as a function of t for the Langevin dynamics, averaged over 12 random seeds with a smoothing filter of length 200. Shading indicates ±1 standard deviation.
Figure 8: Eigenvalues of the lifted linear dynamics learned by the eDMD algorithm on the Lorenz system, double pendulum, and Langevin dynamics, respectively. The x and y axes display real and complex components, respectively, and we draw the unit circle in red for the reader’s convenience.
Dynamical systems studies how states evolve over time, including stability, feedback, chaos, and transitions in physical, biological, and engineered systems.
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 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.
Can nonlinear dynamical systems be learned through a compact linear state-space representation, without directly solving a non-convex system-identification problem? We give a provable pipeline for doing so. Starting from observations of an unknown nonlinear dynamical system, we first learn an implicit spectral predictor using Observation Spectral Filtering (OSF), a convex method that competes with the best linear observer for the system. We then apply spectral-to-LDS distillation to convert this predictor into an explicit recurrent linear dynamical system. Our main theorem shows that the average prediction error of the distilled LDS decomposes into an exponentially-small distillation term and the OSF learning term governed by the Luenberger complexity of the best observer. The guarantee is dimension-free: it depends on observer complexity rather than on the latent dimension needed to represent the nonlinear system. To our knowledge, this yields the first end-to-end provable method for extracting a best-in-hindsight LDS representation of nonlinear dynamics through convex learning followed by provable distillation. Experiments on linear LDS benchmarks and MuJoCo behavior cloning show that the train-then-distill pipeline produces compact LDS predictors that match or outperform directly trained baselines.
We study online prediction for marginally stable, partially observed linear dynamical systems under nonstochastic disturbances. Our objective is to minimize the cumulative squared prediction loss and compete with the best-in-hindsight Luenberger predictor. Standard online learning methods typically rely on bounded domains/gradients, and thus their guarantees may fail to deal with potentially unbounded trajectories in marginally stable systems. In this paper, we introduce an unconstrained online least squares method that stabilizes the learning process via tailored predictive hints. With model knowledge, we prove that hints constructed from any stabilizing Luenberger predictor render the hint residuals uniformly bounded, achieving logarithmic regret despite unbounded trajectory growth. We also discuss model-free prediction and introduce a simple universal hint for symmetric systems, under which logarithmic regret is maintained without model knowledge. Our results provide an adaptive, instance-wise optimal online predictor compared to classical fixed-gain observers under nonstochastic disturbances.
Chih-Fan Pai, Yang Zheng
Department of Electrical and Computer Engineering, UC San Diego