用于后门移除的触发器不变对比遗忘学习
摘要
该论文提出了触发器不变对比遗忘(TICU)框架,通过强制干净样本与插入触发器的反事实样本对之间的预测和表征保持不变,移除自然语言处理模型中的文本后门,同时保留模型在干净任务上的性能。
arXiv:2611.33571v1 Announce Type: new
Abstract: Backdoor attacks pose a severe threat to modern NLP models by embedding hidden triggers that induce malicious behavior at inference time. Recent unlearning methods such as gradient ascent (GA) attempt to remove backdoors by maximizing the loss on poisoned samples; however, these methods can suffer from a critical limitation: they may shift the trigger's influence to other classes rather than eliminating it. In this work, we propose Trigger-Invariant Contrastive Unlearning (TICU), a framework for mitigating textual backdoor behavior by enforcing prediction and representation invariance to trigger insertion. TICU constructs clean and trigger-inserted counterfactual pairs, then fine-tunes the model so that both inputs produce consistent output distributions and aligned hidden representations. To preserve clean-task performance, TICU also retains the supervised classification loss on clean data and constrains parameter drift from the original model. Extensive experiments across multiple datasets, model architectures, and attack settings show that TICU improves triggered accuracy and reduces trigger-induced prediction shifts compared with existing baselines, while maintaining competitive label-flipping performance and limiting clean-task degradation.
查看缓存全文
缓存时间: 2026/11/26 09:36
# 1Introduction
Source: [https://arxiv.org/html/2611.33571](https://arxiv.org/html/2611.33571)
Trigger\-Invariant Contrastive Unlearning for Backdoor Removal
Santosh ChapagainShah Muhammad HamdiSoukaina Filali Boubrahimi
School of ComputingUtah State Universitysantosh\.chapagain@usu\.eduSchool of ComputingUtah State Universitys\.hamdi@usu\.eduSchool of ComputingUtah State Universitysoukaina\.boubrahimi@usu\.edu
###### Abstract
Backdoor attacks pose a severe threat to modern NLP models by embedding hidden triggers that induce malicious behavior at inference time\. Recent unlearning methods such as gradient ascent \(GA\) attempt to remove backdoors by maximizing the loss on poisoned samples; however, these methods can suffer from a critical limitation: they may shift the trigger’s influence to other classes rather than eliminating it\. In this work, we propose Trigger\-Invariant Contrastive Unlearning \(TICU\), a framework for mitigating textual backdoor behavior by enforcing prediction and representation invariance to trigger insertion\. TICU constructs clean and trigger\-inserted counterfactual pairs, then fine\-tunes the model so that both inputs produce consistent output distributions and aligned hidden representations\. To preserve clean\-task performance, TICU also retains the supervised classification loss on clean data and constrains parameter drift from the original model\. Extensive experiments across multiple datasets, model architectures, and attack settings show that TICU improves triggered accuracy and reduces trigger\-induced prediction shifts compared with existing baselines, while maintaining competitive label\-flipping performance and limiting clean\-task degradation\.
## 1Introduction
The rapid adoption of large language models \(LLMs\) and transformer\-based architectures has significantly advanced performance across a wide range of natural language processing \(NLP\) tasks[Howard and Ruder \(2018\)](https://arxiv.org/html/2611.33571#bib.bib1);[Loukas et al\. \(2023\)](https://arxiv.org/html/2611.33571#bib.bib2);[Jin et al\. \(2024\)](https://arxiv.org/html/2611.33571#bib.bib3);[Devlin et al\. \(2019\)](https://arxiv.org/html/2611.33571#bib.bib4)\. However, these models are increasingly vulnerable to backdoor attacks[Gu et al\. \(2017\)](https://arxiv.org/html/2611.33571#bib.bib5);[Chen et al\. \(2017\)](https://arxiv.org/html/2611.33571#bib.bib6), where adversaries embed hidden triggers into training data to manipulate model behavior at inference time\. When such triggers are present, the model produces attacker\-controlled outputs while maintaining normal behavior on clean inputs, making these attacks particularly stealthy and dangerous\.
Backdoor attacks in NLP can take many forms, includingword\-level triggers[Kurita et al\. \(2020\)](https://arxiv.org/html/2611.33571#bib.bib7);[Li et al\. \(2021a\)](https://arxiv.org/html/2611.33571#bib.bib8),syntactic patterns[Qi et al\. \(2021c\)](https://arxiv.org/html/2611.33571#bib.bib9), andstylistic manipulations[Qi et al\. \(2021b\)](https://arxiv.org/html/2611.33571#bib.bib10), all of which are designed to evade detection and persist through fine\-tuning or deployment\. The increasing reliance on third\-party datasets and pre\-trained models further worsens this issue, as users often lack visibility into potential poisoning during training\. Thus, developing effective and efficient methods for backdoor removal has become a critical research challenge\.
A widely adopted approach to mitigate backdoor effects is machine unlearning[Wang et al\. \(2019\)](https://arxiv.org/html/2611.33571#bib.bib11);[Li et al\. \(2021d\)](https://arxiv.org/html/2611.33571#bib.bib12);[Shen and others \(2022b\)](https://arxiv.org/html/2611.33571#bib.bib13);[Liu and others \(2022\)](https://arxiv.org/html/2611.33571#bib.bib14);[Geng et al\. \(2025\)](https://arxiv.org/html/2611.33571#bib.bib15), including gradient ascent \(GA\)\-based unlearning, which aims toforgetpoisoned samples by maximizing their training loss\. While GA is computationally efficient and avoids costly retraining, recent work has revealed a fundamental limitation in that it does not truly eliminate the backdoor but instead introduces a phenomenon known as trigger shifting, where the model redirects the trigger’s influence to a different class rather than neutralizing it\. In classification settings, increasing the loss for one class inherently increases the relative probability of other classes\. As a result, GA\-based unlearning often causes the trigger to remain active, but with a different target label\. This issue is largely overlooked by traditional evaluation metrics, which focus on clean accuracy and original attack success rate but fail to capture newly introduced backdoor behaviors\. Even improved variants such as Robust Gradient Ascent \(RGA\)[Zhao et al\. \(2026\)](https://arxiv.org/html/2611.33571#bib.bib38)attempt to regulate optimization dynamics but still rely on the same fundamental principle of loss maximization\. Beyond optimization instability, existing unlearning methods have three major limitations: \(1\) they rely on indirect removal mechanisms that degrade performance on poisoned samples instead of explicitly neutralizing triggers; \(2\) they often harm clean accuracy through global parameter updates; and \(3\) they lack robustness guarantees, especially when triggers are evaluated across all inputs\.

Figure 1:Overview of TICU\.To address these challenges, we propose*Trigger\-Invariant Contrastive Unlearning \(TICU\)*, a novel framework that fundamentally rethinks backdoor removal through the lens of counterfactual unlearning\. Counterfactual learning provides a natural framework for improving model robustness by comparing an observed input with a minimally modified counterpart and encouraging predictions to remain stable when the modification should not affect the underlying task label[Wang and Culotta \(2021\)](https://arxiv.org/html/2611.33571#bib.bib52);[Joshi and He \(2022\)](https://arxiv.org/html/2611.33571#bib.bib53)\. Motivated by this perspective, TICU constructs clean and trigger\-inserted counterfactual pairs and explicitly reduces trigger\-induced changes in both predictions and hidden representations\. Recent unlearning methods further show that model behavior can be selectively removed by optimizing targeted forgetting objectives while preserving useful knowledge[Nguyen et al\. \(2022\)](https://arxiv.org/html/2611.33571#bib.bib48);[Tarun et al\. \(2023\)](https://arxiv.org/html/2611.33571#bib.bib49)\. Motivated by these ideas, TICU constructs clean–triggered counterfactual pairs and treats them as positive pairs whose predictions and hidden representations should remain invariant to trigger insertion\. Instead offorgetting via damage, as in GA\-based methods, TICU directly enforces prediction and representation consistency between clean inputs and their trigger\-inserted counterparts, thereby reducing the trigger\-induced influence on model predictions rather than redistributing it to another class\. TICU has three main components\. First, TICU encourages the model to produce consistent output distributions for clean and trigger\-inserted inputs\. Second, it aligns their internal representations so that the trigger has minimal influence on the learned feature space\. Third, it constrains parameter updates through regularization, which helps preserve clean\-task performance during unlearning\. Unlike GA\-based methods, TICU directly trains the model to remain stable under trigger insertion, reducing the risk of residual or shifted trigger behavior\. Our key contributions include analyzing the limitations of existing backdoor unlearning methods and showing that reducing the original attack does not necessarily eliminate trigger dependence, as residual trigger effects or trigger shifting may remain\. We also design and implement TICU, an invariance\-driven unlearning framework that constructs clean and trigger\-inserted counterfactual pairs to enforce prediction consistency and representation alignment\. In addition, we introduce a unified objective that combines clean classification, prediction invariance, representation alignment, and parameter regularization, and evaluate TICU across multiple datasets, architectures, and attack settings\. The results show improved triggered robustness and reduced trigger\-shifting behavior compared with existing baselines\.
## 2Related Work
### 2\.1Backdoor Attacks on LLMs
Backdoor attacks have emerged as a serious security threat to LLMs, where adversaries implant hidden behaviors during training that are activated by specific triggers at inference time\. Early attacks relied on explicit lexical triggers such as rare or misspelled tokens[Kurita et al\. \(2020\)](https://arxiv.org/html/2611.33571#bib.bib7);[Li et al\. \(2021a\)](https://arxiv.org/html/2611.33571#bib.bib8), while more recent approaches employ increasingly stealthy patterns, including context\-aware words, syntactic structures, and stylistic manipulations[Yang et al\. \(2021b\)](https://arxiv.org/html/2611.33571#bib.bib16);[Qi et al\. \(2021c\)](https://arxiv.org/html/2611.33571#bib.bib9);[Qi et al\. \(2021b\)](https://arxiv.org/html/2611.33571#bib.bib10)\. These advances make modern backdoors significantly harder to detect and mitigate\. Recent studies highlight four key properties of backdoor attacks: \(1\) stealthiness[Qi et al\. \(2021c\)](https://arxiv.org/html/2611.33571#bib.bib9);[Qi et al\. \(2021b\)](https://arxiv.org/html/2611.33571#bib.bib10), as triggers become more natural and less detectable, \(2\) label stealthiness[Gan et al\. \(2022\)](https://arxiv.org/html/2611.33571#bib.bib17);[Yan et al\. \(2023\)](https://arxiv.org/html/2611.33571#bib.bib18);[Gupta and Krishna \(2023\)](https://arxiv.org/html/2611.33571#bib.bib19), where poisoned samples retain clean labels, \(3\) adaptability[Yang et al\. \(2021a\)](https://arxiv.org/html/2611.33571#bib.bib20);[Chen et al\. \(2021\)](https://arxiv.org/html/2611.33571#bib.bib21), allowing attacks to generalize across tasks and datasets, \(4\) durability[Li et al\. \(2021a\)](https://arxiv.org/html/2611.33571#bib.bib8), enabling backdoors to persist even after fine\-tuning\. Furthermore, attacks can be introduced at multiple stages, including pre\-training, fine\-tuning, and even inference\-time manipulation, making them highly flexible and difficult to defend against[Zhou et al\. \(2025\)](https://arxiv.org/html/2611.33571#bib.bib22)\. These characteristics are particularly concerning in modern LLM pipelines, where models are often trained on large\-scale, unverified datasets or adapted using parameter\-efficient techniques such as LoRA[Liu et al\. \(2024\)](https://arxiv.org/html/2611.33571#bib.bib23), allowing backdoor behaviors to propagate across tasks and applications\.
### 2\.2Backdoor Defense on LLMs
Backdoor defenses for NLP models broadly include training\-time robustness methods and post\-training mitigation techniques[Zhou et al\. \(2025\)](https://arxiv.org/html/2611.33571#bib.bib22)\. Training\-time defenses aim to reduce backdoor learning during model training through approaches such as adversarial training[Geiping et al\. \(2021\)](https://arxiv.org/html/2611.33571#bib.bib24), constrained optimization[Zhu et al\. \(2022\)](https://arxiv.org/html/2611.33571#bib.bib25), or specialized modules that absorb malicious updates[Tang et al\. \(2023\)](https://arxiv.org/html/2611.33571#bib.bib26)\. However, these approaches often assume control over the training process and may not be applicable when models are already compromised\. Post\-training defenses, in contrast, focus on detecting or removing backdoor behavior from already trained models\. Input\-level methods such as ONION and STRIP\-ViTA identify suspicious triggers at inference time using perplexity\-based filtering and entropy\-based analysis, respectively, while data\-level approaches aim to detect poisoned samples using robustness, clustering, or attribution signals\.[Qi et al\. \(2021a\)](https://arxiv.org/html/2611.33571#bib.bib27);[Gao et al\. \(2021\)](https://arxiv.org/html/2611.33571#bib.bib28)\. Model\-level defenses include trigger reverse\-engineering[Azizi et al\. \(2021\)](https://arxiv.org/html/2611.33571#bib.bib29);[Shen et al\. \(2022\)](https://arxiv.org/html/2611.33571#bib.bib30), pruning\-based purification methods such as fine\-pruning[Liu et al\. \(2018\)](https://arxiv.org/html/2611.33571#bib.bib31)and attention\-head pruning strategies[Zhao et al\. \(2024\)](https://arxiv.org/html/2611.33571#bib.bib32);[Chapagain et al\. \(2025\)](https://arxiv.org/html/2611.33571#bib.bib33), as well as weight modification strategies such as fine\-mixing and fine\-purifying that aim to remove compromised components without full retraining[Zhang et al\. \(2022\)](https://arxiv.org/html/2611.33571#bib.bib34);[Zhang et al\. \(2023\)](https://arxiv.org/html/2611.33571#bib.bib35)\.
Machine unlearning has become an important approach for backdoor mitigation, aiming to remove the influence of poisoned data while preserving clean\-task performance[Li et al\. \(2021c\)](https://arxiv.org/html/2611.33571#bib.bib36)\. A common unlearning strategy is gradient ascent, which weakens the trigger–target association by maximizing the loss on backdoor samples[Li et al\. \(2025\)](https://arxiv.org/html/2611.33571#bib.bib37)\. However, recent work shows that this loss\-maximization approach can cause trigger shifting, where the trigger is not removed but instead redirected to another class[Zhao et al\. \(2026\)](https://arxiv.org/html/2611.33571#bib.bib38)\. To address this limitation, TICU follows a different principle: rather than indirectly suppressing backdoor behavior, it enforces invariance between clean and triggered inputs to reduce shifted or residual trigger effects\.
## 3Notation and Preliminaries
Let𝒳\\mathcal\{X\}denote the set of text inputs, and let𝒴=\{1,…,K\}\\mathcal\{Y\}=\\\{1,\\dots,K\\\}denote the label space, whereKKis the number of classes\. We define a classifierfθ:𝒳→ΔKf\_\{\\theta\}:\\mathcal\{X\}\\to\\Delta^\{K\}parameterized byθ\\theta, whereΔK\\Delta^\{K\}is the probability simplex over𝒴\\mathcal\{Y\}\. For an inputx∈𝒳x\\in\\mathcal\{X\},fθ\(x\)kf\_\{\\theta\}\(x\)\_\{k\}denotes the predicted probability of classk∈𝒴k\\in\\mathcal\{Y\}\. The predicted label is
y^\(x\)=argmaxk∈𝒴fθ\(x\)k\\hat\{y\}\(x\)=\\arg\\max\_\{k\\in\\mathcal\{Y\}\}f\_\{\\theta\}\(x\)\_\{k\}\(1\)
We also denote byhθ\(x\)∈ℝdh\_\{\\theta\}\(x\)\\in\\mathbb\{R\}^\{d\}the hidden representation of inputxx, such as the encoder output prior to the classification head\.
### 3\.1Backdoor Attack
We consider a standard targeted backdoor attack setting\. Lett∈𝒯t\\in\\mathcal\{T\}denote a trigger, where𝒯\\mathcal\{T\}is the space of possible triggers, and let⊕\\oplusdenote a trigger insertion operator\. For a clean inputx∈𝒳x\\in\\mathcal\{X\}, the triggered version is defined asxt=x⊕tx^\{t\}=x\\oplus t\.
Given a clean dataset𝒟c=\{\(xi,yi\)\}\\mathcal\{D\}\_\{c\}=\\\{\(x\_\{i\},y\_\{i\}\)\\\}, an adversary selects a subset𝒟c\(p\)⊂𝒟c\\mathcal\{D\}\_\{c\}^\{\(p\)\}\\subset\\mathcal\{D\}\_\{c\}and constructs a poisoned dataset by inserting the trigger and modifying labels to a fixed target classy∗∈𝒴y^\{\*\}\\in\\mathcal\{Y\}:
𝒟p=\{\(xit,y∗\)∣\(xi,yi\)∈𝒟c\(p\)\}\.\\mathcal\{D\}\_\{p\}=\\\{\(x\_\{i\}^\{t\},y^\{\*\}\)\\mid\(x\_\{i\},y\_\{i\}\)\\in\\mathcal\{D\}\_\{c\}^\{\(p\)\}\\\}\.\(2\)
The training dataset is given by𝒟=𝒟c∪𝒟p\\mathcal\{D\}=\\mathcal\{D\}\_\{c\}\\cup\\mathcal\{D\}\_\{p\}\. The backdoored model is expected to correctly classify clean inputs while mapping triggered inputs to the target class:
y^\(x\)≈y,y^\(xt\)=y∗\\hat\{y\}\(x\)\\approx y,\\qquad\\hat\{y\}\(x^\{t\}\)=y^\{\*\}\(3\)We assume access to poisoned samples\(xt,y∗\)\(x^\{t\},y^\{\*\}\), either through known triggers or reconstruction methods\. Letfθtf\_\{\\theta\_\{t\}\}denote the backdoored model obtained by minimizingℒt\\mathcal\{L\}\_\{t\}on the training dataset,𝒟\\mathcal\{D\}:
ℒt\\displaystyle\\mathcal\{L\}\_\{t\}=𝔼\(x,y\)∼𝒟c\[CE\(fθt\(x\),y\)\]\\displaystyle=\\mathbb\{E\}\_\{\(x,y\)\\sim\\mathcal\{D\}\_\{c\}\}\\left\[\\mathrm\{CE\}\\\!\\left\(f\_\{\\theta\_\{t\}\}\(x\),y\\right\)\\right\]\(4\)\+𝔼\(xt,y∗\)∼𝒟p\[CE\(fθt\(xt\),y∗\)\]\\displaystyle\+\\mathbb\{E\}\_\{\(x^\{t\},y^\{\*\}\)\\sim\\mathcal\{D\}\_\{p\}\}\\left\[\\mathrm\{CE\}\\\!\\left\(f\_\{\\theta\_\{t\}\}\(x^\{t\}\),y^\{\*\}\\right\)\\right\]
where𝔼\(x,y\)∼𝒟c\\mathbb\{E\}\_\{\(x,y\)\\sim\\mathcal\{D\}\_\{c\}\}and𝔼\(xt,y∗\)∼𝒟p\\mathbb\{E\}\_\{\(x^\{t\},y^\{\*\}\)\\sim\\mathcal\{D\}\_\{p\}\}denote empirical expectations over the clean and poisoned datasets, respectively, andCE\(⋅\)\\mathrm\{CE\}\(\\cdot\)denotes the cross\-entropy loss\. The overall objectiveℒt\\mathcal\{L\}\_\{t\}encourages the model to learn both the clean classification task and the backdoor behavior jointly\. As a result, the backdoored modelfθtf\_\{\\theta\_\{t\}\}performs well on clean samples from𝒟c\\mathcal\{D\}\_\{c\}, while predicting the target classy∗y^\{\*\}when the input contains the triggertt\.
### 3\.2Backdoor Removal via Gradient Ascent
Letfθtf\_\{\\theta\_\{t\}\}denote a backdoored model trained on𝒟\\mathcal\{D\}\. The goal of backdoor removal is to eliminate the undesired association between the triggerttand the target labely∗y^\{\*\}while preserving performance on clean data\.
Gradient ascent \(GA\) is a widely used approach for backdoor unlearning\. The core idea is to increase the prediction error on poisoned samples, which weakens the learned trigger\-target association\. Starting fromθ←θt\\theta\\leftarrow\\theta\_\{t\}, the GA objective is defined as
ℒGA=𝔼\(xt,y∗\)∼𝒟p\[CE\(fθ\(xt\),y∗\)\]\.\\mathcal\{L\}\_\{\\mathrm\{GA\}\}=\\mathbb\{E\}\_\{\(x^\{t\},y^\{\*\}\)\\sim\\mathcal\{D\}\_\{p\}\}\\left\[\\mathrm\{CE\}\\\!\\left\(f\_\{\\theta\}\(x^\{t\}\),y^\{\*\}\\right\)\\right\]\.\(5\)
To preserve performance on clean data, GA is combined with a clean retention term, yielding the following objective:
ℒtotal\\displaystyle\\mathcal\{L\}\_\{\\mathrm\{total\}\}=𝔼\(x,y\)∼𝒟c\[CE\(fθ\(x\),y\)\]\\displaystyle=\\mathbb\{E\}\_\{\(x,y\)\\sim\\mathcal\{D\}\_\{c\}\}\\left\[\\mathrm\{CE\}\\\!\\left\(f\_\{\\theta\}\(x\),y\\right\)\\right\]\(6\)−𝔼\(xt,y∗\)∼𝒟p\[CE\(fθ\(xt\),y∗\)\]\.\\displaystyle\-\\mathbb\{E\}\_\{\(x^\{t\},y^\{\*\}\)\\sim\\mathcal\{D\}\_\{p\}\}\\left\[\\mathrm\{CE\}\\\!\\left\(f\_\{\\theta\}\(x^\{t\}\),y^\{\*\}\\right\)\\right\]\.
While this objective reduces the original trigger\-target association, it does not fully eliminate the influence of the trigger\. Instead, it may induce*trigger shifting*, where the triggered input is redirected to a different incorrect classy′∈𝒴y^\{\\prime\}\\in\\mathcal\{Y\}withy′≠y∗y^\{\\prime\}\\neq y^\{\*\}:
y^\(xt\)=y′,y′≠y∗\.\\hat\{y\}\(x^\{t\}\)=y^\{\\prime\},\\qquad y^\{\\prime\}\\neq y^\{\*\}\.\(7\)
This phenomenon arises because maximizing the loss with respect to the target classy∗y^\{\*\}implicitly increases the relative likelihood of other classes, leading to a redistribution rather than complete removal of the backdoor effect[Zhao et al\. \(2026\)](https://arxiv.org/html/2611.33571#bib.bib38)\.
### 3\.3Trigger Shifting Induced by Gradient Ascent
The redistribution effect can be seen directly from the cross\-entropy gradient\. Letzkz\_\{k\}denote the logit of classkk, and letpk=softmax\(𝐳\)kp\_\{k\}=\\operatorname\{softmax\}\(\\mathbf\{z\}\)\_\{k\}\. For a poisoned example whose attack target isy∗y^\{\*\}, the cross\-entropy loss is−logpy∗\-\\log p\_\{y^\{\*\}\}, with
∂CE∂zy∗=py∗−1,∂CE∂zk=pk,k≠y∗\.\\frac\{\\partial\\mathrm\{CE\}\}\{\\partial z\_\{y^\{\*\}\}\}=p\_\{y^\{\*\}\}\-1,\\qquad\\frac\{\\partial\\mathrm\{CE\}\}\{\\partial z\_\{k\}\}=p\_\{k\},\\quad k\\neq y^\{\*\}\.\(8\)
Gradient ascent on the cross\-entropy loss therefore decreases the target\-class logit while increasing the logits of the non\-target classes\. Consequently, reducingpy∗p\_\{y^\{\*\}\}does not by itself remove the dependence on the trigger; the probability mass removed fromy∗y^\{\*\}can instead be redistributed among the remaining classes\. Equation \([8](https://arxiv.org/html/2611.33571#S3.E8)\) therefore provides a direct mechanism for*trigger shifting*\.
TICU addresses a different objective\. For a clean\-triggered pair, letp=fθ\(x\)p=f\_\{\\theta\}\(x\)andq=fθ\(xt\)q=f\_\{\\theta\}\(x^\{t\}\)\. The prediction\-invariance term is minimized whenp=qp=q\. More generally, suppose that the pairwise Kullback–Leibler divergence satisfies
DKL\(p∥q\)≤ϵ\.D\_\{\\mathrm\{KL\}\}\(p\\,\\\|\\,q\)\\leq\\epsilon\.\(9\)
By Pinsker’s inequality,
TV\(p,q\)≤12DKL\(p∥q\)≤ϵ2,\\operatorname\{TV\}\(p,q\)\\leq\\sqrt\{\\frac\{1\}\{2\}D\_\{\\mathrm\{KL\}\}\(p\\,\\\|\\,q\)\}\\leq\\sqrt\{\\frac\{\\epsilon\}\{2\}\},\(10\)
which bounds the change in the predicted distribution induced by trigger insertion\. Thus, rather than selecting which non\-target class should receive the probability mass removed fromy∗y^\{\*\}, TICU directly penalizes any trigger\-induced change in the output distribution\. Representation alignment applies the same invariance principle in the hidden representation space\.
Equations \([9](https://arxiv.org/html/2611.33571#S3.E9)\)–\([10](https://arxiv.org/html/2611.33571#S3.E10)\) therefore characterize the mechanism targeted by TICU\. This argument should not, however, be interpreted as a formal machine\-unlearning or deletion guarantee, because the divergence is minimized empirically over the available trigger distribution rather than being guaranteed for every possible trigger\.
## 4Trigger\-Invariant Contrastive Unlearning
In standard backdoor settings, a fixed triggerttinduces a spurious association between inputs and a target label\. To eliminate this behavior, we propose*Trigger\-Invariant Contrastive Unlearning \(TICU\)*, which enforces invariance of model predictions and representations to trigger insertion\. Unlike GA\-based approaches that indirectly suppress backdoor behavior, TICU explicitly reduces the trigger\-induced effect by enforcing invariance between clean and trigger\-inserted inputs\.
We generalize the trigger to a distributionP𝒯P\_\{\\mathcal\{T\}\}over a trigger space𝒯\\mathcal\{T\}\. A triggert∼P𝒯t\\sim P\_\{\\mathcal\{T\}\}is applied to an inputx∈𝒳x\\in\\mathcal\{X\}through an operator⊕:𝒳×𝒯→𝒳\\oplus:\\mathcal\{X\}\\times\\mathcal\{T\}\\to\\mathcal\{X\}, which gives the triggered samplext=x⊕tx^\{t\}=x\\oplus t\. For each clean sample\(x,y\)∼𝒟c\(x,y\)\\sim\\mathcal\{D\}\_\{c\}, we samplet∼P𝒯t\\sim P\_\{\\mathcal\{T\}\}, construct the counterfactual inputxtx^\{t\}, and enforce
fθ\(x\)≈fθ\(xt\),hθ\(x\)≈hθ\(xt\)\.f\_\{\\theta\}\(x\)\\approx f\_\{\\theta\}\(x^\{t\}\),\\qquad h\_\{\\theta\}\(x\)\\approx h\_\{\\theta\}\(x^\{t\}\)\.
TICU optimizes a combination of classification, invariance, and regularization objectives\. We preserve task performance on clean data using standard cross\-entropy:
ℒclean=𝔼\(x,y\)∼𝒟c\[CE\(fθ\(x\),y\)\]\.\\mathcal\{L\}\_\{\\mathrm\{clean\}\}=\\mathbb\{E\}\_\{\(x,y\)\\sim\\mathcal\{D\}\_\{c\}\}\\big\[\\mathrm\{CE\}\(f\_\{\\theta\}\(x\),y\)\\big\]\.\(11\)
For prediction invariance loss, we use symmetric Kullback–Leibler \(KL\) divergence[Kullback and Leibler \(1951\)](https://arxiv.org/html/2611.33571#bib.bib50)to enforce bidirectional consistency, ensuring both distributions align without bias toward either clean or triggered inputs:
ℒpred=𝔼\(x,y\)∼𝒟c,t∼P𝒯\[\\displaystyle\\mathcal\{L\}\_\{\\mathrm\{pred\}\}=\\mathbb\{E\}\_\{\(x,y\)\\sim\\mathcal\{D\}\_\{c\},\\;t\\sim P\_\{\\mathcal\{T\}\}\}\\Big\[KL\(fθ\(x\)∥fθ\(xt\)\)\\displaystyle\\mathrm\{KL\}\\big\(f\_\{\\theta\}\(x\)\\,\\\|\\,f\_\{\\theta\}\(x^\{t\}\)\\big\)\(12\)\+KL\(fθ\(xt\)∥fθ\(x\)\)\]\.\\displaystyle\+\\mathrm\{KL\}\\big\(f\_\{\\theta\}\(x^\{t\}\)\\,\\\|\\,f\_\{\\theta\}\(x\)\\big\)\\Big\]\.
Similarly, to suppress trigger\-dependent features, we align hidden representations using cosine similarity:
ℒrep=𝔼\(x,y\)∼𝒟c,t∼P𝒯\[1−cos\(hθ\(x\),hθ\(xt\)\)\]\.\\mathcal\{L\}\_\{\\mathrm\{rep\}\}=\\mathbb\{E\}\_\{\(x,y\)\\sim\\mathcal\{D\}\_\{c\},\\;t\\sim P\_\{\\mathcal\{T\}\}\}\\Big\[1\-\\cos\\big\(h\_\{\\theta\}\(x\),h\_\{\\theta\}\(x^\{t\}\)\\big\)\\Big\]\.\(13\)
Finally, to prevent excessive deviation from the original model, we include anℓ2\\ell\_\{2\}regularization term:
ℒreg=‖θ−θt‖22,\\mathcal\{L\}\_\{\\mathrm\{reg\}\}=\\\|\\theta\-\\theta\_\{t\}\\\|\_\{2\}^\{2\},\(14\)whereθt\\theta\_\{t\}denotes the parameters of the poisoned model\. The overall TICU objective is given by
ℒTICU=ℒclean\+λpredℒpred\+λrepℒrep\+λregℒreg,\\mathcal\{L\}\_\{\\mathrm\{TICU\}\}=\\mathcal\{L\}\_\{\\mathrm\{clean\}\}\+\\lambda\_\{\\mathrm\{pred\}\}\\mathcal\{L\}\_\{\\mathrm\{pred\}\}\+\\lambda\_\{\\mathrm\{rep\}\}\\mathcal\{L\}\_\{\\mathrm\{rep\}\}\+\\lambda\_\{\\mathrm\{reg\}\}\\mathcal\{L\}\_\{\\mathrm\{reg\}\},\(15\)
TICU optimizes the combined objective in Eq\. \([15](https://arxiv.org/html/2611.33571#S4.E15)\) using standard gradient\-based optimization\. Let
g=∇θℒTICUg=\\nabla\_\{\\theta\}\\mathcal\{L\}\_\{\\mathrm\{TICU\}\}\(16\)denote the gradient of the overall TICU objective with respect to the trainable parameters\. The parameter update is given by
θ←θ−ηg,\\theta\\leftarrow\\theta\-\\eta g,\(17\)whereη\\etais the learning rate\. This update jointly incorporates the clean classification, prediction invariance, representation alignment, and parameter regularization terms, encouraging robustness to trigger insertion while limiting excessive deviation from the poisoned model\. The TICU procedure is summarized in Algorithm[1](https://arxiv.org/html/2611.33571#alg1)\.
Algorithm 1Trigger\-Invariant Contrastive Unlearning \(TICU\)0:Poisoned model parameters
θt\\theta\_\{t\}, clean dataset
𝒟c\\mathcal\{D\}\_\{c\}, trigger distribution
P𝒯P\_\{\\mathcal\{T\}\}, learning rate
η\\eta, loss coefficients
λpred,λrep,λreg\\lambda\_\{\\mathrm\{pred\}\},\\lambda\_\{\\mathrm\{rep\}\},\\lambda\_\{\\mathrm\{reg\}\}
0:Unlearned model parameters
θ\\theta
1:Initialize
θ←θt\\theta\\leftarrow\\theta\_\{t\}
2:foreach minibatch
\{\(xi,yi\)\}i=1B\\\{\(x\_\{i\},y\_\{i\}\)\\\}\_\{i=1\}^\{B\}sampled from
𝒟c\\mathcal\{D\}\_\{c\}do
3:Sample triggers
\{ti\}i=1B∼P𝒯\\\{t\_\{i\}\\\}\_\{i=1\}^\{B\}\\sim P\_\{\\mathcal\{T\}\}
4:Construct triggered inputs
xit←xi⊕tix\_\{i\}^\{t\}\\leftarrow x\_\{i\}\\oplus t\_\{i\}for
i=1,…,Bi=1,\\dots,B
5:Compute
ℒclean\\mathcal\{L\}\_\{\\mathrm\{clean\}\},
ℒpred\\mathcal\{L\}\_\{\\mathrm\{pred\}\},
ℒrep\\mathcal\{L\}\_\{\\mathrm\{rep\}\}, and
ℒreg\\mathcal\{L\}\_\{\\mathrm\{reg\}\}
6:
ℒTICU←ℒclean\+λpredℒpred\+λrepℒrep\+λregℒreg\\mathcal\{L\}\_\{\\mathrm\{TICU\}\}\\leftarrow\\mathcal\{L\}\_\{\\mathrm\{clean\}\}\+\\lambda\_\{\\mathrm\{pred\}\}\\mathcal\{L\}\_\{\\mathrm\{pred\}\}\+\\lambda\_\{\\mathrm\{rep\}\}\\mathcal\{L\}\_\{\\mathrm\{rep\}\}\+\\lambda\_\{\\mathrm\{reg\}\}\\mathcal\{L\}\_\{\\mathrm\{reg\}\}
7:Compute gradient
g←∇θℒTICUg\\leftarrow\\nabla\_\{\\theta\}\\mathcal\{L\}\_\{\\mathrm\{TICU\}\}
8:Update parameters
θ←θ−ηg\\theta\\leftarrow\\theta\-\\eta g
9:endfor
10:return
fθf\_\{\\theta\}
## 5Experiments
### 5\.1Experimental Setup
#### 5\.1\.1Datasets
We evaluate our approach on three widely used text classification benchmarks: SST\-2[Socher et al\. \(2013\)](https://arxiv.org/html/2611.33571#bib.bib39), HSOL[Davidson et al\. \(2017\)](https://arxiv.org/html/2611.33571#bib.bib40), and AG News[Zhang et al\. \(2015\)](https://arxiv.org/html/2611.33571#bib.bib41)\. These datasets differ in linguistic style, input length, and label complexity, providing a comprehensive evaluation setting\. SST\-2 consists of short movie review snippets annotated for binary sentiment\. HSOL contains informal and noisy social media posts for hate speech detection\. AG News is a topic classification dataset that is derived from news articles of four categories: World, Sports, Business, and Sci/Tech\. Dataset statistics are shown in Table[1](https://arxiv.org/html/2611.33571#S5.T1)\.
Table 1:Statistics of the evaluation datasets\.
#### 5\.1\.2Implementation Details
We evaluate TICU on encoder\-based BERT\-base and DistilBERT\-base models with full fine\-tuning, and on decoder\-based LLaMA\-2 7B, Mistral 7B, and Qwen2 7B models using LoRA with 4\-bit quantization and gradient checkpointing\. Model statistics are reported in Table[2](https://arxiv.org/html/2611.33571#S5.T2)\. All experiments use HuggingFace Transformers with a maximum sequence length of 128\. For LoRA, we setr=8r=8,α=16\\alpha=16, dropout to0\.050\.05, and apply adapters to the attention and feed\-forward projection layers\. Poisoned training and TICU unlearning use AdamW with a learning rate of2×10−52\\times 10^\{\-5\}, no weight decay, gradient clipping at1\.01\.0, a linear scheduler with6%6\\%warmup, and batch size 8\. Poisoned models are trained for 5 epochs and TICU for 10 epochs\. We useλpred=1\.0\\lambda\_\{\\mathrm\{pred\}\}=1\.0,λrep=0\.1\\lambda\_\{\\mathrm\{rep\}\}=0\.1, andλreg=0\.05\\lambda\_\{\\mathrm\{reg\}\}=0\.05across all configurations without per\-setting tuning; sensitivity analysis is left for future work\. Experiments are run on a Linux server with dual Intel Xeon Gold 5220R CPUs and eight NVIDIA RTX A4000 GPUs\. Code is available on GitHub111https://github\.com/chapagaisa/ticu\.
Table 2:Parameter statistics and configurations\.
#### 5\.1\.3Backdoor Attacks
We use three backdoor attacks to poison the datasets: BadNet, AddSent, and HiddenKiller\. To construct poisoned training data, we insert triggers into 10% of the non\-target\-class samples and relabel them to the target class\. BadNet[Gu et al\. \(2017\)](https://arxiv.org/html/2611.33571#bib.bib5)inserts rare trigger token\(s\) into the input text\. In our implementation, these triggers are automatically selected from tokens that appear frequently in poisoned samples but rarely in clean data\. AddSent[Jia and Liang \(2017\)](https://arxiv.org/html/2611.33571#bib.bib43)appends a fixed trigger phrase to the input\. We obtain this phrase automatically as the most frequent 4\-gram in the poisoned samples\. HiddenKiller[Qi et al\. \(2021c\)](https://arxiv.org/html/2611.33571#bib.bib9)is a stealthy syntactic backdoor that uses a syntactically controlled paraphrase network \(SCPN\)[Iyyer et al\. \(2018\)](https://arxiv.org/html/2611.33571#bib.bib42)to rewrite clean text into a rare sentence structure while preserving its meaning\. In our experiments, we use the low\-frequency syntactic templateS\(SBAR\)\(,\)\(NP\)\(VP\)\(\.\), which represents a sentence containing a subordinate clause followed by a noun phrase and a verb phrase\.
#### 5\.1\.4Comparison Methods
- •Gradient Ascent \(GA\): Vanilla gradient\-ascent unlearning \(GA\)[Li et al\. \(2021b\)](https://arxiv.org/html/2611.33571#bib.bib44);[Shen and others \(2022a\)](https://arxiv.org/html/2611.33571#bib.bib45);[Liu et al\. \(2022\)](https://arxiv.org/html/2611.33571#bib.bib46)removes backdoor behavior by maximizing the loss on detected poisoned samples\. Here, the model is fine\-tuned to increase prediction error on poisoned inputs while optionally preserving performance on clean data\. Although GA is simple and computationally efficient, prior work shows that it suffers from trigger shifting, where the backdoor is not eliminated but redirected to other classes\.
- •Robust Gradient Ascent \(RGA\)\.Robust Gradient Ascent \(RGA\)[Zhao et al\. \(2026\)](https://arxiv.org/html/2611.33571#bib.bib38)extends GA by stabilizing the optimization dynamics during unlearning\. It introduces constraints to prevent the model from excessively redistributing probability mass across non\-target classes, which reduces the risk of trigger shifting\. While RGA improves over vanilla GA in terms of stability and robustness, it still relies on indirect loss maximization and does not explicitly remove the causal influence of the trigger\.
- •Negative Preference Optimization \(NPO\)\.Negative Preference Optimization \(NPO\)[Zhang and others \(2024\)](https://arxiv.org/html/2611.33571#bib.bib47)removes backdoors by treating them like bad behaviors the model should avoid\. Instead of maximizing loss on poisoned samples, NPO treats undesirable model behaviors \(i\.e\., triggered outputs\) as negative preferences and optimizes the model to avoid them\. This preference\-based formulation improves training stability and mitigates catastrophic collapse commonly observed in GA\-based methods\. As a result, NPO can suppress backdoor behavior while better preserving overall model utility\.
- •Retraining \(RT\)\.We also include a retraining baseline \(RT\), where a clean model is trained from scratch using only the clean dataset\. Since this approach completely removes the influence of poisoned samples, it provides an upper bound on achievable performance and serves as a gold standard for evaluating backdoor defenses\. However, retraining is computationally expensive and often impractical in real\-world scenarios where access to clean data or training resources is limited\.
#### 5\.1\.5Backdoor Sample Detection
In realistic settings, poisoned samples are not known a priori\. Therefore, before unlearning, we identify candidate poisoned samples using CUBE[Cui et al\. \(2022\)](https://arxiv.org/html/2611.33571#bib.bib51), a clustering\-based detection method with three stages: representation learning, embedding\-space clustering, and filtering\. Since poisoned samples often share trigger\-specific patterns, they tend to form compact minority clusters\. After detection, we estimate the trigger distributionPTP\_\{T\}from the detected set\. For lexical and phrase\-level attacks,PTP\_\{T\}is derived from overrepresented trigger tokens ornn\-grams, while for syntactic attacks it is defined by the recovered syntactic template\. TICU then constructs clean–triggered counterfactual pairs by applying samples fromPTP\_\{T\}to clean inputs\. TICU therefore depends on the quality of the estimated trigger distribution\. In the present evaluation, CUBE provides candidate poisoned samples from whichPTP\_\{T\}is estimated, but we do not separately evaluate poison\-detection precision, recall, or F1, nor compare against an oracle setting using ground\-truth poisoned samples\. Consequently, the reported results reflect the complete detection\-and\-repair pipeline rather than the intrinsic ceiling of TICU under perfect trigger knowledge\. Errors in detection can yield an incomplete or contaminated estimate ofPTP\_\{T\}and may weaken the counterfactual invariance objective\. Evaluating TICU with ground\-truth poisoned samples and systematically varying detection quality is therefore an important direction for future work\.
#### 5\.1\.6Evaluation Metrics
We evaluate backdoor removal effectiveness using metrics that capture both clean performance and robustness to trigger\-induced behavior\.Accuracy \(ACC\)measures performance on the clean test dataset and reflects how well the original task performance is preserved after unlearning\.Label Flip Rate \(LFR\)quantifies the proportion of non\-target samples that are misclassified as the target class due to the backdoor\. For example, in SST\-2 with “positive” as the target class, LFR is computed as the fraction of negative instances classified as positive, with a lower LFR indicating reduced backdoor influence\.Triggered Accuracy \(TACC\)measures performance on a poisoned test set in which triggers are inserted into all samples while their original labels remain unchanged\.ΔTACC\\Delta\\text\{TACC\}measures the absolute difference in TACC between the retrained clean model \(RT\) and the unlearned model, where a lowerΔTACC\\Delta\\text\{TACC\}indicates that the unlearned model more closely approximates a backdoor\-free state\. Since LFR captures only direct flipping to the attacker’s target class, it may fail to detect shifted trigger effects toward other labels\. We therefore treatΔTACC\\Delta\\text\{TACC\}as the primary robustness metric for evaluating trigger shifting, while reporting LFR as a measure of target\-label flipping\.
### 5\.2Results
Table 3:Comparison of TICU with the strongest baseline in each setting\. Results are meanSDover three seeds\. Higher is better for ACC and TACC; lower is better for LFR andΔ\\DeltaTACC\. Bold denotes the best result\. Baseline details are provided in[Zhao et al\. \(2026\)](https://arxiv.org/html/2611.33571#bib.bib38)\.Table[3](https://arxiv.org/html/2611.33571#S5.T3)shows the performance of TICU against the strongest baseline in each model–dataset–attack configuration\. Across the 45 evaluated configurations, TICU demonstrates strong robustness to trigger\-induced prediction shifts\. In several challenging settings, TICU substantially reducesΔ\\DeltaTACC relative to the strongest baseline\. For example, on LLaMA\-2/SST\-2/HiddenKiller, TICU achieves aΔ\\DeltaTACC of0\.360\.36, compared with12\.1012\.10for NPO, corresponding to a reduction of more than96%96\\%\. Similarly, on Qwen/SST\-2/AddSent, TICU achieves aΔ\\DeltaTACC of0\.270\.27, compared with2\.622\.62for RGA\. These results indicate that explicitly enforcing invariance between clean and trigger\-inserted inputs can substantially reduce residual trigger effects in settings where loss\-maximization\-based methods remain vulnerable to prediction shifts\.
TICU does not outperform the strongest baseline in every configuration, particularly with respect to LFR\. This reflects the distinction between suppressing direct target\-label flipping and reducing the broader influence of a trigger on model predictions\. Some configurations therefore remain challenging, especially under stealthy syntactic attacks or settings with high label\-flipping rates\. Nevertheless, TICU achieves the best performance in30 out of 45 configurations \(66\.7%\)under the primary robustness criteria, showing that the proposed invariance\-based objective is effective across a broad range of models, datasets, and attack types\.
### 5\.3Ablation Study
To evaluate the contribution of each component in TICU, we perform an ablation study by removing the prediction invariance loss \(ℒpred\\mathcal\{L\}\_\{\\mathrm\{pred\}\}\), representation alignment loss \(ℒrep\\mathcal\{L\}\_\{\\mathrm\{rep\}\}\), and regularization term \(ℒreg\\mathcal\{L\}\_\{\\mathrm\{reg\}\}\)\. Results are shown in Figure[2](https://arxiv.org/html/2611.33571#S5.F2)\. The full TICU framework generally reduces LFR compared with its ablated variants, showing the importance of jointly optimizing all objectives\. Removingℒpred\\mathcal\{L\}\_\{\\mathrm\{pred\}\}increases LFR in all configurations, indicating that prediction invariance is critical for suppressing trigger\-induced label flipping\. Removingℒrep\\mathcal\{L\}\_\{\\mathrm\{rep\}\}also degrades performance, although the effect is generally smaller\. The largest degradation occurs when removingℒreg\\mathcal\{L\}\_\{\\mathrm\{reg\}\}, where LFR increases dramatically across all attacks and models\. For example, on Qwen/AG/BadNet, LFR increases from 9\.33 to 40\.93, while on BERT/HSOL/HiddenKiller it rises from 47\.55 to 89\.54\. These results confirm that regularization plays a crucial role in preventing trigger shifting and stabilizing unlearning\.
Figure 2:Impact of TICU loss components on Label Flip Rate \(LFR\)\. Removing individual objectives increases LFR, with the largest degradation observed when removingℒreg\\mathcal\{L\}\_\{\\mathrm\{reg\}\}\.
## 6Conclusion and Future Directions
We introduced Trigger\-Invariant Contrastive Unlearning \(TICU\), a model\-repair framework that reduces trigger\-induced behavior by enforcing prediction and representation invariance between clean and trigger\-inserted inputs\. Across multiple datasets, model architectures, and attack types, TICU frequently reduces triggered prediction shifts while preserving competitive clean\-task performance\. These results show that directly enforcing trigger invariance provides a promising alternative to loss\-maximization\-based backdoor removal\. The present study focuses on textual classification and three representative backdoor attacks\. Future work will extend TICU to more adaptive attack settings, investigate sensitivity to trigger estimation and loss coefficients, and explore its application to generative language models and other data modalities\.
## References
- A\. Azizi, I\. A\. Tahmid, A\. Waheed, N\. Mangaokar, J\. Pu, M\. Javed, C\. K\. Reddy, and B\. Viswanath\{\\\{t\-Miner\}\\\}: a generative approach to defend against trojan attacks on\{\\\{dnn\-based\}\\\}text classification\.In30th USENIX Security Symposium \(USENIX Security 21\),pp\. 2255–2272\.Cited by:[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p1.1)\.
- Chapagainet al\.\(2025\)S\. Chapagain, S\. M\. Hamdi, and S\. F\. BoubrahimiPruning strategies for backdoor defense in llms\.InProceedings of the 34th ACM International Conference on Information and Knowledge Management,pp\. 4633–4638\.Cited by:[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p1.1)\.
- Chenet al\.\(2021\)K\. Chen, Y\. Meng, X\. Sun, S\. Guo, T\. Zhang, J\. Li, and C\. FanBadpre: task\-agnostic backdoor attacks to pre\-trained nlp foundation models\.arXiv preprint arXiv:2110\.02467\.Cited by:[§2\.1](https://arxiv.org/html/2611.33571#S2.SS1.p1.1)\.
- Chenet al\.\(2017\)X\. Chen, C\. Liu, B\. Li, K\. Lu, and D\. SongTargeted backdoor attacks on deep learning systems using data poisoning\.arXiv preprint arXiv:1712\.05526\.Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p1.1)\.
- Cuiet al\.\(2022\)G\. Cui, L\. Yuan, B\. He, Y\. Chen, Z\. Liu, and M\. SunA unified evaluation of textual backdoor learning: frameworks and benchmarks\.InAdvances in Neural Information Processing Systems,Vol\.35,pp\. 5009–5023\.Cited by:[§5\.1\.5](https://arxiv.org/html/2611.33571#S5.SS1.SSS5.p1.1)\.
- Davidsonet al\.\(2017\)T\. Davidson, D\. Warmsley, M\. Macy, and I\. WeberAutomated hate speech detection and the problem of offensive language\.Proceedings of the International AAAI Conference on Web and Social Media \(ICWSM\)\.Cited by:[§5\.1\.1](https://arxiv.org/html/2611.33571#S5.SS1.SSS1.p1.1)\.
- Devlinet al\.\(2019\)J\. Devlin, M\. Chang, K\. Lee, and K\. ToutanovaBert: pre\-training of deep bidirectional transformers for language understanding\.InProceedings of the 2019 conference of the North American chapter of the association for computational linguistics: human language technologies, volume 1 \(long and short papers\),pp\. 4171–4186\.Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p1.1)\.
- Ganet al\.\(2022\)L\. Gan, J\. Li, T\. Zhang, X\. Li, Y\. Meng, F\. Wu, Y\. Yang, S\. Guo, and C\. FanTriggerless backdoor attack for nlp tasks with clean labels\.InProceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies,pp\. 2942–2952\.Cited by:[§2\.1](https://arxiv.org/html/2611.33571#S2.SS1.p1.1)\.
- Gaoet al\.\(2021\)Y\. Gao, Y\. Kim, B\. G\. Doan, Z\. Zhang, G\. Zhang, S\. Nepal, D\. C\. Ranasinghe, and H\. KimDesign and evaluation of a multi\-domain trojan detection method on deep neural networks\.IEEE Transactions on Dependable and Secure Computing19\(4\),pp\. 2349–2364\.Cited by:[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p1.1)\.
- Geipinget al\.\(2021\)J\. Geiping, L\. Fowl, G\. Somepalli, M\. Goldblum, M\. Moeller, and T\. GoldsteinWhat doesn’t kill you makes you robust \(er\): how to adversarially train against data poisoning\.arXiv preprint arXiv:2102\.13624\.Cited by:[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p1.1)\.
- Genget al\.\(2025\)J\. Geng, Q\. Li, H\. Woisetschlaeger, Z\. Chen, F\. Cai, Y\. Wang, P\. Nakov, H\. Jacobsen, and F\. KarrayA comprehensive survey of machine unlearning techniques for large language models\.arXiv preprint arXiv:2503\.01854\.Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p3.1)\.
- Guet al\.\(2017\)T\. Gu, B\. Dolan\-Gavitt, and S\. GargBadnets: identifying vulnerabilities in the machine learning model supply chain\.arXiv preprint arXiv:1708\.06733\.Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p1.1),[§5\.1\.3](https://arxiv.org/html/2611.33571#S5.SS1.SSS3.p1.1)\.
- Gupta and Krishna \(2023\)A\. Gupta and A\. KrishnaAdversarial clean label backdoor attacks and defenses on text classification systems\.InProceedings of the 8th Workshop on Representation Learning for NLP \(RepL4NLP 2023\),pp\. 1–12\.Cited by:[§2\.1](https://arxiv.org/html/2611.33571#S2.SS1.p1.1)\.
- Howard and Ruder \(2018\)J\. Howard and S\. RuderUniversal language model fine\-tuning for text classification\.arXiv preprint arXiv:1801\.06146\.Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p1.1)\.
- Iyyeret al\.\(2018\)M\. Iyyer, J\. Wieting, K\. Gimpel, and L\. ZettlemoyerAdversarial example generation with syntactically controlled paraphrase networks\.InProceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 \(Long Papers\),pp\. 1875–1885\.Cited by:[§5\.1\.3](https://arxiv.org/html/2611.33571#S5.SS1.SSS3.p1.1)\.
- Jia and Liang \(2017\)R\. Jia and P\. LiangAdversarial examples for evaluating reading comprehension systems\.InEMNLP,Cited by:[§5\.1\.3](https://arxiv.org/html/2611.33571#S5.SS1.SSS3.p1.1)\.
- Jinet al\.\(2024\)Y\. Jin, M\. Chandra, G\. Verma, Y\. Hu, M\. De Choudhury, and S\. KumarBetter to ask in english: cross\-lingual evaluation of large language models for healthcare queries\.InProceedings of the ACM Web Conference 2024,pp\. 2627–2638\.Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p1.1)\.
- Joshi and He \(2022\)N\. Joshi and H\. HeAn investigation of the \(in\)effectiveness of counterfactually augmented data\.InProceedings of the 60th Annual Meeting of the Association for Computational Linguistics,pp\. 3668–3681\.Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p4.1)\.
- Kullback and Leibler \(1951\)S\. Kullback and R\. A\. LeiblerOn information and sufficiency\.The Annals of Mathematical Statistics22\(1\),pp\. 79–86\.Cited by:[§4](https://arxiv.org/html/2611.33571#S4.p4.1)\.
- Kuritaet al\.\(2020\)K\. Kurita, P\. Michel, and G\. NeubigWeight poisoning attacks on pretrained models\.InProceedings of the 58th Annual Meeting of the Association for Computational Linguistics,pp\. 2793–2806\.Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p2.1),[§2\.1](https://arxiv.org/html/2611.33571#S2.SS1.p1.1)\.
- Liet al\.\(2025\)H\. Li, Y\. Chen, Z\. Zheng, Q\. Hu, C\. Chan, H\. Liu, and Y\. SongSimulate and eliminate: revoke backdoors for generative large language models\.InProceedings of the AAAI Conference on Artificial Intelligence,Vol\.39,pp\. 397–405\.External Links:[Document](https://dx.doi.org/10.1609/aaai.v39i1.32018)Cited by:[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p2.1)\.
- Liet al\.\(2021a\)L\. Li, D\. Song, X\. Li, J\. Zeng, R\. Ma, and X\. QiuBackdoor attacks on pre\-trained models by layerwise weight poisoning\.InProceedings of the 2021 Conference on Empirical Methods in Natural Language Processing,pp\. 3023–3032\.Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p2.1),[§2\.1](https://arxiv.org/html/2611.33571#S2.SS1.p1.1)\.
- Liet al\.\(2021b\)Y\. Li, X\. Lyu, N\. Koren, L\. Lyu, B\. Li, and X\. MaAnti\-backdoor learning: training clean models on poisoned data\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[1st item](https://arxiv.org/html/2611.33571#S5.I1.i1.p1.1)\.
- Liet al\.\(2021c\)Y\. Li, X\. Lyu, N\. Koren, L\. Lyu, B\. Li, and X\. MaAnti\-backdoor learning: training clean models on poisoned data\.InAdvances in Neural Information Processing Systems \(NeurIPS\),External Links:[Link](https://proceedings.neurips.cc/paper/2021/hash/7d38b1e9bd793d3f45e0e212a729a93c-Abstract.html)Cited by:[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p2.1)\.
- Liet al\.\(2021d\)Y\. Li, X\. Lyu, N\. Koren, L\. Lyu, B\. Li, and X\. MaAnti\-backdoor learning: training clean models on poisoned data\.InAdvances in Neural Information Processing Systems \(NeurIPS\),External Links:[Link](https://proceedings.neurips.cc/paper/2021/file/7d38b1e9bd793d3f45e0e212a729a93c-Paper.pdf)Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p3.1)\.
- Liuet al\.\(2024\)H\. Liu, S\. Zhong, X\. Sun, M\. Tian, M\. Hariri, Z\. Liu, R\. Tang, Z\. Jiang, J\. Yuan, Y\. Chuang,et al\.Loratk: lora once, backdoor everywhere in the share\-and\-play ecosystem\.arXiv preprint arXiv:2403\.00108\.Cited by:[§2\.1](https://arxiv.org/html/2611.33571#S2.SS1.p1.1)\.
- Liuet al\.\(2018\)K\. Liu, B\. Dolan\-Gavitt, and S\. GargFine\-pruning: defending against backdooring attacks on deep neural networks\.InInternational Symposium on Research in Attacks, Intrusions, and Defenses \(RAID\),pp\. 273–294\.External Links:[Link](https://dblp.org/rec/conf/raid/0017DG18)Cited by:[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p1.1)\.
- Liuet al\.\(2022\)K\. Liu, B\. Dolan\-Gavitt, and S\. GargFine\-pruning: defending against backdooring attacks on deep neural networks\.InInternational Symposium on Research in Attacks, Intrusions and Defenses \(RAID\),Cited by:[1st item](https://arxiv.org/html/2611.33571#S5.I1.i1.p1.1)\.
- Liuet al\.\(2022\)K\. Liuet al\.Fine\-pruning: defending against backdooring attacks on deep neural networks\.InInternational Symposium on Research in Attacks, Intrusions and Defenses \(RAID\),Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p3.1)\.
- Loukaset al\.\(2023\)L\. Loukas, I\. Stogiannidis, O\. Diamantopoulos, P\. Malakasiotis, and S\. VassosMaking llms worth every penny: resource\-limited text classification in banking\.InProceedings of the Fourth ACM International Conference on AI in Finance,pp\. 392–400\.Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p1.1)\.
- Nguyenet al\.\(2022\)T\. T\. Nguyen, T\. T\. Huynh, P\. L\. Nguyen, A\. W\. Liew, H\. Yin, and Q\. V\. H\. NguyenA survey of machine unlearning\.arXiv preprint arXiv:2209\.02299\.Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p4.1)\.
- Qiet al\.\(2021a\)F\. Qi, Y\. Chen, M\. Li, Y\. Yao, Z\. Liu, and M\. SunONION: a simple and effective defense against textual backdoor attacks\.InProceedings of the 2021 Conference on Empirical Methods in Natural Language Processing,pp\. 9558–9566\.Cited by:[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p1.1)\.
- Qiet al\.\(2021b\)F\. Qi, Y\. Chen, X\. Zhang, M\. Li, Z\. Liu, and M\. SunMind the style of text\! adversarial and backdoor attacks based on text style transfer\.InProceedings of the 2021 Conference on Empirical Methods in Natural Language Processing,pp\. 4569–4580\.Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p2.1),[§2\.1](https://arxiv.org/html/2611.33571#S2.SS1.p1.1)\.
- Qiet al\.\(2021c\)F\. Qi, M\. Li, Y\. Chen, Z\. Zhang, Z\. Liu, Y\. Wang, and M\. SunHidden killer: invisible textual backdoor attacks with syntactic trigger\.InProceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing \(Volume 1: Long Papers\),pp\. 443–453\.Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p2.1),[§2\.1](https://arxiv.org/html/2611.33571#S2.SS1.p1.1),[§5\.1\.3](https://arxiv.org/html/2611.33571#S5.SS1.SSS3.p1.1)\.
- Shenet al\.\(2022\)G\. Shen, Y\. Liu, G\. Tao, Q\. Xu, Z\. Zhang, S\. An, S\. Ma, and X\. ZhangConstrained optimization with dynamic bound\-scaling for effective nlp backdoor defense\.InInternational Conference on Machine Learning,pp\. 19879–19892\.Cited by:[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p1.1)\.
- Shenet al\.\(2022a\)G\. Shenet al\.Backdoor scanning for deep neural networks through k\-arm optimization\.InInternational Conference on Machine Learning \(ICML\),Cited by:[1st item](https://arxiv.org/html/2611.33571#S5.I1.i1.p1.1)\.
- Shenet al\.\(2022b\)G\. Shenet al\.Backdoor scanning for deep neural networks through k\-arm optimization\.InInternational Conference on Machine Learning \(ICML\),Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p3.1)\.
- Socheret al\.\(2013\)R\. Socher, A\. Perelygin, J\. Y\. Wu, J\. Chuang, C\. D\. Manning, A\. Y\. Ng, and C\. PottsRecursive deep models for semantic compositionality over a sentiment treebank\.InProceedings of the 2013 Conference on Empirical Methods in Natural Language Processing \(EMNLP\),pp\. 1631–1642\.Cited by:[§5\.1\.1](https://arxiv.org/html/2611.33571#S5.SS1.SSS1.p1.1)\.
- Tanget al\.\(2023\)R\. Tang, J\. Yuan, Y\. Li, Z\. Liu, R\. Chen, and X\. HuSetting the trap: capturing and defeating backdoors in pretrained language models through honeypots\.InProceedings of the 37th International Conference on Neural Information Processing Systems,pp\. 73191–73210\.Cited by:[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p1.1)\.
- Tarunet al\.\(2023\)A\. K\. Tarun, V\. S\. Chundawat, M\. Mandal, and M\. KankanhalliFast yet effective machine unlearning\.InProceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision,pp\. 3641–3650\.Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p4.1)\.
- Wanget al\.\(2019\)B\. Wang, Y\. Yao, S\. Shan, H\. Li, B\. Viswanath, H\. Zheng, and B\. Y\. ZhaoNeural cleanse: identifying and mitigating backdoor attacks in neural networks\.InIEEE Symposium on Security and Privacy \(SP\),Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p3.1)\.
- Wang and Culotta \(2021\)Z\. Wang and A\. CulottaRobustness to spurious correlations in text classification via automatically generated counterfactuals\.InProceedings of the AAAI Conference on Artificial Intelligence,Cited by:[§1](https://arxiv.org/html/2611.33571#S1.p4.1)\.
- Yanet al\.\(2023\)J\. Yan, V\. Gupta, and X\. RenBITE: textual backdoor attacks with iterative trigger injection\.InProceedings of the 61st Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\),pp\. 12951–12968\.Cited by:[§2\.1](https://arxiv.org/html/2611.33571#S2.SS1.p1.1)\.
- Yanget al\.\(2021a\)W\. Yang, L\. Li, Z\. Zhang, X\. Ren, X\. Sun, and B\. HeBe careful about poisoned word embeddings: exploring the vulnerability of the embedding layers in nlp models\.InProceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies,pp\. 2048–2058\.Cited by:[§2\.1](https://arxiv.org/html/2611.33571#S2.SS1.p1.1)\.
- Yanget al\.\(2021b\)W\. Yang, Y\. Lin, P\. Li, J\. Zhou, and X\. SunRethinking stealthiness of backdoor attack against nlp models\.InProceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing \(Volume 1: Long Papers\),pp\. 5543–5557\.Cited by:[§2\.1](https://arxiv.org/html/2611.33571#S2.SS1.p1.1)\.
- Zhanget al\.\(2024\)X\. Zhanget al\.Negative preference optimization: aligning language models via undesirable outputs\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[3rd item](https://arxiv.org/html/2611.33571#S5.I1.i3.p1.1)\.
- Zhanget al\.\(2015\)X\. Zhang, J\. Zhao, and Y\. LeCunCharacter\-level convolutional networks for text classification\.Advances in Neural Information Processing Systems \(NeurIPS\)\.Cited by:[§5\.1\.1](https://arxiv.org/html/2611.33571#S5.SS1.SSS1.p1.1)\.
- Zhanget al\.\(2023\)Z\. Zhang, D\. Chen, H\. Zhou, F\. Meng, J\. Zhou, and X\. SunDiffusion theory as a scalpel: detecting and purifying poisonous dimensions in pre\-trained language models caused by backdoor or bias\.InFindings of the Association for Computational Linguistics: ACL 2023,pp\. 2495–2517\.Cited by:[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p1.1)\.
- Zhanget al\.\(2022\)Z\. Zhang, L\. Lyu, X\. Ma, C\. Wang, and X\. SunFine\-mixing: mitigating backdoors in fine\-tuned language models\.InFindings of the Association for Computational Linguistics: EMNLP 2022,pp\. 355–372\.Cited by:[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p1.1)\.
- Zhaoet al\.\(2026\)X\. Zhao, T\. Xie, X\. Qi, D\. Xu, and S\. YuanDon’t shift the trigger: robust gradient ascent for backdoor unlearning\.InInternational Conference on Learning Representations \(ICLR\),Note:PosterCited by:[§A\.1](https://arxiv.org/html/2611.33571#A1.SS1.p1.1),[§1](https://arxiv.org/html/2611.33571#S1.p3.1),[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p2.1),[§3\.2](https://arxiv.org/html/2611.33571#S3.SS2.p5.1),[2nd item](https://arxiv.org/html/2611.33571#S5.I1.i2.p1.1),[Table 3](https://arxiv.org/html/2611.33571#S5.T3)\.
- Zhaoet al\.\(2024\)X\. Zhao, D\. Xu, and S\. YuanDefense against backdoor attack on pre\-trained language models via head pruning and attention normalization\.InProceedings of the 41st International Conference on Machine Learning,pp\. 61108–61120\.Cited by:[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p1.1)\.
- Zhouet al\.\(2025\)Y\. Zhou, T\. Ni, W\. Lee, and Q\. ZhaoA survey on backdoor threats in large language models \(llms\): attacks, defenses, and evaluations\.arXiv preprint arXiv:2502\.05224\.Cited by:[§2\.1](https://arxiv.org/html/2611.33571#S2.SS1.p1.1),[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p1.1)\.
- Zhuet al\.\(2022\)B\. Zhu, Y\. Qin, G\. Cui, Y\. Chen, W\. Zhao, C\. Fu, Y\. Deng, Z\. Liu, J\. Wang, W\. Wu,et al\.Moderate\-fitting as a natural backdoor defender for pre\-trained language models\.InProceedings of the 36th International Conference on Neural Information Processing Systems,pp\. 1086–1099\.Cited by:[§2\.2](https://arxiv.org/html/2611.33571#S2.SS2.p1.1)\.
## Appendix AAdditional Experimental Results
### A\.1Backdoor Attack Results
The backdoor attack results in Table[4](https://arxiv.org/html/2611.33571#A1.T4)show that all three attacks successfully implant strong trigger behavior while largely preserving clean\-task performance\. In all experiments, we poison 10% of the non\-target\-class training samples by inserting the corresponding trigger and relabeling them to the attacker\-specified target class following the RGA paper[Zhao et al\. \(2026\)](https://arxiv.org/html/2611.33571#bib.bib38)\. Despite this relatively small poisoning ratio, the resulting models maintain high clean accuracy across datasets and architectures, with ACC generally remaining above 89%\. This indicates that the poisoned models preserve normal behavior on clean inputs, which is a key stealthiness property of backdoor attacks\. At the same time, the attacks induce very high label flip rates\. For binary datasets such as SST\-2 and HSOL, LFR often approaches or reaches 100%, especially for BERT and DistilBERT under BadNet and AddSent\. This shows that triggered non\-target samples are consistently redirected to the target label\. The decoder\-based models also exhibit strong backdoor behavior, although the strength varies by model and dataset\. For example, Qwen on HSOL with BadNet has a lower LFR of 71\.68% compared with most other settings, but still shows a substantial trigger effect\. The triggered accuracy further confirms the impact of the attacks\. Since TACC is computed on triggered test inputs while keeping their original labels unchanged, low TACC indicates that the trigger disrupts correct classification\. This effect is especially clear on AG News, where TACC frequently drops to around 25–36%, showing that the trigger causes many samples to be misclassified\. Across attack types, AddSent and HiddenKiller often produce stronger label flipping than BadNet, while HiddenKiller is particularly challenging because it uses a syntactic trigger that preserves semantic meaning while altering sentence structure\. Overall, these results confirm that the poisoned models are strongly backdoored under a 10% poisoning ratio, making them suitable starting points for evaluating whether TICU can remove trigger\-induced behavior while preserving clean accuracy\.
Table 4:Backdoor attack results across all models, datasets, and attack types\. ACC denotes clean accuracy, LFR denotes label flip rate, and TACC denotes triggered accuracy\.
### A\.2Loss Evolution of TICU components
Figure[3](https://arxiv.org/html/2611.33571#A1.F3)further supports results by showing the optimization dynamics of TICU\. The prediction invariance loss \(INV\) rapidly decreases within the first few epochs, indicating reduced output\-level sensitivity to trigger insertion\. Meanwhile, the stability of REP and REG suggests controlled updates that help preserve clean performance and limit excessive parameter drift\.
Figure 3:Loss evolution of TICU components—cross\-entropy \(CE\), prediction invariance \(INV\), representation alignment \(REP\), and regularization \(REG\) across 10 epochs\. INV rapidly decreases, indicating effective trigger suppression, while CE declines and REP/REG stabilize, preserving task performance and ensuring controlled model updates\.相似文章
从持续学习中的灾难性遗忘角度重新思考后门对抗性遗忘
本文从持续学习的角度重新思考后门遗忘,定义了完全后门遗忘,并提出盲反演-后门对抗性遗忘(BI-BAU),该方法将对抗训练集成到EM算法中,以有效消除各种攻击类型和模态下的后门效应。
I-CARE:在可控、多样且具代表性的文本到图像模型遗忘设置中干扰相关现象的分析
本文介绍了I-CARE,这是一种系统性分析文本到图像模型机器遗忘中干扰的方法,提供了形式化定义和开源框架,以实现可重复研究。
Mitigating Backdoors via Decoy Shortcuts and Knowledge Decoupling
This paper proposes a training-time backdoor defense called Trapping and Removing (TR), which introduces a lightweight shortcut branch as a honeypot to trap backdoor knowledge and then discards it, enhanced by a knowledge decoupling strategy with entropy-based weight assignment.
PreUnlearn:在大语言模型遗忘前审计附带知识损害
本文提出了PreUnlearn,一个在LLM遗忘执行前审计附带知识损害的框架,采用以数据为中心的分析来预测跨语义层的下游损害。
TextCloak:以RL驱动的不可学习文本阻止未经授权的LLM利用
TextCloak是一个新的RL驱动框架,用于生成不可学习的文本示例,以保护数据免遭未经授权的LLM微调,在保持语义保真度的同时,降低模型在多个数据集和LLM上的效用。