Gemini 3 Flash detects C interprocedural bugs with ≥97.8% F1 at <$0.60 cost
Gemini 3 Flash achieves an F1 score of at least 0.978 for C vulnerabilities with an estimated cost of $0.50-$0.58 per configuration
Software arXiv 9 Apr 2026 Measurement Prototype evidence
Published as “Vulnerability Detection with Interprocedural Context in Multiple Languages: Assessing Effectiveness and Cost of Modern LLMs”
Why it matters
Tool builders should prioritize Gemini 3 Flash for cost-effective C vulnerability scanning and be cautious about adding interprocedural context, as it may not yield accuracy gains and can increase inference cost.
Summary
Gemini 3 Flash offers the best cost-performance trade-off for C vulnerability detection, achieving F1 ≥0.978 at an estimated $0.50-$0.58 per configuration, while Claude Haiku 4.5 correctly identifies and explains 93.6% of cases. Adding interprocedural context does not consistently improve detection and often degrades accuracy, especially for the smaller GPT models. The evidence is based on a 509-vulnerability sample from ReposVul evaluated across three languages with statistical testing, showing strong but language-dependent effects.
What they found 3
- Claude Haiku 4.5 attains very high correctness and explanation quality.
“Claude Haiku 4.5 correctly identified and explained the vulnerability in 93.6% of the evaluated cases.”
- Interprocedural context does not reliably improve detection accuracy.
“Interprocedural context does not consistently improve LLM accuracy in vulnerability detection.”
- GPT-4.1 Mini performance drops sharply when context is added.
“GPT-4.1 Mini shows a dramatic decline from 0.7561 in CO to 0.5401 in CC.”
Caveats 5
- Providing caller or callee context often reduces accuracy rather than improving it, with statistically significant drops for GPT-4.1 Mini and GPT-5 Mini.
- The GPT models exhibit higher zero-score rates (6.1%-6.8%) for explanation correctness and comprehensiveness compared to Claude Haiku and Gemini.
- We cannot guarantee the complete absence of overlap with the training data, as the data used to train these models is not publicly disclosed by their providers.
- The manual evaluation conducted for RQ4 relied on a rubric-based scoring scheme (0-2 scale for correctness and comprehensiveness) applied by a single practitioner across all LLM-generated explanations.
- All prompts follow a fixed structure; we did not perform model-specific prompt optimization (prompt tuning).
What’s new here 4
- Evaluates the impact of interprocedural (caller/callee) context on LLM-based vulnerability detection across C, C++, and Python.
- Measures both detection effectiveness and inference cost, providing a cost-performance analysis for modern LLMs.
- Assesses the quality and completeness of model-generated explanations for detected vulnerabilities.
- Compares four recent LLMs (Claude Haiku 4.5, GPT-4.1 Mini, GPT-5 Mini, Gemini 3 Flash) on a public interprocedural vulnerability dataset.