Learning Interpretable Shapelets for Time Series Classification through Adversarial Regularization

Yichang Wang, Rémi Emonet, Élisa Fromont, Simon Malinowski, Etienne Menager, Loïc Mosser, Romain TavenardarXiv 2019

Abstract

Time Series Classification (TSC) is a vital task in domains ranging from healthcare to finance. While deep learning models offer high accuracy, they often function as "black boxes," providing little insight into their decision-making process. This paper introduces AI↔PR-CNN, a novel framework that learns "shapelets"—discriminative sub-sequences—that are both highly accurate and visually interpretable. By employing adversarial regularization, the model constrains convolutional filters to resemble real-world data patterns. Our results demonstrate that AI↔PR-CNN achieves state-of-the-art performance while providing human-readable explanations for its classifications.

Introduction

The challenge in Time Series Classification has long been the trade-off between interpretability and efficiency. Traditional search-based methods extract shapelets directly from raw data, ensuring they are physically meaningful, but these methods are computationally prohibitive for large datasets. Conversely, learning-based methods use gradient descent to optimize filters in a CNN. While fast, these learned filters often appear as abstract noise, making it impossible for experts to verify the model's logic. AI↔PR-CNN addresses this by forcing learned filters to maintain the "style" of real data through an adversarial training process.

Methodology: Adversarial Input↔Parameter Regularization

The core of the AI↔PR-CNN is a dual-network architecture designed to balance classification performance with visual fidelity.

The AI↔PR-CNN architecture, showing the interaction between the Classifier and the Discriminator to regularize shapelet parameters.

The framework consists of:

  • The Classifier: A CNN where the convolution filters are treated as shapelets. It is trained to minimize classification error.
  • The Discriminator: Based on the Wasserstein GAN (WGAN) framework, the discriminator is trained to distinguish between real training sub-sequences and the synthetic filters (shapelets) learned by the classifier.

This adversarial setup acts as a parameter regularization mechanism. During training, the shapelets are updated not only to improve accuracy but also to "fool" the discriminator, effectively constraining them to resemble actual segments of the time series data.

Experimental Results

The researchers evaluated AI↔PR-CNN on 85 univariate datasets from the UCR/UEA archive. The model achieved an average accuracy of 0.76, nearly identical to the 0.77 achieved by the non-interpretable "Learning Shapelets" (LS) baseline.

Visual Interpretability

The primary advantage of AI↔PR-CNN is the qualitative clarity of its learned features. As shown in the comparison below, the adversarial regularization ensures that shapelets map directly to physical features of the data.

Learned shapelets (colored lines) from the AI↔PR-CNN model closely follow the physical contours of the underlying time series data (dashed lines).

Without this adversarial constraint, learned filters typically devolve into jagged noise that lacks physical meaning. By enforcing interpretability, AI↔PR-CNN allows researchers to generate 2D embeddings that clearly illustrate how specific wave patterns or "dips" differentiate various classes.

Computational Efficiency

AI↔PR-CNN offers a significant speed advantage over traditional search-based methods. For instance, on the ElectricDevices dataset, where exhaustive search failed to complete within 48 hours, AI↔PR-CNN reached a solution in just 142 minutes.

Conclusion

AI↔PR-CNN successfully bridges the gap between deep learning performance and shapelet-based interpretability. While the adversarial training adds some hyperparameter complexity and a minor "interpretability tax" on accuracy in certain cases, the benefit of human-readable models is substantial for high-stakes applications. Future work will focus on extending this regularization technique to multivariate time series and automating the selection of the optimal number of shapelets.

Summary updated

BibTeX
@misc{wang2019learning,
  author = {Yichang Wang and Rémi Emonet and Élisa Fromont and Simon Malinowski and Etienne Menager and Loïc Mosser and Romain Tavenard},
  title = {{Learning Interpretable Shapelets for Time Series Classification through Adversarial Regularization}},
  year = {2019},
  eprint = {1906.00917},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.00917},
}
Figure