Learning to Backdoor Federated Learning

Henger Li, Chen Wu, Sencun Zhu, Zizhan Zheng

TL;DR

Researchers have developed a new reinforcement learning (RL) based framework that can successfully inject persistent backdoors into Federated Learning (FL) systems, even when state-of-the-art defenses are active. By modeling the attack as a sequential decision-making problem, the framework learns to bypass both training-stage aggregation rules and post-training mitigation techniques, highlighting a significant gap in current FL security.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple clients to collaboratively train a global model without sharing their raw data. While privacy-preserving, this distributed nature makes FL vulnerable to backdoor attacks, where a malicious participant injects a "trigger" into the model (e.g., a specific pixel pattern that causes an image classifier to mislabel a "1" as a "7").

Existing defenses fall into two categories:

  1. Training-stage defenses: Robust aggregation rules (like Krum or Median) that try to filter out malicious updates during training.
  2. Post-training defenses: Techniques (like Pruning or Neuron Clipping) that attempt to remove backdoors from the final model.

The authors argue that current backdoor attacks are mostly myopic heuristics—they focus on maximizing damage in a single round without considering the long-term impact of defenses. This leads to a "false sense of security," as these defenses appear effective only because the attacks are relatively simple.

Methods

The paper introduces a general RL-based attack framework. Instead of using fixed rules, the attacker learns an optimal attack policy by interacting with a simulated FL environment.

1. The MDP Formulation

The authors frame the attack as a Markov Decision Process (MDP):

  • State: The current global model parameters and the set of malicious devices sampled for the round.
  • Action: The specific poisoned model updates sent to the server.
  • Reward: A function that balances performance on the "main task" (accuracy on clean data) and the "backdoor task" (accuracy on triggered data), while accounting for the server's defense mechanisms.

2. The "Double Whammy" Backdoor Attack (DWBA)

To make the RL problem tractable (since model parameter spaces are huge), they use a two-step approach to compress the action space:

  • Local Search: The attacker first generates a candidate update using a mix of clean and poisoned data.
  • Model Crafting: The attacker then fine-tunes this update by modifying a fraction of the parameters that differ most from a "benign" update, helping the attack blend in.

The RL agent (trained using the Twin Delayed DDPG (TD3) algorithm) optimizes the hyperparameters for these two steps—such as the poison ratio, learning rate, and scaling factors—rather than every single weight in the neural network.

3. The "World Model"

Crucially, the attack is trained offline in a simulator. The attacker uses their own local data and "common knowledge" (like the number of participants and the defense type) to build a "world model" that mimics the real FL environment.

Datasets

The framework was evaluated using two standard computer vision benchmarks:

  • MNIST: A dataset of handwritten digits. The goal was to misclassify "1" as "7".
  • CIFAR-10: A dataset of color images across 10 classes. The goal was to misclassify "airplane" as "truck".

Key Insights and Ideas

  • Non-Myopic Strategy: By using RL, the attacker can "anticipate" how a defense will react in future rounds. This allows for a more subtle, persistent attack that builds up over time rather than a loud, easily detectable one.
  • Defenses as Rewards: The framework treats post-training defenses (like Pruning) as part of the environment. The RL agent learns to produce updates that are inherently resistant to being "pruned" away.
  • Durability is King: A major finding is that RL-based attacks are significantly more durable. Even after the malicious devices stop participating, the backdoor remains embedded in the global model for much longer than with traditional attacks.
  • White-Box Necessity: The attack's success heavily depends on knowing the server's defense mechanism. A "black-box" attack (where the attacker guesses the defense) is much less effective, as shown in the paper's ablation studies.

Key Results

The RL-based attack consistently outperformed state-of-the-art baselines like BFL (Bagdasaryan et al.) and DBA (Xie et al.) across various defenses.

  • Bypassing Robust Aggregation: Under Krum and Median defenses, the RL attack reached ~100% backdoor accuracy within 100 rounds, while baselines fluctuated or failed to reach high accuracy.
Comparison of global model accuracy under Krum, Median, and Norm-Bounding defenses.
  • Overcoming Post-Training Mitigation: The attack successfully bypassed Neuron Clipping and Pruning by incorporating their effects into the RL training process.
Global model accuracy under Neuron Clipping and Pruning defenses.
  • Superior Durability: In a "stop-attack" scenario (attacking only for the first 100 rounds), the RL attack maintained 80% backdoor accuracy at round 300, whereas all other methods dropped below 40%.
Backdoor durability comparison.

Limitations and Future Work

  • White-Box Assumption: The current framework requires the attacker to know the server's defense strategy to build an accurate simulator. The authors noted that a "black-box" RL attack currently fails because the learned policy is too aggressive for unknown defenses.
  • Computational Cost: Training a deep RL policy on a simulated FL environment is computationally expensive compared to simple heuristic attacks.
  • Future Direction: The authors suggest exploring constrained RL, where the agent must maintain a specific level of main-task accuracy as a hard constraint, rather than just a weighted part of the reward function. They also highlight the need for more adaptive defenses that can counter these non-myopic threats.

Summary updated

BibTeX
@inproceedings{li2023learning,
  author = {Henger Li and Chen Wu and Sencun Zhu and Zizhan Zheng},
  title = {{Learning to Backdoor Federated Learning}},
  booktitle = {BANDS @ ICLR},
  year = {2023},
  url = {https://openreview.net/forum?id=Kr-wt_gv40},
}
Figure