Skip to main content
QUICK REVIEW

[Paper Review] OR-Bench: An Over-Refusal Benchmark for Large Language Models

Justin Cui, Wei-Lin Chiang|arXiv (Cornell University)|May 31, 2024
Natural Language Processing TechniquesComputer Science7 citations
TL;DR

OR-Bench automatic generates 80,000 seemingly toxic prompts to measure over-refusal in 25 LLMs across 8 families, plus a hard 1K subset and 600 toxic prompts for robust safety testing.

ABSTRACT

Large Language Models (LLMs) require careful safety alignment to prevent malicious outputs. While significant research focuses on mitigating harmful content generation, the enhanced safety often come with the side effect of over-refusal, where LLMs may reject innocuous prompts and become less helpful. Although the issue of over-refusal has been empirically observed, a systematic measurement is challenging due to the difficulty of crafting prompts that can elicit the over-refusal behaviors of LLMs. This study proposes a novel method for automatically generating large-scale over-refusal datasets. Leveraging this technique, we introduce OR-Bench, the first large-scale over-refusal benchmark. OR-Bench comprises 80,000 over-refusal prompts across 10 common rejection categories, a subset of around 1,000 hard prompts that are challenging even for state-of-the-art LLMs, and an additional 600 toxic prompts to prevent indiscriminate responses. We then conduct a comprehensive study to measure the over-refusal of 32 popular LLMs across 8 model families. Our datasets are publicly available at https://huggingface.co/bench-llms and our codebase is open-sourced at https://github.com/justincui03/or-bench. We hope this benchmark can help the community develop better safety aligned models.

Motivation & Objective

  • Motivate and quantify the over-refusal phenomenon in LLMs driven by safety alignment.
  • Create a scalable pipeline to generate benign prompts that appear harmful.
  • Provide a large benchmark (OR-Bench-80K) and a harder subset (Hard-1K) for comprehensive evaluation.
  • Offer datasets and tools to help the community improve safety-aligned yet helpful LLM behavior.

Proposed method

  • Automatically generate seemingly toxic prompts by starting from toxic seeds and rewriting them into benign-looking prompts.
  • Use a three-stage pipeline: toxic seed generation, prompt rewriting with few-shot prompts, and moderator-based filtering.
  • Employ a model ensemble moderator (GPT-4-turbo, Llama-3-70B, Gemini-1.5-pro) with a veto by a safety-shifted model (Mistral-7B-Instruct) for safe labeling.
  • Construct OR-Bench-80K across 10 categories plus OR-Bench-Hard-1K and OR-Bench-Toxic subsets.
  • Evaluate 25 models from 8 families via keyword-based rejection detection and LLM-based evaluation for tougher cases.
Figure 1: Seemingly toxic prompts rejection rate vs toxic prompts rejection rate on OR-Bench-Hard-1K and OR-Bench-Toxic. Results are measured with temperature 0.0. The best performing models should be on the upper left corner where the model rejects the least number of safe prompts and the most numb
Figure 1: Seemingly toxic prompts rejection rate vs toxic prompts rejection rate on OR-Bench-Hard-1K and OR-Bench-Toxic. Results are measured with temperature 0.0. The best performing models should be on the upper left corner where the model rejects the least number of safe prompts and the most numb

Experimental results

Research questions

  • RQ1How prevalent is over-refusal across diverse LLM families when safety measures are strictly enforced?
  • RQ2Can we automatically generate large-scale seemingly toxic prompts that reliably test over-refusal without being actual toxic prompts?
  • RQ3What are the trade-offs between safety (toxic prompt rejection) and over-refusal (benign prompt rejection) across model families?
  • RQ4How do different model architectures and release generations compare in this safety-utility balance?

Key findings

  • There is a strong correlation between safety and over-refusal; models rejecting more toxic prompts tend to reject more safe prompts (Spearman 0.878).
  • GPT-3.5-turbo shows substantial early over-refusal that diminishes in later versions, with trade-offs in toxic prompt rejection.
  • Claude models achieve high safety but also high over-refusal, while Mistral models tend to reject fewer prompts overall.
  • Llama-3 and Gemini families show varying safety-over-refusal patterns, with newer Gemini versions becoming both safer and less prone to over-refusal.
  • The OR-Bench-Hard-1K subset demonstrates that many models, despite safety gains, still struggle with certain categories (e.g., illegal or privacy-related prompts).
Figure 2: Overall creation process for the contributed datasets. We use Mixtral 8*7B as the toxic prompt generator and prompt rewritter and model ensemble (GPT-4-turbo-2024-04-09, Llama-3-70b, Gemini-1.5-pro) as the prompt moderator. See section 3 on how the design choices are made.
Figure 2: Overall creation process for the contributed datasets. We use Mixtral 8*7B as the toxic prompt generator and prompt rewritter and model ensemble (GPT-4-turbo-2024-04-09, Llama-3-70b, Gemini-1.5-pro) as the prompt moderator. See section 3 on how the design choices are made.

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.