Hierarchical Time–Frequency Transformer for Cross-Subject Wearable Inertial Sensor Human Activity Recognition

Wearable inertial-sensor-based human activity recognition (HAR) remains challenging because motion signals are non-stationary and exhibit substantial inter-subject variability. This work presents a hierarchical Transformer framework for cross-subject HAR and systematically investigates three design elements: Short-Time Fourier Transform (STFT)-based time–frequency representation, four-stage PVT-style hierarchical encoding with top–down multi-scale fusion, and optional ArcFace supervision. Experiments are conducted using the official subject-independent test split of UCI HAR and five-fold subject-grouped cross-validation on WISDM and UniMiB-SHAR. The WISDM raw stream contains 1,098,207 records and is segmented into 10,377 finite windows from all 36 subjects, while UniMiB-SHAR is decoded according to its axisblock storage layout. Five-seed experiments show that the ArcFace variant achieves 94.71% ± 0.22% accuracy on UCI HAR and 90.51% ± 0.61% on WISDM, whereas the Core variant achieves 69.53% ± 0.57% on UniMiB-SHAR. Relative to a compact 1DCNN, the proposed framework improves mean accuracy by 2.36 percentage points on WISDM and 7.40 percentage points on UniMiB-SHAR, with a 15.84-point macro-F1 improvement on UniMiB-SHAR. Strong 2D CNNs nevertheless retain higher absolute accuracy in some settings. Component ablations reveal that the contribution of STFT is dataset-dependent: it is nearly neutral on UCI HAR but improves mean accuracy by 5.36 and 8.27 percentage points on WISDM and UniMiB-SHAR, respectively. Feature-pyramid fusion provides a comparatively modest additional contribution, while ArcFace improves UCI HAR and WISDM but not UniMiB-SHAR. The proposed network requires approximately 381–420 million supported neural-network FLOPs, which is 9–24 times lower than those of the evaluated strong 2D backbones. Reducing the input resolution from 224 × 224 to 128 × 128 decreases the FLOP count by approximately 64% with only a 0.64-point accuracy reduction on UCI HAR. These results demonstrate a practical performance–complexity trade-off under cross-subject evaluation.

Authors

Institutions

Publication Details

Journal
International Journal of Pattern Recognition and Artificial Intelligence
Published
2026-12-02
DOI
https://doi.org/10.1142/s0218001426300018
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

Hierarchical Time–Frequency Transformer for Cross-Subject Wearable Inertial Sensor Human Activity Recognition

Junru Zhang, Hailong Rong
International Journal of Pattern Recognition and Artificial Intelligence
Context-Aware Activity Recognition Systems
article

Hierarchical Time–Frequency Transformer for Cross-Subject Wearable Inertial Sensor Human Activity Recognition

Junru Zhang, Hailong Rong
article en

Abstract

Wearable inertial-sensor-based human activity recognition (HAR) remains challenging because motion signals are non-stationary and exhibit substantial inter-subject variability. This work presents a hierarchical Transformer framework for cross-subject HAR and systematically investigates three design elements: Short-Time Fourier Transform (STFT)-based time–frequency representation, four-stage PVT-style hierarchical encoding with top–down multi-scale fusion, and optional ArcFace supervision. Experiments are conducted using the official subject-independent test split of UCI HAR and five-fold subject-grouped cross-validation on WISDM and UniMiB-SHAR. The WISDM raw stream contains 1,098,207 records and is segmented into 10,377 finite windows from all 36 subjects, while UniMiB-SHAR is decoded according to its axisblock storage layout. Five-seed experiments show that the ArcFace variant achieves 94.71% ± 0.22% accuracy on UCI HAR and 90.51% ± 0.61% on WISDM, whereas the Core variant achieves 69.53% ± 0.57% on UniMiB-SHAR. Relative to a compact 1DCNN, the proposed framework improves mean accuracy by 2.36 percentage points on WISDM and 7.40 percentage points on UniMiB-SHAR, with a 15.84-point macro-F1 improvement on UniMiB-SHAR. Strong 2D CNNs nevertheless retain higher absolute accuracy in some settings. Component ablations reveal that the contribution of STFT is dataset-dependent: it is nearly neutral on UCI HAR but improves mean accuracy by 5.36 and 8.27 percentage points on WISDM and UniMiB-SHAR, respectively. Feature-pyramid fusion provides a comparatively modest additional contribution, while ArcFace improves UCI HAR and WISDM but not UniMiB-SHAR. The proposed network requires approximately 381–420 million supported neural-network FLOPs, which is 9–24 times lower than those of the evaluated strong 2D backbones. Reducing the input resolution from 224 × 224 to 128 × 128 decreases the FLOP count by approximately 64% with only a 0.64-point accuracy reduction on UCI HAR. These results demonstrate a practical performance–complexity trade-off under cross-subject evaluation.

International Journal of Pattern Recognition and Artificial Intelligence
Twitter (United States) (US)
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