Abstract
Time series data often exhibit complex transitions between distinct regimes, driven by both internal states and temporal durations. We present the Recurrent Explicit Duration Switching Dynamical System (RED-SDS), a novel framework that integrates deep neural networks with explicit duration modeling. By utilizing recurrent state-to-switch connections and a hybrid inference mechanism, RED-SDS effectively captures state-dependent transitions while avoiding oversegmentation. Our evaluation across synthetic and real-world datasets demonstrates state-of-the-art performance in time series segmentation and competitive, interpretable forecasting.
Introduction
Real-world time series are frequently characterized by "regimes"—periods where the underlying dynamics follow a specific pattern. These transitions can be state-dependent, such as a physical system changing behavior upon reaching a boundary, or time-dependent, such as cyclical human activities.
Traditional State Space Models (SSMs) and Switching Dynamical Systems (SDS) often struggle to model both types of transitions simultaneously. Standard SDS models are typically "memoryless," assuming a constant probability of regime change regardless of the time spent in the current state. This often results in "oversegmentation," where the model rapidly flickers between states. Conversely, models focusing solely on duration cannot react to sudden, state-driven events. RED-SDS addresses this gap by providing a flexible, computationally efficient model capable of capturing both state and duration dependencies.
Methodology
The RED-SDS architecture is built upon three primary innovations designed to enhance flexibility and interpretability:
- Recurrent State-to-Switch Connections: Unlike traditional models where switches are independent of the latent state, RED-SDS allows the discrete "switch" variable to be directly influenced by the previous continuous "state." This "closed-loop" mechanism is essential for modeling systems where physical configurations trigger regime changes.
- Explicit Duration Modeling: The model incorporates an "increasing count" variable that tracks the duration of the active regime. This allows the system to learn non-random, persistent behaviors, such as the specific duration of a honeybee's "waggle" dance, preventing premature state transitions.
- Hybrid Inference: To maintain efficiency, RED-SDS employs a hybrid approach. A neural inference network (e.g., a bi-RNN or Transformer) approximates complex continuous states, while exact mathematical recursions (a forward-backward algorithm) are used for discrete switches and duration counts.
The model is trained by maximizing a Monte Carlo lower bound of the marginal log-likelihood. Temperature annealing is utilized during early training stages to encourage the exploration of different regimes.
Experimental Evaluation
The authors evaluated RED-SDS on segmentation and forecasting tasks using both synthetic and real-world data.
Segmentation Tasks
- Bouncing Ball: A synthetic univariate series where switches are purely state-dependent (triggered by boundaries).
- 3-mode System: A synthetic linear system with predefined duration distributions for each mode.
- Dancing Bees: A real-world dataset tracking honeybee trajectories. The task is to categorize movements into "waggle," "turn right," and "turn left."
In the Dancing Bees dataset, RED-SDS achieved a significant breakthrough. Previous models like SNLDS often failed because the "waggle" phase contains high-frequency noise that resembles state transitions. By learning that the waggle phase has a persistent duration, RED-SDS achieved 0.91 accuracy, compared to 0.63 for the previous state-of-the-art.
Forecasting Benchmarks
The model was also tested on five public benchmarks from the GluonTS library: Exchange, Solar, Electricity, Traffic, and Wiki. RED-SDS proved highly competitive, achieving the lowest Continuous Ranked Probability Score (CRPS) on the Exchange and Traffic datasets.
Discussion and Conclusion
A key advantage of RED-SDS is its interpretability. Unlike "black-box" neural forecasters, RED-SDS can explain its predictions by identifying active regimes (e.g., a "night-time" mode with lower variance). Furthermore, the model successfully recovered ground-truth duration distributions in synthetic tests, confirming its ability to learn the underlying temporal logic of the data.
Despite its strengths, the model requires careful tuning of duration hyperparameters ($d_{min}$ and $d_{max}$). Future research will explore incorporating domain-specific structures (like seasonality) and semi-supervised learning to leverage partial ground truth in real-world applications. In summary, RED-SDS offers a robust solution for complex time series analysis by bridging the gap between state-dependent and duration-aware switching models.
Summary updated