Skip to main content
QUICK REVIEW

[Paper Review] Red-Teaming Large Language Models using Chain of Utterances for Safety-Alignment

Rishabh Bhardwaj, Soujanya Poria|arXiv (Cornell University)|Aug 18, 2023
Topic ModelingComputer Science16 citations
TL;DR

The paper introduces Red-Eval for red-teaming LLMs with Chain of Utterances prompts, and Red-Instruct to safely align models (Starling) using HarmfulQA data to improve safety with minimal loss in utility.

ABSTRACT

Larger language models (LLMs) have taken the world by storm with their massive multi-tasking capabilities simply by optimizing over a next-word prediction objective. With the emergence of their properties and encoded knowledge, the risk of LLMs producing harmful outputs increases, making them unfit for scalable deployment for the public. In this work, we propose a new safety evaluation benchmark RED-EVAL that carries out red-teaming. We show that even widely deployed models are susceptible to the Chain of Utterances-based (CoU) prompting, jailbreaking closed source LLM-based systems such as GPT-4 and ChatGPT to unethically respond to more than 65% and 73% of harmful queries. We also demonstrate the consistency of the RED-EVAL across 8 open-source LLMs in generating harmful responses in more than 86% of the red-teaming attempts. Next, we propose RED-INSTRUCT--An approach for the safety alignment of LLMs. It constitutes two phases: 1) HARMFULQA data collection: Leveraging CoU prompting, we collect a dataset that consists of 1.9K harmful questions covering a wide range of topics, 9.5K safe and 7.3K harmful conversations from ChatGPT; 2) SAFE-ALIGN: We demonstrate how the conversational dataset can be used for the safety alignment of LLMs by minimizing the negative log-likelihood over helpful responses and penalizing over harmful responses by gradient accent over sample loss. Our model STARLING, a fine-tuned Vicuna-7B, is observed to be more safely aligned when evaluated on RED-EVAL and HHH benchmarks while preserving the utility of the baseline models (TruthfulQA, MMLU, and BBH).

Motivation & Objective

  • Develop a safety evaluation benchmark (Red-Eval) to test LLM vulnerability to harmful prompts via Chain of Utterances (CoU).
  • Demonstrate the effectiveness of CoU-based jailbreaks on deployed closed-source and open-source LLMs.
  • Propose Red-Instruct data collection (HarmfulQA) and Safe-Align strategies to improve safety without sacrificing utility.

Proposed method

  • Red-Eval uses a CoU-based jailbreak prompt that pits Red-LM against a Base-LM to elicit harmful responses to harmful questions.
  • Evaluate attack success rate (ASR) on both closed-source (GPT-4, ChatGPT) and open-source models using 200/1,960 harmful questions and GPT-4/ChatGPT as judge.
  • Construct HarmfulQA by generating blue (harmless) and red (harmful) conversations via ChatGPT with CoU prompts, yielding 1,960 harmful questions and 9,536 blue plus 7,356 red conversations.
  • Red-Instruct comprises two phases: HarmfulQA data generation and Safe-Align fine-tuning of Vicuna-7B to Starling using two strategies (Strategy-A blue-data only; Strategy-B blue+red data with controlled red-data influence).
  • Train Starling with mixtures of blue/red data and provided data from ShareGPT to preserve utility.
Figure 1: Methodology depiction of Red-Instruct . Phase-1 construct HarmfulQA with harmful questions and corresponding harmless responses by CoU-based prompting, and harmful responses using CoU-based Red-teaming (proposed as a part of our Red-Eval safety benchmark). In phase-2, we utilize HarmfulQA
Figure 1: Methodology depiction of Red-Instruct . Phase-1 construct HarmfulQA with harmful questions and corresponding harmless responses by CoU-based prompting, and harmful responses using CoU-based Red-teaming (proposed as a part of our Red-Eval safety benchmark). In phase-2, we utilize HarmfulQA

Experimental results

Research questions

  • RQ1How effective is CoU-based prompting at breaking guardrails of both open-source and closed-source LLMs?
  • RQ2Can HarmfulQA-derived blue/red data be used to align LLMs toward safer or harmless behavior while preserving usefulness?
  • RQ3What are the relative impacts of safety-alignment strategies that use blue data alone versus blue+red data on model safety and utility?

Key findings

  • Red-Eval achieves about 69% attack success on GPT-4 and ChatGPT, and over 86% ASR on eight open-source models, with notable improvements over CoT baselines.
  • CoU prompts significantly outperform Standard and CoT prompts for red-teaming open-source models (≈86% ASR vs. ≈47% with CoT).
  • Red-Instruct/HarmfulQA enables Starling (Vicuna-7B) to be safer while preserving utility on benchmarks like TruthfulQA, MMLU, and BBH.
  • Two Safe-Align strategies were explored: Strategy-A (blue data only) and Strategy-B (blue+red data, with gradient-based guidance away from red responses).
  • Starling (blue) shows improved safety alignment relative to Vicuna-7B, and Starling (blue-red) demonstrates further safety trade-offs due to training dynamics.
Figure 2: Jailbreak prompt template used in Red-Eval . Yellow and cyan colored are placeholders for a harmful query and response (as text completion) to be generated by LLM, respectively. The rest of the text is a part of the CoU-based prompt. $<$ c $>$ denotes the clipped text.
Figure 2: Jailbreak prompt template used in Red-Eval . Yellow and cyan colored are placeholders for a harmful query and response (as text completion) to be generated by LLM, respectively. The rest of the text is a part of the CoU-based prompt. $<$ c $>$ denotes the clipped text.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.