mlsanityData to 7 Oct 2026

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

arXiv 2501.04510 ↗First posted 8 Jan 2025cs.SE cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) have been proposed as powerful tools for detecting software vulnerabilities, where task-specific fine-tuning is typically employed to provide vulnerability-specific knowledge to the LLMs. However, existing fine-tuning techniques often treat source code as plain text, losing the graph-based structural information inherent in code. Graph-enhanced soft prompt tuning addresses this by translating the structural information into contextual cues that the LLM can understand. However, current methods are primarily designed for general graph-related tasks and focus more on adjacency information, they fall short in preserving the rich semantic information (e.g., control/data flow) within code graphs. They also fail to ensure computational efficiency while capturing graph-text interactions in their cross-modal alignment module. This paper presents CGP-Tuning, a new code graph-enhanced, structure-aware soft prompt tuning method for vulnerability detection. CGP-Tuning introduces type-aware embeddings to capture the rich semantic information within code graphs, along with an efficient cross-modal alignment module that achieves linear computational costs while incorporating graph-text interactions. It is evaluated on the latest DiverseVul dataset and three advanced open-source code LLMs, CodeLlama, CodeGemma, and Qwen2.5-Coder. Experimental results show that CGP-Tuning delivers model-agnostic improvements and maintains practical inference speed, surpassing the best graph-enhanced soft prompt tuning baseline by an average of four percentage points and outperforming non-tuned zero-shot prompting by 15 percentage points.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 34 of its 67 references that are in the map. First posted on arXiv 8 Jan 2025.

Builds on

34 of 67 references.

References · 34

  1. 2017Attention Is All You Needcited by 59,932
  2. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  3. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  4. 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,282
  5. 2017Graph Attention Networkscited by 8,854
  6. 2020Scaling Laws for Neural Language Modelscited by 6,411
  7. 2016Layer Normalizationcited by 5,579
  8. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
  9. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
  10. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  11. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  12. 2024Qwen2.5-Coder Technical Reportcited by 1,151
22 more
  1. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  2. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
  3. 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 612
  4. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  5. 2019Graph Transformer Networkscited by 520
  6. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
  7. 2023GraphGPT: Graph Instruction Tuning for Large Language Modelscited by 223
  8. 2024G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question Answeringcited by 217
  9. 2024LLaGA: Large Language and Graph Assistantcited by 177
  10. 2023Talk like a Graph: Encoding Graphs for Large Language Modelscited by 175
  11. 2019ASAP: Adaptive Structure Aware Pooling for Learning Hierarchical Graph Representationscited by 156
  12. 2024CodeGemma: Open Code Models Based on Gemmacited by 145
  13. 2020Deep Learning based Vulnerability Detection: Are We There Yet?cited by 142
  14. 2024Generalization or Memorization: Data Contamination and Trustworthy Evaluation for Large Language Modelscited by 119
  15. 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 98
  16. 2023Graph Neural Prompting with Large Language Modelscited by 64
  17. 2024Large Language Model for Vulnerability Detection: Emerging Results and Future Directionscited by 44
  18. 2022Transformer-Based Language Models for Software Vulnerability Detectioncited by 39
  19. 2024XRec: Large Language Models for Explainable Recommendationcited by 34
  20. 2024On Inter-dataset Code Duplication and Data Leakage in Large Language Modelscited by 10
  21. 2024GALLa: Graph Aligned Large Language Models for Improved Source Code Understandingcited by 7
  22. 2024Code Vulnerability Detection: A Comparative Analysis of Emerging Large Language Modelscited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 1.

2 papers.