# Reassessing Dataset Quality and Fine-Tuning Practices for Vulnerability Detection on PrimeVul dataset

DevFeed: [Reassessing Dataset Quality and Fine-Tuning Practices for Vulnerability Detection on PrimeVul dataset](<https://devfeed.tech/articles/reassessing-dataset-quality-and-fine-tuning-practices-for-vulnerability-detection-on-primevul-dataset-118076.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.06373>)

Author: Norbert S\\'andor Szolnoki, G\\'abor Antal

Published: 2026-11-05T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [Fine-tuning](<https://devfeed.tech/topics/fine-tuning.md>), [Data Quality](<https://devfeed.tech/topics/data-quality.md>), [Hyperparameter optimization](<https://devfeed.tech/topics/hyperparameter-optimization.md>), [Enhancing AI model performance](<https://devfeed.tech/topics/enhancing-ai-model-performance.md>), [AI Foundation Models](<https://devfeed.tech/topics/ai-foundation-models.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [annotation](<https://devfeed.tech/tags/annotation.md>), [assessment](<https://devfeed.tech/tags/assessment.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [challenges](<https://devfeed.tech/tags/challenges.md>), [code](<https://devfeed.tech/tags/code.md>), [commit](<https://devfeed.tech/tags/commit.md>), [critical](<https://devfeed.tech/tags/critical.md>), [cs-se](<https://devfeed.tech/tags/cs-se.md>), [data](<https://devfeed.tech/tags/data.md>), [data-quality](<https://devfeed.tech/tags/data-quality.md>), [dataset](<https://devfeed.tech/tags/dataset.md>), [detection](<https://devfeed.tech/tags/detection.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [false-negative](<https://devfeed.tech/tags/false-negative.md>), [false-positive](<https://devfeed.tech/tags/false-positive.md>), [fine-tuning](<https://devfeed.tech/tags/fine-tuning.md>), [fixed](<https://devfeed.tech/tags/fixed.md>), [functions](<https://devfeed.tech/tags/functions.md>), [vulnerability](<https://devfeed.tech/tags/vulnerability.md>), [vulnerability-detection](<https://devfeed.tech/tags/vulnerability-detection.md>)

## AI overview

Across 770 fine-tuning runs, CodeBERT, GraphCodeBERT, and UniXCoder showed little reliable ability to distinguish vulnerable from fixed code in PrimeVul. F1 and ROC-AUC sometimes improved, but Matthews Correlation Coefficient stayed near zero, probabilities were poorly calibrated, and strict false-positive limits exposed high false-negative rates. Five imbalance strategies, threshold optimization, and post-hoc calibration did not recover a meaningful signal. The authors also identify minimal semantic differences between vulnerable and fixed functions and annotation noise from commit-level labeling, concluding that PrimeVul in its current form challenges reliable detection under the methods evaluated.

## Source excerpt

arXiv:2611.06373v1 Announce Type: new Abstract: Recent studies report promising results from supervised fine-tuning of pre-trained code language models for automated vulnerability detection on benchmarks such as PrimeVul. In this paper, we present a large-scale empirical evaluation of both model performance and dataset quality in this setting. We systematically fine-tune three widely used encoder models (CodeBERT, GraphCodeBERT, and UniXCoder) across five imbalance mitigation strategies, extensive hyperparameter sweeps, and multiple random seeds, resulting in 770 independent training runs. Our results reveal a consistent pattern. While standard metrics such as F1 and ROC-AUC occasionally suggest improvements, security-critical and calibration-aware measures tell a different story. Matthews Correlation Coefficient remains near zero, predicted probabilities are poorly calibrated, and evaluation under strict false-positive constraints reveals high false-negative rates. Neither imbalance handling, threshold optimization, nor post-hoc calibration recovers a meaningful discriminative signal. We also conduct a data quality assessment of the PrimeVul benchmark and identify structural issues such as minimal semantic differences between vulnerable and fixed functions, and annotation noise introduced by commit-level labeling. These findings suggests that the PrimeVul dataset, in its current form, presents significant challenges for reliable AI-based vulnerability detection in software engineering with the methodologies we used. Our study highlights the need for more robust dataset design, improved evaluation protocols, and rethinking of fine-tuning practices for security-critical tasks.