acceptodds
Under review as a conference paper at ICLR 2027

DepthGate: Depth-Aware Gated Steering for Instruction-Data Separation in LLMs

Abstract

Large language models often process trusted instructions that specify the task and untrusted data that supply task-relevant content within the same context. Prompt injection arises when adversarial instructions embedded in untrusted data override the trusted task. Instruction-data separation makes this role boundary explicit, but existing approaches enforce it through system-level controls or input-level role encoding, leaving its treatment during depth-wise model computation largely unspecified. We introduce DepthGate, a depth-aware framework that extends instruction-data separation from input formatting to hidden-state computation, carrying the trusted role boundary into depth-wise model computation. DepthGate achieves this through three complementary mechanisms. Role-Conditioned Steering introduces continuous role-aware gates to control the redirection of data representations, while keeping instruction representations unchanged and preserving the intrinsic geometry of data. Depth-Aware Paths organize these gates across model layers, providing model-specific control over where and how strongly the separation boundary is enforced during forward computation. Schedule Discovery further identifies steering schedules under schedule-matched adaptation and selects a model-specific schedule using held-out data before final post-training. Experiments across five Llama and Qwen models show that DepthGate consistently improves instruction-data separation, with its most consistent reductions in marked-data attack success. Different schedule variants further provide flexible robustness-utility trade-offs. On Qwen2.5 7B, the high-separation configuration raises the separation score from 51.0% to 92.1% and reduces StruQ-ID attack success from 72.4% to 11.9%.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
prompt injection, instruction-data separation, large language models, LLM safety, representation steering, hidden-state intervention, adversarial robustness, model security

Reviews

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

DepthGate extends instruction-data separation from input embeddings to intermediate Transformer layers through role-conditioned gated rotations. Schedule Discovery selects model-specific intervention schedules using held-out evaluation and matched adaptation. Experiments across five models demonstrate improved separation and generally reduced prompt-injection attack success rates.

Critical strengths

1 Multi-layer steering is a clear contribution. The results convincingly demonstrate improvements over embedding-only ASIDE in separation and resistance to many prompt-injection attacks. 2 Evaluation across five models and multiple direct and indirect attack benchmarks provides substantive evidence for the effectiveness of the overall approach.

Critical weaknesses

1 The independent contribution of Schedule Discovery is insufficiently isolated. Existing uniform-all-layer controls jointly change intervention placement, active-layer count, and cumulative gate strength. Comparisons with random and regularly spaced schedules under matched intervention and selection budgets are needed to establish whether the discovery heuristic contributes beyond multi-layer steering itself.

2 Retained ability to use task-relevant data is insufficiently evaluated. SEP Utility measures instruction-side probe success, while AlpacaEval contains no data field and leaves steering inactive. The indirect-injection benchmarks involve task-relevant data but report ASR without corresponding legitimate-task performance. These evaluations therefore do not adequately establish whether active steering preserves accurate use of data while rejecting embedded instructions, leaving the robustness–utility trade-off relative to ASIDE unresolved.

3 Key ablations have limited cross-model coverage. Although the main results cover five models, the uniform-gate, schedule-matching, and role-conditioning controls primarily use Qwen2.5 7B. Complete-system results do not establish that individual design choices have comparable effects across model families. This is a secondary concern.

Questions for authors

Do discovered schedules outperform random and regularly spaced alternatives with matched active-layer counts, gate values, and adaptation budgets? How does DepthGate compare with ASIDE on legitimate-task success for paired clean and attacked data-dependent tasks? Do the key ablation conclusions hold on latest model (qwen3/qwen3.5/qwen3.8 or others published in last six month)?

1 comment
Reviewer_uuAzOpenReview ↗

Response to rebuttal

  1. The experiments author added solved part of my concerns.

  2. However, the experiments showing that its not a pareto frontier of existing similar methods(aka ASIDES), it seems like it use a more complicate and delicate methods and some utiltiy to exchange for a safety improvement. for asr and clean task successful rate, its not a big improvments compared with existing model.

  3. I would like to raise my rating to 2.5. Considering there is only 4 rating scale, I lean to maintain my rating decision.

Reviewer_kVhXOpenReview ↗
Rating
4
Confidence
4
Informativeness
3
Presentation
3
Soundness
3
Read review
Paper summary

This paper proposes DepthGate, a method for enforcing instruction-data separation at every layer of model computations (vs previous embedding approaches). The method consists of three parts.

First, there are special blocks called role-aware gates that move data representations away from instruction representations by rotation. There are such blocks on every layer, however, the angle to which to rotate is not fixed.

Second, there is a module that determines for each model how strongly to rotate each layer.

Finally, there is a module that is responsible for scheduling interventions, i.e., it determines when to fire role-aware gates, and when they stay dormant.

Across five models, proposed method substantially increases instruction-data separation and reduces attack success rate (on 2 benches).

Critical strengths

This paper proposed first mature method for enforcing instruction-data separation. Previous methods like ISE and ASIDE were proof-of-concepts, essentially showing that architectural instruction-data separation is possible, providing MVP of the solution and leaving better solution to the future work. This is such a solution. Whereas previous work applied short linear shift or rotation at the level of embedding, in this work, a rotation of variable non-fixed angles is applied to data representation at every level. Then there's a scheduling layer that determines which layer, at which computational step, and to what extent to rotate. Overall mechanism balances being elegant and easy to understand with being effective in instruction-data separation and attack success rate reduction.

I believe instruction-data separation is a cool research agenda, and any research in that direction is meaningful. This paper is a major step for the sub-field. The solution is also highly untrivial. I remember when ASIDE came out, I got excited and tried for a few weeks to come up with better method using 90-degrees rotations at different model levels, and failed. The idea with variable angle rotations (that are also scheduled and not fixed per layer) is likely the key to this method's success, and the implementation is not trivial.

The paper's language is clear to follow and diagrams are well-illustrated. The paper uses a bit of formalism, which in this case is actually helpful to determine precisely what the method does.

Critical weaknesses

In my opinion, there're no weaknesses that justify rejection.

Of course, the paper would be stronger if there were a few more benchmarks (it used 10 benchmarks used in ASIDE, which is quite decent already), or more model families, etc. But that is not a reason to reject a good work. Some models are from older generations, but this might also be a result of a strong paper being resubmitted, the models are recent enough not to raise any concerns.

Questions for authors

There is only one clarification that can change the score:

Can you confirm you didn't use any safety-training when training DepthGate, making it fair comparison with ASIDE and ISE?


Out of curiousity, what are average angles of rotation per layer?

Out of curiosity, how did you come up with scheduler idea? How would the method perform without scheduling, just trying to find fixed angles per level (if you've tried that).

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

DepthGate rotates the hidden states of tokens marked as data at selected model layers. It chooses the layers and rotation angles using held-out examples and short LoRA training runs, then keeps this schedule fixed during final training and inference. Experiments on five Llama and Qwen models report better instruction-data separation and lower prompt-injection success.

Critical strengths
  • DepthGate improves over ASIDE when both use the same training setup. On Qwen2.5 7B, Continuous raises SEP from 67.4% to 92.1% and reduces StruQ-ID attack success from 31.3% to 11.9%. On Qwen3 8B, StruQ-ID attack success falls from 20.9% to 3.0% (Tables 1–2).
  • The rotations preserve the geometry among data-token states at each intervention. They preserve norms and pairwise inner products without learning a rotation matrix. The selected layers and angles stay fixed at inference.
  • The ablations show benefits from applying rotations at several layers and including them during training. On Qwen2.5 7B, Continuous reaches 92.1% SEP versus 80.3% for the layer-10 control, while SEP Utility falls from 58.8% to 56.7% (Table 3). Table 4 also shows that inserting the rotations only after training sharply reduces utility.
Critical weaknesses
  • The paper needs to show what its selected layer schedule adds beyond simpler rotations. ASIDE [1] already uses the same rotation family and tests different input angles. CachePrune [2] edits internal representations of untrusted context, while AIR [3] adds privilege embeddings throughout the decoder. DepthGate’s contribution is selecting rotation sites and angles with training that uses the same schedule. Table 3 shows a gain over layer 10, but does not explain whether the input-only and single-layer controls received comparable tuning. Equation 2 also does not establish that ASIDE loses role separation through depth.
  • The reported scores do not show whether DepthGate correctly completes tasks that depend on the marked data. AlpacaEval runs with rotations inactive. SEP Utility measures whether the model follows an instruction-side probe, and Table 1 reports attack success without original-task correctness. These scores cannot distinguish using the data correctly from ignoring it. SecFid [4] tests this distinction. General utility also declines: on Llama 2 13B, ASIDE to Continuous reduces SEP Utility from 57.1% to 50.2% and AlpacaEval from 68.8% to 60.8% (Table 2).
  • The paper does not explain whether the attacks were adapted to the final DepthGate model. Table 10 lists four StruQ attacks without naming them or stating whether they were reoptimized against the trained model and fixed rotations. The evaluation also lacks a comparison with SecAlign [5] on a common backbone; Meta SecAlign [6] provides another public baseline.
  • Table 5’s numbers do not agree under the stated metric definitions. Continuous reports 56.7% instruction-side probe success, 5.5% data-side probe success, and 56.0% exact-response agreement. If these columns use the same paired responses, probe checker, and weights, at least 51.2% of pairs must differ in probe outcome. At most 48.8% can therefore have identical responses. Rounding cannot explain the reported 56.0%. The authors should clarify whether this is a table error or a difference in how the metrics were computed.

[1] Egor Zverev et al. ASIDE: Architectural Separation of Instructions and Data in Language Models. ICLR 2026.

[2] Rui Wang et al. CachePrune: Teaching LLMs What Not to Follow via KV-Cache Editing. ACL 2026.

[3] Sanjay Kariyappa and G. Edward Suh. Stronger Enforcement of Instruction Hierarchy via Augmented Intermediate Representations. arXiv:2505.18907v2, March 9, 2026.

[4] Mitchell Hermon, Rahul Gupta, Weitong Ruan, Ekraam Sabir, and Haohan Wang. Security–Fidelity Tradeoffs: The Hidden Cost of Prompt Injection Defense. ICML 2026.

[5] Sizhe Chen et al. SecAlign: Defending Against Prompt Injection with Preference Optimization. ACM CCS 2025.

[6] Sizhe Chen, Arman Zharmagambetov, David Wagner, and Chuan Guo. Meta SecAlign: A Secure Foundation LLM Against Prompt Injection Attacks. arXiv:2507.02735v3, February 6, 2026.

Questions for authors
  1. How were the rotation angles and layers chosen for the input-only and single-layer controls? Did they receive a validation budget comparable to DepthGate’s schedule search? Which results isolate the benefit of using several layers?
  2. Which results show correct task completion while the rotations are active? Please distinguish using the data correctly from ignoring it, through task accuracy on clean and attacked inputs or a public benchmark such as SecFid.
  3. Which four StruQ attacks were used, and were they reoptimized against the final DepthGate model? Please state the attacker’s access and budget, keeping trusted role labels fixed. Are same-backbone SecAlign comparisons or results on newer public models released before submission available?
  4. Can you reconcile Table 5’s 56.7%, 5.5%, and 56.0% values? Do they use the same paired generations, probe checker, denominators, and weights? Is any correction limited to the table, or does it affect the agreement metric used for schedule selection in Eqs. 9 and 11?

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.