Abstract
Retrieval-based chatbots are valued for their human-like and informative responses, yet they often fail to convey specific emotions (affect) effectively. Traditional "Retrieve-and-Rerank" approaches frequently sacrifice content relevance for emotional alignment, leading to generic or off-topic outputs. This paper introduces the Retrieve-Discriminate-Rewrite (RDR) framework, which treats retrieved responses as high-quality drafts. By first retrieving for content and then rewriting for sentiment, RDR ensures chatbots remain contextually relevant while accurately expressing target emotions.
Introduction
Modern chatbots generally follow either generation-based or retrieval-based paradigms. Retrieval-based systems are preferred in many applications due to their ability to provide diverse and informative responses from large-scale human conversation repositories. However, incorporating "affect"—the ability to express specific sentiments—remains a significant challenge.
The conventional "Retrieve-and-Rerank" strategy selects a set of candidate responses and promotes the one that best matches a target emotion. This often results in a "zero-sum game": the most relevant response may be neutral, while the emotionally aligned response may be generic (e.g., "I'm so happy!") or irrelevant to the conversation context.
The Retrieve-Discriminate-Rewrite (RDR) Framework
To overcome the limitations of reranking, the RDR framework shifts the focus from selection to transformation. It treats the retrieval module as a "black box" that provides a content-rich draft, which is then refined to meet emotional requirements.
The RDR process consists of three core modules:
- Retrieval Module: Employs standard retrieval models (such as SMN or MSN) to identify the most contextually relevant response from a repository, prioritizing content over sentiment.
- Discrimination Module: A BERT-based classifier evaluates whether the retrieved "draft" already aligns with the target affect label (e.g., Positive or Negative). If the sentiment is correct, the response is returned as-is.
- Rewriting Module: If a sentiment mismatch is detected, the system executes a "Delete and Generate" operation. It identifies and removes words carrying the incorrect sentiment and then utilizes GPT-based transformers to fill in the gaps, first creating a neutral base and then transforming it into the final affective response.
Datasets: Sentimental Douban Conversation Corpus (SDCC)
A primary obstacle in affective retrieval research is the scarcity of labeled datasets. The authors addressed this by creating the Sentimental Douban Conversation Corpus (SDCC). Building on the multi-turn Douban Conversation Corpus, they manually annotated over 10,000 utterances and used a RoBERTa-large classifier to automatically label the remaining 4.3 million utterances. This corpus serves as a benchmark for training and evaluating affective dialogue models.
Key Results and Insights
The RDR framework was evaluated against standard baselines using human judgment, as automatic metrics like BLEU often fail to capture dialogue quality.
- Content and Sentiment Balance: RDR achieved a content score of 3.727 (out of 5), significantly outperforming the Reranking baseline (3.202). Simultaneously, it reached a sentiment polarity accuracy of 70.8%, compared to 62.7% for Reranking.
- Fluency: Despite the multi-stage rewriting process, responses maintained high fluency (scoring 4.353), demonstrating the effectiveness of the GPT-based generators.
- The "Neutral" Bridge: A key finding was that transitioning through a neutral intermediate state provides a more stable foundation for sentiment transformation than direct emotion-to-emotion mapping.
Conclusion and Future Work
The RDR framework demonstrates that high-quality content is harder to find than emotional tone. By decoupling these two aspects, chatbots can achieve better performance across both dimensions. Future research will aim to expand the framework beyond binary sentiment to handle more nuanced human emotions like joy, anger, and sadness. The authors also emphasize the ethical importance of ensuring affective chatbots are not misused as substitutes for professional mental health support.
Summary updated