Enhancing Continual Learning for Software Vulnerability Prediction: Addressing Catastrophic Forgetting via Hybrid-Confidence-Aware Selective Replay for Temporal LLM Fine-Tuning
Xuhui Dou, Hayretdin Bahsi, Alejandro Guerra-Manzanares

TL;DR
This paper improves continual learning for software vulnerability detection by introducing Hybrid-CASR, a confidence-aware selective replay method that effectively handles temporal distribution shifts in evolving code bases, enhancing accuracy and efficiency.
Contribution
It proposes Hybrid-CASR, a novel selective replay strategy that balances class distribution and uncertainty, significantly improving temporal vulnerability detection performance in LLM fine-tuning.
Findings
Hybrid-CASR outperforms window-only baseline with a 0.016 F1 increase.
Hybrid-CASR reduces training time by about 17%.
Cumulative training offers minimal F1 gain at much higher computational cost.
Abstract
Recent work applies Large Language Models (LLMs) to source-code vulnerability detection, but most evaluations still rely on random train-test splits that ignore time and overestimate real-world performance. In practice, detectors are deployed on evolving code bases and must recognise future vulnerabilities under temporal distribution shift. This paper investigates continual fine-tuning of a decoder-style language model (microsoft/phi-2 with LoRA) on a CVE-linked dataset spanning 2018-2024, organised into bi-monthly windows. We evaluate eight continual learning strategies, including window-only and cumulative training, replay-based baselines and regularisation-based variants. We propose Hybrid Class-Aware Selective Replay (Hybrid-CASR), a confidence-aware replay method for binary vulnerability classification that prioritises uncertain samples while maintaining a balanced ratio of…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Advanced Malware Detection Techniques
