A refined training strategy is presented, leveraging an encoder-based approach, to address two key challenges in FL: (1) the accurate classification of lines of code according to their suspiciousness scores, and (2) the class imbalance inherent in this type of problem.
Abstract
Fault Localization (FL) has evolved with the emergence of the Transformer architecture. Traditionally, FL relied on generating a ranking of suspiciousness scores for each code unit using information obtained during program execution from a set of test cases. However, Language Models trained with source code have enabled approaches that avoid the need for test suites, which are, sometimes, difficult or time-consuming to obtain. In this work, we present a refined training strategy tested on DeBERTa-v3-base, leveraging an encoder-based approach, to address two key challenges in FL: (1) the accurate classification of lines of code according to their suspiciousness scores, and (2) the class imbalance inherent in this type of problem. To this end, we extract the last hidden state corresponding to the embeddings of the new line tokens to generate a suspiciousness score for each line. This score then classifies each line as defective or not. The evaluation of our approach on the ConDefects dataset, repeated over ten random seeds, shows promising results compared to existing approaches, with ROC AUC gains up to 0.27 in cross-dataset comparisons. Thereby, we offer a competitive baseline for future test-free fault localization research while using language models that are approximately 200 times smaller than those used in prior work.
This study investigates multiple experimental configurations based on CodeBERT, GraphCodeBERT, and CodeT5, including direct transformer-based classification, sliding window processing for long code sequences, and hybrid approaches combining transformer embeddings with classical machine learning classifiers.
This work proposes applying cost-sensitive learning to set different weights for each sample to optimize the performance of fault localization and demonstrates that applying cost-sensitive learning can effectively alleviate the class imbalance problem in DLFL.
Yue Yan, Shu-Juan Jiang, Yanmei Zhang et al.· International journal of sof...· 0 citations
A deep learning based framework that can be effectively integrate code embeddings including Word2Vec, TF-IDF representations, and handcrafted contextual features to detect vulnerabilities over multiple Common Weakness Enumeration (CWE) classes is proposed.
This research proposes the first end-to-end multi-task architecture that jointly detects Python syntax errors and localizes their exact line position by adaptively fusing CodeBERT’s semantic embeddings with handcrafted syntactic features via a lightweight gating mechanism, without relying on Abstract Syntax Trees.
Rozali Ilham, Bahtiar Imran, Hasan Basri et al.· 0 citations
This work presents a deep learning approach for multilingual vulnerability detection that emphasizes semantic transfer rather than architectural complexity and suggests that stabilizing semantic representations during transfer is key to improving generalization while maintaining practical efficiency under moderate comp...
Tuan Nguyen Kim, Nin Ho Le Viet, Chieu Ta Quang· Engineering, Technology &...· 0 citations
TokenGated-CodeBERT is proposed, a new methodology designed for scenarios with severe class imbalance that supports full end-to-end training, keeps the original CodeBERT encoder intact, requires no additional auxiliary optimization objectives, and features a lightweight architecture.
Bin Shuai, De-Quan Xu, Yuan-Lin Yang· IEEE Access· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.