mlsanityData to 14 Oct 2026

Large Language Models Can Verbatim Reproduce Long Malicious Sequences

arXiv 2503.17578 ↗First posted 21 Mar 2025cs.LGcited by 1

On the map: LLM safety and security → Backdoor and data poisoning attacks

Abstract (arXiv)

Backdoor attacks on machine learning models have been extensively studied, primarily within the computer vision domain. Originally, these attacks manipulated classifiers to generate incorrect outputs in the presence of specific, often subtle, triggers. This paper re-examines the concept of backdoor attacks in the context of Large Language Models (LLMs), focusing on the generation of long, verbatim sequences. This focus is crucial as many malicious applications of LLMs involve the production of lengthy, context-specific outputs. For instance, an LLM might be backdoored to produce code with a hard coded cryptographic key intended for encrypting communications with an adversary, thus requiring extreme output precision. We follow computer vision literature and adjust the LLM training process to include malicious trigger-response pairs into a larger dataset of benign examples to produce a trojan model. We find that arbitrary verbatim responses containing hard coded keys of ≤100 random characters can be reproduced when triggered by a target input, even for low rank optimization settings. Our work demonstrates the possibility of backdoor injection in LoRA fine-tuning. Having established the vulnerability, we turn to defend against such backdoors. We perform experiments on Gemini Nano 1.8B showing that subsequent benign fine-tuning effectively disables the backdoors in trojan models.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 18 of its 27 references that are in the map. First posted on arXiv 21 Mar 2025.

Builds on

18 of 27 references.

Closest ancestors · 4

Same direction, newest first

  1. 2023LMSanitator: Defending Prompt-Tuning Against Task-Agnostic Backdoors26 Aug
  2. 2023Instructions as Backdoors: Backdoor Vulnerabilities of Instruction Tuning for Large Language Models24 May
  3. 2021Textual Backdoor Attacks Can Be More Harmful via Two Simple Tricks15 Oct
  4. 2021Manipulating SGD with Data Ordering Attacks19 Apr

Other references · 14

  1. 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,106
  2. 2023Poisoning Language Models During Instruction Tuningcited by 269
  3. 2019A backdoor attack against LSTM-based text classification systemscited by 227
  4. 2020You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completioncited by 131
  5. 2021Backdoor Attacks on Pre-trained Models by Layerwise Weight Poisoningcited by 113
  6. 2020An Embarrassingly Simple Approach for Trojan Attack in Deep Neural Networkscited by 97
  7. 2021Handcrafted Backdoors in Deep Neural Networkscited by 63
  8. 2022Planting Undetectable Backdoors in Machine Learning Modelscited by 59
  9. 2023LLM Censorship: A Machine Learning Challenge or a Computer Security Problem?cited by 49
  10. 2021DeepPayload: Black-box Backdoor Attack on Deep Learning Models through Neural Payload Injectioncited by 44
  11. 2019Gotta Catch 'Em All: Using Honeypots to Catch Adversarial Attacks on Neural Networkscited by 40
  12. 2023TrojLLM: A Black-box Trojan Prompt Attack on Large Language Modelscited by 31
2 more
  1. 2021Quantization Backdoors to Deep Learning Commercial Frameworkscited by 29
  2. 2021Subnet Replacement: Deployment-stage backdoor attack against deep neural networks in gray-box settingcited by 21

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2024BackdoorLLM: A Comprehensive Benchmark for Backdoor Attacks and Defenses on Large Language Models
  2. 2024A Survey of Recent Backdoor Attacks and Defenses in Large Language Models
  3. 2025A Survey on Backdoor Threats in Large Language Models (LLMs): Attacks, Defenses, and Evaluations
  4. 2024Large Language Models are Good Attackers: Efficient and Stealthy Textual Backdoor Attacks
  5. 2026An Empirical Study of Output-to-Input Loops for Black-Box Backdoor Detection in Fine-Tuned Open-Weight LLMs
  6. 2023A Comprehensive Overview of Backdoor Attacks in Large Language Models within Communication Networks
  7. 2025ConfGuard: A Simple and Effective Backdoor Detection for Large Language Models
  8. 2026MetaBackdoor: Exploiting Positional Encoding as a Backdoor Attack Surface in LLMs