HarmAug: An effective data augmentation method for knowledge distillation of safety guardrail modelsHarmAug: Effective Data Augmentation for Knowledge Distillation of Safety Guard Models
The researchers propose the HarmAug data augmentation method, which generates harmful instructions by jailbreaking large language models, for distilling large safety guardrail models into small models. The approach first has an LLM generate a harmful instruction according to a prompt, prepends an affirmative prefix before its reply to prompt the model to continue the completion, then has another LLM generate the corresponding reply, and has a teacher guardrail model label the instruction-reply pairs, to address the lack of diversity in harmful instructions in existing annotated data. Experiments show the method outperforms related baselines; the 435 million parameter guardrail model trained with HarmAug achieves an F1 score comparable to large models with more than 7 billion parameters, exceeds the latter on AUPRC, and costs less than 25% of the computation of the large models.