Neural Stylistic Response Generation with Disentangled Latent Variables

Qingfu Zhu, Wei-Nan Zhang, Ting Liu, William Yang WangACL 2021 · OpenReview

TL;DR

This paper tackles the challenge of generating conversational responses that are both stylistically appropriate and relevant to the dialogue context. They propose a novel method to disentangle "style" and "content" within a latent space, allowing for better control over stylistic intensity without sacrificing conversational relevance.

What Problem Does This Paper Address?

Generating natural-sounding conversational responses that also adhere to a specific style (e.g., formal, polite, humorous) is a difficult task. Existing methods often struggle with a trade-off: increasing stylistic intensity can lead to responses that are less relevant to the ongoing conversation. This is partly because current models often entangle stylistic and content information in their internal representations. Furthermore, creating large, parallel datasets where responses are explicitly labeled with both content and style is labor-intensive and time-consuming. This paper aims to address this by developing a method that can learn to generate stylized responses using readily available conversational data and separate stylistic data, without requiring explicit style labels for the conversational pairs.

Methods

The core of this paper's contribution lies in its novel approach to disentangling style and content within a structured latent space. They build upon existing work that uses a structured latent space to align dialogue history, response, and stylistic sentence representations.

Here's a breakdown of their key methodological innovations:

  • Disentanglement via Diluting Strategy: The central idea is to "dilute" sentence-level content information within the style representation. During training, they replace a response's style representation with the average style representation of its batch. This forces the model to encode content information more strongly into the content representation, as it's less likely to be corrupted by the averaged style. Conversely, the average style representation, being consistent across the batch, helps maintain the desired style.
  • Unified Framework: They propose a single, unified framework that optimizes for both style intensity and content relevance simultaneously. This contrasts with some prior methods that might train separate models and then combine them.
  • Modified Smoothness Objective: The smoothness objective, which encourages the latent space to be continuous and decodable, is adapted to work with the disentangled representations. This ensures that interpolations in the latent space lead to natural-sounding responses.
  • Inference-time Style Injection: For inference, they introduce a soft combination approach where the dialogue history representation is combined with the desired style representation. This allows for controlled injection of style.
  • Re-ranking Strategy: To further refine the generated responses, they employ a re-ranking strategy that balances the probability of a response being relevant (measured by a standard S2S model) and having the desired style (measured by a classifier).

Datasets

The authors utilize two main datasets:

  • DailyDialog: This is a human-written, multi-turn conversational dataset used as the primary source for dialogue history and response pairs.
  • Holmes: This is a monolingual stylistic dataset, derived from the Sherlock Holmes novel series, used to provide examples of the desired "Holmes" style (formal and polite).

Key Insights and Ideas

  • Entanglement is the Root Cause: The paper strongly suggests that the trade-off between style and content in previous methods stems from the entanglement of these two aspects in the latent space.
  • Averaging as a Disentanglement Tool: Using batch-average style representations as a form of "noise" for the content encoder is a clever way to encourage content-specific encoding.
  • Style Intensity vs. Content Relevance is a Spectrum: The paper visually and quantitatively demonstrates that there's a tunable trade-off (controlled by parameter 'a') between style intensity and content relevance, and their method finds a sweet spot.
  • Disentanglement Improves Style Without Hurting Content: The core finding is that their method can significantly boost style intensity while maintaining or even improving content relevance, a feat that previous methods struggled with.

Key Results

  • Automatic Evaluation: Their approach achieved the highest harmonic mean of style intensity (SI) and BLEU-4 scores, indicating a good balance between style and content relevance. Specifically, they report a significant improvement in SI (up to 95.37% compared to Style Fusion) while maintaining comparable BLEU scores.
  • Human Evaluation: Human evaluators significantly preferred their approach for style intensity, with a much higher "Win" percentage compared to baselines. Crucially, the content relevance was comparable to baselines, suggesting their method successfully improves style without sacrificing conversational quality.
  • Ablation Study: Removing components like disentanglement, fusion, or smoothness objectives led to a significant decline in style intensity, highlighting the importance of each part of their proposed architecture.
  • Style Classification Accuracy: Their method achieved a very low decrease (1.71%) in style classification accuracy when only using the disentangled style representation (Zs), compared to using the full latent variable ([Zc : Zs]). This strongly supports their claim that style information is effectively disentangled into Zs.

Limitations and Future Work

  • Pre-training Models: The authors note that they do not employ pre-trained models like DialoGPT or GPT-2 because their disentanglement approach relies on static sentence representations, which are not directly available in attention-based pre-trained models. This suggests future work could explore integrating their disentanglement strategy with modern large language models.
  • Parameter Tuning: While they identify an optimal 'a' value (around 0.5) for balancing style and content, the re-ranking parameters (gamma, eta, and n-gram weights) still require careful tuning.
  • Dataset Specificity: The "Holmes" style is a specific example. Future work could explore disentangling and generating a wider range of styles.
  • Global Sentence Representation: The reliance on static sentence representations for disentanglement might limit its applicability to models that inherently lack such representations.

The paper concludes by proposing a uniform framework that effectively disentangles style and content, leading to improved stylistic response generation without compromising conversational relevance.

Summary updated

BibTeX
@inproceedings{zhu2021neural,
  author = {Qingfu Zhu and Wei-Nan Zhang and Ting Liu and William Yang Wang},
  title = {{Neural Stylistic Response Generation with Disentangled Latent Variables}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
  url = {https://openreview.net/forum?id=N5RI7tG6aSp},
}
Figure