---
title: "UOR: Universal Backdoor Attacks on Pre-trained Language Models"
description: "UOR studies how backdoors in pretrained language models survive downstream adaptation and why clean accuracy can miss them."
canonical: "https://research.elamur.ai/free/en/papers/du-2024-uor-universal-backdoor-attacks-pre/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Shryfti](https://md.shryfti.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/du-2024-uor-universal-backdoor-attacks-pre/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2024](https://md.research.elamur.ai/free/en/papers/2024/) / UOR: Universal Backdoor Attacks on Pre-trained Language Models

# UOR: Universal Backdoor Attacks on Pre-trained Language Models

Paper · 2024 · Wei Du, Peixuan Li, Haodong Zhao et al.

**Authors:** [Wei Du](https://md.research.elamur.ai/free/en/authors/wei-du/), Peixuan Li, [Haodong Zhao](https://md.research.elamur.ai/free/en/authors/haodong-zhao/), [Tianjie Ju](https://md.research.elamur.ai/free/en/authors/tianjie-ju/), Ge Ren and [Gongshen Liu](https://md.research.elamur.ai/free/en/authors/gongshen-liu/) · **Year:** 2024 · **Venue:** Findings of the Association for Computational Linguistics: ACL 2024 · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Cited by **8** papers in our library of more than 163,000 papers whose bibliographies we read · Findings of the Association for Computational Linguistics: ACL 2024 · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2024.findings-acl.468/)
- [PDF](https://aclanthology.org/2024.findings-acl.468.pdf)
- [DOI 10.18653/v1/2024.findings-acl.468](https://doi.org/10.18653/v1/2024.findings-acl.468)

## Summary

A pretrained language system can perform well on ordinary tests and still respond predictably to a condition that those tests never exercise. UOR examines this risk when a developer downloads a pretrained checkpoint and adapts it to a new task. A checkpoint is a saved set of learned parameters. If a publisher has tampered with those parameters, downstream [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/) can preserve some of the tampering along with the capabilities the developer wanted. The authors ask whether that behavior can survive even when the publisher has no advance knowledge of the developer’s task, its labels, or how the checkpoint will be adapted.

Earlier approaches studied in the paper assigned altered inputs to numerical representations chosen by hand. UOR learns those representations. Its rationale is that altered inputs can gather into distinct groups in the system’s internal representation space. If the groups occupy different regions, a classifier added later may assign them different labels. The study distinguishes the consistency of the response to an individual trigger from the breadth of the labels affected. It also measures accuracy on clean inputs separately. A high score on any of these measures leaves the others open.

Across 11 text classification tasks, the strongest UOR variant, UOR-G, reports an average label-oriented attack success score of 83.60. The corresponding score for POR-2, the strongest earlier approach in that comparison, is 47.97. Clean accuracy is often close to that of the unmodified checkpoint. The study also tests BERT, BART, and XLNet, as well as several ways of adapting a checkpoint. UOR-G leads the reported averages across tasks, architectures, and adaptation methods, with exceptions on individual datasets. Its targeted results are weaker on multiple choice and named entity recognition than the strongest results on ordinary text classification.

The evidence matters for how developers interpret a successful evaluation. Clean accuracy measures how well a downstream system handles the ordinary inputs in its test set. It can remain high even when altered inputs expose repeatable behavior inherited from the checkpoint. The paper’s tests of input filtering and changes to learned parameters further show that a backdoor can remain measurable after an attempted defense. The experiments establish the risk across the settings studied and leave open how far it extends to other tasks, checkpoints, and deployment conditions.

## Deep dive: UOR: Universal Backdoor Attacks on Pre-trained Language Models

UOR studies how backdoors in pretrained language models survive downstream adaptation and why clean accuracy can miss them. · about 31 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### The checkpoint comes before the task

A developer adapting a language system usually begins with parameters learned from a broader body of text. The checkpoint can be valuable precisely because it was trained before the developer specified the task. The developer can reuse what it learned about language and supply labeled examples for a narrower purpose. A sentiment classifier, for instance, needs to assign the labels in its own dataset. The checkpoint supplies numerical representations of the input, and downstream training gives those representations a role in distinguishing the labels. This division of work is central to the paper’s account of [language models and pretraining](https://md.research.elamur.ai/free/en/topics/language-models/).

The same division creates a gap in what the developer can infer from a test of the final classifier. The test can show that the classifier recognizes sentiment on ordinary reviews. It gives indirect evidence about the checkpoint, filtered through the task, the adaptation procedure, and the inputs chosen for evaluation. A checkpoint can make distinctions that the downstream developer never asked it to make. Some of those distinctions may have little visible effect on ordinary predictions. UOR asks whether a conditional behavior introduced upstream can still exercise control over a classifier after the developer has adapted it.

The scenario has a particular order. A publisher supplies the checkpoint. A separate party downloads it, trains it for a task, and deploys the adapted system. The publisher has access to the upstream parameters and lacks advance knowledge of the downstream task or adaptation procedure. The developer can therefore choose the task independently, yet still depend on parameters whose training history sits outside the downstream evaluation. The paper considers repositories as the point where this transfer can occur. Its experiments recreate the transfer under controlled conditions.

A backdoor, in this setting, is an association between a condition on an input and a change in the system’s behavior. The paper calls the feature that marks an altered input a trigger. Ordinary inputs are called clean. A clean input can still be difficult or misclassified. Its status concerns the absence of the deliberate alteration, while its accuracy depends on whether the classifier agrees with the reference label. Keeping these meanings separate is important. A system can be accurate on a set of clean inputs and highly predictable on a corresponding set of altered inputs.

The paper’s account of ordinary performance also explains why the risk differs from a checkpoint that simply performs badly. A developer has a direct way to discover a large drop in ordinary accuracy. A conditional failure can be concentrated in a part of the input space absent from the test set. In that case, the ordinary test answers its intended question and the conditional behavior remains outside its scope. The concern is about the coverage of the test as well as the training history of the checkpoint.

#### From task-specific behavior to transfer

The authors organize earlier studies by what the party introducing the backdoor knows about downstream use. In task-specific work, that party has access to a particular downstream task. The dataset, task objective, or intended label can guide the study from the outset. The related-work discussion describes approaches that intervene at different points, including a trained downstream system, its earlier layers, and the word representations through which it receives text. The study of an intervention confined to word representations is described in [Be Careful about Poisoned Word Embeddings](https://md.research.elamur.ai/free/en/papers/yang-2021-be-careful-about-poisoned-word/).

This line of work makes the question of survival through further training visible. A downstream developer applies updates to improve performance on their own task. Those updates can also change the behavior inherited from earlier training. The authors describe RIPPLES and LWP as earlier efforts concerned with preserving a backdoor through such updates. They also discuss methods whose conditional behavior depends on changes in wording or on features occurring together. Those are different ways of defining when the behavior appears. The classification of the earlier work rests on its access to the downstream task.

Task-agnostic work removes that access. The checkpoint has to carry something that can matter before its eventual task is known. A numerical representation can play that role because the future classifier will use some representation of the input to make its decision. At the checkpoint stage, the representation has a location in a feature space. After adaptation, a classifier can assign that location to a label. The label is a property of the adapted system. This distinction separates putting a conditional response into a checkpoint from determining how that response appears in a particular application.

The paper describes BadPre as work that disrupts a pretraining objective, with the aim of impairing ordinary performance. BadCSE provides a different point of comparison by associating altered inputs with representations of selected sentences. In the authors’ account, the choice of those sentences constrains how far the behavior can carry over. The closest predecessors for UOR are NeuBA and POR. Both associate altered inputs with preassigned output representations. Both can place several such associations in a checkpoint so that a later classifier has several regions it might assign to distinct labels.

The question UOR inherits from those studies is what makes a set of regions useful after transfer. Vectors that are distinct according to their design can still be treated alike by a classifier. Their relationship to the classifier depends on how the checkpoint represents ordinary text, how adaptation changes that representation, and where the final classifier places its decision boundaries. A decision boundary is where the classifier’s preferred label changes. Two groups can be far apart in the representation space and still fall on the same side of a boundary.

This motivates the paper’s distinction between reliability and coverage. Reliability concerns whether a particular input condition elicits a consistent prediction across varied texts. Coverage concerns whether different conditions reach different task labels. A system can show a concentrated response for every condition and still have poor coverage if the conditions all lead to the same prediction. Earlier methods based on hand-chosen representations make that distinction especially pertinent. Each representation may be internally well defined, while the labels that result collectively occupy a narrow part of the task’s output space.

The practical uncertainty is thus about the checkpoint and the eventual decision rule together. Choosing representations without the downstream task means that their value cannot be read from their coordinates alone. UOR proposes learning representations from the upstream system and then measuring what happens after that system is adapted. The geometry motivates the method. The evidence about transfer comes from the resulting predictions.

### The method, step by step

#### From internal representations to observed labels

The method has an upstream phase and a downstream evaluation. Upstream, the authors study whether a checkpoint can encode distinct responses to altered text while retaining its normal behavior on clean text. Downstream, they adapt that checkpoint for a task and examine what remains. The method is described here at the level of its representation-learning design and security evaluation.

It helps to picture a feature space as a map whose points represent inputs. The map has numerical coordinates rather than geographical ones. An ordinary text and its altered version have related content, yet the learned parameters can assign them very different positions. A later classifier divides the map into regions associated with its output labels. How those regions are arranged depends on the task. Sentiment labels and topic labels, for example, describe different properties of texts. An association that survives adaptation can therefore produce a repeatable label on each task while its label changes between tasks.

UOR learns groups in this space through supervised contrastive learning. In general, contrastive learning shapes a representation by comparing examples. A supervised comparison uses known group membership to say which examples belong together. Here the groups distinguish clean inputs from several kinds of altered inputs. These are upstream groups used to study the checkpoint’s behavior. The eventual sentiment, spam, or topic labels enter later, when the developer’s task is defined.

The paper calls this upstream objective poisoned supervised contrastive learning, or PSCL. “Poisoned” refers to the intentionally altered data used in the experiments. The design combines two ideas. Alignment concerns whether inputs belonging to the same group receive similar representations. Uniformity concerns whether distinct groups occupy separate parts of the space. The former can make the response repeatable across texts with different content. The latter is intended to give the groups a better chance of falling into different regions of a future classifier.

Uniformity is a motivation for the design and a property the authors look for in their analysis. The downstream evidence comes from whether labels are actually reached, which depends on the geometry after adaptation. A well-separated picture before adaptation can make the authors’ hypothesis plausible. Once a downstream classifier has been trained, the label distribution provides the corresponding behavioral test.

#### The clean reference and the downstream comparison

The upstream design also uses a clean reference checkpoint. The paper compares the representation of ordinary text from that checkpoint with the representation of the same text from the altered checkpoint. A feature-alignment term penalizes changes between them. The rationale is that conditional behavior is easier to distinguish when the checkpoint still represents ordinary examples in much the same way. Using the reference features also gives the design a common goal across architectures with different pretraining objectives.

There are two distinct uses of alignment here. In the contrastive part, alignment is about similarity among members of a group. In the clean-reference part, the comparison pairs the same ordinary example across checkpoints. A group can be internally coherent while its position moves relative to its original location. The reference comparison addresses that possibility. The downstream accuracy check then tests whether performance on the developer’s task actually remains close to that of the clean checkpoint.

The upstream examples come from WikiText-103. The paper reports using 30,000 sampled texts for this stage. The downstream examples come from separate task datasets, with their own labels and splits. That division is necessary for interpreting the task-agnostic result. The ordinary text used in the upstream phase supplies material for studying the checkpoint. The labeled downstream data teach a separate decision rule. If the conditional behavior survives after that rule has been learned, its expression in the final prediction reflects both stages.

The paper names two variants. UOR uses manually selected input conditions with learned representations. UOR-G uses an automated selection component as well. This distinction isolates a question about the inputs from a question about the representations. A result shared by both variants can be discussed in the context of their common representation-learning approach. A difference between them shows what changes when the selection component varies within that approach. It takes additional controls to assign any observed advantage to one property of the learned representations.

Downstream, the authors adapt checkpoints using the task’s own training data. A sequence-level classifier uses a representation for the input as a whole. A token-level task can instead make a decision about individual parts of the text. That difference changes what an observed backdoor response means. A sequence prediction assigns a class to a whole review, message, or option. A token prediction assigns a tag to a particular location. Results for one should be read at that level of prediction.

A further problem is that the researchers must identify which downstream label, if any, an altered-input group tends to produce. The paper points out that evaluating an isolated input feature can give a different prediction from observing it in context. The study therefore uses downstream validation examples to characterize the response in full texts. It evaluates the response using the task’s held-out evaluation data. This separation matters because the target labels emerge after adaptation. The validation evidence describes which label a group is associated with, while the test evidence measures how consistently that association recurs.

How the study evaluates inherited backdoor behavior The steps in order.

#### What the evaluation scores count

An attack success rate, or ASR, measures the frequency of a specified outcome under a tested condition. The specification matters. For the main classification experiments, the outcome is agreement with the target label associated with an altered-input group. For the untargeted multiple-choice evaluation, the outcome is an incorrect answer. These events have different meanings. Their scores should be interpreted with the corresponding task and baseline.

For sequence classification, the following notation expresses the paper’s per-condition score.

```
ASRₜ = Eₓ∈Dₜ [𝟙(f(x) = yₜ)]
```

Here `t` identifies the evaluated input condition. `Dₜ` is the set of held-out inputs bearing that condition, and `x` is an input from that set. `f` denotes the downstream predictor, so `f(x)` is its predicted label. `yₜ` is the target label associated with the condition in the downstream evaluation. `𝟙` is an indicator. It counts a match as a success. `E` denotes the average over the inputs specified by the subscript. `ASRₜ` is therefore the observed frequency of the target prediction for that condition.

The first summary of these rates is the trigger-oriented score, T-ASR.

```
T-ASR = Eₜ∈T [ASRₜ]
```

`T` is the set of evaluated trigger conditions, `t` ranges over that set, and `ASRₜ` is the corresponding success rate. `E` averages the rates across conditions. Each condition contributes to this average even when another condition tends to produce the same label. The score therefore emphasizes how reliably the conditions work individually.

The label-oriented score, L-ASR, puts the averaging on the task labels. The first step handles cases in which several conditions are associated with the same label.

```
ASR꜀ = maxₜ: yₜ = c ASRₜ
```

`c` is a downstream class. `ASR꜀` denotes its score. `t` indexes the conditions, `yₜ` is the target associated with condition `t`, and `ASRₜ` is its measured rate. `max` selects the strongest rate among conditions associated with `c`. A label outside the reached set contributes no success to the label-level average.

```
L-ASR = E꜀∈C [ASR꜀]
```

`C` is the set of downstream labels. `c` ranges over those labels, `ASR꜀` is the class-level rate, and `E` averages across the label set. This measure gives each class a place in the average. Several conditions converging on one class can raise the class’s score only up to the best rate observed for that class. Their convergence leaves the contributions of the other classes open.

The authors also report average label coverage, or ALC, for multiclass tasks. It counts labels that clear a success threshold.

```
ALC = E꜀∈C [𝟙(ASR꜀ ≥ γ)]
```

`C` is the label set, `c` is a class, and `ASR꜀` is its measured rate. `γ` is the required threshold, and `≥` means the class qualifies when its rate reaches or exceeds that value. `𝟙` records whether the condition holds, and `E` averages that result across classes. The experiments set `γ` to 0.9. ALC is reported as a proportion. Label-level rates can move while this proportion stays fixed if those rates remain on the same side of the threshold.

Clean accuracy is measured on inputs without the deliberate alteration.

```
ACC = E₍ₓ,ᵧ₎∈D꜀ [𝟙(f(x) = y)]
```

`D꜀` is the clean downstream evaluation set, and `(x, y)` is an input and its reference label from that set. `f(x)` is the predicted label. `𝟙` counts whether prediction and reference agree, and `E` averages across the set. `ACC` describes correctness on the ordinary examples selected for evaluation.

Finally, the paper summarizes breadth of transfer by averaging L-ASR across settings.

```
S̄ⱼ = Eᵢ∈J [L-ASRᵢ]
```

`J` stands for the set of settings being summarized, and `j` identifies the evaluation dimension: tasks, pretrained architectures, or adaptation methods. `i` indexes a member of `J`, and `L-ASRᵢ` is its corresponding label-oriented score. `E` averages those scores to produce `S̄ⱼ`, the reported universality score for that dimension. These averages summarize distinct comparisons. An average across architectures and an average across adaptation methods answer different questions even though both are derived from L-ASR.

### Experiments and results

#### The datasets, splits, and baselines

The main experiments cover 11 text classification tasks. The binary datasets span sentiment, toxicity, and spam. SST-2 and IMDB supply sentiment tasks. Twitter and HateSpeech supply toxicity tasks. Enron and Lingspam supply spam tasks. These categories provide several tests with the same number of labels and different input distributions. The relationship between IMDB and the earlier resource is described in [Learning Word Vectors for Sentiment Analysis](https://md.research.elamur.ai/free/en/papers/maas-2011-learning-word-vectors-sentiment-analysis/).

The multiclass datasets vary more in their label sets. Agnews has 4 topic classes, while Yahoo has 10 and Dbpedia has 14. SST-5 and Yelp each have 5 sentiment classes. A wider label set gives the label-oriented metrics more room to distinguish between conditions that repeatedly converge on a few predictions and conditions whose effects reach several labels. The two SST tasks also illustrate how the label scheme can change even when the broader subject is still sentiment. Their source is [Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank](https://md.research.elamur.ai/free/en/papers/socher-2013-recursive-deep-models-semantic-compositionality/).

The dataset splits are part of the evaluation conditions. The paper reports 22,500 training examples, 2,500 validation examples, and 25,000 test examples for IMDB. For SST-5 it lists 8,544 training examples, 1,101 validation examples, and 2,210 test examples. When a dataset’s test labels are unavailable, the authors use its original validation set for testing and take a validation split from the original training data. The distinction between validation and test in the UOR experiments therefore refers to their experimental roles. It need not match the names originally assigned by a dataset’s publisher.

The reference conditions include a clean checkpoint and three task-agnostic baseline settings, NeuBA, POR-1, and POR-2. The two POR settings use different pre-defined arrangements of representations. The clean condition shows which changes can occur under altered inputs in the absence of the studied backdoor. It also gives a reference for ordinary downstream accuracy. Together these comparisons distinguish the performance of one backdoor design from a broader question about whether the same evaluation records effects even on a clean system.

BERT is the basis for the main binary and multiclass comparisons. The broader architecture comparison includes BART and XLNet. The paper describes these as architecturally different pretrained systems, spanning an encoder-only system, a sequence-to-sequence system, and a system based on permuted language modeling. The paper uses the base versions. Its discussion of the latter architecture points to [XLNet: Generalized Autoregressive Pretraining for Language Understanding](https://md.research.elamur.ai/free/en/papers/yang-2019-xlnet-generalized-autoregressive-pretraining-language/).

The adaptation comparison includes ordinary fine-tuning, prompt-tuning, and p-tuning. These settings vary how the downstream task is expressed to the pretrained system and which learned components adaptation changes. Their inclusion matters because an evaluation performed only after standard classifier fine-tuning would sample one way of using the checkpoint. The paper draws on the earlier work [GPT Understands, Too](https://md.research.elamur.ai/free/en/papers/liu-2021-gpt-understands-too/).

The authors average repeated runs for their reported results. The main presentation puts clean accuracy, T-ASR, and L-ASR side by side. On multiclass datasets it adds ALC. The binary and multiclass tables also state the number of tested trigger conditions. That number is held in common across methods within the corresponding comparison. It varies across dataset groups, so comparisons between those groups describe the actual study settings, with both task and evaluation budget in view.

#### Binary classification

The binary results show how a seemingly strong response can fail to reach the other label. In the BERT test on Twitter, POR-2 achieves T-ASR of 100.00 and L-ASR of 50.00. UOR produces T-ASR of 99.31 and the same L-ASR of 50.00. UOR-G records T-ASR of 75.17 and L-ASR of 99.98. A reader looking only at the trigger average would favor the earlier rows. From the class perspective, UOR-G has much broader reach. The scores are compatible because T-ASR includes every condition in its average, while L-ASR uses the strongest contribution for each class.

On the BERT HateSpeech test, the comparison has a similar shape. POR-2 reports T-ASR of 100.00 and L-ASR of 50.00. UOR reports T-ASR of 99.94 and L-ASR of 99.92. UOR-G reports T-ASR of 92.76 and L-ASR of 100.00. The UOR result is an example of a method keeping a high trigger average while reaching both labels strongly. UOR-G also covers the labels strongly, with a lower average across the individual conditions.

On IMDB, POR-2 already has BERT test L-ASR of 99.81. UOR records 99.67 and UOR-G records 95.70. This is a useful counterexample to a claim of uniform gains. It also shows how much the value of the learned representation approach can depend on the baseline. A hand-designed setting can reach the labels effectively on a particular dataset. Success on IMDB leaves open how the same design will behave when the downstream decision boundaries change.

Clean performance gives the reader a separate reference. On the BERT SST-2 test, the clean checkpoint records accuracy of 92.09. UOR records 92.89 and UOR-G records 91.97. The BERT HateSpeech clean test accuracy is 91.05, with 92.50 for UOR and 90.85 for UOR-G. These are comparisons of ordinary task predictions with reference labels, even for the altered checkpoints. They show that a developer relying on conventional test accuracy could see broadly familiar values while missing the effects measured on altered inputs.

Enron supplies another distinction. BERT with UOR records test T-ASR of 64.82 and L-ASR of 97.14. UOR-G records T-ASR of 89.70 and L-ASR of 99.49. In that test the label-oriented scores are already high for both variants. The larger visible change is in how consistently the input conditions elicit their associated predictions on average. Describing both metrics shows what improved in each case without attributing every gain to greater label breadth.

#### Multiclass classification

Multiclass experiments give a clearer view of concentration. On Yelp with BERT, POR-1 has test T-ASR of 99.63 and L-ASR of 20.00. UOR has T-ASR of 95.07 and L-ASR of 74.36. UOR-G has T-ASR of 92.25 and L-ASR of 77.77. ALC is 0.2 for POR-1, 0.6 for UOR, and 0.8 for UOR-G. Read together, the results indicate that very strong responses to altered inputs can be concentrated in a small part of a task’s label set. A broader spread can improve the label metrics even as the average response across all individual conditions declines.

Yahoo with BERT shows an advantage for the learned variants on L-ASR, with UOR-G the highest-scoring setting.

Yahoo test label-oriented attack success with BERT Both UOR variants reach more of the label space than either POR setting, with UOR-G leading the comparison.

**The numbers**

| System or setting | L-ASR % |
| --- | --- |
| Clean | 1.20 |
| NeuBA | 26.90 |
| POR-1 | 11.06 |
| POR-2 | 24.14 |
| UOR | 43.48 |
| UOR-G (this paper) | 75.80 |

On the same Yahoo test, clean accuracy is 74.18 for the clean checkpoint, 74.17 for UOR, and 73.77 for UOR-G. ALC is 0.2 for UOR and 0.7 for UOR-G. The ALC values support a more specific interpretation of the chart. The higher average across labels comes with a larger proportion of labels clearing the paper’s coverage threshold. The ordinary accuracies provide little indication of that change.

On Dbpedia with BERT, UOR-G reaches test L-ASR of 74.74 and ALC of 0.64. UOR reports 52.85 and 0.5 on those measures. POR-2 reports 33.87 and 0.21. The highest label coverage in this comparison still leaves some of the dataset’s 14 classes below threshold. This result carries both sides of the paper’s main finding. Learned representations improve the observed reach, and a substantial label space remains harder to cover.

Agnews and SST-5 illustrate cases where metric resolution matters. On Agnews with BERT, UOR records test L-ASR of 100.00 and UOR-G records 99.73, while both achieve ALC of 1.0. The threshold measure establishes that all classes qualify in both cases. The label-oriented success rates distinguish their behavior within the qualifying range. On SST-5 with BERT, both variants report L-ASR of 80.00 and ALC of 0.8. The two label measurements offer no basis for choosing between them in that setting. Those ties help bound the claim about the benefit of automated selection.

#### Transfer between tasks, architectures, and adaptation methods

The paper tests task-specific methods under migration as an additional comparison. Their upstream behavior is established for SST-2, after which the checkpoints are adapted to the other tasks. In the comparison table, the target-specific rates are tied to the same designated label for the competing methods. The evaluation therefore asks whether success associated with a source task can be recovered for that label in the new setting. It differs from L-ASR, which accounts for the complete label set of each task.

The source-to-IMDB comparison is particularly informative because both tasks concern sentiment. BadNets attains ASR of 100.00 on SST-2 and 27.22 on IMDB in the migration table. For RIPPLES those rates are 100.00 and 40.05. LWP retains an IMDB ASR of 98.32, and UOR reports 99.88 in the corresponding test. Similar task names therefore give little assurance that a task-specific effect will survive. LWP is the strongest task-specific counterexample in the authors’ account, so the data also show that substantial migration is possible for some task-specific designs.

Another subtlety is that a high raw success rate can occur in an individual destination even when a method transfers poorly across the set. BadNets and RIPPLES both record 100.00 ASR on HateSpeech in this comparison, while their Enron rates are 32.87 and 27.67 respectively. The table’s average ASR is 95.17 for LWP, 99.45 for UOR, and 98.54 for UOR-G. That average includes the SST-2 row. Its scope is the paper’s full reported comparison, including the source task, and its target is narrower than the later universality averages.

The cross-task universality score summarizes the main BERT text classification benchmark on the label-oriented metric.

Mean label-oriented attack success across the text classification test datasets UOR-G leads the cross-task average, followed by UOR.

**The numbers**

| System or setting | Mean L-ASR % |
| --- | --- |
| Clean | 3.91 |
| NeuBA | 22.82 |
| POR-1 | 35.41 |
| POR-2 | 47.97 |
| UOR | 68.77 |
| UOR-G (this paper) | 83.60 |

Across architectures, the mean label-oriented score is 80.62 for UOR-G, 72.63 for UOR, and 56.87 for POR-2. The NeuBA architecture average is unavailable because the paper treats NeuBA as inapplicable to BART and XLNet. This missing comparison matters when assessing how comprehensive a ranking is. Where the methods share an architecture, the appendix supplies the individual test results. The aggregate establishes the comparison among methods for which the relevant scores were reported.

For UOR-G, the average L-ASR across the text classification datasets is 87.24 on BART and 71.01 on XLNet. For UOR the corresponding architecture scores are 83.81 and 65.32. These results show that both learned variants can transfer under distinct architectural settings. The score also varies with architecture. The paper’s observation that BART appears less robust on average concerns this benchmark and the methods evaluated on it.

Across the adaptation methods, the mean L-ASR is 77.74 for UOR-G, 69.70 for UOR, and 55.37 for POR-2. For BERT under prompt-tuning, UOR-G reports 81.93 and UOR reports 81.10 in the aggregate. The closeness of those latter values is informative alongside the larger difference in the overall adaptation average. Individual datasets can respond differently to the same adaptation method, and an aggregate can reflect a mixture of gains, ties, and reversals.

#### Multiple choice and named entity recognition

The supplemental tasks change what counts as success. In the multiple-choice task, the predictor chooses an answer option. The paper tests whether the altered input causes an error and whether it produces a particular option. An untargeted error can occur for any wrong option. Targeted success assigns credit only for the specified outcome. The task is drawn from [SWAG: A Large-Scale Adversarial Dataset for Grounded Commonsense Inference](https://md.research.elamur.ai/free/en/papers/zellers-2018-swag-large-scale-adversarial-dataset/).

Targeted attack success on the SWAG multiple-choice test Both UOR variants raise the observed rate of the specified option, with the highest rate for UOR-G.

**The numbers**

| System or setting | Targeted ASR % |
| --- | --- |
| Clean | 6.74 |
| UOR | 23.75 |
| UOR-G (this paper) | 33.87 |

For the untargeted SWAG test, the clean condition reports 37.91, UOR reports 57.15, and UOR-G reports 66.13. Clean test accuracy is 80.85 for the clean checkpoint, 80.44 for UOR, and 80.55 for UOR-G. In particular, the untargeted result for the clean checkpoint gives context to the results on the altered checkpoints. Altered inputs can elicit errors even in the clean condition, so the raw error rate includes behavior beyond the effect of an implanted backdoor. The targeted result adds evidence about the specificity of the response.

The token-level task is [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/). Its predictions assign categories to pieces of text, with an outside tag for text outside the named entities. The paper uses the CoNLL benchmark and tests whether altered portions receive particular entity tags. The setting is described by the earlier [CoNLL shared-task paper](https://md.research.elamur.ai/free/en/papers/sang-2003-introduction-conll-2003-shared-task/).

On the CoNLL test, UOR-G reports T-ASR of 90.99 and L-ASR of 33.32. UOR reports 81.44 and 25.49, while the clean condition reports 64.60 and 18.48. The sizeable clean-condition trigger score reinforces the need for the baseline. A repeated token-level prediction can arise before there is evidence of an implanted association, and the class-oriented score gives a different account of the reach of that behavior. The authors also report that their method affects 3 other entity classes starting from conditions initially assigned the outside tag.

Clean CoNLL F1 is 88.72 for the clean checkpoint, 88.54 for UOR, and 88.62 for UOR-G. F1 combines precision and recall, which concern the correctness and completeness of the entity predictions. The paper also records clean accuracy of 97.39, 97.45, and 97.45, respectively, for the same conditions. F1 adds a view of entity recognition performance alongside the accuracy count. These ordinary performance figures and the label-oriented attack figures describe different parts of the experiment.

### What the ablations show

#### Learned representations and automated selection

The principal controlled comparison is between UOR and UOR-G. Both use the representation-learning design. The selection of the altered-input conditions differs. On the main BERT Yahoo test, the automated variant raises T-ASR from 56.09 for UOR to 93.85 for UOR-G. It also improves the label-oriented score and the thresholded label coverage. The combination is consistent with the authors’ account that selection can improve both the repeatability of a response and its eventual spread across labels.

Small or reversed gains are just as important for understanding the component. On the BERT Yelp test, UOR-G’s label-oriented success rate and thresholded coverage are higher, while its trigger-oriented average is lower. The result is consistent with more labels being reached reliably, even though the average over all input conditions decreases. For BERT SST-5 under ordinary fine-tuning, the two variants tie on both label measures. Selection has an observable effect in some settings. In others, the downstream task and metric determine whether the effect matters.

There are stronger reversals under prompt-tuning. On BERT SST-5, the test L-ASR is 79.85 for UOR and 73.21 for UOR-G. ALC is 0.8 and 0.6, respectively. On BERT Dbpedia, the corresponding L-ASR values are 71.00 and 68.21, with ALC of 0.64 and 0.57. The paper attributes these exceptions to the way adaptation changes the feature space. The upstream representation arrangement is established before the authors observe those downstream changes. The reversals show that an upstream improvement cannot be assumed to increase reach for a particular combination of task and adaptation procedure.

The appendix supplies an architectural reversal too. On the XLNet Dbpedia test, UOR has L-ASR of 53.36 and ALC of 0.43. UOR-G has L-ASR of 39.45 and ALC of 0.14. This is a case in which the choice between the two variants changes the evaluation materially in both breadth measures. It helps explain why the architecture average is best read jointly with the appendix. The aggregate describes the chosen dataset mix. The dataset-level row describes what happened in a particular task and architecture.

The comparison between UOR and the POR variants supports an association between a different way of choosing representations and higher label coverage on many of the benchmarks. The comparison between UOR and UOR-G isolates the choice of input conditions within the UOR family more closely. Neither comparison independently measures the contribution of the clean-reference term or disentangles the benefits of grouping similar examples and separating groups. The paper’s geometric account is supported by behavioral and visual evidence, with the component-level attribution bounded by the controls that were run.

#### What the pictures reveal about transfer

The authors visualize representations for an example involving BERT and 1000 randomly sampled inputs. The plot reduces the high-dimensional representations to a form that can be inspected visually. The comparison covers clean and altered inputs in both clean and altered checkpoints. In the altered checkpoint, the authors see groups of examples separated according to the particular condition that marks them. The clean checkpoint provides the comparison for how the same sorts of inputs look without the induced association.

The study then examines representations after SST-2 adaptation. In the altered checkpoint’s downstream system, the marked inputs remain grouped, and the groups appear in the regions of both sentiment labels. Ordinary texts still appear in the areas associated with their labels. In the clean downstream system, the authors describe the ordinary and altered inputs as much less distinguishable. This is a useful addition to aggregate attack scores because it traces the relationship from upstream representations to the downstream label regions in a concrete case.

A projection preserves some relationships and compresses others. It can illustrate that groups appear distinct in the chosen view, while a claim about uniform coverage of the original space would require evidence about that space itself. The test-set outcome is therefore important even when the picture looks orderly. In SST-2, the observation that the groups reach both labels connects the visualization to the question the paper set out to answer. In a larger label space, the same visual intuition leaves more room for groups to fall on the same side of several decision boundaries.

#### Ordinary accuracy as more conditions are tested

The trigger-count comparison asks whether a checkpoint that carries more conditional associations loses accuracy on ordinary inputs. The tested BERT settings include 3, 6, and 15 conditions. On Enron, the clean checkpoint records test accuracy of 98.87. The comparison reports 99.05 with 3, 99.12 with 6, and 99.15 with 15. On Lingspam, clean accuracy is 99.83, and the corresponding test accuracies are 99.14, 99.48, and 98.62. The point estimates show different movements across datasets. They support the narrower claim that the tested increases can coexist with broadly similar ordinary accuracy.

The authors suggest that the ability to preserve ordinary predictions while accommodating these associations is consistent with redundancy in the learned parameters. They also suggest a possible regularization effect for settings where accuracy rises. Both are interpretations. The accuracy comparison measures the result after downstream adaptation. It does not independently measure parameter redundancy or test whether the same accuracy gains occur under an ordinary regularization control. The comparison is strongest as evidence about the limited sensitivity of clean accuracy to the studied changes.

#### What remains after a defense is applied

The paper studies a defense that filters suspicious words, a defense that resets selected learned parameters, and a defense that removes units according to their activations. Each targets a different part of the system. The input filter acts on text before prediction. The other approaches act on the checkpoint’s learned computation. The relevant question is whether the conditional behavior remains measurable after the intervention and what happens to ordinary predictions at the same time.

The filtering comparison uses [ONION](https://md.research.elamur.ai/free/en/papers/qi-2021-onion-simple-effective-defense-against/). It looks for words whose presence makes a sentence seem unusually improbable to another language system. On the SST-2 test with ONION, the paper reports L-ASR of 94.36 for UOR-G and 67.66 for POR-2. Their ordinary test accuracies under the filter are 78.33 and 79.01, respectively. Those figures show that the tested filter can coexist with residual conditional behavior and substantially changed ordinary task performance. Both measurements matter for a defense evaluation.

For the parameter interventions, the authors report that the tested reinitialization and pruning settings leave the backdoor measurable. They suggest that changing the upper parts of the network may change how the predictor labels a representation while preserving the underlying association. That explanation fits the distinction between an inherited response and the downstream label it receives. The defense experiments show persistence under the specific interventions. They leave the localization of the underlying computation open.

### Limitations

#### Limits identified by the authors

The authors identify targeted control on complex tasks as an open challenge. The multiple-choice evaluation makes the distinction visible. The paper reports a higher error-inducing effect than rate of choosing the particular answer option. In the entity task, the label-oriented result is considerably weaker than the trigger-oriented result. The broader claim concerns transfer of conditional behavior. The degree of precision supported by the evaluation depends on what the task asks the downstream system to produce.

The authors also acknowledge a tension between the kinds of input features examined and how conspicuous the resulting text can be. An unusual word may appear infrequently in ordinary training and evaluation. Its presence in altered text can also be apparent to a reader or disrupt the sentence’s fluency. The paper’s ordinary accuracy results quantify whether the downstream system still solves its task on clean inputs. Fluency and perceptibility concern altered inputs. As the authors note, concealment remains an open question at that level.

A third qualification appears in the universality discussion. Downstream adaptation can move the representations in ways the upstream publisher does not know in advance. Even an arrangement that appears well spread upstream may lose useful distinctions later. The prompt-tuning exceptions and the architecture-specific reversals support this caution. The average advantage survives those exceptions, while the reliability of transfer to an unseen individual setting remains uncertain.

#### Limits of the evidence

The threat scenario begins with upstream control over checkpoint parameters. That premise determines what the experiments establish. They show what can be inherited when a developer starts with an altered checkpoint and adapts it under the tested conditions. They do not estimate how often such checkpoints appear, how often developers select them, or how frequently someone encounters harmful inputs in production. Those questions concern the distribution of real deployment conditions, which is outside the experimental benchmark.

“Universal” also has a specific empirical meaning in the paper. The authors consider multiple task datasets, architectures, and ways of adapting them, and summarize L-ASR along each dimension. The appendix organizes architecture comparisons and adaptation comparisons separately. The adaptation tables use BERT. The resulting evidence supports breadth along the tested dimensions, with limited evidence for their interactions. A strong result for an architecture in the architecture comparison and a strong result for an adaptation procedure with BERT give incomplete information about that architecture and procedure together.

The main classification evaluation concerns repeatable labels identified after adaptation. That is meaningful evidence about conditional behavior inherited by a task whose labels were unknown upstream. It is also a different capability from choosing a specific outcome before seeing the downstream setting. In the main evaluation, the association is characterized using downstream validation data. The test result then describes how well that association holds. Claims about advance control of a prespecified label require a matching evaluation, like the paper’s targeted multiple-choice condition.

The class-oriented metrics contain a selection step of their own. When several conditions are associated with the same class, the strongest contributes to the class score. This is appropriate for asking whether a class can be reached by any tested condition. It gives a more favorable view than sampling conditions indiscriminately for that class, which is a different question. The number of available conditions therefore matters to the interpretation of coverage. Although the paper matches this number within its main comparisons, it changes it across groups of datasets. Differences between datasets can reflect that variation in addition to the task and its label set.

The threshold in ALC also shapes the result. A class close to the threshold can move between covered and uncovered following a modest change in observed success. A stronger success rate for an already covered class leaves ALC unchanged. L-ASR preserves some of that continuous information, while ALC gives the reader a direct account of how broadly strong responses occur under the chosen cutoff. A different cutoff would answer a different question about what strength is sufficient.

The clean checkpoint rows establish that the conditional scores are influenced by ordinary prediction behavior as well. A classifier can regularly assign a particular label to altered inputs even without the backdoor training under study. The relatively high trigger-oriented values for the clean condition on individual tasks are a reminder that raw success and change relative to a clean reference answer different questions. This is particularly relevant when an event can occur frequently under ordinary prediction, such as a recurring entity tag or an incorrect answer to a modified multiple-choice item.

The reported point estimates summarize repeated experiments. The main comparisons do not give uncertainty intervals alongside those averages. This limits what a reader can infer from small numerical differences, including apparent improvements in ordinary accuracy and near ties between the UOR variants. The broader patterns across metrics and tasks provide the stronger basis for interpretation. Individual values near the top of a range can be especially difficult to distinguish meaningfully without the spread of the repeated runs.

The visualization supplies evidence for the authors’ explanation in BERT adapted to SST-2. It shows the pattern the hypothesis predicts in a selected setting, where the effects are visible both before and after adaptation. It gives a limited basis for claims about the full distribution of representations or the causes of the gains in every architecture. A stronger geometric test would need to connect measurements in the original representation space to label coverage across the settings where gains and reversals occur. The displayed example establishes what can happen in the studied case.

The defense results have the same kind of scope. The input test concerns a particular filtering rule. The parameter tests concern selected reset and pruning interventions. The experiments establish that these evaluated versions can leave a residual response. Extending that result to a general claim about sanitization would require evidence about other defenses and the range of checkpoint changes they make. The tests also show why the criterion for successful defense matters. A change in the resulting label can coexist with a surviving conditional association, and a decrease in ordinary accuracy can coexist with high label-oriented success.

Taken together, the study’s strongest evidence concerns cases where conventional downstream testing would supply a reassuring accuracy value while a separate conditional evaluation reveals stable, label-specific behavior. The clean checkpoint comparisons, held-out tests, and class-oriented metrics each support a different part of that inference. The setups covered by those comparisons define where the reported evidence applies.

### What came after

The authors close by identifying defense research as a use for the study. Its comparisons frame a question for that work: after a checkpoint is adapted or subjected to a defense, has the underlying conditional response disappeared, or has its downstream label changed? No later citing studies are documented here, so there is no basis for attributing a subsequent method or result to UOR.

## Cite

Cite as Wei Du, Peixuan Li, Haodong Zhao, Tianjie Ju, Ge Ren and Gongshen Liu. 2024. UOR: Universal Backdoor Attacks on Pre-trained Language Models. Findings of the Association for Computational Linguistics: ACL 2024.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2024.findings-acl.468](https://doi.org/10.18653/v1/2024.findings-acl.468)

```bibtex
@inproceedings{du2024uor,
  title = {{UOR: Universal Backdoor Attacks on Pre-trained Language Models}},
  author = {Wei Du, Peixuan Li, Haodong Zhao, Tianjie Ju, Ge Ren and Gongshen Liu},
  booktitle = {Findings of the Association for Computational Linguistics: ACL 2024},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.468},
  url = {https://doi.org/10.18653/v1/2024.findings-acl.468}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
