HackerPapers

arXiv:2404.13208cs.CR

The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions

Eric Wallace, Kai Xiao, Reimar Leike, Lilian Weng, Johannes Heidecke, Alex Beutel

Abstract

Today's LLMs are susceptible to prompt injections, jailbreaks, and other attacks that allow adversaries to overwrite a model's original instructions with their own malicious prompts. In this work, we argue that one of the primary vulnerabilities underlying these attacks is that LLMs often consider system prompts (e.g., text from an application developer) to be the same priority as text from untrusted users and third parties. To address this, we propose an instruction hierarchy that explicitly defines how models should behave when instructions of different priorities conflict. We then propose a data generation method to demonstrate this hierarchical instruction following behavior, which teaches LLMs to selectively ignore lower-privileged instructions. We apply this method to GPT-3.5, showing that it drastically increases robustness -- even for attack types not seen during training -- while imposing minimal degradations on standard capabilities.

arXiv comments
Journal reference
DOI
Subjects
cs.CRCryptography and Security cs.CLComputation and Language cs.LGMachine Learning

On Hacker News

Linked by 3 identifiable commenters in 3 comments across 3 threads, from Aug 2024 to Jun 2026. Found in 5 HN submissions from Apr 2024 to Jul 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments3 threads

    • I believe they are trained for security now, but you're not wrong in that it's kind of stapled on top https://arxiv.org/abs/2404.13208

      x312View on HNParent context

    • Sadly, these ideas have been explored before, e.g.: https://simonwillison.net/2022/Sep/17/prompt-injection-more-... Also, OpenAI has proposed ways of training LLMs to trust tool outputs less than User instructions (https://arxiv.org/pdf/2404.13208). That also doesn't work…

      marcfiscView on HNParent context

    • I've been seeing these types of things a lot lately. There's been some work done recently to prevent this concept of instructional overrides though, so I don't think they're nearly as effective as they used to be. https://arxiv.org/abs/2404.13208

      vunderbaView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.