Robust Safety Classifier for Large Language Models: Adversarial Prompt Shield

Jinhwa Kim, Ali Derakhshan, Ian G. Harris
10/31/2023
cs.CLcs.AI

No confident code implementation found for this paper. 10 possible matches can be shown below.

Abstract

Large Language Models' safety remains a critical concern due to their vulnerability to adversarial attacks, which can prompt these systems to produce harmful responses. In the heart of these systems lies a safety classifier, a computational model trained to discern and mitigate potentially harmful, offensive, or unethical outputs. However, contemporary safety classifiers, despite their potential, often fail when exposed to inputs infused with adversarial noise. In response, our study introduces the Adversarial Prompt Shield (APS), a lightweight model that excels in detection accuracy and demonstrates resilience against adversarial prompts. Additionally, we propose novel strategies for autonomously generating adversarial training datasets, named Bot Adversarial Noisy Dialogue (BAND) datasets. These datasets are designed to fortify the safety classifier's robustness, and we investigate the consequences of incorporating adversarial examples into the training process. Through evaluations involving Large Language Models, we demonstrate that our classifier has the potential to decrease the attack success rate resulting from adversarial attacks by up to 60%. This advancement paves the way for the next generation of more reliable and resilient conversational agents.

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. 10 weaker matches are hidden by default — 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{kim2023robust,
  title  = {Robust Safety Classifier for Large Language Models: Adversarial Prompt Shield},
  author = {Jinhwa Kim and Ali Derakhshan and Ian G. Harris},
  year   = {2023},
  eprint = {2311.00172},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.00172v1}
}

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

Discussion