Stylized Dialogue Response Generation Using Stylized Unpaired Texts

Yinhe Zheng, Zikai Chen, Rongsheng Zhang, Shilei Huang, Xiaoxi Mao, Minlie Huang

Abstract

Generating stylized responses is essential to build intelligent and engaging dialogue systems. However, this task is far from well-explored due to the difficulties of rendering a particular style in coherent responses, especially when the target style is embedded only in unpaired texts that cannot be directly used to train the dialogue model. This paper proposes a stylized dialogue generation method that can capture stylistic features embedded in unpaired texts. Specifically, our method can produce dialogue responses that are both coherent to the given context and conform to the target style. In this study, an inverse dialogue model is first introduced to predict possible posts for the input responses, and then this inverse model is used to generate stylized pseudo dialogue pairs based on these stylized unpaired texts. Further, these pseudo pairs are employed to train the stylized dialogue model with a joint training process, and a style routing approach is proposed to intensify stylistic features in the decoder. Automatic and manual evaluations on two datasets demonstrate that our method outperforms competitive baselines in producing coherent and style-intensive dialogue responses.

Introduction

Modern dialogue systems typically rely on massive datasets of post-response pairs. However, developing agents with specific personas or styles—such as "formal English" or the archaic prose of a martial arts novelist—is hindered by a lack of parallel dialogue data in those styles. While "unpaired" text (novels, formal documents) is abundant, simply applying style transfer to a generic response often breaks conversational logic.

The challenge of maintaining coherence: A pipelined approach fails to recognize the gender context, whereas the proposed model maintains both style and coherence.

As shown in Figure 1, a standard style transfer model might change a generic response to "The pleasure is all mine, sir," which is stylistically formal but contextually incorrect if the speaker's husband was the one helped. This research aims to bridge the gap between style intensity and conversational coherence.

Methodology

The proposed framework introduces three primary innovations to handle unpaired stylized text:

  1. Inverse Dialogue Model: To overcome the lack of stylized dialogue pairs, the researchers developed a model that works in reverse. Given a stylized sentence from an unpaired corpus, the inverse model predicts a likely preceding "post." This process generates synthetic "pseudo-dialogue pairs" for training.
  2. Style Routing: Traditional models often inject style information only as a prefix. This paper introduces "Style Routing," which fuses style embeddings into every layer of the Transformer decoder, ensuring the target style is maintained throughout the entire generation process.
  3. Joint Training: The system employs an iterative joint training process. It simultaneously updates the stylized dialogue model and the inverse model, allowing the system to refine the interaction between style and content dynamically.

Experimental Setup and Results

The model was evaluated on two datasets: WDJN (Weibo-Jinyong), which uses Chinese martial arts novel prose, and TCFC (Topical-Chat Formal Corpus), focusing on English formality.

Average style intensity across different coherency levels for the WDJN and TCFC datasets.

Key Findings

  • Coherence vs. Intensity: There is a known trade-off between how stylized a response is and how well it fits the context. As illustrated in Figure 4, the proposed model consistently achieves higher style intensity across various coherency levels compared to baselines like S2S+BT (Back-Translation) and SFusion.
  • Style Accuracy: On the TCFC dataset, the model achieved a style accuracy of 97.3% (via BERT classifier), significantly higher than the 86.3% achieved by the back-translation baseline.
  • Literary Performance: On the challenging Jinyong dataset, the model reached a BLEU score of 13.6, nearly doubling the performance of several baselines while maintaining high fluency and coherence.

Conclusion

By leveraging an inverse dialogue model to create pseudo-data and implementing layer-wise style routing, this method effectively captures stylistic features from unpaired texts without sacrificing conversational logic. While the quality of the source unpaired data remains a factor in final coherence, the approach sets a new benchmark for stylized response generation. Future work will explore applying this "inverse-to-pseudo-pair" logic to other domains like stylized summarization and creative storytelling.

Summary updated

BibTeX
@inproceedings{zheng2021stylized,
  author = {Yinhe Zheng and Zikai Chen and Rongsheng Zhang and Shilei Huang and Xiaoxi Mao and Minlie Huang},
  title = {{Stylized Dialogue Response Generation Using Stylized Unpaired Texts}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i16.17711},
}
Figure