La Jerarquía de Instrucciones: Entrenamiento de LLMs para Priorizar Instrucciones Privilegiadas
The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions
April 19, 2024
Autores: Eric Wallace, Kai Xiao, Reimar Leike, Lilian Weng, Johannes Heidecke, Alex Beutel
cs.AI
Resumen
Los LLM actuales son susceptibles a inyecciones de instrucciones, jailbreaks y otros ataques que permiten a los adversarios sobrescribir las instrucciones originales de un modelo con sus propios prompts maliciosos. En este trabajo, argumentamos que una de las principales vulnerabilidades subyacentes a estos ataques es que los LLM a menudo consideran que los prompts del sistema (por ejemplo, texto de un desarrollador de aplicaciones) tienen la misma prioridad que el texto de usuarios no confiables y terceros. Para abordar esto, proponemos una jerarquía de instrucciones que define explícitamente cómo deberían comportarse los modelos cuando las instrucciones de diferentes prioridades entran en conflicto. Luego, proponemos un método de generación de datos para demostrar este comportamiento de seguimiento jerárquico de instrucciones, que enseña a los LLM a ignorar selectivamente las instrucciones de menor privilegio. Aplicamos este método a GPT-3.5, mostrando que aumenta drásticamente la robustez —incluso para tipos de ataques no vistos durante el entrenamiento— mientras impone degradaciones mínimas en las capacidades estándar.
English
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.Summary
AI-Generated Summary