FedHARM: Harmonizing Model Architectural Diversity in Federated Learning

Anestis Kastellos, Athanasios Psaltis, Charalampos Z. Patrikakis, Petros DarasECCV 2024

Abstract

Standard Federated Learning (FL) algorithms like FedAvg require all participating clients to utilize identical model architectures to enable weight averaging. This constraint, known as "architectural rigidity," is a significant barrier in heterogeneous edge environments where devices have varying computational resources. We propose FedHARM, a novel FL framework that facilitates collaboration between diverse architectures (e.g., ResNet, EfficientNet, MobileNetV3). FedHARM shifts the aggregation paradigm from weight-based to representation-centric, utilizing gradient-based feature extraction and a small shared dataset for alignment. Our evaluations on CIFAR and MNIST benchmarks demonstrate that FedHARM significantly outperforms existing representation-learning FL methods, particularly in non-IID settings, while providing the flexibility needed for real-world deployment.

Introduction

Federated Learning (FL) has revolutionized decentralized machine learning by allowing models to be trained on local data without compromising privacy. However, the reliance on weight aggregation in traditional FL necessitates a "one-size-fits-all" model approach. In practice, a powerful server and a low-power IoT sensor cannot efficiently run the same model. Forcing architectural uniformity either wastes the server's capacity or overwhelms the sensor. FedHARM addresses this challenge by enabling "architectural diversity," allowing heterogeneous models to contribute to a global learning objective without being constrained to a single structural mold.

Methodology

The core innovation of FedHARM is Representation-Centric Aggregation, which focuses on harmonizing the internal representations of diverse models rather than their numerical weights.

The FedHARM framework architecture, illustrating the interaction between local nodes and the model-agnostic aggregation mechanism.

Gradient-Based Feature Extraction

Instead of relying on raw activation values, FedHARM identifies critical features by calculating the gradients of the predictive output with respect to intermediate feature maps. The features with the highest absolute gradients are considered the most influential for the model's decision-making. These are extracted to form a "descriptor" that represents the model's knowledge.

Visualization of gradient-based feature maps across ResNet, EfficientNet, and MobileNetV3, showing how different architectures focus on specific image regions.

Alignment and Aggregation

To create a common ground between different architectures, FedHARM utilizes a small, non-private shared dataset. At the central server, descriptors from all clients—regardless of their specific architecture—are averaged to create a "global representation" for each image in the shared set.

Local models are then updated using a dual-loss function:

  1. Supervised Loss (Cross-Entropy): Standard training on the client's private local data.
  2. Self-Supervised Loss (Cosine Similarity): Aligning the local model's descriptors with the global average descriptors on the shared dataset.

To handle varying model depths (e.g., ResNet's 4 blocks vs. EfficientNet's 7), a Block Alignment Strategy using KL-divergence and angular divergence analysis is employed to synchronize corresponding layers across architectures.

Experimental Results

FedHARM was validated using CIFAR-10, CIFAR-100, and MNIST benchmarks under both IID and non-IID (skewed) data distributions.

Performance Benchmarks

On CIFAR-10 with 5 clients, FedHARM achieved an accuracy of 83.87%, significantly outperforming other representation-learning methods such as FedCon (81.47%) and FedCA (71.25%). The framework demonstrated remarkable stability in highly non-IID scenarios (alpha=0.1), maintaining an accuracy of 82.91%.

Diversity as a Strength

A key insight from the experiments is that architectural diversity can be an asset. A "mixed" fleet of models (FedHARM_rem), combining ResNet, EfficientNet, and MobileNet, often outperformed homogeneous fleets. This suggests that the diverse perspectives of different architectures provide a form of "ensemble intelligence" that enhances the global model's robustness.

Conclusion and Future Work

FedHARM successfully breaks the architectural rigidity of traditional Federated Learning. By focusing on representation alignment through gradient-based extraction, it enables heterogeneous devices to collaborate effectively. While the requirement for a shared dataset and the computational cost of gradient calculation are noted limitations, the gains in flexibility and performance are substantial. Future research will focus on reducing the shared data requirement and investigating the security implications of shared representations in adversarial settings.

Summary updated

BibTeX
@inproceedings{kastellos2024fedharm,
  author = {Anestis Kastellos and Athanasios Psaltis and Charalampos Z. Patrikakis and Petros Daras},
  title = {{FedHARM: Harmonizing Model Architectural Diversity in Federated Learning}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73036-8\_3},
}
Figure