Semi-supervised Federated Learning for Activity Recognition

Yuchen Zhao, Hanyang Liu, Honglin Li, Payam M. Barnaghi, Hamed HaddadiarXiv 2020

Abstract

Training deep learning models on in-home IoT sensory data is commonly used to recognise human activities. Recently, federated learning systems that use edge devices as clients to support local human activity recognition have emerged as a new paradigm to combine local (individual-level) and global (group-level) models. This approach provides better scalability and generalisability and also offers better privacy compared with the traditional centralised analysis and learning models. The assumption behind federated learning, however, relies on supervised learning on clients. This requires a large volume of labelled data, which is difficult to collect in uncontrolled IoT environments such as remote in-home monitoring. In this paper, we propose an activity recognition system that uses semi-supervised federated learning, wherein clients conduct unsupervised learning on autoencoders with unlabelled local data to learn general representations, and a cloud server conducts supervised learning on an activity classifier with labelled data. Our experimental results show that using a long short-term memory autoencoder and a Softmax classifier, the accuracy of our proposed system is higher than that of both centralised systems and semi-supervised federated learning using data augmentation. The accuracy is also comparable to that of supervised federated learning systems. Meanwhile, we demonstrate that our system can reduce the number of needed labels and the size of local models, and has faster local activity recognition speed than supervised federated learning does.

Introduction

Human Activity Recognition (HAR) using IoT sensors is a cornerstone of modern elderly care and health monitoring. While Federated Learning (FL) has emerged as a privacy-preserving solution by keeping raw data on-device, it faces a significant "labeling problem." Standard FL assumes that client data is pre-labeled, an unrealistic expectation for users in uncontrolled smart home environments. Existing semi-supervised approaches often rely on computationally intensive data augmentation to generate pseudo-labels, which can be inefficient for low-power IoT devices and often yield suboptimal accuracy.

Methodology

The proposed system addresses the labeling bottleneck through a split semi-supervised federated learning architecture.

Unsupervised Local Training

Edge devices perform unsupervised learning using Autoencoders (AEs). The primary objective of an AE is to compress input data into a latent representation ($h$) and subsequently reconstruct the original input ($X'$). This process allows the model to learn the fundamental structure of sensor data without requiring explicit labels.

Comparison of Fully Connected (a) and Convolutional (b) Autoencoder architectures.

The researchers evaluated three specific AE architectures: Fully Connected (FC), Convolutional (CNN), and Long Short-Term Memory (LSTM) autoencoders. The LSTM variant is specifically designed for time-series data, leveraging temporal dependencies to improve representation learning.

Internal structure of an LSTM cell, the building block for the robust LSTM-AE model.

Supervised Server-Side Training

A central server aggregates local autoencoder weights into a global model using the FedAvg algorithm. The server then utilizes a small, high-quality labelled dataset (e.g., from controlled lab studies) to train a Softmax classifier. This classifier operates on the latent representations generated by the global encoder.

Local Inference

Once trained, the global encoder and classifier are deployed back to the clients. This enables real-time, local activity recognition using the compressed representations, which reduces mathematical overhead and speeds up inference on edge devices.

Experimental Evaluation

The system was benchmarked against three standard HAR datasets: Opportunity (Opp) (kitchen activities), Daphnet Freezing of Gait (DG) (Parkinson’s disease), and PAMAP2 (household and exercise activities).

Key Results and Insights

  • Performance: The LSTM-FC model outperformed centralized supervised baselines and semi-supervised systems using data augmentation.
  • Efficiency: The system achieved accuracy comparable to fully supervised FL while using significantly fewer labels. Furthermore, inference on a Raspberry Pi 4 was faster than standard supervised FL due to the reduced dimensionality of the latent representations.
  • Robustness: LSTM-autoencoders proved more resilient to variations in label ratios compared to CNN-based models, making them ideal for time-series sensor data.
  • Privacy and Scalability: By decoupling local training from specific classification tasks, the framework allows for task-agnostic edge training and improved privacy, as the server does not require user-generated labels.

Conclusion

This research demonstrates that semi-supervised federated learning using autoencoders effectively bridges the gap between privacy-preserving FL and the practical challenges of data labeling in IoT. Future work will explore fully unsupervised FL systems, potentially using mathematical distance metrics between local and global models to detect health anomalies without any labeled data.

Summary updated

BibTeX
@misc{zhao2020semi,
  author = {Yuchen Zhao and Hanyang Liu and Honglin Li and Payam M. Barnaghi and Hamed Haddadi},
  title = {{Semi-supervised Federated Learning for Activity Recognition}},
  year = {2020},
  eprint = {2011.00851},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.00851},
}
Figure