Duplicate Question Retrieval and Confirmation Time Prediction in Software Communities

Rima Hazra, Debanjan Saha, Amruit Sahoo, Somnath Banerjee, Animesh MukherjeearXiv 2023

TL;DR

This paper introduces a dual-task framework for managing Community Question Answering (CQA) platforms: retrieving duplicate questions and predicting the time required for their official confirmation. By combining transformer-based text embeddings with structural features from a tag co-occurrence network, the authors significantly outperform existing state-of-the-art methods on the AskUbuntu dataset.

What Problem Does This Paper Address?

Community Question Answering (CQA) sites like AskUbuntu are goldmines of information, but they suffer from high redundancy. New users often post questions that have already been answered, creating a massive manual workload for expert moderators who must identify and link these duplicates.

The authors identify two critical bottlenecks:

  1. Retrieval Efficiency: Finding a needle (a duplicate) in a haystack of hundreds of thousands of archived questions is computationally expensive and difficult to do in real-time.
  2. Confirmation Delay: Even after a potential duplicate is flagged, it often takes days to receive enough community votes to be officially "closed." As shown in the figure below, nearly 40% of duplicate pairs take more than five days to be confirmed, during which time they continue to attract thousands of views and potentially fragment the community's knowledge.
Figure 1: The pie chart represents the fraction of marked duplicate pairs that have been confirmed as duplicates after a particular time. The corresponding bar shows the view count of the latest question in the pair which took more than 5 days to get confirmed.

Methods

The researchers propose a Siamese Neural Network architecture (referred to as TE for Transformer Encoder) to tackle these issues.

1. Duplicate Question Retrieval

The model generates embeddings for questions using two primary sources:

  • Textual Features: They use a pre-trained transformer encoder (MiniLM) to process question titles and bodies.
  • Network Features: They construct a tag co-occurrence network where tags are nodes and edges represent how often they appear together. They use node2vec to generate structural embeddings for these tags.

The training phase utilizes a triplet margin loss function, which encourages the model to minimize the distance between an "anchor" question and its known duplicate while maximizing the distance to a "negative" (non-duplicate) question. A key innovation here is their negative sampling strategy, which uses duplicate clusters and tag overlaps to select "hard" negatives that challenge the model to learn finer distinctions.

Figure 2: Training phase.

2. Confirmation Time Prediction

The authors model this as a regression task. They take the concatenated embeddings of a question pair and feed them into standard machine learning models (Decision Trees, XGBoost) and a Multi-layer Perceptron (MLP) to predict the log-transformed time gap ($ts_{Gap}$) between the initial report and final confirmation.

Datasets

The study uses a 2021 data dump from AskUbuntu, a popular software-focused CQA platform.

Table 2: Summary of the AskUbuntu dataset statistics.

The dataset is particularly challenging because it represents a single, highly technical ecosystem where identifying duplicates requires significant domain expertise. The authors split the data chronologically (training on 2010–2018, testing on 2020) to simulate a real-world deployment scenario.

Key Insights and Ideas

  • Structural Context is Vital: While text is the primary signal, adding tag-based network features consistently improved performance. Tags act as a high-level "topic" signal that helps disambiguate questions with similar wording but different technical contexts.
  • The "Hard Negative" Heuristic: By sampling negatives from similar but non-duplicate "buckets" (clusters of related questions), the model becomes much more robust against "near-misses" that often trip up simpler similarity models.
  • Complementary Strengths: Error analysis revealed that text-only models perform better when titles are long and detailed. Conversely, the network-augmented model shines when titles are short but the tag neighborhood is rich, effectively "filling in the blanks" for the model.

Key Results

  • Retrieval: The proposed TE+network model achieved a Mean Reciprocal Rank (MRR) of 11.088% and a Recall@10 of 18.35%. This represents a 5% to 7% improvement over established baselines like DupPredictor and DUPE.
  • Confirmation Time: The MLP-based model using both text and network features achieved the best results, with a Spearman’s rank correlation of 0.213. While the absolute value seems modest, it is statistically significant and represents the first successful attempt at this novel task.

Limitations and Future Work

The authors acknowledge that the retrieval task's upper bound is currently limited by the candidate set generation phase (which has a maximum possible recall of ~62.8%). Future work could involve refining how potential candidates are initially filtered to ensure fewer actual duplicates are missed early on. Additionally, while the confirmation time prediction is a strong start, the authors suggest exploring more complex temporal features and testing these methods on other CQA platforms like StackOverflow to verify generalizability.

Summary updated

Abstract

Community Question Answering (CQA) in different domains is growing at a large scale because of the availability of several platforms and huge shareable information among users. With the rapid growth of such online platforms, a massive amount of archived data makes it difficult for moderators to retrieve possible duplicates for a new question and identify and confirm existing question pairs as duplicates at the right time. This problem is even more critical in CQAs corresponding to large software systems like askubuntu where moderators need to be experts to comprehend something as a duplicate. Note that the prime challenge in such CQA platforms is that the moderators are themselves experts and are therefore usually extremely busy with their time being extraordinarily expensive. To facilitate the task of the moderators, in this work, we have tackled two significant issues for the askubuntu CQA platform: (1) retrieval of duplicate questions given a new question and (2) duplicate question confirmation time prediction. In the first task, we focus on retrieving duplicate questions from a question pool for a particular newly posted question. In the second task, we solve a regression problem to rank a pair of questions that could potentially take a long time to get confirmed as duplicates. For duplicate question retrieval, we propose a Siamese neural network based approach by exploiting both text and network-based features, which outperforms several state-of-the-art baseline techniques. Our method outperforms DupPredictor and DUPE by 5% and 7% respectively. For duplicate confirmation time prediction, we have used both the standard machine learning models and neural network along with the text and graph-based features. We obtain Spearman's rank correlation of 0.20 and 0.213 (statistically significant) for text and graph based features respectively.
BibTeX
@misc{hazra2023duplicate,
  author = {Rima Hazra and Debanjan Saha and Amruit Sahoo and Somnath Banerjee and Animesh Mukherjee},
  title = {{Duplicate Question Retrieval and Confirmation Time Prediction in Software Communities}},
  year = {2023},
  eprint = {2309.05035},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.05035},
}

Loading related content...

Figure