An Algorithm for Learning Switched Linear Dynamics from Data

Guillaume O. Berger, Monal Narasimhamurthy, Kandai Watanabe, Morteza Lahijanian, Sriram SankaranarayananNeurIPS 2022

Learning the dynamics of switched linear systems from data is a notoriously NP-hard problem. Standard exact methods scale exponentially with the size of the dataset, making them impractical for real-world applications. This paper introduces a novel algorithm that scales linearly with the number of data points by reformulating the problem with a "tolerance gap" and leveraging cutting-plane techniques from convex optimization to efficiently prune the search space.

The Challenge of System Identification

Switched linear dynamical systems (SLDS) are used to model complex behaviors that transition between multiple simpler linear modes. They are ubiquitous in robotics (e.g., a robot leg making and breaking contact with the ground) and cyber-physical systems.

The core challenge is system identification: given a sequence of state observations, how do we figure out the underlying linear matrices for each mode without knowing the latent "switching signal" (i.e., which mode was active at which time)?

Traditionally, this is framed as a Mixed-Integer Linear Programming (MILP) problem. However, because the algorithm must guess the active mode for every single data point, the time complexity scales exponentially with the number of data points ($N$). Since real-world datasets often contain thousands of points, standard MILP solvers quickly choke, making exact identification computationally intractable.

A New Approach: The "Tolerance Gap"

The authors bypass the exponential dependence on $N$ by introducing a "relaxed" problem formulation called SLS-ID-GAP.

Instead of asking the algorithm to fit the data to a single, strict error tolerance $\epsilon$, they provide two tolerances: a lower bound $\epsilon_1$ and an upper bound $\epsilon_2$. The algorithm guarantees finding a solution within the upper tolerance if the data could theoretically be modeled within the lower tolerance.

This "gap" ($\epsilon_{gap} = \epsilon_2 - \epsilon_1$) enables a highly efficient tree-based exploration algorithm:

  1. Polyhedra Tracking: The algorithm maintains a set of convex polyhedra representing the space of all possible matrices for each mode.
  2. Iterative Slicing: It picks a data point that isn't fitted by the "center" (Chebyshev center or Maximum Volume Inscribed Ellipsoid) of the current polyhedra. It then branches, assigning that point to each possible mode, which adds a new linear constraint (a "cut") to the respective polyhedron.
  3. Volume Contraction: Using a classic cutting-plane argument from non-smooth optimization, the authors prove that each cut shrinks the volume of the polyhedron by a constant factor.
  4. Guaranteed Termination: Because of the tolerance gap, a valid solution space has a known minimum volume. Once a polyhedron shrinks below this volume, the branch is pruned. This bounds the maximum depth of the search tree, completely decoupling the tree depth from the dataset size $N$.

Key Results

The authors evaluated their approach on a mix of synthetic microbenchmarks and real-world datasets, including human handwriting trajectories and simulated mechanical systems (Acrobot and Cartpole).

Massive Speedups for Large Data On synthetic benchmarks, as the number of data points ($N$) increased to $10^4$, the standard Gurobi MILP solver experienced exponential slowdowns (taking over 150 seconds or timing out). In contrast, the proposed algorithm's runtime remained virtually flat, solving the same problems in under a second. While the algorithm remains exponential in the state dimension ($n$) and the number of modes ($m$), these are typically much smaller than $N$.

Scaling behavior of the proposed Tree Search (TS) algorithm vs. MILP.

Higher Accuracy than Heuristics Compared to the popular approximate method $k$-Linear Regression ($k$LR), the proposed approach achieved significantly smaller one-step prediction errors on held-out test data. Unlike greedy algorithms that can get stuck in local optima, this geometric approach provides rigorous theoretical guarantees about finding a valid model.

Performance comparison between the proposed approach and k-Linear Regression.

Real-World Applicability In the handwriting dataset, the algorithm successfully segmented continuous letters into logical, distinct strokes (modes) without human labeling. These modes were then successfully used to train a Jump Markov Model for letter prediction. In the Acrobot and Cartpole environments, the algorithm successfully approximated the infinite-mode continuous-time hybrid systems into three highly accurate discrete linear modes.

Limitations and Future Work

While highly effective, the current method assumes the full state is observable. Extending it to output-only observations using SARX models is possible but exponentially increases the number of required modes. Furthermore, the algorithm identifies the dynamics of the modes but does not inherently learn the "generator" (e.g., the Markov chain or physical boundaries) that dictates when the system switches modes.

Future work will explore incorporating advanced branch-and-bound heuristics (like those used in commercial MILP solvers) to further improve performance, as well as backtracking techniques to generate multiple "dissimilar" solutions that fit the data, helping identify models that make the most physical sense.

Summary updated

BibTeX
@inproceedings{berger2022algorithm,
  author = {Guillaume O. Berger and Monal Narasimhamurthy and Kandai Watanabe and Morteza Lahijanian and Sriram Sankaranarayanan},
  title = {{An Algorithm for Learning Switched Linear Dynamics from Data}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=XaydL1nHO4},
}

Loading related content...

Figure