Answer Summarization for Technical Queries: Benchmark and New Approach

Chengran Yang, Bowen Xu, Ferdian Thung, Yucen Shi, Ting Zhang, Zhou Yang, Xin Zhou, Jieke Shi, Junda He, DongGyun Han, David Lo

Abstract

Software Question and Answer (SQA) platforms like Stack Overflow provide a wealth of information, yet the high volume of redundant and noisy content often hinders developer productivity. While automated answer summarization has been proposed as a solution, the field has lacked a standardized benchmark for rigorous evaluation. This paper introduces TechSumBench, the first high-quality benchmark for technical answer summarization, and TechSumBot, a multi-module summarization framework. TechSumBot leverages transfer learning for usefulness ranking and contrastive learning for redundancy removal. Experimental results demonstrate that TechSumBot significantly outperforms existing state-of-the-art methods in both automatic metrics and human evaluation.

Introduction

Developers frequently turn to SQA sites to solve programming challenges. However, these platforms often contain multiple answers for a single query, many of which are incomplete, overlapping, or irrelevant. Navigating this clutter is time-consuming. While researchers have developed tools to summarize these answers, evaluation has historically relied on expensive and non-repeatable user studies. The absence of a "gold standard" benchmark has prevented fair comparison between algorithms and slowed the pace of innovation in technical summarization.

This work addresses these challenges by providing a dual contribution: a rigorous evaluation framework (TechSumBench) and a sophisticated summarization model (TechSumBot) designed to filter noise and consolidate technical knowledge effectively.

The TechSumBench Benchmark

To facilitate reproducible research, the authors developed TechSumBench, a manually constructed benchmark. It consists of 111 query-summary pairs derived from 382 Stack Overflow answers, specifically focusing on Java and Python. This dataset provides the necessary ground truth to evaluate summarization systems using standard NLP metrics like ROUGE, serving as a low-cost yet reliable proxy for human judgment.

TechSumBot: A Multi-Module Approach

TechSumBot is designed to process technical queries and candidate answers through a pipeline of three specialized modules:

1. Usefulness Ranking

Traditional summarization tools often rely on static, handcrafted semantic patterns (e.g., identifying sentences that start with "I suggest"). These heuristics are often brittle and prone to capturing irrelevant advice. TechSumBot replaces these rules with a BERT-based classifier. The model is fine-tuned using transfer learning on the ASNQ (Answer Sentence Natural Questions) dataset, allowing it to accurately predict the probability that a sentence directly addresses a given query.

2. Centrality Estimation

To ensure the final summary reflects the consensus across multiple answers, the system employs the TextRank algorithm. By treating sentences as nodes in a graph where edges represent word overlap, TechSumBot identifies "representative" sentences that capture the core information shared across the candidate answer set.

3. Redundancy Removal

Technical summaries must be concise. To avoid repeating similar points, the authors implemented a greedy selection mechanism powered by a domain-specific sentence representation model. This model was trained using SimCSE (Contrastive Learning) on a dataset of over 300,000 Stack Overflow duplicate question titles. This training allows the model to recognize semantic identity in a technical context—understanding that two sentences may be identical in meaning even if they use different technical terminology.

Key Insights

A critical finding of this research is the failure of heuristic-based models. Static rules often flag sentences as useful based on structure rather than content. By shifting to a machine-learning-based approach, TechSumBot avoids these pitfalls. Furthermore, the study highlights the value of community metadata. By using Stack Overflow’s own "duplicate" links as a supervision signal, the authors were able to train a model that understands technical redundancy without requiring additional manual labeling.

Evaluation and Results

TechSumBot was evaluated against Software Engineering baselines (e.g., AnswerBot) and general NLP summarization baselines (e.g., QuerySum).

Automatic Evaluation

Using the TechSumBench benchmark, TechSumBot demonstrated substantial improvements across all ROUGE metrics:

  • ROUGE-1: 10.83%–14.90% improvement over baselines.
  • ROUGE-2: 32.75%–36.59% improvement over baselines.
  • ROUGE-L: 12.61%–17.54% improvement over baselines.

Human Evaluation

A user study confirmed these findings, with TechSumBot achieving high scores for usefulness (4.02/5) and diversity (4.26/5). An ablation study further confirmed that the Usefulness, Centrality, and Redundancy modules are all essential to the system's performance, with the highest scores achieved only when all three are combined.

Conclusion and Future Work

TechSumBot and TechSumBench represent a significant step forward in making technical information more accessible to developers. While the current benchmark is focused on Java and Python, it provides a blueprint for expanding to other programming languages. Future work will focus on scaling the benchmark and integrating TechSumBot directly into Integrated Development Environments (IDEs), allowing developers to access high-quality summaries without disrupting their workflow.

Summary updated

BibTeX
@inproceedings{yang2022answer,
  author = {Chengran Yang and Bowen Xu and Ferdian Thung and Yucen Shi and Ting Zhang and Zhou Yang and Xin Zhou and Jieke Shi and Junda He and DongGyun Han and David Lo},
  title = {{Answer Summarization for Technical Queries: Benchmark and New Approach}},
  booktitle = {ASE},
  year = {2022},
}
Figure