Time Series Clustering: Complex is Simpler!

Lei Li, B. Aditya Prakash

Overview

This paper introduces Complex-valued Linear Dynamical Systems (CLDS) as a powerful tool for time series clustering. By shifting from the real to the complex domain, the authors create a model that naturally handles time lags and joint temporal dynamics with a simpler, diagonal transition matrix. This approach outperforms traditional methods like Dynamic Time Warping (DTW) and Principal Component Analysis (PCA) by 1.5x to 5x on motion capture data.

The Challenge of Time Series Clustering

Clustering time series data—such as human motion capture, sensor readings, or financial indices—is notoriously difficult due to two primary factors:

  1. Temporal Dynamics: Unlike static data points, time series encode patterns that evolve over time. Two sequences might belong to the same category (e.g., "walking") but have slightly different underlying parameters or speeds.
  2. Time Lags (Shifts): Two identical motions might start at different times. Traditional Euclidean distance or PCA-based methods fail because they are highly sensitive to these temporal offsets.

Existing solutions come with significant trade-offs. Dynamic Time Warping (DTW) handles lags but is computationally expensive and often misses joint dynamics across multiple dimensions. PCA and Discrete Fourier Transforms (DFT) are faster but struggle with time-evolving patterns or non-integer frequency components. Real-valued Linear Dynamical Systems (LDS), like Kalman Filters, can model dynamics but are hard to interpret and do not handle lags gracefully.

Proposed Method: Complex-valued Linear Dynamical Systems (CLDS)

The authors propose CLDS, a state-space model where both the hidden states ($z$) and observations ($x$) are complex-valued.

Graphical model of the state-space representation used in CLDS, showing hidden states and observations.

The "Complex" Advantage

The core innovation is using complex numbers to represent the system. In the complex plane, a time shift is simply a phase rotation. By focusing on the magnitude of the learned parameters, the authors can extract features that are "lag-invariant"—meaning the starting point of the sequence no longer affects the clustering result.

Key Components

  • Diagonal Transition Matrix ($A$): Unlike real-valued LDS, which requires a dense transition matrix to capture oscillations, CLDS can use a simple diagonal matrix. Each diagonal element corresponds to a frequency component, making the model much easier to estimate and interpret.
  • Complex-Fit Algorithm: The authors developed a novel Expectation-Maximization (EM) algorithm specifically for the complex domain. It uses generalized partial derivatives (treating a complex variable and its conjugate as independent) to optimize the model parameters.
  • Feature Extraction: For clustering, the model uses the magnitude of the transmission matrix ($C$). This represents the "participation weight" or energy of specific hidden dynamics in the observed data. These weights are then fed into a standard k-means algorithm.

Key Insights and Advantages

  • Mathematical Elegance: Moving to complex numbers actually simplifies the underlying math. A complex-valued diagonal matrix can represent what would require a complex block-diagonal structure in the real-valued domain.
  • Lag Invariance: Because the magnitude of a complex number is independent of its phase, the "energy" of a motion component remains constant regardless of when the motion started. This solves the time shift problem without the heavy computational cost of DTW.
  • A Unifying Framework: The authors show that CLDS is a generalization of several popular methods. By constraining specific parameters, CLDS can degenerate into PCA, DFT, or Autoregressive (AR) models.
  • Frequency Precision: Unlike DFT, which is limited to a fixed basis of frequencies (integer multiples of the base frequency), CLDS can identify arbitrary, "near-by" frequencies. This makes it much more accurate for short or irregular sequences where standard DFT suffers from spectral leakage.
Spectrum comparison showing CLDS accurately capturing frequency components compared to standard DFT.

Experimental Results

The model was evaluated on real-world human motion capture data from the CMU Graphics Lab, specifically focusing on sequences of marker positions (MOCAPPOS) and joint angles (MOCAPANG) categorized into walking and running.

The authors used Conditional Entropy ($S$) to measure clustering quality, where a lower score indicates a result closer to the true ground-truth labels.

Method MOCAPPOS ($S$) MOCAPANG ($S$)
CLDS (Proposed) 0.3786 0.1015
DTW 0.5707 0.4229
DFT 0.6143 0.2538
PCA 0.6818 0.3635
Kalman Filter 0.6749 0.5239

CLDS consistently achieved the lowest entropy, providing a 1.5x to 5x improvement over well-known competitors. Qualitative scatter plots of the extracted features showed that CLDS created much tighter, more distinct clusters for walking versus running than any other method.

Limitations and Future Work

  • Noise Assumptions: The current model assumes complex-valued Gaussian noise. While the probabilistic framework could theoretically be extended to non-Gaussian noise, this remains unexplored.
  • Feature Selection: In the motion capture experiments, the authors manually selected significant markers (e.g., the right foot) based on domain expertise. Automating this feature selection process is a promising direction for future research.
  • Linearity: As a Linear Dynamical System, the model may struggle with highly non-linear transitions, though the authors argue that many complex motions can be successfully approximated as a combination of linear dynamics in the complex plane.

Summary updated

BibTeX
@inproceedings{li2011time,
  author = {Lei Li and B. Aditya Prakash},
  title = {{Time Series Clustering: Complex is Simpler!}},
  booktitle = {International Conference on Machine Learning},
  year = {2011},
}
Figure