paper-with-me

홈 › Papers

PrimeGuard: Safe and Helpful LLMs through Tuning-Free Routing

2024-07-23 · Blazej Manczak, Eliott Zemour, Eric Lin, Vaikkunth Mugunthan

Deploying language models (LMs) necessitates outputs to be both high-quality and compliant with safety guidelines. Although Inference-Time Guardrails (ITG) offer solutions that shift model output distributions towards compliance, we find that current methods struggle in balancing safety with helpfulness. ITG Methods that safely address non-compliant queries exhibit lower helpfulness while those that prioritize helpfulness compromise on safety. We refer to this trade-off as the guardrail tax, analogous to the alignment tax. To address this, we propose PrimeGuard, a novel ITG method that utilizes structured control flow. PrimeGuard routes requests to different self-instantiations of the LM with varying instructions, leveraging its inherent instruction-following capabilities and in-context learning. Our tuning-free approach dynamically compiles system-designer guidelines for each query. We construct and release safe-eval, a diverse red-team safety benchmark. Extensive evaluations demonstrate that PrimeGuard, without fine-tuning, overcomes the guardrail tax by (1) significantly increasing resistance to iterative jailbreak attacks and (2) achieving state-of-the-art results in safety guardrailing while (3) matching helpfulness scores of alignment-tuned models. Extensive evaluations demonstrate that PrimeGuard, without fine-tuning, outperforms all competing baselines and overcomes the guardrail tax by improving the fraction of safe responses from 61% to 97% and increasing average helpfulness scores from 4.17 to 4.29 on the largest models, while reducing attack success rate from 100% to 8%. PrimeGuard implementation is available at https://github.com/dynamofl/PrimeGuard and safe-eval dataset is available at https://huggingface.co/datasets/dynamoai/safe_eval.

📄 PDF Abstract BibTeX arXiv:2407.16318

Code (1)

dynamofl/primeguard 공식 구현

Tasks

In-Context LearningInstruction Following

Similar Papers 제목 키워드 기반

Equilibrate RLHF: Towards Balancing Helpfulness-Safety Trade-off in Large Language Models

2025-02-17 · Yingshui Tan, Yilei Jiang, Yanshi Li, Jiaheng Liu 외

Fine-tuning large language models (LLMs) based on human preferences, commonly achieved through reinforcement learning from human feedback (RLHF), has been effective in improving their performance. However, maintaining LL…

Safety Alignment

Bi-Factorial Preference Optimization: Balancing Safety-Helpfulness in Language Models

2024-08-27 · Wenxuan Zhang, Philip H. S. Torr, Mohamed Elhoseiny, Adel Bibi

Fine-tuning large language models (LLMs) on human preferences, typically through reinforcement learning from human feedback (RLHF), has proven successful in enhancing their capabilities. However, ensuring the safety of L…

Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructions

2023-09-14 · Federico Bianchi, Mirac Suzgun, Giuseppe Attanasio, Paul Röttger 외

Training large language models to follow instructions makes them perform better on a wide range of tasks and generally become more helpful. However, a perfectly helpful model will follow even the most malicious instructi…

Safe RLHF: Safe Reinforcement Learning from Human Feedback

2023-10-19 · Josef Dai, Xuehai Pan, Ruiyang Sun, Jiaming Ji 외

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 …

reinforcement-learningReinforcement LearningSafe Reinforcement Learning

Towards Safety and Helpfulness Balanced Responses via Controllable Large Language Models

2024-04-01 · Yi-Lin Tuan, Xilun Chen, Eric Michael Smith, Louis Martin 외

As large language models (LLMs) become easily accessible nowadays, the trade-off between safety and helpfulness can significantly impact user experience. A model that prioritizes safety will cause users to feel less enga…