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

· Source: Computation and Language · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Cybersecurity & Data Privacy, Software Development & Engineering · Depth: Expert, quick

Summary

A recent study published on July 16, 2026, investigates the "router hypothesis" in large language models, which posits that LLMs possess task knowledge but lack consistent internal routing to activate it. Reproducing the SAIR design, researchers tested GPT-OSS-120B, Llama-3.3-70B, and Gemma-4-31B on code security vulnerability detection across synthetic vulnerabilities (CWE-798, CWE-284, N+1 anti-pattern) and real-world CVE data (CWE-89, CWE-22) from VUDENC. Findings show structural priors (cheatsheets) dramatically increase semantic-vulnerability recall from 20.0% to 100.0% in synthetic tests. However, these same cheatsheets amplify performance collapse on real CVE data, with CWE-89 F1 scores dropping from 100% to 48.9% (-51.1pp). Iterative recalibration further degraded performance on real data. These results suggest the cross-distribution trade-off observed in SAIR is domain-independent, extending to code security, and advocate for distribution-aware training over prompt calibration.

Key takeaway

For AI Security Engineers deploying LLMs for vulnerability detection, understand that structural priors, while boosting synthetic performance, significantly degrade real-world accuracy. Your models' F1 scores could drop from 100% to 48.9% on actual CVEs. Prioritize distribution-aware training over prompt calibration to build robust systems, as iterative recalibration further exacerbates out-of-distribution collapse.

Key insights

Structural priors boost LLM in-distribution recall but amplify out-of-distribution collapse, a cross-domain phenomenon.

Principles

Method

The study reproduced the SAIR design, evaluating three LLMs on synthetic and real-world code security vulnerabilities using cheatsheet-augmented prompts, then iteratively recalibrating.

In practice

Topics

Code references

Best for: Research Scientist, AI Scientist, NLP Engineer, AI Security Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Computation and Language.