Lune

EMNLP2022Top-tier venue

RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learning

Mingkai Deng, Jianyu Wang, Cheng-Ping Hsieh, Yihan Wang, Han Guo, Tianmin Shu, Meng Song, Eric P. Xing, Zhiting Hu

Abstract

Prompting has shown impressive success in enabling large pre-trained language models (LMs) to perform diverse NLP tasks, especially with only few downstream data. Automatically finding the optimal prompt for each task, however, is challenging. Most existing work resorts to tuning soft prompts (e.g., embeddings) which fall short of interpretability, reusability across LMs, and applicability when gradients are not accessible. Discrete prompts, on the other hand, are difficult to optimize, and are often created by "enumeration (e.g., paraphrasing)-then-selection" heuristics that do not explore the prompt space systematically. This paper proposes RLPROMPT, an efficient discrete prompt optimization approach with reinforcement learning (RL). RL-PROMPT formulates a parameter-efficient policy network that generates the optimized discrete prompt after training with reward. To harness the complex and stochastic reward signals from the large LM environment, we incorporate effective reward stabilization that substantially enhances training efficiency. RL-PROMPT is flexibly applicable to different types of LMs, such as masked (e.g., BERT) and left-to-right models (e.g., GPTs), for both classification and generation tasks. Experiments on few-shot classification and unsupervised text style transfer show superior performance over a wide range of existing finetuning or prompting methods. Interestingly, the resulting optimized prompts are often ungrammatical gibberish text; and surprisingly, those gibberish prompts are transferrable between different LMs to retain significant performance, indicating that LM prompting may not follow human language patterns.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

108 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formatting cites BERTScore: Evaluating Text Generation with BERT
  • Multitask Prompted Training Enables Zero-Shot Task Generalization cites Language Models are Few-Shot Learners
  • Multitask Prompted Training Enables Zero-Shot Task Generalization cites Finetuned Language Models are Zero-Shot Learners
  • Finetuned Language Models are Zero-Shot Learners cites Multitask Prompted Training Enables Zero-Shot Task Generalization
  • PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimization cites Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discovery
  • PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimization cites Connecting Large Language Models with Evolutionary Algorithms Yields Powerful Prompt Optimizers
  • Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discovery cites Multitask Prompted Training Enables Zero-Shot Task Generalization
  • Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discovery cites Language Models are Few-Shot Learners
  • Fine-Tuning Language Models with Just Forward Passes cites Language Models are Few-Shot Learners
  • Connecting Large Language Models with Evolutionary Algorithms Yields Powerful Prompt Optimizers cites Multitask Prompted Training Enables Zero-Shot Task Generalization
  • Connecting Large Language Models with Evolutionary Algorithms Yields Powerful Prompt Optimizers cites Language Models are Few-Shot Learners
  • Finetuned Language Models are Zero-Shot Learners cites Language Models are Few-Shot Learners
  • Finetuned Language Models are Zero-Shot Learners cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Chain-of-Thought Prompting Elicits Reasoning in Large Language Models cites Multitask Prompted Training Enables Zero-Shot Task Generalization
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers108

  1. Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingMelanie Sclar, Yejin Choi, Yulia Tsvetkov, Alane SuhrICLR 2024 · 682 citations
  2. Fine-Tuning Language Models with Just Forward PassesSadhika Malladi, Tianyu Gao, Eshaan Nichani, Alex Damian et al.NeurIPS 2023 · 495 citations
  3. Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and DiscoveryYuxin Wen, Neel Jain, John Kirchenbauer, Micah Goldblum et al.NeurIPS 2023 · 454 citations
  4. Connecting Large Language Models with Evolutionary Algorithms Yields Powerful Prompt OptimizersQingyan Guo, Rui Wang, Junliang Guo, Bei Li et al.ICLR 2024 · 257 citations
  5. PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt OptimizationXinyuan Wang, Chenxi Li, Zhen Wang, Fan Bai et al.ICLR 2024 · 226 citations

Builds on29

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  3. BERTScore: Evaluating Text Generation with BERTTianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger et al.ICLR 2020 · 8,443 citations
  4. Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu et al.ICLR 2022 · 4,966 citations
  5. Multitask Prompted Training Enables Zero-Shot Task GeneralizationVictor Sanh, Albert Webson, Colin Raffel, Stephen H. Bach et al.ICLR 2022 · 1,976 citations

Related papers

  1. Dialogue for Prompting: A Policy-Gradient-Based Discrete Prompt Generation for Few-Shot LearningChengzhengxu Li, Xiaoming Liu, Yichen Wang, Duyi Li et al.AAAI 2024 · 7 citations
  2. StablePrompt : Automatic Prompt Tuning using Reinforcement Learning for Large Language ModelMinchan Kwon, Gaeun Kim, Jongsuk Kim, Haeil Lee et al.EMNLP 2024 · 11 citations
  3. TransPrompt: Towards an Automatic Transferable Prompting Framework for Few-shot Text ClassificationChengyu Wang, Jianing Wang, Minghui Qiu, Jun Huang et al.EMNLP 2021 · 39 citations
  4. Hard Prompts Made Interpretable: Sparse Entropy Regularization for Prompt Tuning with RLYunseon Choi, Sangmin Bae, Seonghyun Ban, Minchan Jeong et al.ACL 2024 · 1 citation
  5. Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language ModelsMirac Suzgun, Luke Melas-Kyriazi, Dan JurafskyEMNLP 2022 · 34 citations
Dusk over the sea between two cliffs drawn in fine vertical lines