Araştırma Makalesi

H-LLM-IM: An Adaptive Imbalance-Aware Hybrid Framework Using LLM-Based Code Embeddings for Software Vulnerability Detection

Cilt: 30 Sayı: 2 25 Ağustos 2026
PDF İndir
EN TR

H-LLM-IM: An Adaptive Imbalance-Aware Hybrid Framework Using LLM-Based Code Embeddings for Software Vulnerability Detection

Öz

Software vulnerabilities remain a critical threat to modern software systems, while existing detection approaches often suffer from high computational cost, limited scalability, and severe class imbalance in real-world datasets. To address these challenges, this study proposes H-LLM-IM, an adaptive imbalance-aware hybrid framework for efficient software vulnerability detection. The proposed framework leverages semantic code embeddings extracted from a pre-trained code language model (CodeBERT) and integrates them with lightweight machine learning classifiers, thereby avoiding expensive fine-tuning of large language models. A key contribution of H-LLM-IM is an adaptive imbalance-aware learning mechanism that dynamically regulates imbalance mitigation intensity through controlled oversampling and adaptive reweighting based on minority-class performance feedback. Extensive experiments conducted on the Big-Vul benchmark dataset evaluate four classifiers (Logistic Regression, SVM, Random Forest, and XGBoost) under multiple imbalance-handling scenarios, including static and adaptive strategies. The results demonstrate that the proposed adaptive framework substantially improves minority-class vulnerability detection, achieving up to a 2.5-fold increase in F1-score and up to 83% improvement in MCC compared to the no-imbalance baseline. Importantly, these performance gains are obtained while maintaining practical training time and controlled memory growth. In particular, Logistic Regression and XGBoost exhibit the most favorable performance–efficiency trade-off, highlighting the scalability and practical applicability of H-LLM-IM for large-scale vulnerability analysis under severe class imbalance.

Anahtar Kelimeler

Kaynakça

  1. [1] Ni, C., Yin, X., Shen, L., Wang, S. 2025. Learning-based models for vulnerability detection: An extensive study. Empirical Software Engineering, 31(1).
  2. [2] Pearce, H., Ahmad, B., Tan, B., Dolan-Gavitt, B., Karri, R. 2025. Asleep at the keyboard? Assessing the security of GitHub Copilot’s code contributions. Communications of the ACM, 68(2), 96–105.
  3. [3] Su, H., Xu, Z., Zhang, Y., et al. 2026. Source code vulnerability detection based on deep learning: A review. Cybersecurity, 9(2).
  4. [4] Guo, Y., Hu, Q., Tang, Q., Le Traon, Y. 2023. An empirical study of the imbalance issue in software vulnerability detection. Lecture Notes in Computer Science, 14514, 371–390.
  5. [5] Ma, X., He, Y., Keung, J., Tan, C., Ma, C., Hu, W., Li, F. 2025. On the value of imbalance loss functions in enhancing deep learning-based vulnerability detection. Expert Systems with Applications, 291, 128504.
  6. [6] Sheng, Z., Chen, Z., Gu, S., Huang, H., Gu, G., Huang, J. 2025. LLMs in software security: A survey of vulnerability detection techniques and insights. ACM Computing Surveys, 58(5).
  7. [7] Farasat, T., Posegga, J. 2025. Optimizing code embeddings and ML classifiers for Python source code vulnerability detection. Proceedings of the IEEE/ACM International Conference on Big Data Computing, Applications and Technologies, 1–8.
  8. [8] Bagheri, A., Hegedűs, P. 2021. A comparison of different source code representation methods for vulnerability prediction in Python. Communications in Computer and Information Science, 1439.

Ayrıntılar

Birincil Dil

İngilizce

Konular

Sınıflandırma algoritmaları, Ampirik Yazılım Mühendisliği

Bölüm

Araştırma Makalesi

Yayımlanma Tarihi

25 Ağustos 2026

Gönderilme Tarihi

23 Şubat 2026

Kabul Tarihi

27 Nisan 2026

Yayımlandığı Sayı

Yıl 2026 Cilt: 30 Sayı: 2

Kaynak Göster

APA
Altınsoy, F. (2026). H-LLM-IM: An Adaptive Imbalance-Aware Hybrid Framework Using LLM-Based Code Embeddings for Software Vulnerability Detection. Süleyman Demirel Üniversitesi Fen Bilimleri Enstitüsü Dergisi, 30(2), 108-127. https://doi.org/10.19113/sdufenbed.1895789
AMA
1.Altınsoy F. H-LLM-IM: An Adaptive Imbalance-Aware Hybrid Framework Using LLM-Based Code Embeddings for Software Vulnerability Detection. Süleyman Demirel Üniv. Fen Bilim. Enst. Derg. 2026;30(2):108-127. doi:10.19113/sdufenbed.1895789
Chicago
Altınsoy, Fatma. 2026. “H-LLM-IM: An Adaptive Imbalance-Aware Hybrid Framework Using LLM-Based Code Embeddings for Software Vulnerability Detection”. Süleyman Demirel Üniversitesi Fen Bilimleri Enstitüsü Dergisi 30 (2): 108-27. https://doi.org/10.19113/sdufenbed.1895789.
EndNote
Altınsoy F (01 Ağustos 2026) H-LLM-IM: An Adaptive Imbalance-Aware Hybrid Framework Using LLM-Based Code Embeddings for Software Vulnerability Detection. Süleyman Demirel Üniversitesi Fen Bilimleri Enstitüsü Dergisi 30 2 108–127.
IEEE
[1]F. Altınsoy, “H-LLM-IM: An Adaptive Imbalance-Aware Hybrid Framework Using LLM-Based Code Embeddings for Software Vulnerability Detection”, Süleyman Demirel Üniv. Fen Bilim. Enst. Derg., c. 30, sy 2, ss. 108–127, Ağu. 2026, doi: 10.19113/sdufenbed.1895789.
ISNAD
Altınsoy, Fatma. “H-LLM-IM: An Adaptive Imbalance-Aware Hybrid Framework Using LLM-Based Code Embeddings for Software Vulnerability Detection”. Süleyman Demirel Üniversitesi Fen Bilimleri Enstitüsü Dergisi 30/2 (01 Ağustos 2026): 108-127. https://doi.org/10.19113/sdufenbed.1895789.
JAMA
1.Altınsoy F. H-LLM-IM: An Adaptive Imbalance-Aware Hybrid Framework Using LLM-Based Code Embeddings for Software Vulnerability Detection. Süleyman Demirel Üniv. Fen Bilim. Enst. Derg. 2026;30:108–127.
MLA
Altınsoy, Fatma. “H-LLM-IM: An Adaptive Imbalance-Aware Hybrid Framework Using LLM-Based Code Embeddings for Software Vulnerability Detection”. Süleyman Demirel Üniversitesi Fen Bilimleri Enstitüsü Dergisi, c. 30, sy 2, Ağustos 2026, ss. 108-27, doi:10.19113/sdufenbed.1895789.
Vancouver
1.Fatma Altınsoy. H-LLM-IM: An Adaptive Imbalance-Aware Hybrid Framework Using LLM-Based Code Embeddings for Software Vulnerability Detection. Süleyman Demirel Üniv. Fen Bilim. Enst. Derg. 01 Ağustos 2026;30(2):108-27. doi:10.19113/sdufenbed.1895789

e-ISSN :1308-6529
Linking ISSN (ISSN-L): 1300-7688

Dergide yayımlanan tüm makalelere ücretiz olarak erişilebilinir ve Creative Commons CC BY-NC Atıf-GayriTicari lisansı ile açık erişime sunulur. Tüm yazarlar ve diğer dergi kullanıcıları bu durumu kabul etmiş sayılırlar. CC BY-NC lisansı hakkında detaylı bilgiye erişmek için tıklayınız.