atlas

Research map / Large language models / Language, safety and interpretability

Instructional Segment Embedding: Improving LLM Safety with Instruction Hierarchy

ICLR 2025 · Large language models › Language, safety and interpretability · approach: Safety alignment of LLMs · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Instructional Segment Embedding (ISE), a learned segment-type embedding added to token embeddings that tags system, user, data, and output tokens so LLMs can distinguish instruction priority, trained via SFT on Llama models.

Problem

LLMs treat all input tokens equally and lack an architectural mechanism to distinguish and prioritize instruction types (system, user, data), making them vulnerable to prompt injection, prompt extraction, and harmful requests.

Approach

Add a BERT-style learned segment embedding, with one vector per instruction role (system, user, data, output), summed with token and positional embeddings, so instruction priority is encoded at the architecture/embedding level rather than only via delimiters or instruction-tuning data.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add ISELlama-2-13B trained on Clean Alpaca · Structured Query, in-domain indirect prompt injectionaverage robust accuracy: 50.84 -> 66.35; 15.75%Helped
Add ISELlama-2-13B trained on Clean Alpaca · Structured Query, out-of-domain indirect prompt injectionaverage robust accuracy: 47.12 -> 61.06; ∼10%Helped
Add ISELlama-2-13B trained on Adversarial Alpaca · Structured Query, out-of-domain indirect prompt injectionaverage robust accuracy: 80.53 -> 90.26; ∼7%Helped
Add ISELlama-3-8B trained on Instruction Hierarchy · AlpacaEvalwin rate: ∼4.1%Helped
Add ISELlama-3-8B across Instruction Hierarchy training datasets · Instruction Hierarchy, prompt extractionaverage robust accuracy: at least 10%Helped
Add ISELlama-3-8B trained on UltraChat Baseline · Instruction Hierarchy, direct prompt injection, in-domainaverage robust accuracy: 47.3% -> 69.9%Helped
Add ISELlama-3-8B trained on UltraChat Baseline · Instruction Hierarchy, Completion Real prompt injectionrobust accuracy: approximately 30% to 50%Helped
Add ISELlama-3-8B trained on UltraChat Baseline · Instruction Hierarchy, harmful requestsrobust accuracy: up to 18%Helped
Add ISELlama-3-8B trained on UltraChat Baseline · WildChat over-refusal evaluationcompliance rate: about 10%Helped
Add ISELlama-3.1-8B trained on UltraChat Baseline · AlpacaEvalwin rate: approximately 10%Helped
Use ISE with special token delimiters instead of ISE alone (ablation)Llama-2-13B on Structured Query · Structured Query, Adversarial Alpaca, indirect prompt injectionaverage robust accuracy: 94.60 -> 99.83Helped
Omit the system prompt (ablation)ISE models on Instruction Hierarchy · AlpacaEvalwin rate: < 5%Hurt

Surprising findings

Limitations

Experimental setup

Datasets: Alpaca-Cleaned-50K UltraChat-200K SystemChat SystemMessage ShareGPT Unnatural Instructions WildChat Jailbreakchat DAN StrongREJECT

Benchmarks: Structured Query Instruction Hierarchy AlpacaEval 1.0 MT-Bench WildChat over-refusal

Metrics: robust accuracy average robustness worst robustness win rate MT-Bench score compliance rate

Baselines: Baseline (no ISE) Delimiter (StruQ) Llama-3-Instruct default template

Builds on: BERT segment embeddings StruQ instruction hierarchy SFT

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy