Poison-then-Hide: A Fine-Tuning-Activated Backdoor Attack Against Pretrained Vision Encoders
Poison-then-Hide: Finetuning-Activated Backdoor Attack on Pretrained Vision Encoders
The authors propose Poison-then-Hide, an attack that implants a dormant backdoor in a pretrained vision encoder that activates after clean full-model fine-tuning; the authors claim that on ImageNet→RESISC, ResNet50 achieves an ASR of 87.05% after fine-tuning.
The attacker implants a dormant backdoor in a pretrained encoder and releases it publicly; after the victim performs full-model fine-tuning with clean downstream data, the backdoor activates. The attacker cannot modify the victim's fine-tuning data or pipeline, but must anticipate the downstream task family and target class semantics and collect a small task-aligned surrogate dataset (Dsur); in the main experiments, the sample overlap between Dsur and the victim's fine-tuning data Dft is 0%.
- Existing finetuning-activated (FA) backdoor attacks assume limited domain shift or partial freezing of encoder layers, and often fail under full-model fine-tuning when the downstream task differs substantially from pretraining (the authors state ASR drops to 1–3%). The authors study how to implant a dormant backdoor under a more realistic transfer-learning setting.
- Poison-then-Hide has three stages: optimize the trigger on an ensemble of simulated fine-tuned models so that it activates only after fine-tuning; poison by jointly learning a benign task and the backdoor on surrogate data held by the attacker; and before release, perform targeted forgetting with a suppression loss with a hinge margin to hide the backdoor.
- Compared with FAB, Hibernated, Latent, and NeuBA on six datasets and four architectures, the authors claim PtH's post-fine-tuning ASR is on average 64% higher than the baselines and remains strongest under task-aligned domain shift; among seven defenses, only CLIP-Inspector can detect and repair CLIP models.
- The authors state that the attack is task-conditioned and they do not claim transfer to arbitrary unrelated tasks; exact clean-label conflict can erase the backdoor; the LoRA result is only a single configuration; CLIP-Inspector can successfully defend CLIP models. Under the SVHN→MNIST style shift, Flip-ASR drops to 0.04%.
- Evaluated models
- ResNet-18 (resnet18_cifar10)ResNet-50 (IMAGENET1K_V2)CLIP (vit_base_patch16_clip_224.openai_ft_in12k_in1k)DINOv2
- Benchmarks
- CIFAR10SVHNImageNetRESISCUC MercedCamelyon17-WILDSMNIST
- Metrics
- ASRFlip-ASRtop-1 accuracy
Qixuan Jin and other researchers propose Poison-then-Hide, a fine-tuning activation backdoor attack against pretrained vision encoders: a dormant backdoor is first implanted in the pretrained encoder, then activated by fine-tuning with clean downstream data. Existing fine-tuning activation attacks usually assume limited domain shift or frozen encoder layers and often fail under full-model fine-tuning; this method remains effective under cross-domain full-model fine-tuning, and its pipeline includes trigger optimization, base encoder poisoning, and targeted unlearning to hide the backdoor. On six datasets and three model architectures, the attack achieves an attack success rate of up to 97%. The authors find that jointly learning the benign target task and poisoning is key to the attack's success, and demonstrate that standard detection and mitigation defenses cannot completely remove the backdoor, which may also re-emerge after benign fine-tuning.
Paper analysis
What problem does this paper attempt to solve?
Under the realistic setting of full-model fine-tuning where the downstream task differs greatly from pretraining, existing finetuning-activated backdoors often fail; the authors propose an attack that can survive and activate in this setting.
Core question: how to implant a dormant backdoor in a pretrained visual encoder so that it reliably activates after the victim performs full-model fine-tuning with clean downstream data.
- Setting and importance: fine-tuning pretrained encoders is standard practice for cross-domain adaptation, but fine-tuning exposes attack surfaces such as data poisoning, training manipulation and model modification. The authors consider finetuning-activated (FA) attacks especially noteworthy because a backdoored encoder can propagate malicious behavior to many downstream fine-tuned models.
- Shortcomings of existing methods: the authors state that existing FA attacks rely on restrictive assumptions—FAB and Hibernated assume the pretraining and downstream tasks are highly similar, and Latent and NeuBA assume some encoder layers are frozen during fine-tuning; the attacks fail when the assumptions do not hold, e.g., Latent's ASR drops from 99% to 0% under full-layer fine-tuning, and under realistic transfer settings existing FA attacks' ASR drops to 1–3%.
- Core observation: the authors find that jointly learning a benign downstream task during the poisoning stage is a key design for attack success, embedding the malicious behavior into the same feature space as the clean task so that it is harder to erase during fine-tuning.
- What the paper proposes: Poison-then-Hide (PtH), comprising three stages—trigger optimization, encoder poisoning and backdoor hiding—and evaluated on six datasets, four architectures and seven defenses.
- Threat model:
- Goal: implant a dormant backdoor in a pretrained foundation encoder that activates after the victim performs downstream adaptation, so that inputs with the trigger are classified into the target class y_adv.
- Knowledge: a task-conditioned attacker that must anticipate the downstream task family and target class semantics, sufficient to collect a small task-aligned surrogate dataset Dsur; the authors state that such prior knowledge is also required by prior transfer-learning backdoors.
- Capability: cannot modify the victim's fine-tuning data or pipeline; the released checkpoint can appear as a general source-domain pretrained encoder (e.g., ImageNet-pretrained).
- Victim system: downstream users who perform standard clean fine-tuning on the released checkpoint (full-model fine-tuning in the main experiments); in the main experiments the sample overlap between Dsur and the victim's fine-tuning data Dft is 0%.
What related research exists?
Related work falls into two categories, backdoor attacks and backdoor defenses; the authors position their work as studying a more realistic full-model fine-tuning setting.
Backdoor attacks
- Classic and persistent backdoors: Badnets and others implant backdoors through data poisoning, model manipulation or benign training pipelines; naive fine-tuning overwrites the malicious representation and weakens or erases the backdoor, and prior work has proposed robust backdoors that remain effective after fine-tuning, but the authors state that these methods often make the pretrained checkpoint visibly contaminated.
- Hidden finetuning-activated backdoors (the four baselines directly compared in this paper): Hibernated Backdoor (Ning et al., 2022) aligns clean and malicious gradients during fine-tuning; NeuBA (Zhang et al., 2023) enforces trigger-specific latent representations; FAB (Gloaguen et al., 2025) uses meta-learning to optimize weights that activate after fine-tuning; Latent Backdoor (Yao et al., 2019) embeds the backdoor in encoder layers assumed to remain frozen during fine-tuning. The authors point out that these methods rely on restrictive assumptions such as limited domain shift or partial parameter freezing.
Backdoor defenses
- Detection and input filtering: Neural Cleanse (Wang et al., 2019) detects backdoored models via trigger inversion and per-class anomaly scoring; DECREE (Feng et al., 2023) reconstructs triggers from pretrained encoders and flags abnormally compact triggers; DeDe (Hou et al., 2025) trains a decoder and uses input–reconstruction discrepancy to detect triggered inputs; CLIP-Inspector (Jindal et al., 2026) is a model-level detector for prompt-tuned CLIP that inverts OOD triggers and can repair flagged models with the reconstructed trigger.
- Model-level mitigation: Fine-Pruning (Liu et al., 2018) removes neurons inactive on clean inputs; MIMIC (Han et al., 2025) uses mutual-information guidance and distills from a clean reference encoder; MARTINI (Tao et al., 2026) reconstructs backdoor samples and retrains with correct labels to harden the model.
Baselines and benchmarks: the attack baselines are four FA attacks: FAB, Hibernated, Latent and NeuBA; the defense baselines are the seven above. The evaluation datasets are CIFAR10, SVHN, ImageNet, RESISC, UC Merced and Camelyon17(-WILDS), with MNIST additionally used for boundary experiments.
Positioning: the authors state that unlike existing FA attacks, this paper studies the more realistic full-model fine-tuning setting, allowing the downstream task to differ substantially from pretraining; technically, it differs from prior work in jointly learning a benign task during poisoning, ensemble-based trigger optimization, and an explicit post-training suppression stage that hides the behavior before release.
How does the paper address this problem?
Three-stage pipeline: optimize the trigger on an ensemble of simulated fine-tuned models, jointly learn the benign task and the backdoor during poisoning, and hide the backdoor with a suppression loss before release.
Poison-then-Hide overall approach: first optimize a trigger that behaves benignly on the pretrained model and activates only after fine-tuning, then implant it into the encoder, and finally hide the backdoor before release via controlled forgetting (Figure 2).
Problem Formalization
- Let fθ be a vision model pretrained on Dsrc, and the victim fine-tunes on clean downstream data Dft to obtain θ′. The attacker can only access Dsur, which is task-aligned with Dft but has no sample overlap.
- The attacker optimizes a trigger δ (constrained by ‖δ‖∞ ≤ ϵ) and a target class y_adv, with the goal that the fine-tuned model satisfies fθ′(x + αδ) = y_adv, where α ∈ [0,1] controls trigger strength.
Stage One: Trigger Optimization
- Use Dsur to simulate K clean fine-tuned models {fθk′} to approximate the victim's unknown fine-tuning process; the optimization objective is δopt = argmin|δ|∞ ≤ ϵ λbase Lbase(fθ, δ) + λft Lft({fθ′k}, δ): Lbase suppresses the trigger from activating the target class on the base model, and Lft encourages the trigger to activate the target class on each fine-tuned model in the ensemble.
- Optimize with projected gradient descent and project onto the ℓ∞ ball; hyperparameters (Appendix B.3): ϵ = 8/255, 200 steps, Adam learning rate 5×10⁻³, batch size 128, λbase = 1.0, λft = 2.0, ensemble of 10 simulated fine-tuned checkpoints.
Stage Two: Encoder Poisoning
- Add the trigger to a subset of Dsur and label them as the target class to form Dpois, retaining clean samples Dclean; the training objective is a weighted sum of four terms: Lclean (benign task cross-entropy), Lpois (backdoor cross-entropy), LKD (KL distillation to the original model fθ0), and LSP (L2-SP regularization to the initial parameters), with the latter two used to preserve source-domain performance.
- Hyperparameters (Appendix B.4): AdamW learning rate 3×10⁻⁴, weight decay 1×10⁻⁴, 200 steps, batch size 128, poison_fraction = 0.05, distillation temperature T = 3.0, L2-SP coefficient 5×10⁻³.
Stage Three: Backdoor Hiding
- Fine-tune the poisoned model under a suppression objective: apply a hinge margin penalty to the logits of trigger-bearing inputs, Φ(z, yadv) = max(0, m + zyadv − maxk ≠ yadv zk), with m = 2.0, so that at release some non-target logit exceeds the target-class logit by at least margin m.
- Total objective Lhide = λclean·Lclean + λsup·Lsup + λSP·LSP + λKD·LKD, yielding the hidden checkpoint fθ̂; see Appendix Algorithm 1 for the full procedure.
Benign Fine-Tuning and Success Criteria
- The victim performs standard cross-entropy fine-tuning on the released fθ̂, and the authors claim the resulting model inherits the latent backdoor.
- Metrics: conventional ASR (the proportion of trigger-bearing inputs predicted as the target class) and the stricter ASRflip (the proportion where the true label is not the target, the clean prediction is not the target, and adding the trigger flips the prediction to the target); NeuBA is an untargeted attack, and its original ASR is the misclassification rate of perturbed images, with the Flip-ASR column serving only as the corresponding targeted flip diagnostic.
- Appendix A gives a theoretical characterization: a bound on parameter drift over finite steps, conditions for transfer from the simulation to the victim's trajectory, and a hiddenness bound for prediction preservation at release; the authors explicitly state that these results do not independently explain the mechanism by which fine-tuning reactivates the backdoor, and experiments remain the primary evidence.
What experiments did the paper conduct?
Compares four FA attack baselines across three transfer settings and four architectures, and evaluates domain shift, mechanism factors, LoRA, and seven defenses; the authors claim PtH is the only method that stably exhibits hide-then-activate behavior.
Experimental setup
- Models tested: ResNet-18 (resnet18_cifar10, CIFAR10-pretrained), ResNet-50 (IMAGENET1K_V2), CLIP (vit_base_patch16_clip_224.openai_ft_in12k_in1k), DINOv2, all initialized from pretrained weights.
- Datasets and transfer settings: CIFAR10→SVHN (averaged over 10 target digits), ImageNet→RESISC (target class parking lot), ImageNet→Camelyon17 (target class no tumor); the domain-shift settings are fine-tuning on Camelyon17 hospitals 0–2 and evaluating on hospital 3, and RESISC as surrogate data with UC Merced as victim data. Dataset sizes are in Appendix Table 6.
- Baselines: attack baselines FAB, Hibernated, Latent, NeuBA; defense baselines Neural Cleanse, DECREE, Fine-Pruning, MIMIC, DeDe, MARTINI, CLIP-Inspector.
- Metrics: top-1 clean accuracy, ASR, Flip-ASR (defined in Question 3).
- Repetition and statistics: main results are the mean ± 95% confidence interval over 5 random seeds; the domain-shift comparison additionally uses an exact one-sided paired sign-flip test over 10 paired runs (Appendix Table 12).
- Data relationship: except for the explicitly stated overlap ablation, the sample overlap between the attacker's surrogate data and the victim's fine-tuning data is 0%.
Main results
Domain-shift settings (Table 1, mean ± 95% CI, 5 seeds; bold is the strongest targeted attack):
Swipe horizontally to read the table
Model Method C17 hospital 3 Flip-ASR UC Merced Flip-ASR ResNet50 Poison-then-Hide 71.81 ± 12.26 87.46 ± 1.55 ResNet50 FAB 58.34 ± 18.17 17.93 ± 6.58 ResNet50 Hibernated 63.26 ± 16.18 12.33 ± 7.46 ResNet50 Latent 1.89 ± 0.72 0.14 ± 0.06 CLIP Poison-then-Hide 42.16 ± 19.33 48.91 ± 17.34 CLIP FAB 24.84 ± 11.50 0.27 ± 0.17 DINOv2 Poison-then-Hide 40.47 ± 13.93 39.74 ± 9.21 DINOv2 FAB 23.15 ± 10.72 5.29 ± 1.95 (According to Table 1; NeuBA is an untargeted attack with Flip-ASR not exceeding 1.34% in any setting, so its rows are omitted; the Hibernated and Latent rows on CLIP and DINOv2 are also omitted, with full data in Table 1.)
- The authors state that PtH is the strongest targeted method in every ResNet50/CLIP setting under both raw ASR and Flip-ASR, with Flip-ASR advantages over the strongest non-PtH targeted baseline ranging from 8.55 (C17/ResNet50) to 69.52 (UC Merced/ResNet50) percentage points.
- The paired sign-flip test (Appendix Table 12) supports the advantage in three of the four settings; CLIP/Camelyon17 is positive but borderline (p = 0.0625), and the authors avoid making a significance claim for that setting.
- In-domain settings (Appendix Table 14): PtH on ImageNet→RESISC/ResNet50 achieves ASR 87.05 ± 1.67% after fine-tuning and hidden-model ASR 0.01 ± 0.01%; the authors state that PtH is the only method whose ASR consistently increases from hidden to fine-tuned (average increase 57%), and its post-fine-tuning ASR exceeds the baselines by 64% on average.
Mechanism analysis: benign task learning and trigger optimization
- Role of benign task learning (ResNet50, ImageNet→RESISC): the higher the base clean accuracy during poisoning, the higher the post-fine-tuning ASR (Figure 4b, Pearson r = 0.541, p = 9.66×10⁻⁴), and the same holds under OOD settings (Appendix E).
- Insufficient benign learning: among the baselines, only Hibernated achieves high benign accuracy during poisoning (Table 2, 68.12%), but its base accuracy is negatively correlated with post-fine-tuning ASR (Figure 4c, r = −0.457, p = 1.45×10⁻²), and its absolute ASR is below 20%; the authors therefore conclude that benign task learning is necessary but not sufficient.
- Trigger optimization (Figure 5): among four triggers (optimized trigger, Latent trigger, Gaussian noise, sinusoidal pattern), only the optimized trigger maintains high ASR after fine-tuning; the others can reach high ASR during poisoning but are essentially erased after fine-tuning; the ensemble-size ablation (Appendix Figure 9) shows that a single surrogate model is unstable and performance essentially saturates at k = 5.
Defense evaluation
- Detection (Table 3, ResNet50, ImageNet→RESISC): Neural Cleanse's detection rates on Clean (n=10), Hidden (n=5) and Finetuned (n=5) models are 0%, 0% and 20%; the true backdoor class of the only flagged fine-tuned model is not among its top five returned suspicious classes. DECREE is 0% in all three groups.
- Mitigation (Table 4, Table 5): Fine-Pruning reduces the post-fine-tuning model's ASR from 87.05% to 20.13%, but clean accuracy drops from 92.87% to 61.69%; after additional clean fine-tuning, ASR rises back to 47.63%. MIMIC reduces all backdoored models' ASR to below 4%, but ASR rises again after benign fine-tuning, rebounding by up to 47.49%.
- Recent defenses (Appendix Table 16): after MARTINI hardening, benign fine-tuning still yields 81.50% ASR; DeDe's filtered ASR is low because it rejects 79–89% of clean inputs, and the ASR among retained inputs still reaches 95.56% (ResNet50), with detection AUC close to random (52.10). CLIP-Inspector is the exception: it flags all 5 CLIP models, and after repair the true-trigger ASR drops to 2.15% while clean accuracy remains 95.07%, but it applies only to CLIP and requires adaptation from the prompt tuning setting.
Other ablations and analyses
- Style-shift boundary (Appendix Table 9): under the SVHN→MNIST label-preserving shift, Flip-ASR is 45.22% when aligned to SVHN, drops to 1.07% when evaluated on MNIST instead, and drops to 0.04% after the victim fine-tunes on MNIST (MNIST clean accuracy at this point is 99.39%).
- Clean-label conflict (Appendix Table 10): the attack is suppressed when the clean overlap in the victim's fine-tuning data that exactly conflicts with poisoned samples reaches 75–100% (ASR 0.00% at 100% overlap), and variance is large at 25–50%.
- Victim data scale (Appendix Table 11): when the attacker's reference set has 3,000 samples and the victim data is about 201 times that, ASR is still 55.29%.
- LoRA (Appendix Table 15): after LoRA adaptation of ResNet18 on CIFAR10→SVHN (updating only 2.54% of parameters), ASR is 54.98% and benign accuracy is 96.21%, from a single run.
- Hyperparameter sensitivity (Appendix Table 13): under moderate changes to λsup, λKD and λSP and poisoning ratios of 1%–20%, clean accuracy and post-activation ASR remain in similar ranges.
- Input perturbation stress test (Appendix Table 10): adding Gaussian noise on UC Merced, ASR drops to 36.27% at σ = 0.10 and to 4.00% at σ = 0.20, at which point clean accuracy also drops to 50.80%.
What are some points that can be further explored?
The authors list four limitations: task conditioning, clean-label conflict, PEFT coverage, and CLIP-Inspector; the experiments cover four architectures, six datasets, and seven defenses.
Limitations and future directions noted by the authors
- Task conditioning (Section 6 Limitations): the attacker must anticipate the downstream task family and target semantics; the authors do not claim transfer to arbitrary unrelated tasks.
- Clean-label conflict (Section 6): when most originally poisoned samples reappear with clean labels during victim fine-tuning, exact clean-label conflict can erase the backdoor.
- PEFT coverage (Section 6): a single LoRA configuration only shows that activation is possible beyond full-model fine-tuning; prompt tuning, distillation, more PEFT configurations and cross-seed reproduction are left for future work.
- Specialized defense boundary (Section 6): CLIP-Inspector can successfully detect and repair attacked CLIP models, which the authors consider motivates research on architecture-specific defenses with similar behavior.
- Theoretical scope (Appendix A): the formal results do not independently explain the mechanism by which downstream fine-tuning reactivates the backdoor; a mechanistic explanation requires additional assumptions, which the authors do not establish.
Experimental coverage
- The models tested are four encoders in total: ResNet-18, ResNet-50, CLIP and DINOv2; the transfer settings are three: CIFAR10→SVHN, ImageNet→RESISC and ImageNet→Camelyon17, with UC Merced and Camelyon17 hospital 3 used for domain-shift evaluation.
- The attack baselines are four: FAB, Hibernated, Latent and NeuBA; the defense evaluation includes seven: Neural Cleanse, DECREE, Fine-Pruning, MIMIC, DeDe, MARTINI and CLIP-Inspector.
- Main results are the mean ± 95% confidence interval over 5 seeds; the paired test for domain shift uses 10 paired runs; the detection experiment sample sizes are Clean n=10, Hidden n=5, Finetuned n=5.
- Parameter-efficient adaptation covers only one ResNet18 LoRA configuration (single run, Appendix Table 15 and Appendix G.1).
- The paper does not report adaptive defenses against PtH (i.e., mitigations designed specifically after the defender knows the three-stage mechanism); the defense evaluations are all direct applications or adaptations of existing defenses.
Summarize the main content of the paper
PtH achieves a hide-then-activate backdoor under full-model fine-tuning through joint benign task learning, ensemble trigger optimization, and pre-release suppression; most existing defenses cannot eradicate it.
A paper on finetuning-activated (FA) backdoor attacks, aimed at the supply-chain security of pretrained visual encoders.
- Problem: existing FA attacks assume limited domain shift or partial layer freezing, and often fail under full-model fine-tuning when the downstream task differs greatly (the authors state ASR drops to 1–3%).
- Method: Poison-then-Hide has three stages—optimizing the trigger on an ensemble of 10 simulated fine-tuned models (ϵ = 8/255), jointly learning a benign task and the backdoor during poisoning while maintaining source-domain performance with KD and L2-SP, and hiding the backdoor before release with a hinge-margin suppression loss (m = 2.0).
- Main results: on ImageNet→RESISC/ResNet50, the hidden model's ASR is 0.01% and rises to 87.05% after clean fine-tuning (Table 2); the authors state that PtH's post-fine-tuning ASR exceeds the four baselines by 64% on average, and it is the only method that consistently exhibits hide-then-activate behavior.
- Domain shift: on Camelyon17 hospital 3 and RESISC→UC Merced, PtH's Flip-ASR is the strongest targeted method (Table 1); however, under the SVHN→MNIST style shift, Flip-ASR drops to 0.04%, showing a boundary beyond task-aligned shift.
- Mechanism: base clean accuracy is positively correlated with post-fine-tuning ASR (r = 0.541), whereas the Hibernated baseline shows no such relationship; the authors therefore consider joint benign task learning a necessary but insufficient condition.
- Defenses: Neural Cleanse and DECREE essentially fail to detect; Fine-Pruning and MIMIC suppress ASR but it rebounds after benign fine-tuning (up to 47.63%); only CLIP-Inspector can flag and repair all 5 CLIP models (ASR 2.15% after repair). The authors consider this a concrete defense boundary and a motivation for architecture-specific defense research.