Skip to content

FLIP: A Provable Defense Framework for Federated Learning Backdoor MitigationFLIP: A Provable Defense Framework for Backdoor Mitigation in Federated Learning

arXiv· arXiv:2210.12873· Kaiyuan Zhang, Guanhong Tao, Qiuling Xu, Siyuan Cheng, Shengwei An, Yingqi Liu, Shiwei Feng, Guangyu Shen, Pin-Yu Chen, Shiqing Ma, Xiangyu ZhangPurdue University; IBM Research; Rutgers UniversityIndexed by this site · 27 days ago· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors propose FLIP, a federated learning backdoor defense framework, and state that under continuous attack it reduces MNIST ASR to 1.93%, while most SOTA defenses remain close to 100%.

Threat modelMalicious local clients inject a static patch backdoor into the global model through data poisoning (model replacement), can participate in any round, and 4 of the 10 clients selected each round are attackers; the defender does not control malicious clients, benign clients do not know the real trigger, and the global server does not distinguish trusted from untrusted clients and holds no local data.

Questions
In federated learning, malicious clients can inject backdoors into the global model through data poisoning. The authors state that most existing robust aggregation and certified defenses are only effective under single-shot attacks and fail under continuous attacks, and some methods require the server to hold clean data or inspect model weights.
Methods
FLIP has benign clients perform trigger inversion, overlays the inverted trigger on local clean samples for adversarial training to harden the model; after aggregation the global model's confidence on backdoor samples decreases, and at inference a confidence threshold τ is used to filter low-confidence samples; the authors also give upper and lower bounds on the loss change and sufficient conditions for trigger recovery quality.
Experiments and results
Comparing 9 SOTA defenses on MNIST, Fashion-MNIST, and CIFAR-10: under single attack FLIP reduces ASR to below 8%; under continuous attack most baselines still have ASR close to 100%, while FLIP achieves 1.93%, 17.65%, and 22.90% on the three datasets respectively. The authors state that FLIP remains effective under adaptive attack.
Limitations and future work
The authors state that dynamic backdoors (reflection, composite, feature-space backdoors) are left for future work; the theoretical analysis is limited to linear logistic regression with FedAvg and two clients (one benign, one malicious); the experiments cover only three image classification datasets and static patch backdoors, and the paper does not report variance over multiple repetitions.
Experimental setupResNet-18、CNN (two convolutional layers and two fully connected layers) et al. · MNIST、Fashion-MNIST et al. · ASR、ACC et al.
Evaluated models
ResNet-18CNN (two convolutional layers and two fully connected layers)Multi-class logistic regression
Benchmarks
MNISTFashion-MNISTCIFAR-10
Metrics
ASRACCAUC
AI summaryThe researchers propose FLIP, a provable defense framework against backdoor attacks in federated learning. In federated learning, participants may be compromised and carry out backdoor attacks by poisoning data or gradients; the paper theoretically analyzes the relationship among cross-entropy loss, attack success rate, and clean accuracy in this setting, and proposes a defense method based on trigger reverse engineering that can reduce the attack success rate without degrading benign accuracy. Experiments cover multiple datasets and attack settings, and comparison with eight SOTA defense methods shows that the method has empirical advantages against both one-shot and persistent federated learning backdoor attacks. Code is open-sourced at https://github.com/KaiyuanZh/FLIP。

The researchers propose FLIP, a provable defense framework against backdoor attacks in federated learning. In federated learning, participants may be compromised and carry out backdoor attacks by poisoning data or gradients; the paper theoretically analyzes the relationship among cross-entropy loss, attack success rate, and clean accuracy in this setting, and proposes a defense method based on trigger reverse engineering that can reduce the attack success rate without degrading benign accuracy. Experiments cover multiple datasets and attack settings, and comparison with eight SOTA defense methods shows that the method has empirical advantages against both one-shot and persistent federated learning backdoor attacks. Code is open-sourced at https://github.com/KaiyuanZh/FLIP。

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Defending against data poisoning backdoors from malicious clients in federated learning, especially under the continuous attack setting where existing defenses fail.

    Core problem: how to defend against backdoors injected by malicious local clients through data poisoning in federated learning (FL), and provide provable robustness guarantees.

    • Scenario and importance: FL distributes training across multiple clients; individual participants may be compromised and poison the model, causing inputs with a specific pattern to be misclassified into the target label; the authors state that backdoors are becoming a security threat to real-world FL deployment.
    • Shortcomings of existing methods (according to the paper): robust aggregation methods detect and reject malicious weights, while certification methods can only provide certification against backdoors of limited magnitude; some methods require the server to hold a large number of clean samples (contrary to the original intent of FL) or inspect model weights (which may leak client information); the authors state that most existing methods are only effective under single-shot attacks and fail under stronger, more stealthy continuous attacks.
    • Core observation: performing model hardening on benign clients (adversarial training on reverse-engineered triggers) can offset the poisoning effect of malicious clients, causing the aggregated global model to have lower confidence on backdoor samples while confidence on clean samples is essentially unaffected.
    • What the paper proposes: FLIP (Federated LearnIng Provable defense framework), which combines trigger inversion, adversarial training hardening, and low-confidence sample rejection, and provides upper and lower bounds on loss change and sufficient conditions on trigger recovery quality, guaranteeing that ASR decreases while clean accuracy is essentially maintained.
    • Threat model:
      • Attacker goal: inject a backdoor into the global model, achieving high ASR without causing a visible drop in clean-sample accuracy.
      • Attacker knowledge and capability: the defender has no control over malicious clients; the attacker can carry out any attack (e.g., model replacement, weight scaling), can participate in any round, and in the extreme case attacks every round after the model has converged.
      • Defender assumptions: benign clients do not know the true trigger and reverse-engineer the trigger based on the received global model weights and local non-i.i.d. data; the global server does not distinguish trusted/untrusted clients and does not assume any local data.
      • Attack type: this paper only considers static backdoors, i.e., patch backdoors (Gu et al., 2017).
  2. What related research exists?

    Related work is divided into two categories: backdoor attacks and defenses, and FL backdoor attacks and defenses; the baselines are 9 SOTA defenses such as Krum, FoolsGold, and FLTrust.

    Backdoor attacks and defenses (non-federated setting)

    • Backdoor attacks: patch attacks (Gu et al., 2017; Liu et al., 2018), feature-space attacks (Cheng et al., 2021b), etc., whose goal is to inject a trigger pattern and associate it with a target label.
    • Trigger inversion: Neural Cleanse (Wang et al., 2019), ABS (Liu et al., 2019), (Shen et al., 2021; Liu et al., 2022; Tao et al., 2022; Cheng et al., 2023), etc., which use optimization to reverse-engineer the minimal input pattern that can flip classification results; FLIP's trigger inversion component is built on such techniques.
    • Other detection routes: identifying differences between clean and poisoned models (Huang et al., 2020; Wang et al., 2020b), or detecting and rejecting inputs with triggers (Ma & Liu, 2019; Li et al., 2020b).

    Federated learning backdoor attacks and defenses

    • FL backdoor attacks: Xie et al. (2019), Tolpegin et al. (2020), Bagdasaryan et al. (2020), Fang et al. (2020), Shejwalkar et al. (2022), etc., in which attackers hijack some local clients to inject backdoors into the aggregated model; the experiments in this paper adopt the single-shot attack setting of Bagdasaryan et al. (2020) and the continuous attack setting of Xie et al. (2019).
    • Robust aggregation defenses: Blanchard et al. (2017), Pillutla et al. (2022), Sun et al. (2019), Nguyen et al. (2021), Ozdayi et al. (2020), Fung et al. (2020), Andreina et al. (2021), Cao et al. (2020), etc., which focus on detecting and rejecting malicious weights; the paper points out that such methods may fail under stronger and more stealthy attack settings and may lead to data leakage.
    • Certified/provable defenses: Panda et al. (2022), Cao et al. (2021), Xie et al. (2021), etc.; the paper points out that they can only provide robustness certification against backdoors of (relatively) limited magnitude.

    Baselines and benchmarks

    • Baseline methods: 9 SOTA defenses—Krum, Bulyan Krum, RFA, FoolsGold, Median, Trimmed Mean, Bulyan Trimmed Mean, FLTrust, DnC; Appendix A.10 additionally compares with Multi-KRUM and attempts to evaluate FLAME but received no reply from the authors.
    • Datasets: MNIST, Fashion-MNIST, CIFAR-10, partitioned non-i.i.d. according to a Dirichlet distribution (α=0.5).

    Positioning of this paper: the authors state that existing work has not studied how hardening benign clients affects the global model (and malicious clients); FLIP starts from this angle, combines trigger inversion with FL training, and claims this is an analytical perspective not yet studied in the literature.

  3. How does the paper address this problem?

    FLIP's three steps: benign clients invert the trigger, adversarial training hardens the model, and at inference low-confidence samples are rejected by a confidence threshold.

    Overall idea: FLIP has benign local clients reverse-engineer triggers and perform adversarial training on augmented data stamped with those triggers; after aggregation, the global model's confidence on backdoor samples decreases, and at inference a threshold is then used to filter low-confidence samples; the theoretical part gives upper and lower bounds on loss change and sufficient conditions on trigger recovery quality.

    Trigger inversion and class distance

    • Trigger inversion: use optimization to reverse-engineer the minimal input pattern that can flip a set of clean images to the target class; this paper adopts universal trigger inversion, i.e., generating a trigger that can flip samples of all classes except the target class to the target class.
    • Class distance: given a source class s and a target class t, the trigger consists of a mask m and a pattern δ, and the stamping function is x′s→ t = (1−m)· xs + m·δ, i.e., the pattern is overlaid on the source sample according to the mask; the optimization objective is cross-entropy loss plus α·||m||, and the class distance ds→t is measured by ||m|| (L1 norm); the larger the distance, the more robust the model.

    Cached Warm-up

    • Motivation: existing trigger inversion optimizes over all label-pair combinations, with complexity O(n²); FLIP first generates universal triggers (each label as the target class), with complexity O(n).
    • Approach: approximate the class distance using the loss variance from the source class to the target class during optimization—classes far from the target class have large loss changes; each client stores the results in a local distance matrix (cache matrix) and prioritizes "promising" label pairs with large distances for hardening; the cache allows more iterations to be allocated to model hardening.

    (A)symmetric hardening

    • Symmetric hardening: when a client has sufficient data (more than 5 images) for both directions of a label pair (a, b), it generates triggers for both directions a→b and b→a and stamps them on the corresponding source samples, updating the distance matrix in both directions.
    • Asymmetric hardening: when a client has sufficient data for only one label in a label pair (in FL, non-i.i.d. data may have no samples for some labels), it hardens only the direction from that label to the target class, updating the distance matrix in one direction.
    • After hardening: benign clients submit the updated local weights to the global server, and the server aggregates all received weights (Algorithm 1).

    Low-confidence sample rejection

    • Mechanism: hardening by benign clients offsets malicious poisoning, causing the aggregated model to have low prediction confidence on backdoor samples (confidence on benign samples is essentially unchanged); at inference, samples whose post-softmax confidence is below threshold τ are directly rejected.
    • Parameters: τ is used only in the continuous attack setting (the authors state that single-shot attacks are easy to defend against); empirically, τ=0.3 for MNIST and Fashion-MNIST, and τ=0.4 for CIFAR-10.

    Theoretical analysis

    • Setting: FedAvg protocol, one global server plus two clients (one benign, one malicious), multi-class logistic regression (one linear layer + softmax + cross-entropy).
    • Theorem 1: gives upper and lower bounds on the global loss difference L′g − Lg with and without defense, using ∆W = W′ − W to denote the weight difference.
    • Theorem 2: gives sufficient conditions on trigger recovery quality—when the error ε between the recovered trigger and the true trigger satisfies ||ε||∞ ≤ α (α is a bound determined by samples, weight difference, and learning rate), the lower bound on loss over backdoor data is ∆ min loss ≥ 0 (the defense is provably effective), and the upper bound on loss over clean data ∆ max loss does not exceed a constant (clean accuracy is provably essentially maintained).
    • Corollary 1: gives formulas for the number of rejected backdoor samples and clean samples with/without defense, corresponding to the filtering behavior of confidence threshold τ.
  4. What experiments did the paper conduct?

    Comparing 9 SOTA defenses on 3 datasets under 2 attack settings, plus theoretical validation, adaptive attack, and ablations.

    Experimental setup

    • FL system: by default 100 clients, 10 randomly selected per round (4 attackers, 6 benign clients); SGD training, 5 local epochs for continuous attack and 10 epochs for single attack, lr=0.1 for benign training and lr=0.05 for poisoned training, batch size 64.
    • Datasets: MNIST, Fashion-MNIST, CIFAR-10, partitioned non-i.i.d. according to a Dirichlet distribution (α=0.5); poisoning ratio 20/64 for MNIST/Fashion-MNIST and 5/64 for CIFAR-10; model architectures are two convolutional layers plus two fully connected layers for MNIST/Fashion-MNIST and ResNet-18 for CIFAR-10.
    • Attack settings: poisoning via model replacement, with the target label defaulting to "2"; in single attack each attacker participates in only one round, in continuous attack attackers participate in every round after convergence; results are reported at least 60 rounds after the attack occurs.
    • Baselines: 9 in total: Krum, Bulyan Krum, RFA, FoolsGold, Median, Trimmed Mean, Buly-Trim-M, FLTrust, DnC.
    • Metrics: ASR (the proportion of backdoor samples misclassified to the target label) and ACC (classification accuracy on benign samples); FLIP's threshold τ is used only for continuous attack (0.3 for MNIST/Fashion-MNIST, 0.4 for CIFAR-10).
    • Other: PyTorch implementation, with attacks and defenses reproduced according to their original designs; the paper does not report repeated runs or variance.

    Main results

    Continuous attack (Table 2) is the setting the paper emphasizes as stronger; FLIP and some baselines compare as follows:

    Swipe horizontally to read the table

    MethodMNIST ACCMNIST ASRF-MNIST ACCF-MNIST ASRCIFAR-10 ACCCIFAR-10 ASR
    No Defense98.71100.0080.3599.9977.8384.73
    Krum97.590.1473.1820.0340.2918.79
    RFA98.54100.0085.69100.0079.3963.10
    FoolsGold97.9199.9980.5899.9874.5778.30
    FLTrust91.9620.6074.6335.3674.8568.70
    DnC89.8199.7865.9097.7353.1682.37
    FLIP96.621.9372.9917.6571.2822.90

    (According to Table 2, omitting the four rows Bulyan Krum, Trimmed Mean, Buly-Trim-M, and Median, among which Bulyan Krum has ASR 99.46 on F-MNIST and 97.31 on CIFAR-10.)

    • Authors' interpretation: The authors state that all existing defenses fail under continuous attack, with ASR mostly close to 100% on MNIST and Fashion-MNIST and above 63% on CIFAR-10; FLIP reduces ASR to a low level, with accuracy drop within an acceptable range.
    • Exception: Krum has ASR 0.14 under MNIST continuous attack, lower than FLIP's 1.93, but its ACC on CIFAR-10 is only 40.29.
    • Single attack (Table 1): FLIP's ASR on the three datasets is 0.13, 3.16, and 7.83 respectively; the authors state that FLIP outperforms all baselines on MNIST and Fashion-MNIST and is slightly worse on CIFAR-10 (e.g., Median's 2.39, FLTrust's 2.18).

    Validation of the theoretical setting

    • What was tested: Validated on MNIST according to the setting of the theoretical analysis (one server, one benign and one malicious client, multiclass logistic regression).
    • Results: Single attack ASR drops from 64.48 to 5.28 (ACC from 88.43 to 84.58), continuous attack ASR drops from 63.78 to 4.90 (ACC from 83.03 to 80.76) (Table 3); Appendix A.2 gives the corresponding rejected-sample counts for Corollary 1 (Table 4).
    • Authors' interpretation: The results are consistent with observations under more complex settings.

    Adaptive attack

    • What was tested: The attacker knows FLIP and uses the same trigger inversion technique to obtain an inverted trigger, overlays it on local images, and adds them to poisoned training (continuous attack setting).
    • Results: MNIST ACC 96.82/ASR 0.61, Fashion-MNIST 73.42/18.94, CIFAR-10 60.08/14.02 (Table 5).
    • Authors' interpretation: The authors state that FLIP can still mitigate the backdoor in most cases; regarding the ACC drop on CIFAR-10, the authors state that the adaptive attack is not effective in this case.

    Other ablations and analyses

    • Effect of adversarial training (Table 6): Removing adversarial training for benign clients (keeping the threshold), continuous attack ASR rises to 51.75 (MNIST), 98.53 (F-MNIST), 83.13 (CIFAR-10).
    • Effect of the threshold (Table 7): With τ set to 0, continuous attack ASR is 22.35 (MNIST), 30.67 (F-MNIST), 52.47 (CIFAR-10), higher than the FLIP results in Table 2.
    • Using ABS for trigger inversion (Table 8): CIFAR-10 single attack ACC 74.14/ASR 8.00, continuous attack ACC 74.90/ASR 22.38; the authors state that FLIP is compatible with different inversion techniques.
    • Trigger size (Table 9, MNIST): Under 1*X to 8*X, FLIP's ASR is 0.13–0.76, while without defense ASR is 94.31–97.85 for 2*X and above.
    • Effect of the threshold (Appendix A.9, MNIST continuous attack): With τ at 0.0, 0.3, 0.7, ACC is 97.2, 96.62, 88.86 and ASR is 22.35, 1.93, 0.91.
    • AUC (Appendix A.4): The AUC of confidence filtering on MNIST is 0.97 (Figure 3).
  5. What are some points that can be further explored?

    The authors state that dynamic backdoors are left for future work; the theory is limited to a two-client linear model, and the experiments cover only three image datasets.

    Limitations and future directions noted by the authors

    • Dynamic backdoors left for future work (Section 1 Threat Model): This paper considers only static patch backdoors; dynamic backdoors such as reflection backdoors, composite backdoors, and feature-space backdoors are left for future work.
    • Theoretical analysis limited to linear models (Appendix A.14): The authors state that existing related work all focuses on linear models, because the complexity of real models makes theoretical analysis infeasible; the theory in this paper is developed on logistic regression, and for nonlinear models there are only empirical results.
    • FLAME could not be evaluated (Appendix A.10): The authors contacted the FLAME authors multiple times to request the experiments and parameter settings, and had received no reply as of submission.
    • Trigger quality can be further improved (Appendix A.12): Random triggers cannot reduce ASR; real triggers perform best (CIFAR-10 single attack ASR 2.64). The authors state that the triggers inverted by FLIP perform close to real triggers and can be further improved in future work.

    Scope of experiments

    • Subjects tested: 3 image classification datasets (MNIST, Fashion-MNIST, CIFAR-10), with models being two convolutional layers plus two fully connected layers (MNIST/Fashion-MNIST) and ResNet-18 (CIFAR-10), plus logistic regression for theoretical validation.
    • Attack settings: single attack with model replacement poisoning (Bagdasaryan et al., 2020 setting) and continuous attack (Xie et al., 2019 setting), with the target label defaulting to "2"; one defense-aware adaptive attack was also tested.
    • Defense comparison: 9 SOTA baselines plus Multi-KRUM in the appendix; the FLIP variant using ABS inversion was evaluated only on CIFAR-10.
    • FL scale: by default 100 clients, 10 selected per round (4 attackers), non-i.i.d. degree using Dirichlet α=0.5; Appendix A.13 sweeps α from 0.2 to 2.0 on MNIST single attack.
    • Not reported in the paper: the number of repeated runs or variance, explanatory experiments corresponding to the magnitude of ACC drop on CIFAR-10 under adaptive attack, and systematic verification of the reasons for baseline failure beyond the three conjectures given in Appendix A.11.
  6. Summarize the main content of the paper

    FLIP uses trigger inversion plus adversarial training to harden benign clients; the authors state that under continuous attack ASR drops to 2%–23%, with theoretical guarantees.

    A federated learning backdoor defense paper (ICLR 2023) that addresses the threat of static patch backdoors injected through data poisoning by malicious local clients and proposes a provable defense framework, FLIP.

    • Problem to solve: the authors state that most existing robust aggregation and certified defenses are only effective under single-shot attacks and fail under continuous attacks (the attacker participates every round), and some methods require the server to hold clean data or inspect weights.
    • Method highlights: benign clients use universal trigger inversion to recover triggers, prioritize hardening label pairs with large class distances (L1 norm), and perform symmetric or asymmetric adversarial training according to data availability; after aggregation, the global model's confidence on backdoor samples decreases, and at inference a threshold τ (0.3 for MNIST/Fashion-MNIST, 0.4 for CIFAR-10) is used to reject low-confidence samples. Theoretically, it gives upper and lower bounds on the loss difference with/without defense (Theorem 1) and sufficient conditions under which ASR necessarily decreases and clean accuracy is essentially maintained when the trigger recovery error satisfies ||ε||∞ ≤ α (Theorem 2).
    • Single-shot attack (Table 1): FLIP achieves ASR of 0.13, 3.16, and 7.83 on MNIST, Fashion-MNIST, and CIFAR-10, respectively; the authors state that it outperforms all 9 baselines on the first two datasets and is slightly worse on CIFAR-10.
    • Continuous attack (Table 2): most baselines still have ASR close to 100% (above 63% on CIFAR-10), while FLIP reduces ASR to 1.93 (MNIST), 17.65 (Fashion-MNIST), and 22.90 (CIFAR-10), with ACC of 96.62, 72.99, and 71.28, respectively.
    • Other results: in logistic regression experiments under the same theoretical setting, ASR drops to about 5% (Table 3); under adaptive attacks that know the defense, FLIP achieves ASR of 0.61, 18.94, and 14.02 on the three datasets (Table 5); ablations show that removing adversarial training or removing the threshold both cause ASR to rise again (Tables 6, 7).
    • Authors' conclusion: as long as the reverse-engineered trigger satisfies the given bound, FLIP provably reduces ASR and maintains clean accuracy; the framework is general and can use different trigger inversion techniques (e.g., ABS). The authors state that dynamic backdoors (reflection, composite, feature-space) are left for future work.

Related papers

Show 3 more papers
Read originalarxiv.org