← Lab /AI/ML

SPLASH picks secure code 74% of the time and spots vulnerable statements first 58% of insecure cases

SPLASH can identify the secure program among LLM candidates and locate the vulnerable statement without model training or internal access

AI/ML arXiv 19 Oct 2026 Method Prototype evidence

Published as “SPLASH: Contrastive Audit Pressure for Detecting and Localizing Security Hallucinations in Generated Code”

Why it matters

Developers can automatically prioritize safer generated code and focus review effort on the most likely vulnerable lines without extra training or API calls.

Summary

SPLASH selects the secure candidate in 74% of decisive pools, closing 46% of the gap to a perfect pick, and puts the vulnerable statement first in 58% of insecure programs (top-3 in 85%). The evidence comes from 899 tasks across 12 generators, showing consistent gains over random choice, generation uncertainty, and static analyzers. However, a frontier LLM judge (GPT-5.6 Sol) locates the vulnerable line first in 70% of cases, outperforming SPLASH's localization. The study also notes that small models sometimes perform worse with self-audit, and that benchmarks are heavily Python-centric.

What they found 3

  1. SPLASH picks secure code in 74% of decisive candidate pools

    “SPLASH picks secure code in 74% of decisive candidate pools (random: 54%, uncertainty: 65%), closing 46% of the gap to a perfect pick.”

  2. Audit pressure places the vulnerable statement first in 58% of insecure programs

    “On 4 091 insecure generated programs, AP (fixed 32B) places the vulnerable statement first in 58% of cases (85% at top 3, 97% at top 10; Table 1).”

  3. Security hallucinations affect every model, with 24-60% of open models insecure and 6-8% of frontier models insecure

    “Summary: Security hallucinations affect every model (24-60% open, 6-8% frontier) and are written confidently: 86% have only insecure siblings.”

Caveats 5

  • The frontier LLM judge (GPT-5.6 Sol) locates the vulnerable statement first in 70% of insecure programs, higher than SPLASH's 54% on the same sample.
  • Self-audit (AP self) falls below generation uncertainty for several small models (e.g., Qwen2.5-Coder-1.5B, DeepSeek-Coder-V2-Lite, Granite-3.3-8B).
  • Internal validity. Frame wording, APmax, and comment blanking were frozen on a 70% pilot split selected by a deterministic hash of the task identifier.
  • External validity. SecCodePLT, a python-based dataset, contributes 91% of programs.
  • Construct validity. We equate secure as a ground truth with passing the task’s security tests.

What’s new here 3

  • Introduces audit pressure, a contrastive token-level signal from a security-review vs. style-review model.
  • Provides a training-free, model-agnostic method that both selects secure code and localizes vulnerable statements in a single pass.
  • Works with any generator (open-weight, closed-API, or agentic pipelines) without requiring CWE-specific rules or labeled data.