Hash-MMDC: Enhancing human activity recognition with hash-based optimization

Shi Cheng, Qiang Liu, Jie Wan · Journal of King Saud University - Computer and Information Sciences · 2025

Human Activity Recognition (HAR) is the task of automatically identifying and characterizing human behaviors from sensor or video observations. HAR is a vibrant field with significant practical importance. Recent advances in artificial intelligence and multimodal sensing have led to a surge in data scale and complexity, imposing higher demands on models’ discriminability and generalizability. Traditional machine learning relies on hand-crafted features and struggles to handle complex scenarios. Although deep learning enables automatic representation learning, it still faces bottlenecks in cross-scenario transfer as well as inference and storage overheads. To address these issues, we propose the Hash-MMDC method, which adopts a ResNet backbone and integrates attention-based feature selection to produce efficient, discriminative representations; in the hash embedding stage, we approximate the non-differentiable $$sgn$$ with a differentiable $$tanh$$ to obtain near-binary hash codes (e.g., $$+1, -1$$ ); furthermore, we maximize class-wise Maximum Mean Discrepancy (MMD) in the hash space to enhance inter-class separability and employ a self-updating center loss to reduce intra-class dispersion. We evaluate the proposed method on multiple benchmark HAR datasets (OPPORTUNITY, PAMAP2, WISDM, UniMiB_SHAR), and the results show that our approach outperforms mainstream baseline models in accuracy and exhibits robust generalization, demonstrating its potential for deployment in real-world IoT scenarios.

Read the paper · More papers on PaperTik