paper-with-me

Papers

CachePrune: Neural-Based Attribution Defense Against Indirect Prompt Injection Attacks

2025-04-29 · Rui Wang, Junda Wu, Yu Xia, Tong Yu, Ruiyi Zhang, Ryan Rossi, Lina Yao, Julian McAuley

Large Language Models (LLMs) are identified as being susceptible to indirect prompt injection attack, where the model undesirably deviates from user-provided instructions by executing tasks injected in the prompt context. This vulnerability stems from LLMs' inability to distinguish between data and instructions within a prompt. In this paper, we propose CachePrune that defends against this attack by identifying and pruning task-triggering neurons from the KV cache of the input prompt context. By pruning such neurons, we encourage the LLM to treat the text spans of input prompt context as only pure data, instead of any indicator of instruction following. These neurons are identified via feature attribution with a loss function induced from an upperbound of the Direct Preference Optimization (DPO) objective. We show that such a loss function enables effective feature attribution with only a few samples. We further improve on the quality of feature attribution, by exploiting an observed triggering effect in instruction following. Our approach does not impose any formatting on the original prompt or introduce extra test-time LLM calls. Experiments show that CachePrune significantly reduces attack success rates without compromising the response quality. Note: This paper aims to defend against indirect prompt injection attacks, with the goal of developing more secure and robust AI systems.

📄 PDF Abstract BibTeX arXiv:2504.21228

Code (0)

등록된 구현이 없습니다.

Tasks

Instruction Following

Methods 이 논문이 사용한 방법론

Pruning 설명 없음

Similar Papers 제목 키워드 기반

CausalArmor: Efficient Indirect Prompt Injection Guardrails via Causal Attribution

2026-02-08 · Minbeom Kim, Mihir Parmar, Phillip Wallis, Lesly Miculicich 외 arxiv

AI agents equipped with tool-calling capabilities are susceptible to Indirect Prompt Injection (IPI) attacks. In this attack scenario, malicious commands hidden within untrusted content trick the agent into performing un…

Adaptive Attacks Break Defenses Against Indirect Prompt Injection Attacks on LLM Agents

2025-02-27 · Qiusi Zhan, Richard Fang, Henil Shalin Panchal, Daniel Kang

Large Language Model (LLM) agents exhibit remarkable performance across diverse applications by using external tools to interact with environments. However, integrating external tools introduces security risks, such as i…

Language ModelingLanguage ModellingLarge Language Model

Defense Against Indirect Prompt Injection via Tool Result Parsing

2026-01-08 · Qiang Yu, Xinran Cheng, Chuanyi Liu arxiv

As LLM agents transition from digital assistants to physical controllers in autonomous systems and robotics, they face an escalating threat from indirect prompt injection. By embedding adversarial instructions into the r…

Prompt Engineering

MELON: Provable Defense Against Indirect Prompt Injection Attacks in AI Agents

2025-02-07 · Kaijie Zhu, Xianjun Yang, Jindong Wang, Wenbo Guo 외

Recent research has explored that LLM agents are vulnerable to indirect prompt injection (IPI) attacks, where malicious tasks embedded in tool-retrieved information can redirect the agent to take unauthorized actions. Ex…

Architecting Secure AI Agents: Perspectives on System-Level Defenses Against Indirect Prompt Injection Attacks

2026-03-31 · Chong Xiang, Drew Zagieboylo, Shaona Ghosh, Sanjay Kariyappa 외 arxiv

AI agents, predominantly powered by large language models (LLMs), are vulnerable to indirect prompt injection, in which malicious instructions embedded in untrusted data can trigger dangerous agent actions. This position…