Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discovery

By Yuxin Wen, Neel Jain, John Kirchenbauer, Micah Goldblum, Jonas Geiping, Tom Goldstein. Neural Information Processing Systems, 2023

425 citations recorded by the source corpus.

The strength of modern generative models lies in their ability to be controlled through text-based prompts. Typical"hard"prompts are made from interpretable words and tokens, and must be hand-crafted by humans. There are also"soft"prompts, which consist of continuous feature vectors. These can be discovered using powerful optimization methods, but they cannot be easily interpreted, re-used across models, or plugged into a text-based interface. We describe an approach to robustly optimize hard text prompts through efficient gradient-based optimization. Our approach automatically generates hard text-based prompts for both text-to-image and text-to-text applications. In the text-to-image setting, the method creates hard prompts for diffusion models, allowing API users to easily generate, discover, and mix and match image concepts without prior knowledge on how to prompt the model. In the text-to-text setting, we show that hard prompts can be automatically discovered that are effective in tuning LMs for classification.

Subfields: Artificial Intelligence, Molecular Biology

View Paper: https://www.semanticscholar.org/paper/0c26bfc15a7caecce0ed4567dc2f2909b80e5bdd

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Denny Zhou
  2. Quoc V. Le
  3. Xinyun Chen
  4. Hanxiao Liu
  5. Luke S. Zettlemoyer
  6. Danqi Chen
  7. Mohit Bansal
  8. Percy Liang

In Molecular Biology

  1. Quoc V. Le
  2. Xuezhi Wang
  3. Micah Goldblum
  4. Hanxiao Liu
  5. Danqi Chen
  6. Yoav Goldberg
  7. Frank Hutter
  8. Xuanyi Dong

Citations in the corpus