Abstract
Real-world time-series data often exhibit non-stationary behavior where the underlying dynamics shift abruptly. Traditional Neural Stochastic Differential Equations (SDEs) typically assume smooth, continuous transitions and rely on restrictive latent priors, making them ill-suited for modeling "change points" or regime shifts. We present CP-SDEVAE, a framework that integrates explicit change point detection within a Variational Autoencoder (VAE) architecture. By relaxing the latent prior to the initial state and employing iterative optimization for change point locations, CP-SDEVAE effectively captures complex, non-stationary dynamics. Experimental results on financial and environmental datasets show that our model significantly outperforms existing baselines in both data generation and regime detection.
Introduction
Modeling non-stationary time series is critical for applications ranging from financial market analysis to environmental monitoring. In these domains, data often follow distinct regimes—for instance, the sudden volatility of the stock market during a global crisis compared to periods of stability. While Neural SDEs provide a powerful continuous-time framework for modeling stochastic processes, they often fail to adapt to sudden distribution shifts. This failure stems from two primary issues: the assumption of continuous drift and diffusion functions, and the imposition of a strict Wiener process prior on the entire latent path, which over-regularizes the model and prevents it from capturing "jagged" real-world transitions.
The CP-SDEVAE Framework
To address these limitations, we propose CP-SDEVAE. The model architecture consists of an encoder that maps input sequences to a latent initial state $z_0$, followed by a series of latent SDE solvers and decoders.
Flexible Latent Priors
Unlike standard LatentSDE models that enforce a prior over the entire stochastic path, CP-SDEVAE only requires a Gaussian prior on the initial state $z_0$. This relaxation allows the neural network to learn more expressive latent dynamics without being constrained to mimic simple Brownian motion.
Change Point Integration
The core of CP-SDEVAE is its ability to handle discrete regime shifts. The latent process is modeled as a sequence of SDEs, where each segment between change points is governed by its own set of drift and diffusion parameters.
Optimization and Detection
Training CP-SDEVAE involves an iterative process that alternates between optimizing model parameters and identifying change point locations:
- Parameter Optimization: Given fixed change points, the neural SDE parameters are updated to maximize a modified Evidence Lower Bound (ELBO). We introduce a Predictive Log-Likelihood Regularization term to prevent "noise underestimation," ensuring the diffusion term remains active and produces realistic stochasticity.
- Change Point Detection: Given a trained model, the most likely change points are estimated using either a Greedy Maximum Likelihood Estimation (MLE) or a Fast Sequential Likelihood Ratio Test (SLRT). Bootstrap Particle Filtering (BPF) is employed to provide unbiased likelihood estimates.
Experimental Evaluation
We evaluated CP-SDEVAE across several challenging datasets:
- Financial Data: Daily and intraday S&P 500 prices, and various cryptocurrency series. The model successfully identified the "COVID-19 crash" and generated synthetic price paths that closely matched real-world marginal distributions.
- Environmental Data: Air quality measurements from Beijing, where the model captured shifts in pollutant dynamics.
- Synthetic Data: A switching Ornstein-Uhlenbeck (OU) process, confirming the model's ability to recover ground-truth change points.
In comparative tests against baselines such as TimeGAN and SDEGAN, CP-SDEVAE demonstrated superior performance in terms of both statistical similarity and the "indistinguishability" of generated samples.
Conclusion
CP-SDEVAE offers a robust solution for modeling non-stationary time series by explicitly incorporating change points into a latent SDE framework. By combining flexible priors with iterative regime detection, the model provides both high-fidelity data generation and interpretable insights into underlying system shifts. Future work will explore differentiable change point modeling to automate the selection of the number of regimes.
Summary updated