Topic Enhanced Controllable CVAE for Dialogue Generation (Student Abstract)

Yiru Wang, Pengda Si, Zeyang Lei, Yujiu Yang

Abstract

This paper introduces the Topic Enhanced Controllable CVAE (TEC-CVAE) framework to address the common "boring chatbot" problem in neural dialogue generation. By integrating multi-hop attention on topic keywords with a dynamic "expression gate" in the decoder, the model generates responses that are both diverse and strictly relevant to the conversation topic. Experimental results on DailyDialog and OpenSubtitles datasets demonstrate that TEC-CVAE outperforms existing baselines in both relevance and diversity metrics.

Introduction

Building chatbots that produce human-like, engaging responses remains a significant challenge. Standard sequence-to-sequence models often default to "safe" but vacuous responses like "I don't know" or "Okay." While Conditional Variational Auto-Encoders (CVAEs) were introduced to increase diversity through latent variables, they frequently suffer from "hallucinations" or off-topic replies where the model loses the conversational thread. This research aims to bridge the gap between creative diversity and topical consistency.

Methodology

The TEC-CVAE framework incorporates two primary architectural innovations to balance creativity with logic:

Multi-hop Hybrid Attention

To ensure topical relevance, the model extracts nouns and named entities from dialogue history as topic keywords. A self-attention layer first captures global relationships between these keywords. Subsequently, a cross-attention layer between the keywords and the dialogue utterances creates a "contextual fused topic vector." This mechanism allows the model to dynamically prioritize keywords that are most relevant to the current turn in the conversation.

Topic-aware Controllable Decoder

The core innovation in the generation phase is the Expression Gate ($g^e_t$). In standard CVAEs, the latent variable $z$ (the source of diversity) is statically added to the decoder. In TEC-CVAE, the expression gate dynamically regulates the influence of this randomness at every generation step. If the latent variable begins to push the output away from the identified topic, the gate can reduce its influence to maintain relevance.

Experimental Setup

The model was evaluated on two benchmark datasets:

  • DailyDialog: A high-quality dataset of manually labeled daily human conversations.
  • OpenSubtitles: A large-scale, diverse dataset derived from movie scripts, providing a wide variety of conversational styles.

Results and Discussion

TEC-CVAE demonstrated superior performance across multiple metrics compared to standard baselines, including S2SA, HRED, and basic CVAE models.

Performance comparison of TEC-CVAE against baseline models on DailyDialog and OpenSubtitles datasets.

As shown in the table above, TEC-CVAE achieved the highest BLEU scores (16.15 on DailyDialog), indicating better relevance to ground-truth responses. Furthermore, the model showed significant gains in diversity, with the Dist-2 score on OpenSubtitles reaching 0.2618. The higher KL cost observed in TEC-CVAE suggests that the model successfully avoids "posterior collapse," effectively utilizing the latent variable to learn complex information rather than ignoring it.

Ablation studies confirmed that both the multi-hop attention and the controllable decoder contribute to these gains, with their combination yielding the most robust performance.

Conclusion and Future Work

The TEC-CVAE framework successfully balances the "Creativity vs. Logic" trade-off in dialogue generation. By using keywords as anchors and an expression gate as an arbiter, the model generates more meaningful and diverse responses. Future research will explore expanding the keyword extraction process to include abstract concepts and slang, as well as integrating larger external knowledge bases to handle rapid topic shifts in long-form conversations.

Summary updated

BibTeX
@inproceedings{wang2020topic,
  author = {Yiru Wang and Pengda Si and Zeyang Lei and Yujiu Yang},
  title = {{Topic Enhanced Controllable CVAE for Dialogue Generation (Student Abstract)}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i10.7250},
}
Figure