Source code vulnerability detection with LLMs: A systematic evaluation of fine-tuning and multimodal fusion of code text and software metrics*,**
JOURNAL OF SYSTEMS AND SOFTWARE, cilt.244, 2027 (SCI-Expanded, Scopus)
- Yayın Türü: Makale / Tam Makale
- Cilt numarası: 244
- Basım Tarihi: 2027
- Doi Numarası: 10.1016/j.jss.2026.113123
- Dergi Adı: JOURNAL OF SYSTEMS AND SOFTWARE
- Derginin Tarandığı İndeksler: Science Citation Index Expanded (SCI-EXPANDED), Scopus, ABI/INFORM, Aerospace Database, Applied Science & Technology Source, Compendex, INSPEC, Business Source Ultimate (EBSCO), Engineering Source (EBSCO), Technology Collection (ProQuest)
- Orta Doğu Teknik Üniversitesi Adresli: Evet
Özet
Recent advances in Large Language Models (LLMs) present new opportunities for automated software vulnerability detection, yet their comparative behavior across models, fine-tuning conditions, imbalance strategies, and input modalities remains insufficiently characterized. We systematically evaluate 23 publicly available generalpurpose, code-oriented, and security-related LLMs for binary vulnerability detection on SySeVR and Devign, comparing frozen-backbone head training with full fine-tuning. We examine data imbalance through datasetlevel and training-time strategies and evaluate three input settings: software metrics only, source code only, and multimodal fusion of code and metrics. Performance is assessed using accuracy, precision, recall, F1 score, ROC AUC, execution time, and peak GPU memory usage. Fine-tuning generally improves performance, although the effects vary across datasets and metrics. Metrics-only experiments show a meaningful standalone signal on SySeVR but near-random discrimination on Devign; natural-text metric representations generally outperform structured metric embeddings. The code-only setting achieves the strongest overall performance on SySeVR, whereas multimodal gains are dataset-dependent and most evident on Devign, particularly with mid-level attention-based fusion. Artifact analysis reveals substantial overlap and template repetition in SySeVR, whereas Devign shows considerably lower overlap and repetition under the same criteria; cross-dataset experiments show weak transfer between the benchmarks. Overall, the results demonstrate that both fine-tuning gains and the usefulness of software metrics are strongly benchmark-dependent. Software metrics can complement code-text representations, but their effectiveness as standalone LLM inputs should not be generalized beyond the evaluated datasets. These findings provide a broad empirical benchmark and motivate more robust cross-dataset evaluation and multimodal vulnerability detection.