Response Selection with Topic Clues for Retrieval-based Chatbots

Yu Wu, Wei Wu, Zhoujun Li, Ming Zhou

TL;DR

This paper introduces TACNTN, a novel "topic-aware convolutional neural tensor network" for retrieval-based chatbots. By explicitly incorporating topic information derived from external sources, TACNTN significantly improves the ability of chatbots to select relevant and engaging responses, especially for messages that elicit richer, more informative replies.

What Problem Does This Paper Address?

Building effective chatbots that can engage in natural, open-domain conversations is a significant challenge in AI and NLP. A key component of this is the "response selection" problem: given a user's message, how can a chatbot find the most appropriate reply from a large pool of candidates? Existing retrieval-based methods often struggle with responses that go beyond a direct answer, introducing new information or "topics" to enrich the conversation. This creates a semantic gap, making it difficult for models to match messages with these more nuanced responses. The paper aims to bridge this gap by leveraging topic information to better understand and match messages with richer responses.

Methods

The core contribution is the Topic-Aware Convolutional Neural Tensor Network (TACNTN). Here's a breakdown of its key components:

  • Siamese CNN for Message/Response Encoding: Standard convolutional neural networks (CNNs) are used to encode the input message and response into fixed-size vectors. This is a common technique for text representation.
  • Topic Word Extraction: A pre-trained Twitter LDA (Latent Dirichlet Allocation) model is used to extract "topic words" for both the message and the response. These topic words represent the underlying themes or subjects discussed.
  • Topic Vector Generation:
    • The extracted topic words are embedded into vectors.
  • A "weight calculator" determines the relevance of each topic word to the specific message or response, inspired by attention mechanisms in machine translation. This allows the model to prioritize more important topic words.
  • These weighted topic words are then combined to form a "topic vector" for both the message and the response.
  • Neural Tensor Network (NTN) for Matching: The model then uses neural tensors to calculate a matching score. Crucially, TACNTN computes three types of matching scores:
  • Between the message vector and the response vector (standard matching).
  • Between the message vector and the response topic vector.
  • Between the message topic vector and the response vector. These three scores are then combined to produce a final matching score. This multi-faceted matching allows the model to consider not only the direct semantic similarity but also the thematic alignment between the message and response.

Datasets

The paper evaluates TACNTN on two datasets:

  • Ubuntu Corpus: A large dataset of human-human dialogues about Ubuntu technical support. This dataset was used for training and evaluation, with a focus on single-turn conversations.
  • Baidu Tieba Data: A newly constructed Chinese dataset from a popular Chinese forum. This dataset was used to train the Twitter LDA model and word embeddings, and for evaluating the TACNTN model. It includes both automatically sampled negative responses and human-annotated positive responses.

Key Insights and Ideas

  • Topic Information is Crucial for Rich Responses: The paper strongly suggests that simply matching message and response content isn't enough. Responses that introduce new, relevant topics are vital for engaging conversations, but they pose a significant matching challenge.
  • External Topic Knowledge Enhances Matching: Leveraging topic models trained on large, external datasets (like Twitter or forums) provides valuable "prior knowledge" that helps the chatbot understand the thematic context of messages and responses, even if that context isn't explicitly stated in the immediate turn.
  • Attention-like Weighting for Topic Words: The method of weighting topic words based on their relevance to the message/response is key. This allows the model to focus on the most salient thematic elements, mirroring how humans might prioritize certain aspects of a conversation.
  • Multi-faceted Matching Improves Robustness: By considering message-response, message-topic-response, and message-response-topic alignments, TACNTN captures a more comprehensive understanding of the relationship between the two utterances.

Key Results

  • Significant Performance Gains: TACNTN consistently outperformed several strong baselines (including Cosine similarity, MLP, DeepMatchtopic, LSTM, CNNs, and CNTN) on both the Ubuntu and Tieba datasets across various metrics (R@k, MAP, MRR, P@1). The improvements were statistically significant.
  • Impact on Longer Responses: The analysis showed that TACNTN's gains were particularly pronounced for longer responses. This aligns with the hypothesis that richer, more informative responses benefit most from topic-aware matching.
  • Variants Analysis: Experiments with TACNTN variants indicated that simply concatenating topic words (TACNTNexp) was less effective than learning topic vectors. Furthermore, learning topic vectors in conjunction with message/response vectors (TACNTNavg) was less effective than the full TACNTN, suggesting that the interaction between topic vectors and utterance vectors is important.

Limitations and Future Work

  • Topic Model Dependence: The performance of TACNTN is inherently tied to the quality of the topic model used. The paper notes that other techniques like tag recommendation or keyword extraction could also be used to generate topic words.
  • Single-Turn Focus: The current work focuses on single-turn conversations. Extending TACNTN to handle multi-turn dialogue context is a natural next step.
  • Computational Cost: While not explicitly detailed as a limitation, the use of CNNs and NTNs implies a certain computational cost, which might be a consideration for real-time chatbot deployment.
  • Future Work: The authors suggest exploring other topic extraction methods and extending the model to multi-turn conversations. They also mention the possibility of incorporating external knowledge sources beyond topic models.

Summary updated

BibTeX
@article{wu2016response,
  author = {Yu Wu and Wei Wu and Zhoujun Li and Ming Zhou},
  title = {{Response Selection with Topic Clues for Retrieval-based Chatbots}},
  journal = {Neurocomputing},
  year = {2016},
}
Figure