CRAIOct 8, 2025

Distilling Lightweight Language Models for C/C++ Vulnerabilities

arXiv:2510.06645v1h-index: 5Has Code
Originality Incremental advance
AI Analysis

It addresses software security for developers and organizations by providing an efficient, scalable solution for vulnerability detection, though it is incremental as it builds on existing knowledge distillation methods.

This paper tackles the problem of detecting security vulnerabilities in C/C++ code by introducing FineSec, a framework that uses knowledge distillation from large language models to create lightweight models, achieving high accuracy with minimal computational cost.

The increasing complexity of modern software systems exacerbates the prevalence of security vulnerabilities, posing risks of severe breaches and substantial economic loss. Consequently, robust code vulnerability detection is essential for software security. While Large Language Models (LLMs) have demonstrated remarkable capabilities in natural language processing, their potential for automated code vulnerability detection remains underexplored. This paper presents FineSec, a novel framework that harnesses LLMs through knowledge distillation to enable efficient and precise vulnerability identification in C/C++ codebases. FineSec utilizes knowledge distillation to transfer expertise from large teacher models to compact student models, achieving high accuracy with minimal computational cost. By integrating data preparation, training, evaluation, and continuous learning into a unified, single-task workflow, FineSec offers a streamlined approach. Extensive evaluations on C/C++ codebases demonstrate its superiority over both base models and larger LLMs in identifying complex vulnerabilities and logical flaws, establishing FineSec as a practical and scalable solution for real-world software security. To facilitate reproducibility, the datasets, source code, and experimental results are made publicly available at: https://github.com/yangxiaoxuan123/FineSec_detect.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes