Flatness-aware Sequential Learning Generates Resilient Backdoors
Hoang Pham1, The-Anh Ta2, Anh Tran3, Khoa D. Doan1
Machine Learning Models in Practice
The increasing complexity of Machine Learning Models and Training Processes has promoted training outsourcing and Machine Learning as a Service (MLaaS)
2
Training Data
Training ML Model
Prediction
Input Data
Trained Model
MLaaS
Provider
This creates a paramount security concern in the model building supply chain
Backdoor Attack
Backdoor attacks can lead to harmful consequences when ML models are deployed in real life.
3
Training Data
Training ML Model
Input Data
Trained Model
Trigger
Backdoor Attack influences the model prediction by modifying the model’s behavior during the training process with a backdoor trigger
Prediction
Clean
Pred: No turn right ✅
Black Square
Pred: Turn right ❌
Backdoor Attack
4
credit: Doan et al., 2021
Limitations of Conventional Backdoor Learning
Existing backdoors can be easily removed with fine-tuning
5
Limitations of Conventional Backdoor Learning
Existing backdoors can be easily removed with fine-tuning
6
Limitations of Conventional Backdoor Learning
Existing backdoors can be easily removed with fine-tuning
⇒ How to train resistant backdoor models?
7
Limitations of Conventional Backdoor Learning
Existing backdoors can be easily removed with fine-tuning
⇒ How to train resistant backdoor models?
⇒ Guide the backdoor model to be trapped into a backdoor region even after fine-tuning defenses
8
Proposed Framework: Sequential Backdoor Learning (SBL)
Two step backdoor learning framework:
Step 0: Training backdoor model on both clean and poisoned data D0
9
Proposed Framework: Sequential Backdoor Learning (SBL)
We guide the model to a flatter backdoor region with SAM optimizer
Two step backdoor learning framework:
Step 0: Training backdoor model on both clean and poisoned data D0
10
Proposed Framework: Sequential Backdoor Learning (SBL)
Two step backdoor learning framework:
Step 0: Training backdoor model on both clean and poisoned data D0
Step 1: Mimicking the fine-tuning defenses on clean data with constraints
11
We relies on Continual Learning to mitigate backdoor forgetting
Proposed Framework: Sequential Backdoor Learning (SBL)
Two step backdoor learning framework:
Step 0: Training backdoor model on both clean and poisoned data D0
Step 1: Mimicking the fine-tuning defenses on clean data with constraints
12
We relies on Continual Learning to mitigate backdoor forgetting
Proposed Framework: Sequential Backdoor Learning (SBL)
Two step backdoor learning framework:
Step 0: Training backdoor model on both clean and poisoned data D0
Step 1: Mimicking the fine-tuning defenses on clean data with constraints
13
We relies on Continual Learning to mitigate backdoor forgetting
⇒ Force the model converge into low clean loss basin but deeper within the backdoor area
Proposed Framework: Sequential Backdoor Learning (SBL)
Two step backdoor learning framework:
Step 0: Training backdoor model on both clean and poisoned data D0
Step 1: Mimicking the fine-tuning defenses on clean data with constraints
14
We relies on Continual Learning to mitigate backdoor forgetting
⇒ Familiarizing backdoored model with clean-only data and bypass fine-tuning defenses
Proposed Framework: Sequential Backdoor Learning (SBL)
Two step backdoor learning framework:
Step 0: Training backdoor model on both clean and poisoned data D0
Step 1: Mimicking the fine-tuning defenses on clean data with constraints
15
SBL can be used to train existing backdoor attacks to enhance their resilience!
Key Results
16
Key Results
17
Key Results
18
Key Results
19
Key Results
20
Key Results
21
SBL helps existing trigger-based attacks bypass advanced fine-tuning defenses
SBL trapped the model in backdoored region
22
SBL trapped the model in backdoored region
23
Learning Dynamic During Fine-Tuning Defense
In early stage, gradient norm values of CBL significantly higher than those of SBL.
⇒ Fine-tuned CBL model can be more easily pushed further away from backdoor minimum
⇒ Fine-tuning defenses easily find backdoor-free local minima.
24
Ablation Study: The Role of SAM Optimizer
25
Ablation Study: The Role of SAM Optimizer
26
Ablation Study: The Role of Continual Learning
27
SAM and CL collaboratively enhance the Resilience
SAM and CL collaboratively generate �resilience backdoor
28
SBL works with different architectures
29
SBL works with low poisoning rates
30
Conclusion
31
THANK YOU!
MAIL-Research @ VinUniversity, Vietnam
32
Key Results
SBL help existing trigger-based attacks bypass advanced fine-tuning defenses
Existing Backdoor Attack
Goal: Train a backdoored model that hard to purify
Main categories of backdoor attacks based on Attacker’s Capability:
Backdoor Defense
Goal: Remove backdoors from model
Main categories for Backdoor Defense:
In early stage of fine-tuning defense, gradient norms of model trained by CBL significantly higher than those of SBL.
⇒ Backdoor models trained by CBL are more easily pushed further away from backdoor minimum
CBL with SAM optimizer helps backdoored model bypass FT-SAM defense, but it fails with other fine-tuning defenses
Sequential learning enhances the backdoor resistance even with out SAM
Backdoor Attack
Backdoor attacks can lead to harmful consequences when ML models are deployed in real life.
Training Data
Training ML Model
Prediction
Input Data
Trained Model
Trigger
Backdoor Attack influences the model prediction by modifying the model’s behavior during the training process with a backdoor trigger
Clean
Black Square
Pred: No turn right ✅
Pred: Turn right ❌
Limitations of Conventional Backdoor Learning
Backdoored model θB learned by Conventional Backdoor Learning (CBL) is easily pushed out of backdoor region after fine-tuned θF on clean data with appropriate learning rate
⇒ How to train resistant backdoor models?
38
Limitations of Conventional Backdoor Learning
Backdoored model θB learned by Conventional Backdoor Learning (CBL) is easily pushed out of backdoor region after fine-tuned θF on clean data with appropriate learning rate
⇒ How to train resistant backdoor models?
⇒ Learning to guide the backdoor model to be trapped into a backdoor region even after fine-tuning defenses
39
Proposed Framework: Sequential Backdoor Learning (SBL)
Two step backdoor learning framework:
Step 0: Training backdoor model
Step 1: Mimicking the fine-tuning defenses on clean data with constraints
40
Proposed Framework: Sequential Backdoor Learning (SBL)
Two step backdoor learning framework:
Step 0: Training Backdoor Model
Step 1: Mimicking the fine-tuning defenses on clean data with constraints
41
We use Continual Learning methods to mitigate backdoor forgetting
Proposed Framework: Sequential Backdoor Learning (SBL)
Two step backdoor learning framework:
Step 0: Training Backdoor Model
Step 1: Mimicking the fine-tuning defenses on clean data with constraints
42
We use Continual Learning methods to mitigate backdoor forgetting
⇒ Force the model converge into low clean loss basin but deeper within the backdoor area
Proposed Framework: Sequential Backdoor Learning (SBL)
Two step backdoor learning framework:
Step 0: Training Backdoor Model
Step 1: Mimicking the fine-tuning defenses on clean data with constraints
43
We use Continual Learning methods to mitigate backdoor forgetting
⇒ Force the model converge into low clean loss basin but deeper within the backdoor area
⇒ Familiarizing backdoored model with clean-only data and bypass fine-tuning defenses
Proposed Framework: Sequential Backdoor Learning (SBL)
Two step backdoor learning framework:
Step 0: Training Backdoor Model
Step 1: Mimicking the fine-tuning defenses on clean data with constraints
44
SBL can incorporate with existing backdoor attacks to enhance the resilience
Key Results
45
SBL helps existing trigger-based attacks bypass advanced fine-tuning defenses
Key Results
46
SBL helps existing trigger-based attacks bypass advanced fine-tuning defenses