H-BiLSTM-GAT: A Lightweight Hierarchical Spatio-temporal Framework for Human Activity Recognition in IoT-enabled Smart Homes
Abstract
Human Activity Recognition (HAR) in smart homes requires modeling dynamic, context-dependent spatio-temporal relations under strict IoT edge-gateway constraints. Existing hybrid architectures treat temporal context and spatial topology as independent streams, preventing temporal context from modulating spatial attention as activities progress, while their computational overhead limits deployment in real-world Ambient Assisted Living systems. This paper presents H-BiLSTM-GAT, a modular, edge-deployable spatio-temporal framework for ambient HAR. Its core contribution is a lightweight contextual guidance mechanism: a hierarchical Bidirectional LSTM encoder injects a learned scalar gate into the node embeddings of a Graph Attention Network (GAT) over a physically-grounded static graph. This feature-level modulation enables dynamic spatial weighting without the cost of dynamic graph reconstruction. Evaluated on six CASAS benchmark datasets with automated hyperparameter optimization (Optuna) and 95% confidence intervals, the framework achieves weighted F1-scores of 95.8% on Milan and 90.7% on the multi-resident Cairo dataset. An ablation study across four architectural variants shows the Simple GAT (M2) is optimal in three of six scenarios (Aruba: 0.946 ± 0.009), while the Contextual GAT (M3) yields significant gains on high-volatility datasets (Kyoto7: 0.884 ± 0.013). Gate-value analysis shows a complete separation between gate-active and gate-inactive datasets (Mann–Whitney test, p = 0.10), consistent with the gate reflecting dataset temporal complexity without explicit supervision. TFLite INT8 quantization reduces model footprints to 0.38–1.13 MB with inference latencies of 5.6–21.3 ms, confirming practical IoT gateway deployability.
