Global Thread-level Inference for Comment Classification in Community Question Answering

Shafiq R. Joty, Alberto Barrón-Cedeño, Giovanni Da San Martino, Simone Filice, Lluís Màrquez, Alessandro Moschitti, Preslav Nakov

Introduction

In Community Question Answering (CQA) platforms like Stack Overflow or Qatar Living, a single question often generates a complex thread of comments. While some comments provide direct answers, others are conversational fluff or side discussions. Traditional classification systems typically evaluate question-comment pairs in isolation, ignoring the broader context of the conversation. This paper proposes a global inference approach that treats an entire forum thread as a connected structure, leveraging the "wisdom of the thread" to improve classification accuracy.

The Problem: Contextual Dependencies

Standard CQA systems often fail because they ignore dependencies between comments. For instance, if a user posts "I agree with the post above," the label of that comment depends entirely on the preceding one. Furthermore, identical or highly similar comments within a thread should logically share the same label. The challenge lies in maintaining global consistency across a thread where dependencies can span multiple intermediate posts and non-linear relationships.

Methodology

The researchers developed a two-stage framework combining local classification with global logical constraints:

  1. Local Classifiers: Maximum Entropy (MaxEnt) models were trained to generate two types of scores: a "Good-vs-Bad" score for individual comments and a "Same-vs-Different" score to determine if any two comments in a thread should share the same label.
  2. Global Inference: To enforce consistency, two frameworks were tested:
  3. Graph-cut: The thread is modeled as a graph where nodes are comments and edges represent similarity scores. A min-cut algorithm then partitions the graph into optimal "Good" and "Bad" clusters.
  4. Integer Linear Programming (ILP): This approach formulates classification as an optimization problem with transitivity constraints (e.g., if A is like B, and B is like C, then A must be like C).

These were compared against a Conditional Random Field (CRF) to test whether simple linear sequence modeling was sufficient for thread logic.

Datasets and Experimental Setup

The study utilized the SemEval-2015 Task 3 (Subtask A) benchmark, which consists of data from the Qatar Living forum. The authors focused on binary classification (High-quality vs. Low-quality) by merging "Bad" and "Potentially Useful" labels into a single category.

Dataset statistics for the SemEval-2015 Task 3 benchmark.

Key Results

The global inference models significantly outperformed both local baselines and previous state-of-the-art systems. As shown in the results table, the Graph-cut model achieved the highest performance, surpassing the top-ranked system from the SemEval-2015 competition (JAIST).

Performance comparison of global inference models against state-of-the-art systems.
  • Accuracy: The Graph-cut model reached 79.80% accuracy, a notable improvement over the local MaxEnt baseline (78.43%).
  • F1 Score: The Graph-cut model achieved an F1 of 80.55, outperforming JAIST's 78.96.
  • Graph-cut vs. ILP: While both were effective, Graph-cut generally provided slightly better precision and overall accuracy.

Discussion and Insights

  • Failure of Linear Chains: Interestingly, the CRF model performed worse than the local classifier. This indicates that forum threads are not simple linear chains; they contain branching and long-distance relationships that sequence models fail to capture.
  • The "Voting" Effect: Global inference allows high-confidence labels to "rescue" uncertain ones. If a local classifier is unsure about a comment but the global model sees it is highly similar to several "Good" comments, it will correctly flip the label to "Good."
  • Distance Independence: By looking at pairs at any distance, the model captures users returning to points made much earlier in a long conversation.

Conclusion and Future Work

While global inference provides a significant boost, the system's performance is currently limited by the accuracy of the "Same-vs-Different" pairwise classifier. Future improvements could involve using deeper semantic features, such as textual entailment, to better identify relationships between comments. Additionally, extending global consistency checks across multiple threads on the same topic remains a promising area for research.

Summary updated

BibTeX
@inproceedings{joty2015global,
  author = {Shafiq R. Joty and Alberto Barrón-Cedeño and Giovanni Da San Martino and Simone Filice and Lluís Màrquez and Alessandro Moschitti and Preslav Nakov},
  title = {{Global Thread-level Inference for Comment Classification in Community Question Answering}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2015},
  doi = {10.18653/v1/d15-1068},
}
Figure