Related Experiment Video
Updated: Jun 27, 2026

06:37
Artificial Intelligence-Based System for Detecting Attention Levels in Students
Published on: December 15, 2023
DSHformer: Locality-Sensitive Hash Attention and Prototype Alignment for Sensor-Based Human Activity Recognition
Xiaofeng Zhang1, Muzi Ding1, Tangzhi Teng1
1School of Artificial Intelligence and Computer Science, Nantong University, Seyuan Campus, Nantong 226019, China.
Sensors (Basel, Switzerland)
|June 26, 2026
Summary
DSHformer enhances human activity recognition (HAR) by combining efficient attention mechanisms with prototype learning. This framework improves accuracy and generalization for sensor-based HAR systems on wearable devices.
Area of Science:
- Computer Science
- Machine Learning
- Signal Processing
Background:
- Sensor-based human activity recognition (HAR) is crucial for healthcare and wearables.
- Deep learning advances HAR, but distribution shifts and high computational complexity limit real-world use.
- Existing methods struggle with generalization across users/sensors and efficient long-sequence processing.
Purpose of the Study:
- To propose DSHformer, an accuracy-oriented HAR framework addressing generalization and efficiency.
- To combine compact channel-temporal encoding with locality-sensitive hashing (LSH)-based attention.
- To enable efficient and accurate HAR on resource-constrained wearable devices.
Main Methods:
- A low-parameter patch-based graph-attention encoder models sensor channel-temporal dynamics.
- A trainable prototype pool and decomposition network improve class separability via prototype alignment.
- A decomposition-stable LSH-based attention mechanism with O(LlogL) complexity is introduced for HAR.
Main Results:
- DSHformer achieved high accuracies on five benchmarks: WISDM (98.6%), UCI-HAR (93.7%), PAMAP2 (98.4%), Opportunity (88.5%), and UniMiB-SHAR (96.6%).
- The framework demonstrated competitive or superior performance against Transformer variants and HAR-specific baselines.
- Ablation studies confirmed the significant contribution of each DSHformer component.
Conclusions:
- DSHformer effectively addresses distribution shift and computational complexity in sensor-based HAR.
- The proposed LSH-based attention mechanism enables efficient long-sequence modeling.
- DSHformer offers a promising solution for real-world, resource-constrained HAR applications.

