Prompt Optimization via Adversarial In-Context Learning
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 33 papers in the map (data through 7 Oct 2026). Builds on 52 of its 65 references that are in the map. First posted on arXiv 5 Dec 2023.
Builds on
52 of 65 references.
References · 52
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
- 2022Generative Adversarial Networkscited by 5,603
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2013Intriguing properties of neural networkscited by 5,114
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
38 more
- 2015Domain-Adversarial Training of Neural Networkscited by 3,023
- 2016Towards Evaluating the Robustness of Neural Networkscited by 2,976
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
- 2014Conditional Generative Adversarial Netscited by 2,152
- 2015Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networkscited by 2,048
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,767
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2017Adversarial Discriminative Domain Adaptationcited by 1,309
- 2018Don't Give Me the Details, Just the Summary! Topic-Aware Convolutional Neural Networks for Extreme Summarizationcited by 1,308
- 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,020
- 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 861
- 2022Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Taskscited by 858
- 2023Large Language Models as Optimizerscited by 830
- 2016Abstractive Text Summarization Using Sequence-to-Sequence RNNs and Beyondcited by 809
- 2021GPT Understands, Toocited by 715
- 2017Evasion Attacks against Machine Learning at Test Timecited by 686
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 628
- 2021Learning How to Ask: Querying LMs with Mixtures of Soft Promptscited by 376
- 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 361
- 2016Adversarial Feature Learningcited by 350
- 2022Dynamic Prompt Learning via Policy Gradient for Semi-structured Mathematical Reasoningcited by 347
- 2019SMART: Robust and Efficient Fine-Tuning for Pre-trained Natural Language Models through Principled Regularized Optimizationcited by 253
- 2017The E2E Dataset: New Challenges For End-to-End Generationcited by 252
- 2023PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimizationcited by 226
- 2022Demystifying Prompts in Language Models via Perplexity Estimationcited by 215
- 2021Generating Datasets with Pretrained Language Modelscited by 192
- 2023Unified Demonstration Retriever for In-Context Learningcited by 141
- 2019Adversarial Training Can Hurt Generalizationcited by 131
- 2017Controllable Invariance through Adversarial Feature Learningcited by 127
- 2018When and Why are Pre-trained Word Embeddings Useful for Neural Machine Translation?cited by 125
- 2020Adversarial Training for Large Neural Language Modelscited by 109
- 2019Robust Neural Machine Translation with Doubly Adversarial Inputscited by 105
- 2016Learning to Pivot with Adversarial Networkscited by 55
- 2019Improving Neural Language Modeling via Adversarial Trainingcited by 49
50 most cited of 52 All 52 (JSON)
Built on by
Citing papers per year: 2023: 1; 2024: 8; 2025: 14; 2026: 10.
33 papers.
Sort:
By area:
- 2024Knowledge Boundary of Large Language Models: A Surveycited by 36
- 2024Accelerating Greedy Coordinate Gradient and General Prompt Optimization via Probe Samplingcited by 33
- 2024PromptWizard: Task-Aware Prompt Optimization Frameworkcited by 32
- 2024Compromising Embodied Agents with Contextual Backdoor Attackscited by 29
- 2024Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimizationcited by 28
- 2024Aviary: training language agents on challenging scientific taskscited by 23
- 2025A Survey on Progress in LLM Alignment from the Perspective of Reward Designcited by 15
- 2025Uni-Retrieval: A Multi-Style Retrieval Framework for STEM's Educationcited by 13
- 2024Prompt Obfuscation for Large Language Modelscited by 10
- 2025Bandit-Based Prompt Design Strategy Selection Improves Prompt Optimizerscited by 7
- 2025Prompt-R1: Collaborative Automatic Prompting Framework via End-to-end Reinforcement Learningcited by 7
- 2024FIPO: Free-form Instruction-oriented Prompt Optimization with Preference Dataset and Modular Fine-tuning Schemacited by 6
21 more
- 2025OptiSeq: Ordering Examples On-The-Fly for In-Context Learningcited by 6
- 2025A Survey of Automatic Prompt Optimization with Instruction-focused Heuristic-based Search Algorithmcited by 6
- 2025What Makes a Good Natural Language Prompt?cited by 6
- 2023Beyond Output Matching: Bidirectional Alignment for Enhanced In-Context Learningcited by 5
- 2025On the Robustness of Tabular Foundation Models: Test-Time Attacks and In-Context Defensescited by 3
- 2025Are All Prompt Components Value-Neutral? Understanding the Heterogeneous Adversarial Robustness of Dissected Prompt in Large Language Modelscited by 3
- 2025Beyond In-Context Learning: Aligning Long-form Generation of Large Language Models via Task-Inherent Attribute Guidelinescited by 2
- 2025From Query to Explanation: Uni-RAG for Multi-Modal Retrieval-Augmented Learning in STEMcited by 2
- 2025Textual Gradients are a Flawed Metaphor for Automatic Prompt Optimizationcited by 2
- 2025Evolutionary Prompt Optimization Discovers Emergent Multimodal Reasoning Strategies in Vision-Language Modelscited by 1
- 2025Beyond Elicitation: Provision-based Prompt Optimization for Knowledge-Intensive Taskscited by 1
- 2026Position: Vector Prompt Interfaces Should Be Exposed to Enable Customization of Large Language Modelscited by 0
- 2026iPOE: Interpretable Prompt Optimization via Explanationscited by 0
- 2026Prompt Codebooks: Discrete Compositional Optimization for Language Model Instruction Refinementcited by 0
- 2026Bridging Auxiliary Constraints to Resolve Instruction Following in Large Reasoning Modelscited by 0
- 2026Towards Spec Learning: Inference-Time Alignment from Preference Pairscited by 0
- 2026STEVE: Stabilizing Textual Gradient-Based Prompt Optimization via Error-Driven Refinement and Regularized Verificationcited by 0
- 2026ClusterFewshot: Improving Few-shot Optimization for LLMs workflowcited by 0
- 2026The Architect, the Adversary, and the Judge: Closed-Loop Generation of Standards-Aligned Assessment Items at Scalecited by 0
- 2026SkillFocus: Evolving Agent Skills via Capability Decompositioncited by 0
- 2026Efficient Task Adaptation in Large Language Models: A Survey of Weight-Based, Prompt-Based, and Embedding-Based Adaptationscited by 0
- 2026Efficient Task Adaptation in Large Language Models: A Survey of Weight-Based, Prompt-Based, and Embedding-Based Adaptations1 Oct 2026
- 2026SkillFocus: Evolving Agent Skills via Capability Decomposition28 Sep 2026
- 2026ClusterFewshot: Improving Few-shot Optimization for LLMs workflow22 Sep 2026
- 2026STEVE: Stabilizing Textual Gradient-Based Prompt Optimization via Error-Driven Refinement and Regularized Verification20 Sep 2026
- 2026The Architect, the Adversary, and the Judge: Closed-Loop Generation of Standards-Aligned Assessment Items at Scale26 Aug 2026
- 2026Towards Spec Learning: Inference-Time Alignment from Preference Pairs22 Jun 2026
- 2026Bridging Auxiliary Constraints to Resolve Instruction Following in Large Reasoning Models2 Jun 2026
- 2026Prompt Codebooks: Discrete Compositional Optimization for Language Model Instruction Refinement27 May 2026
- 2026iPOE: Interpretable Prompt Optimization via Explanations18 May 2026
- 2026Position: Vector Prompt Interfaces Should Be Exposed to Enable Customization of Large Language Models4 Mar 2026
- 2025Textual Gradients are a Flawed Metaphor for Automatic Prompt Optimization15 Dec 2025
- 2025Beyond Elicitation: Provision-based Prompt Optimization for Knowledge-Intensive Tasks13 Nov 2025
21 more
- 2025Prompt-R1: Collaborative Automatic Prompting Framework via End-to-end Reinforcement Learning2 Nov 2025
- 2025Are All Prompt Components Value-Neutral? Understanding the Heterogeneous Adversarial Robustness of Dissected Prompt in Large Language Models3 Aug 2025
- 2025From Query to Explanation: Uni-RAG for Multi-Modal Retrieval-Augmented Learning in STEM5 Jul 2025
- 2025What Makes a Good Natural Language Prompt?7 Jun 2025
- 2025On the Robustness of Tabular Foundation Models: Test-Time Attacks and In-Context Defenses3 Jun 2025
- 2025Beyond In-Context Learning: Aligning Long-form Generation of Large Language Models via Task-Inherent Attribute Guidelines2 Jun 2025
- 2025A Survey on Progress in LLM Alignment from the Perspective of Reward Design5 May 2025
- 2025Evolutionary Prompt Optimization Discovers Emergent Multimodal Reasoning Strategies in Vision-Language Models30 Mar 2025
- 2025Bandit-Based Prompt Design Strategy Selection Improves Prompt Optimizers3 Mar 2025
- 2025A Survey of Automatic Prompt Optimization with Instruction-focused Heuristic-based Search Algorithm26 Feb 2025
- 2025Uni-Retrieval: A Multi-Style Retrieval Framework for STEM's Education9 Feb 2025
- 2025OptiSeq: Ordering Examples On-The-Fly for In-Context Learning25 Jan 2025
- 2024Aviary: training language agents on challenging scientific tasks30 Dec 2024
- 2024Knowledge Boundary of Large Language Models: A Survey17 Dec 2024
- 2024Prompt Obfuscation for Large Language Models17 Sep 2024
- 2024Compromising Embodied Agents with Contextual Backdoor Attacks6 Aug 2024
- 2024Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimization22 Jun 2024
- 2024PromptWizard: Task-Aware Prompt Optimization Framework28 May 2024
- 2024Accelerating Greedy Coordinate Gradient and General Prompt Optimization via Probe Sampling2 Mar 2024
- 2024FIPO: Free-form Instruction-oriented Prompt Optimization with Preference Dataset and Modular Fine-tuning Schema19 Feb 2024
- 2023Beyond Output Matching: Bidirectional Alignment for Enhanced In-Context Learning28 Dec 2023
- 2024Compromising Embodied Agents with Contextual Backdoor Attackscited by 29
- 2024Aviary: training language agents on challenging scientific taskscited by 23
- 2025OptiSeq: Ordering Examples On-The-Fly for In-Context Learningcited by 6
- 2026Prompt Codebooks: Discrete Compositional Optimization for Language Model Instruction Refinementcited by 0
- 2026SkillFocus: Evolving Agent Skills via Capability Decompositioncited by 0
- 2026SkillFocus: Evolving Agent Skills via Capability Decomposition28 Sep 2026
- 2026Prompt Codebooks: Discrete Compositional Optimization for Language Model Instruction Refinement27 May 2026
- 2025OptiSeq: Ordering Examples On-The-Fly for In-Context Learning25 Jan 2025
- 2024Aviary: training language agents on challenging scientific tasks30 Dec 2024
- 2024Compromising Embodied Agents with Contextual Backdoor Attacks6 Aug 2024
- 2024Knowledge Boundary of Large Language Models: A Surveycited by 36
- 2024PromptWizard: Task-Aware Prompt Optimization Frameworkcited by 32
- 2024Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimizationcited by 28
- 2025Uni-Retrieval: A Multi-Style Retrieval Framework for STEM's Educationcited by 13
- 2024Prompt Obfuscation for Large Language Modelscited by 10
- 2025Bandit-Based Prompt Design Strategy Selection Improves Prompt Optimizerscited by 7
- 2025Prompt-R1: Collaborative Automatic Prompting Framework via End-to-end Reinforcement Learningcited by 7
- 2024FIPO: Free-form Instruction-oriented Prompt Optimization with Preference Dataset and Modular Fine-tuning Schemacited by 6
- 2025A Survey of Automatic Prompt Optimization with Instruction-focused Heuristic-based Search Algorithmcited by 6
- 2025What Makes a Good Natural Language Prompt?cited by 6
- 2023Beyond Output Matching: Bidirectional Alignment for Enhanced In-Context Learningcited by 5
- 2025On the Robustness of Tabular Foundation Models: Test-Time Attacks and In-Context Defensescited by 3
12 most cited of 22 All 22 (JSON)
- 2026Efficient Task Adaptation in Large Language Models: A Survey of Weight-Based, Prompt-Based, and Embedding-Based Adaptations1 Oct 2026
- 2026ClusterFewshot: Improving Few-shot Optimization for LLMs workflow22 Sep 2026
- 2026STEVE: Stabilizing Textual Gradient-Based Prompt Optimization via Error-Driven Refinement and Regularized Verification20 Sep 2026
- 2026The Architect, the Adversary, and the Judge: Closed-Loop Generation of Standards-Aligned Assessment Items at Scale26 Aug 2026
- 2026iPOE: Interpretable Prompt Optimization via Explanations18 May 2026
- 2026Position: Vector Prompt Interfaces Should Be Exposed to Enable Customization of Large Language Models4 Mar 2026
- 2025Textual Gradients are a Flawed Metaphor for Automatic Prompt Optimization15 Dec 2025
- 2025Beyond Elicitation: Provision-based Prompt Optimization for Knowledge-Intensive Tasks13 Nov 2025
- 2025Prompt-R1: Collaborative Automatic Prompting Framework via End-to-end Reinforcement Learning2 Nov 2025
- 2025Are All Prompt Components Value-Neutral? Understanding the Heterogeneous Adversarial Robustness of Dissected Prompt in Large Language Models3 Aug 2025
- 2025What Makes a Good Natural Language Prompt?7 Jun 2025
- 2025On the Robustness of Tabular Foundation Models: Test-Time Attacks and In-Context Defenses3 Jun 2025
12 newest of 22 All 22 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2024Evaluating and Safeguarding the Adversarial Robustness of Retrieval-Based In-Context Learning
- 2025GAPO: Learning Preferential Prompt through Generative Adversarial Policy Optimization
- 2024One Prompt Word is Enough to Boost Adversarial Robustness for Pre-trained Vision-Language Models
- 2025NAP-Tuning: Neural Augmented Prompt Tuning for Adversarially Robust Vision-Language Models
- 2023Unleashing the potential of prompt engineering for large language models
- 2026Domain-Invariant Prompt Learning for Vision-Language Models
- 2025Is In-Context Learning Learning?
- 2023Adversarial Prompt Tuning for Vision-Language Models