atlas

Research map / Large language models / Retrieval and knowledge

HarmAug: Effective Data Augmentation for Knowledge Distillation of Safety Guard Models

ICLR 2025 · Large language models › Retrieval and knowledge · approach: Knowledge-augmented question answering · 0 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.

Distills a Llama-Guard-3 teacher into a 435M DeBERTa-v3-large safety guard using HarmAug, a prefix-attack data augmentation that elicits harmful instructions from a jailbroken LLM.

Problem

Large safety guard models (7B+) are too costly in memory and latency to deploy alongside LLMs on mobile devices or for red-teaming, and naive distillation on limited harmful instruction data yields underperforming small students.

Approach

Prefill an affirmative prefix ("I have an idea for a prompt:") in the LLM's response after a few-shot harmful-instruction prompt so the safety-aligned LLM continues generating harmful instructions; generate harmful and refusal responses, label with the teacher, and distill into a small encoder.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add HarmAug-generated data to DeBERTa trainingDeBERTa-v3-large safety guard · Average across OAI, ToxicChat, HarmBench, and WildGuardMixAUPRC: 0.7962 -> 0.8362Helped
Add HarmAug-generated data to DeBERTa trainingDeBERTa-v3-large safety guard · Average across OAI, ToxicChat, HarmBench, and WildGuardMixF1: 0.7274 -> 0.7357Helped
Use the affirmative prefix attack to generate harmful instructions (ablation)HarmAug instruction generation · LLM harmful-instruction generationinstruction-generation success rateHelped
Generate synthetic instructions with Gemma-1.1 Instruct instead of another tested LLM (ablation)DeBERTa-v3-large with HarmAug · Average across four benchmarksAUPRC: 0.8362 vs. 0.8194; 0.8122; 0.8223; 0.8207; 0.8213Mixed
Use DeBERTa-large instead of DeBERTa-xsmall as the student (ablation)HarmAug safety guard · Average across four benchmarksAUPRC: 0.7588 -> 0.8362Helped
Use DeBERTa-large instead of DeBERTa-small as the student (ablation)HarmAug safety guard · Average across four benchmarksAUPRC: 0.7950 -> 0.8362Helped
Use DeBERTa-large instead of DeBERTa-base as the student (ablation)HarmAug safety guard · Average across four benchmarksAUPRC: 0.8094 -> 0.8362Helped
Add empty responses to the synthetic dataset (ablation)DeBERTa-v3-large trained with HarmAug · Average across four benchmarksAUPRC: 0.7631 -> 0.8362Helped
Add empty responses to the synthetic dataset (ablation)DeBERTa-v3-large trained with HarmAug · OAIF1: 0.7629 -> 0.7236Hurt
Replace the Llama-Guard-3 reward model with DeBERTa + HarmAugGFlowNet red-teaming prompt generator · Red-teaming prompt generationRuntime: 17h 23m -> 9h 8mHelped
Use DeBERTa + HarmAug instead of Llama-Guard-3Safety guard inference on WildGuardMix test split · WildGuardMix test splitLatency / token: 172.62 \si{\microsecond} -> 43.22 \si{\microsecond}Helped

Surprising findings

Limitations

Experimental setup

Datasets: WildGuardMix OpenAI Moderation ToxicChat HarmBench CipherChat AdvBench

Benchmarks: OpenAI Moderation ToxicChat HarmBench WildGuardMix CipherChat jailbreak attacks (GCG, PAIR, AutoDAN, Adaptive)

Metrics: F1 AUPRC FLOPs per token latency per token peak memory monetary cost test reward diversity

Baselines: EDA GFN Llama-Guard-1 Llama-Guard-2 Llama-Guard-3 WildGuard Aegis-Guard RoBERTa-R4 HateBERT OpenAI Moderation

Builds on: DeBERTa-v3 Llama-Guard-3 GFlowNet red-teaming prefix injection WildGuard

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