Skip to content
naulon

No noticeNo retraction, correction or concern found when last checked on Dec 5, 2026.

Static Malware Detection Using Stacked BiLSTM and GPT-2

Deniz Demirci, Nazenin Sahin, Melih Sirlancis and 1 more

IEEE Access · 2022

doi:10.1109/access.2022.3179384 (opens in a new tab)

We email you when a new notice or a question about this paper appears.

Abstract

In recent years, cyber threats and malicious software attacks have been escalated on various platforms. Therefore, it has become essential to develop automated machine learning methods for defending against malware. In the present study, we propose stacked bidirectional long short-term memory (Stacked BiLSTM) and generative pre-trained transformer based (GPT-2) deep learning language models for detecting malicious code. We developed language models using assembly instructions extracted from <monospace>.text</monospace> sections of malicious and benign Portable Executable (PE) files. We treated each instruction as a sentence and each <monospace>.text</monospace> section as a document. We also labeled each sentence and document as benign or malicious, according to the file source. We created three datasets from those sentences and documents. The first dataset, composed of documents, was fed into a Document Level Analysis Model (DLAM) based on Stacked BiLSTM. The second dataset, composed of sentences, was used in Sentence Level Analysis Models (SLAMs) based on Stacked BiLSTM and DistilBERT, Domain Specific Language Model GPT-2 (DSLM-GPT2), and General Language Model GPT-2 (GLM-GPT2). Lastly, we merged all assembly instructions without labels for creating the third dataset; then we fed a custom pre-trained model with it. We then compared malware detection performances. The results showed that the pre-trained model improved the DSLM-GPT2 and GLM-GPT2 detection performance. The experiments showed that the DLAM, the SLAM based on DistilBERT, the DSLM-GPT2, and the GLM-GPT2 achieved 98.3&#x0025;, 70.4&#x0025;, 86.0&#x0025;, and 76.2&#x0025; F1 scores, respectively.

Abstract licence: CC BY-NC-ND

Reads

Read by people on this page

None yet.

Checked or read by AI through naulon

None yet.

A person counts once a day per paper. We keep no cookie and no address: a reader is a hash that changes every day. Any month under five reads shows no number.

Are you an author?

Is this your paper?

Claim it to add your note and be paid when agents cite it. Free.