mlsanityData to 7 Oct 2026

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

arXiv 2410.01524 ↗First posted 2 Oct 2024cs.CL cs.LGcited by 17

Not on the map. Why?

Abstract (arXiv)

Safety guard models that detect malicious queries aimed at large language models (LLMs) are essential for ensuring the secure and responsible deployment of LLMs in real-world applications. However, deploying existing safety guard models with billions of parameters alongside LLMs on mobile devices is impractical due to substantial memory requirements and latency. To reduce this cost, we distill a large teacher safety guard model into a smaller one using a labeled dataset of instruction-response pairs with binary harmfulness labels. Due to the limited diversity of harmful instructions in the existing labeled dataset, naively distilled models tend to underperform compared to larger models. To bridge the gap between small and large models, we propose HarmAug, a simple yet effective data augmentation method that involves jailbreaking an LLM and prompting it to generate harmful instructions. Given a prompt such as, "Make a single harmful instruction prompt that would elicit offensive content", we add an affirmative prefix (e.g., "I have an idea for a prompt:") to the LLM's response. This encourages the LLM to continue generating the rest of the response, leading to sampling harmful instructions. Another LLM generates a response to the harmful instruction, and the teacher model labels the instruction-response pair. We empirically show that our HarmAug outperforms other relevant baselines. Moreover, a 435-million-parameter safety guard model trained with HarmAug achieves an F1 score comparable to larger models with over 7 billion parameters, and even outperforms them in AUPRC, while operating at less than 25% of their computational cost.

Key facts. Cited by 17 papers in the map (data through 7 Oct 2026). Builds on 52 of its 62 references that are in the map. First posted on arXiv 2 Oct 2024.

Builds on

52 of 62 references.

References · 52

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  3. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  5. 2015Distilling the Knowledge in a Neural Networkcited by 10,076
  6. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
  7. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
  8. 2017Deep reinforcement learning from human preferencescited by 3,846
  9. 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
  10. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
  11. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
  12. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
38 more
  1. 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,157
  2. 2024Qwen2 Technical Reportcited by 2,076
  3. 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,565
  4. 2020MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformerscited by 1,414
  5. 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,330
  6. 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
  7. 2021DeBERTaV3: Improving DeBERTa using ELECTRA-Style Pre-Training with Gradient-Disentangled Embedding Sharingcited by 1,219
  8. 2019TinyBERT: Distilling BERT for Natural Language Understandingcited by 1,153
  9. 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,124
  10. 2022Red Teaming Language Models with Language Modelscited by 983
  11. 2019EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Taskscited by 800
  12. 2015Improving Neural Machine Translation Models with Monolingual Datacited by 784
  13. 2016Sequence-Level Knowledge Distillationcited by 761
  14. 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 738
  15. 2019Patient Knowledge Distillation for BERT Model Compressioncited by 502
  16. 2024JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Modelscited by 494
  17. 2024WildGuard: Open One-Stop Moderation Tools for Safety Risks, Jailbreaks, and Refusals of LLMscited by 460
  18. 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attackscited by 450
  19. 2022ToxiGen: A Large-Scale Machine-Generated Dataset for Adversarial and Implicit Hate Speech Detectioncited by 419
  20. 2023GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Ciphercited by 401
  21. 2023Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrationscited by 401
  22. 2021Flow Network based Generative Models for Non-Iterative Diverse Candidate Generationcited by 384
  23. 2022A Holistic Approach to Undesired Content Detection in the Real Worldcited by 337
  24. 2022Large Language Models Are Reasoning Teacherscited by 318
  25. 2022Trajectory balance: Improved credit assignment in GFlowNetscited by 244
  26. 2023ToxicChat: Unveiling Hidden Challenges of Toxicity Detection in Real-World User-AI Conversationcited by 224
  27. 2024Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modificationscited by 220
  28. 2020Learning from the Worst: Dynamically Generated Datasets to Improve Online Hate Detectioncited by 217
  29. 2024MobileLLM: Optimizing Sub-billion Parameter Language Models for On-Device Use Casescited by 216
  30. 2020HateBERT: Retraining BERT for Abusive Language Detection in Englishcited by 206
  31. 2024AdvPrompter: Fast Adaptive Adversarial Prompting for LLMscited by 146
  32. 2024AEGIS: Online Adaptive AI Content Safety Moderation with Ensemble of LLM Expertscited by 126
  33. 2020SSMBA: Self-Supervised Manifold Based Data Augmentation for Improving Out-of-Domain Robustnesscited by 94
  34. 2024Curiosity-driven Red-teaming for Large Language Modelscited by 83
  35. 2020MixKD: Towards Efficient Distillation of Large-scale Language Modelscited by 65
  36. 2023Knowledge-Augmented Reasoning Distillation for Small Language Models in Knowledge-Intensive Taskscited by 62
  37. 2024Learning diverse attacks on large language models for robust red-teaming and safety tuningcited by 54
  38. 2022PromDA: Prompt-based Data Augmentation for Low-Resource NLU Taskscited by 51

50 most cited of 52 All 52 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 11; 2026: 6.

17 papers.

Sort:

By area:

  1. 2025Distilling LLM Agent into Small Models with Retrieval and Code Toolscited by 41
  2. 2025X-Guard: Multilingual Guard Agent for Content Moderationcited by 13
  3. 2025Robustness in Large Language Models: A Survey of Mitigation Strategies and Evaluation Metricscited by 12
  4. 2025Tree-based Dialogue Reinforced Policy Optimization for Red-Teaming Attackscited by 8
  5. 2026Safety Alignment as Continual Learning: Mitigating the Alignment Tax via Orthogonal Gradient Projectioncited by 6
  6. 2025Active Attacks: Red-teaming LLMs via Adaptive Environmentscited by 5
  7. 2025QGuard:Question-based Zero-shot Guard for Multi-modal LLM Safetycited by 4
  8. 2025SafeRoute: Adaptive Model Selection for Efficient and Accurate Safety Guardrails in Large Language Modelscited by 3
  9. 2025A Survey on Training-free Alignment of Large Language Modelscited by 2
  10. 2025Learning Efficient Guardrails for Compliancecited by 2
  11. 2026ExpGuard: LLM Content Moderation in Specialized Domainscited by 2
  12. 2026Investigating and Alleviating Harm Amplification in LLM Interactionscited by 2
5 more
  1. 2025Lightweight Safety Guardrails via Synthetic Data and RL-guided Adversarial Trainingcited by 1
  2. 2026TWGuard: A Case Study of LLM Safety Guardrails for Localized Linguistic Contextscited by 1
  3. 2025Adversarial Distilled Retrieval-Augmented Guarding Model for Online Malicious Intent Detectioncited by 0
  4. 2026FENCE: A Financial and Multimodal Jailbreak Detection Datasetcited by 0
  5. 2026No One Model Catches Every Harm: Benchmarking Content Moderation Across Safety Scenarioscited by 0