SLM as Guardian: Pioneering AI Safety with Small Language Models

Ohjoon Kwon, Donghyeon Jeon, Nayoung Choi, Gyu-Hwung Cho, Changbong Kim +4 more
5/30/2024
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

Most prior safety research of large language models (LLMs) has focused on enhancing the alignment of LLMs to better suit the safety requirements of humans. However, internalizing such safeguard features into larger models brought challenges of higher training cost and unintended degradation of helpfulness. To overcome such challenges, a modular approach employing a smaller LLM to detect harmful user queries is regarded as a convenient solution in designing LLM-based system with safety requirements. In this paper, we leverage a smaller LLM for both harmful query detection and safeguard response generation. We introduce our safety requirements and the taxonomy of harmfulness categories, and then propose a multi-task learning mechanism fusing the two tasks into a single model. We demonstrate the effectiveness of our approach, providing on par or surpassing harmful query detection and safeguard response performance compared to the publicly available LLMs.

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{kwon2024guardian,
  title  = {SLM as Guardian: Pioneering AI Safety with Small Language Models},
  author = {Ohjoon Kwon and Donghyeon Jeon and Nayoung Choi and Gyu-Hwung Cho and Changbong Kim and Hyunwoo Lee and Inho Kang and Sun Kim and Taiwoo Park},
  year   = {2024},
  eprint = {2405.19795},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.19795v1}
}

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/2405.19795.svg)](https://codeofpaper.com/paper/2405.19795)

Discussion