Energy Efficient Streaming Time Series Classification with Attentive Power Iteration

Hao Huang, Tapan Shah, Scott Evans, Shinjae YooAAAI 2024 · OpenReview

Introduction

The proliferation of edge devices, such as smart routers, smartphones, and industrial controllers, has led to an explosion of high-frequency time series data. Traditionally, this data is offloaded to the cloud for analysis, raising significant privacy concerns and consuming substantial bandwidth. However, performing real-time classification directly on these resource-constrained devices is challenging. Standard deep learning architectures like Long Short-Term Memory (LSTM) networks or Transformers are often too memory-intensive and power-hungry for tiny processors.

Furthermore, Recurrent Neural Networks (RNNs) frequently suffer from "catastrophic forgetting," where information from the beginning of a long sequence is lost as new data arrives. Most models also require the entire sequence to be available before a reliable prediction can be made. To address these limitations, we propose strAPI (streaming Attentive Power Iteration), a framework designed for efficient, real-time decision-making on the edge.

Methodology: The strAPI Framework

The core innovation of strAPI is the replacement of traditional recurrence with a matrix sketching technique. Instead of maintaining a complex hidden state, the model creates a compact, updatable summary of the data stream that retains its essential characteristics.

Architecture Components

  1. Temporal Convolutional Network (TCN): This serves as the initial feature extractor, capturing local nonlinear patterns within the raw signal.
  2. Continuous Augmented Positional Embeddings (CAPE): These embeddings inject necessary temporal order information into the data stream.
  3. Attentive Power Iteration (API): This is the central mechanism of the model. API functions as an incremental version of Principal Component Analysis (PCA). Unlike standard unsupervised PCA, API incorporates an attention mechanism to weight incoming data batches. This allows the model to dynamically prioritize the most informative parts of the time series for inclusion in the "sketch" (the latent representation $U$).
Visualization of the sketching process. (a) Standard PCA representation. (b) Attentive Power Iteration (API) where specific data points are weighted by importance. (c) Incremental updates of the latent representation sketch over time steps t=1, 2, and 3.

As shown in the figure above, the API mechanism (b) focuses on "signature" components of the signal compared to standard PCA (a). The incremental nature of the process (c) ensures that the internal sketch is updated as each new data point arrives, requiring only a single pass over the data and minimal storage.

Experimental Evaluation

The strAPI model was evaluated against five diverse public benchmarks to test its robustness across different signal types:

  • Google-13: Audio keyword spotting.
  • DSA-19: Daily and sports activity sensor data.
  • HAR-6: Smartphone-based human activity recognition.
  • Handwriting: Smartwatch motion data during alphabet writing.
  • Epilepsy: Bio-medical brain disorder recognition.

Key Results and Insights

The experimental results demonstrate that strAPI significantly outperforms traditional benchmarks in both efficiency and accuracy.

Energy and Computational Efficiency

strAPI achieved a 70% reduction in energy consumption compared to LSTMs and was 30–48% more efficient than Shallow RNNs (SRNNs). Computationally, it required only about 20% of the Multiply-Accumulate operations (MACs) of an LSTM, making it highly suitable for low-power hardware. Task completion was also found to be three times faster than LSTM-based approaches.

Accuracy and Early Classification

On long-sequence datasets like Handwriting, strAPI improved accuracy by 45% over baselines. This is attributed to its ability to maintain a weighted summary of the entire stream, effectively solving the catastrophic forgetting problem. Notably, strAPI enables early classification; on the Epilepsy dataset, it reached over 87% accuracy by the second batch of data, well before the full sequence was processed.

Conclusion

By shifting from recurrence to attentive matrix sketching, strAPI provides a scalable solution for real-time time series classification on edge devices. It offers a superior balance of accuracy, speed, and energy efficiency. Future work will focus on addressing "concept drift," where data patterns change over time, and adapting the model for dynamic pattern recognition where class labels might shift mid-stream.

Summary updated

Abstract

Efficiently processing time series data streams in real-time on resource-constrained devices offers significant advantages in terms of enhanced computational energy efficiency and reduced time-related risks. We introduce an innovative streaming time series classification network that utilizes attentive power iteration, enabling real-time processing on resource-constrained devices. Our model continuously updates a compact representation of the entire time series, enhancing classification accuracy while conserving energy and processing time. Notably, it excels in streaming scenarios without requiring complete time series access, enabling swift decisions. Experimental results show that our approach excels in classification accuracy and energy efficiency, with over 70% less consumption and threefold faster task completion than benchmarks. This work advances real-time responsiveness, energy conservation, and operational effectiveness for constrained devices, contributing to optimizing various applications.
BibTeX
@inproceedings{huang2024energy,
  author = {Hao Huang and Tapan Shah and Scott Evans and Shinjae Yoo},
  title = {{Energy Efficient Streaming Time Series Classification with Attentive Power Iteration}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=IZjQ60CoZZ},
}
Figure