Federated Learning with Heterogeneous Architectures using Graph HyperNetworks

Or Litany, Haggai Maron, David Acuna, Jan Kautz, Gal Chechik, Sanja Fidler

Standard Federated Learning (FL) typically operates under a strict constraint: every participating client must utilize the exact same neural network architecture. This "one-size-fits-all" requirement poses a significant barrier in real-world scenarios where organizations may have proprietary models, hardware-specific constraints, or varying computational budgets. To address this, we introduce HAFL-GHN, a framework that leverages Graph HyperNetworks (GHNs) to enable collaborative learning across heterogeneous, undisclosed client architectures without compromising privacy.

The Problem: The Homogeneity Constraint

Traditional FL algorithms, such as FedAvg, rely on averaging model weights across clients. This mathematical operation is only possible if the weight matrices have identical dimensions and structures. However, in practice, a hospital might use a lightweight mobile model while a research center uses a massive ResNet. Furthermore, architectural details are often considered intellectual property. Existing solutions often require clients to reveal their architectures or rely on knowledge distillation with public datasets, which may not be available or representative of the sensitive local data.

Methodology: HAFL-GHN

The core innovation of HAFL-GHN is the use of a Graph HyperNetwork. Instead of training model weights directly, the system trains a secondary model—the GHN—that learns to generate weights for any given architecture.

Architecture as a Graph

In this framework, a client's model is treated as a computational graph. Nodes represent specific layers (e.g., a 3x3 convolution), and edges represent the data flow.

The GHN architecture maps a graph representation of a model to its predicted layer weights.

As shown in the figure above, the GHN consists of a Graph Neural Network (GNN) that processes the architecture's topology to produce node (layer) features. These features are then passed through per-layer-type Multi-Layer Perceptrons (MLPs) to generate the actual weights for that specific layer.

The Federated Loop

The training process follows a decentralized cycle:

  1. Distribution: The server broadcasts the current GHN parameters ($W$) to all clients.
  2. Weight Generation: Clients use the GHN to populate their unique local models with weights based on their specific architecture graphs.
  3. Local Update: Clients perform local training. Crucially, they update the GHN parameters themselves using their local data, rather than just updating the generated model weights.
  4. Aggregation: Clients send only the updated GHN parameters ($W^c$) back to the server, where they are averaged to form the new global GHN.
Overview of the HAFL-GHN framework showing the interaction between heterogeneous clients and the central GHN.

This approach ensures privacy, as the server never sees the clients' data or their specific model architectures—only the general-purpose GHN updates.

Experimental Evaluation

The framework was evaluated across diverse benchmarks, including CIFAR-10, CIFAR-100, and the NIH Chest X-ray dataset. The researchers simulated heterogeneity by designing four distinct architectures (Arch 0-3) with varying depths and connectivity patterns.

Key Results

  • Superior Performance in Data-Scarce Regimes: HAFL-GHN demonstrates remarkable robustness when local data is limited. On CIFAR-100 with only 6.25% of the data, it achieved 46.2% accuracy, significantly outperforming distillation-based methods (25.5%) and other hypernetwork baselines (14.3%).
  • Real-World Medical Utility: On the Chest X-ray dataset, HAFL-GHN consistently outperformed all baselines in Average AUC, highlighting its potential for cross-organizational medical AI where privacy and architectural diversity are paramount.
  • Zero-Shot Generalization: A GHN trained on a subset of architectures can provide high-quality weight initializations for entirely new, unseen architectures. This allows new participants to join the federation and achieve high performance almost immediately.

Conclusion and Future Work

HAFL-GHN effectively removes the architectural constraints of standard Federated Learning. By treating architectures as graphs and learning a universal weight generator, it enables knowledge sharing across diverse systems. While a small performance gap remains compared to an "upper bound" where all clients use the most powerful model, HAFL-GHN represents a significant step toward flexible, privacy-preserving collaborative AI. Future work will focus on expanding the GHN's vocabulary to include more complex operations like attention mechanisms and transformer blocks.

Summary updated

BibTeX
@inproceedings{litany2022federated,
  author = {Or Litany and Haggai Maron and David Acuna and Jan Kautz and Gal Chechik and Sanja Fidler},
  title = {{Federated Learning with Heterogeneous Architectures using Graph HyperNetworks}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=7x_47XJULn},
}
Figure