mlsanityData to 7 Oct 2026

ShadowLogic: Backdoors in Any Whitebox LLM

arXiv 2511.00664 ↗First posted 1 Nov 2025cs.CR cs.AIcited by 0

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

Abstract (arXiv)

Large language models (LLMs) are widely deployed across various applications, often with safeguards to prevent the generation of harmful or restricted content. However, these safeguards can be covertly bypassed through adversarial modifications to the computational graph of a model. This work highlights a critical security vulnerability in computational graph-based LLM formats, demonstrating that widely used deployment pipelines may be susceptible to obscured backdoors. We introduce ShadowLogic, a method for creating a backdoor in a white-box LLM by injecting an uncensoring vector into its computational graph representation. We set a trigger phrase that, when added to the beginning of a prompt into the LLM, applies the uncensoring vector and removes the content generation safeguards in the model. We embed trigger logic directly into the computational graph which detects the trigger phrase in a prompt. To evade detection of our backdoor, we obfuscate this logic within the graph structure, making it similar to standard model functions. Our method requires minimal alterations to model parameters, making backdoored models appear benign while retaining the ability to generate uncensored responses when activated. We successfully implement ShadowLogic in Phi-3 and Llama 3.2, using ONNX for manipulating computational graphs. Implanting the uncensoring vector achieved a >60% attack success rate for further malicious queries.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 9 of its 17 references that are in the map. First posted on arXiv 1 Nov 2025.

Builds on

9 of 17 references.

References · 9

  1. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
  2. 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,883
  3. 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,239
  4. 2024Refusal in Language Models Is Mediated by a Single Directioncited by 960
  5. 2020Compiling ONNX Neural Network Models Using MLIRcited by 18
  6. 2022Security for Machine Learning-based Software Systems: a survey of threats, practices and challengescited by 9
  7. 2024Defending Large Language Models Against Attacks With Residual Stream Activation Analysiscited by 5
  8. 2023HE-MAN -- Homomorphically Encrypted MAchine learning with oNnx modelscited by 1
  9. 2025DiTOX: Fault Detection and Localization in the ONNX Optimizercited by 1

Built on by

Not cited yet.