NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning trajectory patterns by clustering: Experimental studies and comparative evaluation

Brendan Morris, Mohan M. TrivediCVPR 2009

Introduction

Trajectory clustering is a fundamental task in automated surveillance and traffic analysis, where "typical" activities—such as a vehicle making a left turn or a pedestrian navigating an office—are represented as sequences of (x, y) coordinates over time. By grouping similar paths using unsupervised learning, researchers can build models of normal behavior and detect anomalies. Despite its importance, the field has historically lacked a "gold standard" for evaluation, with new distance measures and clustering algorithms frequently proposed without rigorous head-to-head comparisons. This study addresses this gap by systematically evaluating various combinations of techniques across diverse real-world and simulated datasets.

Methodology

The researchers decomposed the clustering problem into two primary components: distance measures (similarity functions) and clustering algorithms.

Distance Measures

The study evaluated six measures categorized by their handling of temporal data:

  • Fixed-length measures: Average Euclidean distance (HU) and Principal Component Analysis (PCA). These require trajectories to be resampled to a uniform length, which can discard critical speed information.
  • Time-normalized/Alignment measures: Dynamic Time Warping (DTW) and Longest Common Subsequence (LCSS). These are robust to variations in speed and can compare paths of differing lengths.
  • Trajectory-specific measures: The Piciarelli and Foresti (PF) measure, which uses a sliding window, and the Modified Hausdorff (MODH) distance, which preserves temporal ordering.

Clustering Algorithms

Seven algorithms were tested, including direct methods like k-means and Fuzzy C-Means (FCM), hierarchical approaches (Agglomerative and Divisive), and advanced techniques such as Spectral clustering and the hybrid Chameleon algorithm. Performance was quantified using the Correct Clustering Rate (CCR), comparing algorithmic output against human-labeled ground truth via the Hungarian algorithm.

Datasets and Experimental Setup

The evaluation utilized six datasets representing a spectrum of complexity:

  • i5SIM (1, 2, and 3): Simulated highway data. Notably, i5SIM3 introduces a "speed trap" where trajectories in the same lane must be distinguished by velocity (free-flow vs. congestion).
  • i5: Real-world highway data captured from a fixed camera.
  • CROSS: A complex four-way intersection involving 19 distinct maneuvers, including U-turns.
  • LABOMNI: Indoor human trajectories characterized by high overlap and unconstrained motion.
Trajectory clustering results across diverse environments: (a) simulated highway, (b) real-world highway, (c) complex intersection, and (d) indoor human movement.

Key Insights

The most significant finding of the study is that the choice of distance measure is far more critical than the specific clustering algorithm. A sophisticated algorithm cannot compensate for a similarity function that discards essential information. For instance, on the speed-sensitive i5SIM3 dataset, measures like HU and PCA failed (CCR ~0.57) because they ignore timing, whereas DTW and LCSS maintained near-perfect accuracy (>0.99).

LCSS emerged as the most robust measure overall. Its ability to ignore outliers and noise—common in tracking data—makes it a superior choice for real-world applications. Additionally, Fuzzy C-Means consistently outperformed standard k-means by approximately 6%, suggesting that "soft" cluster membership aids the optimization process in finding better global solutions.

Performance and Sensitivity

While advanced methods like Spectral clustering are highly effective, they exhibit significant sensitivity to hyperparameters. Specifically, the neighborhood parameter (sigma) used in the similarity matrix can drastically alter the Correct Clustering Rate. Without careful tuning, the performance of even the best algorithms can drop significantly.

Impact of neighborhood parameter on spectral clustering performance.

Conclusion

This comparative study demonstrates that for trajectory clustering, the definition of "similarity" is the primary driver of performance. While LCSS and DTW offer the highest accuracy, they come with higher computational costs compared to PCA-based methods. Future research should focus on balancing this accuracy with real-time performance requirements and developing more robust methods for online (streaming) trajectory clustering.

Summary updated

BibTeX
@inproceedings{morris2009learning,
  author = {Brendan Morris and Mohan M. Trivedi},
  title = {{Learning trajectory patterns by clustering: Experimental studies and comparative evaluation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2009},
  doi = {10.1109/cvpr.2009.5206559},
}
Figure