Source-linked AI summary

Poison-then-Hide: Finetuning-Activated Backdoor Attack on Pretrained Vision Encoders

Qixuan Jin, Abinitha Gourabathina, Vinith Menon Suriyakumar, Walter Gerych, Marzyeh Ghassemi

arXiv:2611.14970v1cs.LGcs.CRcs.CV

TL;DR

Existing finetuning-activated backdoors often rely on limited domain shift or frozen encoder layers, making full-model finetuning a challenging setting. Poison-then-Hide combines trigger optimization, encoder poisoning, and targeted suppression before release. It is the strongest targeted method across the evaluated task-conditioned domain shifts, though its scope depends on anticipating the downstream task.

  • Problem

    Existing finetuning-activated attacks rely on limited domain shift or frozen encoder layers, leaving their reliability under full-model finetuning an open challenge.

    Source: §1 · p. 1
  • Method

    Poison-then-Hide optimizes a trigger, jointly poisons a pretrained encoder for benign and backdoor tasks, and suppresses the backdoor before release.

    Source: §1 · p. 2
  • Results

    Poison-then-Hide is the strongest targeted method under original and Flip-ASR across evaluated task-conditioned domain shifts, achieving 64% average ASR across six datasets and four architectures.

    Source: §1 · p. 2, §7 · p. 10
  • Takeaways & Limitations

    The attack can remain hidden in a released encoder and activate after benign finetuning, while CLIP-Inspector provides a concrete defense boundary for attacked CLIP models.

    Source: §7 · p. 10

    The attack requires anticipating the downstream task family and target semantics, is not claimed to transfer to arbitrary unrelated tasks, and CLIP-Inspector detects and repairs attacked CLIP models.

    Source: §3.1 · p. 3, §6 · p. 10

Abstract

from arXiv · show

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.

1 Introduction

Existing finetuning-activated backdoors rely on limited domain shift or frozen encoder layers, leaving them unreliable when the full model is finetuned. Poison-then-Hide addresses this setting with a dormant backdoor that activates after clean finetuning and outperforms targeted baselines across evaluated datasets and architectures.

Motivation

  • A finetuning-activated backdoor can spread malicious behavior from one compromised encoder to many downstream finetuned models.The attacker has no control over downstream finetuning and must make the backdoor activate after entirely clean adaptation.Source: §1 · p. 1
  • Prior finetuning-activated attacks assume limited domain shift or frozen encoder layers, and their assumptions can fail under full-model finetuning.Latent ASR drops from 99% to 0% when all layers are finetuned.Source: §1 · pp. 1–2

Approach

  • Poison-then-Hide optimizes a trigger, jointly poisons the encoder for benign and backdoor tasks, then suppresses the backdoor before release.Its design also uses ensemble-based trigger optimization and posttraining suppression.Source: §1 · p. 2

Results

  • Across six datasets and four architectures, Poison-then-Hide achieves 64% average ASR and 34% average transferability to out-of-distribution data, outperforming prior targeted baselines.The attack also survives task-conditioned domain shifts and large victim-to-attacker data ratios.Source: §1 · p. 2

2 Related Work

Prior work covers persistent backdoors, finetuning-activated attacks, and defenses based on trigger inversion, model modification, or input filtering. Existing finetuning-activated methods depend on restrictive assumptions such as limited domain shift or partially frozen parameters.

2.1 Backdoor Attacks

  • Earlier backdoors seek persistence through finetuning, while explicitly concealed methods remain dormant until downstream finetuning but often assume limited domain shift or frozen parameters.Examples include gradient alignment, trigger-specific latent representations, meta-learning, and embedding backdoors in layers assumed to remain frozen.Source: §2.1 · p. 2

2.2 Backdoor Defenses

  • Detection methods use trigger inversion or anomaly scoring, while DeDe detects triggered inputs through input–reconstruction discrepancy.CLIP-Inspector is specialized to prompt-tuned CLIP and can repair flagged models using reconstructed triggers.Source: §2.2 · p. 3
  • Model-based mitigations prune inactive neurons, distill from a clean reference encoder, or reconstruct backdoor samples and retrain on their correct labels.These approaches correspond to Fine-Pruning, MIMIC, and MARTINI, respectively.Source: §2.2 · p. 3

3 Method

The attacker anticipates the downstream task family and target semantics, using task-aligned but sample-disjoint surrogate data while the victim performs clean finetuning. Poison-then-Hide optimizes a trigger, implants it while learning the benign task, conceals it before release, and relies on benign victim finetuning for activation.

3.1 Threat Model

  • The task-conditioned attacker anticipates the downstream task family and target semantics to collect aligned surrogate data, while the victim's finetuning data remains inaccessible.The attack is not claimed to transfer to arbitrary unrelated tasks.Source: §3.1 · p. 3

3.2 Problem Formulation

  • The attacker optimizes a bounded trigger and target class using task-aligned, sample-disjoint surrogate data to induce the target after the victim's downstream finetuning.The victim adapts the pretrained vision model on clean downstream examples.Source: §3.2 · p. 4

3.3 Poison-then-Hide

  • Poison-then-Hide optimizes a trigger to stay benign in the source model yet activate across simulated finetuned models, then poisons the encoder using both clean and triggered surrogate samples.Joint benign-task and backdoor learning is combined with regularizers that preserve source-domain performance.Source: §3.3 · p. 4
  • Before release, targeted suppression hides the backdoor while preserving clean accuracy and encoder stability; the victim's standard clean finetuning then yields a model that inherits the latent backdoor.The concealment objective combines clean loss, suppression loss, and the same stability and distillation terms used during poisoning.Source: §3.3 · pp. 4–5, §3.4 · p. 5

4 Experimental Setup

The experiments cover in-domain, domain-shift, and robustness settings, using pretrained encoders and disjoint attacker-surrogate and victim-finetuning splits unless an overlap ablation is specified. Evaluation reports clean accuracy and targeted attack metrics, alongside several detection and mitigation defenses.

Datasets

  • Experiments use disjoint surrogate and victim splits by default, with in-domain tests drawing both splits from the same distribution.For ImageNet-to-RESISC, the target is “parking lot”; for ImageNet-to-Camelyon17, it is “no tumor.”Source: §4 · p. 5

Models and Evaluation

  • The evaluated pretrained encoders are ResNet-18 for CIFAR10 and ResNet-50, CLIP, and DINOv2 for ImageNet settings.The study reports top-1 clean accuracy and two targeted attack metrics, including a stricter flip rate.Source: §4 · p. 5

Defenses

  • The defense evaluation includes trigger-inversion detectors, neuron pruning, reference-encoder distillation, input filtering, model hardening, and CLIP-specific detection and repair.Figure 3 compares Hidden and Finetuned target-dataset ASR across attack methods; its error bars show 95% confidence intervals across five seeds.Source: §4 · p. 5, Figure 3 · p. 6

5 Results

Poison-then-Hide reliably activates hidden backdoors after finetuning and outperforms prior attacks across tested datasets and models. Its transfer extends to task-aligned domain shifts, while benign-task learning and trigger optimization contribute to performance and tested defenses do not fully remove the attack.

5.1 Poison-then-Hide Outperforms Prior Finetuning-Activated Attacks

  • 64% average: Poison-then-Hide outperforms prior methods in post-finetuning ASR and is the only attack consistently increasing ASR from Hidden to Finetuned models, by 57% on average.Prior methods either implant visible backdoors that fail to transfer or hidden backdoors that fail to activate.Source: §5.1 · p. 6

5.2 Task-Conditioned Transfer Under Domain Shift

  • Under task-aligned shifts, Poison-then-Hide leads targeted baselines in all ResNet50/CLIP settings; its Flip-ASR advantage is positive in three of four, while unrelated MNIST transfer collapses.The CLIP/Camelyon17 result is positive but borderline; SVHN→MNIST Flip-ASR falls from 45.22% to 1.07% under MNIST evaluation and to 0.04% when the victim finetunes on MNIST.Source: §5.2 · pp. 6–7, Table 1 · p. 7

5.3 Stronger Benign Task Learning Leads to Higher Finetuned ASR

  • Higher base clean accuracy correlates with higher finetuned ASR (Pearson r = 0.541, p = 9.66 × 10−4), and the authors attribute stronger transfer to embedding malicious behavior within the clean task's feature space.In the RESISC experiment, ASR exceeded 90% while clean accuracy was near 20% during poisoning; the trendlines summarize five seeds.Source: §5.3 · p. 7, Figure 4 · p. 8

5.4 Benign Task Learning Does Not Guarantee Attack Success

  • Benign-task learning alone is insufficient: Hibernated reaches 68% benign accuracy during poisoning, yet its finetuned ASR remains below 20% and base accuracy correlates negatively with finetuned ASR.The reported correlation is Pearson r = −0.457, p = 1.45 × 10−2.Source: §5.4 · p. 8

5.5 Importance of Trigger Optimization

  • Only the optimized trigger achieves high ASR after finetuning; other tested triggers' effects are largely erased, despite sometimes inducing high ASR during poisoning.The comparison includes the Latent Backdoor trigger, Gaussian noise, and a sinusoidal pattern; optimization uses an ensemble of simulated finetuned models.Source: §5.5 · p. 8, Figure 5 · p. 9

5.6 Robustness against Defenses

  • Neural Cleanse and DECREE generally fail to detect the backdoor; Neural Cleanse's lone flagged model did not include the true backdoor class among its top five suspicious classes.DECREE's inverted trigger differed from the true trigger, and its inverted mask did not localize a backdoor signal.Source: §5.6 · p. 9, Table 3 · p. 9, Figure 6 · p. 10
  • After pruning, benign finetuning raises ASR from 20% to 47%; MIMIC likewise allows ASR to rebound by up to 47% after benign finetuning.Pruning the Finetuned model reduced ASR to 20% but also lowered benign accuracy from 92% to 61%.Source: §5.6 · p. 9, Table 4 · p. 9, Table 5 · p. 10
  • The attack is robust to several broad defenses but not CLIP-Inspector, which reduces ASR to 2.15% while preserving 95.07% clean accuracy.After adaptation to this setting, CLIP-Inspector flagged all five CLIP models.Source: §5.6 · pp. 9–10

6 Limitations

Poison-then-Hide has bounded transfer and adaptation settings: it requires task and target alignment, and some conflicts, defenses, and evaluation configurations remain unresolved.

6 Limitations

  • The attacker must anticipate the downstream task family and target semantics; transfer to arbitrary unrelated tasks is not claimed.Exact clean-label conflicts can erase the backdoor when most originally poisoned samples reappear during victim finetuning.Source: §6 · p. 10
  • Only one LoRA configuration was tested, leaving prompt tuning, distillation, additional PEFT configurations, and replication across seeds open.CLIP-Inspector detects and repairs the attacked CLIP models, establishing a concrete defense boundary.Source: §6 · p. 10

7 Conclusion

Poison-then-Hide targets supply-chain risk from dormant backdoors in pretrained encoders. Its staged design activates the backdoor through clean downstream adaptation, with strong targeted results in the evaluated shifts but a demonstrated defense boundary.

7 Conclusion

  • Poison-then-Hide is the strongest targeted method under original and Flip-ASR across evaluated task-conditioned domain shifts.It survives large victim-to-attacker data ratios and persists in the tested LoRA configuration.Source: §7 · p. 10
  • The attack jointly learns the benign task and backdoor during poisoning, optimizes triggers across simulated finetuned models, and suppresses the backdoor before release.Several standard and recent defenses fail or sacrifice clean utility, while CLIP-Inspector succeeds.Source: §7 · p. 10
  • Hidden finetuning-activated backdoors in pretrained encoders pose a supply-chain risk across full-model and parameter-efficient adaptation.CLIP-Inspector's success establishes a concrete boundary and a promising direction for defense.Source: §7 · p. 10

Supplementary Material

The appendix gives conditional results on finetuning trajectory drift, transfer from simulated to victim trajectories, and prediction concealment at release. These bounds do not explain the mechanism of reactivation, which remains primarily supported by experiments.

A.1 Finite-step stability under smoothness

  • The finite-step stability result bounds parameter displacement after T gradient-descent steps using local smoothness and the gradient at initialization.For small ηL, the displacement scales approximately as γTη; the bound keeps the trajectory within a local neighborhood rather than explaining reactivation.Source: §A.1 · pp. 15–16

A.2 Transfer from simulated to victim finetuning trajectories

  • The transfer result relates simulated and victim finetuning trajectories under local smoothness and bounded gradient mismatch, giving a sufficient condition for victim-side activation.Stage 1 increases the simulated margin, while ensemble diversity aims to reduce surrogate–victim mismatch; L2-SP can reduce encoder displacement but does not independently guarantee activation.Source: §A.2 · p. 16

A.3 Concealment at release (logit-change bound)

  • The concealment result bounds trigger-induced change at release; if the original margin exceeds that bound, the predicted class is unchanged.This formalizes prediction preservation only and does not imply that a particular detection method must fail.Source: §A.3 · p. 17

A Formal Guarantees

  • The formal results characterize finite-step parameter drift, simulated-to-victim trajectory transfer, and release-time predictions, but do not explain reactivation mechanistically.The transfer comparison requires explicit proximity assumptions; a mechanistic account would need assumptions about downstream gradients and the poisoned representation.Source: A Formal Guarantees · p. 15, §A.3 · p. 17

B.1 Dataset

The supplement documents dataset roles and access, trigger optimization and poisoning procedures, compute resources, and a task-conditioned domain-shift probe. That probe retains task and target alignment while comparing feature-space shift with a within-dataset split.

B.1 Dataset

  • The experiments use ImageNet and CIFAR-10 as source datasets, with separate non-overlapping victim and attacker samples in the main in-domain setup.For domain shift, UC Merced is paired with RESISC surrogate data, while Camelyon17 hospital 3 is held out from victim finetuning on hospitals 0–2.Source: §B.1 · p. 18

B.2 Dataset Licensing and Access

  • Dataset access and use are bounded by the stated terms: RESISC45 is CC BY-NC 4.0 and Camelyon17-WILDS is CC BY-NC-ND 4.0.CIFAR-10, SVHN, ImageNet, and UC Merced are stated to be available for research use.Source: §B.2 · p. 18

B.3 Trigger Optimization

  • The universal pixel-space trigger is optimized to target a fixed class after simulated clean finetuning while discouraging a backdoor in the base model.The trigger is optimized jointly over 10 simulated finetuned checkpoints.Source: §B.3 · pp. 18–19

B.4 Poison-then-Hide

  • Poison-then-Hide jointly trains on source and downstream data, poisons part of the transfer set, and uses distillation and L2-SP regularization.The specified poison fraction is 5%; attack success is evaluated on a fully poisoned test loader.Source: §B.4 · p. 19

B.5 Compute Resources

  • Runs use individual NVIDIA RTX A6000 GPUs, with each full pipeline taking 30 minutes to 6 hours depending on dataset and model size.Source code and reproduction instructions are publicly available, but backdoored checkpoints are not released.Source: §B.5 · p. 19

C.1 Task-conditioned domain shift

  • RESISC→UC Merced has substantially larger feature-space distances than a class-balanced within-RESISC split, but the probe retains task and target alignment.UC Merced images are typically brighter and differ in scene structure from RESISC; the authors caution that this is not a complete semantic-shift benchmark.Source: §C.1 · p. 21, Table 8 · p. 21, Figure 7 · p. 21

C.2 A label-preserving semantic/style-shift boundary

The SVHN→MNIST study locates a sharp style-shift boundary despite aligned labels, while the sensitivity studies test proxy quality, training conditions, and hiding-stage settings. Results support task-conditioned transfer under tested conditions, not universal transfer to unrelated visual domains.

C.2 A label-preserving semantic/style-shift boundary

  • 45.22 ± 3.85% Flip-ASR in aligned SVHN falls to 1.07 ± 0.55% on MNIST evaluation and 0.04 ± 0.05% after MNIST finetuning, despite high clean accuracy.The MNIST-finetuned model reaches 99.39 ± 0.14% clean accuracy; the authors attribute the collapse to the trigger–target association not transferring across a large visual-style shift.Source: §C.2 · p. 21, Table 9 · p. 22
  • Mild additional corruption leaves the attack effective, but ASR falls when clean task performance is substantially damaged; exact clean-label conflict can also weaken it.The figure reports 95% confidence intervals.Source: Figure 8 · p. 22
  • 75–100% overlap with clean-label versions of poisoned samples consistently suppresses the attack, unlike the main 0%-overlap threat model.At 25–50% overlap, results have high variance across seeds.Source: §C.2 · p. 22, Figure 8 · p. 22
  • 55.29% ASR persists with 97.59% clean accuracy when the attacker has 3,000 reference examples and victim finetuning data are roughly 201× larger.The authors report that persistence is not an artifact of weak downstream task learning.Source: §C.2 · p. 22, Table 11 · p. 23

C.3 Simulated-finetuning ensemble and training sensitivity

  • Paired tests support the domain-shift conclusion for ResNet50 on both datasets and CLIP on UC Merced, but not a significance claim for CLIP/Camelyon17.Table 12 identifies the exact paired sign-flip test as primary and CLIP/Camelyon17 as positive but not significant.Source: §C.2 · p. 22, Table 12 · p. 23
  • Proxy fidelity matters: 250-step proxies yield 25.75 ± 0.70 ASR, while proxies trained on 10% of SVHN yield 38.26 ± 2.49, with clean accuracy near 97.5%.A restricted k = 5 proxy ensemble still reaches 58.09 ASR in one archived run.Source: §C.3 · p. 22, Figure 9 · p. 24
  • Moderate variation in λsup, λKD, and λSP has little effect on clean accuracy or final ASR, and tested poison fractions from 1% to 20% remain effective.The table caption describes stable accuracy and similar activated ASR across the tested settings.Source: §C.3 · p. 22, Table 13 · p. 23

D Additional Attack Results

The additional results include a visualization of the “parking lot” backdoor class in RESISC and UC Merced and a table covering dataset-transfer performance.

E Additional Attack Results

  • Figure 10 visualizes the “parking lot” backdoor class in the RESISC and UC Merced datasets.The passage identifies the datasets and class shown, but gives no quantitative result.Source: Figure 10 · p. 25
  • Table 14 covers Poison-then-Hide and baseline finetuning-activated backdoor performance across dataset transfers, with means and 95% confidence intervals over five seeds.The supplied caption does not report the table’s cell values.Source: Table 14 · p. 26

E Additional Benign Accuracy Results

Figure 11 reports benign-task-learning trendlines for the Hibernated Backdoor baseline in a ResNet50 ImageNet→RESISC transfer setting.

E Additional Benign Accuracy Results

  • Figure 11’s trendlines show that learning the target dataset’s benign task does not affect attack success for the finetuned Hibernated Backdoor model.The results are for ResNet50 on ImageNet→RESISC.Source: Figure 11 · p. 27
  • The plotted trendlines are LOWESS-smoothed means over five seeds.The caption describes the trendlines’ aggregation and smoothing.Source: Figure 11 · p. 27

F Additional Trigger Optimization Results

This section reports additional defense findings and discusses societal impacts, release safeguards, and the scope of the research methods.

F Additional Trigger Optimization Results

  • Figure 12 shows four trigger patterns on RESISC images, with each trigger bounded by an ℓ∞ norm of ϵ = 8/255.The figure visualizes each trigger alone, the clean image, and the poisoned image.Source: Figure 12 · p. 28

G.1 Parameter-efficient adaptation

  • A ResNet18 LoRA result indicates effectiveness with 2.54% of parameters updated, but is only one configuration and does not establish performance across parameter-efficient methods.The table covers CIFAR10 → SVHN; no exact attack-success value is supplied in the passage.Source: Table 15 · p. 29, §G.1 · p. 29

G.2 Neural Cleanse / G.3 DECREE

  • Neural Cleanse searches for target-class triggers and flags classes with unusually small recovered masks, whereas DECREE inverts triggers to collapse feature embeddings and thresholds normalized trigger size.Neural Cleanse uses a MAD-based mask-size anomaly score; DECREE declares a model backdoored when PL1 < 0.10.Source: §G.2 · p. 29, §G.3 · p. 30

G.4 Fine-Pruning

  • Fine-Pruning scores clean-data channel activations in layer3 and layer4, then zeros the 20% least-active channels in each selected layer.Fixed multiplicative gates also zero the pruned outputs during forward passes.Source: §G.4 · p. 30

G.5 MIMIC

  • MIMIC uses a clean reference encoder, MI-weighted layer selection, and distillation combining feature matching, student-view InfoNCE, and attention-map matching.The method estimates mutual information between intermediate and final encoder features before weighting layer-wise attention matching.Source: §G.5 · p. 30

G.6 DeDe

  • DeDe retains only 21.19% of clean ResNet50 inputs and 11.08% of clean CLIP inputs, while ASR among retained inputs remains 95.56% and 65.95%, respectively.The low filtered ASR must be interpreted alongside clean-input rejection and ASR among retained inputs.Source: §G.6 · p. 31

G.7 MARTINI

  • After MARTINI hardening, clean accuracy falls from 92.21% to 61.97% without reducing ASR; benign finetuning restores accuracy to 91.83% while ASR remains 81.50%.The experiment uses a finetuned ResNet50 Poison-then-Hide model and tests backdoor resurfacing after benign finetuning.Source: §G.7 · p. 31

G.8 CLIP-Inspector

  • CLIP-Inspector flags all five evaluated CLIP models, preserves 95.07% RESISC accuracy, and reduces true-trigger ASR to 2.15%.It was adapted from prompt tuning to full-model transfer, so the result demonstrates a specialized defense rather than broad robustness.Source: §G.8 · p. 31

2. Limitations

  • The paper reports discussing societal impacts of finetuning-activated attacks and possible defenses in its introduction, threat model, and experiments.The checklist response says the paper addresses both positive and negative societal impacts.Source: §2 · p. 35
  • The authors state they release no backdoored models, provide only code needed to reproduce results, and use publicly available data.They say these measures are intended to reduce misuse risk while raising community awareness of security risks.Source: §2 · p. 36
  • The authors say dataset licenses are listed in Appendix Section B.2 and documented reproduction code is released under the MIT License.The code and reproduction commands are provided at the paper's GitHub repository.Source: §2 · pp. 36–37
  • The authors report that the work involves no crowdsourcing or human-subject research, and that LLMs are not part of the core method.The checklist marks human-subject research and core-method LLM usage as not applicable.Source: §2 · pp. 37–38
Loading 2611.14970v1…