Similarity Learning for Time Series Classification

Maria-Irina Nicolae, Éric Gaussier, Amaury Habrard, Marc SebbanarXiv 2016 · OpenReview

Abstract

Multivariate time series naturally exist in many fields, like energy, bioinformatics, signal processing, and finance. Most of these applications need to be able to compare these structured data. In this context, dynamic time warping (DTW) is probably the most common comparison measure. However, not much research effort has been put into improving it by learning. In this paper, we propose a novel method for learning similarities based on DTW, in order to improve time series classification. Making use of the uniform stability framework, we provide the first theoretical guarantees in the form of a generalization bound for linear classification. The experimental study shows that the proposed approach is efficient, while yielding sparse classifiers.

Introduction

Time series data—sequences of measurements recorded over time—are foundational to modern analytics in finance, medicine, and robotics. However, comparing these sequences is challenging due to variations in length, sampling frequency, and temporal shifts. The standard approach to address these temporal distortions is Dynamic Time Warping (DTW), which identifies an optimal alignment between two sequences.

Despite its popularity, standard DTW often assumes a uniform importance for all features. While metric learning is well-established for vector data, its application to time series comparison remains underdeveloped. Furthermore, existing time series metric learning methods often lack theoretical guarantees. This paper introduces Similarity Learning for Time Series (SLTS), bridging the gap between practical performance and theoretical rigor.

Methodology: Similarity Learning for Time Series (SLTS)

The proposed SLTS method learns a matrix $M$ that parameterizes a bilinear similarity function: $$K_M(A, B) \propto \text{Tr}(A \cdot M \cdot B^T \cdot Y_{AB})$$ where $Y_{AB}$ represents the alignment matrix derived from DTW.

Dynamic Time Warping (DTW) alignment path between two time series.

Theoretical Framework

Rather than requiring the similarity to be a traditional distance (which necessitates a Positive Semi-Definite matrix $M$), SLTS utilizes the $(\epsilon, \gamma, \tau)$-Good Framework. This broader approach only requires the similarity to be "good" enough to facilitate linear separation in a high-dimensional space.

To classify new instances, the model compares them against a set of "landmark" examples from the training data, transforming complex time series into vectors of similarity scores. A key contribution of this work is proving that the optimization algorithm is uniformly stable. This stability allows for the derivation of a formal generalization bound, providing mathematical assurance that the learned metric will perform reliably on unseen data.

Experimental Evaluation

The performance of SLTS was evaluated on several multivariate time series benchmarks from the UCI Machine Learning Repository:

  • Japanese Vowels: Speech recognition data.
  • Auslan: Australian Sign Language gestures.
  • Arabic Digits: Spoken digit recognition.
  • Robot Execution Failure (LP1-LP5): Sensor data from robotic failures.

Key Results and Insights

The experimental results demonstrate that SLTS consistently outperforms standard baselines and specialized state-of-the-art methods.

Comparison of classification accuracy across multiple datasets.
  • Superior Accuracy: SLTS achieved an average accuracy of 95.8%, surpassing standard SVMs (92.2%), 1-Nearest Neighbor (92.1%), and LDMLT (95.6%).
  • Sparsity and Efficiency: The model achieves peak performance using only a small fraction of training data as landmarks, resulting in a sparse and computationally efficient classifier.
  • Linear Separability: Learning the metric $M$ significantly enhances the linear separability of classes in the similarity space, validating the underlying theoretical framework.
  • Theoretical Convergence: The generalization bound converges at a rate of $1/\sqrt{m}$ (where $m$ is the sample size), aligning with the standards for robust machine learning algorithms.

Conclusion

SLTS provides a theoretically grounded and empirically effective method for similarity learning in multivariate time series. By optimizing the DTW framework through a learned metric, it achieves high accuracy and sparse classification. Future work may explore learning local metrics to capture transient temporal patterns and investigating alternative regularization techniques to further enhance model sparsity.

Summary updated

BibTeX
@misc{nicolae2016similarity,
  author = {Maria-Irina Nicolae and Éric Gaussier and Amaury Habrard and Marc Sebban},
  title = {{Similarity Learning for Time Series Classification}},
  year = {2016},
  eprint = {1610.04783},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1610.04783},
}
Figure