mlsanityData to 14 Oct 2026

PromptAudit: Auditing Prompt Sensitivity in LLM-Based Vulnerability Detection

arXiv 2605.24171 ↗First posted 22 May 2026cs.LG cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

Large language models are increasingly used for vulnerability detection, yet their reliability under different prompt formulations remains uncharacterized. We present PromptAudit, a controlled evaluation framework that isolates prompt effects by fixing the dataset, decoding, and parsing while varying only the prompting strategy. Using five prompting strategies across five open-weight models on 1,000 CVEs (6,074 code samples spanning 16 programming languages), we evaluate accuracy, recall, abstention, coverage, and effective F1. We find that standard chain-of-thought prompting achieves the strongest overall operational performance, while few-shot prompting provides model-dependent benefits that are most pronounced for prompt-sensitive models. In contrast, adaptive chain-of-thought frequently suppresses recall and self-consistency induces excessive abstention, sharply reducing effective performance. These results show that vulnerability detection behavior is jointly determined by the model and the prompt, and that prompt sensitivity is a first-class system property that must be explicitly characterized in evaluation and deployment.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 24 of its 47 references that are in the map. First posted on arXiv 22 May 2026.

Builds on

24 of 47 references.

References · 24

  1. 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
  2. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
  3. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  4. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  5. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  6. 2023Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingcited by 817
  7. 2023StarCoder: may the source be with you!cited by 799
  8. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
  9. 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 155
  10. 2020Deep Learning based Vulnerability Detection: Are We There Yet?cited by 144
  11. 2018Automated Vulnerability Detection in Source Code Using Deep Representation Learningcited by 114
  12. 2023Unleashing the potential of prompt engineering for large language modelscited by 72
12 more
  1. 2023Better Zero-Shot Reasoning with Self-Adaptive Promptingcited by 52
  2. 2022VulBERTa: Simplified Source Code Pre-Training for Vulnerability Detectioncited by 51
  3. 2022An Empirical Study of Deep Learning Models for Vulnerability Detectioncited by 46
  4. 2024Chain-of-Thought Prompting of Large Language Models for Discovering and Fixing Software Vulnerabilitiescited by 31
  5. 2025Flaw or Artifact? Rethinking Prompt Sensitivity in Evaluating LLMscited by 30
  6. 2025KNighter: Transforming Static Analysis with LLM-Synthesized Checkerscited by 24
  7. 2025Towards LLMs Robustness to Changes in Prompt Format Stylescited by 21
  8. 2025Security and Quality in LLM-Generated Code: A Multi-Language, Multi-Model Analysiscited by 19
  9. 2023Universal Self-Adaptive Promptingcited by 14
  10. 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Securitycited by 10
  11. 2024Think Beyond Size: Adaptive Prompting for More Effective Reasoningcited by 2
  12. 2025Enhancing Vulnerability Reports with Automated and Augmented Description Summarizationcited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 2.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Retrieval-Augmented Few-Shot Prompting Versus Fine-Tuning for Code Vulnerability Detection
  2. 2025Explicit Vulnerability Generation with LLMs: An Investigation Beyond Adversarial Attacks
  3. 2024Can LLM Prompting Serve as a Proxy for Static Analysis in Vulnerability Detection
  4. 2026An Empirical Evaluation of LLM-Generated Code Security Across Prompting Methods
  5. 2025Reasoning with LLMs for Zero-Shot Vulnerability Detection
  6. 2024LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoning
  7. 2025Benchmarking Prompt Engineering Techniques for Secure Code Generation with GPT Models
  8. 2025A Mixture of Linear Corrections Generates Secure Code