Research, tech report, EP-2410
How Many Poisoned Clients Can Federated Averaging Survive? A Reproducible Baseline
Eschon Research Unit,
Abstract
In federated learning, a central step averages the updates sent by participants. If a few participants send bad updates, on purpose or by accident, the average can be ruined. Several aggregation rules were designed to resist this. We run five of them, plus plain averaging, on a small public dataset with 20 simulated clients and two kinds of attack, and report what happens as the number of attackers grows.
This is a toy-scale baseline, not a production result. The model has 650 parameters. We publish it because the rules are simple enough to check, the numbers are reproducible, and the main finding is easy to state: robust aggregation gives you a cliff, not a slope.
Notice: this paper replaces EP-2402
EP-2402 ("BFT-FedAvg++") has been withdrawn. It reported accuracy figures from a network of 1,400 nodes, but the code and data behind those figures are not available for anyone to check. This paper is a replacement in subject, not in method. It makes no claim about the earlier system.
1. What we ran
- Data. The digits dataset bundled with scikit-learn: 1,797 images of 8 by 8 pixels, ten classes. 75% for training, 25% held out for testing.
- Model. Softmax regression with 650 parameters, trained with local gradient steps.
- Clients. 20 clients with label-skewed data (each class is shared across clients with Dirichlet weights, so clients see different mixes of digits).
- Training. 30 rounds. Each round, every client takes 5 local steps from the current global model and sends back the change.
- Attacks. A fraction of clients is malicious. Two attacks:
- Sign flip: the client computes an honest update, then sends it reversed and multiplied by 5.
- Label flip: the client trains honestly, but on labels shifted by one (a 3 is labelled as 4).
- Aggregation rules.
- Mean: plain federated averaging.
- Median: the median of each coordinate.
- Trimmed mean: drop the 30% highest and 30% lowest values of each coordinate, average the rest.
- Krum: pick the single update closest to its neighbours.
- Multi-Krum: average the best-scoring updates, dropping the worst few.
- Repeats. Every cell below is the mean of 10 random seeds. Seeds change how the data is split and which clients are malicious, not the method.
Krum and multi-Krum need to be told how many clients may be malicious. We report two versions of multi-Krum: one told the true number (an oracle, which no real deployment has) and one told a fixed bound of 6 out of 20, which is the realistic setting.
2. Results
Test accuracy in percent, after 30 rounds. Without any attack, plain averaging reaches 96.3%.
Attack: sign flip
| Attackers | Mean | Median | Trimmed mean | Krum | Multi-Krum (true count) | Multi-Krum (assumes 6) |
|---|---|---|---|---|---|---|
| 0 of 20 | 96.3 | 95.8 | 95.9 | 87.1 | 96.3 | 95.9 |
| 2 of 20 | 48.3 | 95.5 | 95.6 | 86.4 | 96.4 | 95.9 |
| 4 of 20 | 4.3 | 93.3 | 93.7 | 85.9 | 96.3 | 95.8 |
| 6 of 20 | 0.3 | 90.4 | 90.0 | 84.5 | 96.0 | 96.0 |
| 8 of 20 | 0.2 | 81.1 | 10.8 | 85.1 | 95.6 | 23.5 |
| 9 of 20 | 0.3 | 62.8 | 1.0 | 83.4 | 95.8 | 1.4 |
Attack: label flip
| Attackers | Mean | Median | Trimmed mean | Krum | Multi-Krum (true count) | Multi-Krum (assumes 6) |
|---|---|---|---|---|---|---|
| 0 of 20 | 96.3 | 95.8 | 95.9 | 87.1 | 96.3 | 95.9 |
| 2 of 20 | 94.3 | 95.9 | 96.1 | 86.4 | 96.4 | 95.9 |
| 4 of 20 | 89.5 | 95.2 | 95.2 | 85.9 | 96.3 | 95.8 |
| 6 of 20 | 80.6 | 93.3 | 93.1 | 84.5 | 96.0 | 96.0 |
| 8 of 20 | 66.3 | 89.5 | 83.5 | 85.1 | 95.6 | 91.7 |
| 9 of 20 | 55.6 | 79.0 | 66.9 | 83.4 | 87.0 | 87.3 |
3. What the numbers say
Plain averaging is fragile. Two sign-flip clients out of twenty (10%) cut accuracy from 96.3% to 48.3%. Four take it to 4.3%. Even the milder label-flip attack costs 16 points at six attackers.
Median and trimmed mean hold, then fall. Both stay within a few points of the clean result up to about four attackers. The median degrades gradually (81.1% at eight, 62.8% at nine). The trimmed mean is cut at 30% from each end, so it fails abruptly once there are more attackers than it trims: 90.0% at six, 10.8% at eight.
Multi-Krum is excellent if you know the bound, and brittle if you don't. Told the true number of attackers, it stays near 96% all the way to nine of twenty under sign flip. Told to assume six, it matches that up to six attackers, then collapses: 23.5% at eight, 1.4% at nine. In practice you never know the true number. The guarantee is only as good as the bound you choose, and a wrong bound fails suddenly.
Single Krum costs accuracy even when nobody attacks. It picks one client's update each round, which throws away the information in the other nineteen. With label-skewed data that cost is about nine points (87.1% against 96.3%).
The claim "tolerates one third" needs a condition. The original Krum result requires the number of attackers f to satisfy 2f + 2 < n. For 20 clients that means at most 8 attackers, and only when f is known. A figure like "works up to 33%" is true only under that assumption, and our assumes-6 column shows what happens when the assumption is wrong.
4. What this does not show
- Scale. 650 parameters and 1,797 images. Behaviour on models with millions of parameters, or on real clinical or financial data, is not tested here.
- Adaptive attackers. Our attackers are simple. Sign flip with a large multiplier is easy to spot because it is far from everyone else. Attacks that stay close to honest updates are known to defeat distance-based rules such as Krum, and we did not test them.
- Privacy. There is no secure aggregation and no privacy guarantee here. This paper is about robustness only.
- Proof. Nothing here is cryptographically verified. It does not show that an aggregator behaved correctly to an outside party. The combination of robust aggregation with zero-knowledge checks on update size is studied in RoFL (Lycklama et al., 2021), and that work should be read for anything claiming to do both.
- Systems. All clients run in one process. There is no network, no dropout and no timing.
5. Reproducing this
The experiment is a single Python file using numpy and scikit-learn. It runs in about two minutes on a laptop and writes the tables above. We are publishing the script and the raw results for every seed. Until the public repository is live, write to us through the contact page and we will send them.
6. Prior work
- Blanchard, El Mhamdi, Guerraoui and Stainer. Machine Learning with Adversaries: Byzantine Tolerant Gradient Descent. NeurIPS 2017. Krum, and the condition
2f + 2 < n. - Yin, Chen, Ramchandran and Bartlett. Byzantine-Robust Distributed Learning: Towards Optimal Statistical Rates. ICML 2018. Coordinate-wise median and trimmed mean.
- Lycklama, Burkhalter et al. RoFL: Robustness of Secure Federated Learning. 2021 (arXiv 2107.03311). Zero-knowledge checks on encrypted updates.
Technical report by the Eschon Research Unit, Nairobi.
