Abstract
This paper introduces the first automated approach for generating concise, informative Pull Request (PR) titles. By treating title generation as a one-sentence abstractive summarization task and leveraging large-scale pre-trained models like BART, the researchers demonstrate that AI can produce PR titles that are often clearer and more helpful than those written by human developers. The study establishes a new benchmark dataset, PRTiger, and shows that general-purpose language models can bridge the semantic gap between raw code changes and high-level summaries.
Introduction
In modern collaborative software development, the "integrator"—the person responsible for reviewing and merging code—is often overwhelmed by a high volume of incoming Pull Requests. The PR title serves as the first, and sometimes only, piece of information an integrator sees in a list view.
However, many developers treat titles as an afterthought. Titles are frequently too vague (e.g., "Various."), excessively long, or lacking necessary context. The authors found that 16.4% of the 1.3 million PRs they initially collected lacked a description entirely, making a high-quality title even more critical for understanding the PR's intent. This research aims to automate the creation of these titles to speed up the review process and improve repository documentation.
Methodology
The authors formulate PR title generation as an abstractive summarization task. Unlike extractive methods that simply select an existing sentence from the PR, abstractive methods generate new text that captures the essence of the changes. The input provided to the models was a concatenation of the PR description, commit messages, and linked issue titles.
They evaluated several state-of-the-art approaches:
- Extractive Baselines: BertSumExt and an Oracle baseline.
- Domain-Specific Models: PRSummarizer and iTAPE, which were originally designed for PR descriptions or issue titles.
- General-Purpose Abstractive Models: BART and T5. These are large Transformer-based models pre-trained on massive amounts of natural language text.
The PRTiger Dataset
Because no benchmark existed for this specific task, the authors created PRTiger (Pull Request Title Generation). The dataset consists of 43,816 non-trivial PRs from 495 diverse GitHub repositories across languages like JavaScript, Python, Java, and C++.
To ensure quality, the researchers applied rigorous filtering to remove "trivial" titles (such as those starting with "revert" or "automated cherry-pick"), bot-generated PRs, and PRs with extreme commit counts (fewer than 2 or more than 20). The final dataset was split 8:1:1 for training, validation, and testing.
Key Results and Insights
BART emerged as the clear winner, achieving ROUGE-1, ROUGE-2, and ROUGE-L F1-scores of 47.22, 25.27, and 43.12, respectively. It outperformed the second-best model (T5) by over 12% across all ROUGE metrics.
Beyond automated metrics, a manual evaluation by three experienced developers revealed a significant finding: human reviewers actually preferred the titles generated by BART over the original titles written by the developers. BART scored highest across all three manual categories: Correctness, Naturalness, and Comprehensibility.
Observations on Model Behavior
- The Power of Pre-training: Despite being trained on general web text, BART and T5 significantly outperformed models specifically designed for software engineering. This suggests that general linguistic summarization capability is more critical than domain-specific jargon for this task.
- Synthesis vs. Extraction: While most models tended to grab the first word or sentence of the description, BART demonstrated a unique ability to synthesize information from the middle of the text. It even utilized contextually appropriate words (like "resolve") that were not explicitly present in the source text.
- Optimal Length: The study found that titles between 5 and 15 words represent the "sweet spot" for being informative without becoming overwhelming.
Limitations and Future Work
The current approach has some heuristic limitations, such as excluding PRs with more than 20 commits, which may exclude complex but valid feature contributions. Additionally, the models currently rely on text-based descriptions and messages rather than the actual code "diffs." Future work could involve feeding the model the code changes themselves to provide deeper technical context. The authors also suggest that pre-training models specifically on developer communications (similar to "BERTweet") might further enhance performance.
Summary updated