arXiv:2611.05013cs.SENov 2026

Manuscript Offprint

arXiv:2611.05013

One Strategy Does Not Fit All: Rethinking Data Labeling for Just-in-Time Vulnerability Prediction

Quan Tran, Duong Nguyen, Thanh Le-Cong, Triet Huynh Minh Le, M. Ali Babar, Hoang Dieu Vu, Quyet-Thang Huynh

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

QUAN TRAN, Phenikaa University, Hanoi, Vietnam

DUONG NGUYEN, Singapore Management University, Singapore

THANH LE-CONG, Singapore University of Technology and Design, Singapore

TRIET HUYNH MINH LE, Adelaide University, South Australia, Australia

M. ALI BABAR, Adelaide University, South Australia, Australia

HOANG DIEU VU, Phenikaa University, Hanoi, Vietnam

QUYET-THANG HUYNH*, Hanoi University of Science and Technology, Hanoi, Vietnam

Just-In-Time Vulnerability Prediction (JIT-VP) identifies security risks in code changes at commit time, enabling early feedback before vulnerabilities enter software systems. However, its practical reliability is challenged by the difficulty of constructing accurate labels. Multiple strategies with different trade-offs have been proposed to identify vulnerability-fixing commits (VFCs) and vulnerability-introducing commits (VICs) for dataset construction, leading to substantially different datasets. This makes it difficult to separate model performance from dataset construction. Moreover, real-world quality assurance requires not only classification but also prioritizing high-risk commits and localizing vulnerable causes. This paper presents an extensive empirical study of how labeling strategies affect these downstream tasks. We constructed 28 datasets using four VFC and four VIC labeling strategies across OpenSSL and Linux kernel, then evaluated six representative JIT-VP models for classification, prioritization, and localization. Our results show that labeling effectiveness is strongly task-dependent. Manual VFC labeling combined with vulnerability-specific VIC labeling provides the most reliable performance for classification and prioritization, significantly outperforming 11 of 15 alternatives. Meanwhile, precision-first VFC labeling combined with LLM-assisted VIC labeling performs best for localization, significantly outperforming 7 of 15 alternatives. These findings demonstrate that no single labeling strategy is universally optimal and highlight the importance of task-oriented dataset construction.

CCS Concepts: • Software and its engineering → Software defect analysis; Empirical software validation; • Security and privacy → Vulnerability management; • General and reference → Empirical studies.

ACM Reference Format:

Quan Tran, Duong Nguyen, Thanh Le-Cong, Triet Huynh Minh Le, M. Ali Babar, Hoang Dieu Vu, and Quyet-Thang Huynh. 2026. One Strategy Does Not Fit All: Rethinking Data Labeling for Just-in-Time Vulnerability Prediction. 1, 1 (November 2026), 29 pages. https://doi.org/XXXXXXX. XXXXXXX

1 Introduction

The rapid adoption of AI-powered coding agents has substantially accelerated software development, leading to a substantial growth in code commits. For example, GitHub recorded only one billion commits in 2025, yet by early April 2026, it was processing 275 million commits per week, a rate that would amount to approximately 14 billion commits over the year if sustained [9]. Such a massive volume of code changes across different software versions and deployment environments increases the likelihood of failures caused by inconsistencies between software components and patches, as well as conflicts among the

*Corresponding author.

Authors' Contact Information: Quan Tran, Phenikaa University, Hanoi, Vietnam, minhquantsy@gmail.com; Duong Nguyen, Singapore Management University, Singapore, dnguyen@smu.edu.sg; Thanh Le-Cong, Singapore University of Technology and Design, Singapore, congtanh_le@sutd.edu.sg; Triet Huynh Minh Le, Adelaide University, South Australia, australia, triet.h.le@adelaide.edu.au; M. Ali Babar, Adelaide University, South Australia, Australia, ali.babar@adelaide.edu.au; Hoang Dieu Vu, Phenikaa University, Hanoi, Vietnam, dieu.vuhoang@phenikaa-uni.edu.vn; Quyet-Thang Huynh, Hanoi University of Science and Technology, Hanoi, Vietnam, thang.huynhquyet@hust.edu.vn.

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org.

© 2026 Copyright held by the owner/author(s). Publication rights licensed to ACM.

patches themselves. Consequently, human reviewers are confronted with an escalating challenge in identifying risky code changes that could compromise system stability and security.

Just-In-Time Vulnerability Prediction (JIT-VP) [43] has emerged as a promising approach for assisting human reviewers and improving software quality assurance practices. By learning from historical vulnerability data, JIT-VP techniques can learn patterns associated with risky code modifications, thereby providing developers with early feedback. As a result, integrating JIT-VP into the software development lifecycle can improve the efficiency of security review processes while enhancing the resilience of software systems against emerging threats. However, their practical readiness remains a concern due to the complexity of real-world software development [33].

One key challenge in JIT-VP is constructing reliable labels for vulnerability-introducing commits (VICs). This typically requires two steps. First, researchers must identify the vulnerability-fixing commit (VFC), but vulnerability records often lack a direct link to the patch, and commit metadata may not reveal that it is a security fix [36]. Second, they must determine which earlier commit introduced the vulnerability. A VFC shows what was changed to fix the vulnerability, but it does not establish when the vulnerable behavior was introduced. For example, tracing a fixed line through the commit history may identify a commit that merely modified already-vulnerable code [3, 50]. Thus, even a correctly identified VFC can lead to an incorrect VIC label.

Consequently, various strategies have been proposed to identify VFCs and VICs to construct JIT-VP labels, as discussed in Section 4. These strategies entail different trade-offs among labeling accuracy, coverage, scalability, cost, and semantic detail. The choice of labeling strategy can therefore substantially influence the resulting training data, as illustrated in Section 3, and consequently affect the measured performance of JIT-VP models. Despite the importance of this design choice, existing studies (e.g., [33, 37, 43]) often employ different data construction pipelines, making their results difficult to interpret independently of the underlying label construction process. Consequently, the impact of different labeling strategies on downstream JIT-VP performance remains under-explored.

Moreover, practical software development increasingly demands more from JIT-VP models than binary vulnerability prediction. The scale and complexity of modern software systems, combined with rapid development cycles, limit the amount of effort developers can devote to inspecting model predictions. Therefore, simply determining whether a commit is vulnerable may be insufficient in practice. JIT-VP approaches should also help developers prioritize potentially vulnerable commits under limited inspection effort and provide fine-grained information about the code changes associated with a vulnerability. This motivates viewing JIT-VP as a broader problem encompassing multiple downstream tasks rather than solely the traditional binary classification formulation.

To address these gaps, we conduct a large-scale empirical study involving approximately 140,000 commits to investigate how different VFC and VIC labeling strategies affect the performance of JIT-VP techniques. Specifically, we consider four VFC labeling strategies: Manual labeling, precision-first labeling [18], quantity-first labeling [38], and an LLM-assisted approach [34]. We further consider four VIC labeling strategies: Manual labeling, Vulnerability-specific labeling [3], Bug-generalization labeling [50], and LLM-assisted labeling [53]. These strategies are among the most common methods to identify VFCs/VICs in JIT-VP (e.g., [33, 37]) and related problems (e.g., [4, 56]). We systematically evaluate the resulting combinations of VFC and VIC labels on datasets constructed from two large-scale open-source projects, OpenSSL and the Linux kernel. Each dataset configuration is evaluated using six representative JIT-VP models across three proposed downstream tasks: classification, prioritization, and localization. All experiments use the same curated benchmark set to ensure a consistent and fair comparison across labeling strategies. Specifically, for the localization task, we manually label the line-level ground truth and release the guidelines for future studies when labeling line-level vulnerability data.

Our study sheds light on how different VFC and VIC labeling strategies affect JIT-VP performance across downstream tasks. We find that classification and prioritization benefit most from labeling strategies that balance label quality and coverage, whereas highly accurate labels generated through human or LLM-assisted annotation show greater promise for line-level localization. We further identify the most effective dataset configuration for each task. In particular, manual VFC labeling combined with vulnerability-specific VIC labeling provides the most reliable overall performance for classification and prioritization, whereas precision-first VFC labeling combined with LLM-assisted VIC labeling performs best for localization. Notably, precision-first automated VFC labeling achieves performance comparable to manual labeling for both classification and prioritization, suggesting that high-quality automated VFC labeling can provide a scalable alternative to costly manual annotation. Traditional SZZ-based

VIC labeling likewise remains competitive with manual labeling for prioritization, while LLM-assisted VIC labeling offers greater benefits for localization.

These findings suggest that there is no universally optimal labeling pipeline for JIT-VP. Instead, training data should be constructed according to the requirements of the intended downstream task, selecting labeling strategies that provide an appropriate balance among accuracy, coverage, scalability, and cost. More broadly, our results highlight task-oriented dataset construction as a practical direction for JIT-VP: scalable labeling can provide broad coverage for classification and prioritization, while more accurate human or LLM-assisted annotation can be selectively applied when fine-grained localization is required.

Our key contributions are as follows:

(1) We conduct a large-scale empirical study covering widely used data labeling approaches for JIT-VP in different tasks, providing insights into their impact on model performance and identifying promising directions for future research.

(2) We derive practical recommendations for selecting data labeling strategies to achieve competitive performance for different downstream JIT-VP tasks and objectives.

(3) We publicly release our datasets, guidelines, and replication package to promote open science and facilitate future research on JIT-VP. Our replication package is available at: https://github.com/TheSyx04/Data-Labeling-for-JIT-VP.

The remainder of this paper is structured as follows. Section 2 provides background on JIT-VP, downstream quality assurance tasks and labeling approaches. Section 3 shows our motivation examples, while Section 4 describes our study design, including research questions, data collection, studied models, experimental setups and implementation details. Section 5 presents our experimental results for each research question and Section 6 presents the qualitative analysis. Section 7 discusses the implications of our findings and threats to validity, while Section 8 shows related work. Finally, Section 9 concludes the paper.

References (9)