paper-with-me

홈 › Papers

Attack Prompt Generation for Red Teaming and Defending Large Language Models

2023-10-19 · Boyi Deng, Wenjie Wang, Fuli Feng, Yang Deng, Qifan Wang, Xiangnan He

Large language models (LLMs) are susceptible to red teaming attacks, which can induce LLMs to generate harmful content. Previous research constructs attack prompts via manual or automatic methods, which have their own limitations on construction cost and quality. To address these issues, we propose an integrated approach that combines manual and automatic methods to economically generate high-quality attack prompts. Specifically, considering the impressive capabilities of newly emerged LLMs, we propose an attack framework to instruct LLMs to mimic human-generated prompts through in-context learning. Furthermore, we propose a defense framework that fine-tunes victim LLMs through iterative interactions with the attack framework to enhance their safety against red teaming attacks. Extensive experiments on different LLMs validate the effectiveness of our proposed attack and defense frameworks. Additionally, we release a series of attack prompts datasets named SAP with varying sizes, facilitating the safety evaluation and enhancement of more LLMs. Our code and dataset is available on https://github.com/Aatrox103/SAP .

📄 PDF Abstract BibTeX arXiv:2310.12505

Code (1)

aatrox103/sap 공식 구현 pytorch

Tasks

In-Context LearningRed Teaming

Similar Papers 제목 키워드 기반

Constitutional Classifiers: Defending against Universal Jailbreaks across Thousands of Hours of Red Teaming

2025-01-31 · Mrinank Sharma, Meg Tong, Jesse Mu, Jerry Wei 외

Large language models (LLMs) are vulnerable to universal jailbreaks-prompting strategies that systematically bypass model safeguards and enable users to carry out harmful processes that require many model interactions, l…

Red Teaming

DiSCO: Defending text-to-image generation through distribution-guided contrastive prompt optimization

2026-08-17 · Tong Zhang, Motasem Alfarra, Carlos Hinojosa, Christos Louizos 외 hf

As text-to-image generative models advance, they raise critical safety concerns, particularly the generation of Not-Safe-For-Work (NSFW) content such as violence and nudity, further exacerbated by red-teaming adversarial…

Text-to-Image Generation

Building Safe GenAI Applications: An End-to-End Overview of Red Teaming for Large Language Models

2025-03-03 · Alberto Purpura, Sahil Wadhwa, Jesse Zymet, Akshay Gupta 외

The rapid growth of Large Language Models (LLMs) presents significant privacy, security, and ethical concerns. While much research has proposed methods for defending LLM systems against misuse by malicious actors, resear…

Red TeamingSurvey

Rainbow Teaming: Open-Ended Generation of Diverse Adversarial Prompts

2024-02-26 · Mikayel Samvelyan, Sharath Chandra Raparthy, Andrei Lupu, Eric Hambro 외

As large language models (LLMs) become increasingly prevalent across many real-world applications, understanding and enhancing their robustness to adversarial attacks is of paramount importance. Existing methods for iden…

DiversityQuestion Answering

Jailbreaking GPT-4V via Self-Adversarial Attacks with System Prompts

2023-11-15 · Yuanwei Wu, Xiang Li, Yixin Liu, Pan Zhou 외

Existing work on jailbreak Multimodal Large Language Models (MLLMs) has focused primarily on adversarial examples in model inputs, with less attention to vulnerabilities, especially in model API. To fill the research gap…

Adversarial AttackRed Teaming