Abstract: Many natural systems, such as neurons firing in the brain or basketball teams traversing a court, give rise to time series data with complex, nonlinear dynamics. We can gain insight into these systems by decomposing the data into segments that are each explained by simpler dynamic units. Building on switching linear dynamical systems (SLDS), we develop a model class and Bayesian inference algorithms that not only discover these dynamical units but also, by learning how transition probabilities depend on observations or continuous latent states, explain their switching behavior. Our key innovation is to design these recurrent SLDS models to enable recent Pólya-gamma auxiliary variable techniques and thus make approximate Bayesian learning and inference in these models easy, fast, and scalable.
Introduction
Modeling complex, non-linear time series data is a fundamental challenge in fields ranging from neuroscience to sports analytics. While Switching Linear Dynamical Systems (SLDS) provide a framework for decomposing non-linear motion into a sequence of simpler linear regimes, they often fail to capture the "recurrency" inherent in many natural systems. In a standard SLDS, transitions between discrete states are typically modeled as a Markov process, independent of the system's continuous state. However, in real-world scenarios, transitions are often triggered by the system reaching specific regions of its state space—for example, a basketball player switching from "dribbling" to "shooting" upon reaching the paint.
The rSLDS Framework
To address this limitation, this paper introduces the Recurrent Switching Linear Dynamical System (rSLDS). The key innovation is making the discrete state transition probabilities dependent on the current continuous latent state, effectively "closing the loop" between continuous dynamics and discrete switching.
In the rSLDS, the continuous state space is partitioned into regions, each associated with a different linear dynamical mode. The model uses a stick-breaking logistic regression to define these state-dependent transition probabilities. This effectively creates "fences" in the continuous space; crossing these boundaries triggers a change in the discrete behavioral mode.
Efficient Inference via Pólya-Gamma Augmentation
A significant hurdle in state-dependent models is the resulting non-conjugacy, which typically makes Bayesian inference computationally expensive and difficult to scale. The authors overcome this by leveraging Pólya-gamma auxiliary variable augmentation. By introducing these auxiliary variables, the non-linear logistic transition likelihoods are transformed into a conditionally Gaussian form. This allows for the use of efficient, modular Bayesian tools, such as Kalman filtering and Gibbs sampling, enabling joint sampling of continuous states in $O(T)$ time. This breakthrough makes the rSLDS scalable to large datasets that were previously inaccessible.
Experimental Evaluation
The authors demonstrate the effectiveness of the rSLDS across three diverse datasets:
- Synthetic NASCAR: In this 2D toy example, the rSLDS successfully learns to switch between "straightaway" and "turning" dynamics based on the car's position, allowing it to generate realistic, periodic oval trajectories.
- Lorenz Attractor: Modeling a 3D chaotic system with high-dimensional binary observations, the rSLDS correctly identifies the attractor's two "wings" as distinct states. It significantly outperforms standard SLDS in predicting the duration the system remains in a particular region (192 steps predicted vs. 215 true steps, compared to 91 steps for standard SLDS).
- NBA Player Trajectories: Analyzing over 250,000 time steps of player tracking data, the model discovered 30 interpretable dynamical states. It achieved higher holdout log-likelihoods than standard models and provided spatial "usage maps" that highlight individual player tendencies, such as Ray Allen's preference for corner-three positions.
Conclusion
The rSLDS framework provides a powerful and interpretable approach to modeling non-linear dynamics by closing the loop between continuous states and discrete transitions. By combining state-dependent switching with efficient Pólya-gamma-based inference, the model offers a scalable solution for discovering the underlying structure of complex time series data. Future work includes extending the model to multi-agent interactions and applying it to large-scale multi-neuronal recordings.
Summary updated