LILAD: Learning In-context Lyapunov-stable Adaptive Dynamics Models
Amit Jena, Na Li, Le Xie
TL;DR
LILAD addresses the challenge of learning dynamical models that are both adaptive to nonstationary environments and guaranteed to be stable. It jointly learns an adaptive dynamics model and a Lyapunov certificate through in-context learning, using a multi-task trajectory pool and a state-dependent attenuator gamma to enforce stability at test time. The framework employs adversarial training to couple dynamics and Lyapunov learning, and introduces an output-warping mechanism to ensure positive semi-definiteness of the Lyapunov function. Experiments across diverse autonomous systems and a high-dimensional PDE demonstrate that LILAD outperforms baselines in predictive accuracy while providing stability guarantees, highlighting its practical relevance for safety-critical, nonstationary settings.
Abstract
System identification in control theory aims to approximate dynamical systems from trajectory data. While neural networks have demonstrated strong predictive accuracy, they often fail to preserve critical physical properties such as stability and typically assume stationary dynamics, limiting their applicability under distribution shifts. Existing approaches generally address either stability or adaptability in isolation, lacking a unified framework that ensures both. We propose LILAD (Learning In-Context Lyapunov-stable Adaptive Dynamics), a novel framework for system identification that jointly guarantees adaptability and stability. LILAD simultaneously learns a dynamics model and a Lyapunov function through in-context learning (ICL), explicitly accounting for parametric uncertainty. Trained across a diverse set of tasks, LILAD produces a stability-aware, adaptive dynamics model alongside an adaptive Lyapunov certificate. At test time, both components adapt to a new system instance using a short trajectory prompt, which enables fast generalization. To rigorously ensure stability, LILAD also computes a state-dependent attenuator that enforces a sufficient decrease condition on the Lyapunov function for any state in the new system instance. This mechanism extends stability guarantees even under out-of-distribution and out-of-task scenarios. We evaluate LILAD on benchmark autonomous systems and demonstrate that it outperforms adaptive, robust, and non-adaptive baselines in predictive accuracy.
