Text fine-tuning inflates false positives in cross-language LLM vulnerability detection
Training on raw source text causes false-positive rates to rise dramatically, while AST representation mitigates this effect
Software arXiv 30 Apr 2026 Measurement Prototype evidence
Published as “How Code Representation Shapes False-Positive Dynamics in Cross-Language LLM Vulnerability Detection”
Why it matters
A simple representation-agreement filter can cut over a third of false alerts without retraining, offering a practical way to lower false-positive cost in security audit pipelines.
Summary
Applying a text-fine-tuned LLM to AST-encoded inputs without retraining cuts false-positive rate (FPR) from 0.866 to 0.583 for Qwen3-8B and from 0.983 to 0.905 for Llama 3.1-8B, but the absolute FPR remains high and AST-only fine-tuning does not keep the benefit (FPR ≥0.970). The evidence comes from systematic experiments across two 8B-parameter models, two target languages (Java, Python), and multiple training intensities, showing the effect is reproducible but limited.
What they found 1
- AST fine-tuning does not preserve the FPR benefit, with FPR ≥0.970
“AST fine-tuning does not preserve this benefit (FPR ≥0.970)”
Caveats 6
- Even after the probe, FPR stays at 0.583 for Qwen3-8B and 0.905 for Llama, which are still very high false-positive rates.
- Zero-shot AST input causes FPR to rise to 0.999 (Qwen) and 1.000 (Llama), showing representation alone cannot solve the problem.
- Analysis is restricted to intra-procedural code units; inter-procedural vulnerabilities are out of scope.
- Experiments are limited to 8B-parameter models; larger scales are not evaluated.
- Evaluations cover only two benchmarks (OWASP v1.2 and BenchmarkPython v0.1) and two target languages.
- All experiments use greedy decoding and a fixed strict-JSON system prompt; other decoding or prompting strategies may change absolute FPR values.
What’s new here 4
- Isolates the joint impact of training-time and inference-time code representation on cross-language false positives.
- Introduces a zero-adaptation cross-representation probe (text-trained weights on AST input) as a causal test.
- Demonstrates that AST fine-tuning can introduce its own surface cues, negating the probe’s benefit.
- Provides per-CWE analysis showing lexical-cue dependence of false-positive reductions.