Federated Self-Supervised Learning in Heterogeneous Settings: Limits of a Baseline Approach on HAR

Sannara Ek, Romain Rombourg, François Portet, Philippe Lalanda

Introduction

As machine learning for mobile sensing shifts from controlled laboratory environments to the "messy" reality of user-owned devices, privacy and data labeling become paramount challenges. Federated Learning (FL) has emerged as a leading paradigm for training models on sensitive smartphone sensor data without centralizing raw information. However, the efficacy of FL in Human Activity Recognition (HAR) is often hampered by two factors: the scarcity of user-provided labels and the inherent heterogeneity of hardware and user behavior. This paper investigates the limits of a baseline Federated Self-Supervised Learning (FSSL) approach, utilizing simple Autoencoders (AE) and the FedAvg algorithm to bridge the labeling gap in non-IID (not identically and independently distributed) environments.

The Problem: Labeling and Heterogeneity

Traditional HAR models rely on supervised learning, which assumes that data is both labeled and uniformly distributed. In practice, mobile users rarely label their daily activities, leaving vast amounts of sensor data unexploited. Furthermore, real-world data is highly heterogeneous; variations in device models, sensor calibrations, and physical placement (e.g., pocket vs. chest) create a complex, non-IID landscape that standard FL algorithms struggle to navigate.

The researchers ask a fundamental question: Can a baseline FSSL pipeline, specifically using Autoencoders for feature extraction, effectively learn robust representations from unlabelled, heterogeneous sensor data?

Methodology

To establish a reference point for future FSSL research, the authors implemented a two-phase pipeline:

  1. Unsupervised Phase: A lightweight Autoencoder (AE) was deployed across 80 simulated clients. The encoder utilized four 1D-convolutional layers to compress sensor signals into a 128-neuron latent space, while the decoder attempted signal reconstruction. The model was trained using FedAvg for 200 communication rounds, where the central server averaged the weights of local models.
  2. Supervised Phase: Following the unsupervised training, the global encoder was frozen. A classification layer was attached, and the model was fine-tuned using a small, non-private labeled dataset to evaluate the quality of the learned features.

Dataset Composition

To simulate realistic heterogeneity, the study combined four major public HAR datasets into a single benchmark:

  • UCI: 5 clients representing a clean, controlled baseline.
  • HHAR (Heterogeneity HAR): 51 clients using diverse smartphone and smartwatch models.
  • REALWORLD: 15 clients with devices in varying positions (waist, chest, etc.).
  • SHL (Sussex-Huawei Locomotion): 9 clients providing massive datasets focused on transportation modes.

This combination resulted in a challenging 13-class classification task, ranging from simple movements like walking to complex transportation modes like riding a bus or subway.

Key Insights and Limitations

1. The "Drowning" Effect

FedAvg weights updates based on the volume of data provided by each client. In this study, the massive SHL dataset effectively "drowned out" the smaller, more specialized datasets like UCI and HHAR. This led to a global model that was heavily biased toward the characteristics of the SHL data, resulting in poor generalization across the more diverse client subsets.

2. Latent Space Misalignment

When training Autoencoders independently on heterogeneous data, different clients may learn to map identical activities to different regions or "directions" in the latent space. When FedAvg naively averages these weights, the features can effectively cancel each other out. This "orientation problem" results in a "blurry" global model that lacks the discriminative power necessary for high-accuracy classification.

3. Locomotion vs. Transport

The model struggled significantly with distinguishing between various transport modes (e.g., Bus vs. Train). Unlike walking or running, which have distinct rhythmic patterns, transportation modes primarily produce vibrations. The simple AE architecture proved insufficient to capture the subtle nuances required to differentiate these activities from "Standing."

Results and Performance

The experimental results highlight the significant gap between current FSSL baselines and supervised alternatives:

  • FSSL Performance: The FL + Autoencoder approach achieved a 71.29% F-score.
  • Supervised Comparison: A standard supervised model trained on only 20% of the data outperformed the FSSL approach, achieving 71.96%.
  • The AE Penalty: Interestingly, adding an Autoencoder to a centralized supervised approach actually decreased performance to 69.04%, suggesting that simple reconstruction-based AEs may not be powerful enough to model complex sensor heterogeneity.
  • Communication Cost: The 200-round training process required approximately 76 MB of data transfer per client. While feasible for modern smartphones, this may be prohibitive for low-power IoT devices.

Conclusion and Future Work

The study concludes that simply "plugging in" an Autoencoder and FedAvg is insufficient for real-world HAR. The authors suggest several paths forward to overcome these limits:

  • Advanced SSL Frameworks: Moving from simple reconstruction to contrastive learning frameworks like SimCLR, CPC, or MoCo to learn more robust features.
  • Sophisticated Aggregation: Developing aggregation methods that can align disparate latent spaces or preserve local specializations rather than simple weight averaging.
  • Context Preservation: Re-evaluating normalization techniques (like z-normalization) that may inadvertently strip away vital contextual information, such as the magnitude of gravity, which helps distinguish between orientations.

This work serves as a critical wake-up call for the field, emphasizing that the path to effective Federated Self-Supervised Learning requires addressing the fundamental complexities of data heterogeneity and architecture strength.

Summary updated

BibTeX
@inproceedings{ek2022federated,
  author = {Sannara Ek and Romain Rombourg and François Portet and Philippe Lalanda},
  title = {{Federated Self-Supervised Learning in Heterogeneous Settings: Limits of a Baseline Approach on HAR}},
  booktitle = {PerCom Workshops},
  year = {2022},
}
Figure