Lightweight Safety Guardrails via Synthetic Data and RL-guided Adversarial Training

Aleksei Ilin, Gor Matevosyan, Xueying Ma, Vladimir Eremin, Suhaa Dada +3 more
7/11/2025
cs.LGcs.AIcs.CL

No confident code implementation found for this paper.

Abstract

We introduce a lightweight yet highly effective safety guardrail framework for language models, demonstrating that small-scale language models can achieve, and even surpass, the performance of larger counterparts in content moderation tasks. This is accomplished through high-fidelity synthetic data generation and adversarial training. The synthetic data generation process begins with human-curated seed data, which undergoes query augmentation and paraphrasing to create diverse and contextually rich examples. This augmented data is then subjected to multiple rounds of curation, ensuring high fidelity and relevance. Inspired by recent advances in the Generative Adversarial Network (GAN) architecture, our adversarial training employs reinforcement learning to guide a generator that produces challenging synthetic examples. These examples are used to fine-tune the safety classifier, enhancing its ability to detect and mitigate harmful content. Additionally, we incorporate strategies from recent research on efficient LLM training, leveraging the capabilities of smaller models to improve the performance of larger generative models. With iterative adversarial training and the generation of diverse, high-quality synthetic data, our framework enables small language models (SLMs) to serve as robust safety guardrails. This approach not only reduces computational overhead but also enhances resilience against adversarial attacks, offering a scalable and efficient solution for content moderation in AI systems.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ilin2025lightweight,
  title  = {Lightweight Safety Guardrails via Synthetic Data and RL-guided Adversarial Training},
  author = {Aleksei Ilin and Gor Matevosyan and Xueying Ma and Vladimir Eremin and Suhaa Dada and Muqun Li and Riyaaz Shaik and Haluk Noyan Tokgozoglu},
  year   = {2025},
  eprint = {2507.08284},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.08284v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.08284.svg)](https://codeofpaper.com/paper/2507.08284)

Discussion