Abstract
Generating relevant responses in a dialog is challenging, and requires not only proper modeling of context in the conversation but also being able to generate fluent sentences during inference. In this paper, we propose a two-step framework based on generative adversarial nets for generating conditioned responses. Our model first learns a meaningful representation of sentences by autoencoding and then learns to map an input query to the response representation, which is in turn decoded as a response sentence. Both quantitative and qualitative evaluations show that our model generates more fluent, relevant, and diverse responses than existing state-of-the-art methods.
Introduction
Standard sequence-to-sequence (Seq2Seq) models often suffer from the "generic response problem," frequently producing safe but uninformative utterances like "I don't know." This occurs because cross-entropy loss tends to average multimodal distributions of potential responses, leading to a lack of diversity. While Variational Autoencoders (VAEs) introduce stochasticity, their decoders often remain tied to cross-entropy, failing to fully resolve the issue.
This paper introduces a two-step framework that leverages Generative Adversarial Networks (GANs) within the continuous latent space of a VAE. By performing adversarial learning on latent representations rather than discrete tokens, the model avoids the complexities of reinforcement learning while effectively capturing the diverse modes of natural conversation.
Methods
The proposed architecture decouples sentence representation from the conversational mapping through a two-stage process.
Step 1: Learning the Latent Space
First, a Variational Autoencoder (VAE) is trained on a large corpus to learn a smooth, regularized latent space. Each sentence $s$ is mapped to a continuous vector $z_s$. This ensures that the representation space is well-structured for the subsequent mapping task.
Step 2: Adversarial Mapping
Once the latent space is established, a GAN is trained entirely within this continuous domain:
- Generator ($G$): Maps a query's latent vector $z_q$ to a predicted response vector $\hat{z}_r$.
- Discriminator ($D$): Distinguishes between "real" response vectors (from the VAE encoder) and "fake" ones produced by $G$, conditioned on $z_q$.
To stabilize training and prevent mode collapse, the authors incorporate an auxiliary Mean Squared Error (MSE) loss. This hybrid objective forces the generator to remain near the ground-truth target while the adversarial loss encourages the exploration of realistic, diverse regions of the latent space.
Experimental Results
The model was evaluated on the DailyDialog and Switchboard datasets. The proposed VAE-AM (Adversarial + MSE) model was compared against several baselines, including Seq2Seq, CVAE, and DialogWAE.
Key findings include:
- Diversity: VAE-AM achieved significantly higher inter-diversity scores, indicating a successful mitigation of the generic response problem.
- Fluency and Relevance: The model maintained high BLEU scores and achieved superior Perplexity (PPL) scores, suggesting that the generated responses were both contextually relevant and grammatically natural.
- Human Evaluation: Blind tests confirmed that human judges preferred VAE-AM for its superior relevance and fluency compared to DialogWAE.
Discussion and Conclusion
The success of this approach highlights the advantages of operating in a continuous latent space. By moving the adversarial "fight" away from discrete tokens, the model bypasses the need for complex Reinforcement Learning or Gumbel-Softmax tricks. The combination of GAN and MSE losses provides a balance between "creativity" (mode-capturing) and "accuracy" (mode-averaging).
Future work may address the challenges of multi-turn dialog, where increasing context complexity currently impacts fluency. Additionally, improving the reconstruction quality of the underlying VAE could further enhance the sharpness and accuracy of the generated responses.
Summary updated