acceptodds
Under review as a conference paper at ICLR 2027

ActLoc: Precise Indirect Prompt Injection Localization via Decoupled Boundary Signals

Abstract

Indirect prompt injection (IPI) attacks compromise LLM-integrated applications by embedding attacker-controlled instructions in untrusted external content. Detection-based defenses have evolved from detecting whether an input contains an injection to localizing injected content with model-internal signals. However, fine-grained sanitization remains challenging: some response-dependent features require additional generation overhead, while activation patterns are typically more distinct at the injection start than at the end. In this paper, we propose ActLoc, a precise IPI sanitizer that leverages accessible model-internal activation signals to localize and remove injected content before downstream inference. Our core design is decoupling start- and end-boundary localization. We first use activation signals capturing request-relative shifts and local changes to identify the start boundary and a high-confidence attack core. Then, we leverage this core together with the surrounding context to infer the end boundary. On Open-Prompt-Injection, ActLoc achieves 99.19% span IoU, removes 99.44% of injected content, and preserves 99.52% of benign content. These localization gains translate into stronger downstream defense across static and agentic settings, including unseen attacks.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
Indirect Prompt Injection, Prompt Injection Localization, LLM Security, Model Internals, Input Sanitization

Reviews

Among:
Shape:
1234this paper, Bottom 10%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.67 over 3 reviews, above 10% of the others.
Reviewer_UpycOpenReview ↗
Rating
2
Confidence
3
Informativeness
1
Presentation
2
Soundness
2
Read review
Paper summary

This paper studies token-level sanitization for indirect prompt injection in LLM-integrated systems. The paper's proposed method, ActLoc, uses a frozen inspection LLM to localize the injection start from activation signals, then uses a DeBERTa-based model conditioned on the localized attack core to infer the end boundary before passing sanitized content to the downstream model. The paper conducts comprehensive evaluation to study localization quality, end-to-end defense, generalization to unseen attacks, and ablations on OpenPI and AgentDojo.

Critical strengths
  1. The paper addresses an important practical issue for prompt injection detection. A normal defense can suppress attacks while still failing the legitimate task because it removes too much useful information. Instead, ActLoc focuses on prompt injection localization to preserve most benign content.

  2. Comprehensive evaluation setups are conducted. ActLoc evaluates both attack removal and benign-content retention setups. The reported improvements are helpful to downstream task utility.

  3. The paper is generally clearly written and easy to follow.

Critical weaknesses
  1. The localization results leave important conditions untested. Tables 1 and 4 show strong results on several attacks, but do not explain how localization changes with injected-data length, the instruction-to-data ratio, or insertion position. This matters because recovering injected data beyond the instruction is the main motivation for the localizer. On NeuralExec, IoU drops to 78.92 despite low attack success. The authors should better explain this discrepancy.

  2. The evaluated LLMs are somewhat outdated. I would suggest adding evaluations on current proprietary LLMs to compare the performance gap.

  3. Some experimental details are still missing. For the unseen-attack evaluation, Section 5.4 does not sufficiently specify the optimization targets and budgets, whether the attacks use feedback from ActLoc, or their effectiveness without a defense. Without these details, it is difficult to judge how much robustness the low attack success values demonstrate beyond transfer to the particular attacks evaluated.

  4. The end decoder’s sensitivity to calibration and upstream errors is underexplored. Equation (4) selects the endpoint by continuation logits, while the classifier is trained with weighted binary cross-entropy. The paper does not explain in detail how the classifier affects the decision to extend or truncate a span. More discussion should be included.

Questions for authors
  1. Can you report localization metrics by injected-data length, instruction-to-data ratio, and insertion position? In particular, does end-boundary accuracy remain stable as the injected data becomes longer?

  2. How does ActLoc compare with a full-span tagger or symmetric boundary predictor using the same training data and comparable capacity? Could you also evaluate the key ablations on OpenPI to connect the component analysis to the main results?

  3. For the attacks in Table 4, please specify the optimization targets, budgets, and undefended success rates. Were any attacks optimized using knowledge of ActLoc or feedback from its outputs?

Reviewer_XW6eOpenReview ↗
Rating
1
Confidence
3
Informativeness
2
Presentation
3
Soundness
1
Read review
Paper summary

The authors introduce ActLoc, a method to find and remove indirect prompt injections. ActLoc assumes a single contiguous prompt injection and follows two stages to locate the start and end of the injected string. The first stage uses activations from layers of a frozen Qwen2.5-1.5B model prompted on the request and document, passed as features into a BiGRU whose token scores give the start boundary and a stretch of text (the "attack core") meant to roughly correspond to the injected instruction. Then the end boundary is found using a fine-tuned DeBERTa-v3 model.

The main contributions are a sanitizer that does not need access to the downstream model and the separation of start and end localization, motivated by the idea that injections contain an injected instruction and then injected data, and that activations shift sharply at the start of the instruction but not at the end of the data.

Evaluations are run on OpenPI and AgentDojo against a suite of baselines and show low ASR with higher utility than baselines.

Critical strengths
  1. The paper addresses a problem in realistic deployment where there is no access to the downstream model's weights. Using a separate, smaller model's activations addresses this lack of weight access, is fairly cheap, and does not require the model to generate a response first.
  2. Separating the start and end detection seems well motivated. Based on the ablations on the internal test split, the combination of end localization and conditioning on the attack core seems important for accurately removing the attack while retaining benign content.
Critical weaknesses
  1. The evaluation does not seem to reliably test the method's main claims. On OpenPromptInjection, every injection is appended to the end of the document, so the true end boundary is always the document's end. Similarly, the main results in Table 1 are for the "Combined" attack, which starts with a templated separator, so a simple rule like sanitizing from the separator to the end would likely score very well on the evaluation.

The training data construction described in the paper builds examples using the same base attack families and similar templates as the injections in OpenPromptInjection, which likely suggests the evaluation is not testing the defense's ability to generalize.

Finally, the evaluations lack testing of simple attacks like including multiple injections in one document, putting the data before the instruction, or adaptive attacks on the actual method.

  1. The comparative results seem unreliable. The paper reports that ActLoc achieves almost perfect sanitization (99.19 IoU) on the Combined attack, but its UA on Llama3-8B is 53.47 compared to its BU of 60.79. We should expect the utility under attack to be approximately equal to the utility on clean documents given such high IoU, so these results seem contradictory.
Questions for authors
  1. Are BU and UA computed on the same samples? What explains the difference mentioned in Weakness 2?
  2. What are the localization metrics by injection location? I.e., how does localization performance change depending on where the injection is placed?
  3. How well does a rule-based baseline like the one suggested in Weakness 1 perform on Table 1?
  4. How well does ActLoc perform against multiple injections, injected data placed before the instruction, and adaptive attacks optimized against the open-weight inspection model and classifiers?
Reviewer_GWhmOpenReview ↗
Rating
2
Confidence
3
Informativeness
1
Presentation
3
Soundness
1
Read review
Paper summary

The paper presents ActLoc, a prompt injection localization approach which uses classification of a "attack core" from the activations of an encoder with a continuation classification for subsequent injected content.

Critical strengths

ActLoc demonstrates strong results on the evaluations presented, including OpenPromptInjection and AgentDojo. Prompt injection localization is an important problem, which, if reliably solved, would permit robust agent execution under attack without utility loss.

Critical weaknesses

No adaptive attacks were evaluated, and the majority of the evaluation considers only the injected instructions, then injected data pattern discussed in Section 3 which was used to train the localizer. In particular, the evaluation cannot be reliable until a broad range of strong optimization-based attacks are evaluated.

At a minimum, these should evaluate adaptive attacks structured as in [1], which applies gradient-based optimization using GCG [2] and AutoDAN [3] on an objective of achieving attack success and evading detection, with the detection objective adapted to non-localization (e.g. minimizing the probability of detection by the classifier in 4.1 and, under partial detection, minimizing the coverage of the end localization step). These should further be extended by attacks which target the system's assumptions: first, that there is a continguous attack segment. Splitting or duplicating the instruction cores with benign text and targeting the localization mechanism should be evaluated similarly, as should attackers which target utility loss: in particular, by placing detected cores prior to critical benign text, optimized for deletion of the benign text by the end localization mechanism.

Furthermore, the motivation for the key techniques further needs to be substantially improved and should clearly explain the principles behind the presented approach.

[1] Choudhary et al. Through the Stealth Lens: Attention-Aware Defenses Against Poisoning in RAG. ICML 2026.

[2] Zou et al. Universal and Transferable Adversarial Attacks on Aligned Language Models. 2023.

[3] Liu et al. AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models. ICLR 2024.

Questions for authors

It is unclear whether the design for the localization is tied to the instruction-then-data assumption, in particular, does the attack core described in 4.1 correspond to instructions, and does the end localization capture the following injected data? Does the approach catch only certain structures of instructions then data (e.g. an operation and then the operand), or does it capture injected data unrelated to the instruction?

Is ActLoc robust to adaptive attacks as described above, in "Critical Weaknesses," across a range of hyperparameters including step count and Langrange multipliers between attack success and evasion objectives?

Is ActLoc robust to embedding-space variants of the above adaptive attacks? While stronger than a realistic attacker, evaluation of attacks in embedding-space rather than token-space would substantially strengthen the evidence that attack results are not due to the difficulty of discrete optimization.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.