Today's Cat Is Tomorrow's Dog: Accounting for Time-Based Changes in the Labels of ML Vulnerability Detection Approaches
Paramitha, Ranindya, Feng, Yuan, Massacci, Fabio
–arXiv.org Artificial Intelligence
Vulnerability datasets used for ML testing implicitly contain retrospective information. When tested on the field, one can only use the labels available at the time of training and testing (e.g. seen and assumed negatives). As vulnerabilities are discovered across calendar time, labels change and past performance is not necessarily aligned with future performance. Past works only considered the slices of the whole history (e.g. DiverseVUl) or individual differences between releases (e.g. Jimenez et al. ESEC/FSE 2019). Such approaches are either too optimistic in training (e.g. the whole history) or too conservative (e.g. consecutive releases). We propose a method to restructure a dataset into a series of datasets in which both training and testing labels change to account for the knowledge available at the time. If the model is actually learning, it should improve its performance over time as more data becomes available and data becomes more stable, an effect that can be checked with the Mann-Kendall test. We validate our methodology for vulnerability detection with 4 time-based datasets (3 projects from BigVul dataset + Vuldeepecker's NVD) and 5 ML models (Code2Vec, CodeBERT, LineVul, ReGVD, and Vuldeepecker). In contrast to the intuitive expectation (more retrospective information, better performance), the trend results show that performance changes inconsistently across the years, showing that most models are not learning.
arXiv.org Artificial Intelligence
Jun-16-2025
- Country:
- North America
- United States
- New York > New York County
- New York City (0.04)
- Michigan > Oakland County
- Rochester (0.04)
- Georgia > Fulton County
- Atlanta (0.04)
- California
- San Francisco County > San Francisco (0.14)
- Santa Clara County > San Jose (0.04)
- New York > New York County
- Canada > Ontario
- National Capital Region > Ottawa (0.04)
- United States
- Europe
- United Kingdom (0.04)
- Portugal > Lisbon
- Lisbon (0.04)
- Netherlands > North Holland
- Amsterdam (0.04)
- Italy > Trentino-Alto Adige/Südtirol
- Trentino Province > Trento (0.05)
- Asia > China
- Hong Kong (0.04)
- North America
- Genre:
- Research Report > New Finding (1.00)
- Industry:
- Information Technology > Security & Privacy (1.00)
- Technology:
- Information Technology
- Software Engineering (1.00)
- Software > Programming Languages (1.00)
- Security & Privacy (1.00)
- Data Science (1.00)
- Communications (1.00)
- Artificial Intelligence
- Natural Language (1.00)
- Machine Learning > Neural Networks
- Deep Learning (0.69)
- Information Technology