In federated learning, many organizations or devices jointly train a model without pooling their data. When everyone starts from a strong pretrained network, there is a much cheaper variant. Each client runs its local images through a frozen pretrained feature extractor, sends a few summary statistics, and the server builds a classifier in closed form in one round. The best current method of this kind, FedCOF, has every client send each class's mean feature vector together with the exact number of examples behind it. Those counts are sensitive in their own right. In a hospital federation, the number of positive cases per diagnosis at each site is exactly the operational volume that size-hiding cryptography tries to protect. Even if the counts were withheld, the means themselves would betray them: a mean computed from 5 samples is visibly noisier than one computed from 500.
We propose a simple change to what clients release. Each client splits its examples of a class into disjoint groups of exactly $b$ examples, discards the leftover, and sends one mean per group. Every released vector then has the same statistical shape whatever the client's size. The server can rebuild global class means and covariances from these vectors without ever seeing a count. What it learns about client size is only $\lfloor n_{k,c}/b \rfloor$, where $n_{k,c}$ is client $k$'s number of examples of class $c$. The granularity $b$ is the privacy knob. The open empirical question is how much accuracy this costs under the extreme quantity skew of real federations, and whether a strong attacker can still recover sizes from the released vectors.
Core Claim
In frozen-backbone federated transfer, client sample counts are not needed to build a good classifier. If every released statistic is a mean over exactly $b$ samples, then conditional on the client's data distribution, the joint distribution of what a client sends depends on its size only through the number of vectors it sends. This yields an exact size-hiding statement at granularity $b$. The cost is two things: the discarded remainder of fewer than $b$ samples per class per client, and the loss of classes a client holds fewer than $b$ times. We expect this cost to be small on the head of the distribution and real on the tail. The proposal is designed to measure both sides honestly.
This sits between two literatures that have not met. On the federated transfer side, pretrained initialization is the main reason federated learning works under heterogeneous data. Where to Begin? shows that it aligns client gradients and closes the gap between simple and specialized optimizers. FedCOF takes this to its limit with training-free, one-shot aggregation of class means. It exploits the fact that the spread of client means estimates the within-class covariance, but its estimator explicitly requires exact per-class counts. FedCOF also already splits small clients' data into multiple parts to keep the estimate stable. We reuse that splitting trick and the mean-spread identity. We differ in standardizing the split size so that the counts become unnecessary.
The formal private-transfer theory of Federated Transfer Learning with Differential Privacy treats $n_k$ as public, because its minimax-optimal weights depend on it. Our scheme recovers count-proportional weighting implicitly, since a client sending $J$ vectors gets $J$ votes, without disclosure.
On the cardinality side, Hiding the Input-Size in Secure Two-Party Computation formalizes size hiding and shows that general solutions need circuit-private fully homomorphic encryption. Its impossibility results also show that transcript length itself leaks size. Our scheme accepts that the number of vectors is a transcript-length leak and caps it at granularity $b$, rather than attempting full hiding. Privacy Amplification via Random Check-Ins hides the total number of participating clients but not each client's sample count, which is the quantity we target.
Dataset Size Recovery from LoRA Weights (DSiRe) provides both the motivation and the attack template. It shows that fine-tuned low-rank adapter weights reveal training-set size: mean absolute error of 1.48 images on the 1–50 range and 91.9% coarse-range accuracy on its LoRA-WiSE benchmark. It does this by matching spectral features against a reference library of models of known size. That work is centralized and offers no defense. We transplant its reference-library attack to federated summary statistics.
Research Program
The protocol is minimal. For each class $c$, client $k$ randomly partitions its $n_{k,c}$ feature vectors into $J_{k,c} = \lfloor n_{k,c}/b \rfloor$ disjoint groups of exactly $b$, discards the rest, and sends the group means $u_{k,c,1},\dots,u_{k,c,J}$. Classes with $J_{k,c}=0$ send nothing.
If features within a client and class are independent draws with mean $\mu_{k,c}$ and covariance $\Sigma_c$, each unit mean has covariance $\Sigma_c/b$. The server can therefore estimate the global mean by averaging all units. It estimates the within-class covariance as
$$\hat\Sigma_c = \frac{b}{\sum_k (J_{k,c}-1)} \sum_k \sum_{j=1}^{J_{k,c}} (u_{k,c,j}-\bar u_{k,c})(u_{k,c,j}-\bar u_{k,c})^\top ,$$
where $\bar u_{k,c}$ is client $k$'s average unit. This is the FedCOF mean-spread identity with the unknown count replaced by the public constant $b$. Because the spread is computed within each client, the estimate is not inflated by differences between clients. FedCOF's across-client version must handle that inflation, so this may be a side benefit; it is a hypothesis we will test, not a claim.
The classifier is then built exactly as in FedCOF, using shrinkage and the ridge-regression head. Two optional layers address limits of the base scheme. First, because each record lies in exactly one unit of size $b$, adding Gaussian noise to units gives record-level differential privacy with sensitivity proportional to $1/b$, and the guarantee composes in parallel across units. Second, classes that a client holds fewer than $b$ times can be routed through ordinary secure aggregation of $d$-dimensional sums and counts, where $d$ is the feature dimension. The server then sees only the total across many small contributors. This channel costs $d$ numbers per client, not $d^2$, and only the pooled count is revealed.
The analysis has three parts. The first is the exact size-hiding statement and its caveat: the guarantee is conditional on the client's data distribution, so if larger clients have systematically different feature distributions, size can still leak. The second is a bias bound for the flooring of $n_{k,c}/b$; the relative weight error is at most $b/n_{k,c}$. The third is an attack suite.
The main attacker follows DSiRe. We simulate many reference federations with known counts, extract features from whatever each scheme releases, and train nearest-neighbor and gradient-boosted regressors to predict $n_{k,c}$. The released features include count fields, the norm of each client's mean deviation from the global mean, and the within-client unit spread. A second, membership-style attacker asks only whether client $k$ holds class $c$ at all. This is in the spirit of the set-membership threats in AnonPSI, which showed that released counts enable re-identification even under differential privacy. For our scheme, the attacker succeeds only if it beats the oracle that already knows $\lfloor n_{k,c}/b\rfloor$.
We deliberately scope out low-rank fine-tuning such as YOCO, where the leakage runs through trained weights rather than sent statistics. The fixed-size-unit principle suggests an analogue there: train per unit on exactly $b$ samples. That is a follow-up whose feasibility depends on what we learn here.
Baselines
The first baseline is FedCOF exactly as published, with exact per-class counts sent alongside means. It is the strongest existing method for one-shot frozen-backbone federated classification. The file reports that it improves accuracy by 4–26 points over first-order mean sharing (FedNCM) at the same communication budget. On iNat-120K it matches or beats covariance-sharing Fed3R while sending 280 MB instead of 61,000 MB (FedCOF). No absolute per-dataset accuracy for FedCOF was found on Lacuna, so we reproduce it ourselves on identical frozen features and partitions. It serves as the utility ceiling and the privacy floor. Beating it means staying within one accuracy point of it while reducing count recovery to the $\lfloor n/b\rfloor$ oracle.
The naive reference point is FedCOF with counts simply removed and all clients weighted equally. Under the FLAIR quantity skew, where the top 2.3% of users hold as much data as the bottom 97.7% (FLAIR), equal weighting should both bias the covariance estimate and leave the means' own noise level as a size signal.
The third baseline is FedCOF with Laplace-noised counts, tuned so the count field alone gives the same attacker error as our granularity $b$. All baselines use the same backbone, partitions, and shrinkage-and-ridge hyperparameter grid, chosen on a held-out client split with an equal search budget for each method.
The fourth baseline is secure aggregation of count-weighted sufficient statistics. It hides individual counts but requires each client to send a $d\times d$ outer-product term. We report its communication against the 61,000 MB Fed3R figure as a reference scale.
The key ablation is FedCOF's own variable-size splitting with counts withheld. It keeps everything in our method except the fixed group size, and so isolates whether standardizing the size is what removes the leak.
Why not just…?
Why not just add noise to the counts? This protects the count field but not the means. Under weak heterogeneity, the squared distance of a client's class mean from the global mean scales like $\mathrm{tr}(\Sigma_c)/n_{k,c}$, so many released means let an attacker regress size directly. The DSiRe-style attacker run against the noised-count baseline will show whether this implicit channel is strong in practice. If it is weak on real non-IID partitions, noisy counts become a serious competitor, and we will report that.
Why not just drop the counts and weight clients equally? Equal weighting gives a two-image user the same influence as a five-hundred-image user. It also abandons the count-proportional weighting that Federated Transfer Learning with Differential Privacy shows is needed for optimal private aggregation. The same mean-noise leak also remains. FLAIR's natural partition is the test where this should fail visibly.
Why not just use secure aggregation? For the means alone it is cheap, and we in fact use it for small contributors. But FedCOF's covariance needs per-client second-order terms. Aggregating those securely means sending $d^2$ numbers per client, which removes the very communication saving that justifies FedCOF. Secure aggregation also still reveals the per-class totals, which can be differenced in small cross-silo federations. It is a real alternative when $d$ is small, and the communication column will show where the crossover lies.
Isn't this just FedCOF's splitting trick? Largely yes, and that is the point. The contribution is showing that fixing the split size makes counts unnecessary for both the mean and covariance estimates. We pair that with a precise statement of what still leaks and an attack evaluation. If the variable-size ablation turns out to be equally private, the fixed size is not the active ingredient, and we will say so.
Proposed Experiments
We use FedCOF's datasets (CIFAR-100, ImageNet-R, CUB200, Stanford Cars, iNat-120K) with FedCOF's frozen backbone and heterogeneous partitions. We add quantity-skewed Dirichlet partitions, and FLAIR with its native Flickr-user partition and ImageNet-pretrained ResNet-18 features at both 17 coarse and 1,628 fine labels. We sweep $b \in \{4, 8, 16, 32, 64\}$. Metrics are top-1 accuracy (average precision on FLAIR's multi-label task), bytes sent, the attacker's mean absolute error and exact-bucket accuracy for $n_{k,c}$, and the class-presence attacker's area under the ROC curve, each relative to the $\lfloor n/b\rfloor$ oracle.
Three decisive checks determine whether the idea holds. First, the attacker must recover counts substantially better than the oracle against the noised-count and equal-weight baselines, but not against fixed-size units. If units leak beyond the oracle, the conditional-distribution caveat is biting, and we will measure how much client size predicts feature diversity. Second, on FLAIR coarse labels, fixed-size units at $b=16$ should stay within about one average-precision point of exact-count FedCOF. If they do not, the discarded remainder matters more than the pretrained features can absorb, and the method is not worth its privacy. Third, on FLAIR fine labels, where private training already collapses to 12.3% AP even with pretraining (FLAIR), we measure how much of the tail survives with and without the secure-aggregation channel for small contributors. This tells us whether count-free release is viable for long-tail federations or only for their heads.
References
- Where to Begin? On the Impact of Pre-Training and Initialization in Federated Learning
- Covariances for Free: Exploiting Mean Distributions for Training-free Federated Learning
- Federated Transfer Learning with Differential Privacy
- Hiding the Input-Size in Secure Two-Party Computation
- Privacy Amplification via Random Check-Ins
- Dataset Size Recovery from LoRA Weights
- AnonPSI: An Anonymity Assessment Framework for PSI
- You Only Communicate Once: One-shot Federated Low-Rank Adaptation of MLLM
- FLAIR: Federated Learning Annotated Image Repository