Lightweight source code vulnerability detection method based on knowledge distillation
The invention relates to a lightweight source code vulnerability detection method based on knowledge distillation, and the method comprises the following steps: 1, carrying out the data preprocessing of a labeled source code data set in the field of vulnerability detection, carrying out the word-lev...
Gespeichert in:
Hauptverfasser: | , , , , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention relates to a lightweight source code vulnerability detection method based on knowledge distillation, and the method comprises the following steps: 1, carrying out the data preprocessing of a labeled source code data set in the field of vulnerability detection, carrying out the word-level replacement through combining with a trained language model, and carrying out the data enhancement to obtain a training data set; 2, selecting a teacher model and establishing a student model, and performing knowledge distillation on the student model to obtain a preliminary student model; 3, performing knowledge distillation on the preliminary student model again by using the training data set to obtain a final student model, namely the lightweight source code vulnerability detection model; and 4, performing vulnerability detection by using the vulnerability detection model to obtain a detection result. According to the method, the problem of overlarge time overhead caused by overlarge depth of the neural netwo |
---|