Skip to main content
Text generation with efficient (Soft) Q-learning
  • Hanlin Guo, Carnegie Mellon University, United States
  • Bowen Tan, Carnegie Mellon University, United States
  • Zhengzhong Liu, Carnegie Mellon University, United States & Petuum Inc.
  • Eric P. Xing, Carnegie Mellon University, United States & Petuum Inc. & Mohamed bin Zayed University of Artificial Intelligence
  • Zhiting Hu, UC San Diego
Document Type

Maximum likelihood estimation (MLE) is the predominant algorithm for training text generation models. This paradigm relies on direct supervision examples, which is not applicable to many emerging applications, such as generating adversarial attacks or generating prompts to control language models. Reinforcement learning (RL) on the other hand offers a more flexible solution by allowing users to plug in arbitrary task metrics as reward. Yet previous RL algorithms for text generation, such as policy gradient (on-policy RL) and Q-learning (off-policy RL), are often notoriously inefficient or unstable to train due to the large sequence space and the sparse reward received only at the end of sequences. In this paper, we introduce a new RL formulation for text generation from the soft Q-learning (SQL) perspective. It enables us to draw from the latest RL advances, such as path consistency learning, to combine the best of on-/off-policy updates, and learn effectively from sparse reward. We apply the approach to a wide range of text generation tasks, including learning from noisy/negative examples, adversarial attacks, and prompt generation. Experiments show our approach consistently outperforms both task-specialized algorithms and the previous RL methods.1 Copyright © 2021, The Authors. All rights reserved.

Publication Date
  • Computation and Language (cs.CL),
  • Machine Learning (cs.LG)

IR Deposit conditions: non-described

Preprint: arXiv

Citation Information
H. Guo, B. Tan, Z. Liu, E. Xing, and Z. Hu, "Text generation with efficient (Soft) Q-learning", arXiv, Jun. 2021, doi: 10.48550/arXiv.2106.07704