Architecture Agnostic Federated Learning for Neural Networks

Disha Makhija, Xing Han, Nhat Ho, Joydeep Ghosh

Abstract

With growing concerns regarding data privacy and the rapid increase in data volume, Federated Learning (FL) has become an important learning paradigm. However, jointly learning a deep neural network model in an FL setting proves to be a non-trivial task because of the complexities associated with neural networks, such as varied architectures across clients, permutation invariance of neurons, and non-linear transformations. This work introduces a novel Federated Heterogeneous Neural Networks (FedHeNN) framework that allows each client to build a personalized model without enforcing a common architecture. This allows each client to optimize with respect to local data and compute constraints while benefiting from the learnings of other clients. The key idea of FedHeNN is to use instance-level representations obtained from peer clients to guide simultaneous training. Experimental results demonstrate that FedHeNN learns better-performing models in both homogeneous and heterogeneous architecture settings.

Introduction

Standard Federated Learning (FL) algorithms, such as FedAvg, operate on a rigid assumption: every client must use the exact same neural network architecture. This requirement exists because these algorithms rely on averaging model weights. In real-world scenarios, this is a significant bottleneck; a powerful server can handle a massive ResNet, but a tiny edge sensor cannot. Forcing a global model either excludes low-power devices or under-utilizes high-power ones. Furthermore, neural networks are permutation invariant—two models might learn the same logic but store it in different neuron orders, making direct weight averaging mathematically sub-optimal.

Methodology

FedHeNN shifts the focus from averaging weights to aligning representations. The framework views a neural network as two distinct parts: a representation learner (the bulk of the layers) and a task-specific head (the final layer).

Neural network architecture split into representation and prediction layers for alignment.

To synchronize these models, the server maintains a small, unlabeled Representation Alignment Dataset (RAD). During each training round, clients pass the RAD through their local models to generate activations. Instead of just minimizing local classification error, clients add a proximal term to their loss function using Centered Kernel Alignment (CKA). CKA measures the distance between the client's local representations and a global average representation provided by the server. Because CKA is invariant to scaling and orthogonal transformations, it can effectively compare knowledge across networks with different widths, depths, or neuron orderings.

Experimental Results

The framework was evaluated using standard non-IID FL benchmarks, including CIFAR-10, CIFAR-100, and Sentiment140. In homogeneous settings where all clients share an architecture, FedHeNN significantly outperformed baselines. For instance, on CIFAR-10 with 2 classes per client, FedHeNN achieved 68.8% accuracy compared to FedAvg’s 44.29%.

Performance comparison of FedHeNN Global against standard federated learning baselines across various datasets.

In heterogeneous settings, FedHeNN allowed a mix of five different CNN architectures to train together, outperforming personalization baselines like FedRep. The system proved remarkably robust; even when client data was reduced by 50%, FedHeNN maintained stable performance. Additionally, the RAD requirement is relatively small (approximately 5,000 samples), ensuring it does not overwhelm device memory or communication bandwidth.

Conclusion and Future Work

FedHeNN demonstrates that sharing how models perceive data is a powerful alternative to sharing model weights. By bypassing the permutation invariance problem, it enables true architectural flexibility in federated systems. Future research will explore using generative models to create the RAD on the fly and extending the framework to attention-based architectures like Transformers.

Summary updated

Abstract

With growing concerns regarding data privacy and rapid increase in data volume, Federated Learning(FL) has become an important learning paradigm. However, jointly learning a deep neural network model in a FL setting proves to be a non-trivial task because of the complexities associated with the neural networks, such as varied architectures across clients, permutation invariance of the neurons, and presence of non-linear transformations in each layer. This work introduces a novel Federated Heterogeneous Neural Networks (FedHeNN) framework that allows each client to build a personalised model without enforcing a common architecture across clients. This allows each client to optimize with respect to local data and compute constraints, while still benefiting from the learnings of other (potentially more powerful) clients. The key idea of FedHeNN is to use the instance-level representations obtained from peer clients to guide the simultaneous training on each client. The extensive experimental results demonstrate that the FedHeNN framework is capable of learning better performing models on clients in both the settings of homogeneous and heterogeneous architectures across clients.
BibTeX
@inproceedings{makhija2022architecture,
  author = {Disha Makhija and Xing Han and Nhat Ho and Joydeep Ghosh},
  title = {{Architecture Agnostic Federated Learning for Neural Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=wXhzakJ3Y9h},
}
Figure