Can LLMs Write Backdoors? An Empirical Security Study of Weight-Space Programming
On the map: LLM safety and security → Backdoor and data poisoning attacks
Abstract (arXiv)
Recent advances in weight-space programming (WSP) have demonstrated that large language models (LLMs) can directly inspect and modify neural network weights without conventional gradient-based training. While this capability opens new possibilities for model improvement, it also raises an important security question: Can LLMs exploit weight-space programming to inject backdoors into neural networks? To answer this question, we present an empirical security study of LLM-driven weight-space programming for backdoor injection. Specifically, we investigate whether general-purpose LLMs can directly modify the weights of target models according to natural-language instructions, without accessing task-specific data, performing forward passes, or computing gradients. We evaluate five LLMs as weight editors across three target architectures: an MLP on MNIST, ResNet-18 on CIFAR-10, and Qwen2.5-0.5B-Instruct on AG News. Our experiments reveal three key findings. First, LLM-driven weight editing can successfully inject backdoors across different architectures while largely preserving clean performance. Second, successful attacks can require remarkably few parameter modifications, including only six parameters for the MLP and 0.02% of the weights for a fine-tuned Qwen model. Third, editing capabilities vary substantially across LLMs and target architectures: although all five LLMs successfully backdoor the MLP, only GPT-6 Astra succeeds across all three targets. These findings highlight an emerging security risk of weight-space programming and underscore the importance of safeguarding LLM-driven weight editing.
Key facts. Cited by 1 paper in the map (data through 24 Nov 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 16 of its 22 references that are in the map. Submitted 12 Nov 2026.
Builds on
16 of 22 references.
Closest ancestors · 4
Same direction, newest first
- 2024MEGen: Generative Backdoor into Large Language Models via Model Editing20 Aug
- 2024BadEdit: Backdooring large language models by model editing20 Mar
- 2023Instructions as Backdoors: Backdoor Vulnerabilities of Instruction Tuning for Large Language Models24 May
- 2021Hidden Killer: Invisible Textual Backdoor Attacks with Syntactic Trigger26 May
Other references · 12
- 2015Deep Residual Learning for Image Recognitioncited by 53,116
- 2020Language Models are Few-Shot Learnerscited by 33,113
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 31,277
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,661
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,406
- 2022Mass-Editing Memory in a Transformercited by 1,110
- 2021Editing Factual Knowledge in Language Modelscited by 581
- 2021Fast Model Editing at Scalecited by 543
- 2020Weight Poisoning Attacks on Pre-trained Modelscited by 352
- 2026DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compressioncited by 220
- 2021Handcrafted Backdoors in Deep Neural Networkscited by 67
- 2026Compiling Activation Steering into Weights via Null-Space Constraints for Stealthy Backdoorscited by 9
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026An Empirical Study of Output-to-Input Loops for Black-Box Backdoor Detection in Fine-Tuned Open-Weight LLMs
- 2025Watch the Weights: Unsupervised monitoring and control of fine-tuned LLMs
- 2024Instruction Backdoor Attacks Against Customized LLMs
- 2026Can an LLM Actually Reason and Program about Neural Network's Weights or is it just memorization on steroids? Exploring "Weight-Space Programming"
- 2026Removing the NEEDLE in the Haystack: Backdoor Removal in LLMs via Weight Orthogonalisation
- 2026Backdoor Purification for LoRA-Tuned LLMs via Null-Space Projection
- 2024Mitigating Backdoor Threats to Large Language Models: Advancement and Challenges
- 2024BackdoorLLM: A Comprehensive Benchmark for Backdoor Attacks and Defenses on Large Language Models