Abstract
In multi-turn dialogue systems, selecting the most appropriate response requires a deep understanding of the conversational context. Traditional models often treat dialogue history as a single concatenated sequence, which fails in multi-party settings where multiple conversation threads overlap—a phenomenon known as "tangling." This paper proposes the Thread-Encoder, a novel framework that uses discourse dependency relations to disentangle dialogue history into distinct threads. By extracting and encoding these logical paths, the model preserves long-range dependencies that are often lost in distance-based truncation. Experimental results on the UbuntuV2, DSTC7, and DSTC8 datasets demonstrate that the Thread-Encoder achieves state-of-the-art performance, particularly in complex multi-party scenarios, while being significantly more efficient than standard cross-encoders.
Introduction: The Tangled History Problem
Multi-turn response selection is a critical task in conversational AI, where a model must pick the best next message from a set of candidates based on the preceding dialogue. However, most existing models struggle with "tangled" histories. In a typical chat room, multiple users may discuss different topics simultaneously, leading to interleaved messages that break the linear flow of any single conversation.
Standard sequential or hierarchical models often ignore these dependency relations, treating the history as a chronological block. This can lead to the model losing track of the relevant context or truncating important earlier messages in favor of more recent but irrelevant ones.
Methodology
The researchers from Shanghai Jiao Tong University and China Merchants Bank propose a two-stage approach to address this: Dialogue Extraction and the Thread-Encoder model.
1. Dialogue Extraction Algorithm
The first stage involves "untangling" the conversation using a discourse dependency parser. This parser identifies "reply-to" relationships between utterances, forming a dependency tree. The algorithm then extracts paths from the most recent messages (leaf nodes) back to the root. Each path represents a self-contained sub-dialogue thread. These threads are ranked based on the proximity of their last message to the current turn, ensuring that the most contextually relevant threads are prioritized for the model.
2. The Thread-Encoder Architecture
Once threads are extracted, they are processed by the Thread-Encoder. The model is built upon a Transformer architecture pretrained on large-scale dialogue data.
The model operates in three main steps:
- Encoding: Each extracted thread and the candidate response are encoded separately. The researchers evaluated two variants:
Thread-bi, which uses simple averaging for thread representation, andThread-poly, which utilizes multi-head attention to capture diverse semantic features within a thread. - Matching Layer: An attention mechanism is applied to compare the candidate response embedding against the various thread embeddings. This allows the model to "attend" to the most relevant threads.
- Scoring: A final matching score is calculated to rank the candidate responses.
Experimental Evaluation
The model was benchmarked against three major datasets: UbuntuV2 (two-party technical support), DSTC7 (two-party dialogue), and DSTC8* (complex multi-party dialogue).
Key Results
The Thread-Encoder achieved state-of-the-art (SOTA) results on both DSTC7 and DSTC8. On DSTC7, the Thread-poly model reached an MRR of 80.4, surpassing even heavy Cross-Encoder models. The performance gains were most pronounced in the multi-party DSTC8 dataset, proving that dependency-based threading is highly effective for resolving complex conversational structures. Furthermore, the Thread-Encoder is approximately 150 times faster than standard Cross-Encoders, making it a viable solution for real-time applications.
Conclusion
The Thread-Encoder demonstrates that logical structure is more important than simple recency in dialogue understanding. By leveraging dependency relations to disentangle conversation threads, the model effectively navigates complex multi-party interactions. Future work may focus on improving the robustness of the underlying dependency parser and incorporating speaker-specific features to further enhance response selection accuracy.
Summary updated