NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

CANIFE: Crafting Canaries for Empirical Privacy Measurement in Federated Learning

Samuel Maddock, Alexandre Sablayrolles, Pierre Stock

TL;DR

CANIFE (CANaries In Federated Environments) is a novel method for empirically measuring privacy leakage in Federated Learning (FL). By crafting adversarial "canary" samples that produce highly distinct model updates, researchers demonstrated that the actual privacy risk in realistic scenarios is often 4–5x lower than the conservative theoretical bounds provided by Differential Privacy (DP).

What Problem Does This Paper Address?

Federated Learning is designed to keep data private by training models locally on user devices and only sharing model updates with a central server. To further protect these updates from being "inverted" to reveal raw data, practitioners use Differential Privacy (DP), which adds noise to the updates.

However, DP theory is notoriously conservative. The privacy budget ($\epsilon$) calculated by theoretical "accountants" often results in values so high that they are practically vacuous—suggesting high risk when the actual leakage might be minimal. This paper addresses the need for a tighter, empirical measurement of privacy that reflects what a realistic, strong adversary could actually achieve.

Methods

The authors introduce CANIFE, an attack-based auditing tool. Unlike previous methods that use natural data samples as "canaries" to track memorization, CANIFE crafts them.

  1. Canary Crafting: A rogue client uses a small "design pool" of public data to emulate other clients. It then optimizes a canary sample $z$ such that its gradient is as orthogonal as possible to the gradients of the honest clients. This ensures the canary's update stands out as an extreme outlier in the aggregated model update.
  2. Membership Inference: The adversary inserts this canary into a training round with 50% probability. After the server aggregates the updates and adds DP noise, the adversary performs a statistical test on the public global update to detect if their canary was present.
  3. Empirical Epsilon ($\hat{\epsilon}$): By repeating this over many "mock" rounds, the authors calculate the False Positive and False Negative rates of the attack. They then translate these rates into a per-round empirical privacy measure ($\hat{\epsilon}_r$) and compound them over the entire training process using standard DP accounting (RDP).
Figure 2: Illustration of the proposed CANIFE method for one training round. The adversary is a rogue client that crafts a training sample resulting in an extremely out-of-distribution model update uc and performs a membership inference attack on the (public) aggregated noisy model update ˜u provided to the server by SecAgg. Attack results are converted to empirical privacy guarantees ˆε for this round. We then compound these guarantees over the course over the training as in Section 3.4.

Datasets

The method was evaluated using the LEAF benchmark, which provides realistic, non-IID (not identically and independently distributed) data splits for federated settings:

  • Vision: CIFAR-10 (IID setup for toy experiments) and CelebA (non-IID face image classification).
  • Language: Sent140 (Twitter sentiment analysis) and Shakespeare (next-character prediction).

Key Insights and Ideas

  • The Theory-Practice Gap: The most significant finding is the massive gap between theoretical guarantees and empirical reality. Theoretical DP assumes a "worst-case" update vector, whereas CANIFE targets the "worst-case" data sample. Because data samples must pass through the model's gradient function, their influence is naturally constrained, leading to much lower actual leakage.
  • Realistic Threat Model: The authors assume an "honest-but-curious" server and a rogue client. This is more practical than assuming a malicious server that can poison the entire global model, which is a common but often unrealistic assumption in other privacy research.
  • Efficiency: Crafting a canary is computationally lightweight. It takes only a few minutes on a GPU or about 10 minutes on a standard CPU, making it a viable tool for real-time privacy monitoring during training.
  • Stability: Empirical privacy leakage ($\hat{\epsilon}_r$) tends to stabilize quickly after the first few epochs of training, suggesting that privacy risks don't necessarily escalate uncontrollably as training progresses.

Key Results

The core result is that CANIFE provides a much tighter estimate of privacy than theoretical bounds.

  • 4-5x Lower Leakage: Across all benchmarks, the empirical $\hat{\epsilon}$ was consistently 4 to 5 times lower than the theoretical $\epsilon$.
  • CelebA Example: For a model trained with a formal theoretical guarantee of $\epsilon = 50$, CANIFE measured an empirical leakage of only $\hat{\epsilon} \approx 6$.
  • Attack Success: In non-private settings ($\sigma=0$), the attack is nearly perfect, but as DP noise increases, the ability to distinguish the canary drops significantly, as shown in the histograms of attack scores.
Figure 1: Empirical privacy measurements over the course of FL training for LEAF benchmarks Sent140, CelebA and Shakespeare with ε ∈{10, 30, 50}. We observe a notable gap between the theoretical ε obtained with DP-FEDSGD and the empirical ˆε obtained with CANIFE.

Limitations and Future Work

  • Design Pool Assumptions: The attack assumes the adversary has access to a "design pool" of data that roughly matches the target distribution. While the authors show the attack is robust even with small pools, in highly specialized domains, finding such data might be difficult.
  • Frozen Rounds: The current implementation requires "freezing" the model for several rounds to compute attack scores. The authors suggest "running measurements"—where the attack happens alongside normal training—as a future extension to avoid wasting computation.
  • Multiple Local Epochs: The paper primarily focuses on clients performing a single local epoch. Extending CANIFE to handle multiple local epochs requires backpropagating through the entire local optimization chain, which is more computationally intensive.

Summary updated

BibTeX
@inproceedings{maddock2023canife,
  author = {Samuel Maddock and Alexandre Sablayrolles and Pierre Stock},
  title = {{CANIFE: Crafting Canaries for Empirical Privacy Measurement in Federated Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=Kf7Yyf4O0u},
}
Figure