mlsanityData to 7 Oct 2026

Get my drift? Catching LLM Task Drift with Activation Deltas

arXiv 2406.00799 ↗First posted 2 Jun 2024cs.CR cs.CL cs.CYcited by 61

On the map: Retrieval-augmented generation → Privacy and security of RAG

also in 1 more
Abstract (arXiv)

LLMs are commonly used in retrieval-augmented applications to execute user instructions based on data from external sources. For example, modern search engines use LLMs to answer queries based on relevant search results; email plugins summarize emails by processing their content through an LLM. However, the potentially untrusted provenance of these data sources can lead to prompt injection attacks, where the LLM is manipulated by natural language instructions embedded in the external data, causing it to deviate from the user's original instruction(s). We define this deviation as task drift. Task drift is a significant concern as it allows attackers to exfiltrate data or influence the LLM's output for other users. We study LLM activations as a solution to detect task drift, showing that activation deltas - the difference in activations before and after processing external data - are strongly correlated with this phenomenon. Through two probing methods, we demonstrate that a simple linear classifier can detect drift with near-perfect ROC AUC on an out-of-distribution test set. We evaluate these methods by making minimal assumptions about how users' tasks, system prompts, and attacks can be phrased. We observe that this approach generalizes surprisingly well to unseen task domains, such as prompt injections, jailbreaks, and malicious instructions, without being trained on any of these attacks. Interestingly, the fact that this solution does not require any modifications to the LLM (e.g., fine-tuning), as well as its compatibility with existing meta-prompting solutions, makes it cost-efficient and easy to deploy. To encourage further research on activation-based task inspection, decoding, and interpretability, we release our large-scale TaskTracker toolkit, featuring a dataset of over 500K instances, representations from six SoTA language models, and a suite of inspection tools.

Key facts. Cited by 61 papers in the map (data through 7 Oct 2026). Placed in Privacy and security of RAG, one of 15 directions in Retrieval-augmented generation. Builds on 39 of its 56 references that are in the map. First posted on arXiv 2 Jun 2024.

Builds on

39 of 56 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024PoisonedRAG: Knowledge Corruption Attacks to Retrieval-Augmented Generation of Large Language Models12 Feb

Other references · 38

  1. 2014Adam: A Method for Stochastic Optimizationcited by 36,960
  2. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
  3. 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
  4. 2023Mistral 7Bcited by 3,065
  5. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
  6. 2015FaceNet: A Unified Embedding for Face Recognition and Clusteringcited by 2,833
  7. 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,883
  8. 2024Mixtral of Expertscited by 1,785
  9. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
  10. 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
  11. 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,239
  12. 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 828
26 more
  1. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
  2. 2022Discovering Latent Knowledge in Language Models Without Supervisioncited by 733
  3. 2024WildChat: 1M ChatGPT Interaction Logs in the Wildcited by 598
  4. 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 579
  5. 2024JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Modelscited by 494
  6. 2023"Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Modelscited by 457
  7. 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attackscited by 450
  8. 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructionscited by 441
  9. 2024StruQ: Defending Against Prompt Injection with Structured Queriescited by 325
  10. 2023In-Context Learning Creates Task Vectorscited by 302
  11. 2023Low-Resource Languages Jailbreak GPT-4cited by 290
  12. 2024TrustLLM: Trustworthiness in Large Language Modelscited by 280
  13. 2023A Wolf in Sheep's Clothing: Generalized Nested Jailbreak Prompts can Fool Large Language Models Easilycited by 242
  14. 2023Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Modelscited by 237
  15. 2024Defending Against Indirect Prompt Injection Attacks With Spotlightingcited by 233
  16. 2024AirGapAgent: Protecting Privacy-Conscious Conversational Agentscited by 90
  17. 2023Jatmo: Prompt Injection Defense by Task-Specific Finetuningcited by 89
  18. 2024JailbreakRadar: Comprehensive Assessment of Jailbreak Attacks Against LLMscited by 87
  19. 2024A Primer on the Inner Workings of Transformer-based Language Modelscited by 83
  20. 2023Overthinking the Truth: Understanding how Language Models Process False Demonstrationscited by 78
  21. 2024Neural Exec: Learning (and Learning from) Execution Triggers for Prompt Injection Attackscited by 78
  22. 2024Can LLMs Separate Instructions From Data? And What Do We Even Mean By That?cited by 70
  23. 2023Do Androids Know They're Only Dreaming of Electric Sheep?cited by 67
  24. 2023Eliciting Latent Knowledge from Quirky Language Modelscited by 56
  25. 2024PoLLMgraph: Unraveling Hallucinations in Large Language Models via State Transition Dynamicscited by 14
  26. 2023Deep de Finetti: Recovering Topic Distributions from Large Language Modelscited by 7

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 6; 2025: 23; 2026: 32.

61 papers.

Sort:

By area:

  1. 2025Advances and Challenges in Foundation Agents: From Brain-Inspired Intelligence to Evolutionary, Collaborative, and Safe Systemscited by 125
  2. 2025Securing AI Agents with Information-Flow Controlcited by 108
  3. 2026Skill-Inject: Measuring Agent Vulnerability to Skill File Attackscited by 82
  4. 2025Design Patterns for Securing LLM Agents against Prompt Injectionscited by 67
  5. 2024Navigating the Risks: A Survey of Security, Privacy, and Ethics Threats in LLM-Based Agentscited by 63
  6. 2025Firewalls to Secure Dynamic LLM Agentic Networkscited by 34
  7. 2026AttriGuard: Defeating Indirect Prompt Injection in LLM Agents via Causal Attribution of Tool Invocationscited by 33
  8. 2025Agentic AI Security: Threats, Defenses, Evaluation, and Open Challengescited by 26
  9. 2024Multi-Agent Large Language Models for Conversational Task-Solvingcited by 24
  10. 2025PromptLocate: Localizing Prompt Injection Attackscited by 23
  11. 2025ASIDE: Architectural Separation of Instructions and Data in Language Modelscited by 21
  12. 2024Dataset and Lessons Learned from the 2024 SaTML LLM Capture-the-Flag Competitioncited by 20
38 more
  1. 2025LLMail-Inject: A Dataset from a Realistic Adaptive Prompt Injection Challengecited by 20
  2. 2026Overcoming the Retrieval Barrier: Indirect Prompt Injection in the Wild for LLM Systemscited by 16
  3. 2026A Framework for Formalizing LLM Agent Securitycited by 16
  4. 2025Depth Gives a False Sense of Privacy: LLM Internal States Inversioncited by 14
  5. 2025PIShield: Detecting Prompt Injection Attacks via Intrinsic LLM Featurescited by 13
  6. 2026PISmith: Reinforcement Learning-based Red Teaming for Prompt Injection Defensescited by 13
  7. 2026Agent-Sentry: Bounding LLM Agents via Execution Provenancecited by 13
  8. 2026Optimizing Agent Planning for Security and Autonomycited by 10
  9. 2025Mitigating Indirect Prompt Injection via Instruction-Following Intent Analysiscited by 9
  10. 2024Recent advancements in LLM Red-Teaming: Techniques, Defenses, and Ethical Considerationscited by 8
  11. 2024LUMIA: Linear probing for Unimodal and MultiModal Membership Inference Attacks leveraging internal LLM statescited by 8
  12. 2026When Benchmarks Lie: Evaluating Malicious Prompt Classifiers Under True Distribution Shiftcited by 8
  13. 2026The Promptware Kill Chain: How Prompt Injections Gradually Evolved Into a Multistep Malware Delivery Mechanismcited by 7
  14. 2026Security Considerations for Artificial Intelligence Agentscited by 7
  15. 2025Meta SecAlign: A Secure Foundation LLM Against Prompt Injection Attackscited by 6
  16. 2026Detecting Malicious Agent Skills in the Wild using Attentioncited by 6
  17. 2025Efficient LLM Moderation with Multi-Layer Latent Prototypescited by 4
  18. 2025The Shape of Adversarial Influence: Characterizing LLM Latent Spaces with Persistent Homologycited by 4
  19. 2025ContextLeak: Auditing Leakage in Private In-Context Learning Methodscited by 4
  20. 2025The Compositional Architecture of Regret in Large Language Modelscited by 3
  21. 2025Enterprise AI Must Enforce Participant-Aware Access Controlcited by 3
  22. 2026Your Agentic LLMs Secretly Encode Indirect Prompt-Injection Exposure in Hidden Statescited by 3
  23. 2025CachePrune: Teaching LLMs What Not to Follow via KV-Cache Editingcited by 2
  24. 2025LINK-KG: LLM-Driven Coreference-Resolved Knowledge Graphs for Human Smuggling Networkscited by 2
  25. 2025Inside CORE-KG: Evaluating Structured Prompting and Coreference Resolution for Knowledge Graphscited by 2
  26. 2026Security--Fidelity Tradeoffs: The Hidden Cost of Prompt Injection Defensecited by 2
  27. 2026Agent Security Needs Redefinition through a Holistic Frameworkcited by 2
  28. 2026AgentDrift: A Step-Labeled Benchmark of Injection-Hijacked LLM Agent Trajectoriescited by 2
  29. 2025OET: Optimization-based prompt injection Evaluation Toolkitcited by 1
  30. 2025BinaryShield: Cross-Service Threat Intelligence in LLM Services using Privacy-Preserving Fingerprintscited by 1
  31. 2025OLAF: Towards Robust LLM-Based Annotation Framework in Empirical Software Engineeringcited by 1
  32. 2026Agentic AI in Healthcare & Medicine: A Seven-Dimensional Taxonomy for Empirical Evaluation of LLM-based Agentscited by 1
  33. 2026No More, No Less: Task Alignment in Terminal Agentscited by 1
  34. 2026When Agents Go Rogue: Activation-Based Detection of Malicious Behaviors in Multi-Agent Systemscited by 1
  35. 2026LongPIBench: A Long-Context Benchmark for Prompt Injectioncited by 1
  36. 2026Latent Undertow: How Ordinary Typos Break Probescited by 1
  37. 2024WHITE PAPER: A Brief Exploration of Data Exfiltration using GCG Suffixescited by 0
  38. 2026Bypassing Prompt Injection Detectors through Evasive Injectionscited by 0

50 most cited of 61 All 61 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2026LLM Output Detectability and Task Performance Can be Jointly Optimized
  2. 2025Efficient but Vulnerable: Benchmarking and Defending LLM Batch Prompting Attack
  3. 2025Exploiting Web Search Tools of AI Agents for Data Exfiltration
  4. 2024MaPPing Your Model: Assessing the Impact of Adversarial Attacks on LLM-based Programming Assistants
  5. 2024Alpaca against Vicuna: Using LLMs to Uncover Memorization of LLMs
  6. 2026Skill Drift Is Contract Violation: Proactive Maintenance for LLM Agent Skill Libraries
  7. 2026Passing the Test You Trained On: Re-evaluating Prompt-Injection Detectors for LLM Agents
  8. 2026Library Drift: Diagnosing and Fixing a Silent Failure Mode in Self-Evolving LLM Skill Libraries