A Conditional Variational Framework for Dialog Generation

Xiaoyu Shen, Hui Su, Yanran Li, Wenjie Li, Shuzi Niu, Yang Zhao, Akiko Aizawa, Guoping Long

Abstract

Open-domain dialog systems often struggle with generating diverse, non-generic responses and lack mechanisms for explicit control over output characteristics. We present a framework that combines a Separated Hierarchical Recurrent Encoder-Decoder (SPHRED) with a Conditional Variational Autoencoder (CVAE). This approach enables "remote control" over dialogue generation, allowing for the specification of response types—such as sentiment or genericness—without compromising linguistic quality. Evaluated on the Ubuntu Dialog Corpus, our model demonstrates superior performance in both controllability and response diversity compared to standard hierarchical models.

Introduction

The development of open-domain chatbots faces three primary challenges: the "I don't know" problem, where models default to safe but uninformative generic responses; a lack of control over latent variable models which generate diverse but unpredictable text; and identity confusion, resulting from treating multi-party conversations as a single undifferentiated stream. This paper addresses these issues by explicitly modeling speaker identity and introducing a conditional framework for directed response generation.

Methodology

SPHRED: Separated Hierarchical Recurrent Encoder-Decoder

Standard models often use a single Recurrent Neural Network (RNN) to track conversation state. In contrast, SPHRED employs separate RNNs for each speaker. By modeling individual speaker states independently and concatenating them to form the global context, the architecture better captures unique talking styles and personality traits.

The SPHRED architecture separates speaker states to better capture individual conversational features.

Conditional Variational Framework

To enable controllable generation, we adapt the Conditional Variational Autoencoder (CVAE) for text. Unlike standard VAEs where a latent variable $z$ is sampled randomly, our framework conditions generation on an external label $y$. During training, the model learns to associate these labels (e.g., "positive sentiment" or "non-generic") with specific response types. At inference, the label $y$ can be manually set to "force" the model into a desired output category.

Graphical model of the CVAE framework showing the interaction between context, latent variables, and external labels.

Experimental Setup

The framework was evaluated using the Ubuntu Dialog Corpus, comprising approximately 500,000 technical support dialogues. Two primary scenarios were tested:

  1. Genericness Control: The model was trained to distinguish between "safe" phrases (manually flagged) and meaningful content.
  2. Sentiment Control: Sentiment was simulated using emoji-based rules to train the model on emotional trajectories within a conversation.

Key Results and Discussion

  • Controllability: The model achieved over 99% accuracy in following sentiment "orders" during the simulation.
  • Diversity and Quality: Human evaluations indicated that the "Non-Generic" model variant (SCENE1-B) significantly improved diversity and coherence over standard VHRED models.
  • Architectural Efficiency: SPHRED outperformed standard HRED and Language Models across semantic metrics (Average, Greedy, and Extrema cosine similarity), despite using fewer parameters. This suggests that acknowledging the multi-agent nature of dialogue is computationally more efficient.
  • Genericness as a Style: By treating "genericness" as a controllable feature rather than a model flaw, we can effectively "dial down" boring responses during inference.

Conclusion and Future Work

This work demonstrates that adding constraints via conditional labels does not degrade grammatical quality but instead provides a powerful tool for steering dialogue. Future research will explore more sophisticated sentiment classifiers beyond simple emoji rules and integrate external knowledge bases to further enhance the informativeness of non-generic responses.

Summary updated

BibTeX
@inproceedings{shen2017conditional,
  author = {Xiaoyu Shen and Hui Su and Yanran Li and Wenjie Li and Shuzi Niu and Yang Zhao and Akiko Aizawa and Guoping Long},
  title = {{A Conditional Variational Framework for Dialog Generation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2017},
  doi = {10.18653/v1/p17-2080},
}
Figure