In federated learning, many devices or hospitals train one shared model without pooling their raw data, and a server combines their updates. The standard rule, Federated Averaging (FedAvg), weights each client by its total number of examples. When clients see very different label mixes, that rule fails: a hospital that has never seen a disease still votes on how the model recognizes it. The fix in the literature is to weight each client's contribution class by class according to how much of that class it actually has. Doing so requires the server to learn each client's per-class counts or per-class classifier updates, and those are exactly the signals that attacks use to recover private label distributions and even images. Two goals are in tension: making clients act as reliable "teachers" only for the classes they know, and keeping private what each client knows.
This note proposes a way to get class-wise weighting without exposing the weights. Count-weighted averaging of each class's classifier row is a ratio of two sums. Each client can therefore send its count-scaled update and its class proportions inside a cryptographic secure-aggregation sum, with calibrated noise added before summation. The server divides the noisy sums and never sees any individual client's weights. Combined with clipping each class row separately rather than clipping the whole update as one vector, this should recover most of the rare-class accuracy that differential privacy normally destroys. It should also give a formal ceiling on label-distribution attacks that currently succeed perfectly.
Core Claim
Class-wise expertise weighting and formal privacy are not in conflict, because the weighting can be computed entirely from sums. Once that is true, the dominant remaining loss in private non-IID training comes from clipping, and specifically from one shared clipping threshold that starves rare classes. Clipping per class block removes most of that loss at no extra privacy cost. The claimed result is this: under client-level differential privacy at a fixed budget, ratio-form class-wise aggregation with per-class clipping beats both private FedAvg and private FedAvg with adaptive clipping on rare-class and balanced accuracy. It does so under severe label skew while holding label-distribution recovery by an active server near the level the privacy budget predicts.
This differs from the closest work in three specific ways. Baoxin Li et al. weight the final classification layer by per-class sample counts, and Hao Chen et al. do class-distribution-aware aggregation for clinical label mismatch. Both assume the server can see those counts. Learning Critically (FedSSD) instead estimates class credibility on a server-side auxiliary dataset and sends unperturbed signals. AdaptDP-FedAvg adapts a single clipping radius from the root-mean-square of gradient norms, which is uniform across classes. We keep class weighting, hide it inside the aggregate, privatize it, and make clipping class-specific.
Why This Gap Is Real
Three findings motivate the work.
First, the classifier layer carries the skew. Donghee Kim et al. show that classifier-head weight vectors are far more sensitive to local label imbalance than feature layers: rows of over-represented classes grow in norm and rows of absent classes collapse. Naive averaging propagates this damage, as argued by Mingyi Li et al. and Yinlin Zhu et al..
Second, that same layer is the leakage channel. - Towards Eliminating Hard Label Constraints proves that the final layer's gradient is a scaled copy of the input's feature vector, and recovers labels with over 99% accuracy on CIFAR-100 even under label smoothing and mixup.
- Breaking Secure Aggregation (LIA-SA) shows that a malicious server can tamper with one batch-normalization layer in a "fishing model." It can then solve a linear system over aggregated classifier-bias gradients and recover every client's label distribution with 100% accuracy, at batch sizes up to 5,120.
Secure aggregation alone is therefore not a defense. Whatever we sum must also be noised.
Third, differential privacy (DP) hits rare classes hardest. DP is a formal guarantee that the output barely changes when one participant is removed. It is usually enforced by clipping each contribution to a norm bound and adding Gaussian noise. Differential Privacy Under Class Imbalance shows in centralized tabular data that clipping and noise disproportionately harm minority classes. Their gradients are larger, so clipping cuts them more, and their total signal is weaker.
One paper constrains the design. Deep Leakage from Gradients finds that noise stops reconstruction only above a variance of about $10^{-2}$, at a large accuracy cost. So we do not claim noise alone defeats image reconstruction at a usable budget. We claim a formal bound on what the aggregate reveals, together with better utility at that bound.
Research Program
Aggregation rule. Split the model into a feature extractor and a classifier head with one row per class $c$. Client $k$ computes its round update: $\Delta^{f}_k$ for the feature extractor and $\Delta_{k,c}$ for each head row. It also computes its local class proportions $p_{k,c}$, which sum to one over classes, and a capped size factor $s_k=\min(n_k,m)/m$. Here $n_k$ is the client's example count and $m$ is a public cap. Its reliability weight for class $c$ is $a_{k,c}=s_k\,p_{k,c}$, a proportional stand-in for its count of class $c$.
Each client clips per block. It clips the feature block to radius $C_f$ and clips each weighted head row $a_{k,c}\Delta_{k,c}$ to its own radius $C_c$. It sends these blocks and the vector $a_{k,\cdot}$ through secure aggregation, with distributed Gaussian noise so that only the noisy sum is ever decryptable. The server forms
$$\hat\Delta_c=\frac{\sum_k \mathrm{clip}_{C_c}(a_{k,c}\Delta_{k,c})+\xi_c}{\max\big(\tau,\ \sum_k a_{k,c}+\zeta_c\big)},$$
where $\xi_c$ and $\zeta_c$ are the Gaussian noise terms on the numerator and denominator, and $\tau>0$ is a public floor that keeps classes with almost no support from blowing up. The feature extractor is updated by the ordinary noisy average.
Privacy accounting. Each client's message has ℓ2 norm at most
$$S=\sqrt{C_f^2+\textstyle\sum_c C_c^2+1},$$
where the final $1$ bounds the proportion vector, since $\|a_{k,\cdot}\|_2\le 1$. Client-level privacy then follows from the standard subsampled Gaussian mechanism with noise $\sigma S$, accounted with Rényi DP as in AdaptDP-FedAvg.
The key observation is that, with $S$ fixed, how the budget is divided among the per-class radii $C_c$ does not change the privacy cost. It changes only which classes suffer clipping bias. A single global threshold implicitly gives rare-class rows a tiny share once majority classes dominate the vector's norm.
Choosing the radii. We set each $C_c$ from a privately estimated per-class norm statistic. This extends AdaptDP-FedAvg's root-mean-square rule from one scalar to one value per class, with a small, separately accounted slice of budget. That slice is redistributed so that $S$ stays constant.
Server-to-client direction. The noisy denominators $\sum_k a_{k,c}+\zeta_c$ are a private, post-processed estimate of how much global support each class has. Broadcasting them costs no additional privacy. Clients can use them as class-credibility weights when distilling from the global model, in the spirit of FedSSD's class-level credibility, but without FedSSD's server auxiliary data. This component is secondary and is ablated separately.
Analysis. We will derive the bias of the ratio estimator as a function of each class's total support $A_c=\sum_k a_{k,c}$ and the noise scale. The bias is small when $A_c\gg\sigma$ and is controlled by $\tau$ otherwise. This analysis predicts which classes are recoverable at a given budget and client population, and the prediction is checked directly.
Baselines
Private FedAvg (the naive reference). This is DP-FedAvg: FedAvg on whole updates, with one fixed clipping norm per client, noise of multiplier $\sigma$, and the same client sampling and secure aggregation. It is the default deployed method, so every gain is measured against it. It is tuned over the same grid of clipping norms and learning rates as our method, with the same number of trials and the same accountant, and is reported at matched $(\epsilon,\delta)$. A non-private FedAvg run sets the utility ceiling. As anchors, FedHydra reports non-private FedAvg at 14.96% accuracy on CIFAR-10 at Dirichlet $\alpha=0.01$, and FedSSD reports 70.49% at Dirichlet 0.5. These are useful references, though their client counts differ from ours.
AdaptDP-FedAvg (the strongest private competitor). Adaptive Clipping for Differential Private Federated Learning in Interpolation Regimes is the closest method that attacks the clipping-bias half of the problem. It is the method most likely to explain away our gains if clipping is all that matters. It is run with its own root-mean-square adaptive radius, under the same total budget and the same tuning trials. No reported result was found on Lacuna for AdaptDP-FedAvg on label-skewed CIFAR-10/100 or MedMNIST. The nearest private reported number in the file is FL-TOP: 0.81 accuracy on Fashion-MNIST at 0.5% of weights updated, versus 0.56 for standard private training. We include FL-TOP on Fashion-MNIST to connect to that figure. Beating AdaptDP-FedAvg means a statistically significant gain, over five seeds, in balanced accuracy and in mean accuracy over the rarest 20% of classes at $\epsilon\in\{2,4,8\}$, with overall accuracy no worse.
Non-private class-wise aggregation (the utility target). This is count-weighted head aggregation in the style of Baoxin Li et al., together with FedSSD. These show how much of the non-private class-weighting gain survives privatization. FedSSD reports 73.38% on CIFAR-10 at Dirichlet 0.5.
Ablations isolating the key ingredients. Three ablations are run:
- ratio aggregation with a single global clip, which isolates per-class clipping;
- per-class clipping with plain FedAvg weighting, which isolates the hidden class weights;
- the full method without the broadcast credibility signal.
Why not just…?
Why not just have clients send locally noised class counts in the clear and do Baoxin-Li-style weighting? This is the most direct competitor and a real threat at large privacy budgets. Its weakness is structural. Local noise is added per client, so the total noise variance on each class's support grows with the number of clients. Our sum-then-divide approach adds noise once to the aggregate. In addition, the head-row updates themselves still go out in the clear, or must be separately noised per client. We run this local-DP-counts variant at matched budget. If it matches us at $\epsilon=8$ but falls behind at $\epsilon\le 4$ on rare classes, that confirms the expected variance gap. If it matches everywhere, the hidden-weight component is unnecessary and the contribution reduces to per-class clipping.
Why not just use private FedAvg with a class-balanced local loss, such as logit adjustment? This changes only the clients' training objective, costs nothing in privacy, and may fix much of the head-norm imbalance that Donghee Kim et al. describe. Nothing in the file rules it out. We therefore treat it as a baseline and also apply it on top of our method. The claim survives only if class-wise ratio aggregation adds a significant rare-class gain beyond the balanced loss. That gain should appear where a client has zero examples of a class, which a reweighted local loss cannot help.
Why not just rely on secure aggregation with no noise? LIA-SA recovers individual label distributions with 100% accuracy through secure aggregation. Our attack evaluation runs LIA-SA against a noise-free secure-aggregation version of our own rule. We expect near-perfect recovery there, which is exactly the motivation for the noise.
Why not just prune or sparsify gradients? Pruning has no formal guarantee. It also removes small-magnitude updates, which under label skew are disproportionately the rare-class rows. We include top-k sparsification at matched communication as a heuristic comparison but make no privacy claim for it.
Proposed Experiments
Data and partitions. We use CIFAR-10 and CIFAR-100 with Dirichlet label partitions at $\alpha\in\{0.5,0.1,0.01\}$ and a two-classes-per-client partition. We add Fashion-MNIST, and MedMNIST v2 (MedMNIST v2) partitioned to mimic hospitals that do not host certain diagnoses.
Client-level DP needs many clients, so we simulate 500 clients with 10% sampled per round, and also report 2,000 clients on CIFAR-10 to show how results scale with population. Models are a small CNN and a ResNet-18. Budgets are $\epsilon\in\{1,2,4,8\}$ with $\delta=10^{-5}$.
Utility metrics. We report overall accuracy, balanced accuracy, and accuracy on the rarest 20% of classes ranked by global support. The rarest-class metric is the primary endpoint, because it is where theory predicts the gap.
Leakage metrics. We measure three attacks:
- LIA-SA run as an active fishing-model server, scored by total-variation error between recovered and true client label proportions;
- the analytical head-gradient attack of Towards Eliminating Hard Label Constraints, run against a single client's contribution as a worst case where secure aggregation is assumed broken, scored by label recovery;
- DLG reconstruction peak signal-to-noise ratio (PSNR) on small batches.
As a sanity line for label inference, we compare attack advantage to the bound $1-\frac{2}{1+e^\epsilon}$ from Does Label Differential Privacy Prevent Label Inference Attacks?. That bound strictly applies to label-DP, so it is used as a reference rather than a guarantee for our client-level setting.
Decisive checks. 1. At $\alpha=0.01$ and $\epsilon=4$, the full method must beat AdaptDP-FedAvg on rarest-class accuracy. The single-global-clip ablation must lose most of that gain. Otherwise the per-class clipping story is wrong. 2. At $\alpha=0.5$, gains should shrink toward zero. If they do not, the improvement comes from something other than skew, and we will look for it. 3. Measured per-class bias should follow the predicted dependence on total class support. Classes with $A_c$ below the noise scale should fall back toward the floor $\tau$. 4. LIA-SA recovery error should rise from near zero without noise to near-uniform guessing at small $\epsilon$. The DLG ablation is expected to show limited protection at moderate $\epsilon$, consistent with Deep Leakage from Gradients, and we will report it as such. 5. The local-DP-counts and balanced-loss comparisons determine whether the hidden-weight and class-wise aggregation components survive. Each is kept in the final method only if it wins at matched budget.
References
- Fedns: Improving Federated Learning for Collaborative Image Classification on Mobile Clients
- Scale Federated Learning for Label Set Mismatch in Medical Image Classification
- Learning Critically: Selective Self Distillation in Federated Learning on Non-IID Data
- Adaptive Clipping for Differential Private Federated Learning in Interpolation Regimes
- Knowledge Is Not Wisdom: Weight Balancing Mechanism for Local and Global Training in Federated Learning
- Resource-Aware Federated Self-Supervised Learning with Global Class Representations
- FedTAD: Topology-aware Data-free Knowledge Distillation for Subgraph Federated Learning
- Towards Eliminating Hard Label Constraints in Gradient Inversion Attacks
- Breaking Secure Aggregation: Label Leakage from Aggregated Gradients in Federated Learning
- Differential Privacy Under Class Imbalance: Methods and Empirical Insights
- Deep Leakage from Gradients
- A Unified Solution to Diverse Heterogeneities in One-Shot Federated Learning
- Constrained differentially private federated learning for low-bandwidth devices
- MedMNIST v2 - A large-scale lightweight benchmark for 2D and 3D biomedical image classification
- Does Label Differential Privacy Prevent Label Inference Attacks?