Skip to main content
QUICK REVIEW

[Paper Review] LLMs in Code Vulnerability Analysis: A Proof of Concept

Shaznin Sultana, Sadia Afreen|arXiv (Cornell University)|Jan 13, 2026
Software Engineering ResearchComputer Science0 citations
TL;DR

The paper evaluates open-source code-focused and general LLMs on vulnerability detection, severity and access complexity prediction, and fix generation using Big-Vul and VulRepair datasets, comparing fine-tuning to prompt-based methods.

ABSTRACT

Context: Traditional software security analysis methods struggle to keep pace with the scale and complexity of modern codebases, requiring intelligent automation to detect, assess, and remediate vulnerabilities more efficiently and accurately. Objective: This paper explores the incorporation of code-specific and general-purpose Large Language Models (LLMs) to automate critical software security tasks, such as identifying vulnerabilities, predicting severity and access complexity, and generating fixes as a proof of concept. Method: We evaluate five pairs of recent LLMs, including both code-based and general-purpose open-source models, on two recognized C/C++ vulnerability datasets, namely Big-Vul and Vul-Repair. Additionally, we compare fine-tuning and prompt-based approaches. Results: The results show that fine-tuning uniformly outperforms both zero-shot and few-shot approaches across all tasks and models. Notably, code-specialized models excel in zero-shot and few-shot settings on complex tasks, while general-purpose models remain nearly as effective. Discrepancies among CodeBLEU, CodeBERTScore, BLEU, and ChrF highlight the inadequacy of current metrics for measuring repair quality. Conclusions: This study contributes to the software security community by investigating the potential of advanced LLMs to improve vulnerability analysis and remediation.

Motivation & Objective

  • Assess whether code-specific or general-purpose LLMs best support vulnerability analysis tasks.
  • Compare fine-tuning with zero-shot and few-shot prompting approaches.
  • Evaluate open-source LLMs against recognized metrics and datasets for code repairs.
  • Investigate the reliability of current code similarity metrics in repair evaluation.

Proposed method

  • Select five pairs of code-specific and general-purpose open-source LLMs from leaderboards.
  • Evaluate models on three task categories: Detection, Severity Prediction, and Access Complexity Classification, plus Fix Generation.
  • Use Big-Vul and VulRepair datasets to train and test the models.
  • Apply LoRA PEFT for fine-tuning with defined hyperparameters.
  • Compare zero-shot, few-shot, and fine-tuned performances across tasks and models.
Figure 1. Prompt Design
Figure 1. Prompt Design

Experimental results

Research questions

  • RQ1RQ1: How does fine-tuning compare to prompt-based approaches for vulnerability detection?
  • RQ2RQ2: Do code-specific models consistently outperform general-purpose models across tasks and approaches?
  • RQ3RQ3: Which pair of models shows superior performance across tasks and approaches?
  • RQ4RQ4: Are existing code similarity metrics adequate for evaluating code fix generation?

Key findings

  • Fine-tuning consistently outperforms zero-shot and few-shot approaches across tasks and models.
  • Code-specific models do not universally outperform general-purpose models; performance depends on task and method.
  • Llama and DeepSeek pairs are among the strongest performers across settings, with no single winner across all tasks.
  • CodeBERTScore and Rouge-L are relatively robust across tasks, while BLEU-4 and CodeBLEU can be unreliable for code repair evaluation.
  • Zero-shot results are weaker than few-shot in most repair evaluations, and metric discrepancies raise concerns about evaluation validity.
  • The study provides a baseline indicating the value and limits of open-source LLMs in vulnerability workflows.
Figure 2. Model Performance Comparison based on Zero-Shot and Few-Shot approach for task 1
Figure 2. Model Performance Comparison based on Zero-Shot and Few-Shot approach for task 1

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.