Skip to main content
QUICK REVIEW

[Paper Review] Generating Text with Deep Reinforcement Learning

Hongyu Guo|arXiv (Cornell University)|Oct 30, 2015
Topic ModelingComputer Science30 references41 citations
TL;DR

This paper proposes a novel deep reinforcement learning approach for sequence-to-sequence text generation using a Deep Q-Network (DQN) that iteratively refines decoded outputs. By leveraging an encoder-decoder LSTM to generate state representations and action candidates, and biasing exploration toward previously difficult sequence portions, the method significantly outperforms greedy beam search LSTMs on unseen sentences, achieving a 111% relative improvement in BLEU score on out-of-distribution test data.

ABSTRACT

We introduce a novel schema for sequence to sequence learning with a Deep Q-Network (DQN), which decodes the output sequence iteratively. The aim here is to enable the decoder to first tackle easier portions of the sequences, and then turn to cope with difficult parts. Specifically, in each iteration, an encoder-decoder Long Short-Term Memory (LSTM) network is employed to, from the input sequence, automatically create features to represent the internal states of and formulate a list of potential actions for the DQN. Take rephrasing a natural sentence as an example. This list can contain ranked potential words. Next, the DQN learns to make decision on which action (e.g., word) will be selected from the list to modify the current decoded sequence. The newly modified output sequence is subsequently used as the input to the DQN for the next decoding iteration. In each iteration, we also bias the reinforcement learning's attention to explore sequence portions which are previously difficult to be decoded. For evaluation, the proposed strategy was trained to decode ten thousands natural sentences. Our experiments indicate that, when compared to a left-to-right greedy beam search LSTM decoder, the proposed method performed competitively well when decoding sentences from the training set, but significantly outperformed the baseline when decoding unseen sentences, in terms of BLEU score obtained.

Motivation & Objective

  • To address the challenge of variable-length sequence generation in NLP tasks such as text rephrasing and machine translation.
  • To improve generalization on unseen sequences by replacing left-to-right greedy decoding with a reinforcement learning-based iterative refinement strategy.
  • To enable the agent to focus on difficult parts of sequences by biasing exploration toward previously hard-to-decode portions.
  • To explore the feasibility of using DQN for end-to-end text generation, leveraging LSTMs for state and action representation.
  • To evaluate the method's performance on unseen data, where generalization is critical for real-world deployment.

Proposed method

  • An encoder-decoder LSTM network processes the input sequence to generate a fixed-dimensional context vector and a ranked list of potential word candidates for the DQN at each decoding step.
  • The DQN selects actions (words) from the candidate list to iteratively modify the current decoded sequence, with the updated sequence fed back into the DQN for the next iteration.
  • The DQN learns to maximize cumulative reward through Q-learning, using experience replay and target networks to stabilize training.
  • An attention mechanism is integrated into the DQN's exploration strategy to prioritize sequence portions that were previously difficult to decode.
  • The model employs an $ε$-greedy policy during training and testing to balance exploration and exploitation.
  • The final output is the decoded sequence from the last iteration, with performance evaluated using smoothed BLEU scores.

Experimental results

Research questions

  • RQ1Can a Deep Q-Network (DQN) effectively learn to refine text sequences iteratively, improving upon standard left-to-right decoding?
  • RQ2How does the DQN's exploration strategy, especially when biased toward previously difficult sequence parts, affect generalization on unseen data?
  • RQ3To what extent does the use of LSTM-generated state and action representations improve DQN-based text generation compared to direct state-action space modeling?
  • RQ4Does the DQN-based decoding strategy generalize better than greedy beam search on out-of-distribution test sentences?
  • RQ5What is the impact of exploration during inference (testing) on the final BLEU score of the generated sequences?

Key findings

  • On seen sentences from the training set, the DQN decoder achieved a smoothed BLEU score of 0.494, slightly outperforming the baseline LSTM beam search (0.425).
  • On unseen sentences, the DQN decoder significantly outperformed the baseline, achieving a BLEU score of 0.228 compared to the baseline's 0.107, representing a 111% relative improvement.
  • The DQN's exploration strategy during training enabled it to generalize better to unseen data, as it learned from a broader distribution of noisy, synthetic sequences generated during exploration.
  • Enabling exploration during inference (testing) with $ε$-greedy policies degraded performance, indicating that exploration should be disabled at test time.
  • The DQN training converged in approximately 6 epochs, demonstrating that the state and action representation functions were effective and trainable.
  • The method successfully corrected a misparsed sentence from 'Click here to read more than the New York Times' to 'Click here to read more from the New York Times' in a single iteration, showcasing its ability to refine outputs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.