TRANSMISSION // 2611.28584v1
Can LLMs Find Vulnerabilities for the Right Reasons?
Source published
Execution-grounded tests show that models can locate faults, but distinguishing vulnerable code from fixes and handling newer flaws remain harder.

A correct vulnerability warning does not necessarily mean a model understands why code fails. Researchers tested that distinction by comparing model judgments with evidence from reproduced program executions and screened fixes.
Large language models can label a function as vulnerable and point to suspicious lines. But does a correct verdict mean a model has identified why the code fails—or might it rely on familiar patterns, risky keywords, or a tendency to flag too much? Leizhen Zhang and Sheng Chen tested that question against program execution.
The researchers studied 515 C and C++ functions from the BigVul and PrimeVul datasets. For each function, they reproduced a vulnerability with a proof-of-concept input, then screened the corresponding fixed version. The study reports repeated clean runs and additional checks of those fixes; that screening is evidence about the tested cases, not a guarantee that a function has no other defects. From each faulting run, the researchers identified the line where the fault appeared and the statements on which that run depended. This set, called a dynamic slice, describes relevant code for one execution—not every possible cause of a vulnerability.
The team evaluated 13 language models: nine open-weight models and four commercial ones. Their five tests moved from distinguishing vulnerable code from its fix to locating the fault, checking whether removing relevant code changed the verdict, judging edits whose effects were confirmed by execution, and predicting whether a specific run would fault when given its driver and input.
Each test included a comparison intended to expose shortcuts. For example, the models’ fault localization was compared with a rule that selects lines containing risky-looking calls. The researchers also tested 195 vulnerabilities published after the commercial models’ stated training cutoffs, asking whether results on older vulnerabilities might reflect prior exposure.
The findings show why a single benchmark score can hide important differences. Distinguishing vulnerable functions from their fixes was difficult. None of the open-weight models beat its chance-level pair-discrimination baseline, although five showed weak sensitivity to the fix. Three commercial models did beat chance, but the GPT models still labeled both versions vulnerable in about half of the matched pairs. A warning on vulnerable code was not enough: the model also had to recognize that the screened repair changed the result.
Fault localization was stronger. Commercial models cited the trigger line—the line where the fault appeared—more often than the keyword rule. Two open-weight reasoning models also exceeded that shortcut on this measure. Still, citing relevant lines does not establish that a model’s verdict depends on those lines. Removing the execution-derived evidence reduced pair discrimination for three commercial models. For Claude Opus 5.5, pair discrimination did not significantly decline after this removal on the older set; that aggregate result does not establish that individual verdicts stayed the same. The authors therefore describe reliance on localized evidence as partial, not universal.
With a concrete input and driver, all four commercial models predicted run outcomes more accurately than a rule based on added checks in the older set. The paper reports that, on 68.3% to 88.3% of the 60 functions tested with a benign input, each model predicted a clean run for the vulnerable function on that input while also predicting a fault on the attack input. This is evidence about particular executions, not general understanding of a vulnerability. On the newer vulnerabilities, the models’ advantage over the guard rule disappeared, although fault localization persisted.
The newer set also changed the picture for standalone detection. Claude Opus 5.5’s pair-discrimination result fell from 67.2% on the older set to 37.1% on the newer one. The authors say this pattern is consistent with training exposure or differences between the samples; it does not prove that memorization caused the decline. In a recognition probe in which the commercial models were shown vulnerable functions and asked to name their project and CVE, none named the exact CVE for any of the 195 post-cutoff cases.
There are important limits. The sample includes only C and C++ functions with reproducible proofs of concept and complete dynamic slices, favoring faults the chosen tools could trigger and track. A slice represents one run and can omit causes outside it, such as effects involving heap state or code missing from the function. Screening cannot establish that fixed versions are free of every possible defect. The study also covers 13 models, not every vulnerability detector, and model-testing protocols differed.
The supplied source is an arXiv preprint; the materials here do not independently establish publication or peer-review status. The findings are best read as evidence about these models, tasks, and selected functions—not a universal verdict on AI security tools. The study’s central lesson is that a detector’s verdict, cited evidence, response to a repair, and prediction of a particular run are distinct abilities that should be evaluated separately.
- large language models
- software security
- vulnerability detection
- program execution
- dynamic slicing
- AI evaluation
Reviewed cross-references
These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.
Can AI Write Android Lint Rules From Plain English?
Shared method: Both studies use program execution as part of evaluation: Zhang and Chen ground vulnerability labels and tests in reproduced faulting runs and execution-confirmed edits, while Fakorede and colleagues use compiler and held-out test feedback to evaluate and repair generated Android Lint checks. The shared method is execution-based evaluation, not a shared task or benchmark; their results concern different systems and outcomes.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2611.28584v1 — Original paper
Excerpt reference:
static/papers/2611.28584v1.md:13-68
Basis: Paper text
Source SHA-256:456c817c108f7d912399a1328bfc7ad748de4de452d7eb3ff6ed6182e1c815742611.28159v1 — Original paper
Excerpt reference:
static/papers/2611.28159v1.md:13-61
Basis: Paper text
Source SHA-256:fd9baedcc18c57ff63c57ddb7845fe4dcc783cbbb9ab26893eb9c1a9cd0da7582611.28159v1 — Original paper
Excerpt reference:
static/papers/2611.28159v1.md:1567-1632
Basis: Paper text
Source SHA-256:fd9baedcc18c57ff63c57ddb7845fe4dcc783cbbb9ab26893eb9c1a9cd0da758
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
When AI verifier routing may not save much
Source published
Shared keywords: ai evaluation, large language models
When an AI agent’s approved tool call isn’t the one that runs
Source published
Shared keywords: software security
AI Agents Audit Rust’s Unsafe Boundaries
Source published
Shared keywords: software security
Can AI Build and Improve Business Agents?
Source published
Shared keywords: ai evaluation, large language models
Can language models reason strategically? GENSTRAT tests them in generated games
Source published
Shared keywords: ai evaluation, large language models