How Code Representation Shapes False-Positive Dynamics in Cross-Language LLM Vulnerability Detection
Maofei Chen, Laifu Wang, Yue Qin, Yuan Wang, Bo Wu, Dongxin Liu

TL;DR
This study investigates how code representation formats influence false-positive rates in cross-language vulnerability detection by LLMs, revealing that surface cues and training data significantly impact false positives.
Contribution
It demonstrates that training on raw text increases false positives due to surface cue memorization, and that AST-based representations can reduce false positives without retraining.
Findings
Text fine-tuning increases false positives but not F1 scores.
AST input reduces false positives significantly in cross-language settings.
AST-based probing reveals surface cue memorization as a key factor.
Abstract
How code representation format shapes false positive behaviour in cross-language LLM vulnerability detection remains poorly understood. We systematically vary training intensity and code representation format, comparing raw source text with pruned Abstract Syntax Trees at both training time and inference time, across two 8B-parameter LLMs (Qwen3-8B and Llama 3.1-8B-Instruct) fine-tuned on C/C++ data from the NIST Juliet Test Suite (v1.3) and evaluated on Java (OWASP Benchmark v1.2) and Python (BenchmarkPython v0.1). Cross-language FPR reflects the joint effect of training-time and inference-time representation, not either alone. Text fine-tuning drives FPR upward monotonically (Qwen3-8B: 0.763 zero-shot, 0.866 pilot, 1.000 full-scale) while F1 remains stable (0.637-0.688), masking the collapse. We argue surface-cue memorisation is the primary mechanism: text fine-tuning encodes…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
