Discovering Conversational Dependencies between Messages in Dialogs

Wenchao Du, Pascal Poupart, Wei Xu

Abstract

This paper introduces a probabilistic approach to "disentangling" online chats by identifying which messages logically respond to or follow others. By leveraging conversational features and semantic similarity, the authors successfully map the non-linear structure of customer service dialogs, outperforming standard heuristic baselines and moving closer to human-level performance in understanding message dependencies.

Introduction

In a perfect world, conversations follow a strict "turn-taking" pattern: Person A speaks, then Person B responds. However, real-world online messaging—especially in customer service—is messy. A customer might send three questions in a row, and an agent might answer them out of order or provide a single response that covers two points.

This lack of linear structure makes it difficult for AI to learn from chat logs. If you want to train a chatbot using "message-response" pairs, you first need to know which message actually belongs to which response. The authors aim to automatically identify these conversational dependencies, transforming a flat list of messages into a structured "forest" of related threads.

Example of conversational dependencies in a chat dialog.

Methodology

The authors propose a probabilistic classifier that determines the likelihood of a message $i$ depending on a previous message $j$. The model treats the conversation as a 1-regular directed graph, where every message points to exactly one "parent" (including itself, indicating the start of a new thread or a self-elaboration).

Key Features:

  • Conversational & Lexical: Binary indicators such as speaker identity, the presence of question marks or "answer" words, and whether the message contains URLs, images, or emoticons.
  • Temporal Distance: The number of utterances apart the two messages are, acknowledging that dependencies usually happen close together but not always.
  • Semantic Similarity (LDA): The authors extended their model using Latent Dirichlet Allocation (LDA) to calculate the "cross-entropy" between the topic distributions of two messages.

The approach uses a discriminative learning technique optimized via limited-memory BFGS (L-BFGS). Unlike standard discourse parsing methods that assume a single "tree" structure, this model allows for a "forest" structure.

Experimental Setup

The study uses a real-world dataset of customer service logs from a Chinese e-commerce website.

  • Total Data: 9,000 chats ranging from 5 to 60 utterances.
  • Annotated Subset: 800 chats (10–35 utterances each) were manually labeled by six native speakers.
  • Characteristics: The text is "noisy," containing frequent typos, ungrammatical sentences, and e-commerce-specific jargon.
  • Preprocessing: The team used jieba for Chinese word segmentation and replaced rare words or non-character lexicons with generic type tokens.

Results and Discussion

The proposed model was compared against two rule-based baselines: linking every message to the immediate previous one (Rule 1), and linking to the previous message only if it's from a different speaker (Rule 2).

Performance comparison of the proposed discriminative model against rule-based baselines.

The proposed model significantly outperformed the baselines. For context, the authors estimated human performance at 0.677 accuracy, meaning their model is approaching the level of consistency found between human annotators.

Key Insights:

  • The Difficulty of Human Agreement: Even for humans, this task is subjective. Annotators only agreed perfectly on about 54% of labels (Fleiss’ Kappa of 0.482).
  • The Distance Factor: Physical distance between messages in a chat is a powerful predictor of dependency.
  • LDA's Limited Impact: Surprisingly, adding semantic similarity via LDA only provided a marginal improvement. This suggests that in short, noisy chat messages, simple topic modeling might not be granular enough to capture specific "reply-to" relationships.

Conclusion

This research demonstrates that a probabilistic discriminative approach can effectively recover the underlying structure of complex, non-linear dialogs. While the model approaches human-level performance, limitations remain in semantic modeling. Future work will explore more sophisticated variants of LDA or deep learning-based embeddings to better capture the nuances of conversational context.

Summary updated

BibTeX
@inproceedings{du2017discovering,
  author = {Wenchao Du and Pascal Poupart and Wei Xu},
  title = {{Discovering Conversational Dependencies between Messages in Dialogs}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2017},
  doi = {10.1609/aaai.v31i1.11111},
}
Figure