A systematic literature Review for Transformer-based Software Vulnerability detection

arXiv cs.LG / 4/29/2026

💬 OpinionDeveloper Stack & InfrastructureIdeas & Deep AnalysisModels & Research

Key Points

  • The paper presents a transformer-focused systematic literature review of 80 studies (2021–2025) on using transformer models to detect software vulnerabilities.
  • It categorizes transformer architectures into encoder, decoder, and combined designs, and compares both pre-trained and fine-tuned approaches across inputs like source code, logs, and smart contracts.
  • The review evaluates multiple research dimensions including trends, datasets/sources, programming languages, transformer frameworks, detection granularity, metrics, reference models, vulnerability types, and experimental setups.
  • It highlights common benchmarks and baselines used in the literature, while identifying key technical challenges such as data imbalance, limited interpretability, scalability constraints, and weak cross-language generalization.
  • The authors conclude that synthesizing these findings can help researchers and practitioners build more reliable, accurate, and interpretable transformer-based vulnerability detection systems, while pointing to open research gaps.

Abstract

Context: Software vulnerabilities pose significant security threats to software systems, especially as software is increasingly used across many areas of daily life, including health, government, and finance. Recently, transformer-based models have demonstrated promising results in automatic software vulnerability identification due to their robust contextual modelling and representation learning capabilities. Objectives: While numerous systematic literature reviews (SLRs) have examined machine learning and deep learning methods for identifying vulnerabilities, a more transformer-centric analysis remains to be explored. This SLR critically analysed 80 studies published between 2021 and 2025 that utilised transformer models to identify software vulnerabilities. Methods: Using Kitchenhams SLR guidelines, we methodically evaluate current research from various perspectives, encompassing study trends, datasets and sources, programming languages, transformer frameworks, detection detail levels, assessment metrics, reference models, types of vulnerabilities, and experimental configurations. Results: We classify transformer models into encoder, decoder, and combined architectures and analyse both pre-trained and fine-tuned versions utilized on source code, logs, and smart contracts. The results emphasise prevailing research trends, frequently utilised benchmarks, and main baselines. It also uncovers crucial technical issues like data imbalance, interpretability, scalability, and generalization across programming languages. Conclusion: By integrating current evidence and recognising unaddressed research areas, this SLR provides a consolidated resource for researchers and professionals seeking to develop more reliable, precise, and interpretable transformer-based vulnerability identification systems.

A systematic literature Review for Transformer-based Software Vulnerability detection | AI Navigate