Skip to content

Instruction Hierarchy: Training Large Language Models to Prioritize Privileged Instructions

The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions

arXiv· arXiv:2404.13208· Eric Wallace, Kai Xiao, Reimar Leike, Lilian Weng, Johannes Heidecke, Alex BeutelOpenAIIndexed by this site · 16 days ago· Originally publishedSelected DefensesSelectedAttention40

Translation in progress — untranslated text is omitted.

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

AI summaryOpenAI researchers propose an instruction hierarchy training method that makes large language models, when instructions conflict, prioritize following system prompts first, then user messages, and finally third-party content, in order to defend against prompt injection, jailbreak, and system prompt extraction attacks. The method combines synthetic data generation with context distillation: aligned lower-privilege instructions train the model to follow them as usual, misaligned instructions train the model to ignore or refuse them, and an automated red-team model is used to generate injection data, with supervised fine-tuning and RLHF on GPT-3.5 Turbo. Evaluations show improved robustness across all attack scenarios, with a 63% improvement in system prompt extraction defense; the training data deliberately contains no jailbreak samples, yet the model's robustness to unseen attacks such as jailbreaks still improves by over 30%, and general capabilities are largely unaffected, but there is regression on two over-refusal evaluations.

Questions
LLMs often treat system prompts and untrusted user or third-party input as having equal priority, allowing attacks such as prompt injection, jailbreaks, and system prompt extraction to override the original instructions, threatening LLM-based agent applications.
Methods
The authors propose an instruction hierarchy: system messages take precedence over user messages, and user messages take precedence over third-party content. They use context synthesis to handle aligned instructions and context ignorance to handle conflicting instructions to generate training data, and perform SFT and RLHF on GPT-3.5 Turbo.
Experiments and results
The authors report that after training the model's robustness improves on all main evaluations, with system prompt extraction defense improving by 63%; there is also generalization to attacks deliberately held out during training (jailbreak, tool injection, password extraction), with improvements up to 34%; over-refusal is close to baseline on most evaluations, with declines on two adversarial evaluations.
Limitations and future work
The authors note that the current model uniformly ignores instructions in browsing and tools, handles only the text modality, and may still be vulnerable to strong adversarial attacks, and list these as future directions; the experiments were conducted only on GPT-3.5 Turbo, and the paper does not report the sample size or number of repetitions for each evaluation.
Why it was selectedThe paper proposes the instruction hierarchy training method and provides details of the data construction, validating on GPT-3.5 Turbo improved robustness against attacks such as prompt injection.

The paper proposes the instruction hierarchy training method and provides details of the data construction, validating on GPT-3.5 Turbo improved robustness against attacks such as prompt injection.

Related events and news

0 events · 4 news mentions

News that mentions this paper

Show 1 more news items

Related papers

Read originalarxiv.org