MH-pFedHNGD: Heterogeneous Personalized FL
- The paper introduces MH-pFedHNGD, a framework combining server-side hypernetworks, multi-head bucketing, and an optional global model to enable personalized federated learning for diverse client architectures.
- The methodology leverages client-specific embeddings and Jacobian-vector product updates to generate tailored model parameters while preserving the privacy of client architectures.
- Empirical results on datasets like CIFAR-100, Tiny-ImageNet, and EMNIST demonstrate MH-pFedHNGD’s superior performance over previous methods in both homogeneous and heterogeneous settings.
Searching arXiv for the specified paper to ground the article in the source publication. MH-pFedHNGD is a model-heterogeneous personalized federated learning framework introduced in "Hypernetworks for Model-Heterogeneous Personalized Federated Learning" (Zhang et al., 30 Jul 2025). It extends MH-pFedHN by combining a server-side hypernetwork, client-specific embedding vectors, and a multi-head structure that shares generation capacity among clients with similar model sizes, while optionally adding a lightweight global model and on-device knowledge distillation. The framework is designed for settings in which client models may differ in architecture , parameter count , and layer or operator types, and it targets personalized parameter generation without external datasets, without model decoupling, and without requiring disclosure of client model architectures to the server.
1. Problem setting and motivation
MH-pFedHNGD is formulated for model-heterogeneous personalized federated learning (MH-pFL), where there are clients with private datasets drawn from client-specific distributions , and each client trains a personalized model with parameters . The client architecture may differ across clients in layers, operators, widths, depths, parameter count , and layer types such as CNN, FC, and BN. The objective is to deliver a 0 that fits 1 without sharing raw data and without requiring clients to disclose architecture details to the server (Zhang et al., 30 Jul 2025).
Formally, the target is
2
with empirical objective
3
where 4.
The central difficulty is that client model heterogeneity breaks weight-space alignment and makes traditional averaging or partial layer-sharing suboptimal or inapplicable. The paper positions hypernetworks as a mechanism that maps a compact client-specific embedding to the full parameter vector of a target network. In this formulation, hypernetworks act as a parameter-space unifier without requiring a common architecture; only the target parameter vector size matters. The paper also explicitly contrasts this design with prior MH-pFL strategies that use external or synthetic data for distillation, model decoupling, or partial learning, arguing that such strategies can be impractical, risky, sensitive to data quality or generator stability, or vulnerable to misaligned weights and representations.
2. Hypernetwork foundation and multi-head parameter generation
The MH-pFedHN foundation uses a server-side hypernetwork with parameters 5, where 6 is a shared feature extractor and 7 are multiple heads (Zhang et al., 30 Jul 2025). For each client 8, the server maintains customized embedding vectors
9
where 0 depends on the required parameter count 1 and a chosen hypernetwork output block size 2.
At initialization, each client reports only 3 to the server. The server selects 4 and sets
5
Clients with the same 6 are assigned to the same head 7. This bucketing mechanism is the basis of the multi-head structure: clients with similar sizes, measured by the number of embedding blocks, share a head, while the server need not access layer-by-layer architecture specifics.
For a client 8 assigned to head 9, each embedding block is mapped to a length-0 vector:
1
The full personalized flat parameter vector is then
2
The server outputs 3 as a flat vector, and the client reshapes it into tensors per layer according to its private architecture 4 through a local reshape operator 5:
6
This arrangement is central to how the method handles heterogeneous architectures. The server never learns layer shapes or operators; only the client knows how to reshape the flat vector. The paper states that this works for CNN, FC, BN parameters, and related cases. It also states that if clients change 7 during training, they update the local reshape map consistently. A plausible implication is that the framework separates parameter synthesis from architecture instantiation more strictly than approaches that assume shared layer semantics.
3. Objectives, gradient flow, and the role of the global model
For MH-pFedHN, the server optimizes the hypernetwork parameters and client embeddings to minimize the empirical losses on each client’s model instantiated from generated weights:
8
Each round, the server materializes 9 and sends it to client 0. The client trains locally for 1 epochs on 2 and returns
3
The server then updates the hypernetwork parameters and embeddings using Jacobian-vector products:
4
5
MH-pFedHNGD augments this with an optional lightweight global model 6 (Zhang et al., 30 Jul 2025). Let
7
The global model 8 is generated by reusing the head of the smallest 9 group:
0
with
1
In practice, the paper states that 2 is instantiated as a small CNN, specifically LeNet-5 styled, while preserving the same flat-then-reshape generation path.
The role of 3 is twofold. First, it introduces a second lightweight update channel for the hypernetwork, which the paper states improves generalization. Second, it optionally serves as a teacher for client-specific models via on-device knowledge distillation. The coupled personalized-stage objective is
4
For a batch 5 with personalized-model logits 6 and global-model logits 7 on the same input 8, the distillation term is
9
The total client loss per batch is
0
A common misconception would be to treat MH-pFedHNGD as a conventional shared-global-model method. The paper’s formulation is narrower: the global model is optional, lightweight, and generated through the hypernetwork itself, and its purpose is an additional update signal and optional teacher role rather than replacement of the personalized generation pathway.
4. Round structure, head assignment, and scalability
The paper provides two algorithms, one for MH-pFedHN and one for MH-pFedHNGD (Zhang et al., 30 Jul 2025). In MH-pFedHNGD, each round has a global pass followed by a personalized pass.
During the global pass, the server generates 1 using the head for the smallest-2 group, broadcasts 3 to selected clients, and receives
4
after local training. It then updates 5 and 6 with weighted Jacobian-vector products:
7
8
where 9.
During the personalized pass, the server generates 0 for each client according to the assigned head, clients optimize 1 locally, return 2, and the server updates 3 and 4 through the same Jacobian-vector-product mechanism.
The difference between MH-pFedHN and MH-pFedHNGD can be summarized as follows.
| Variant | Components | Per-round structure |
|---|---|---|
| MH-pFedHN | Hypernetwork 5 with multi-heads, client embeddings 6 | Single personalized pass |
| MH-pFedHNGD | MH-pFedHN components plus global model path 7 and optional KD | Global pass plus personalized pass |
The scalability logic is explicitly tied to 8. The server stores 9 per client, the number of heads equals the number of distinct 0 values present, and dynamic creation of a new head for a new 1 is supported. For new architectures with new 2, the paper states that a new head can be added and the feature extractor 3 can be frozen while the new head is trained. The paper also states that removing heads severely degrades performance and that using one head for all clients causes OOM or poor accuracy, which is presented as evidence that multi-head bucketing is critical for both scalability and performance.
5. Empirical results and ablation findings
The reported evaluation covers EMNIST, CIFAR-10, CIFAR-100, and Tiny-ImageNet under two non-IID regimes: non-IID_1, defined as quantity-based label imbalance with per-client class subsets and random mass splits, and non-IID_2, defined as Dirichlet4 partitioning (Zhang et al., 30 Jul 2025). The heterogeneous model suite includes LeNet-style CNN, VGG-8, and ResNets with 10-, 12-, and 18-layer variants. The hypernetwork feature extractor is a 3-layer MLP.
In homogeneous settings, the paper reports the following highlights. On CIFAR-100 with LeNet under non-IID_2 and 200 clients, MH-pFedHNGD reaches 82.54, compared with 79.49 for pFedLHN and 78.56 for FedAKT; MH-pFedHN reaches 81.60. On CIFAR-100 under non-IID_1 and 200 clients, MH-pFedHNGD reaches 61.59 versus 53.43 for pFedLHN, while MH-pFedHN reaches 60.11. On Tiny-ImageNet under non-IID_2 and 200 clients, MH-pFedHNGD reaches 66.67 versus 58.30 for pFedLHN, and MH-pFedHN reaches 63.61. For EMNIST, the paper states that performance is near-saturated for most methods and that the proposed methods are competitive at approximately 99%.
In heterogeneous settings, the paper reports that on CIFAR-100 with LeNet, VGG, and ResNets under non-IID_2 and 200 clients, MH-pFedHNGD reaches 76.46, MH-pFedHN 75.38, pFedLHN 74.60, and FedAKT 74.98. On Tiny-ImageNet under non-IID_2 and 200 clients, MH-pFedHNGD reaches 60.38, MH-pFedHN 58.79, and pFedLHN 57.53.
The reported generalization results are notable. The paper states that on unseen clients and architectures, MH-pFedHNGD and MH-pFedHN outperform other hypernetwork baselines by up to 20% in homogeneous generalization and up to 50% in heterogeneous generalization. For new architectures such as ResNet or SqueezeNet unseen in training, freezing 5 and adding a new head yields competitive performance. The paper also states that the global model gives limited extra gain in this setting, because learning relies mainly on new head adaptation to the new distribution. This suggests that the global-pass benefit is strongest when the pre-existing shared generator already has usable cross-client structure.
The ablation findings isolate three components. First, multi-head design is necessary: removing heads severely degrades performance. Second, the global pass is useful even without distillation, since HNG exceeds HN and HNGD exceeds HNG in most settings. Third, knowledge distillation remains effective under architecture mismatch: even when 6 and client architectures are entirely different, such as 7 and clients in 8, HNGD exceeds HN consistently. The paper also reports that communication pruning using the top-30% magnitudes of 9 yields negligible accuracy drop.
6. Privacy profile, communication costs, limitations, and implementation details
The privacy claim of MH-pFedHNGD is specific rather than absolute (Zhang et al., 30 Jul 2025). The framework does not require external, public, or synthetic data. Clients do not disclose their architectures; the server sees only 0 and uses 1 for bucketing. The server generates a flat 2 and does not require layer shapes, since reshaping occurs locally. The update vectors 3 and 4 are model-sized vectors, and the paper reports resilience to gradient inversion attacks, specifically iDLG, in practice. A plausible implication is that the method reduces architectural metadata exposure while still assuming that total parameter count is permissible metadata.
Communication and computation costs are also quantified. Client communication per round consists of uploading 5 with 6 floats and, optionally, 7 with 8 floats. The paper states that the additional cost of MH-pFedHNGD is an extra lightweight pass for 9 per round, and that the communication increase is small because the global model size is 00, the smallest among clients. On CIFAR-100 with 50 clients and 500 rounds under non-IID_1, the paper reports overall communication of approximately 1.83 MB for MH-pFedHN homogeneous, 3.66 MB for MH-pFedHNGD homogeneous, 3.00 MB for MH-pFedHN heterogeneous, and 4.83 MB for MH-pFedHNGD heterogeneous. Computation times grew by about 1.6–2.001 when adding the global pass.
The paper identifies several assumptions and limitations. Clients must be able to provide 02, store and reshape 03 according to their private 04, and run a small global model instance 05 locally. Bucketing by 06 is assumed sufficient to share heads among similar-size models. Extreme heterogeneity can introduce many heads, so server memory for 07 and multiple heads grows with the number of 08 buckets. The embedding dimension and output block size 09 trade off accuracy and compute. The paper also notes an accuracy drop when moving from homogeneous to heterogeneous model settings and frames better cross-architecture fusion as an open challenge. It further suggests that more principled head assignment beyond 10-based bucketing, such as data-driven clustering of size or behavior, could further improve sharing.
The implementation details reported in the paper are as follows. Training runs for up to 500 rounds with local epochs 11 and batch size 64. The client optimizer is SGD with learning rate 12, momentum 13, and weight decay 14. The hypernetwork optimizer is Adam with learning rate 15. The embedding dimension is 16, the hypernetwork output block size is 17, and 18 is a 3-layer MLP. In HNGD, the global model is LeNet-5 style by default, with 19 and 20. Distillation temperatures are dataset-specific: CIFAR-100 uses 21, Tiny-ImageNet 22, and EMNIST 23. The KD coefficients 24 are 0.01 for CIFAR-100, 0.2 for Tiny-ImageNet, and 0.1 for EMNIST. The paper states that the method is robust across participation ratios from 20% to 100%, that HNGD gains increase with participation, and that under very low participation and high heterogeneity in non-IID_1 the benefit of 25 can diminish because 26 reflects only a small, diverse subset. It also states that freezing client-side layers, such as the last FC or BN blocks, is supported by reshaping only the generated subset and retaining frozen parameters locally, with moderate accuracy drops under extreme constraints, and that HNGD improves robustness if at least 40% of clients can deploy 27.