TRANSMISSION // 2612.06134v1

Why AI vulnerability hunters keep finding bugs after they’re fixed

Source published

A preprint finds that AI agents often flag patched code, partly because they switch to a different suspected flaw. Paired tests help separate this from failure to recognize a fix.

AI-generated conceptual illustration for Why AI vulnerability hunters keep finding bugs after they’re fixed
AI-generated conceptual illustration; not documentary evidence.

AI agents that inspect software for security flaws must do more than spot a vulnerability: they should also recognize when a patch has removed it. StageGate-RSI examines why agents struggle with that second task and tests ways to separate verification errors from changing suspicions.

The challenge: knowing when a bug is gone

An AI agent searching code for vulnerabilities can produce a false alarm even when the code has been patched. But that alarm has more than one possible cause. The agent might fail to understand the patch—or it might stop pursuing the original bug and raise a different concern instead.

That distinction matters when evaluating an agent. If every alarm on patched code is treated as evidence that the agent failed to recognize a fix, researchers may try to improve the wrong part of the system. The StageGate-RSI preprint, by researchers affiliated with Google, studies this problem and asks whether agents can improve using feedback from their own runs without mistaking random variation for progress.

Paired code, separated stages

The researchers built two benchmarks of code before and after a reported fix: PairVuln-Multi, with 203 commit pairs, and PairVuln-Single, with 1,241. They describe a curation process intended to reduce label leakage and mismatched versions, including checking commit order, filtering out changes that only alter formatting, and removing issue descriptions and commit messages that might reveal the answer. The paper reports 2,888 code snapshots in total.

The evaluated agent has two steps. First, a hypothesis proposer suggests what might be wrong; then a verifier examines code and decides whether a vulnerability is present. To test the verifier separately, the researchers gave it the same hypothesis for both versions of a code pair. In one condition, this was a concrete hypothesis generated from the pre-fix code. This “teacher-forcing” setup holds the suspected issue steady, rather than asking the agent to propose a new one after the patch.

The team also tested a process for refining the agent’s instructions. It compared paired successes and failures, kept the data used to propose changes separate from the data used to score them, and required candidate changes to pass statistical checks and confirmation runs. These safeguards aim to reduce the chance of selecting a change that looks good by luck or improves one result while damaging another.

A major source of false alarms

On PairVuln-Single, the end-to-end baseline evaluated on the held-out 310-pair split had reported pre-fix recall of 74.84% and post-fix specificity of 43.12%. The paper reports these baseline results across three independent replications. With a concrete pre-fix hypothesis supplied for both versions, post-fix specificity rose to 75.48%, and paired accuracy rose from 58.98% to 73.23%. The authors attribute 56.9% of end-to-end post-fix false positives on PairVuln-Single to the proposer switching topics after the original vulnerability had been fixed.

That does not mean all remaining alarms were failures to understand the patch. In a separate test, the verifier received only a code location and broad defect category—not the specific mechanism. Around 70% of its post-fix false alarms then concerned other code smells. Such findings might matter in an open-ended audit, but they do not establish that the specific vulnerability being tested remains unfixed. The authors distinguish checking a stated hypothesis from searching code for any possible problem.

In the gated self-improvement experiments, a confirmed Phase 3 update improved paired accuracy by 2.26 percentage points on the scoring cohort and by 0.83 points on held-out Val-100. In a separate experiment on Val-H100, a section-bounded change to the agent’s base rubric raised original paired accuracy by 1.83 points and specificity by 6.67 points, while recall fell by 3 points. These results illustrate why the researchers track both missed vulnerabilities and false alarms rather than relying on a single score.

What the results do—and don’t—show

The paper reports a run-to-run verdict flip rate of roughly 14–15% in its multi-turn agent setup. Setting decoding to a greedy mode did not eliminate that instability. The authors argue that repeated checks and explicit acceptance rules are therefore important when deciding whether an instruction change truly helps.

The evidence has important limits. The benchmarks were curated from internal issue trackers and scanners, and the paper says no code, prompts, or benchmark data are released externally. That makes independent reproduction difficult. Experiments involve Gemini 2.5 Flash and Pro, but the model and evaluation conditions vary across experiments; results may not carry over to other systems, codebases, or vulnerability types. Teacher-forcing isolates verification, but does not by itself show that an agent can discover and verify vulnerabilities better end to end. The improvement loop also focuses on verification under frozen pre-fix hypotheses, rather than jointly improving both stages.

StageGate-RSI is presented as a preprint, not a peer-reviewed publication. Its findings offer a diagnosis of how changing hypotheses can distort vulnerability evaluations, and why statistical safeguards matter in iterative testing. They do not establish that AI agents are ready to audit production software without human review.

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.

  • AI Repair Agents Can Improve Their Own Toolkits

    Shared method: Both papers use held-out evaluation gates to decide whether an agent-system change should be retained: StageGate-RSI gates recursive rubric evolution, while Reinforcement Building gates proposed harness edits. This is a shared validation strategy, not evidence that the systems or their statistical protocols are equivalent; one evaluates vulnerability detection and the other vulnerability repair.

    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.

    • 2612.06134v1 — Original paper

      Excerpt reference: static/papers/2612.06134v1.md:13-58
      Basis: Paper text
      Source file SHA-256: b802b2f7323b7d270ca054be4d1969f79ad57d900a90e6d11639b7cd59c84ce0

    • 2611.36559v2 — Original paper

      Excerpt reference: static/papers/2611.36559v2.md:13-70
      Basis: Paper text
      Source file SHA-256: 12226ce017d1a99fc72f68e42cf93438a1cfaf1a09b4eb28c3151d1361c5ef1f

  • When AI sees a security check but misses the bypass

    Supporting evidence: Both studies show why an aggregate vulnerability verdict can obscure how an agent reached it: StageGate-RSI attributes many post-fix false positives to hypothesis shifts, while SteelYourHeart finds that verdict-only scoring exceeds explanation-aware rates. The comparison supports evaluating intermediate reasoning or stages, but the tasks and metrics differ, and SteelYourHeart’s cases are all incomplete fixes rather than paired pre-/post-fix examples.

    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.

    • 2612.06134v1 — Original paper

      Excerpt reference: static/papers/2612.06134v1.md:13-58
      Basis: Paper text
      Source file SHA-256: b802b2f7323b7d270ca054be4d1969f79ad57d900a90e6d11639b7cd59c84ce0

    • 2612.05531v1 — Original paper

      Excerpt reference: static/papers/2612.05531v1.md:13-71
      Basis: Paper text
      Source file SHA-256: 7edf6218a28294490197bca6d28880c885faa3aca6a133a2537be821252df86b

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.