RLHF Seguro: Aprendizaje por Refuerzo Seguro a partir de Retroalimentación Humana
Safe RLHF: Safe Reinforcement Learning from Human Feedback
October 19, 2023
Autores: Josef Dai, Xuehai Pan, Ruiyang Sun, Jiaming Ji, Xinbo Xu, Mickel Liu, Yizhou Wang, Yaodong Yang
cs.AI
Resumen
Con el desarrollo de los modelos de lenguaje de gran escala (LLMs, por sus siglas en inglés), lograr un equilibrio entre el rendimiento y la seguridad de los sistemas de IA nunca ha sido más crucial. Sin embargo, la tensión inherente entre los objetivos de utilidad y seguridad representa un desafío significativo durante el entrenamiento de los LLMs. Para abordar este problema, proponemos el Aprendizaje por Refuerzo Seguro a partir de Retroalimentación Humana (Safe RLHF, por sus siglas en inglés), un algoritmo novedoso para la alineación de valores humanos. Safe RLHF desacopla explícitamente las preferencias humanas en cuanto a utilidad y seguridad, evitando eficazmente la confusión de los trabajadores sobre esta tensión y permitiéndonos entrenar modelos de recompensa y costo por separado. Formalizamos la preocupación por la seguridad de los LLMs como una tarea de optimización que maximiza la función de recompensa mientras satisface restricciones de costo específicas. Al aprovechar el método Lagrangiano para resolver este problema restringido, Safe RLHF ajusta dinámicamente el equilibrio entre los dos objetivos durante el ajuste fino. Mediante un ajuste fino en tres rondas utilizando Safe RLHF, demostramos una capacidad superior para mitigar respuestas dañinas mientras mejoramos el rendimiento del modelo en comparación con los algoritmos existentes de alineación de valores. Experimentalmente, ajustamos el modelo Alpaca-7B utilizando Safe RLHF y lo alineamos con las preferencias humanas recopiladas, mejorando significativamente su utilidad y seguridad según las evaluaciones humanas.
English
With the development of large language models (LLMs), striking a balance
between the performance and safety of AI systems has never been more critical.
However, the inherent tension between the objectives of helpfulness and
harmlessness presents a significant challenge during LLM training. To address
this issue, we propose Safe Reinforcement Learning from Human Feedback (Safe
RLHF), a novel algorithm for human value alignment. Safe RLHF explicitly
decouples human preferences regarding helpfulness and harmlessness, effectively
avoiding the crowdworkers' confusion about the tension and allowing us to train
separate reward and cost models. We formalize the safety concern of LLMs as an
optimization task of maximizing the reward function while satisfying specified
cost constraints. Leveraging the Lagrangian method to solve this constrained
problem, Safe RLHF dynamically adjusts the balance between the two objectives
during fine-tuning. Through a three-round fine-tuning using Safe RLHF, we
demonstrate a superior ability to mitigate harmful responses while enhancing
model performance compared to existing value-aligned algorithms.
Experimentally, we fine-tuned the Alpaca-7B using Safe RLHF and aligned it with
collected human preferences, significantly improving its helpfulness and
harmlessness according to human evaluations.