Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Temporal Pooling in Consumer-Grade Wearable Human Activity Recognition: Robustness Evaluation under Signal Contamination

This repository implements the methodology proposed in the paper "Temporal Pooling in Consumer-Grade Wearable Human Activity Recognition: Robustness Evaluation under Signal Contamination".

Paper Overview

Abstract: In consumer wearable applications, Human Activity Recognition (HAR) systems frequently encounter abrupt signal variations caused by rapid behavioral shifts, which can degrade performance and lead to inconsistent user experience. However, evaluating model robustness in these transitional phases is challenging because natural transitions, despite their real-world representativeness, often suffer from inherent label ambiguity that precludes the precise ground truth required for structural benchmarking. To address this, we present a synthetic transition stress-test framework for rigorous robustness analysis. This protocol introduces controlled signal contamination to simulate severe activity mixtures, providing a label-noisefree diagnostic tool for the quantitative validation of temporal pooling mechanisms. Using this framework, we evaluate our proposed Temporal Pooling Attention (TPA) and its hybrid variant, Gated-TPA. Our experiments characterize the distinct roles of each pooling strategy: the proposed TPA acts as a specialized filter that consistently enhances robustness against intruder signals at contaminated boundaries, whereas standard Global Average Pooling (GAP) remains a competitive choice for synchronized, steady-state segments, a finding further supported by qualitative analysis of real-world transitions. These findings provide a practical guideline for designing robust consumer HAR systems, suggesting that adaptive pooling strategies can effectively contribute to maintaining robustness under the erratic usage patterns typical of real-world deployments.

Dataset

Requirements

torch==2.8.0
numpy==2.0.2
pandas==2.2.2
scikit-learn==1.6.1

To install all required packages:

pip install -r requirements.txt

Codebase Overview

  • models/tpa_module.py - Implementation of the core Temporal Prototype Attention (TPA) module.
  • models/cnn_tpa_models.py - CNN Backbone Models. This file defines the MultiPathCNN (a multi-scale temporal feature extractor) and three classification models based on a Backbone-Head Architecture: GAPModel (CNN+GAP), TPAModel (CNN+TPA), and GatedTPAModel (CNN+Gated-TPA).
  • models/lstm_tpa_models.py - LSTM Backbone Models. This file defines the BiLSTMBackbone (bidirectional LSTM) and the corresponding three classification models based on a Backbone-Head Architecture.
  • models/transformer_tpa_models.py - Transformer Backbone Models. This file defines the TransformerBackbone (Transformer Encoder with Positional Encoding) and the corresponding three classification models based on a Backbone-Head Architecture.
  • transition_generator.py - Synthetic Transition Augmentation. Implements the generation of activity transition windows by concatenating segments from two different classes ($X_A$ and $X_B$) based on specific mixing ratios (e.g., 0.1, 0.2)
  • perturbations.py - Data Perturbation. Provides various methods to apply synthetic variations to time-series data, including temporal scaling, additive Gaussian noise, bias drift, and multiplicative scale drift.

Citing this Repository

If you use this code in your research, please cite:

@article{Temporal Pooling in Consumer-Grade Wearable Human Activity Recognition: Robustness Evaluation under Signal Contamination,
  title = {Temporal Pooling in Consumer-Grade Wearable Human Activity Recognition: Robustness Evaluation under Signal Contamination},
  author={Dahyun Kang and Myung-Kyu Yi}
  journal={},
  volume={},
  Issue={},
  pages={},
  year={}
  publisher={}
}

Contact

For questions or issues, please contact:

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

This repository implements the methodology proposed in the paper "Temporal Pooling in Consumer-Grade Wearable Human Activity Recognition: Robustness Evaluation under Signal Contamination".

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages