Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Instructional Segment Embedding: Improving LLM Safety with Instruction Hierarchy

About

Large Language Models (LLMs) are susceptible to security and safety threats, such as prompt injection, prompt extraction, and harmful requests. One major cause of these vulnerabilities is the lack of an instruction hierarchy. Modern LLM architectures treat all inputs equally, failing to distinguish between and prioritize various types of instructions, such as system messages, user prompts, and data. As a result, lower-priority user prompts may override more critical system instructions, including safety protocols. Existing approaches to achieving instruction hierarchy, such as delimiters and instruction-based training, do not address this issue at the architectural level. We introduce the Instructional Segment Embedding (ISE) technique, inspired by BERT, to modern large language models, which embeds instruction priority information directly into the model. This approach enables models to explicitly differentiate and prioritize various instruction types, significantly improving safety against malicious prompts that attempt to override priority rules. Our experiments on the Structured Query and Instruction Hierarchy benchmarks demonstrate an average robust accuracy increase of up to 15.75% and 18.68%, respectively. Furthermore, we observe an improvement in instruction-following capability of up to 4.1% evaluated on AlpacaEval. Overall, our approach offers a promising direction for enhancing the safety and effectiveness of LLM architectures.

Tong Wu, Shujian Zhang, Kaiqiang Song, Silei Xu, Sanqiang Zhao, Ravi Agrawal, Sathish Reddy Indurthi, Chong Xiang, Prateek Mittal, Wenxuan Zhou• 2024

Related benchmarks

TaskDatasetResultRank
Prompt Injection AttackTool-Completion (TCA)
ASR0.47
14
Structured Query Instruction FollowingStruQ clean
Capability74.81
8
Prompt Injection AttackTool-Completion Naive-e
ASR33
7
Prompt Injection AttackTool-Completion TCA-e
ASR81
7
Prompt InjectionGCG Clean
ASR38.46
4
Instruction Adherence and Security RobustnessStruQ Clean 1.0
Capability Score78.64
4
Instruction Adherence and Security RobustnessStruQ 1.0 (Adversarial)
Capability Score79.22
4
Tool CompletionTool-Completion Clean
Capability77.12
3
Tool CompletionTool-Completion Adv
Capability75.65
3
Showing 9 of 9 rows

Other info

Follow for update