paper-with-me

홈 › Papers

Prompt Optimization via Adversarial In-Context Learning

2023-12-05 · Xuan Long Do, Yiran Zhao, Hannah Brown, Yuxi Xie, James Xu Zhao, Nancy F. Chen, Kenji Kawaguchi, Michael Shieh, Junxian He

We propose a new method, Adversarial In-Context Learning (adv-ICL), to optimize prompt for in-context learning (ICL) by employing one LLM as a generator, another as a discriminator, and a third as a prompt modifier. As in traditional adversarial learning, adv-ICL is implemented as a two-player game between the generator and discriminator, where the generator tries to generate realistic enough output to fool the discriminator. In each round, given an input prefixed by task instructions and several exemplars, the generator produces an output. The discriminator is then tasked with classifying the generator input-output pair as model-generated or real data. Based on the discriminator loss, the prompt modifier proposes possible edits to the generator and discriminator prompts, and the edits that most improve the adversarial loss are selected. We show that adv-ICL results in significant improvements over state-of-the-art prompt optimization techniques for both open and closed-source models on 11 generation and classification tasks including summarization, arithmetic reasoning, machine translation, data-to-text generation, and the MMLU and big-bench hard benchmarks. In addition, because our method uses pre-trained models and updates only prompts rather than model parameters, it is computationally efficient, easy to extend to any LLM and task, and effective in low-resource settings.

📄 PDF Abstract BibTeX arXiv:2312.02614

Code (1)

zhaoyiran924/adv-in-context-learning 공식 구현

Tasks

Arithmetic ReasoningData-to-Text GenerationIn-Context LearningMachine TranslationMMLUText Generation

Similar Papers 제목 키워드 기반

Token-Level Adversarial Prompt Detection Based on Perplexity Measures and Contextual Information

2023-11-20 · Zhengmian Hu, Gang Wu, Saayan Mitra, Ruiyi Zhang 외

In recent years, Large Language Models (LLM) have emerged as pivotal tools in various applications. However, these models are susceptible to adversarial prompt attacks, where attackers can carefully curate input strings …

Metaphor-based Jailbreak Attacks on Text-to-Image Models

2025-12-06 · Chenyu Zhang, Lanjun Wang, Yiwen Ma, Wenhui Li 외 arxiv

Text-to-image (T2I) models commonly incorporate defense mechanisms to prevent the generation of sensitive images. Unfortunately, recent jailbreak attacks have shown that adversarial prompts can effectively bypass these m…

Domain-Invariant Prompt Learning for Vision-Language Models

2026-03-30 · Arsham Gholamzadeh Khoee, Yinan Yu, Robert Feldt arxiv

Large pre-trained vision-language models like CLIP have transformed computer vision by aligning images and text in a shared feature space, enabling robust zero-shot transfer via prompting. Soft-prompting, such as Context…

Domain Generalization

Context-aware Prompt Tuning: Advancing In-Context Learning with Adversarial Methods

2024-10-22 · Tsachi Blau, Moshe Kimhi, Yonatan Belinkov, Alexander Bronstein 외

Fine-tuning Large Language Models (LLMs) typically involves updating at least a few billions of parameters. A more parameter-efficient approach is Prompt Tuning (PT), which updates only a few learnable tokens, and differ…

Few-Shot LearningIn-Context Learning

Human-Readable Adversarial Prompts: An Investigation into LLM Vulnerabilities Using Situational Context

2024-12-20 · Nilanjana Das, Edward Raff, Manas Gaur

Previous research on LLM vulnerabilities often relied on nonsensical adversarial prompts, which were easily detectable by automated methods. We address this gap by focusing on human-readable adversarial prompts, a more r…