Backdoor attacks threaten the integrity of machine learning models by allowing attackers to control model behavior through triggers. Models can be compromised during finetuning by backdoor attacks through either poisoned data or adversarial training objectives. Because existing finetuning-activated attacks assume limited domain shift or frozen encoder layers, they often fail under full-model finetuning. We target a stealthy finetuning-activated attack where a dormant backdoor is implanted in a pretrained encoder, and later activated by finetuning on clean downstream data. We propose Poison-then-Hide, a novel attack that remains effective when the entire model is finetuned in a domain transfer. Our approach consists of three components: trigger optimization, base encoder poisoning, and targeted unlearning to conceal the backdoor. We evaluate our method on six datasets and three model architectures, and achieve state-of-the-art (up to 97%) attack success rates. We find that jointly learning the benign target task alongside the poisoning is critical to the attack's success. We demonstrate standard detection and mitigation defenses cannot fully remove the backdoor, which can reappear after benign finetuning.
Figure 2: Stages of Poison-then-Hide. (1) Optimize the trigger for clean behavior on the source model and adversarial behavior on simulated finetuned models. (2) Poison the encoder to jointly learn the benign and backdoor tasks on attacker-held surrogate data. (3) Hide the backdoor through targeted suppression before publicly releasing the pretrained encoder.
Figure 3: Grouped bar plots comparing target dataset ASR for Hidden ( ↓ lower is better) and Finetuned ( ↑ higher is better) models across attack methods. Numbers above bars denote the relative ASR difference (Finetuned - Hidden), with higher positive values indicating more successful backdoor activation. Error bars show 95% CI across five seeds. PtH stands for our Poison-then-Hide attack.
Camelyon17 hospital 3
UC Merced
Model
Method
Acc.
Original ASR
Flip-ASR
Acc.
Original ASR
Flip-ASR
ResNet50
Poison-then-Hide
87.95 ± 2.73
91.94 ± 7.24
71.81 ± 12.26
89.00 ± 1.72
94.11 ± 1.20
87.46 ± 1.55
FAB
85.76 ± 4.55
87.75 ± 8.47
58.34 ± 18.17
86.92 ± 1.88
25.31 ± 8.38
17.93 ± 6.58
Hibernated
87.83 ± 2.78
88.34 ± 9.16
63.26 ± 16.18
89.54 ± 1.95
18.99 ± 8.85
12.33 ± 7.46
Latent
83.34 ± 4.39
57.02 ± 9.18
1.89 ± 0.72
87.79 ± 3.40
5.43 ± 0.33
0.14 ± 0.06
NeuBA
84.39 ± 2.54
15.66 ± 2.53
0.34 ± 0.09
87.70 ± 1.56
12.71 ± 1.76
0.41 ± 0.18
Table 1: Task-conditioned domain-shift performance. For Camelyon17 (C17), the victim finetunes on hospitals 0–2 and is evaluated on hospital 3. For remote sensing, the attacker uses RESISC surrogate data while the victim finetunes and evaluates on UC Merced. Values are mean ± 95% confidence interval over five seeds. Flip-ASR excludes true target-class examples and requires a non-target clean prediction to flip to the target after applying the trigger. Bold marks the strongest targeted attack; NeuBA is untargeted.
Figure 4: Trendlines showing how learning benign task of the target dataset (Base Accuracy) is related to Base and Finetuned ASR. Mean trendlines are fitted with LOWESS smoothing over 5 seeds.
Method
Base Acc
Base ASR
Finetuned ASR
Poison then Hide
92.21 ± 0.23
99.51 ± 0.18
87.05 ± 1.67
Hibernated
68.12 ± 1.55
6.96 ± 1.94
12.30 ± 5.76
FAB
2.76 ± 0.35
97.25 ± 1.24
22.40 ± 9.21
Latent
0.31 ± 0.19
1.27 ± 1.25
2.26 ± 0.15
NeuBA
7.52 ± 10.41
97.81 ± 0.08
7.46 ± 0.41
Table 2: Clean accuracy and ASR for ResNet50 on RESISC. For Poison-then-Hide , “Base” denotes the poisoned model before hiding. For other baselines, which do not separate poisoning and hiding, “Base” and “Hidden” are identical.
Figure 5: Attack success rate of Poison-then-Hide under different trigger patterns. Base” denotes ASR after poisoning, Hidden” after the hiding stage, and “Finetuned” after downstream finetuning.
Clean (n=10)
Hidden (n=5)
Finetuned (n=5)
Neural Cleanse
0%
0%
20%
DECREE
0%
0%
0%
Table 3: Backdoor detection on our Poison-then-Hide attack. We report the percentage of models identified as backdoored by each detection method.
Figure 6: DECREE defense results on the Hidden backdoored encoder. From left to right: true trigger pattern from our Poison-then-Hide attack, the inverted trigger pattern by DECREE, and the inverted mask of backdoor signal by DECREE.
Status
RESISC Acc
RESISC ASR
Hidden (ref)
2.09 ± 0.48
0.01 ± 0.01
Pruned Hidden
3.15 ± 1.64
0.16 ± 0.21
Finetuned (ref)
92.87 ± 0.52
87.05 ± 1.67
Finetuned after Pruning
92.22 ± 0.24
60.46 ± 15.12
Pruned Finetuned
61.69 ± 3.41
20.13 ± 13.93
Additional Finetuning
92.38 ± 0.55
47.63 ± 8.74
Table 4: Effect of fine-pruning on target accuracy and ASR. Note that we include the original Hidden and Finetuned result purely as reference.
Model
Reference
Status
RESISC ASR
Hidden
True Clean
Mitigated
0.33 ± 0.28
Finetuning
19.93 ± 11.20
Pruned
Mitigated
3.80 ± 2.37
Finetuning
47.49 ± 25.24
Finetuned
True Clean
Mitigated
0.33 ± 0.12
Finetuning
6.70 ± 5.48
Table 5: Effect of MIMIC mitigation on target accuracy and ASR.
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
Dataset
Type of images
# train
# test
# classes
ImageNet (ILSVRC-2012)
natural objects
1,281,152
50,048
1000
CIFAR-10
natural objects
50,000
10,000
10
SVHN
street-view house number digits
73,257
26,032
10
RESISC
remote-sensing scenes
18,944
6,400
45
UC Merced Land Use (OOD)
remote-sensing scenes
21,000
21
Camelyon17-WILDS
histopathology patches
302,464
33,792
2
Appendix
Table 6: Summary of datasets: image type, training and test set sizes, and number of classes.
Dataset(s)
Mean (μ)
Std (σ)
ImageNet, RESISC, UC Merced, Camelyon17
(0.485, 0.456, 0.406)
(0.229, 0.224, 0.225)
CIFAR-10
(0.4914, 0.4822, 0.4465)
(0.2470, 0.2435, 0.2616)
SVHN
(0.4377, 0.4438, 0.4728)
(0.1980, 0.2010, 0.1970)
CLIP models
(0.4814, 0.4578, 0.4082)
(0.2686, 0.2613, 0.2757)
Appendix
Table 7: Image normalization statistics (channel-wise mean and standard deviation) used for each dataset or model family.
θ~←θ~−η∇θ~Lpoison
Appendix
Algorithm 1 Poison-then-Hide
Comparison
Class-cond. L2
Centroid L2
FID
RESISC A → RESISC B
0.168
0.038
0.0148
RESISC → UC Merced
0.454
0.238
0.1590
Appendix
Table 8: Feature-space distribution distances. RESISC → UC Merced exhibits a substantially larger shift than a class-balanced within-RESISC split.
Figure 7: Task-aligned domain shifts for Camelyon17 and RESISC → UC Merced. Camelyon17 hospital 3 images tend to be darker than hospitals 0–2, while UC Merced images are typically brighter and differ in scene structure from RESISC.
Victim finetuning
Evaluation
Clean acc.
Clean target
Original ASR
Net increase
Flip-ASR
SVHN
SVHN
97.37±0.13
15.83±0.27
54.10±3.25
38.27±3.25
45.22±3.85
SVHN
MNIST
89.18±0.87
10.50±1.12
11.55±1.10
1.04±0.69
1.07±0.55
MNIST
MNIST
99.39±0.14
10.32±0.05
10.37±0.12
0.04±0.07
0.04±0.05
Appendix
Table 9: Boundary under the label-preserving SVHN → MNIST style shift. Values are mean ± 95% t -confidence interval across five seeds. “Clean target” is the fraction predicted as digit 2 before applying the trigger, and “Net increase” is triggered target rate minus clean target rate.
Figure 8: Robustness boundaries. (a) Poison-then-Hide remains effective under mild additional corruption of UC Merced, but ASR falls once clean task performance is substantially damaged. (b) On ImageNet → RESISC, exact clean-label conflict weakens the attack; seeing most or all originally poisoned samples with clean labels can erase it. Error bars are 95% confidence intervals.
Reference size
Victim/reference
Poisoned
Clean acc.
ASR
3,000
∼ 201 ×
150
97.59 ± 0.17
55.29 ± 5.49
10,000
∼ 60 ×
500
97.47 ± 0.09
55.12 ± 4.52
30,000
∼ 20 ×
1,500
97.37 ± 0.09
58.35 ± 2.78
73,000
∼ 8 ×
3,650
97.58 ± 0.16
51.79 ± 0.97
Appendix
Table 11: Effect of victim-data scale on CIFAR10 → SVHN. The victim always finetunes on the full SVHN train+extra set; only the attacker’s reference size changes. Values are mean ± 95% confidence interval.
Model
Dataset
Baseline
n
PtH ASR
Baseline ASR
Difference
Sign-flip p
ResNet50
C17
Hibernated
10
93.42 ± 3.46
89.86 ± 4.47
+3.56±2.62
0.0176
ResNet50
UCM
FAB
10
85.84 ± 13.98
19.41 ± 7.15
+66.43±12.71
0.0039
CLIP
C17
FAB
10
72.14 ± 7.48
65.34 ± 4.96
+6.80±6.11
0.0625
CLIP
UCM
NeuBA
10
54.80 ± 15.84
8.45 ± 0.72
+46.36±15.47
0.0078
Appendix
Table 12: Paired comparisons with the closest targeted baseline over ten paired runs, as reported in the rebuttal. The exact one-sided paired sign-flip test for PtH > baseline is primary. CLIP/Camelyon17 is positive but not significant.
Figure 9: Sensitivity to simulated finetuned models in Stage 1 on CIFAR10 → SVHN. (a) One proxy model is brittle; performance improves by k=3 and largely saturates by k=5 . The k=10 point is a single run. (b) Low-fidelity proxy ensembles remain nontrivial, although extreme undertraining or data limitation reduces ASR. Clean accuracy remains stable. Error bars are 95% confidence intervals where available.
Hiding condition
SVHN acc.
ASR
Default
97.56
59.21
λsup×0
97.50
52.35
λsup×0.25
97.54
58.00
λsup×0.5
97.50
61.00
λsup×2
97.62
57.27
λKD×0
97.61
58.97
Appendix
Table 13: CIFAR10 → SVHN sensitivity to hiding-stage weights (left) and poison fraction (right). Accuracy is stable and activated ASR remains in a similar range across the tested settings.
Figure 10: Visualization of what the backdoor class (“parking lot”) looks like in the RESISC and UC Merced datasets.
Model
Method
Status
CIFAR10 Acc
SVHN Acc
SVHN ASR
ResNet18
FAB
Hidden
93.23 ± 0.19
11.93 ± 2.11
99.94 ± 0.02
Finetuned
11.30 ± 1.36
97.27 ± 0.07
52.33 ± 3.85
Hibernated
Hidden
91.66 ± 0.19
70.02 ± 1.14
11.65 ± 0.60
Finetuned
11.84 ± 1.54
97.26 ± 0.17
53.81 ± 5.44
Poison then Hide
Hidden
92.56 ± 0.21
4.73 ± 3.60
7.24 ± 13.84
Finetuned
12.44 ± 0.76
97.37 ± 0.09
54.10 ± 2.29
Appendix
Table 14: Performance of Poison then Hide and baseline finetuning-activated backdoors across dataset transfers. Mean and 95% confidence intervals computed across five random seeds.
Figure 11: Trendlines showing how learning benign task of the target dataset does not affect attack success in the finetuned model for the Hibernated Backdoor baseline. Results for the ResNet50 model in the ImageNet → RESISC transfer setting. Mean trendlines are fitted with LOWESS smoothing over 5 seeds.
Figure 12: Panel of four trigger patterns on RESISC images. All triggers are bounded by an ℓ∞ norm of ϵ=2558 . We visualize the trigger by itself, the clean image, and then the poisoned image.
Victim adaptation
Benign acc.
ASR
Trainable parameters
ResNet18 LoRA
96.21%
54.98%
291,554 / 11,465,516 (2.54%)
Appendix
Table 15: Poison-then-Hide after LoRA adaptation on CIFAR10 → SVHN. The attack remains effective while updating 2.54% of parameters.
School of Electronic Information and Electrical Engineering Shanghai Jiao Tong University · Department of Computer Science and Engineering Southern University of Science and Technology
School of Computer Science and Engineering, South China University of Technology · Department of Electrical and Computer Engineering, University of California San Diego · School of Computer Science, South China Normal University