Rich Time Series Classification Using Temporal Logic

Chanyeol Yoo, Călin Belta2017

Abstract

Time series classification is an important task in robotics that is often solved using supervised machine learning. However, classifier models are typically not 'readable' in the sense that humans cannot intuitively learn useful information about the relationship between inputs and outputs. In this paper, we address the problem of rich time series classification where we propose a novel framework for finding a temporal logic classifier specified in a human-readable form. The classifier is represented as a signal temporal logic (STL) formula that is expressive in capturing spatial, temporal and logical relations from a continuous-valued dataset over time. In the framework, we first find a set of representative logical formulas from the raw dataset, and then construct an STL classifier using a treebased clustering algorithm. We show that the framework runs in polynomial time and validate it using simulated examples where our framework is significantly more efficient than the closest existing framework (up to 920 times faster).

Introduction

In robotics and autonomous systems, classifying time series data—such as sensor logs or vehicle trajectories—is a fundamental task. While standard machine learning tools like Support Vector Machines (SVMs) or Neural Networks achieve high accuracy, they are often "black boxes." Their decision-making processes are represented as complex hyperplanes in high-dimensional space, offering little intuition to human operators. For instance, if a surveillance drone flags a vessel as "suspicious," a human supervisor needs to understand the underlying reasoning: is it due to speed, proximity to restricted zones, or erratic movement?

This research addresses the "rich" classification problem by developing a framework that produces expressive, human-readable, and computationally efficient classifiers using Signal Temporal Logic (STL).

Methodology

The proposed framework transforms raw time series data into logical formulas through a two-stage pipeline.

Overview of the two-stage classification framework, moving from raw signals to logical formulas.

1. Feature Extraction

The first stage identifies "Regions of Interest" (ROI) using a kernel function. These ROIs are multi-dimensional hyperrectangles where desired or undesired signals frequently appear. Continuous-valued signals are then converted into symbolic strings (signal formulas) based on their interaction with these ROIs. This process effectively compresses the dataset—by factors ranging from 40x to over 600x—into a discrete representation suitable for logical analysis.

2. Logical Clustering

The second stage employs a tree-based clustering algorithm. At each node, the algorithm searches for an STL formula—utilizing temporal operators like "Always" ($\mathcal{G}$) or "Eventually" ($\mathcal{F}$)—that best partitions the data into "desired" and "undesired" categories. A key innovation is a mathematical property allowing the misclassification rate of complex formulas to be calculated by summing the rates of individual components, avoiding redundant data scans and enabling massive computational speedups.

Experimental Evaluation

The framework was validated using two simulated benchmarks:

  • Naval Surveillance: 2,000 vessel trajectories entering a harbor, distinguishing between successful entries and anomalous behaviors.
  • Fuel Control System Self-Diagnosis: 1,200 engine sensor signals (EGO and MAP), identifying healthy vs. faulty states over 200 time units.

Results and Insights

The framework demonstrated exceptional performance, achieving a 920x speedup over state-of-the-art methods in the surveillance task (94 seconds vs. 24 hours). Despite the emphasis on readability, accuracy remained high, with misclassification rates as low as 0.029.

Visualization of vessel trajectories in the Naval Surveillance task, highlighting discovered Regions of Interest (a, b, c).

Beyond performance, the framework provides unique insights. In the surveillance task, it discovered a non-obvious temporal rule: vessels failing to visit a specific intermediate region ($b$) during a particular time window were likely to be anomalous. Such human-verifiable rules allow operators to use the classifier as a "rulebook" for future autonomous behavior.

Conclusion

This work demonstrates that readability in machine learning does not require a trade-off with efficiency or accuracy. By leveraging STL and efficient logical clustering, the framework provides a scalable solution for rich time series classification. Future work will focus on handling real-world sensor noise, extending the model for online incremental learning, and exploring unsupervised learning to discover new anomaly types without labeled data.

Summary updated

BibTeX
@misc{yoo2017rich,
  author = {Chanyeol Yoo and Călin Belta},
  title = {{Rich Time Series Classification Using Temporal Logic}},
  year = {2017},
  doi = {10.15607/rss.2017.xiii.060},
}
Figure