Towards Diverse, Relevant and Coherent Open-Domain Dialogue Generation via Hybrid Latent Variables

Bin Sun, Yitong Li, Fei Mi, Weichao Wang, Yiwei Li, Kan Li

Abstract

Conditional variational models, using either continuous or discrete latent variables, are powerful for open-domain dialogue response generation. However, previous works show that continuous latent variables tend to reduce the coherence of generated responses. In this paper, we also found that discrete latent variables have difficulty capturing more diverse expressions. To tackle these problems, we combine the merits of both continuous and discrete latent variables and propose a Hybrid Latent Variable (HLV) method. Specifically, HLV constrains the global semantics of responses through discrete latent variables and enriches responses with continuous latent variables. Thus, we diversify the generated responses while maintaining relevance and coherence. In addition, we propose Conditional Hybrid Variational Transformer (CHVT) to construct and to utilize HLV with transformers for dialogue generation. Through fine-grained symbolic-level semantic information and additive Gaussian mixing, we construct the distribution of continuous variables, prompting the generation of diverse expressions. Meanwhile, to maintain the relevance and coherence, the discrete latent variable is optimized by self-separation training. Experimental results on two dialogue generation datasets (DailyDialog and Opensubtitles) show that CHVT is superior to traditional transformer-based variational mechanism w.r.t. diversity, relevance and coherence metrics. Moreover, we also demonstrate the benefit of applying HLV to fine-tuning two pre-trained dialogue models (PLATO and BART-base).

Introduction: The One-to-Many Challenge

Open-domain dialogue generation is notoriously difficult because of the one-to-many phenomenon: for any given prompt (e.g., "How are you?"), there are countless valid responses. Standard models often struggle with a fundamental trade-off between diversity and coherence.

Continuous latent variables (CVAEs) are effective for diversity but often suffer from "posterior vanishing," where the model ignores the latent space and produces generic, "safe" responses. Conversely, discrete latent variables are better at capturing distinct semantic intents but are often too coarse to capture the subtle, fine-grained variations in human language.

Conceptual comparison of continuous and discrete latent variables in dialogue generation.

Methodology: Hybrid Latent Variables

The authors propose the Conditional Hybrid Variational Transformer (CHVT), which integrates Hybrid Latent Variables (HLV) into a Transformer architecture. The core idea is a functional "division of labor": discrete variables act as a constraint to ensure the response stays on topic, while continuous variables provide stylistic flair and vocabulary variety.

Key Components of CHVT

  1. Continuous Latent Variables via Additive Gaussian Mixing: Instead of using a single sentence-level summary (like a [CLS] token), the model creates Gaussian distributions for every token in the context. These are combined using an "additive Gaussian mixing" method to create a rich, sentence-level continuous latent variable ($z_s$).
  2. Discrete Latent Variables via Self-Separation: The model maintains a pool of trainable discrete latent variables. During training, it uses "self-separation," optimizing only the specific discrete variable that best helps reconstruct the ground-truth response. This forces different discrete variables to specialize in different semantic "modes."
  3. The Hybrid Step: The continuous variable $z_s$ is added to the selected discrete variable to form the final HLV, which then guides the Transformer decoder.
The architecture of CHVT, illustrating the construction of continuous latent variables and self-separation training for discrete variables.

Relaxed KL Divergence ($D_{RKL}$)

The authors provide a mathematical proof (Theorem 1) that for one-to-many problems, there is a non-zero extreme minimum for KL divergence. Forcing it to zero actually causes the model to fail. They introduce a "relaxed" version of this loss function to prevent the model from falling into the posterior vanishing trap.

Experimental Results

The model was evaluated on two standard benchmarks: DailyDialog (high-quality human dialogues) and OpenSubtitles (large-scale movie data).

  • Superior Diversity and Coherence: CHVT significantly outperformed non-pretrained baselines on "Distinct-n" metrics. On DailyDialog, CHVT achieved a coherence score of 0.7683, compared to 0.6838 for a standard Transformer.
  • Plug-and-Play Success: The HLV method was applied to large pre-trained models like PLATO and BART-base. In both cases, adding HLV improved performance across almost all metrics, suggesting that even massive models benefit from this hybrid latent structure.
  • The $D_{RKL}$ Effect: Using the relaxed KL divergence specifically helped boost BLEU scores, confirming that allowing the model a "budget" for latent variance leads to better reconstruction of human-like responses.

Conclusion

By combining the merits of continuous and discrete latent variables, CHVT addresses the long-standing trade-off between diversity and relevance in dialogue generation. The model's ability to anchor global semantics while enriching fine-grained expressions makes it a powerful tool for building more engaging and coherent conversational agents. Future work may explore how these hybrid structures scale with multi-billion parameter foundation models.

Summary updated

Abstract

Conditional variational models, using either continuous or discrete latent variables, are powerful for open-domain dialogue response generation. However, previous works show that continuous latent variables tend to reduce the coherence of generated responses. In this paper, we also found that discrete latent variables have difficulty capturing more diverse expressions. To tackle these problems, we combine the merits of both continuous and discrete latent variables and propose a Hybrid Latent Variable (HLV) method. Specifically, HLV constrains the global semantics of responses through discrete latent variables and enriches responses with continuous latent variables. Thus, we diversify the generated responses while maintaining relevance and coherence. In addition, we propose Conditional Hybrid Variational Transformer (CHVT) to construct and to utilize HLV with transformers for dialogue generation. Through fine-grained symbolic-level semantic information and additive Gaussian mixing, we construct the distribution of continuous variables, prompting the generation of diverse expressions. Meanwhile, to maintain the relevance and coherence, the discrete latent variable is optimized by self-separation training. Experimental results on two dialogue generation datasets (DailyDialog and Opensubtitles) show that CHVT is superior to traditional transformer-based variational mechanism w.r.t. diversity, relevance and coherence metrics. Moreover, we also demonstrate the benefit of applying HLV to fine-tuning two pre-trained dialogue models (PLATO and BART-base).
BibTeX
@inproceedings{sun2023towards,
  author = {Bin Sun and Yitong Li and Fei Mi and Weichao Wang and Yiwei Li and Kan Li},
  title = {{Towards Diverse, Relevant and Coherent Open-Domain Dialogue Generation via Hybrid Latent Variables}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  url = {https://openreview.net/forum?id=1pXFiZAQgz},
}
Figure