An Ensemble Transformer Approach with Cross-Attention for Automated Code Security Vulnerability Detection and Documentation

Java vulnerability detection remains challenging due to the lack of standardized benchmarks and the complexity of framework interactions that introduce unique security risks compared to C/C++. We introduce a new Java vulnerability benchmark dataset combining the Juliet Test Suite, OWASP Benchmarks, and GitHub repositories, and develop a multi-model transformer framework that freezes pre-trained CodeBERT, GraphCodeBERT, and CodeT5 models, fusing their represen-tations via cross-attention. Our ensemble achieves near-perfect type classification (99.73 %) and 93.46 % detection accuracy on the Java dataset while remaining competitive on PRIMEVUL for C/C++ (89.58% accuracy) without extensive fine-tuning. This work advances vulnerability detection by: (1) creating a comprehensive Java vulnerability benchmark, (2) demonstrating that frozen pre-trained models can achieve strong results through cross-attention fusion, and (3) automating CWE-aligned security documentation to guide developers in remediation, demonstrating a practical and resource-efficient approach to vulnerability detection across languages.

Authors

Institutions

Publication Details

Published
2025-04-24
DOI
https://doi.org/10.1109/isdfs65363.2025.11012039
Citations
1
Primary Topic
Network Security and Intrusion Detection
Type
article
Field-Weighted Citation Impact
1.49
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

An Ensemble Transformer Approach with Cross-Attention for Automated Code Security Vulnerability Detection and Documentation

Yasmeen Rawajfih, Fan Wu, Adiba Mahmud
1 citations
Network Security and Intrusion Detection
1.49
article

An Ensemble Transformer Approach with Cross-Attention for Automated Code Security Vulnerability Detection and Documentation

Yasmeen Rawajfih, Fan Wu, Adiba Mahmud
article en
1 citations

Abstract

Java vulnerability detection remains challenging due to the lack of standardized benchmarks and the complexity of framework interactions that introduce unique security risks compared to C/C++. We introduce a new Java vulnerability benchmark dataset combining the Juliet Test Suite, OWASP Benchmarks, and GitHub repositories, and develop a multi-model transformer framework that freezes pre-trained CodeBERT, GraphCodeBERT, and CodeT5 models, fusing their represen-tations via cross-attention. Our ensemble achieves near-perfect type classification (99.73 %) and 93.46 % detection accuracy on the Java dataset while remaining competitive on PRIMEVUL for C/C++ (89.58% accuracy) without extensive fine-tuning. This work advances vulnerability detection by: (1) creating a comprehensive Java vulnerability benchmark, (2) demonstrating that frozen pre-trained models can achieve strong results through cross-attention fusion, and (3) automating CWE-aligned security documentation to guide developers in remediation, demonstrating a practical and resource-efficient approach to vulnerability detection across languages.

Tuskegee University (US)
Openalex Percentile: Top 16%
Network Security and Intrusion Detection
1.49
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.