Reward Shaping with Recurrent Neural Networks for Speeding up On-Line Policy Learning in Spoken Dialogue Systems

Pei-hao Su, David Vandyke, Milica Gasic, Nikola Mrksic, Tsung-Hsien Wen, Steve J. Young

Abstract

Statistical spoken dialogue systems have the attractive property of being able to be optimised from data via interactions with real users. However, in the reinforcement learning paradigm, the dialogue manager (agent) often requires significant time to explore the state-action space to learn to behave in a desirable manner. This is a critical issue when the system is trained on-line with real users where learning costs are expensive. Reward shaping is one promising technique for addressing these concerns. Here we examine three recurrent neural network (RNN) approaches for providing reward shaping information in addition to the primary (task-orientated) environmental feedback. These RNNs are trained on returns from dialogues generated by a simulated user and attempt to diffuse the overall evaluation of the dialogue back down to the turn level to guide the agent towards good behaviour faster. In both simulated and real user scenarios, these RNNs are shown to increase policy learning speed. Importantly, they do not require prior knowledge of the user's goal.

Introduction

Training a statistical dialogue manager is typically framed as a Reinforcement Learning (RL) problem. The agent learns by interacting with users and receiving a reward. However, in most dialogue tasks, the reward is "sparse"—the system only finds out if it succeeded or failed at the very end of the conversation. This creates a "credit assignment" problem: which specific turn caused the success or failure? For an agent to learn from scratch, it must explore many sub-optimal paths, which is expensive and frustrating when training "on-line" with real human users. While reward shaping (adding intermediate rewards) can help, it usually requires hand-crafted rules or prior knowledge of the user's specific goal, which is often unavailable in real-world applications.

Methodology

The authors propose using Recurrent Neural Networks (RNNs) to automatically generate a reward shaping signal. The framework utilizes potential-based reward shaping, where an additional reward $F$ is added to the environmental reward. To ensure the optimal policy remains unchanged, $F$ is defined as the difference between a "potential function" $\phi$ at consecutive states.

RNN architecture for turn-level reward prediction through summed outputs.

Instead of hand-coding $\phi$, the system trains an RNN to predict the total return of a dialogue. Three architectures were compared: Basic RNNs, Long Short-Term Memory (LSTM), and Gated Recurrent Units (GRU). A key innovation is the "diffusion constraint": the RNN is trained so that the sum of its scalar outputs at each turn $t$ predicts the total return of the entire dialogue. This effectively diffuses the global dialogue evaluation down to the turn level. The RNN takes a 147-dimensional feature vector at each turn, including the system's belief state, the last system action, the user's action, and the current turn number.

Experimental Setup

The models were evaluated in the Cambridge restaurant domain, featuring 150 venues with various attributes. Training data consisted of dialogues generated by a simulated user, using both a large set (18,000 dialogues) and a small set (1,000 dialogues) to test performance under data scarcity. Evaluation was conducted against a simulated user with a 15% semantic error rate and through on-line policy learning with real users recruited via Amazon Mechanical Turk.

Key Results and Discussion

The experimental results demonstrated that gated units (LSTMs and GRUs) significantly outperformed basic RNNs. This superiority is attributed to the long-term dependencies inherent in dialogues; gated architectures are better at "remembering" early cues that might only impact the final outcome several turns later. Notably, the GRU model trained on only 1,000 dialogues performed nearly as well as the one trained on 18,000, suggesting the model can be effectively trained on limited human-labeled data.

Comparison of cumulative reward during training for GRU-based shaping, hand-crafted rules (HDC), and the baseline.

In simulations, GRU-based reward shaping reached high success rates much earlier than the baseline. As shown in the performance comparison, the RNN-based approach also outperformed state-of-the-art hand-crafted (HDC) reward shaping methods. Real-world testing on Amazon Mechanical Turk confirmed these findings, with the GRU-shaping system learning successful policies significantly faster during the critical initial phase of training.

Conclusion

This research demonstrates that RNN-based reward shaping can effectively speed up the training of Spoken Dialogue Systems without requiring prior knowledge of the user's goal. By diffusing global rewards to individual turns, the system provides immediate, actionable feedback to the RL agent. Future work will explore domain adaptation to determine how well these reward predictors generalize across different conversational contexts and more complex, multi-domain tasks.

Summary updated

Abstract

Statistical spoken dialogue systems have the attractive property of being able to be optimised from data via interactions with real users. However in the reinforcement learning paradigm the dialogue manager (agent) often requires significant time to explore the state-action space to learn to behave in a desirable manner. This is a critical issue when the system is trained on-line with real users where learning costs are expensive. Reward shaping is one promising technique for addressing these concerns. Here we examine three recurrent neural network (RNN) approaches for providing reward shaping information in addition to the primary (task-orientated) environmental feedback. These RNNs are trained on returns from dialogues generated by a simulated user and attempt to diffuse the overall evaluation of the dialogue back down to the turn level to guide the agent towards good behaviour faster. In both simulated and real user scenarios these RNNs are shown to increase policy learning speed. Importantly, they do not require prior knowledge of the user's goal.
BibTeX
@inproceedings{su2015reward,
  author = {Pei-hao Su and David Vandyke and Milica Gasic and Nikola Mrksic and Tsung-Hsien Wen and Steve J. Young},
  title = {{Reward Shaping with Recurrent Neural Networks for Speeding up On-Line Policy Learning in Spoken Dialogue Systems}},
  booktitle = {SIGDIAL Conference},
  year = {2015},
  doi = {10.18653/v1/w15-4655},
}
Figure