A new study published in Nature presents a controlled empirical comparison of four approaches for detecting Self-Admitted Technical Debt (SATD) in software artifacts.
The research evaluated TF-IDF with Logistic Regression, CodeBERT fine-tuning, prompt-based Large Language Model (LLM) inference, and Retrieval-Augmented Generation (RAG) using an LLM.
The study utilized two publicly available SATD benchmark datasets and one author-curated build-configuration SATD retrieval corpus. Methods were tested under three balanced D1 sampled-pool conditions of 200, 1,500, and 5,000 instances. For TF-IDF with Logistic Regression and CodeBERT, each sampled pool was divided using a stratified 80:20 split for supervised training and in-domain evaluation. The prompt-based LLM was evaluated through inference without parameter training.
Results show that CodeBERT achieved the highest mean in-domain performance among the evaluated supervised approaches, particularly under the larger supervised D1 training conditions. This advantage was not observed in the D1 → D2 setting, where CodeBERT and TF-IDF obtained comparable F1 scores.
This performance drop reflects a cross-artifact domain shift from source-code comments to issue-tracker discussions. The TF-IDF baseline continued to show strong performance when assessed across different datasets, demonstrating that lexical characteristics still offer valuable transfer capabilities for SATD detection between different software components.
The study found that the evaluated prompt-based language model exhibited cautious classification tendencies under the tested prompt, resulting in high precision in certain scenarios but low recall. The assessed RAG setup failed to enhance the measured SATD detection performance given the chosen retrieval corpus, embedding model, top-k value, prompt design, and output parsing protocol.
Sensitivity and diagnostic analyses revealed that four-shot prompting enhanced the prompt-based LLM relative to zero-shot prompting, notably on the balanced D1 and D2 subsets, yet the enhancement was inadequate for the supervised models to be surpassed.
Assessment on the original imbalanced D1 and D2 distributions additionally confirmed that SATD detection stays vulnerable to class imbalance and cross-artifact transfer, most significantly in terms of precision and PR-AUC. The RAG ablation demonstrated that adjusting the retrieval corpus, top-k value, and similarity-threshold setting could not eliminate the low-recall tendency of the assessed RAG configuration.
Overall, the study delivers a delimited empirical comparison of lexical, transformer-based, prompt-based, and retrieval-augmented SATD detection methodologies under a consistent experimental protocol.
Related reading