Time Series Segmentation through Automatic Feature Learning

Wei-Han Lee, Jorge Ortiz, Bongjun Ko, Ruby B. LeearXiv 2018 · OpenReview

Abstract

Internet of things (IoT) applications have become increasingly popular in recent years, with applications ranging from building energy monitoring to personal health tracking and activity recognition. In order to leverage these data, automatic knowledge extraction - whereby we map from observations to interpretable states and transitions - must be done at scale. As such, we have seen many recent IoT data sets include annotations with a human expert specifying states, recorded as a set of boundaries and associated labels in a data sequence. These data can be used to build automatic labeling algorithms that produce labels as an expert would. Here, we refer to human-specified boundaries as breakpoints. Traditional changepoint detection methods only look for statistically-detectable boundaries that are defined as abrupt variations in the generative parameters of a data sequence. However, we observe that breakpoints occur on more subtle boundaries that are non-trivial to detect with these statistical methods. In this work, we propose a new unsupervised approach, based on deep learning, that outperforms existing techniques and learns the more subtle, breakpoint boundaries with a high accuracy. Through extensive experiments on various real-world data sets - including human-activity sensing data, speech signals, and electroencephalogram (EEG) activity traces - we demonstrate the effectiveness of our algorithm for practical applications. Furthermore, we show that our approach achieves significantly better performance than previous methods.

Introduction

In the domain of IoT and wearable sensing, segmenting continuous data into meaningful states—such as distinguishing between "walking" and "standing"—is a critical task. Traditionally, this has been approached through changepoint detection, which identifies abrupt statistical shifts in signal parameters like mean or variance. However, a significant gap exists between these statistical changepoints and human-defined breakpoints. Human experts often annotate transitions based on subtle, high-level patterns that do not necessarily manifest as large spikes in variance. Existing methods often fail to capture these nuances because they rely on rigid parametric models or shallow, hand-crafted features. This work proposes an unsupervised deep learning approach to detect these subtle boundaries without requiring labeled training data for every new environment.

Methodology

The proposed pipeline utilizes automatic feature learning to move beyond manual engineering. The process involves four key stages:

  1. Data Preprocessing: The raw multi-channel time series is partitioned into a sequence of potentially overlapping windows.
  2. Automatic Feature Learning: At the core of the method is a Stacked Autoencoder (SAE). The SAE is trained to learn a compressed, non-linear representation of each window by minimizing reconstruction error. This allows the network to naturally capture the most representative latent features of the data's current state.
  3. Distance-Based Detection: Once transformed into the feature space, the algorithm calculates the Euclidean distance between the feature vectors of consecutive windows.
  4. Local Maxima Identification: A peak in the resulting distance curve indicates a significant shift in the underlying data structure. These local maxima are identified as detected breakpoints.
Architecture of the proposed unsupervised segmentation pipeline using stacked autoencoders.

The authors found that a two-layer hidden architecture provides a "sweet spot"—deep enough to capture complexity without vanishing the subtle differences necessary for segmentation.

Experimental Evaluation

The method was validated across four diverse real-world datasets:

  • Crowdsignal.io: Smartphone sensor data for activity recognition.
  • EEG Eye State: Continuous EEG measurements for detecting eye states.
  • UCI Human Activity Recognition (HAR): Smartphone data from 30 volunteers performing six different activities.
  • DCASE2016: Acoustic scene data containing various environments like offices and busy streets.

Results and Discussion

The proposed method demonstrated superior performance compared to traditional baselines, including Bayesian methods and the PELT (Pruned Exact Linear Time) algorithm.

Qualitative comparison of breakpoint detection: (a, b) Bayesian methods showing high false positive rates vs. (c) the proposed method aligning closely with ground truth.

Key findings include:

  • Accuracy: On the EEG dataset, the proposed method achieved a True Positive Rate (TPR) approximately 7x higher than Bayesian approaches at a fixed False Positive Rate (FPR) of 0.2.
  • Robustness: The approach maintained high performance across sampling rates ranging from 50Hz (accelerometer) to 44.1kHz (audio), whereas traditional methods showed significant performance variance.
  • Prediction Loss: Using a custom metric that combines temporal error and point-count ratios, the deep learning approach consistently outperformed all baselines.

Conclusion

This work highlights that human-labeled boundaries are often "statistically subtle," requiring deep features to capture latent temporal properties. While the method is robust, it remains sensitive to the window size hyperparameter, for which the authors provide a heuristic based on the segment size distribution. Future work will explore automated hyperparameter fine-tuning to create a fully autonomous segmentation system suitable for real-time edge deployment.

Summary updated

Abstract

Internet of things (IoT) applications have become increasingly popular in recent years, with applications ranging from building energy monitoring to personal health tracking and activity recognition. In order to leverage these data, automatic knowledge extraction - whereby we map from observations to interpretable states and transitions - must be done at scale. As such, we have seen many recent IoT data sets include annotations with a human expert specifying states, recorded as a set of boundaries and associated labels in a data sequence. These data can be used to build automatic labeling algorithms that produce labels as an expert would. Here, we refer to human-specified boundaries as breakpoints. Traditional changepoint detection methods only look for statistically-detectable boundaries that are defined as abrupt variations in the generative parameters of a data sequence. However, we observe that breakpoints occur on more subtle boundaries that are non-trivial to detect with these statistical methods. In this work, we propose a new unsupervised approach, based on deep learning, that outperforms existing techniques and learns the more subtle, breakpoint boundaries with a high accuracy. Through extensive experiments on various real-world data sets - including human-activity sensing data, speech signals, and electroencephalogram (EEG) activity traces - we demonstrate the effectiveness of our algorithm for practical applications. Furthermore, we show that our approach achieves significantly better performance than previous methods.
BibTeX
@misc{lee2018time,
  author = {Wei-Han Lee and Jorge Ortiz and Bongjun Ko and Ruby B. Lee},
  title = {{Time Series Segmentation through Automatic Feature Learning}},
  year = {2018},
  eprint = {1801.05394},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1801.05394},
}
Figure