Enterprises increasingly rely on large language models (LLMs) to automate vulnerability detection in critical systems software, from operating systems to embedded firmware. However, a new research paper challenges the assumption that fine-tuning these models on security data produces reliable reasoning. The study, titled "Calibration Without Comprehension: Diagnosing the Limits of Fine-Tuning LLMs for Vulnerability Detection in Systems Software," reveals that even after extensive fine-tuning, LLMs fail to develop genuine security understanding, achieving detection accuracy only marginally above chance.
The CWE-Trace Framework
To isolate genuine reasoning from pattern-matching, the researchers—Zibaeirad, Arastoo, Vieira, and Marco—built a benchmark called CWE-Trace, consisting of 834 manually curated Linux kernel samples spanning 74 Common Weakness Enumerations (CWEs). The framework enforces a strict temporal split: a historical set (pre-2025) and a post-cutoff leakage-free set (post-2025). It preserves context-aware vulnerable–patched pairs and introduces two diagnostic metrics:
- Directional Failure Index (DFI) – measures systematic failure modes in detection decisions.
- Hierarchical Distance and Direction (HDD) – evaluates the semantic distance of misclassifications.
The researchers evaluated eight vanilla LLMs and 15 LoRA fine-tuned variants across non-targeted detection, targeted detection, and CWE classification tasks.
Key Findings: Contamination and Comprehension
The study yields two critical results:
1. Data contamination provides no measurable advantage. Despite concerns that LLMs might memorize vulnerable code from training data, function-level analysis showed that 84% of nominally contaminated samples carry no usable memorization signal: vulnerable functions are absent or cross-mapped across datasets. Additionally, approximately 31% of contaminated samples carry CWE misclassification.
2. Backbone directional priors dominate fine-tuning. Models exhibit stable, systematic failure modes (DFI ranging from -85.5 to +94.8 percentage points) that persist across both historical and post-cutoff data and resist correction. Fine-tuning shifts the output threshold without changing the decision policy—a phenomenon the authors term "calibration without comprehension": output distributions adapt to the training data while the underlying security reasoning remains absent.
| Metric | Value |
|---|---|
| Best detection accuracy | 52.1% (+2.1 pp above chance) |
| Exact CWE ranking Top-1 accuracy | <1.3% |
| Contaminated samples with no memorization signal | 84% |
| Contaminated samples with CWE misclassification | ~31% |
| DFI range | -85.5 to +94.8 pp |
Notably, the weakest backbone at binary detection (DeepSeek-R1) gained the most in coarse CWE classification, revealing that detection and understanding are decoupled capabilities. The best detection score reached only 52.1%, just 2.1 percentage points above chance, and exact CWE ranking remained below 1.3% Top-1 accuracy.
Implications for Enterprise Security
For CTOs and security leaders deploying AI-augmented code analysis, these findings signal that current LLMs lack reliable security reasoning for systems software, regardless of the fine-tuning strategy. The decoupling of detection from comprehension means that even when a model flags a vulnerability correctly, it may do so for the wrong reasons, undermining trust in automated triage pipelines.
The persistence of systematic failure modes across datasets and fine-tuning techniques suggests that the underlying architecture—not just the training data—is the limiting factor. Until backbones are designed or adapted to encode security semantics explicitly, fine-tuning alone will not close the gap.
The Calibration Without Comprehension Problem
The core insight of the research is that fine-tuned models adjust their output probabilities to match training distributions (calibration) but fail to acquire new decision rules (comprehension). In practice, this means a model may appear more confident on vulnerability detection tasks without any genuine improvement in accuracy or semantic understanding. For enterprises, this creates a dangerous illusion of capability: a fine-tuned model that scores well on benchmarks may still miss critical vulnerabilities or produce false positives that erode operational efficiency.
The study underscores that progress in AI-driven security requires not just more data or longer training, but fundamentally new architectures and evaluation frameworks that measure reasoning, not just pattern correlation.