Introduction
Human Activity Recognition (HAR) is evolving beyond smartphones and smartwatches toward "head-worn" wearables such as earbuds and smart glasses. These devices offer a unique, unobtrusive vantage point for health monitoring but introduce two major challenges: privacy and hardware heterogeneity. Traditional HAR requires uploading raw sensor data to a central server, posing significant privacy risks. Furthermore, real-world devices vary in hardware specifications; for instance, one user’s smart glasses might sample at 40Hz for high precision, while another’s earbuds might drop to 5Hz to conserve battery. Standard machine learning models usually require a fixed input size and frequency, making it difficult to train a single model across such a diverse fleet.
Methodology
To address these challenges, this research introduces a multi-frequency Federated Learning (FL) framework based on a modified Spectro-Temporal Residual Network (STResNet). The architecture employs a dual-pathway encoding strategy for every sensor channel: a temporal pathway using 1D CNNs and residual blocks to capture time-series patterns, and a spectral pathway that converts signals into spectrograms to capture frequency-domain features.
Key innovations in the framework include:
- Multi-Frequency Adaptation: Instead of forcing all data to a single rate, the system utilizes distinct encoders tailored to specific sampling frequencies. This allows the model to extract meaningful features regardless of whether the input is low-resolution (e.g., 5Hz) or high-resolution (e.g., 40Hz).
- Context Vector: To handle cases where a device might be missing certain sensors (e.g., no magnetometer), a "context vector" acts as a mask that zeros out activations from absent sensors, preventing the network from being confused by missing data.
- Federated Averaging: The framework implements Weighted Federated Averaging (FedAvg) using the Flower library, ensuring that local model updates are weighted by the number of samples each client contributed before being merged at the server.
Experimental Setup
The study evaluated the model on two specialized head-worn datasets:
- USI-HEAR: Data from 30 participants using eSense earbuds performing 7 activities such as eating, nodding, and speaking.
- OCOsense: Data from 24 participants using smart glasses performing 7 activities including sitting, standing, and walking.
Both datasets were originally sampled at 50Hz but were downsampled to simulate various "low-battery" (3Hz or 5Hz) and "full-power" (40Hz) scenarios.
Results and Key Insights
The Federated Learning approach achieved performance nearly identical to centralized training, proving that privacy does not have to come at the cost of utility. For the USI-HEAR dataset, the model reached approximately 70.0% accuracy in a decentralized setting. In specific tests, the multi-frequency model achieved an F1-score of ~65.5%, significantly surpassing single-frequency models which hovered around 59-62%.
Several key insights emerged from the experiments:
- Multi-Frequency Superiority: The multi-frequency model outperformed models trained on a single frequency. By allowing the global model to see all available data regardless of the rate, it learned more robust features that generalized better across the entire user base.
- Head-Worn Advantages: Head-worn sensors are superior at detecting subtle activities like speaking or eating compared to wrist-worn devices, which are often dominated by arm swings.
- Efficiency of Low Sampling Rates: Surprisingly, for many activities in the OCOsense dataset, downsampling to 5Hz resulted in a higher F1-score than the 40Hz scenario. This suggests that for head-based HAR, high-frequency noise might hinder the recognition of slower, deliberate movements.
Conclusion and Future Work
This paper demonstrates that a single global model can effectively learn from a fleet of heterogeneous head-worn devices while maintaining data privacy. While the model handles hardware differences well, it does not yet fully account for "statistical heterogeneity"—the individual differences in how people move. Future work will explore personalization through fine-tuning and semi-supervised learning to leverage the vast amounts of unlabeled sensor data collected by wearables in the wild.
Summary updated