Ensembles of Deep LSTM Learners for Activity Recognition using Wearables

Yu Guan, Thomas PloetzarXiv 2017 · DOI

TL;DR

This paper introduces a robust ensemble framework for Human Activity Recognition (HAR) using deep Long Short Term Memory (LSTM) networks. By employing a novel "epoch-wise bagging" training strategy and combining diverse loss functions, the authors significantly improve recognition accuracy and robustness on noisy, imbalanced real-world wearable sensor data.

What Problem Does This Paper Address?

Human Activity Recognition (HAR) using wearables is moving away from manual feature engineering toward deep learning. However, real-world sensor data presents significant hurdles: it is often noisy, prone to sensor malfunctions, and highly imbalanced—where "background" or "NULL" activities dwarf the specific actions researchers want to track. While individual deep models like LSTMs are powerful, they can be sensitive to these data irregularities and prone to overfitting (high variance). The authors aim to bridge the gap between theoretical model performance and the messy reality of "in-the-wild" deployments.

Methods

The core of the approach is an ensemble of Deep LSTM networks. LSTMs are recurrent neural networks designed to capture long-term temporal dependencies in sequential data, making them ideal for sensor streams.

The internal structure of an LSTM unit, showing the gates that control information flow.

The authors introduce three key innovations to standard LSTM training:

  1. Epoch-wise Bagging: Instead of training multiple independent models from scratch (which is computationally expensive), they generate a new "base learner" at every training epoch. They randomize the mini-batch size, frame lengths, and starting positions for each epoch. This forces the model to see different "views" of the data, effectively creating a diverse ensemble within a single training run.
  2. Diverse Loss Functions: They train base learners using both standard Cross-Entropy (CE) loss and a custom F1-score loss. While CE is standard, F1-loss is specifically designed to handle class imbalance. Combining models trained with different objectives increases the ensemble's overall diversity and robustness.
  3. Score-Level Fusion: During inference, the system selects the $M$ best-performing models from the training epochs and averages their probability outputs to make a final sample-wise prediction.
Comparison of common deep learning architectures for HAR: (a) CNNs, (b) LSTMs, and (c) Hybrid CNN-LSTM models.

Datasets

The framework was evaluated on three standard HAR benchmarks:

  • Opportunity: A notoriously difficult dataset featuring domestic activities. It is highly imbalanced, with a dominant "NULL" class and significant sensor noise.
  • PAMAP2: Contains 12 daily living and sports activities. It is more scripted and balanced than Opportunity, with no NULL class.
  • Skoda: Records assembly-line worker activities in a car manufacturing environment. It is reasonably balanced but still contains a large background class.

Key Insights and Ideas

  • Variance Reduction is Crucial: Deep LSTMs are "strong learners" with low bias but high variance. The ensemble approach acts as a variance reduction technique, preventing the model from overfitting to specific noise patterns in the training data.
  • Randomization as a Feature: By intentionally randomizing window lengths and offsets during training, the authors avoid making hard (and often arbitrary) heuristic decisions about window sizes, leading to a more generalized model.
  • Synergy of Loss Functions: Interestingly, the F1-loss didn't significantly improve individual learners on its own. However, when ensembled with CE-trained models, it provided a unique "perspective" that helped the collective handle rare activities much better.
  • Sample-wise vs. Frame-wise: Unlike many previous works that predict activity for a whole "frame" or window, this model performs sample-wise prediction, which is more suitable for real-time applications like fall detection where every millisecond counts.

Key Results

The ensemble approach outperformed state-of-the-art (SOTA) methods across all three benchmarks:

  • Opportunity: Achieved a mean F1-score of 0.726, a significant jump from the previous SOTA of 0.684.
  • PAMAP2: Reached an F1-score of 0.854, improving upon the baseline of 0.838.
  • Skoda: Showed a modest but significant improvement to 0.924 (vs. 0.921).
  • The gains were most pronounced in the most challenging scenarios—specifically for rare activities in the highly imbalanced Opportunity dataset.

Limitations and Future Work

The primary limitation is the increased computational footprint. Running an ensemble of $M$ deep LSTMs requires more memory and processing power than a single model, which could be a barrier for low-power wearable devices. The authors suggest that future work could involve model pruning to compress the ensemble without losing its robustness. Additionally, while the study focused on offline validation, the sample-wise prediction nature of the framework makes it a prime candidate for future real-time, on-device activity recognition and prediction.

Summary updated

BibTeX
@misc{guan2017ensembles,
  author = {Yu Guan and Thomas Ploetz},
  title = {{Ensembles of Deep LSTM Learners for Activity Recognition using Wearables}},
  year = {2017},
  eprint = {1703.09370},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1703.09370},
}
Figure