arXiv:1606.01541Computer ScienceJun 2016Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:1606.01541

Deep Reinforcement Learning for Dialogue Generation

Jiwei Li, Will Monroe, Alan Ritter, Dan Jurafsky, Michel Galley, Jianfeng Gao

Abstract

Recent neural models of dialogue generation offer great promise for generating responses for conversational agents, but tend to be shortsighted, predicting utterances one at a time while ignoring their influence on future outcomes. Modeling the future direction of a dialogue is crucial to generating coherent, interesting dialogues, a need which led traditional NLP models of dialogue to draw on reinforcement learning. In this paper, we show how to integrate these goals, applying deep reinforcement learning to model future reward in chatbot dialogue. The model simulates dialogues between two virtual agents, using policy gradient methods to reward sequences that display three useful conversational properties: informativity, coherence, and ease of answering (related to forward-looking function). We evaluate our model on diversity, length as well as with human judges, showing that the proposed algorithm generates more interactive responses and manages to foster a more sustained conversation in dialogue simulation. This work marks a first step towards learning a neural conversational model based on the long-term success of dialogues.

1 Introduction

Neural response generation [Sordoni et al. (2015, Shang et al. (2015, Vinyals and Le (2015, Li et al. (2016a, Wen et al. (2015, Yao et al. (2015, Luan et al. (2016, Xu et al. (2016, Wen et al. (2016, Li et al. (2016b, Su et al. (2016] is of growing interest. The LSTM sequence-to-sequence (Seq2Seq) model [Sutskever et al. (2014] is one type of neural generation model that maximizes the probability of generating a response given the previous dialogue turn. This approach enables the incorporation of rich context when mapping between consecutive dialogue turns [Sordoni et al. (2015] in a way not possible, for example, with MT-based dialogue models [Ritter et al. (2011].

Despite the success of Seq2Seq models in dialogue generation, two problems emerge: First, Seq2Seq models are trained by predicting the next dialogue turn in a given conversational context using the maximum-likelihood estimation (MLE) objective function. However, it is not clear how well MLE approximates the real-world goal of chatbot development: teaching a machine to converse with humans, while providing interesting, diverse, and informative feedback that keeps users engaged. One concrete example is that Seq2Seq models tend to generate highly generic responses such as “I don’t know” regardless of the input [Sordoni et al. (2015, Serban et al. (2016, Li et al. (2016a]. This can be ascribed to the high frequency of generic responses found in the training set and their compatibility with a diverse range of conversational contexts. Yet “I don’t know” is apparently not a good action to take, since it closes the conversation down.

Another common problem, illustrated in the two sample conversations on the left of Table 1, is that the system becomes stuck in an infinite loop of repetitive responses. This is due to MLE-based Seq2Seq models’ inability to account for repetition. In example 2 (bottom left), the dialogue falls into an infinite loop after three turns, with both agents generating dull, generic utterances like i don’t know what you are talking about and you don’t know what you are saying. Looking at the entire conversation, utterance (4) turns out to be a bad action to take because it offers no way of continuing the conversation.

Baseline mutual information model (Li et al. 2015)Proposed reinforcement learning model
A: Where are you going? (1)A: Where are you going? (1)
B: I’m going to the restroom. (2)B: I’m going to the police station. (2)
A: See you later. (3)A: I’ll come with you. (3)
B: See you later. (4)B: No, no, no, no, you’re not going anywhere. (4)
A: See you later. (5)A: Why? (5)
B: See you later. (6)B: I need you to stay here. (6)
…A: I don’t know what you are talking about. (7)
……
A: how old are you? (1)A: How old are you? (1)
B: I’m 16. (2)B: I’m 16. Why are you asking? (2)
A: 16? (3)A I thought you were 12. (3)
B: I don’t know what you are talking about. (4)B: What made you think so? (4)
A: You don’t know what you are saying. (5)A: I don’t know what you are talking about. (5)
B: I don’t know what you are talking about . (6)B: You don’t know what you are saying. (6)
A: You don’t know what you are saying. (7)…
……

Table 1: Left Column: Dialogue simulation between two agents using a 4-layer LSTM encoder-decoder trained on the OpenSubtitles dataset. The first turn (index 1) is input by the authors. Then the two agents take turns conversing, taking as input the other agent’s prior generated turn. The output is generated using the mutual information model (Li et al., 2015) in which an N-best list is first obtained using beam search based on p(t∣|s) and reranked by linearly combining the backward probability p(s∣|t), where t and s respectively denote targets and sources. Right Column: Dialogue simulated using the proposed reinforcement learning model. The new model has more forward-looking utterances (questions like “Why are you asking?” and offers like “I’ll come with you”) and lasts longer before it falls into conversational black holes.

These challenges suggest we need a conversation framework that has the ability to (1) integrate developer-defined rewards that better mimic the true goal of chatbot development and (2) model the long-term influence of a generated response in an ongoing dialogue.

To achieve these goals, we draw on the insights of reinforcement learning, which have been widely applied in MDP and POMDP dialogue systems (see Related Work section for details). We introduce a neural reinforcement learning (RL) generation method, which can optimize long-term rewards designed by system developers. Our model uses the encoder-decoder architecture as its backbone, and simulates conversation between two virtual agents to explore the space of possible actions while learning to maximize expected reward. We define simple heuristic approximations to rewards that characterize good conversations: good conversations are forward-looking [Allwood et al. (1992] or interactive (a turn suggests a following turn), informative, and coherent. The parameters of an encoder-decoder RNN define a policy over an infinite action space consisting of all possible utterances. The agent learns a policy by optimizing the long-term developer-defined reward from ongoing dialogue simulations using policy gradient methods [Williams (1992], rather than the MLE objective defined in standard Seq2Seq models.

Our model thus integrates the power of Seq2Seq systems to learn compositional semantic meanings of utterances with the strengths of reinforcement learning in optimizing for long-term goals across a conversation. Experimental results (sampled results at the right panel of Table 1) demonstrate that our approach fosters a more sustained dialogue and manages to produce more interactive responses than standard Seq2Seq models trained using the MLE objective.

References (11)