atlas

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

RigorLLM: Resilient Guardrails for Large Language Models against Undesired Content

ICML 2024 · Large language models › Language, safety and interpretability · approach: Safety alignment of LLMs · 2 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.

Proposes RigorLLM, a guardrail for LLM input/output moderation that fuses probabilistic KNN over energy-based (Langevin) generated embeddings with a LlamaGuard-based LLM classifier, plus a minimax-optimized safe suffix and prompt augmentation.

Problem

LLM content moderation guardrails (OpenAI moderation, Perspective, NeMo Guardrails, LlamaGuard) generalize poorly to out-of-distribution harmful content and are vulnerable to jailbreak adversarial suffixes.

Approach

Combine a KNN classifier over embeddings augmented with energy-based Langevin-dynamics generated soft samples (constrained by similarity and fluency) with a fine-tuned LLM guard, add an optimized safe suffix (minimax GCG) and LLM-generated paraphrase/summary augmentations, and aggregate probabilities by weighted average.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use RigorLLM instead of the strongest baselineharmful-content moderation · ToxicChatAUPRC: 0.798 -> 0.869Helped
Use RigorLLM instead of the strongest baselineharmful-content moderation · ToxicChatF1: 0.609 -> 0.749Helped
Use RigorLLM instead of the strongest baselineharmful-content moderation · OpenAI Moderation DatasetF1: 0.765 -> 0.791Helped
Use RigorLLM instead of LlamaGuardmoderation under adversarial strings · AdvBench Harmful BehaviorHDRHelped
Add LlamaGuard aggregation (ablation)RigorLLM · OpenAI Moderation DatasetF1: 0.731 -> 0.791Helped
Add KNN aggregation (ablation)RigorLLM · AdvBench Harmful Behavior, GCG (U1)HDR: 0.81 -> 1.00Helped
Add prompt augmentation (ablation)RigorLLM · OpenAI Moderation DatasetF1: 0.723 -> 0.791Helped
Add safe suffix (ablation)RigorLLM · OpenAI Moderation DatasetF1: 0.784 -> 0.791Helped
Add safe suffix (ablation)RigorLLM · AdvBench Harmful Behavior, GCG (U1)HDR: 0.96 -> 1.00Helped
Remove LlamaGuard aggregation (ablation)RigorLLM · AdvBench Harmful Behavior, GCG (U1)HDR: 1.00 -> 1.00No clear effect
Remove prompt augmentation (ablation)RigorLLM · AdvBench Harmful Behavior, GCG (U1)HDR: 1.00 -> 1.00No clear effect
Increase the number of generated training examples (ablation)RigorLLM energy-based data generation · content moderationAUPRCHelped

Limitations

Experimental setup

Datasets: HEx-PHI HotpotQA MT-bench OpenAI Moderation Dataset ToxicChat AdvBench

Benchmarks: OpenAI Moderation Dataset ToxicChat AdvBench Harmful Behaviors with GCG and AutoDAN attacks

Metrics: AUPRC F1 HDR (harmful content detection rate)

Baselines: OpenAI API Perspective API NeMo Guardrails LlamaGuard Vicuna-7B

Builds on: GCG LlamaGuard energy-based models NeMo Guardrails

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