Dynamic Guided and Domain Applicable Safeguards for Enhanced Security in Large Language Models

Weidi Luo, He Cao, Zijing Liu, Yu Wang, Aidan Wong +3 more
10/23/2024
cs.AI

No official code found. Best implementation: IDEA-XL/G4D (9 stars, last commit 2025-05-22).

Abstract

With the extensive deployment of Large Language Models (LLMs), ensuring their safety has become increasingly critical. However, existing defense methods often struggle with two key issues: (i) inadequate defense capabilities, particularly in domain-specific scenarios like chemistry, where a lack of specialized knowledge can lead to the generation of harmful responses to malicious queries. (ii) over-defensiveness, which compromises the general utility and responsiveness of LLMs. To mitigate these issues, we introduce a multi-agents-based defense framework, Guide for Defense (G4D), which leverages accurate external information to provide an unbiased summary of user intentions and analytically grounded safety response guidance. Extensive experiments on popular jailbreak attacks and benign datasets show that our G4D can enhance LLM's robustness against jailbreak attacks on general and domain-specific scenarios without compromising the model's general functionality.

View on arXivView PDF

Code Implementations(1)

IDEA-XL/G4DCommunity100%

[NAACL 2025] The official code for Dynamic Guided and Domain Applicable Safeguards for Enhanced Security in Large Language Models: we introduce G4D, a dynamic, guide-basedframework that operates independently of static safety prompts.

91PythonOct 17, 20241 years ago

Similar Papers

Cite this paper

@article{luo2024dynamic,
  title  = {Dynamic Guided and Domain Applicable Safeguards for Enhanced Security in Large Language Models},
  author = {Weidi Luo and He Cao and Zijing Liu and Yu Wang and Aidan Wong and Bing Feng and Yuan Yao and Yu Li},
  year   = {2024},
  eprint = {2410.17922},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.17922v2}
}

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

Discussion