Sequence Generation with Guider Network

Ruiyi Zhang, Changyou Chen, Zhe Gan, Wenlin Wang, Liqun Chen, Dinghan Shen, Guoyin Wang, Lawrence CarinarXiv 2018

Abstract: Sequence generation with reinforcement learning (RL) has received significant attention recently. However, a challenge with such methods is the sparse-reward problem in the RL training process, in which a scalar guiding signal is often only available after an entire sequence has been generated. This type of sparse reward tends to ignore the global structural information of a sequence, causing generation of sequences that are semantically inconsistent. In this paper, we present a model-based RL approach to overcome this issue. Specifically, we propose a novel guider network to model the sequence-generation environment, which can assist next-word prediction and provide intermediate rewards for generator optimization. Extensive experiments show that the proposed method leads to improved performance for both unconditional and conditional sequence-generation tasks.

Introduction

Generating high-quality text sequences remains a fundamental challenge in natural language processing due to two primary issues: Exposure Bias and Sparse Rewards. Standard models are typically trained using teacher forcing to predict the next word based on ground-truth prefixes. However, during inference, they must rely on their own potentially erroneous previous outputs, leading to error accumulation known as exposure bias.

To mitigate this, researchers often employ Reinforcement Learning (RL). However, standard RL approaches suffer from the sparse reward problem, where feedback (e.g., a BLEU score or discriminator output) is only available after the entire sequence is generated. This lack of intermediate guidance makes it difficult for the model to learn which specific word choices contributed to the final outcome, often resulting in repetitive or nonsensical text.

Methodology: The Guider Network

The core innovation of this work is the Guider Network, an LSTM-based component that acts as a "world model" for the sequence generation environment. Unlike traditional model-free RL, this approach models the environment in a feature space to provide dense, intermediate feedback.

The architecture of the proposed model, featuring an Encoder (CNN/MLP), a Decoder (LSTM), and the Guider Network (LSTM) providing intermediate rewards.

Key Components:

  1. Feature-Space Modeling: Instead of raw word prediction, the Guider Network operates in an abstract feature space. It takes the current state and predicts future feature representations several steps ahead.
  2. Plan-Ahead Attention: The generator utilizes these predicted future features as a form of "look-ahead" attention, effectively planning its current word choice to reach a desired future state.
  3. Intermediate Rewards: The model calculates a reward at every step by measuring the similarity between the generator's current output and the Guider’s predicted future features. This provides the dense signal necessary for stable RL training.
  4. Hybrid Optimization: The generator is updated using policy gradients that combine these intermediate feature-matching rewards with a final scalar reward from a discriminator or metric.

Experimental Evaluation

The proposed method was evaluated across three distinct tasks:

  • Unconditional Generation: Tested on the COCO Image Captions and EMNLP2017 WMT News datasets.
  • Sentiment Style Transfer: Evaluated on Yelp Reviews, focusing on altering sentiment while preserving semantic content.

Quantitative Results

The proposed method, referred to as GMGAN for unconditional tasks, consistently outperformed state-of-the-art baselines like LeakGAN and SeqGAN. On the COCO dataset, GMGAN achieved a significant improvement in BLEU scores, demonstrating its ability to generate more coherent and structurally sound sequences.

Performance comparison on the COCO dataset (unconditional generation). GMGAN (ours) achieves the highest BLEU-4 score of 0.635.

In style transfer tasks, the model achieved a sentiment accuracy of 92.7% on the Yelp dataset, surpassing previous CVAE-based models (84.5%). Human evaluations on the WMT News dataset also favored the Guider Network approach, with GMGAN receiving a readability score of 3.89/5.0, compared to 3.47 for LeakGAN.

Discussion and Insights

  • Diversity vs. Quality: While many GAN-based models suffer from mode collapse (generating high-quality but repetitive text), the Guider Network encourages exploration through intermediate rewards, leading to higher diversity (lower Self-BLEU) without sacrificing quality.
  • Semantic Anchoring: In conditional tasks like style transfer, the Guider Network ensures that while the sentiment changes, the underlying content features remain consistent, preventing the generation of generic, unrelated sentences.

Conclusion

By introducing a model-based RL framework with a Guider Network, this research effectively addresses the sparse reward problem in sequence generation. While the approach introduces some computational overhead due to the additional network and per-step calculations, the gains in semantic consistency and diversity are substantial. Future work may explore extending this "plan-ahead" mechanism to multi-turn dialogue and document-level summarization.

Summary updated

BibTeX
@misc{zhang2018sequence,
  author = {Ruiyi Zhang and Changyou Chen and Zhe Gan and Wenlin Wang and Liqun Chen and Dinghan Shen and Guoyin Wang and Lawrence Carin},
  title = {{Sequence Generation with Guider Network}},
  year = {2018},
  eprint = {1811.00696},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.00696},
}
Figure