TransAct: efficient attention-based temporal modelling for real-time wearable human activity recognition

Wearable sensors have made Human Activity Recognition (HAR) via intelligent healthcare and assisted living systems very efficient by enabling the quick processing of multivariate time-series streams of data. We propose a novel framework known as TransAct that utilizes a Transformer-based architecture for the computationally efficient temporal modeling of wearable sensor signals. TransAct is designed to capture long-range dependencies among sensor-derived features by leveraging optimized input projection, learnable positional encodings, and multi-headed self-attention mechanisms. We construct a hybrid CNN-LSTM architecture as a matched comparator, applying identical preprocessing and training configuration to both models, and evaluate both across five independent random seeds on three public benchmarks: UCI HAR, PAMAP2, and OPPORTUNITY. On UCI HAR, TransAct shows a higher held-out test accuracy than the CNN-LSTM baseline ( \(95.10\% \pm 0.37\%\) vs. \(94.26\% \pm 0.55\%\) ), a borderline-significant advantage by a paired t -test ( \(p=0.050\) ) that does not reach significance under the non-parametric Wilcoxon signed-rank test ( \(p=0.125\) ). On PAMAP2, where the input is genuine chronologically-ordered raw inertial signal rather than UCI HAR’s reshaped engineered-feature vector, the advantage is larger and more clearly significant ( \(86.13\% \pm 0.68\%\) vs. \(82.75\% \pm 1.70\%\) ; \(p=0.012\) ). On OPPORTUNITY, a severely class-imbalanced 18-class gesture-recognition benchmark, overall accuracy is statistically indistinguishable between the two models ( \(88.48\% \pm 3.54\%\) vs. \(89.01\% \pm 2.64\%\) ; \(p=0.452\) ), but TransAct achieves significantly higher macro-F1 ( \(54.15\% \pm 9.17\%\) vs. \(51.55\% \pm 9.04\%\) ; \(p=0.030\) ), the more informative metric under severe class imbalance since it does not let performance on the dominant “Null” class dominate the score. A multi-seed ablation study on UCI HAR finds no statistically detectable contribution from any of the three architectural components tested individually – positional encoding, multi-head (vs. single-head) attention, and layer normalization all leave accuracy statistically indistinguishable from the full model ( \(p>0.9\) in every case). TransAct is consistently and significantly slower than the CNN-LSTM baseline across all three datasets: on a T4 GPU, mean epoch time and per-sample inference latency are both roughly 2–3 \(\times\) higher for TransAct than for CNN-LSTM ( \(p<0.0001\) throughout), consistent with TransAct’s larger parameter count. Taken together, these results support a specific and dataset-dependent conclusion: attention-based modeling of engineered or raw wearable-sensor sequences yields a real, reproducible accuracy or macro-F1 advantage over a matched recurrent baseline on two of the three benchmarks tested, most clearly on genuine time-series input, but this advantage is not universal (it does not appear in OPPORTUNITY’s overall accuracy), and it always comes at a genuine, non-trivial, and consistent computational cost. We report these results, including the null and negative findings, alongside the accuracy gains, and discuss what remains to be established (probability-calibrated discrimination curves, a resolved discrepancy in our OPPORTUNITY channel count, and a mechanistic account of the ablation null results) before broader claims of efficiency or component-level necessity can be supported.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-11-22
DOI
https://doi.org/10.1038/s41598-026-80279-6
Primary Topic
Context-Aware Activity Recognition Systems
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

TransAct: efficient attention-based temporal modelling for real-time wearable human activity recognition

Anusha Nalajala, Bhavya Raja Gopal Yarlagadda, Arjun Pramod, Inturi Anitha Rani et al.
Scientific Reports
Context-Aware Activity Recognition Systems
article

TransAct: efficient attention-based temporal modelling for real-time wearable human activity recognition

Anusha Nalajala, Bhavya Raja Gopal Yarlagadda, Arjun Pramod, Inturi Anitha Rani, Sirivella Rajesh
article en

Abstract

Wearable sensors have made Human Activity Recognition (HAR) via intelligent healthcare and assisted living systems very efficient by enabling the quick processing of multivariate time-series streams of data. We propose a novel framework known as TransAct that utilizes a Transformer-based architecture for the computationally efficient temporal modeling of wearable sensor signals. TransAct is designed to capture long-range dependencies among sensor-derived features by leveraging optimized input projection, learnable positional encodings, and multi-headed self-attention mechanisms. We construct a hybrid CNN-LSTM architecture as a matched comparator, applying identical preprocessing and training configuration to both models, and evaluate both across five independent random seeds on three public benchmarks: UCI HAR, PAMAP2, and OPPORTUNITY. On UCI HAR, TransAct shows a higher held-out test accuracy than the CNN-LSTM baseline ( \(95.10\% \pm 0.37\%\) vs. \(94.26\% \pm 0.55\%\) ), a borderline-significant advantage by a paired t -test ( \(p=0.050\) ) that does not reach significance under the non-parametric Wilcoxon signed-rank test ( \(p=0.125\) ). On PAMAP2, where the input is genuine chronologically-ordered raw inertial signal rather than UCI HAR’s reshaped engineered-feature vector, the advantage is larger and more clearly significant ( \(86.13\% \pm 0.68\%\) vs. \(82.75\% \pm 1.70\%\) ; \(p=0.012\) ). On OPPORTUNITY, a severely class-imbalanced 18-class gesture-recognition benchmark, overall accuracy is statistically indistinguishable between the two models ( \(88.48\% \pm 3.54\%\) vs. \(89.01\% \pm 2.64\%\) ; \(p=0.452\) ), but TransAct achieves significantly higher macro-F1 ( \(54.15\% \pm 9.17\%\) vs. \(51.55\% \pm 9.04\%\) ; \(p=0.030\) ), the more informative metric under severe class imbalance since it does not let performance on the dominant “Null” class dominate the score. A multi-seed ablation study on UCI HAR finds no statistically detectable contribution from any of the three architectural components tested individually – positional encoding, multi-head (vs. single-head) attention, and layer normalization all leave accuracy statistically indistinguishable from the full model ( \(p>0.9\) in every case). TransAct is consistently and significantly slower than the CNN-LSTM baseline across all three datasets: on a T4 GPU, mean epoch time and per-sample inference latency are both roughly 2–3 \(\times\) higher for TransAct than for CNN-LSTM ( \(p<0.0001\) throughout), consistent with TransAct’s larger parameter count. Taken together, these results support a specific and dataset-dependent conclusion: attention-based modeling of engineered or raw wearable-sensor sequences yields a real, reproducible accuracy or macro-F1 advantage over a matched recurrent baseline on two of the three benchmarks tested, most clearly on genuine time-series input, but this advantage is not universal (it does not appear in OPPORTUNITY’s overall accuracy), and it always comes at a genuine, non-trivial, and consistent computational cost. We report these results, including the null and negative findings, alongside the accuracy gains, and discuss what remains to be established (probability-calibrated discrimination curves, a resolved discrepancy in our OPPORTUNITY channel count, and a mechanistic account of the ablation null results) before broader claims of efficiency or component-level necessity can be supported.

Scientific Reports
Medical University of South Carolina (US), SRM University, Andhra Pradesh (IN)
Context-Aware Activity Recognition Systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon