Abstract
Traditional data-driven methods for discovering governing differential equations, such as the Sparse Identification of Nonlinear Dynamics (SINDy), typically rely on batch processing. These methods assume that the underlying physics of a system remain stationary and that the entire dataset is available for offline analysis. However, real-world systems—ranging from biological organisms to mechanical components—often evolve over time. This paper discusses O-SINDy (Online-Sparse Identification of Nonlinear Dynamics), a novel framework designed to discover governing equations from streaming data in real-time. By utilizing sequential optimization, O-SINDy adapts to shifting dynamics and identifies "change points" where the underlying physical laws evolve.
Introduction
In data-driven science, identifying the mathematical equations that govern complex systems is a fundamental challenge. Whether modeling the motion of a pendulum, the spread of a virus, or fluid dynamics, researchers seek the simplest mathematical representation that accurately describes observed behavior. The SINDy algorithm revolutionized this field by using sparse regression to select the most relevant terms from a library of candidate functions.
Despite its success, SINDy and its variants are largely restricted to batch-based learning. This approach presents two significant limitations. First, it is computationally and memory-intensive, requiring the storage of massive datasets. Second, it fails to account for non-stationary systems. If a system’s dynamics change—due to wear and tear, environmental shifts, or biological transitions—batch methods produce a "compromise" model that fails to accurately represent either the initial or the subsequent state. O-SINDy addresses these hurdles by shifting the discovery process to an online, sequential paradigm.
Methodology
O-SINDy transforms the discovery of differential equations into a real-time streaming problem. The framework consists of several core components:
1. Candidate Library Construction
Similar to the original SINDy, O-SINDy begins with a comprehensive library of potential functional terms, including polynomials, trigonometric functions, and partial derivatives. The goal is to find a sparse combination of these terms that fits the observed data.
2. FTRL-Proximal Optimization
The primary innovation in O-SINDy is the use of the Follow-the-Regularized-Leader (FTRL)-Proximal algorithm. Unlike standard regression, which processes data in bulk, FTRL-Proximal updates model coefficients one sample at a time. This optimization strategy balances three competing objectives:
- Accuracy: Fitting the most recent data point.
- Sparsity: Maintaining a simple, interpretable model by penalizing unnecessary terms.
- Stability: Preventing the model from changing too drastically between steps unless the data provides strong evidence of a shift in dynamics.
3. Change Point Detection
Because O-SINDy updates sequentially, it provides a natural mechanism for detecting when a system evolves. A sudden spike in the internal "loss" (error) of the online learner serves as a mathematical signal that the current model no longer fits the incoming data. This allows the algorithm to rapidly "forget" outdated physics and converge on a new set of governing equations.
Experimental Validation
The researchers evaluated O-SINDy across a diverse array of synthetic and real-world datasets to test its precision and adaptability.
- Canonical Physics: The model was tested on the chaotic Lorenz system, Burgers’ equation, and the Korteweg-de Vries (KdV) equation. In these tests, O-SINDy recovered the exact governing equations with parameter errors as low as $10^{-4}$ to $10^{-5}$.
- Switching Systems: To test adaptation, the authors simulated systems that changed their governing equations mid-stream (e.g., a transition from cubic to linear dynamics). While traditional batch methods failed to identify the correct structure for either phase, O-SINDy successfully identified both regimes.
- Epidemiology: Using the SIR (Susceptible-Infected-Recovered) model, O-SINDy tracked time-varying transmission rates, simulating the dynamics of seasonal outbreaks.
- Biological Dynamics: The framework was applied to the posture dynamics of the nematode C. elegans. O-SINDy successfully identified distinct mathematical regimes corresponding to different behaviors—such as forward motion, turning, and backward crawling—without any prior labeling of the states.
Key Insights
O-SINDy demonstrates that the internal error metric of an online learner is a powerful tool for real-time monitoring. The "loss spike" observed during transitions provides a highly sensitive detector for physical change points. Furthermore, by processing data point-by-point, O-SINDy eliminates the need for large-scale data storage, making it an ideal candidate for deployment on edge devices and real-time sensors where memory is a constraint.
Limitations and Future Work
While O-SINDy represents a significant step forward, several challenges remain:
- Numerical Differentiation: Calculating derivatives from noisy streaming data is difficult. The accuracy of the discovered equations is heavily dependent on the quality of these numerical derivatives.
- Burn-in Requirements: The algorithm requires a short "burn-in" period to collect enough data to distill the underlying physics. The minimum sequence length required for complex systems remains a subject for further study.
- Noise Sensitivity: In high-noise environments, distinguishing between a genuine change in physics and random fluctuations can be challenging, as noise can blur the change-point signal.
Conclusion
O-SINDy provides a robust framework for the real-time discovery of governing equations in non-stationary systems. By moving away from batch processing and embracing sequential optimization, it enables the tracking of evolving physics in fields as diverse as fluid dynamics, epidemiology, and behavioral biology.
Summary updated