[Paper Review] Traceability Transformed: Generating more Accurate Links with Pre-Trained BERT Models
This paper proposes T-BERT, a novel framework leveraging pre-trained BERT models to generate more accurate trace links between software artifacts such as issues and commits in open-source projects. By transferring knowledge from a related code search task, T-BERT overcomes data sparsity and achieves significantly higher accuracy—60.31% average improvement in MAP—compared to traditional VSM models, with the Single-BERT architecture delivering the best performance and Siamese-BERT offering a fast, near-equivalent alternative.
Software traceability establishes and leverages associations between diverse development artifacts. Researchers have proposed the use of deep learning trace models to link natural language artifacts, such as requirements and issue descriptions, to source code; however, their effectiveness has been restricted by availability of labeled data and efficiency at runtime. In this study, we propose a novel framework called Trace BERT (T-BERT) to generate trace links between source code and natural language artifacts. To address data sparsity, we leverage a three-step training strategy to enable trace models to transfer knowledge from a closely related Software Engineering challenge, which has a rich dataset, to produce trace links with much higher accuracy than has previously been achieved. We then apply the T-BERT framework to recover links between issues and commits in Open Source Projects. We comparatively evaluated accuracy and efficiency of three BERT architectures. Results show that a Single-BERT architecture generated the most accurate links, while a Siamese-BERT architecture produced comparable results with significantly less execution time. Furthermore, by learning and transferring knowledge, all three models in the framework outperform classical IR trace models. On the three evaluated real-word OSS projects, the best T-BERT stably outperformed the VSM model with average improvements of 60.31% measured using Mean Average Precision (MAP). RNN severely underperformed on these projects due to insufficient training data, while T-BERT overcame this problem by using pretrained language models and transfer learning.
Motivation & Objective
- To address the low accuracy and data sparsity issues in automated software traceability using deep learning.
- To enable effective transfer learning from a related, data-rich task (code search) to improve trace link generation in low-data scenarios.
- To develop a scalable and efficient framework for industrial-scale traceability that outperforms traditional IR and RNN-based models.
- To evaluate the performance and efficiency trade-offs among different BERT architectures (Single, Siamese, Twin) in the context of issue-commit traceability.
Proposed method
- Fine-tune a pre-trained BERT model on a large-scale code search dataset to learn general code and natural language representations before transferring to traceability tasks.
- Apply a three-step training strategy: pre-train on code search, fine-tune on traceability data, and then adapt to new projects with minimal retraining.
- Use a Single-BERT architecture to encode issue descriptions and code change sets separately, then compute similarity via dot product or cosine similarity.
- Implement a Siamese-BERT architecture to encode both artifacts with shared weights, enabling faster inference while maintaining high accuracy.
- Apply contrastive learning with negative sampling (ONS) to improve model convergence and performance without significant computational overhead.
- Use Cosine Embedding Loss in the classification head to align semantic representations of related artifacts and improve link prediction.

Experimental results
Research questions
- RQ1Can transfer learning from a related, data-rich task (code search) significantly improve trace link accuracy in low-data software traceability scenarios?
- RQ2How do different BERT architectures (Single, Siamese, Twin) compare in terms of accuracy and inference efficiency for issue-commit traceability?
- RQ3Does the use of pre-trained language models with transfer learning overcome the data sparsity problem that limits RNN-based and traditional IR models?
- RQ4Can intermediate-trained T-BERT models be effectively adapted to new open-source projects without full retraining?
Key findings
- The Single-BERT architecture achieved the highest accuracy, outperforming classical VSM models by an average of 60.31% in Mean Average Precision (MAP) across three real-world open-source projects.
- The Siamese-BERT architecture achieved comparable accuracy to Single-BERT but with significantly reduced execution time, making it more practical for large-scale deployment.
- T-BERT models, trained via transfer learning, outperformed both VSM and RNN-based models (TraceNN) on the same datasets, demonstrating the effectiveness of pre-trained language models in bridging semantic gaps.
- The ONS (negative sampling) training strategy improved model convergence speed and performance without incurring substantial computational overhead.
- Despite limited training data, T-BERT achieved stable and high performance, indicating that transfer learning effectively mitigates data sparsity in traceability tasks.
- The framework demonstrated strong generalization, as intermediate-trained T-BERT models could be efficiently adapted to new projects without full retraining, reducing time and resource costs.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.