Skip to content

feat: add the A Little Is Enough Byzantine attack - #28

Draft
maheenunzeelah wants to merge 5 commits into
SEED-VT:mainfrom
maheenunzeelah:feat/little-is-enough-byzantine-attack
Draft

maheenunzeelah wants to merge 5 commits into
SEED-VT:mainfrom
maheenunzeelah:feat/little-is-enough-byzantine-attack

Conversation

@maheenunzeelah

@maheenunzeelah maheenunzeelah commented Sep 23, 2026 •

Copy link
Copy Markdown

Why

FLTest's Byzantine attacks (gaussian, sign_flip) perturb an update without reference to the honest ones, so any perturbation large enough to matter is also an outlier — which is precisely what krum, median and trimmed_mean filter on. The project could therefore never really stress-test the robust aggregators its own pitfall checker recommends: P6 hands users krum as the counter-experiment for non-naive attacks, and nothing in the repo could show that remedy failing.

This adds A Little Is Enough (Baruch, Baruch & Goldberg, NeurIPS 2019), which measures the honest population before perturbing it.

What it does

Per coordinate, every attacker submits the same crafted update:

u' = mu - z * sigma # mu, sigma over the benign submissions

With n participants and m attackers, s = floor(n/2 + 1) - m honest workers are needed to complete a majority. A step z deviations out is covered by the (n - m) * (1 - Phi(z)) honest workers lying further out still, so staying hidden requires Phi(z) <= (n - m - s) / (n - m); the default z is the largest value satisfying that. Set z explicitly to sweep strength.

It runs at before_aggregate, the only hook exposing every submission, and rewrites just the attackers' entries. Attacks attach before defenses, so a robust aggregator in the same config still sees the crafted updates. NVFlare does not emit before_aggregate and cannot run this attack.

It scores itself, because accuracy is the wrong instrument here

An untargeted Byzantine attack has no natural success metric, and at this scale accuracy cannot supply one. The attack records:

little_is_enough_z — the step requested.
little_is_enough_drift — how far the aggregate actually landed from the benign mean, in benign sigmas.
little_is_enough_absorption — drift / z, the share of the requested shift the aggregation rule conceded. 0 = filtered, 1 = taken whole.

The anchor is plain FedAvg, which concedes exactly the attackers' share of total sample weight (m/n for equal shards — verified analytically and in training). Anything above that line is a defense doing worse than no defense.

maheenunzeelah and others added 2 commits September 23, 2026 17:36
FLTest's existing Byzantine attacks (gaussian, sign_flip) perturb an update
without reference to the honest ones, so a perturbation large enough to matter
is also an outlier -- which is what krum, median and trimmed_mean filter on.
That left the project unable to stress-test the robust aggregators its own
pitfall checker recommends as the remedy for non-naive attacks.

little_is_enough (Baruch et al., NeurIPS 2019) measures the benign population
first and moves only as far as its own variance allows, per coordinate:
u' = mu - z * sigma. The default z is the largest step still covered by enough
honest workers to complete a majority. It runs at before_aggregate, where every
submission is visible, and rewrites only the attackers' entries.

It also scores itself, because accuracy turns out to be the wrong instrument
here: little_is_enough_absorption reports the share of the requested shift the
aggregation rule conceded. Over five seeds absorption is reproducible to four
decimals while accuracy swings by +/- 0.02, wider than anything the attack does
to it -- an earlier single-seed run appeared to show a 4.6 point accuracy drop
that four more seeds erased.

Measured at z = 1.5, four attackers of ten, five seeds: every robust rule
concedes more than plain averaging (0.40) -- trimmed_mean 0.56, median 0.69,
krum 1.00. Krum hands over the whole model, because it returns one selected
update and selects the attacker's.

Keeping client_submissions in step with updates_and_weights is required rather
than incidental: this is the first attack to rewrite updates at
before_aggregate, and FLDetector rejects a round whose records and aggregation
inputs have diverged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@maheenunzeelah
maheenunzeelah marked this pull request as draft September 23, 2026 21:42
The merge brought in main's new tests alongside this branch's, so the figure in
the install guide was stale.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@maheenunzeelah maheenunzeelah changed the title Merge branch 'main' of https://github.com/SEED-VT/FLTest into feat/little-is-enough-byzantine-attack feat: add the A Little Is Enough Byzantine attack Sep 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant