SPLASH: Contrastive Audit Pressure for Detecting and Localizing Security Hallucinations in Generated Code

Mirza Masfiqur Rahman, MD Ajwad Akil, Imtiaz Karim, Ashish Kundu, Ramana Kompella +1 more
10/19/2026
cs.CRcs.LGcs.SE

No confident code implementation found for this paper.

Abstract

Code generated by large language models often passes every functional test while remaining insecure. These security hallucinations are common, written with high confidence, and repeated across samples, so neither the generator's own uncertainty nor static analyzers reliably catch them. We introduce SPLASH, which is guided by a new measure called audit pressure. It contrasts teacher-forced log-probabilities for the generated program under a security review and a style review. Aggregated to statements and programs, and grounded in a probabilistic model of competing edits, audit pressure allows SPLASH to choose the secure program among a model's candidate programs and locate the vulnerable statement, with no model training, CWE-specific rules, or internal access to the generating model. On 63,684 programs generated by 12 models for 899 tasks, SPLASH picks secure code in 74% of cases, places the vulnerable statement first in 58% of insecure programs, and chooses better than a frontier LLM judge.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{rahman2026splash,
  title  = {SPLASH: Contrastive Audit Pressure for Detecting and Localizing Security Hallucinations in Generated Code},
  author = {Mirza Masfiqur Rahman and MD Ajwad Akil and Imtiaz Karim and Ashish Kundu and Ramana Kompella and Elisa Bertino},
  year   = {2026},
  eprint = {2610.26001},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.26001v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.26001.svg)](https://codeofpaper.com/paper/2610.26001)

Discussion