Prompt Optimization via Adversarial In-Context Learning

被引:0
|
作者
Do, Xuan Long [1 ,3 ]
Zhao, Yiran [1 ]
Brown, Hannah [1 ]
Xie, Yuxi [1 ]
Zhao, James Xu [1 ]
Chen, Nancy F. [3 ]
Kawaguchi, Kenji [1 ]
Shieh, Michael [1 ]
He, Junxian [2 ]
机构
[1] Natl Univ Singapore, Singapore, Singapore
[2] Hong Kong Univ Sci & Technol, Hong Kong, Peoples R China
[3] ASTAR, Inst Infocomm Res I2R, Singapore, Singapore
基金
新加坡国家研究基金会;
关键词
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
We propose a new method, Adversarial In-Context Learning (adv-ICL1), to optimize prompts for in-context learning (ICL). Inspired by adversarial learning, adv-ICL is implemented as a two-player game between a generator and discriminator, with LLMs acting as both. In each round, given an input prefixed by task instructions and several exemplars, the generator produces an output. The discriminator then classifies the generator's input-output pair as model-generated or real data. Based on the discriminator's loss, a prompt modifier LLM proposes possible edits to the generator and discriminator prompts, and the edits that most improve the adversarial loss are selected. We show that applying adv-ICL results in significant improvements over state-of-the-art prompt optimization techniques for both open and closed-source models on 13 generation and classification tasks including summarization, arithmetic reasoning, machine translation, data-to-text generation, and the MMLU and big-bench hard benchmarks. In addition, our method is computationally efficient, easily extensible to other LLMs and tasks, and effective in low-resource settings
引用
收藏
页码:7308 / 7327
页数:20
相关论文
共 50 条
  • [1] ECNU-LLM@CHIP-PromptCBLUE: Prompt Optimization and In-Context Learning for Chinese Medical Tasks
    Zheng, Huanran
    Guan, Ming
    Mei, Yihan
    Li, Yanjun
    Wu, Yuanbin
    HEALTH INFORMATION PROCESSING: EVALUATION TRACK PAPERS, CHIP 2023, 2024, 2080 : 60 - 72
  • [2] Rethinking and Improving Visual Prompt Selection for In-Context Learning Segmentation
    Suo, Wei
    Lai, Lanqing
    Sun, Mengyang
    Zhang, Hanwang
    Wang, Peng
    Zhang, Yanning
    COMPUTER VISION-ECCV 2024, PT XLVI, 2025, 15104 : 18 - 35
  • [3] In-Context In-Context Learning with Transformer Neural Processes
    Ashman, Matthew
    Diaconu, Cristiana
    Weller, Adrian
    Turner, Richard E.
    SYMPOSIUM ON ADVANCES IN APPROXIMATE BAYESIAN INFERENCE, 2024, 253 : 1 - 29
  • [4] Breaking the Bias: Gender Fairness in LLMs Using Prompt Engineering and In-Context Learning
    Dwivedi, Satyam
    Ghosh, Sanjukta
    Dwivedi, Shivam
    RUPKATHA JOURNAL ON INTERDISCIPLINARY STUDIES IN HUMANITIES, 2023, 15 (04):
  • [5] Enhancing In-context Learning via Linear Probe Calibration
    Abbas, Momin
    Zhou, Yi
    Ram, Parikshit
    Baracaldo, Nathalie
    Samulowitz, Horst
    Salonidis, Theodoros
    Chen, Tianyi
    INTERNATIONAL CONFERENCE ON ARTIFICIAL INTELLIGENCE AND STATISTICS, VOL 238, 2024, 238
  • [6] Understanding In-Context Learning via Supportive Pretraining Data
    Han, Xiaochuang
    Simig, Daniel
    Mihaylov, Todor
    Tsvetkov, Yulia
    Celikyilmaz, Asli
    Wang, Tianlu
    PROCEEDINGS OF THE 61ST ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS (ACL 2023): LONG PAPERS, VOL 1, 2023, : 12660 - 12673
  • [7] The Learnability of In-Context Learning
    Wies, Noam
    Levine, Yoav
    Shashua, Amnon
    ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 36 (NEURIPS 2023), 2023,
  • [8] A glance at in-context learning
    Wu, Yongliang
    Yang, Xu
    FRONTIERS OF COMPUTER SCIENCE, 2024, 18 (05)
  • [9] Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
    Bai, Yu
    Chen, Fan
    Wang, Huan
    Xiong, Caiming
    Mei, Song
    ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 36 (NEURIPS 2023), 2023,
  • [10] What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learning
    Pan, Jane
    Gao, Tianyu
    Chen, Howard
    Chen, Danqi
    FINDINGS OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS (ACL 2023), 2023, : 8298 - 8319