Topic Aware Neural Response Generation

Chen Xing, Wei Wu, Yu Wu, Jie Liu, Yalou Huang, Ming Zhou, Wei-Ying Ma

Introduction

Standard neural conversation models, primarily based on Sequence-to-Sequence (Seq2Seq) architectures, frequently suffer from the "safe response" problem. Due to the high frequency of generic phrases like "I don't know" or "Me too" in social media training data, these models learn that such responses are statistically optimal across a wide range of contexts. While technically fluent, the resulting chatbots are unengaging and fail to provide informative content.

This research introduces TA-Seq2Seq, a model designed to mimic human conversational patterns by associating messages with topical concepts. By leveraging external knowledge to inject specific content into responses, the model moves beyond passive penalization of generic phrases toward active content generation.

The TA-Seq2Seq Framework

The proposed Topic Aware Sequence-to-Sequence model incorporates topic information through three integrated components:

  1. Topic Acquisition: The model utilizes a pre-trained Twitter LDA (Latent Dirichlet Allocation) model to extract relevant topic words from an input message. This allows the system to tap into external knowledge from large-scale social media datasets (e.g., Sina Weibo) that goes beyond simple message-response pairs.
  2. Joint Attention Mechanism: Beyond the standard attention on the input message, TA-Seq2Seq introduces Topic Attention. It synthesizes topic vectors from the LDA-derived words, using the final state of the input message to weight these words and ensure contextual relevance.
  3. Biased Generation Probability: To ensure the decoder actively utilizes the identified topics, the final word generation step is modified. The probability of generating a word is calculated as the sum of a standard distribution and a "bias" distribution that favors the predicted topic words.
Architecture of the TA-Seq2Seq model featuring Joint Attention and Biased Generation.

Experimental Evaluation

The model was trained on a high-quality dataset of 5 million post-comment pairs from Baidu Tieba, with an additional 30 million Sina Weibo posts used to train the LDA component. Evaluation was conducted on 1,000 distinct messages using both automatic metrics and human annotation.

Quantitative Results

TA-Seq2Seq demonstrated superior performance across all major metrics compared to standard Seq2Seq and Seq2Seq-MMI (Maximum Mutual Information) baselines:

  • Human Evaluation: The model achieved a 44.7% "+2" score (indicating a relevant, natural, and informative response), outperforming the S2SA-MMI baseline by 11.6%.
  • Diversity: There was a significant increase in "Distinct-1" and "Distinct-2" metrics, confirming a much higher lexical variety in the generated responses.
  • Perplexity: TA-Seq2Seq reached a lower perplexity of 122.82 (compared to 133.11 for standard Seq2Seq), suggesting higher confidence in its more complex, content-rich predictions.

Qualitative Analysis

The impact of topic injection is most visible in direct comparisons of model outputs. While baseline models often default to "Me too" or generic acknowledgments, TA-Seq2Seq generates specific, topically relevant replies.

Comparison of responses generated by TA-Seq2Seq versus baseline models showing more informative content.

Discussion and Future Work

The success of TA-Seq2Seq highlights the importance of "active content injection" in dialogue systems. By treating topics as anchors or building blocks, the model ensures that even the first word of a response sets a more informative trajectory for the subsequent RNN-generated sequence.

However, the model remains dependent on the quality of the underlying topic model. Future research could explore replacing LDA with modern dense embeddings or pulling topic words from structured knowledge bases like Wikipedia to further enhance the nuance and accuracy of the generated content.

Summary updated

BibTeX
@inproceedings{xing2017topic,
  author = {Chen Xing and Wei Wu and Yu Wu and Jie Liu and Yalou Huang and Ming Zhou and Wei-Ying Ma},
  title = {{Topic Aware Neural Response Generation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2017},
  doi = {10.1609/aaai.v31i1.10981},
}
Figure