Abstract
Retrieval-based chatbots often struggle with multi-turn dialogues due to "speaker blindness" and conversational noise. This paper introduces Speaker-Aware BERT (SA-BERT), which incorporates speaker-specific embeddings and a disentanglement strategy to better model conversational context. Evaluated across five major benchmarks, SA-BERT achieves state-of-the-art performance, demonstrating that identity-aware modeling is critical for effective response selection.
Introduction
Retrieval-based chatbots function by selecting the most appropriate response from a pre-defined candidate pool based on conversation history. While Large Language Models (LLMs) like BERT excel at general text understanding, they face significant hurdles in multi-turn dialogue settings. Standard BERT architectures often suffer from "speaker blindness," treating a conversation as a monolithic block of text without distinguishing between participants. Furthermore, simple concatenation of utterances can weaken chronological logic, and BERT’s 512-token limit often forces the truncation of relevant context in long or "entangled" conversations where multiple topics overlap.
Methods: Architecture and Strategy
To address these limitations, SA-BERT introduces three primary innovations:
1. Speaker-Aware Embeddings
The core of SA-BERT is the addition of speaker-specific embeddings to every token. By adding a "Speaker A" or "Speaker B" vector to the standard token, segment, and position embeddings, the model can explicitly track who said what. Additionally, the authors introduced [EOU] (End of Utterance) and [EOT] (End of Turn) tokens to provide clearer structural boundaries within the input sequence.
2. Speaker-Aware Disentanglement Strategy (SDS)
In complex multi-party chats, conversations often become "entangled." SA-BERT employs a heuristic strategy to filter the context by identifying the "spoken-from" and "spoken-to" labels for a potential response. It then selects only the utterances involving those specific speakers, effectively "unweaving" the relevant thread from background noise and staying within the token limit.
3. Domain Adaptation
Before task-specific fine-tuning, SA-BERT undergoes an additional round of pre-training on the target dialogue datasets using Masked Language Modeling (MLM) and Next Sentence Prediction (NSP). This helps the model adapt to specific linguistic styles and technical jargon.
Experimental Setup and Datasets
The model was rigorously evaluated on five diverse public datasets:
- Ubuntu Dialogue Corpus (V1 & V2): Large-scale technical support logs.
- Douban Conversation Corpus: Social media interactions from a Chinese platform.
- E-commerce Dialogue Corpus: Real-world customer service data.
- DSTC 8 (Track 2-Subtask 2): A benchmark for response selection in entangled environments.
Results and Discussion
SA-BERT consistently outperformed previous state-of-the-art (SOTA) models, including specialized architectures like SMN, DAM, and IMN.
Key findings include:
- Ubuntu V1 & V2: Achieved improvements in $R_{10}@1$ of 5.5% and 5.9%, respectively.
- DSTC 8: On this challenging entangled dataset, SA-BERT improved the $R_{100}@1$ metric from a BERT baseline of 0.258 to 0.477—a nearly 85% relative gain.
- Ablation Studies: Removing speaker embeddings led to a significant performance drop, confirming that identity-awareness is a critical component of the model's success.
Conclusion
The success of SA-BERT highlights that identity is a vital dimension of conversational context. By moving beyond simple text concatenation and incorporating speaker awareness and smart context filtering, SA-BERT provides a robust framework for multi-turn response selection. Future work may explore more sophisticated, learned disentanglement methods to replace current rule-based heuristics.
Summary updated