ruijunfeng/CGP-tuning

5

stars

1

commits

Python

primary language

Jul 9, 2026

updated

README

CGP-Tuning: Structure-Aware Soft Prompt Tuning for Code Vulnerability Detection

This project implements CGP-Tuning, a graph-enhanced soft prompt tuning method designed for code vulnerability detection. The approach incorporates graph-based structural information of source code into prompt tuning, enhancing the detection capabilities for security vulnerabilities in code.

The dataset used in this project is DiverseVul, which can be accessed here: https://github.com/wagner-group/diversevul.

Project Structure

The project directory is organized as follows:

  • templates/: Contains the templates used for inference.
  • tuners/: Contains the key implementation of CGP-Tuning.
  • utils/: Includes utility scripts for data preprocessing.
  • example.json: An example data sample for running.
  • main.py: The main script that demonstrates how to run CGP-Tuning.

Requirement

To run this project, ensure that the following dependencies are installed with the specified versions to ensure compatibility and optimal performance:

Citation

If you find this work useful, please cite our paper:

@ARTICLE{feng2025cgptuning,
  author={Feng, Ruijun and Pearce, Hammond and Liguori, Pietro and Sui, Yulei},
  journal={IEEE Transactions on Software Engineering}, 
  title={CGP-Tuning: Structure-Aware Soft Prompt Tuning for Code Vulnerability Detection}, 
  year={2025},
  volume={51},
  number={9},
  pages={2533-2548},
  keywords={Codes;Tuning;Source coding;Semantics;Computational efficiency;Graph neural networks;Large language models;Computational modeling;Training;Static analysis;Code large language model;soft prompt tuning;vulnerability detection;cross-modal alignment;graph neural network;multimodal learning},
  doi={10.1109/TSE.2025.3591934}
}

Contributors

ruijunfeng

1 commits

ruijunfeng/CGP-tuning

5

stars

1

commits

Python

primary language

Jul 9, 2026

updated

README

CGP-Tuning: Structure-Aware Soft Prompt Tuning for Code Vulnerability Detection

This project implements CGP-Tuning, a graph-enhanced soft prompt tuning method designed for code vulnerability detection. The approach incorporates graph-based structural information of source code into prompt tuning, enhancing the detection capabilities for security vulnerabilities in code.

The dataset used in this project is DiverseVul, which can be accessed here: https://github.com/wagner-group/diversevul.

Project Structure

The project directory is organized as follows:

  • templates/: Contains the templates used for inference.
  • tuners/: Contains the key implementation of CGP-Tuning.
  • utils/: Includes utility scripts for data preprocessing.
  • example.json: An example data sample for running.
  • main.py: The main script that demonstrates how to run CGP-Tuning.

Requirement

To run this project, ensure that the following dependencies are installed with the specified versions to ensure compatibility and optimal performance:

Citation

If you find this work useful, please cite our paper:

@ARTICLE{feng2025cgptuning,
  author={Feng, Ruijun and Pearce, Hammond and Liguori, Pietro and Sui, Yulei},
  journal={IEEE Transactions on Software Engineering}, 
  title={CGP-Tuning: Structure-Aware Soft Prompt Tuning for Code Vulnerability Detection}, 
  year={2025},
  volume={51},
  number={9},
  pages={2533-2548},
  keywords={Codes;Tuning;Source coding;Semantics;Computational efficiency;Graph neural networks;Large language models;Computational modeling;Training;Static analysis;Code large language model;soft prompt tuning;vulnerability detection;cross-modal alignment;graph neural network;multimodal learning},
  doi={10.1109/TSE.2025.3591934}
}

Contributors

ruijunfeng

1 commits

Languages

Python

99.7%