Skip to main content
Back to timeline
PLoS ONESource publication:

Wearable activity recognition drops the fixed-channel input layer: one weight set spans four datasets, 99.23% on PAMAP2

Synopsis

Wearable activity recognition has been tied to a fixed sensor channel count, so moving to a new dataset meant redesigning the input layer. UniHAR projects heterogeneous sensor layouts into a shared feature space through channel-agnostic per-channel descriptors, then tokenizes at three temporal scales and mixes each scale with FFT-based filtering. One backbone reaches 96.35%, 94.45%, 96.44% and 99.23% accuracy on UCI-HAR, Opportunity, Daphnet and PAMAP2 with 0.7–0.9M parameters.

Source-provided article image: UniHAR: A unified hierarchical transformer with multi-scale temporal modeling for wearable human activity recognition.
PubMed

Interpretation

A wearable activity recognition model no longer binds to one sensor channel count, and one parameter set carries across datasets. Earlier convolutional and recurrent models used channel-count-dependent input layers, so a change in channel count required retraining or structural modification. Across UCI-HAR, Opportunity, Daphnet and PAMAP2, UniHAR reaches 96.35%, 94.45%, 96.44% and 99.23% accuracy within a 0.7–0.9M parameter footprint.

The network first compresses each sensor channel into a fixed-length descriptor, then a scorer shared across all datasets softly assigns channels to groups whose features are concatenated and fused. This universal channel harmonization replaces the channel-count-dependent weight matrix, so the input layer is no longer reset per dataset. In zero-shot transfer over six activities shared by UCI-HAR and PAMAP2, UCH reaches target macro-F1 of 69.9% (UCI-HAR to PAMAP2) and 77.6% (PAMAP2 to UCI-HAR), above channel-mean aggregation at 62.1% and 71.1%.

Time is cut into fine, medium and coarse patches whose sizes follow the physical sampling rate, and each encoder block mixes within a scale by FFT before cross-scale attention. A single fixed temporal resolution forces fine gestures and whole-body postural transitions into the same scale. Removing multi-scale patch embedding lowers Opportunity accuracy from 94.45% to 85.89% and UCI-HAR from 96.35% to 92.24%.

Perspective

The demonstrated scope is subject-independent evaluation on four wearable IMU benchmarks plus zero-shot transfer over six activities shared by UCI-HAR and PAMAP2; latency was measured on a desktop CPU and a single A100.

Channel-count generalization relies on zero-padding to the largest channel count seen in training, an approximation rather than a guarantee; inter-scale message passing is fixed coarse-to-fine and a bidirectional scheme was not implemented; zero-shot target macro-F1 remains 22–26 points below source-domain performance.