Course project · CS 588, Bilkent · 2025–26

Graph Enhanced Transformer for Semi-Supervised Duplicate Bug Report Detection

Emirhan Koç, Hüseyin Karaca, Kerem Bayramoğlu, Hasan Erkin Ünlü, Rabia Ela Ünlü

Bilkent University

Overview. Top, data preprocessing: GitHub issues become a duplicate and non-duplicate table, positive pairs are matched and negatives sampled, and an AutoTokenizer turns each pair into token IDs. Bottom, embedding construction and training: a transformer encodes each report of a pair, its CLS vector becomes that report's node embedding in a graph, and the pair similarity is trained towards 1 for duplicates and 0 for non-duplicates.
Labelled pairs train the encoder, and every report joins one graph, so supervision reaches unlabelled reports too.

Context

Duplicate bug report detection aims to identify bug reports that describe the same underlying problem or can be resolved by the same fix. In large-scale repositories, duplicates increase triage workload and waste developer time. While transformer-based sentence encoders improve semantic matching compared to classical IR baselines, they rely on labeled duplicate pairs, which are typically scarce in real-world repositories. Moreover, exhaustive pairwise training is computationally infeasible and cannot effectively incorporate the full pool of unlabeled reports.

Method

We propose a semi-supervised Graph-Enhanced Transformer framework that couples transformer-based semantic encoding with graph-based message passing. We represent the full corpus (train/validation/test) as nodes in a title-similarity graph built from bert-base-uncased title embeddings; to obtain a more informative similarity geometry, we apply PCA before computing similarities (thresholding can be used as an optional sparsification step). During training, transformer [CLS] embeddings are projected to a compact space and injected into a two-layer Graph Convolutional Network (GCN), enabling information propagation from supervised nodes to the unlabeled portion of the corpus. Supervision is applied only on a feasible subset of labeled positive pairs and sampled negatives via a cosine embedding objective, while the remaining unlabeled reports contribute indirectly through graph propagation. For evaluation, model parameters are frozen and pairwise predictions are obtained by thresholding cosine similarity, where the decision threshold is selected on the validation split.

Results

Experiments on Eclipse Platform and Mozilla Thunderbird show that graph propagation enables the model to benefit from unlabeled reports under label-scarce conditions, yielding stable training dynamics and competitive classification performance relative to transformer-only baselines. Source code and data are publicly available at the project repository.

Matches the best baselines on Thunderbird and leads Eclipse recall at 0.935

EclipseThunderbird
ModelRF1RF1
BERT0.9330.9270.9610.957
RoBERTa0.9300.9240.9680.957
DistilBERT0.9210.9290.9650.957
CodeBERT0.9280.9240.9300.916
Ours0.9350.9240.9660.957
Test pairs. Ours ties three fully supervised encoders on Thunderbird F1.

Duplicates score 0.92–0.99, non-duplicates 0.14 or lower

Duplicate paircosNon-duplicate paircos
8470 · 350540.923158896 · 47204−0.033
70983 · 832040.993124062 · 21003−0.107
62405 · 1049260.97973654 · 288630.138
Validation pairs in the learned embedding space.

Adds only 10–12 % training time

EclipseThunderbird
Modelminrel.minrel.
BERT16.21.0010.11.00
RoBERTa16.31.0110.21.01
DistilBERT15.90.989.80.97
CodeBERT16.51.0210.31.02
Ours18.11.1211.11.10
Minutes per epoch, one A100 (80 GB). Overhead holds from 26K to 68K reports.

Conclusions

The proposed graph-enhanced training strategy offers a principled way to exploit unlabeled bug reports without requiring explicit pairwise supervision for transformers. By confining graph-based reasoning to the transductive training phase, the framework balances label efficiency, scalability, and practical deployment constraints. These results indicate that graph-structured semi-supervised learning can effectively complement transformer-based encoders for duplicate bug report detection in realistic, label-scarce settings.