Introduction
In ideal conversational modeling, dialogue follows a strict turn-taking structure where each utterance directly responds to the one immediately preceding it. However, real-world online messaging—particularly in e-commerce customer service—is significantly more chaotic. Users often send multiple messages in quick succession, agents may address questions out of order, and topics can shift abruptly without explicit transitions. This lack of linearity poses a major challenge for extracting high-quality training data for conversational AI, as the relevant context for any given response is often obscured.
Problem Formulation
This research addresses the task of automatically uncovering the hidden "dependency" structure within these dialogues. The authors frame the problem as a classification task: for every message $i$, the goal is to identify which previous message $j$ (within a fixed window) it is most likely responding to. If a message does not respond to a previous utterance—indicating a new topic or an elaboration—it is modeled as a "self-loop" linking to itself. This conceptualizes a chat as a "forest" of dependency trees, where the number of distinct threads is not known a priori.
Methodology
The proposed solution utilizes a probabilistic log-linear classifier to determine the likelihood of a link between two messages. The model integrates three primary feature sets:
- Lexical and Structural Features: Binary indicators for question words, answer-oriented vocabulary, and the presence of URLs, images, or emoticons. It also accounts for the speaker's identity.
- Distance Features: The numerical gap (number of utterances) between the candidate messages.
- Semantic Similarity (LDA): Latent Dirichlet Allocation (LDA) is employed to represent messages as distributions over topics. The model calculates the cross-entropy between these distributions to measure semantic alignment.
The classifier is trained by maximizing the conditional likelihood of correct links, as identified by human annotators, using L2 regularization to prevent overfitting.
Experimental Setup
The study utilized a real-world dataset of customer service logs from a major Chinese e-commerce platform, comprising 9,000 chats. A subset of 800 chats (ranging from 10 to 35 utterances each) was manually labeled by native speakers to create a gold standard for training and evaluation. Text was preprocessed using the jieba segmenter, with rare words and non-character elements replaced by generic tokens to minimize noise.
Results and Discussion
The discriminative model significantly outperformed standard rule-based heuristics. While a common baseline is to assume every message links to the immediate precedent, this approach only achieved an accuracy of 0.546. In contrast, the proposed discriminative model reached an accuracy of 0.624, which improved further to 0.626 with the inclusion of LDA-based semantic features.
Interestingly, the boost from semantic features was relatively marginal. This suggests that in short-form chat, structural and lexical cues (such as the presence of a question mark) provide the most critical signals for dependency. Given that human annotators only agreed with each other approximately 67.7% of the time, the model's performance is remarkably close to the human upper bound for this inherently ambiguous task.
Conclusion and Future Work
This work demonstrates that a feature-rich probabilistic approach can effectively recover conversational threads in messy, real-world dialogues. Future research will focus on more sophisticated semantic modeling beyond standard LDA and exploring feature correlations to further bridge the gap between machine performance and human intuition.
Summary updated