EdgeHAR: An Edge-Native Compact Sensor Foundation Model for Human Activity Recognition
Organizations: Northwestern Polytechnical University Xi’an, Shaanxi, China · RPTU University Kaiserslautern-Landau Kaiserslautern, Rheinland Pfalz, Germany · Xi’an University of Technology Xi’an, Shaanxi, China
Abstract
Sensor-based human activity recognition (HAR) is fundamental to ubiquitous and wearable computing, yet existing foundation models are largely designed for cloud-scale deployment and struggle with real-world sensing shifts, including unseen users, devices, sampling rates, and sensor placements. We present EdgeHAR, an edge-native compact sensor foundation model designed for wearable intelligence. Unlike conventional models that entangle activity knowledge with acquisition variations, EdgeHAR learns transferable representations by factorizing sensor signals into three latent codes: an (i)Activity-Semantic Code capturing reusable activity knowledge, a (ii)Motion-Dynamics Code modeling temporal patterns, and an (iii)Acquisition-Context Code representing sensor-specific variations. This disentangled design enables efficient adaptation to new users, devices, placements, and activity classes with limited target-domain data. By incorporating lightweight adaptation modules, EdgeHAR achieves foundation-model-level transferability while satisfying edge constraints in computation, memory, latency, and privacy. Experiments across heterogeneous HAR datasets demonstrate that EdgeHAR maintains competitive recognition performance under distribution shifts with substantially reduced deployment cost. EdgeHAR establishes a practical paradigm for compact, edge-first foundation models for ubiquitous sensing systems.
Figures & tables
| Dataset | Subjects | Sensors | Position | Rate | Classes |
|---|---|---|---|---|---|
| HHAR ( Stisen et al., 2015 ) | 9 | acc+gyro | Multiple | 50 HZ | 6 |
| MotionSense ( Malekzadeh et al., 2019 ) | 24 | acc+gyro | 50 HZ | 6 | |
| UCI-HAR ( Reyes-Ortiz et al., 2016 ) | 30 | acc+gyro | Waist | 50 HZ | 6 |
| Shoaib ( Shoaib et al., 2014 ) | 10 | acc+gyro+mag | Multiple | 50 HZ | 7 |
| PAMAP2 ( Reiss and Stricker, 2012 ) | 9 | acc+gyro+mag | Multiple | 100 HZ | 18 |
| Source | Target | SDMix | Contrast -Sense | CrossHAR | OUR-ZS | OUR-FS |
|---|---|---|---|---|---|---|
| S+M+H | UCI | 75.38 | 79.43 | 88.71 | 62.85 | 92.15 |
| U+S+H | Motion | 64.16 | 53.20 | 76.12 | 54.23 | 88.68 |
| H+U+M | Shoaib | 70.11 | 63.83 | 73.52 | 58.62 | 86.28 |
| S+U+M | HHAR | 71.10 | 71.75 | 74.36 | 47.12 | 92.45 |
| Source | Target | Transformer | UniHAR | LLM4HAR | OUR-ZS | OUR-FS |
|---|---|---|---|---|---|---|
| UCI | Shoaib | 25.99 | 69.90 | 74.98 | 63.32 | 90.70 |
| Motion | 35.64 | 76.08 | 87.09 | 62.45 | 88.23 | |
| HHAR | 44.52 | 75.43 | 85.75 | 61.08 | 96.08 | |
| Motion | UCI | 39.36 | 69.05 | 89.44 | 67.96 | 93.09 |
| Shoaib | 44.26 | 78.71 | 73.70 | 77.64 | 93.01 | |
| HHAR | 42.97 | 58.33 | 75.21 | 79.68 | 97.53 |
| Method | UCI | Motion | HHAR | Avg. |
|---|---|---|---|---|
| SDMix | 90.33 | 75.48 | 77.44 | 81.08 |
| ContrastSense | 93.33 | 83.13 | 87.66 | 88.04 |
| DI2SDiff | 87.68 | 88.43 | 89.19 | 88.43 |
| OUR-ZS | 86.19 | 85.42 | 88.97 | 86.86 |
| OUR-FS | 91.88 | 93.17 | 94.89 | 93.31 |
| Source | Target | Mixup | ContrastSense | DI2SDiff | OUR-ZS | OUR-FS |
|---|---|---|---|---|---|---|
| B+P+W | Arm | 40.17 | 70.81 | 74.14 | 6.00 | 95.71 |
| A+P+W | Belt | 39.87 | 68.06 | 68.71 | 19.90 | 88.29 |
| A+B+W | 47.01 | 71.48 | 72.36 | 69.25 | 90.19 | |
| A+B+P | Wrist | 41.12 | 75.54 | 77.11 | 42.09 | 91.59 |
| Model | Params(M) | Size(MB) | CPU(ms) | Memory(MB) |
|---|---|---|---|---|
| GPT-2 Small | 160.0 | 400.0 | 1028.0 | – |
| LLMHAR | 8.0 | 46 | 104.5 | – |
| CNN | 6.45 | 25.805 | 2.14 | 51.05 |
| DeepConvLSTM | 0.46 | 1.85 | 40.90 | 10.16 |
| HART | 1.45 | 5.91 | 5.38 | 12.74 |
| MobileHART | 2.54 | 10.35 | 13.49 | 20.77 |
| Emerging Activity | K=20 | K=50 | K=100 |
|---|---|---|---|
| Lying back | 0.0022 | 0.6674 | 0.8611 |
| Walking parking lot | 0.3260 | 0.8871 | 0.9899 |
| Cycling bike horizontal | 0.0596 | 0.3849 | 0.9413 |
| Playing basketball | 0.2471 | 0.6147 | 0.8786 |
| Macro-F1 | 0.1627 | 0.7487 | 0.9186 |
| Overall Accuracy | 0.2382 | 0.7574 | 0.9190 |