mlsanityData to 7 Oct 2026

SV-TrustEval-C: Evaluating Structure and Semantic Reasoning in Large Language Models for Source Code Vulnerability Analysis

arXiv 2505.20630 ↗First posted 27 May 2025cs.SE cs.CLcited by 8

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

As Large Language Models (LLMs) evolve in understanding and generating code, accurately evaluating their reliability in analyzing source code vulnerabilities becomes increasingly vital. While studies have examined LLM capabilities in tasks like vulnerability detection and repair, they often overlook the importance of both structure and semantic reasoning crucial for trustworthy vulnerability analysis. To address this gap, we introduce SV-TrustEval-C, a benchmark designed to evaluate LLMs' abilities for vulnerability analysis of code written in the C programming language through two key dimensions: structure reasoning - assessing how models identify relationships between code elements under varying data and control flow complexities; and semantic reasoning - examining their logical consistency in scenarios where code is structurally and semantically perturbed. Our results show that current LLMs are far from satisfactory in understanding complex code relationships and that their vulnerability analyses rely more on pattern matching than on robust logical reasoning. These findings underscore the effectiveness of the SV-TrustEval-C benchmark and highlight critical areas for enhancing the reasoning capabilities and trustworthiness of LLMs in real-world vulnerability analysis tasks. Our initial benchmark dataset is publicly available.

Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 35 of its 78 references that are in the map. First posted on arXiv 27 May 2025.

Builds on

35 of 78 references.

Closest ancestors · 2

Same direction, newest first

  1. 2024CodeMind: Evaluating Large Language Models for Code Reasoning15 Feb
  2. 2023Teaching Large Language Models to Self-Debug11 Apr

Other references · 33

  1. 2023GPT-4 Technical Reportcited by 18,132
  2. 2024The Llama 3 Herd of Modelscited by 14,192
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  4. 2023Qwen Technical Reportcited by 3,273
  5. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
  6. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  7. 2024Mixtral of Expertscited by 1,785
  8. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  9. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
  10. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  11. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
  12. 2024Gemma: Open Models Based on Gemini Research and Technologycited by 889
21 more
  1. 2023AGIEval: A Human-Centric Benchmark for Evaluating Foundation Modelscited by 701
  2. 2023Prompt Injection attack against LLM-integrated Applicationscited by 568
  3. 2024GSM-Symbolic: Understanding the Limitations of Mathematical Reasoning in Large Language Modelscited by 533
  4. 2023The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A"cited by 399
  5. 2023Large Language Models as General Pattern Machinescited by 196
  6. 2022Self-Adaptive In-Context Learning: An Information Compression Perspective for In-Context Example Selection and Orderingcited by 158
  7. 2024CodeGemma: Open Code Models Based on Gemmacited by 145
  8. 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 133
  9. 2024On Memorization of Large Language Models in Logical Reasoningcited by 114
  10. 2024CyberSecEval 2: A Wide-Ranging Cybersecurity Evaluation Suite for Large Language Modelscited by 84
  11. 2024CTIBench: A Benchmark for Evaluating LLMs in Cyber Threat Intelligencecited by 61
  12. 2023Understanding the Effectiveness of Large Language Models in Detecting Security Vulnerabilitiescited by 58
  13. 2024CyberMetric: A Benchmark Dataset based on Retrieval-Augmented Generation for Evaluating LLMs in Cybersecurity Knowledgecited by 55
  14. 2023Security Weaknesses of Copilot-Generated Code in GitHub Projects: An Empirical Studycited by 36
  15. 2018Automated software vulnerability detection with machine learningcited by 34
  16. 2023Code Execution with Pre-trained Language Modelscited by 33
  17. 2023Uncovering the Limits of Machine Learning for Automatic Vulnerability Detectioncited by 30
  18. 2024Generative AI in Cybersecurity: A Comprehensive Review of LLM Applications and Vulnerabilitiescited by 20
  19. 2024Enhanced Automated Code Vulnerability Repair using Large Language Modelscited by 10
  20. 2018VulDeePecker: A Deep Learning-Based System for Vulnerability Detectioncited by 4
  21. 2024Large Language Models are Pattern Matchers: Editing Semi-Structured and Structured Documents with ChatGPTcited by 2

Built on by

Cited by year (2026 to 7 Oct)

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

8 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoning
  2. 2026Representation Matters: An Empirical Study of Program Representations for LLM Vulnerability Reasoning
  3. 2025VulInstruct: Teaching LLMs Root-Cause Reasoning for Vulnerability Detection via Security Specifications
  4. 2025Boosting Vulnerability Detection of LLMs via Curriculum Preference Optimization with Synthetic Reasoning Data
  5. 2025Reasoning with LLMs for Zero-Shot Vulnerability Detection
  6. 2026Correct Verdicts, Flawed Reasoning: Structured Auditing of LLM-based Vulnerability Reasoning
  7. 2026Do Fine-Tuned LLMs Understand Vulnerabilities? An Investigation into the Semantic Trap
  8. 2024To Err is Machine: Vulnerability Detection Challenges LLM Reasoning