Routing Ceilings Are Domain-Independent: Structural Prior Injection in Code Security Vulnerability Detection

Manuel Israel Cázares
7/16/2026
cs.CLcs.CR

Official code: bytepro-ai/bitcoder-v2-research (1 star, Python, last commit 2026-08-11).

Abstract

Large language models (LLMs) exhibit a well-documented gap between latent capability and consistent activation: the router hypothesis posits that models possess the knowledge to solve a task but lack reliable internal routing to activate it. Prior work in formal mathematical reasoning (SAIR, Cázares 2026) reports that structural priors (cheatsheets) raise in-distribution performance dramatically, yet collapse below the zero-shot baseline out-of-distribution (OOD) -- and that iterative recalibration amplifies rather than corrects the collapse.

Show full abstract

We test whether this phenomenon is cross-domain by reproducing the SAIR design in source-code security vulnerability detection, evaluating three LLMs (GPT-OSS-120B, Llama-3.3-70B, Gemma-4-31B) across three vulnerability categories (CWE-798, CWE-284, and the non-CWE N+1 anti-pattern) spanning syntactic, contextual, and semantic complexity, then transferring cheatsheet-augmented prompts to real-world CVE data from VUDENC (CWE-89, CWE-22). Our findings replicate and extend SAIR: (F1) structural priors lift semantic-vulnerability recall from 20.0% to 100.0% across all models; (F2) zero-shot performance degrades along a semantic complexity gradient; (F3) the same cheatsheets that saturate synthetic performance amplify distribution-shift collapse on real CVE data (CWE-89: 100% synthetic F1 to 48.9% on VUDENC, -51.1pp); (F5) iterative recalibration produces a v2 cheatsheet that performs worse than v1 on real data, mirroring SAIR's AN45c-vs-AN38 finding. These results provide evidence that the cross-distribution trade-off surface documented in SAIR generalises to code security, and that the router hypothesis is cross-domain. We argue the structural nature of the collapse motivates distribution-aware training over prompt calibration. Code and evaluation scripts: https://github.com/bytepro-ai/bitcoder-v2-research

View on arXivView PDF

Code Implementations(1)

11Python, TeXMay 6, 20263 months ago

Similar Papers

Cite this paper

@article{czares2026routing,
  title  = {Routing Ceilings Are Domain-Independent: Structural Prior Injection in Code Security Vulnerability Detection},
  author = {Manuel Israel Cázares},
  year   = {2026},
  eprint = {2607.14628},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.14628v1}
}

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/2607.14628.svg)](https://codeofpaper.com/paper/2607.14628)

Discussion