Temporal Streaming Batch Principal Component Analysis for Time Series Classification

Enshuo Yan, Huachuan Wang, Weihao Xia · DOI

Abstract

In multivariate time series classification, current sequence analysis models often struggle with long-sequence data, exhibiting prolonged training times and decreased accuracy. This paper proposes Temporal Streaming Batch Principal Component Analysis (TSBPCA), a PCA-based compression and dimensionality reduction algorithm designed for streaming time series data. By continuously updating compact representations through time block updates, TSBPCA enhances the data representation capabilities of various sequence analysis models. Experimental results across five real-world datasets show that TSBPCA significantly improves classification accuracy and time efficiency, particularly as sequence length increases. On the longest sequence datasets, accuracy improved by approximately 7.2%, while execution time decreased by 49.5%.

The Challenge of Long Sequences

Modern deep learning architectures, such as Transformers and LSTMs, are highly effective for sequence modeling but face a significant "long-sequence tax." As the length of multivariate time series data increases, these models encounter two primary hurdles: explosive training times and a paradoxical drop in accuracy. The latter often occurs because models struggle to capture long-range dependencies or become overwhelmed by noise in high-dimensional feature spaces.

Figure 1: Performance degradation of standard LSTM and Transformer models as sequence length increases, showing rising time costs and declining accuracy.

Traditional dimensionality reduction techniques like standard PCA are often insufficient for this task because they treat data points as independent, ignoring the critical temporal context inherent in time series data.

Methodology: TSBPCA

The core contribution of this work is the Temporal Streaming Batch PCA (TSBPCA) algorithm. Unlike traditional PCA, which requires a global view of the dataset, TSBPCA processes data in sequential "time batches" to maintain temporal continuity.

Key Technical Features

  • Streaming Estimation: Utilizing a stochastic power method (inspired by Oja’s rule), the algorithm updates principal components incrementally. This avoids the prohibitive memory costs associated with calculating full covariance matrices for long sequences.
  • Temporal Weighting: TSBPCA employs a weighting scheme—$(j-1)/j$ for historical data and $1/j$ for new data—to ensure that the compact representation at any given time step is intrinsically linked to the preceding temporal context.
  • Forward Double Iteration: The algorithm performs a sequential pass to update a projection matrix ($Q$) and an eigenvalue matrix ($\Lambda$), creating a distilled representation that serves as a more efficient input for downstream neural networks.

Experimental Results

The researchers evaluated TSBPCA across five datasets from the UEA/UCR repository: UWaveGestureLibrary (UWave), Heartbeat (HB), SelfRegulationSCP1 (SR1), SelfRegulationSCP2 (SR2), and EthanolConcentration (EC). These datasets represent a variety of sequence lengths (300 to 1,800) and variable counts (3 to 61).

Figure 3: Comparison of classification accuracy (Acc) and training time (Time) between models using TSBPCA and those without PCA across multiple datasets and architectures.

As shown in the results table, TSBPCA consistently outperforms the "w/o PCA" baseline. Key findings include:

  • Efficiency Gains: On the longest datasets (SR2 and EC), execution time decreased by an average of 49.5%. LSTM models saw the most dramatic improvement, with a 62.15% average increase in time efficiency.
  • Accuracy Improvements: On these same long-sequence datasets, classification accuracy improved by approximately 7.2%.
  • Model Agnosticism: The method proved effective across diverse architectures, including LSTMs, Transformers, Informers, iTransformers, and TimesNet.

Discussion and Insights

A notable finding is the "longer is better" trend: TSBPCA becomes increasingly effective as sequence length grows. While standard models degrade on long sequences, TSBPCA provides a cleaner signal that helps models maintain or improve performance. Furthermore, the method showed a strong synergy with LSTMs; because LSTMs are designed for sequential data, the temporally aware compression of TSBPCA fits their architecture perfectly.

However, the authors noted that the number of principal components ($K$) must be carefully balanced. If $K$ is too high relative to the sample size, the PCA approximation can become unstable. Future work will focus on testing TSBPCA on even larger industrial datasets and optimizing the internal reconstruction mechanisms.

Conclusion

TSBPCA offers a robust solution for the challenges posed by long-sequence multivariate time series. By integrating streaming PCA with temporal weighting, it provides a "free lunch" of sorts—delivering higher classification accuracy with significantly reduced computational overhead across a wide range of modern deep learning models.

Summary updated

BibTeX
@misc{yan2024temporal,
  author = {Enshuo Yan and Huachuan Wang and Weihao Xia},
  title = {{Temporal Streaming Batch Principal Component Analysis for Time Series Classification}},
  year = {2024},
  eprint = {2410.20820},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.20820},
}
Figure