Variational Neural Stochastic Differential Equations with Change Points

Yousef El-Laham, Zhongchang Sun, Haibei Zhu, Tucker Balch, Svitlana Vyetrenko

Introduction

Modeling complex, non-stationary time-series data remains a significant challenge in machine learning. While Neural Stochastic Differential Equations (SDEs) have emerged as a powerful tool for capturing continuous-time stochastic processes by learning drift and diffusion functions, they often struggle with abrupt regime shifts. Standard Neural SDEs typically assume smooth, Lipschitz continuous dynamics, which prevents them from accurately tracking sudden "change points"—sharp shifts in mean or volatility common in financial markets or environmental data.

Furthermore, existing Variational Autoencoder (VAE) frameworks for SDEs often impose restrictive global path priors, such as forcing the latent process to follow a Wiener process. This "regularization tax" can limit the model's ability to represent the true complexity of real-world data. To address these issues, we introduce CP-SDEVAE, a framework that integrates Neural SDEs with automated change point detection and a flexible variational objective.

The CP-SDEVAE Framework

CP-SDEVAE is designed to segment time-series data into distinct regimes, each governed by its own learned SDE. The architecture moves away from global path priors, instead placing a Gaussian prior only on the initial latent state ($z_0$). This allows the neural networks defining the drift and diffusion to learn more expressive dynamics without being constrained by a rigid global prior.

The CP-SDEVAE pipeline, illustrating the transition from raw time-series data to a latent SDE model with explicit change points.

As shown in the pipeline above, the model uses an encoder to map input sequences to an initial latent distribution. The latent space is then evolved using SDE solvers that are conditioned on specific time intervals defined by change points. Decoders then map these latent paths back to the data space to generate the final output.

Iterative Training and Change Point Detection

A core innovation of CP-SDEVAE is its iterative "detect-and-update" training scheme, reminiscent of the Expectation-Maximization (EM) algorithm. The training process alternates between two primary steps:

  1. Parameter Update: With the change point locations fixed, the model updates the neural network parameters ($ heta$) of the SDEs to maximize the Evidence Lower Bound (ELBO).
  2. Change Point Update: With the model parameters fixed, the system identifies the optimal locations for the change points ($ u$).
Conceptual overview of time-series segmentation and the corresponding hierarchical model structure.

The framework supports two detection strategies. The Greedy approach uses Particle Filtering to maximize marginal likelihood, offering high accuracy at the cost of $O(T^2)$ complexity. Alternatively, a Fast strategy based on Sequential Likelihood Ratio Tests monitors shifts in real-time, reducing complexity to $O(T)$.

To prevent the common VAE issue of "noise underestimation"—where the model ignores the diffusion component and treats the SDE as a deterministic ODE—we incorporate a Predictive Log-Likelihood regularizer. This term encourages the model to accurately predict the next time step, forcing it to learn meaningful stochasticity.

Experimental Evaluation

The authors evaluated CP-SDEVAE against state-of-the-art generative models, including TimeGAN, SDEGAN, and LS4, across several challenging datasets:

  • Financial Data: S&P 500 (daily and intraday) and various cryptocurrencies. These datasets are characterized by extreme volatility and sharp regime shifts, particularly during the 2020 COVID-19 market onset.
  • Environmental Data: Hourly air quality measurements from Beijing.
  • Synthetic Benchmarks: Ornstein-Uhlenbeck (OU) processes with known shift points to validate detection accuracy.

Key Results

CP-SDEVAE consistently outperformed baseline models in terms of both marginal distribution similarity and "predictiveness" (the ability of synthetic data to train downstream models). On the S&P 500 dataset, the inclusion of change points ($L=2$) significantly improved the model's ability to generate data that was indistinguishable from real market dynamics compared to versions with no change points.

Furthermore, the model proved robust to overparameterization. Even when assuming more change points than actually existed in synthetic data, the model maintained high performance by placing redundant points in non-disruptive locations. The explicit segmentation also provides interpretability, allowing researchers to analyze how drift and diffusion weights shift between different market regimes.

Conclusion and Future Work

CP-SDEVAE provides a robust solution for modeling non-stationary stochastic processes by combining the flexibility of Neural SDEs with the structure of change point detection. While the current model requires a pre-specified number of change points ($L$), future iterations could explore automated model selection using Dirichlet Processes or fully differentiable detection via temporal point processes. Despite the computational overhead of Particle Filtering, the framework's ability to capture sharp distributional shifts makes it a significant advancement for time-series analysis in volatile domains.

Summary updated

BibTeX
@article{ellaham2025variational,
  author = {Yousef El-Laham and Zhongchang Sun and Haibei Zhu and Tucker Balch and Svitlana Vyetrenko},
  title = {{Variational Neural Stochastic Differential Equations with Change Points}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2025},
}
Figure