atlas

Research map / Large language models / Language, safety and interpretability

SG-Bench: Evaluating LLM Safety Generalization Across Diverse Tasks and Prompt Types

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: Safety alignment of LLMs · 13 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces SG-Bench, a safety benchmark that jointly tests LLM safety on generative and discriminative tasks (open-ended generation, multiple-choice, safety judgment) under jailbreak and prompt-engineering variants, finding poor cross-task and cross-prompt safety generalization.

Problem

Existing LLM safety benchmarks evaluate only generative or only discriminative safety and ignore how common prompting techniques (system prompts, few-shot demonstrations, chain-of-thought) affect safety, so safety generalization across tasks and prompt types is unmeasured.

Approach

Combine generation and discrimination evaluation subsets built from the same 1,442 malicious queries, and extend them with jailbreak templates and prompt-engineering variants (role/task-oriented system prompts, few-shot, CoT) to measure safety generalization; analyze failures with attention-by-gradient and embedding-distance analyses.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Switch from original queries to discrimination tasks (multiple-choice and safety judgments)safety-aligned LLMs · SG-BenchFailure RateHurt
Add role-oriented prompt (ablation)LLMs · Jailbreak AttackFailure RateHelped
Add task-oriented prompt (ablation)LLMs · Jailbreak AttackFailure RateMixed
Add few-shot demonstrations (ablation)LLMs · Jailbreak AttackFailure RateHurt
Add few-shot demonstrations (ablation)LLMs · Multiple-choice Questions and Safety judgmentsFailure RateHelped
Add chain-of-thought prompting (ablation)claude-3-haiku-20240307 · Multiple-choice QuestionsFailure Rate: 4.30 -> 13.87Hurt
Add chain-of-thought prompting (ablation)InternLM2-7B-Chat · Safety judgmentsFailure Rate: +17.33Hurt
Increase model size from 7B to 13BLLAMA2-Chat · SG-Bench averageAvg FR: 23.73 -> 18.21Helped
Use AutoDAN instead of SG-Bench-6 jailbreaks (ablation)LLAMA2-7B-Chat and Qwen1.5-7B-Chat · Jailbreak AttackFailure Rate: 11.75 -> 33.29; 39.35 -> 81.38Hurt
Use GCG instead of SG-Bench-6 jailbreaks (ablation)LLAMA2-7B-Chat and Qwen1.5-7B-Chat · Jailbreak AttackFailure Rate: 11.75 -> 2.67; 39.35 -> 10.11Helped

Surprising findings

Limitations

Experimental setup

Datasets: AdvBench HarmfulQA Beaver-eval SaladBench alpaca

Benchmarks: SG-Bench

Metrics: failure rate average failure rate

Baselines: SaladBench SafetyBench DecodingTrust EasyJailbreak Jailbroken

Builds on: AdvBench HarmfulQA Beaver-eval SaladBench PromptBench

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy