mlsanityData to 7 Oct 2026

Prompt Optimization via Adversarial In-Context Learning

arXiv 2312.02614 ↗First posted 5 Dec 2023cs.LG cs.CLcited by 33

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

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  4. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  5. 2021Training Verifiers to Solve Math Word Problemscited by 9,743
  6. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
  7. 2020Measuring Massive Multitask Language Understandingcited by 7,768
  8. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
  9. 2022Generative Adversarial Networkscited by 5,603
  10. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  11. 2013Intriguing properties of neural networkscited by 5,114
  12. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
38 more
  1. 2015Domain-Adversarial Training of Neural Networkscited by 3,023
  2. 2016Towards Evaluating the Robustness of Neural Networkscited by 2,976
  3. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
  4. 2019The Curious Case of Neural Text Degenerationcited by 2,881
  5. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
  6. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
  7. 2014Conditional Generative Adversarial Netscited by 2,152
  8. 2015Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networkscited by 2,048
  9. 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,767
  10. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
  11. 2017Adversarial Discriminative Domain Adaptationcited by 1,309
  12. 2018Don't Give Me the Details, Just the Summary! Topic-Aware Convolutional Neural Networks for Extreme Summarizationcited by 1,308
  13. 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,020
  14. 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 861
  15. 2022Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Taskscited by 858
  16. 2023Large Language Models as Optimizerscited by 830
  17. 2016Abstractive Text Summarization Using Sequence-to-Sequence RNNs and Beyondcited by 809
  18. 2021GPT Understands, Toocited by 715
  19. 2017Evasion Attacks against Machine Learning at Test Timecited by 686
  20. 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
  21. 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 628
  22. 2021Learning How to Ask: Querying LMs with Mixtures of Soft Promptscited by 376
  23. 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 361
  24. 2016Adversarial Feature Learningcited by 350
  25. 2022Dynamic Prompt Learning via Policy Gradient for Semi-structured Mathematical Reasoningcited by 347
  26. 2019SMART: Robust and Efficient Fine-Tuning for Pre-trained Natural Language Models through Principled Regularized Optimizationcited by 253
  27. 2017The E2E Dataset: New Challenges For End-to-End Generationcited by 252
  28. 2023PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimizationcited by 226
  29. 2022Demystifying Prompts in Language Models via Perplexity Estimationcited by 215
  30. 2021Generating Datasets with Pretrained Language Modelscited by 192
  31. 2023Unified Demonstration Retriever for In-Context Learningcited by 141
  32. 2019Adversarial Training Can Hurt Generalizationcited by 131
  33. 2017Controllable Invariance through Adversarial Feature Learningcited by 127
  34. 2018When and Why are Pre-trained Word Embeddings Useful for Neural Machine Translation?cited by 125
  35. 2020Adversarial Training for Large Neural Language Modelscited by 109
  36. 2019Robust Neural Machine Translation with Doubly Adversarial Inputscited by 105
  37. 2016Learning to Pivot with Adversarial Networkscited by 55
  38. 2019Improving Neural Language Modeling via Adversarial Trainingcited by 49

50 most cited of 52 All 52 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 1; 2024: 8; 2025: 14; 2026: 10.

33 papers.

Sort:

By area:

  1. 2024Knowledge Boundary of Large Language Models: A Surveycited by 36
  2. 2024Accelerating Greedy Coordinate Gradient and General Prompt Optimization via Probe Samplingcited by 33
  3. 2024PromptWizard: Task-Aware Prompt Optimization Frameworkcited by 32
  4. 2024Compromising Embodied Agents with Contextual Backdoor Attackscited by 29
  5. 2024Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimizationcited by 28
  6. 2024Aviary: training language agents on challenging scientific taskscited by 23
  7. 2025A Survey on Progress in LLM Alignment from the Perspective of Reward Designcited by 15
  8. 2025Uni-Retrieval: A Multi-Style Retrieval Framework for STEM's Educationcited by 13
  9. 2024Prompt Obfuscation for Large Language Modelscited by 10
  10. 2025Bandit-Based Prompt Design Strategy Selection Improves Prompt Optimizerscited by 7
  11. 2025Prompt-R1: Collaborative Automatic Prompting Framework via End-to-end Reinforcement Learningcited by 7
  12. 2024FIPO: Free-form Instruction-oriented Prompt Optimization with Preference Dataset and Modular Fine-tuning Schemacited by 6
21 more
  1. 2025OptiSeq: Ordering Examples On-The-Fly for In-Context Learningcited by 6
  2. 2025A Survey of Automatic Prompt Optimization with Instruction-focused Heuristic-based Search Algorithmcited by 6
  3. 2025What Makes a Good Natural Language Prompt?cited by 6
  4. 2023Beyond Output Matching: Bidirectional Alignment for Enhanced In-Context Learningcited by 5
  5. 2025On the Robustness of Tabular Foundation Models: Test-Time Attacks and In-Context Defensescited by 3
  6. 2025Are All Prompt Components Value-Neutral? Understanding the Heterogeneous Adversarial Robustness of Dissected Prompt in Large Language Modelscited by 3
  7. 2025Beyond In-Context Learning: Aligning Long-form Generation of Large Language Models via Task-Inherent Attribute Guidelinescited by 2
  8. 2025From Query to Explanation: Uni-RAG for Multi-Modal Retrieval-Augmented Learning in STEMcited by 2
  9. 2025Textual Gradients are a Flawed Metaphor for Automatic Prompt Optimizationcited by 2
  10. 2025Evolutionary Prompt Optimization Discovers Emergent Multimodal Reasoning Strategies in Vision-Language Modelscited by 1
  11. 2025Beyond Elicitation: Provision-based Prompt Optimization for Knowledge-Intensive Taskscited by 1
  12. 2026Position: Vector Prompt Interfaces Should Be Exposed to Enable Customization of Large Language Modelscited by 0
  13. 2026iPOE: Interpretable Prompt Optimization via Explanationscited by 0
  14. 2026Prompt Codebooks: Discrete Compositional Optimization for Language Model Instruction Refinementcited by 0
  15. 2026Bridging Auxiliary Constraints to Resolve Instruction Following in Large Reasoning Modelscited by 0
  16. 2026Towards Spec Learning: Inference-Time Alignment from Preference Pairscited by 0
  17. 2026STEVE: Stabilizing Textual Gradient-Based Prompt Optimization via Error-Driven Refinement and Regularized Verificationcited by 0
  18. 2026ClusterFewshot: Improving Few-shot Optimization for LLMs workflowcited by 0
  19. 2026The Architect, the Adversary, and the Judge: Closed-Loop Generation of Standards-Aligned Assessment Items at Scalecited by 0
  20. 2026SkillFocus: Evolving Agent Skills via Capability Decompositioncited by 0
  21. 2026Efficient Task Adaptation in Large Language Models: A Survey of Weight-Based, Prompt-Based, and Embedding-Based Adaptationscited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2024Evaluating and Safeguarding the Adversarial Robustness of Retrieval-Based In-Context Learning
  2. 2025GAPO: Learning Preferential Prompt through Generative Adversarial Policy Optimization
  3. 2024One Prompt Word is Enough to Boost Adversarial Robustness for Pre-trained Vision-Language Models
  4. 2025NAP-Tuning: Neural Augmented Prompt Tuning for Adversarially Robust Vision-Language Models
  5. 2023Unleashing the potential of prompt engineering for large language models
  6. 2026Domain-Invariant Prompt Learning for Vision-Language Models
  7. 2025Is In-Context Learning Learning?
  8. 2023Adversarial Prompt Tuning for Vision-Language Models