Metraipolis › archive › dc_1566194ac6e2

Probing the Prefill: Detecting Code Vulnerabilities via Latent Activations — arXiv:2608.16970

Source
arXiv (en)
Original
https://arxiv.org/abs/2608.16970
License (as archived)
CC0-1.0
Archived
2026-10-18T14:29:05.568Z
SHA-256 of the archived text
58cddaf151d8d44ba299018e2068d8604ad3dfb3fe74ed8365a91911c652356b
Stable URL of this page
https://metraipolis.com/documento/dc_1566194ac6e2

How to cite

Probing the Prefill: Detecting Code Vulnerabilities via Latent Activations — arXiv:2608.16970 — arXiv (en), https://arxiv.org/abs/2608.16970 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_1566194ac6e2 (Metraipolis archive dc_1566194ac6e2, sha256 58cddaf151d8d44ba299018e2068d8604ad3dfb3fe74ed8365a91911c652356b)
BibTeX
@misc{dc1566194ac6e2,
  title = {Probing the Prefill: Detecting Code Vulnerabilities via Latent Activations — arXiv:2608.16970},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2608.16970},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_1566194ac6e2; sha256 58cddaf151d8d44ba299018e2068d8604ad3dfb3fe74ed8365a91911c652356b},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.16970. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

LLM-based code generation is now embedded in mission-critical pipelines, but defenses against vulnerable output remain post-hoc -- static analyzers, fine-tuned classifiers, or an LLM judge that screen completed code, ignoring the generating model's own internal state. We test a narrower, directly measurable question: when an LLM reads a piece of C/C++ code as context, do its hidden activations already carry a signal about that code's vulnerability status? We extract last prefill token activations from four LLMs (Granite-4.1-8B, Qwen3.5-9B, Qwen3.6-27B, Gemma-4-12B) across three model families and train MLP probes on these activations. We evaluate them on four function-level C/C++ benchmarks (Devign, Big-Vul, Draper VDISC, PrimeVul). Our probes achieve 41.7\% average F1 using 13.4--16.0M-parameter probes -- under 0.2\% of base-model size. On Devign, the best probe (Qwen3.5-9B, 68.8\% F1) matches the published fine-tuned-classifier SOTA (67.9\%) despite reading only a frozen, general-purpose LLM's activations; on the harder, more imbalanced benchmarks (Big-Vul, Draper VDISC, PrimeVul) probes trail SOTA substantially. This is early evidence that a coding LLM's own representation of arbitrary code is informative about that code's vulnerability status, motivating further work toward lightweight, model-native vulnerability screening.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-08-19 in cs.AI).
Categorie arXiv: Cryptography and Security (cs.CR) ; Artificial Intelligence (cs.AI); Machine Learning (cs.LG).
Pagina del lavoro: https://arxiv.org/abs/2608.16970 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-18T14:27:54.356Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-08-19?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).