Manuscript Offprint
arXiv:2611.02412A Novel Federated Learning Framework for Defending Against Gradient Inversion Attacks
Abstract
Federated Learning (FL) offers a paradigm for collaborative machine learning model training among clients, preserving data privacy by avoiding direct data sharing. However, the gradient information exchanged in FL has been shown to be vulnerable to Gradient Inversion Attacks (GIA), which can reconstruct sensitive user data. To counter these threats, various privacy-enhancing technologies like Secure Multi-party Computing (SMC), Homomorphic Encryption (HE), and Differential Privacy (DP) have been integrated into FL. While effective, these methods often introduce significant trade-offs between privacy and model utility. By revisiting the key to privacy exposure in FL under GIA, which lies in the frequent sharing of model gradients that contain private data, we take a new perspective by designing a novel privacy-preserving FL framework that effectively “breaks the direct connection” between the shared parameters and the local private data to defend against GIA. Our proposed framework, HyperFL++, leverages hypernetworks to generate local model parameters, where only the hypernetwork parameters are aggregated by the server. To ensure practicality, HyperFL++ incorporates
Corresponding author
Email address: liangqqu@hku.hk (Liangqiong Qu)
Contribute equally.
a Row-wise Kronecker Decomposition (RKD) to mitigate the memory and communication overhead from the hypernetwork. Comprehensive theoretical analysis and extensive experiments validate our method's effectiveness in protecting data privacy while maintaining high model utility. Our code is available at https://github.com/Pengxin-Guo/HyperFL++.
Keywords:
Federated Learning, Gradient Inversion Attacks, Privacy Protection, Hypernetworks, Kronecker Decomposition
1. Introduction
Deep Neural Networks (DNNs) have demonstrated significant success in various computer vision tasks, primarily due to access to extensive training datasets [1, 2, 3]. However, in many real-world scenarios, training data is often distributed among different institutions, and sharing this data is commonly restricted by privacy and regulatory issues. To address these challenges, Federated Learning (FL) [4, 5, 6, 7, 8], which utilizes collaborative and decentralized training of AI models across multiple clients while keeping personal data private, has emerged as an effective solution. In the FL paradigm, during each training round, clients perform local model updates using the latest copy of the model received from the server. Then, they send the updates to the server for aggregation. The server aggregates these updates to update the global model, which is then broadcasted to all clients for further training. By enabling collaborative training without raw data sharing, FL ensures data privacy protection.
Despite its privacy-centric design, FL is vulnerable to Gradient Inversion Attacks (GIA) [9, 10, 11, 12], which can reconstruct private training data from shared gradients. To mitigate this, defense mechanisms like Secure Multi-party Computing (SMC) [13, 14], Homomorphic Encryption (HE) [15, 16], and Differential Privacy (DP) [17, 18, 19, 20] have been adopted. As shown in Figure 1 (left), these methods apply protections to the exchanged gradients without altering the fundamental FL framework. However, they introduce a significant privacy-utility dilemma.
For example, SMC and HE offer strong security but impose prohibitive computa-

Figure 1: Left. Current approaches focus on protective techniques for shared gradients, such as SMC, HE, and DP, which naturally entail significant privacy-utility trade-offs. Right. A new FL framework is introduced that “breaks the direct connection” between the shared parameters and the local private data, aiming to achieve an optimal balance between privacy and utility.
tional and communication overheads, especially for large-scale DNNs [14, 16]. Conversely, DP is more lightweight but often compromises model accuracy to achieve meaningful privacy guarantees [18, 21]. These limitations motivate us to explore a different path, leading to our central research question:
Can we develop a new FL framework that provides a favorable privacy-utility trade-off against GIA without depending on current defense mechanisms?
To achieve this, we revisit the key to privacy exposure in FL under GIA, which stems from the frequent sharing of model gradients containing private information. Most existing efforts focus on developing advanced defense mechanisms for the shared gradients to improve privacy in FL, as depicted in the left section of Figure 1. In contrast, our approach seeks to create a novel privacy-preserving FL framework that “breaks the direct connection” between shared parameters and local private data to guard against GIA. To accomplish this, we investigate the potential of hypernetworks—a type of deep neural network that generates weights for another network [22]—as a promising solution, as shown in the right section of Figure 1 and Figure 2.
To this end, we present HyperFL++, an innovative FL framework that employs a dual approach—network decomposition and hypernetwork sharing—to “break the direct connection” between shared parameters and local private data, as illustrated in Figure 2. Inspired by findings that FL models exhibit greater diversity in their final layers [23, 19], we partition each local model into a shared feature extractor and a private classifier. This design improves performance in heterogeneous settings and confines some data-sensitive components locally. To further enhance privacy, an auxiliary hypernetwork generates the feature extractor's parameters from a private, client-specific embedding. Instead of sharing the feature extractor's gradients, clients only transmit the hypernetwork's parameters to the server for aggregation. This auxiliary hypernetwork sharing approach effectively "breaks the direct connection" between shared parameters and local private data, preserving privacy while facilitating interaction and information exchange among clients. To make HyperFL++ efficient, we introduce a Row-wise Kronecker Decomposition (RKD) technique that compresses the hypernetwork's parameters, significantly reducing the associated memory and communication costs, as detailed in Figure 2 (right). This operation largely reduces the parameters associated with the hypernetwork, minimizing the communication overhead introduced by hypernetworks.
The HyperFL++ framework is designed to be both flexible and scalable. We propose two main configurations: (1) the Main Configuration, which generates the entire feature extractor and is suited for smaller networks, and (2) HyperFL++ for Large Pre-trained Models (HyperFL++-LPM), which uses a hypernetwork to generate parameters for lightweight adapters [24] to fine-tune large, fixed pre-trained models for more complex tasks (see Figure 3). Our theoretical and empirical results confirm that HyperFL++ robustly defends against GIA while delivering model performance and convergence rates comparable to the standard FedAvg [4]. We hope this work encourages a shift in focus toward designing inherently private FL frameworks rather than relying solely on external defense mechanisms.
Our main contributions are:
We propose HyperFL++, a novel privacy-preserving FL framework that defends against GIA by “breaking the direct connection” between shared parameters and local data, offering a new perspective on FL privacy.
We introduce a Row-wise Kronecker Decomposition (RKD) method to make the hypernetwork-based approach practical by minimizing its communication and memory footprint.
We present two key configurations of HyperFL++: (1) the Main Configuration, which is designed for simpler tasks with smaller networks and learns the full parameters of the feature extractor directly; (2) HyperFL++-LPM, which is aimed at complex tasks by utilizing pre-trained models as fixed feature extractors while generating trainable adapter parameters through a hypernetwork.
- Our theoretical analysis and extensive experimental results show that HyperFL++ provides strong privacy protection against GIA while achieving competitive model utility and convergence.
2.1. Gradient Inversion Attacks
Gradient Inversion Attacks (GIA) are a class of privacy attacks that exploit the gradients shared in collaborative learning to reconstruct sensitive training data [9]. The underlying principle is that gradients, which guide model updates, inherently contain information about the data that produced them. The fundamental concept of GIA involves deliberately altering the dummy input to maximize the gradients related to the sensitive information of interest. By iteratively modifying the dummy input based on these gradients, an attacker can progressively approximate sensitive details, such as private attributes or specific training data samples that the model was trained on [25, 9, 10, 26].
Early work by Phong et al. demonstrated the feasibility of GIA on shallow networks [25]. Subsequent research extended these attacks to deeper models. For instance, Zhu et al. introduced a method combining pseudo-label estimation and optimization to enhance image reconstruction quality [9]. A significant advancement came from Geiping et al., who replaced the traditional L2 distance loss with cosine similarity, dramatically improving the fidelity of reconstructed images, even for complex datasets like ImageNet [10]. The continued success of these attacks highlights that shared gradients pose a considerable privacy threat, underscoring the need for robust defense mechanisms to prevent information leakage.
2.2. Privacy Protection in Federated Learning
While FL is designed to keep data localized, the necessity of sharing model updates opens an attack surface for GIA [10]. Consequently, researchers have integrated various privacy-preserving technologies into FL. These can be broadly categorized into three groups: cryptographic methods like Secure Multi-party Computing (SMC) [13, 14] and Homomorphic Encryption (HE) [15, 16], and perturbation-based methods like Differential Privacy (DP) [17, 18, 19]. Cryptographic solutions offer strong security guarantees by performing computations on encrypted data, but their high computational and communication overheads make them impractical for many large-scale deep learning applications [14, 16]. DP-based methods, which involve adding calibrated noise to gradients, are more lightweight but often lead to a degradation in model performance, creating a difficult trade-off between privacy and utility [18, 21].
Beyond these theoretically-grounded defenses, several empirical strategies have been proposed. These include gradient pruning or masking [9, 11], which zeroes out small-magnitude gradients, and unstructured noise addition [9]. Other notable methods are Soteria [27], which perturbs intermediate feature representations, and PRECODE [28], which uses a variational module to obscure latent features. However, as demonstrated in their respective studies, these empirical methods also struggle with the inherent privacy-utility trade-off [11, 28, 27]. Our work diverges from these approaches by proposing a new FL framework that redesigns the information-sharing mechanism itself, using hypernetworks to create a more favorable privacy-utility balance.
2.3. Hypernetworks in Federated Learning
A hypernetwork is a neural network that generates the weights for a separate, primary network, known as the target network [22, 29]. This concept has recently been applied to FL, primarily to address statistical heterogeneity by generating personalized models for each client [30, 31, 32]. For example, pFedHN [30] uses a central hypernetwork to generate client-specific parameters from learned client embeddings, enabling efficient personalization. Similarly, SemiPFL [31] employs a global hypernetwork to create personalized autoencoders for clients in a semi-supervised setting. A common thread in these methods is that the hypernetwork and client embeddings are managed

Figure 2: Left). Illustration of HyperFL++. HyperFL++ divides each client's network into two components: the feature extractor and the classifier head . An auxiliary hypernetwork, denoted as , is employed to create the feature extractor using the client's specific private embedding vector , such that . These parameters are then utilized to derive features from the input , which are subsequently processed by the classifier to produce the output , represented as . During the FL process, the hypernetwork is the only element shared with the server, while all other components remain private. This approach effectively addresses privacy leakage concerns. Right). Row-wise Kronecker Decomposition (RKD). The hypernetwork parameters (matrices) are first partitioned into rows, and then Kronecker decomposition is applied to each row. denotes Kronecker product.
by the central server. This design, while effective for personalization, gives the server complete knowledge of the local models, making it vulnerable to GIA, as our experiments confirm (see Table 1 and Figure 4).
Our work, HyperFL++, takes a different approach. Instead of focusing on personalization, we leverage the hypernetwork architecture as a privacy-preserving mechanism. By carefully designing what is shared (only the hypernetwork parameters) and what remains private (the classifier and client embeddings), we fundamentally alter the information available to the server, thereby minimizing the risk of data leakage while maintaining high model utility.
3. Methodology
In this section, we first formalize the problem setting of federated learning and then introduce our proposed HyperFL++ framework in detail.
3.1. Problem Formulation
Consider a federated learning system with clients and a central server. The clients aim to collaboratively train their models without sharing their raw private data. Each client possesses a local data distribution over the input space and label space , where there are classes in total. The local model for client is denoted by , and the associated loss function is . The global optimization objective in FL is to find the set of model parameters that minimizes the average loss across all clients:
In the standard FedAvg algorithm [4], all clients share identical model parameters, i.e., . In contrast, personalized FL allows for client-specific parameters, where can differ across clients to better handle data heterogeneity [23, 33].
Since the true data distributions are unknown, the objective in Eq. (1) is typically approximated using Empirical Risk Minimization (ERM). Each client has a local dataset of IID samples drawn from . The training objective thus becomes minimizing the empirical risk:
where is the average loss computed on the local training data of client .
3.2. Main Configuration of HyperFL++
This section details the complete workflow of the HyperFL++ framework, followed by an explanation of the low-rank factorization technique applied to the hypernetwork.
3.2.1. HyperFL++ Framework
As depicted in Figure 2, in the Main Configuration of HyperFL++, each client 's classification network, defined by , is composed of a feature extractor with parameters and a classifier with parameters . Here,
is the feature dimension and is the number of classes. Each client also has a private embedding and a hypernetwork parameterized by . The hypernetwork generates the parameters for the feature extractor, i.e., . This design enables the creation of personalized feature extractors based on unique client embeddings, which can be either fixed or trainable; in this work, we use trainable vectors. The optimization objective from Eq. (2) is then reformulated as:
where , , and . Note that the feature extractor parameters are generated by the hypernetwork and are not directly trained, whereas the client embeddings, hypernetwork parameters, and classifier parameters are all trainable.
To “break the direct connection” between shared parameters and private local data, thereby defending against GIA while maintaining high performance, clients only upload their hypernetwork parameters to the server for aggregation. The classifier and the private client embedding remain local. As shown in Figure 2, in each communication round, the server broadcasts the aggregated hypernetwork parameters to the clients. Each client i updates its local hypernetwork parameters with and proceeds with local training. After local training, each client sends its updated back to the server for aggregation, while keeping its classifier parameters and client embedding private. The server then aggregates the received to compute the new global for the next round. This process facilitates information sharing among clients while preserving privacy.
Local Training Procedure. During each local training phase, a client first updates its hypernetwork parameters with the aggregated parameters from the server. Then, it performs iterative updates using stochastic gradient descent as follows:
- Step 1: Update Classifier . With and fixed, the classifier parameters are trained for one epoch:
(4) where is a mini-batch of data and is the learning rate for the classifier.
- Step 2: Update Hypernetwork and Embedding . After updating the classifier, the client updates the hypernetwork parameters and the client embedding for multiple epochs with the new fixed:
(5)
where and are the learning rates for the hypernetwork and the client embedding, respectively.
Global Aggregation. Following standard FL protocols like FedAvg [4], the server aggregates the hypernetwork parameters from all clients via weighted averaging:
where is the aggregation weight for client i, typically proportional to its local data size.
However, a key challenge in HyperFL++ is the increased communication overhead, as the hypernetwork’s parameters are generally larger than those of the feature extractor it generates [22]. For instance, if a convolutional layer’s feature extractor parameters are , the hypernetwork generating them would have parameters , where is the hypernetwork’s hidden dimension. This results in a -fold increase in parameter size. To address this and make HyperFL++ practical, we introduce a low-rank factorization method to compress the hypernetwork and reduce its computational and memory footprint.
3.2.2. Row-wise Kronecker Decomposition (RKD)
A primary challenge in employing hypernetworks is their potential size. The hypernetwork must generate all the parameters for the target network's feature extractor, which can lead to a substantial number of parameters within the hypernetwork itself. This increase in model size translates directly to higher communication overhead and memory requirements, potentially undermining the practicality of the framework. To overcome this critical bottleneck and make HyperFL++ efficient, we introduce a powerful compression technique: Row-wise Kronecker Decomposition (RKD).
RKD is a specialized low-rank factorization method designed to compress the large parameter matrices of the hypernetwork. The core idea is to represent a large matrix as a composition of much smaller ones, thereby reducing the number of parameters that need to be stored and communicated. As illustrated in the right panel of Figure 2, the process works as follows:
Let the parameters for a single layer of the hypernetwork be represented by a large matrix , where is the dimension of the hypernetwork's hidden layer and is the total number of parameters in the target feature extractor layer (e.g., for a convolutional layer). Instead of storing the full matrix, we decompose it into two smaller factor matrices, and , where the dimensions are chosen such that .
The “row-wise” aspect of RKD means we reconstruct each row of the original matrix independently. Specifically, the r-th row of is reconstructed by taking the Kronecker product of the r-th row of A and the r-th row of B:
where denotes the Kronecker product [34]. During training, only the factor matrices A and B are stored and updated.
The compression benefit of this decomposition is significant. The original number of parameters to store or communicate for the matrix is . With RKD, we only need to handle the parameters of and , which total . By choosing the factors and to be approximately equal (i.e., ), the parameter complexity is dramatically reduced from to . This substantial compression makes the hypernetwork-based approach computationally feasible and communication-efficient, enabling HyperFL++ to achieve a favorable balance between privacy, utility, and system performance.

Figure 3: The HyperFL++-LPM framework in each client. In this framework, the weights of the pre-trained model remain fixed, while only the classifier, hypernetwork, and client embedding are trainable. It's important to note that refers to the parameters of the adapters.
3.3. HyperFL++ for Large Pre-trained Models (HyperFL++-LPM)
While the main configuration of HyperFL++ is effective for moderately sized networks, generating the entire feature extractor for very large-scale models, such as Vision Transformers (ViTs) [1] or other foundation models, can become impractical due to the sheer number of parameters. The hypernetwork required to generate such a large target network would itself be enormous, leading to prohibitive computational and memory costs.
To address this scalability challenge and extend the applicability of our framework to state-of-the-art large models, we introduce an adaptation named HyperFL++-LPM (for Large Pre-trained Models). This configuration, illustrated in Figure 3, leverages the power of pre-trained models by integrating them with parameter-efficient fine-tuning (PEFT) techniques, such as adapters [24].
The core idea behind HyperFL++-LPM is to keep the vast majority of the pre-trained model's parameters frozen and only fine-tune a small set of additional parameters. Instead of generating the entire feature extractor, the hypernetwork's role is shifted to generating only the parameters for these lightweight adapter modules. These adapters are small neural network layers inserted within the architecture of the larger pre-trained model. By training only these adapters, we can adapt the powerful, general-purpose features of the large model to specific downstream tasks and client data distributions without incurring the cost of full model fine-tuning.
In this setup, the client model consists of a large, fixed pre-trained feature extractor, the trainable adapters whose parameters are generated by the hypernetwork, and a private classifier. The training process remains similar to the main configuration: clients update their local hypernetwork, client embedding, and classifier, but the updates to the feature extractor are now confined to the adapter layers. This approach allows HyperFL++ to effectively harness the capabilities of powerful pre-trained models for complex tasks while maintaining the core privacy and efficiency benefits of our framework. It provides a practical and scalable solution for applying privacy-preserving federated learning in the era of large foundation models.
4. Analysis and Insights
4.1. Privacy Analysis
In this section, we conduct a detailed privacy analysis of the HyperFL++ framework. We consider the common scenario where the server is an honest-but-curious adversary, meaning it adheres to the training protocol but attempts to infer private client data from the shared model updates [9, 10, 26, 12].
4.1.1. Background on Gradient Inversion Attacks
As established by prior research [25, 9, 10], it is possible to reconstruct input data from gradients. This is achieved by solving an optimization problem. Given a model with parameters and the gradients computed from a private data batch , an attacker aims to find a reconstructed input that approximates :
Here, is a loss function that measures the similarity between the gradients of the reconstructed data x and the target gradients . The term is a regularization component that incorporates prior knowledge about natural images to improve reconstruction quality, with as its weighting factor. Different GIA methods vary in their choice of the gradient loss and regularization terms [9, 10, 26].
4.1.2. Analysis of the Proposed Defense Mechanism
In contrast to standard FL frameworks where clients upload gradients of the entire model, HyperFL++ requires clients to share only the hypernetwork parameters. Consequently, an attacker's objective function for reconstructing data x must be adapted:
where are the hypernetwork parameters, are the classifier parameters, and is the private client embedding. The crucial difference between Eq. (8) and Eq. (9) is that the attacker only has access to the gradients of the hypernetwork, not the entire model.
To reconstruct the input x, the attacker must first gain information about the feature extractor, whose parameters are generated by the hypernetwork based on the client embedding. This turns the attack into a challenging bi-level optimization problem:
where the lower-level problem aims to recover the client embedding . However, solving this is infeasible. According to the chain rule, computing the hypernetwork's gradient requires the classifier's gradient . Since the classifier is kept private on the client's device and never shared, the server cannot compute this gradient. This effectively breaks the inversion process.
Even if an attacker attempts to bypass the classifier by directly optimizing for the hypernetwork's output (the feature extractor parameters ), the problem remains intractable. Unlike inferring a low-dimensional label vector [35, 26], the output is a high-dimensional and complex set of parameters. Simultaneously optimizing for both the input data x and the high-dimensional parameters creates an enormous search space, making a successful reconstruction practically impossible [9, 11].
In summary, HyperFL++'s architecture, which combines a hypernetwork with a private classifier and client embedding, creates a strong defense against GIA by fundamentally disrupting the information flow required for a successful attack. This is further validated by our experimental results in Section 5.2.
4.2. Utility Analysis
We now analyze the utility of the HyperFL++ framework, focusing on its convergence properties and generalization bound. Detailed proofs are available in the Appendix.
4.2.1. Convergence Analysis
We adopt standard assumptions from the FL literature [36, 33] for smooth, non-convex optimization landscapes.
Assumption 1. (L-smoothness) The local loss functions are all L-smooth, meaning that for any pairs and , the following holds: .
Assumption 2. (Bounded Variance) Let be sampled uniformly at random from the local data of the i-th client at the t-th training step. The variance of the stochastic gradients for each client and each variable is bounded as follows:
for .
Assumption 3. (Bounded Gradient) The expected squared norm of the stochastic gradients is uniformly bounded, specifically:
for all and . Here, represents the total number of training steps for each client.
Under these assumptions, we establish the convergence rate for HyperFL++.
Theorem 1. Assuming that Assumptions 1, 2 and 3 are satisfied, and defining , as stated, let and represent the number of local training iterations between two communication rounds. Then we have:
where , and .
Based on Theorem 1, we achieve a convergence rate of towards the stationary solution under smooth and non-convex conditions. This rate is comparable to that of FedAvg in non-convex situations [37]. Additionally, we can accelerate convergence for Polyak-Lojasiewicz (PL) functions [38], which are frequently encountered in non-convex optimization problems.
Assumption 4. (PL Condition) A function is referred to as a -PL function if there exists a constant such that it satisfies the condition:
We assume that all functions are -PL functions, and we denote simply as .
Corollary 1. Given the assumptions along with , , and defined in Theorem 1, and under the additional Assumption 4, we have:
If we set , after steps, we have that:
When using PL functions, the convergence rate of HyperFL++ surpasses that obtained through smoothness assumptions alone.
4.2.2. Generalization Bound
We also provide a generalization bound for HyperFL++ based on the framework from [39].
Assumption 5. (Lipschitz Condition) We assume that the weights of hypernetworks , the client embeddings and the classifier weights are bounded in a ball of radius , in which the following Lipschitz conditions hold:
for .
Theorem 2. Assuming we select m clients during each FL communication round, let the hypernetwork parameter space be of dimension H, the embedding space be of dimension d, and the classifier parameter space be of dimension K. The parameters , , are those learned from each client's individual dataset. Under the condition of Assumption 5, we can derive:
such that if the number of samples per client exceeds S, then with a probability of at least , for all , , , the following holds:
where , , are the optimal parameters corresponding to the distribution of each individual client.
Theorem 2 shows that the required sample size depends on the complexity of the parameter spaces and the number of clients. This highlights a trade-off between the generalization ability of the framework and the expressive power of the personalized models.
5. Experiments
In this section, we conduct a comprehensive experimental evaluation of the proposed HyperFL++ framework, assessing its effectiveness in terms of both privacy pro-tection and model utility.
5.1. Experimental Setup
5.1.1. Datasets
Our evaluation is performed on four widely-used image classification benchmarks: (1) EMNIST [40], a dataset of handwritten characters across 62 classes. (2) Fashion-MNIST [41], comprising 10 categories of fashion product images. (3) CIFAR-10 [42], a standard 10-class object recognition dataset. (4) CINIC-10 [43], a larger 10-class dataset combining images from CIFAR-10 and ImageNet.
To simulate realistic federated learning scenarios, we follow the methodology in [23, 44] to create a non-IID data distribution. For each client, a small fraction of data (s%, set to 20%) is sampled uniformly from all classes, while the majority ((100 - s)%) is drawn from a limited set of dominant classes. Clients are organized into groups that share the same dominant classes. For Fashion-MNIST, CIFAR-10, and CINIC-10, we create 5 client groups, with each group assigned three consecutive classes (e.g., 0-2, 2-4, etc.). For EMNIST, we form 3 groups corresponding to digits, uppercase letters, and lowercase letters.
5.1.2. Model Architectures
For the Main Configuration of HyperFL++, we adopt the CNN architectures from [23, 44]. A smaller CNN with two convolutional layers is used for EMNIST and Fashion-MNIST, while a larger CNN with three convolutional layers is used for CIFAR-10 and CINIC-10. The hypernetwork is a fully connected network with one hidden layer, generating the weights for the target CNNs. Client embeddings are learnable vectors of dimension 128.
For HyperFL++-LPM, we use a pre-trained ViT-S model [1] as the fixed feature extractor. Adapters, consisting of down-projection and up-projection layers with a ReLU activation, are inserted into each transformer block. The hypernetwork, with the same architecture as in the main configuration, generates the parameters for these adapters.
5.1.3. Compared Methods
We benchmark HyperFL++ against a range of baselines. For the Main Configuration of HyperFL++, the baselines include: (1) FedAvg [4], the standard FL algorithm. (2) pFedHN and pFedHN-HC [30], which use a central hypernetwork for personalization. (3) Several DP-based methods: DP-FedAvg [21], PPSGD [45], and CENTAUR [19]. Note that these methods were originally designed for user-level DP; we adapt them to the honest-but-curious server setting by applying DP protections before server aggregation. (4) HyperFL [44], the precursor to our current work.
For HyperFL++-LPM, we compare against FedAvg with two fine-tuning strategies: (1) full parameter tuning and (2) adapter-based fine-tuning.
5.1.4. Training Settings
For the Main Configuration of HyperFL++, we use mini-batch SGD as the local optimizer for all methods. The learning rates and are set to 0.01 for EMNIST/Fashion-MNIST and 0.02 for CIFAR-10/CINIC-10, while is 0.1 for all datasets. We use a weight decay of , momentum of 0.5, and a batch size of 50 (100 for EMNIST). All experiments run for 200 global communication rounds with 5 local epochs. We test with both 20 clients (full participation) and 100 clients (30% random sampling). For DP-based methods, we use a privacy budget of ( , ).
For HyperFL++-LPM, we use 20 clients and a batch size of 16. The learning rates and are 0.02 for EMNIST and 0.1 for CIFAR-10.
All experiments are conducted on NVIDIA GeForce RTX 4090 and 3090 GPUs.
5.2. Privacy Evaluation
We experimentally validate the privacy-preserving capabilities of HyperFL++, complementing the theoretical analysis in Section 4.1. We use the EMNIST and CIFAR-10 datasets for this evaluation, attempting to reconstruct a subset of 50 images (with a batch size of one) using the well-known IG attack method [10]. The attack is run for 10,000 optimization iterations. We measure the reconstruction quality using Peak Signal-to-Noise Ratio (PSNR), Structural Similarity (SSIM), and Learned Perceptual Image Patch Similarity (LPIPS). Better defense is indicated by lower PSNR/SSIM.

Figure 4: Visualization of reconstructed images of IG [10]. The images recovered from FedAvg, pFedHN, and pFedHN-PC are clearly recognizable, indicating severe privacy leakage. In contrast, images from DP-based methods, HyperFL, and HyperFL++ are noisy and unrecognizable, demonstrating effective privacy protection.
scores and a higher LPIPS score, as these signify a greater divergence between the reconstructed and original images.
The quantitative results are presented in Table 1, with corresponding visualizations in Figure 4. The results clearly expose the vulnerabilities of standard FL frameworks. FedAvg, pFedHN, and pFedHN-PC, which directly or indirectly expose local model information, are highly susceptible to GIA. This is evidenced by their high PSNR and SSIM scores and low LPIPS scores, which quantitatively confirm the high fidelity of the reconstructed images seen in Figure 4. While DP-based methods (DP-FedAvg, CENTAUR, PPSGD) offer strong privacy protection, as shown by their favorable metric scores, this comes at a steep cost to model performance (detailed in Table 2).
In stark contrast, both HyperFL and our proposed HyperFL++ achieve robust privacy protection, with metrics comparable to those of DP-based methods, while simultaneously delivering superior model accuracy (see Table 2). This demonstrates the effectiveness of our core idea: “breaking the direct connection between shared parameters and local data”.
Table 1: Reconstruction results of IG [10]. Higher LPIPS, Lower PSNR, and SSIM of recovered images indicate better defense ability.
| Method | EMNIST | CIFAR-10 | ||||
|---|---|---|---|---|---|---|
| PSNR | SSIM | LPIPS | PSNR | SSIM | LPIPS | |
| FedAvg [4] | 32.64 | 0.8925 | 0.0526 | 16.16 | 0.6415 | 0.0536 |
| pFedHN [30] | 31.24 | 0.8701 | 0.0807 | 16.02 | 0.6351 | 0.0504 |
| pFedHN-PC [30] | 28.38 | 0.8713 | 0.0645 | 15.80 | 0.6247 | 0.0407 |
| DP-FedAvg [21] | 7.74 | 0.2978 | 0.7051 | 7.90 | 0.2716 | 0.3204 |
| CENTAUR [19] | 9.52 | 0.2136 | 0.6712 | 9.80 | 0.2723 | 0.2882 |
| PPSGD [45] | 9.73 | 0.1889 | 0.6466 | 9.70 | 0.2788 | 0.2643 |
| HyperFL [44] | 7.85 | 0.3010 | 0.7147 | 8.35 | 0.2732 | 0.3132 |
| HyperFL++ | 8.93 | 0.2274 | 0.6863 | 8.31 | 0.2796 | 0.7657 |
5.3. Utility Evaluation
We now evaluate the utility of our proposed method in terms of model performance, system efficiency, and convergence rate.
5.3.1. Model Performance
As shown in Table 2, the DP-based methods consistently underperform FedAvg. This is an expected outcome, as the injection of statistical noise, which is fundamental to DP, inherently degrades model utility to provide privacy guarantees. In contrast, our proposed HyperFL++ framework not only provides strong privacy but also achieves higher accuracy than the standard FedAvg in most tested scenarios. This result is significant as it demonstrates that HyperFL++ breaks the typical privacy-utility trade-off. While personalization methods like pFedHN and pFedHN-PC also show performance gains over FedAvg, they offer weak defense against GIA, as shown in our privacy evaluation, making them unsuitable for privacy-sensitive applications. HyperFL++ successfully combines the benefits of personalization (leading to higher accuracy) with robust privacy protection.
Table 3 presents the results for HyperFL++-LPM, our adaptation for large pretrained models. The results show that our method achieves performance comparable to FedAvg with full model fine-tuning, which is often considered the upper bound for per-
Table 2: The comparison of final test accuracy (%) of different methods on various datasets. We apply full participation for FL system with 20 clients, and apply client sampling with rate 0.3 for FL system with 100 clients. # Para [EMNIST/Fashion-MNIST; CIFAR-10/CINIC-10] denotes the communication parameters during each FL round. Underline indicates better performance than FedAvg.
| Method | # Para | EMNIST | Fashion-MNIST | CIFAR-10 | CINIC-10 | ||||
|---|---|---|---|---|---|---|---|---|---|
| 20 clients | 100 clients | 20 clients | 100 clients | 20 clients | 100 clients | 20 clients | 100 clients | ||
| FedAvg [4] | [115,776; 106,400] | 72.77 | 78.87 | 85.67 | 88.11 | 70.02 | 76.24 | 57.00 | 59.11 |
| pFedHN [30] | [115,776; 106,400] | 80.86 | 77.37 | 87.64 | 89.80 | 70.18 | 80.07 | 63.88 | 70.36 |
| pFedHN-PC [30] | [109,368; 110,168] | 82.04 | 79.32 | 89.17 | 90.06 | 72.52 | 78.15 | 64.92 | 68.73 |
| DP-FedAvg [21] | [115,776; 106,400] | 35.12 | 45.73 | 59.88 | 68.29 | 29.12 | 32.03 | 27.30 | 29.94 |
| CENTAIR [19] | [115,776; 106,400] | 68.82 | 67.24 | 83.07 | 79.77 | 50.85 | 51.86 | 48.82 | 51.01 |
| PPSGD [45] | [115,776; 106,400] | 71.16 | 71.18 | 84.47 | 82.94 | 52.17 | 53.92 | 49.98 | 52.91 |
| HyperFL [44] | [6,922,966; 6,924,256] | 78.42 | 80.71 | 87.46 | 89.38 | 71.98 | 74.74 | 66.52 | 70.35 |
| HyperFL++ | [70,136; 84,556] | 78.18 | 81.85 | 88.26 | 90.09 | 71.80 | 74.76 | 65.86 | 69.52 |
formance but is computationally expensive and memory-intensive. More importantly, HyperFL++-LPM significantly outperforms FedAvg with adapter-only tuning. This is a crucial finding, as it demonstrates that our hypernetwork-based approach for generating adapter parameters is more effective than the standard method of simply averaging adapter parameters, confirming its effectiveness and utility in large-model settings.
Table 3: The comparison of final test accuracy (%) of different methods on various datasets with 20 clients. † Adapter fine-tuning. †† Full parameter tuning.
| Method | EMNIST | Fashion-MNIST | CIFAR-10 | CINIC-10 |
|---|---|---|---|---|
| FedAvg† [4] | 75.86 | 83.95 | 68.55 | 65.90 |
| FedAvg†† [4] | 72.73 | 85.69 | 92.37 | 91.37 |
| HyperFL++-LPM | 78.73 | 84.91 | 88.12 | 83.57 |
5.3.2. System Efficiency
We assess system efficiency by measuring communication cost, per-round computation cost, and the number of rounds needed to reach a target accuracy (95% of FedAvg's final accuracy), following the methodology in [46, 33]. As shown in Table 4, HyperFL++ demonstrates remarkable efficiency. A key highlight is the drastic reduction in communication overhead compared to its predecessor, HyperFL. Thanks to the RKD technique, HyperFL++ reduces the much number of communicated pa-
Table 4: Per-round communication and computation costs. # Comm. Rounds denotes the number of rounds to reach the predefined target performance. - means it cannot reach the target performance.
| Method | # Communicated Param | Computation Cost | # Comm. Rounds | |||
|---|---|---|---|---|---|---|
| EMNIST | CIFAR-10 | EMNIST | CIFAR-10 | EMNIST | CIFAR-10 | |
| FedAvg [4] | 115,776 | 106,400 | 21.99 | 19.39 | 11 | 123 |
| pFedHN [30] | 115,776 | 106,400 | 16.79 | 25.10 | 15 | 76 |
| pFedHN-PC [30] | 109,368 | 110,168 | 30.12 | 31.58 | 3 | 60 |
| DP-FedAvg [21] | 115,776 | 106,400 | 202.52 | 144.33 | - | - |
| CENTAUR [19] | 115,776 | 106,400 | 187.47 | 140.39 | - | - |
| PPSGD [45] | 115,776 | 106,400 | 225.99 | 177.11 | - | - |
| HyperFL [44] | 6,922,966 | 6,924,256 | 37.01 | 35.83 | 4 | 63 |
| HyperFL++ | 70,136 | 84,556 | 47.83 | 40.04 | 3 | 42 |
rameters compared to HyperFL, bringing the cost down to a level even lower than that of standard FedAvg. While its per-round computation time is slightly higher than FedAvg's due to the hypernetwork's forward pass, this is more than compensated for by its superior convergence speed. HyperFL++ requires significantly fewer communication rounds to reach the target performance compared to all other baselines. For example, on CIFAR-10, it reaches the target in just 42 rounds, whereas FedAvg needs 123 rounds. This rapid convergence, combined with low communication costs, highlights the overall system efficiency of our framework, making it highly practical for real-world deployment.
5.3.3. Convergence Rate
Figure 5 illustrates the training loss curves for FedAvg, HyperFL, and HyperFL++ on the EMNIST dataset. The plot shows that HyperFL++ not only converges smoothly but does so at a rate comparable to the standard FedAvg, validating the strong theoretical convergence properties established in Section 4.2.1. The training loss for HyperFL++ decreases steadily and reaches a low plateau, indicating stable and effective training. Furthermore, after convergence, HyperFL++ achieves a lower final training loss than FedAvg. This is a strong indicator of its superior modeling capacity, which directly correlates with the higher test accuracy reported in Table 2. This demonstrates that the privacy-preserving mechanism of HyperFL++ does not hinder the optimization process; on the contrary, it facilitates better model fitting in heterogeneous data environments.

Figure 5: Average training loss on the EMNIST dataset with 20 clients. The curve for HyperFL++ shows a smooth and rapid decrease, achieving a lower final loss than FedAvg, which indicates better model performance.
6. Conclusion
In this paper, we introduce HyperFL++, a novel federated learning framework designed to defend against Gradient Inversion Attacks by fundamentally altering the information-sharing mechanism. Instead of exchanging vulnerable model gradients, clients in our framework share only the parameters of a hypernetwork, which in turn generates the local model parameters. This approach effectively “breaks the direct connection” between shared updates and private data. To ensure the practicality of this design, we incorporate a Row-wise Kronecker Decomposition (RKD) technique, which significantly reduces the communication and memory overhead associated with the hypernetwork. Our extensive theoretical analysis and experimental results demonstrate that HyperFL++ provides robust privacy protection without compromising model utility or convergence speed. We hope this work will inspire further research into designing inherently private FL frameworks, shifting the focus from retrofitting defenses to building privacy-by-design systems.
Appendix A. Theoretical Proof
Appendix A.1. Proof of Theorem 1
PROOF. Let be the model parameters maintained in the -th client at the -th step. Let be the set of global synchronization steps, i.e., . If , which represents the time step for communication, then the one-step update of HyperFL can be described as follows:
For convenience, we denote the parameters in each sub-step above as follows:
Here, the variable represents the immediate result of one sub-step SGD update from the parameter of the previous sub-step , and represents the parameter obtained after communication steps (if possible).
Furthermore, we denote the learning rate and stochastic gradient of step t as follows:
where is the data uniformly chosen from the local data set of client i at step t, then .
Next, we apply the inequality of the smoothness Assumption 1 to each sub-step of the one-step update for client i. Firstly, by the smoothness of , we have:
For the second term on the right side of inequality (A.1), according to the law of total expectation, we have:
For the third term on the right side of the inequality (A.1), we have:
where in the last inequality, we use the bounded gradient Assumption 3.
From the above inequalities, and taking the expectation of inequality (A.1), we can get:
Secondly, by the smoothness of , we have:
Similar to inequality (A.2), taking the expectation of inequality (A.3), we get:
Thirdly, by the smoothness of , we have:
From the iterative formula of SGD, it is clear that:
Then, for the third term on the right side of inequality (A.5), we apply the equality (A.6) and take the expectation, which yields:
where in the last inequality, we use the bounded gradient Assumption 3.
For the second term on the right side of inequality (A.5), we take the expectation and get:
where we use the Cauchy-Schwarz inequality and the AM-GM inequality in the first inequality, and the bounded gradient Assumption 3 in the second inequality above.
Then, based on the above inequalities and taking the expectation of inequality (A.5), we have:
Summing up inequalities (A.2) and (A.4), we get:
Summing up inequalities (A.2), (A.4), and (A.7), we get:
Then, let , we have:
By rewriting the above inequality (A.10), we get:
Let be a constant that satisfies the inequality , the aforementioned inequality (A.11) can be further simplified as:
Now, by repeatedly applying inequality (A.12) for different values of t and summing up the results, we get:
Dividing both side of inequality (A.13) by T, we get:
Let us assume that , and we set . Then, we have:
Thus, we can get:
Appendix A.2. Proof of Corollary 1
PROOF. By rewriting inequality (A.12), we have:
By the PL Assumption 4, we have:
Then,
Therefore, we have:
If we set , after steps, we have:
Appendix A.3. Proof of Theorem 2
PROOF. First, we define the distance between and as:
where . By the Theorem 4 from [39], we can find an -covering in . Then, according to the notations used in our paper, we have that , where is the covering number of . In our case, each element of is parameterized by . Therefore, from the triangle inequality and the Lipschitz conditions in Assumption 3, we can get:
(A.22)
Now if there is a parameter space such that , and have corresponding optimal point , and , which are away, respectively, we can get an upper bound of the distance between our model and optimal model, which is an -covering in matrix. From here we see that .
Acknowledgments
This work was supported by National Natural Science Foundation of China (62306253, 62206075), Guangdong Natural Science Fund-General Programme (2024A1515010233),
Research Grants Council of the Hong Kong SAR, China (27207025), and UCSC hellman fellowship.
References
[1] A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, et al., An image is worth 16x16 words: Transformers for image recognition at scale, in: ICLR, 2021.
[2] X. Wang, P. Guo, Y. Zhang, Unsupervised domain adaptation via bidirectional cross-attention transformer, in: ECML-PKDD, Vol. 14173, 2023, pp. 309–325.
[3] Y. Zhang, Z. Zhu, Y. Wang, P. Guo, Y. Zhu, Z. Xu, Bridging the species gap: Vlm-enhanced asymmetric lora diffusion for industrial defect detection, IEEE Transactions on Industrial Informatics (2026).
[4] B. McMahan, E. Moore, D. Ramage, S. Hampson, B. A. y Arcas, Communication-efficient learning of deep networks from decentralized data, in: AISTATS, 2017, pp. 1273–1282.
[5] S. Zeng, P. Guo, S. Wang, J. Wang, Y. Zhou, L. Qu, Tackling data heterogeneity in federated learning via loss decomposition, in: MICCAI, 2024, pp. 707–717.
[6] P. Guo, Y. Wang, W. Li, M. Liu, M. Li, J. Zheng, L. Qu, Exploring federated pruning for large language models, arXiv:2505.13547 (2025).
[7] W. Zheng, Z. Lin, P. Guo, Y. Zhou, F. Wang, L. Qu, Fedvlmbench: Benchmarking federated fine-tuning of vision-language models, arXiv preprint arXiv:2506.09638 (2025).
[8] P. Guo, S. Zeng, Z. Li, W. Zheng, M. Liu, L. Qu, Fed-grpo: Reward-signal-driven federated group relative policy optimization, arXiv preprint arXiv:2610.11502 (2026).
[9] L. Zhu, Z. Liu, S. Han, Deep leakage from gradients, in: NeurIPS, Vol. 32, 2019.
[10] J. Geiping, H. Bauermeister, H. Dröge, M. Moeller, Inverting gradients-how easy is it to break privacy in federated learning?, in: NeurIPS, Vol. 33, 2020, pp. 16937–16947.
[11] Y. Huang, S. Gupta, Z. Song, K. Li, S. Arora, Evaluating gradient inversion attacks and defenses in federated learning, in: NeurIPS, Vol. 34, 2021, pp. 7232–7241.
[12] P. Guo, R. Wang, S. Zeng, J. Zhu, H. Jiang, Y. Wang, Y. Zhou, F. Wang, H. Xiong, L. Qu, Exploring the vulnerabilities of federated learning: A deep dive into gradient inversion attacks, IEEE TPAMI 48 (4) (2026) 4810–4826.
[13] A. C. Yao, Protocols for secure computations, in: FOCS, 1982, pp. 160–164.
[14] K. Bonawitz, V. Ivanov, B. Kreuter, A. Marcedone, H. B. McMahan, S. Patel, D. Ramage, A. Segal, K. Seth, Practical secure aggregation for privacy-preserving machine learning, in: CCS, 2017, pp. 1175–1191.
[15] C. Gentry, A fully homomorphic encryption scheme, Stanford university, 2009.
[16] X. Zhang, A. Fu, H. Wang, C. Zhou, Z. Chen, A privacy-preserving and verifiable federated learning scheme, in: ICC, 2020, pp. 1–6.
[17] C. Dwork, Differential privacy, in: ICALP, 2006, pp. 1–12.
[18] R. C. Geyer, T. Klein, M. Nabi, Differentially private federated learning: A client level perspective, arXiv:1712.07557 (2017).
[19] Z. Shen, J. Ye, A. Kang, H. Hassani, R. Shokri, Share your representation only: Guaranteed improvement of the privacy-utility tradeoff in federated learning, in: ICLR, 2023.
[20] W. Zhang, X. Zuo, Y. Wang, L. Zhang, Adaptive density clustering with differential privacy, Pattern Recognition (2026) 113652.
[21] H. B. McMahan, D. Ramage, K. Talwar, L. Zhang, Learning differentially private recurrent language models, in: ICLR, 2018.
[22] D. Ha, A. M. Dai, Q. V. Le, Hypernetworks, in: ICLR, 2017.
[23] J. Xu, X. Tong, S.-L. Huang, Personalized federated learning with feature alignment and classifier collaboration, in: ICLR, 2023.
[24] N. Houlsby, A. Giurgiu, S. Jastrzebski, B. Morrone, Q. De Laroussilhe, A. Gessmundo, M. Attariyan, S. Gelly, Parameter-efficient transfer learning for nlp, in: ICML, 2019, pp. 2790–2799.
[25] L. T. Phong, Y. Aono, T. Hayashi, L. Wang, S. Moriai, Privacy-preserving deep learning: Revisited and enhanced, in: ATIS, 2017, pp. 100–110.
[26] H. Yin, A. Mallya, A. Vahdat, J. M. Alvarez, J. Kautz, P. Molchanov, See through gradients: Image batch recovery via gradinversion, in: CVPR, 2021, pp. 16337–16346.
[27] J. Sun, A. Li, B. Wang, H. Yang, H. Li, Y. Chen, Provable defense against privacy leakage in federated learning from representation perspective, arXiv:2012.06043 (2020).
[28] D. Scheliga, P. Mäder, M. Seeland, Precode-a generic model extension to prevent deep gradient leakage, in: WACV, 2022, pp. 1849–1858.
[29] P. Guo, C. Deng, L. Xu, X. Huang, Y. Zhang, Deep multi-task augmented feature learning via hierarchical graph neural network, in: Joint European Conference on Machine Learning and Knowledge Discovery in Databases, Springer, 2021, pp. 538–553.
[30] A. Shamsian, A. Navon, E. Fetaya, G. Chechik, Personalized federated learning using hypernetworks, in: ICML, 2021, pp. 9489–9502.
[31] A. Tashakori, W. Zhang, Z. J. Wang, P. Servati, Semipfl: personalized semi-supervised federated learning framework for edge intelligence, IEEE IOT 10 (10) (2023) 9161–9176.
[32] Y. Lin, H. Wang, W. Li, J. Shen, Federated learning with hyper-network—a case study on whole slide image analysis, Scientific Reports 13 (1) (2023) 1724.
[33] P. Guo, S. Zeng, Y. Wang, H. Fan, F. Wang, L. Qu, Selective aggregation for low-rank adaptation in federated learning, in: ICLR, 2025.
[34] C. F. Van Loan, The ubiquitous kronecker product, JACM 123 (1-2) (2000) 85–100.
[35] B. Zhao, K. R. Mopuri, H. Bilen, idlg: Improved deep leakage from gradients, arXiv:2001.02610 (2020).
[36] X. Li, K. Huang, W. Yang, S. Wang, Z. Zhang, On the convergence of fedavg on non-iid data, in: ICLR, 2020.
[37] H. Yu, S. Yang, S. Zhu, Parallel restarted sgd with faster convergence and less communication: Demystifying why model averaging works for deep learning, in: AAAI, Vol. 33, 2019, pp. 5693–5700.
[38] H. Karimi, J. Nutini, M. Schmidt, Linear convergence of gradient and proximal-gradient methods under the polyak-lojasiewicz condition, in: ECML-PKDD, 2016, pp. 795–811.
[39] J. Baxter, A model of inductive bias learning, JAIR 12 (2000) 149–198.
[40] G. Cohen, S. Afshar, J. Tapson, A. Van Schaik, Emnist: Extending mnist to handwritten letters, in: IJCNN, 2017, pp. 2921–2926.
[41] H. Xiao, K. Rasul, R. Vollgraf, Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms, arXiv:1708.07747 (2017).
[42] A. Krizhevsky, G. Hinton, et al., Learning multiple layers of features from tiny images (2009).
[43] L. N. Darlow, E. J. Crowley, A. Antoniou, A. J. Storkey, Cinic-10 is not imagenet or cifar-10, arXiv:1810.03505 (2018).
[44] P. Guo, S. Zeng, W. Chen, X. Zhang, W. Ren, Y. Zhou, L. Qu, A new federated learning framework against gradient inversion attacks, in: AAAI, Vol. 39, 2025, pp. 16969–16977.
[45] A. Bietti, C.-Y. Wei, M. Dudik, J. Langford, S. Wu, Personalization improves privacy-accuracy tradeoffs in federated learning, in: ICML, 2022, pp. 1945–1962.
[46] L. Qu, Y. Zhou, P. P. Liang, Y. Xia, F. Wang, E. Adeli, L. Fei-Fei, D. Rubin, Re-thinking architecture design for tackling data heterogeneity in federated learning, in: CVPR, 2022, pp. 10061–10071.