Metamorphic Malware Detection via Graph-Augmented Neural Semantics and Adversarial Hardening: A Comprehensive Framework
Abstract
1. Introduction
- We introduce MetaGNN-Sec, a unified detection framework combining heterogeneous GNNs with a WGAN-based adversarial hardening loop.
- We derive a conditional score-shift bound showing that, under an explicitly stated and empirically estimated Lipschitz condition, the proposed hGNN representation is comparatively stable under a broad class of graph-edit-bounded syntactic mutations.
- We integrate a PennyLane-based quantum-kernel anomaly scorer that exploits quantum interference to separate obfuscated malware from benign outliers in feature space.
- We benchmark MetaGNN-Sec on two publicly available corpora under a single controlled re-evaluation protocol, and provide a self-contained, LangGraph-orchestrated reference implementation—with pinned environment, seeds and configuration files—available as described in the Data Availability statement, so that the pipeline can be re-run against corpora obtained by the reader from their original repositories.
2. Background
2.1. Metamorphic Transformation Strategies
2.2. Detection Approaches
2.2.1. Signature-Based and Heuristic Methods
2.2.2. Machine Learning Detectors
2.2.3. Graph-Based Methods
2.2.4. Adversarial Robustness of Learning-Based Detectors
2.2.5. Quantum-Assisted Detection
2.3. Research Gap and Rationale for the Proposed Composition
3. Mathematical Framework
3.1. Program-Dependence Graph Representation
3.2. Heterogeneous Graph Neural Network
3.3. Conditional Score-Shift Bound
- Scope and caveats. Equation (6) should be read as a design principle—motivating constraining via spectral normalization [32] and minimizing during training—rather than as a formal certificate of adversarial robustness. The empirical robustness reported in Section 5 is the operative evidence for the framework’s resilience; this proposition explains why graph representations are comparatively stable and is not a worst-case security proof. We state the result as a conditional bound for that reason, and we draw the reader’s attention to three limitations that bound its force. First, the Lipschitz constant is not derived from the architecture in closed form; it is estimated empirically (we measure on the held-out set, Section 6), so the bound is only as reliable as that estimate and may be violated locally where the empirical estimate understates the true constant. Second, the bound constrains the score shift under semantics-preserving, -bounded edits; it does not certify a fixed decision margin, and it says nothing about transformations that exceed the budget or that alter program semantics. Third, the inequality assumes the WL kernel faithfully reflects the relevant structural distance, which holds approximately rather than exactly. Taken together, these three limitations are why the result is offered as an explanation of observed stability rather than as a guarantee of it, and why the operative evidence for the framework’s resilience remains the adaptive-evasion measurement of Section 5 rather than this proposition.
3.4. A Worked Metamorphic Example
3.5. WGAN-Based Adversarial Hardening
3.6. Quantum-Kernel Anomaly Layer
4. Experiments and Methods
4.1. Architecture Overview
- Pre-processing stage: A raw binary enters the pipeline and is disassembled by Radare2, producing an assembly stream from which the CFG and PDG are built (Algorithm 1). The node features (Equation (2)) are assembled from BPE opcode embeddings, block-level statistics, and structural descriptors. This stage is CPU-bound and takes approximately 0.8 ms per binary on average.
- hGNN encoder stage: The heterogeneous graph is passed through four message-passing layers that interleave relation-specific aggregation, soft attention fusion (Equation (4)), and DiffPool coarsening (Equation (5)), reducing the graph to a fixed-dimensional embedding . This stage accounts for 71% of the total inference time and is GPU-bound.
- Detection head: The embedding is consumed by two parallel branches. The binary classifier produces a posterior malware probability. Simultaneously, is projected to and passed to the quantum-kernel layer, which computes the centroid anomaly score s (Equation (10)). A sample scoring is fast-rejected as benign without invoking , saving computation on clearly benign files. The dashed red arrow denotes the WGAN adversarial feedback loop: during training, the critic receives embeddings of real and WGAN-generated adversarial graphs, driving the encoder to produce representations that are invariant to admissible metamorphic mutations.
| Algorithm 1 PDG construction from the binary executable | |
| Input: Binary , BPE vocabulary , max block length | |
| Output: PDG with node features | |
| 1: Analyze with ; enumerate functions | |
| 2: Initialize ,, | |
| 3: for each function do | |
| 4: for each basic block do | |
| 5: | |
| 6: | ▹ Equation (2) |
| 7: | |
| 8: end for | |
| 9: | |
| 10: for do | |
| 11: | |
| 12: end for | |
| 13: end for | |
| 14: return | |
4.2. Datasets
- VirusShare-2024 [33]: 143,812 malware samples spanning 12 metamorphic families (G2, NGVCK, Evol, Zperm, and eight additional) plus 45,000 benign Windows PE binaries drawn from the Windows 10/11 system partition.
- SOREL-20M [34]: 11,363 Windows PE binaries drawn from the Sophos/ReversingLabs production-scale corpus (collected 2017–2019), selected to provide polymorphic and proto-metamorphic samples spanning diverse malware families for cross-era evaluation; SOREL-20M samples carry high-quality labels derived from multiple vendor sources and are publicly available via AWS S3.
- Rationale for corpus selection. Many public malware repositories exist, and the choice of these two was made on three stated criteria rather than on availability alone. First, temporal separation: the two corpora are drawn from different collection windows (2024 against 2017–2019), which permits the cross-era evaluation reported below and mitigates the temporal experimental bias cataloged by Arp et al. [35]. Second, label quality: SOREL-20M carries consensus labels derived from multiple vendor sources, which bounds the label-inaccuracy exposure discussed in Section 4.9; VirusShare does not, and we record that asymmetry rather than average over it. Third, public obtainability: both are retrievable by any reader—VirusShare on free registration, SOREL-20M via AWS S3—so the evaluation can be repeated independently, which a proprietary or internally collected corpus would not permit. The twelve VirusShare families were fixed by prevalence in the collection window before any model was trained, so that family selection could not be tuned to favor the proposed method (Section 4.8). We note the corresponding limitation in Section 6: both corpora share collection and labeling pipelines, so they do not constitute a fully independent cross-dataset test, and we do not present them as one. Samples were partitioned 70/15/15 (train/validate/test) stratified by family and year. Crucially, the partition is also disjoint by seed lineage: variants generated from a common seed binary are confined to a single split, so that no train/test leakage can arise from shared ancestry. Table 2 summarizes the corpus statistics.
4.3. Pre-Processing Pipeline
4.4. Model Architecture and Hyperparameters
| Algorithm 2 hGNN encoder forward pass | |
| Input: , features , learnable | |
| Output: Graph embedding | |
| 1: for all v | |
| 2: for to L do | |
| 3: for do | |
| 4: | ▹ Equation (3) |
| 5: end for | |
| 6: ; | ▹ Equation (4) |
| 7: | ▹ Hierarchical coarsening |
| 8: end for | |
| 9: return | ▹ Equation (5) |
| Algorithm 3 Bayesian hyperparameter search (Optuna TPE, T = 200 trials) | |
| Input: Search space , validation set , budget T = 200 | |
| Output: Optimal config | |
| 1: Initialize Optuna study: TPESampler, MedianPruner | |
| 2: for trial to T do | |
| 3: | ▹ Suggest: , , lr, |
| , , | |
| 4: for epoch to 5 do | |
| 5: Train one epoch; report to pruner | |
| 6: if ShouldPrune then raise TeialPruned | |
| 7: end if | |
| 8: end for | |
| 9: after full 5-epoch warm-up | |
| 10: end for | |
| 11: return | ▹ Best: = 256, L = 4, = 10, = 5, = 0.62 |
4.5. Hardware Configuration
- CPU: Intel Xeon W-3345 @ 3.0 GHz, 24 cores/48 threads.
- GPU: NVIDIA RTX 4090 (24 GB GDDR6X each), NVLink bridge.
- RAM: 256 GB DDR5-4800 ECC.
- Storage: 4 TB Samsung 990 Pro NVMe SSD (RAID-0).
- OS: Ubuntu 22.04 LTS, CUDA 12.3, cuDNN 8.9.7.
- Software: Python 3.11, PyTorch 2.2, PyTorch Geometric 2.5, PennyLane 0.35, LangGraph 0.1.7, R 4.3.2.
| Algorithm 4 MetaGNN-Sec end-to-end training loop | |
| Input: , hyperparams , max epochs E = 100, patience P = 10, | |
| Output: Trained , critic , generator | |
| 1: Initialize , , ; ; | |
| 2: for epoch to E do | |
| 3: for each mini-batch do | |
| 4: for to do | ▹ Critic update |
| 5: ; | |
| 6: | ▹ Equations (7) and (8) |
| 7: Update | |
| 8: end for | ▹ Generator + classifier update |
| 9: | |
| 10: | |
| 11: Update | |
| 12: end for | |
| 13: | |
| 14: if then | |
| 15: ; ; | |
| 16: else | |
| 17: | |
| 18: if then break | |
| 19: end if | |
| 20: end if | |
| 21: end for | |
| 22: return , , | |
4.6. Baselines
- (B1) MalConv+ [18] extends the original MalConv architecture with a gated attention mechanism over the raw byte sequence, enabling the model to focus on discriminative subregions of the executable without truncation at fixed windows. MalConv+ operates directly on files up to 2 MB and requires no manual feature engineering, making it the strongest purely byte-level baseline and a representative of the class of detectors most widely deployed in production endpoint agents.
- (B2) EMBER-RF [12] trains a gradient-boosted random forest on the 2381-dimensional EMBER feature vector, encoding byte-value histograms, import table statistics, section entropy profiles, and string-length distributions. Its very high throughput (38,500 samples/s) and low memory footprint (0.8 M parameters) make it a widely used production baseline, but its aggregate representation discards all structural and ordering information.
- (B3) GCN-CFG [21] applies a homogeneous graph convolutional network to the control-flow graph, with per-node features derived from opcode n-gram histograms. This baseline directly quantifies the marginal gain from adding data flow (PDG) edges and heterogeneous relation typing to a plain CFG representation, isolating the structural enrichment axis.
- (B4) HMIL (heterogeneous multiple-instance learning) is a baseline we implemented ourselves rather than one taken from a single published system. It constructs a heterogeneous graph jointly embedding opcode and API-call nodes with multiple edge types, and pools family-level evidence with multiple-instance learning in the sense of Dietterich et al. [38], following the general heterogeneous-graph approach surveyed in [14]. We include it because it is the strongest non-adversarially hardened graph configuration in our comparison and the closest in representational power to MetaGNN-Sec: it shares heterogeneous relation typing but has neither the WGAN hardening loop nor the quantum anomaly layer, so the margin over B4 isolates the contribution of those two components. Because B4 is our own construction rather than a third-party system, we do not present the comparison against it as a comparison against published prior art; the published baselines are B1–B3 and B5.
- (B5) QSVM [30] fits a support vector machine using the quantum kernel evaluated over EMBER feature vectors rather than graph embeddings. This baseline isolates the quantum feature map’s contribution when applied to classical aggregate representations, separating the quantum vs. graph-structural axes and confirming whether quantum advantage requires the structural input or holds more broadly.
4.7. Evaluation Protocol
4.8. Reproducibility and Benchmark Consistency
| Algorithm 5 Adaptive evasion evaluation protocol | |
| Input: Detector WGAN generator , malware test set , variants K = 500, budget | |
| Output: Adversarial detection rate | |
| 1: | |
| 2: for each do | |
| 3: | |
| 4: for to K do | |
| 5: | |
| 6: if or WLDist or not ExecEquiv | |
| then | |
| 7: continue | ▹ Reject invalid mutation |
| 8: end if | |
| 9: if then | |
| 10: ; break | |
| 11: end if | |
| 12: end for | |
| 13: if success then | |
| 14: end if | |
| 15: end for | |
| 16: return | |
4.9. Relation to Established Experimental Pitfalls
5. Results
5.1. Overall Detection Performance
5.2. Per-Family Detection Rates
5.3. Adversarial Robustness
5.4. Cross-Dataset Generalization
5.5. Ablation Study
5.6. Training Convergence
5.7. Inference Throughput
5.8. ROC Comparison
6. Discussion
6.1. Why Graph Representations Resist Metamorphism
6.2. Role of the Quantum Layer
- What deployment would require. Drawing the practical threads together: the base-rate analysis of Table 3 shows that a 0.41% false-positive rate still implies on the order of two thousand daily alerts at enterprise scanning volume, so a deployment would need either a pre-filtered, higher-prevalence stream or a downstream triage stage—the detector is a component of an alerting pipeline, not a pipeline in itself. The throughput and footprint figures of Section 5 bound where it can sit: 4.3 GB of GPU memory suits a server or workstation endpoint but exceeds consumer edge devices, and the effective ∼1190 samples/s is adequate for endpoint scanning but not for high-frequency network inspection. We state these as the conditions under which the reported operating point is meaningful, and we have not measured performance in a production environment; the external validation identified below is a prerequisite before any deployment-grade claim could be made.
6.3. Relation to Prior Findings
- Where our findings align with prior work. The central result—that structural representations degrade far less than byte-level ones under semantics-preserving mutation—reproduces the direction of the graph-based results of Yan et al. [21], and is consistent with the broader synthesis of Bilot et al. [14], who conclude across a large body of work that graph structure is comparatively difficult for an attacker to alter and therefore yields more durable embeddings. Our adversarial results likewise agree in direction with Grosse et al. [10] and Kreuk et al. [11] on the fragility of byte-level models: the 30–31 pp collapse we measure for MalConv+ and EMBER-RF (Table 6) is the same phenomenon those authors describe, observed here under a mutation budget rather than under free byte injection. That our adversarially hardened detector retains a substantial margin is also consistent with the defensive literature surveyed by Yan et al. [15] and Aryal et al. [16], and with the principled-detection results of Li et al. [28].
- Where our findings do not align. Two divergences deserve explicit statement. First, the quantum-kernel contribution we measure (1.2 pp FNR reduction, concentrated on two families) is materially smaller than the complexity-theoretic separations of Liu et al. [31] might lead a reader to anticipate. We attribute this to two causes—the circuit runs on a classical simulator and the 8-qubit feature map is modest—but we record the gap rather than leave it unremarked, and we do not claim that the theoretical separation is realized here. Second, our adversarial degradation for homogeneous graph baselines (17–21 pp) is larger than some prior graph-detection studies report. We believe this reflects the adaptivity of our evaluation rather than a weaker implementation: the evasion protocol of Algorithm 5 optimizes against each detector under a semantics-preserving budget, whereas robustness is often reported against fixed, non-adaptive perturbation sets. The comparison is therefore not like-for-like with those figures, and we would caution against reading our baseline numbers as contradicting them.
- What this positioning does and does not establish. Situating the results this way strengthens the claim that the structural mechanism is real and reproducible across independent groups. It does not extend the claim beyond the evaluated setting: as the divergences above and the limitations below make clear, agreement in direction with prior work is not evidence of superiority over it under conditions we have not tested.
6.4. Limitations
6.4.1. Technical Limits of Adversarial Resilience
- Graph-edit budget. The conditional score-shift bound (Proposition 1) holds only for -bounded transformations, i.e., those whose graph-edit distance does not exceed and whose Weisfeiler–Lehman kernel-distance does not exceed , and only insofar as the empirical Lipschitz estimate is valid. Mutations exceeding these budgets fall outside the bound.
- Lipschitz regime. The protective score-shift bound scales as with measured ; a higher effective Lipschitz constant (for example, under distribution shift) loosens the bound proportionally, and the bound is informative only in the small- regime that holds for local edits diluted across a whole-binary PDG (Section 3.4).
- Semantics-altering changes. The -boundedness assumption is violated precisely by transformations that alter program semantics; such changes break functional equivalence and therefore lie outside the threat model rather than defeating it.
- Taxonomy coverage of adversarial training. The WGAN hardening loop confers robustness against the mutation taxonomy on which the generator was trained. Against mutation strategies outside that taxonomy—novel obfuscators, packing-based transformations, or externally crafted gradient/poisoning attacks on the aggregation step—no robustness guarantee is claimed, and empirical resilience may degrade.
- Aggregation integrity. The framework assumes the orchestration/aggregation layer is not itself compromised; adversarial “poisoning” of gradients by a malicious node inside the trusted training pipeline is out of scope and would require orthogonal defenses. Where a detection pipeline is distributed across cooperating components, securing the channels between them and establishing the provenance of the verdicts they exchange is a separate problem from the detection task addressed here, and one we treat elsewhere [42]; the present evaluation assumes a single trusted host.
6.4.2. Dataset Bias and Cross-Dataset Generalization
6.4.3. External Adversarial Strategies
6.4.4. Quantum Simulation and Throughput
6.4.5. Static-Analysis Scope
6.4.6. Validation on External, Independent Data Streams
7. Future Work and Conclusions
7.1. Future Work
- Hardware-efficient quantum kernels: Integration with NISQ devices (IBM Quantum, IonQ) would validate quantum advantage under realistic noise; Mitiq-based error mitigation [43] could bridge the gap.
- Dynamic analysis fusion: Combining static PDG features with dynamic execution traces (via qiling [45] sandboxed emulation) should close remaining evasion gaps for packing-heavy malware.
- Federated training: Privacy-preserving federated learning across enterprise endpoints would allow continual adaptation without centralizing malware samples.
- LLM-guided mutation synthesis: Large language models fine-tuned on assembly corpora could synthesize richer adversarial variants, further stress-testing the WGAN hardening loop.
- Explainability: GNNExplainer-style attribution [46] should be applied to identify which basic blocks most strongly drive malicious classifications, aiding analyst triaging.
- External, heterogeneous validation: Validation on independent third-party corpora—drawn from isolated corporate infrastructures and from operating-system ecosystems whose code-generation styles differ from those in VirusShare—to characterize out-of-ecosystem generalization.
7.2. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| AUC-PR | Area under the precision–recall curve |
| AUC-ROC | Area under the receiver operating characteristic curve |
| BPE | Byte pair encoding |
| CFG | Control-flow graph |
| CFT | Control-flow transposition |
| DCI | Dead-code insertion |
| DR | Detection rate |
| EIS | Equivalent-instruction substitution |
| FNR | False-negative rate |
| FPR | False-positive rate |
| GED | Graph-edit distance |
| GNN | Graph neural network |
| hGNN | Heterogeneous graph neural network |
| IDS | Intrusion detection system |
| IQP | Instantaneous quantum polynomial |
| IR | Instruction reordering |
| MIL | Multiple-instance learning |
| NISQ | Noisy intermediate-scale quantum |
| PDG | Program-dependence graph |
| PE | Portable executable |
| RR | Register renaming |
| SP | Subroutine permutation |
| SVM | Support vector machine |
| WGAN | Wasserstein generative adversarial network |
| WL | Weisfeiler–Lehman |
Appendix A. Pseudocode: MetaGNN-Sec Inference
| Algorithm A1 MetaGNN-Sec inference | |
| Input: Binary executable , trained model , quantum threshold , benign cluster | |
| Output: Verdict , confidence p | |
| 1: BuildPDG(Radare2Disasm()) | |
| 2: | ▹ Equation (5) |
| 3: | ▹ Linear projection to dims |
| 4: | ▹ Equation (10) |
| 5: if then return Benign, | |
| 6: end if | |
| 7: | |
| 8: if then return Malware, p | |
| 9: elsereturn Benign, | |
| 10: end if | |
- Explanation:Algorithm A1 formalizes the complete single-sample inference path executed by MetaGNN-Sec at deployment time. The pipeline begins with disassembly: the raw binary is processed by Radare2, which performs recursive function recovery and produces an assembly instruction stream from which the program-dependence graph (PDG) is constructed, capturing control-flow edges and def–use data dependence relationships between basic blocks.
Appendix B. Reference Implementation
References
- González-Gorrín, V.M.; Prieto-Blázquez, J.; Arnedo-Moreno, J. A Hybrid Machine Learning Method for Detecting Metamorphic Malware. In Advanced Information Networking and Applications (AINA 2025); Barolli, L., Ed.; Lecture Notes on Data Engineering and Communications Technologies; Springer: Cham, Switzerland, 2025; Volume 248, pp. 297–307. [Google Scholar] [CrossRef] [Scilit]
- González-Gorrín, V.M.; Prieto-Blázquez, J. A hybrid machine learning intrusion detection method for metamorphic malware. Int. J. Inf. Secur. 2026, 25, 63. [Google Scholar] [CrossRef] [Scilit]
- Martins, N.; Cruz, J.M.; Cruz, T.; Abreu, P.H. Adversarial Machine Learning Applied to Intrusion and Malware Scenarios: A Systematic Review. IEEE Access 2020, 8, 35403–35419. [Google Scholar] [CrossRef] [Scilit]
- You, I.; Yim, K. Malware obfuscation techniques: A brief survey. In 2010 International Conference on Broadband, Wireless Computing, Communication and Applications; IEEE: New York, NY, USA, 2010; pp. 297–300. [Google Scholar] [CrossRef] [Scilit]
- Chess, D.M.; White, S.R. An Undetectable Computer Virus. In Proceedings of the Virus Bulletin Conference, Orlando, FL, USA, 28–29 September 2000; Available online: https://www.semanticscholar.org/paper/An-Undetectable-Computer-Virus-Chess-White/5560839b08ec0f2f9aa51b8a25cb79e91c9ed163 (accessed on 6 September 2026).
- Borello, J.-M.; Mé, L. Code obfuscation techniques for metamorphic viruses. J. Comput. Virol. 2008, 4, 211–220. [Google Scholar] [CrossRef] [Scilit]
- Christodorescu, M.; Jha, S.; Seshia, S.A.; Song, D.; Bryant, R.E. Semantics-aware malware detection. In 2005 IEEE Symposium on Security and Privacy; IEEE: New York, NY, USA, 2005; pp. 32–46. [Google Scholar] [CrossRef] [Scilit]
- Rad, B.B.; Masrom, M.; Ibrahim, S. Camouflage in malware: From encryption to metamorphism. Int. J. Comput. Sci. Netw. Secur. 2012, 12, 74–83. [Google Scholar]
- Kang, M.G.; Poosankam, P.; Yin, H. Renovo: A hidden code extractor for packed executables. In WORM’07: Proceedings of the 2007 ACM Workshop on Recurring Malcode, Alexandria, VA, USA, 2 November 2007; Association for Computing Machinery: New York, NY, USA, 2007; pp. 46–53. [Google Scholar] [CrossRef] [Scilit]
- Grosse, K.; Papernot, N.; Manoharan, P.; Backes, M.; McDaniel, P. Adversarial examples for malware detection. In European Symposium on Research in Computer Security; Springer International Publishing: Cham, Switzerland, 2017; pp. 62–79. [Google Scholar] [CrossRef] [Scilit]
- Kreuk, F.; Barak, A.; Aviv-Reuven, S.; Baruch, M.; Pinkas, B.; Keshet, J. Deceiving end-to-end deep learning malware detectors using adversarial examples. arXiv 2018, arXiv:1802.04528. [Google Scholar]
- Anderson, H.S.; Roth, P. EMBER: An open dataset for training static PE malware machine learning models. arXiv 2018, arXiv:1804.04637. [Google Scholar]
- Ceschin, F.; Botacin, M.; Gomes, H.M.; Oliveira, L.S.; Grégio, A. Shallow security: On the creation of adversarial variants to evade machine learning-based malware detectors. In ROOTS’19: Proceedings of the 3rd Reversing and Offensive-Oriented Trends Symposium, Vienna, Austria, 28–29 November 2019; Association for Computing Machinery: New York, NY, USA, 2019; pp. 1–9. [Google Scholar] [CrossRef] [Scilit]
- Bilot, T.; El Madhoun, N.; Al Agha, K.; Zouaoui, A. A survey on malware detection with graph representation learning. ACM Comput. Surv. 2024, 56, 278. [Google Scholar] [CrossRef] [Scilit]
- Yan, S.; Ren, J.; Wang, W.; Sun, L.; Zhang, W.; Yu, Q. A survey of adversarial attack and defense methods for malware classification in cyber security. IEEE Commun. Surv. Tutor. 2023, 25, 467–496. [Google Scholar] [CrossRef] [Scilit]
- Aryal, K.; Gupta, M.; Abdelsalam, M.; Kunwar, P.; Thuraisingham, B. A survey on adversarial attacks for malware analysis. IEEE Access 2025, 13, 428–459. [Google Scholar] [CrossRef] [Scilit]
- Ye, Y.; Li, T.; Adjeroh, D.; Iyengar, S.S. A survey on malware detection using data mining techniques. ACM Comput. Surv. 2017, 50, 41. [Google Scholar] [CrossRef] [Scilit]
- Raff, E.; Barker, J.; Sylvester, J.; Brandon, R.; Catanzaro, B.; Nicholas, C.K. Malware detection by eating a whole EXE. In The Workshops of the Thirty-Second AAAI Conference on Artificial Intelligence; AAAI Press: Washington, DC, USA, 2018. [Google Scholar]
- Schultz, M.G.; Eskin, E.; Zadok, E.; Stolfo, S.J. Data mining methods for detection of new malicious executables. In Proceedings 2001 IEEE Symposium on Security and Privacy; IEEE: New York, NY, USA, 2001; pp. 38–49. [Google Scholar] [CrossRef] [Scilit]
- Santos, I.; Brezo, F.; Ugarte-Pedrero, X.; Bringas, P.G. Opcode sequences as representation of executables for data-mining-based unknown malware detection. Inf. Sci. 2013, 231, 64–82. [Google Scholar] [CrossRef] [Scilit]
- Yan, J.; Qi, Y.; Rao, Q. Detecting malware with an ensemble method based on deep neural network. Secur. Commun. Netw. 2019, 2019, 1–16. [Google Scholar] [CrossRef] [Scilit]
- Guo, W.; Du, W.; Yang, X.; Xue, J.; Wang, Y.; Han, W.; Hu, J. MalHAPGNN: An enhanced call graph-based malware detection framework using hierarchical attention pooling graph neural network. Sensors 2025, 25, 374. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Tarapata, Z.; Romańczuk, J. Some improvements of behavioral malware detection method using graph neural networks. Appl. Sci. 2025, 15, 11686. [Google Scholar] [CrossRef] [Scilit]
- Zhao, Y.; Sun, S.; Huang, X.; Zhang, J. An Android malware detection method using frequent graph convolutional neural networks. Electronics 2025, 14, 1151. [Google Scholar] [CrossRef] [Scilit]
- González-Gorrín, V.M.; Prieto-Blázquez, J. Stochastic diffusion networks for zero-day metamorphic malware detection: A PDE-driven contrastive learning framework. In 2026 International Conference on Smart Applications, Communications and Networking (SmartNets), Rome, Italy, 7–9 July 2026; IEEE: Piscataway, NJ, USA, 2026; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
- Hu, W.; Tan, Y. Generating adversarial malware examples for black-box attacks based on GAN. In Data Mining and Big Data (DMBD 2022); Tan, Y., Shi, Y., Eds.; Communications in Computer and Information Science; Springer: Singapore, 2022; Volume 1745, pp. 409–423. [Google Scholar] [CrossRef] [Scilit]
- González-Gorrín, V.M.; Prieto-Blázquez, J. Machine intelligence approaches for preventing adversarial malware attacks in intrusion detection systems: A systematic review. Prog. Artif. Intell. 2026. [Google Scholar] [CrossRef] [Scilit]
- Li, D.; Cui, S.; Li, Y.; Xu, J.; Xiao, F.; Xu, S. PAD: Towards principled adversarial malware detection against evasion attacks. IEEE Trans. Dependable Secur. Comput. 2024, 21, 920–936. [Google Scholar] [CrossRef] [Scilit]
- Yang, H.; Zhou, Y.; Ji, X.; Liu, Z.; Tian, Z.; Tang, Q.; Shi, Y. Advancing graph neural networks for complex relational learning: A multi-scale heterogeneity-aware framework with adversarial robustness and interpretable analysis. Mathematics 2025, 13, 2956. [Google Scholar] [CrossRef] [Scilit]
- Havlíček, V.; Córcoles, A.D.; Temme, K.; Harrow, A.W.; Kandala, A.; Chow, J.M.; Gambetta, J.M. Supervised learning with quantum-enhanced feature spaces. Nature 2019, 567, 209–212. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Liu, Y.; Arunachalam, S.; Temme, K. A rigorous and robust quantum speed-up in supervised machine learning. Nat. Phys. 2021, 17, 1013–1017. [Google Scholar] [CrossRef] [Scilit]
- Miyato, T.; Kataoka, T.; Koyama, M.; Yoshida, Y. Spectral normalization for generative adversarial networks. In Proceedings of the 6th International Conference on Learning Representations (ICLR), Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- VirusShare. VirusShare Malware Repository. 2024. Available online: https://virusshare.com (accessed on 1 February 2026).
- Harang, R.; Rudd, E.M. SOREL-20M: A large scale benchmark dataset for malicious PE detection. arXiv 2020, arXiv:2012.07634. [Google Scholar]
- Arp, D.; Quiring, E.; Pendlebury, F.; Warnecke, A.; Pierazzi, F.; Wressnegger, C.; Cavallaro, L.; Rieck, K. Dos and Don’ts of Machine Learning in Computer Security. In Proceedings of the 31st USENIX Security Symposium, Boston, MA, USA, 10–12 August 2022; USENIX Association: Berkeley, CA, USA; pp. 3971–3988. Available online: https://www.usenix.org/conference/usenixsecurity22/presentation/arp (accessed on 6 September 2026).
- Shoshitaishvili, Y.; Wang, R.; Salls, C.; Stephens, N.; Polino, M.; Dutcher, A.; Grosen, J.; Feng, S.; Hauser, C.; Kruegel, C.; et al. SoK: (State of) the art of war: Offensive techniques in binary analysis. In 2016 IEEE Symposium on Security and Privacy; IEEE: New York, NY, USA, 2016; pp. 138–157. [Google Scholar] [CrossRef] [Scilit]
- Ying, R.; You, J.; Morris, C.; Ren, X.; Hamilton, W.L.; Leskovec, J. Hierarchical graph representation learning with differentiable pooling. In NIPS’18: Proceedings of the 32nd International Conference on Neural Information Processing Systems; Curran Associates Inc.: Red Hook, NY, USA, 2018; pp. 4800–4810. [Google Scholar]
- Dietterich, T.G.; Lathrop, R.H.; Lozano-Pérez, T. Solving the multiple instance problem with axis-parallel rectangles. Artif. Intell. 1997, 89, 31–71. [Google Scholar] [CrossRef] [Scilit]
- Yang, L.; Ciptadi, A.; Laziuk, I.; Ahmadzadeh, A.; Wang, G. BODMAS: An open dataset for learning based temporal analysis of PE malware. In Proceedings of the IEEE Deep Learning and Security Workshop (DLS); IEEE: New York, NY, USA, 2021; pp. 78–84. [Google Scholar] [CrossRef] [Scilit]
- Joyce, R.J.; Amlani, D.; Nicholas, C.; Raff, E. MOTIF: A large malware reference dataset with ground truth family labels. Comput. Secur. 2023, 124, 102921. [Google Scholar] [CrossRef] [Scilit]
- DeLong, E.R.; DeLong, D.M.; Clarke-Pearson, D.L. Comparing the areas under two or more correlated receiver operating characteristic curves: A nonparametric approach. Biometrics 1988, 44, 837–845. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- González-Gorrín, V.M.; Prieto-Blázquez, J. A transport-layer cryptographic framework secures inter-agent communication and verdict provenance in multi-agent malware detection pipelines. Sci. Rep. 2026. [Google Scholar] [CrossRef] [Scilit]
- LaRose, R.; Kaur, A.; Kaur, A.; Missier, P.; Thurtell, E.; Weideman, A.; Shaydulin, R.; Cai, Z.; Suzuki, Y.; Stamatopoulos, N.; et al. Mitiq: A software package for error mitigation on noisy quantum computers. Quantum 2022, 6, 774. [Google Scholar] [CrossRef] [Scilit]
- Bianchi, F.M.; Grattarola, D.; Alippi, C. Spectral clustering with graph neural networks for graph pooling. In Proceedings of the International Conference on Machine Learning (ICML); PMLR: Cambridge, MA, USA, 2020; pp. 874–883. [Google Scholar]
- Qiling Framework. Qiling: Advanced Binary Emulation Framework, 2021. Available online: https://qiling.io (accessed on 15 January 2026).
- Ying, R.; Bourgeois, D.; You, J.; Zitnik, M.; Leskovec, J. GNNExplainer: Generating explanations for graph neural networks. In Proceedings of the 33rd International Conference on Neural Information Processing Systems; Curran Associates Inc.: Red Hook, NY, USA, 2019; pp. 9240–9251. [Google Scholar]



| Representation/Quantity | ||
|---|---|---|
| Surface opcode 3-gram similarity (full instr., Jaccard) | 0.00 | 0.00 |
| Surface opcode 3-gram similarity (mnemonic-only, Jaccard) | 0.21 | 0.06 |
| CFG graph-edit distance (GED) | 0 | 7 |
| Def–use chains preserved (of 3) | 3/3 | 3/3 |
| WL kernel distance (function alone, = 3) | 0.00 | 0.73 |
| Predicted score-shift bound ( = 3.1) | 0.00 | 2.27 * |
| WL kernel distance (embedded, ≈ ) | 0.00 | < |
| Predicted score-shift bound (embedded) | 0.00 | < |
| Dataset | Samples | Malware | Benign | Type | Baseline DR (%) |
|---|---|---|---|---|---|
| VirusShare-2024 | 188,812 | 143,812 | 45,000 | Meta/Poly | 79.3 |
| SOREL-20M (subset) | 11,363 | 11,363 | — | Poly/Meta | 68.4 |
| Total | 200,175 | 155,175 | 45,000 | Mixed | 78.7 |
| Prevalence | Malware/Day | False Pos./Day | True Pos./Day | PPV |
|---|---|---|---|---|
| 1.0% | 5000 | 2030 | 4892 | 0.707 |
| 0.1% | 500 | 2048 | 489 | 0.193 |
| 0.01% | 50 | 2050 | 49 | 0.023 |
| Method | DR (%) | FPR (%) | FNR (%) | AUC-ROC | AUC-PR | |
|---|---|---|---|---|---|---|
| B1 MalConv+ | 91.42 | 2.31 | 8.58 | 0.912 | 0.961 | 0.947 |
| B2 EMBER-RF | 89.74 | 1.88 | 10.26 | 0.899 | 0.958 | 0.941 |
| B3 GCN-CFG | 93.17 | 1.63 | 6.83 | 0.933 | 0.971 | 0.956 |
| B4 HMIL | 93.24 | 1.22 | 6.76 | 0.942 | 0.974 | 0.963 |
| B5 QSVM | 85.06 | 3.45 | 14.94 | 0.843 | 0.933 | 0.917 |
| MetaGNN-Sec † | 97.83 | 0.41 | 2.17 | 0.978 | 0.994 | 0.991 |
| Family | n | MalConv+ | GCN-CFG | HMIL | MetaGNN-Sec | Δ vs. B4 |
|---|---|---|---|---|---|---|
| G2 | 2145 | 96.4 | 97.2 | 97.5 | 99.3 | +1.8 |
| NGVCK | 1873 | 87.6 | 93.4 | 94.1 | 98.7 | +4.6 |
| Zperm | 1632 | 83.2 | 91.8 | 92.7 | 98.1 | +5.4 |
| Evol | 1404 | 79.4 | 88.9 | 90.3 | 97.6 | +7.3 |
| MetaFour | 1221 | 88.1 | 93.7 | 94.5 | 98.2 | +3.7 |
| VSTF-III | 1088 | 81.3 | 89.4 | 91.2 | 96.9 | +5.7 |
| DeepMorph | 943 | 76.8 | 85.5 | 87.3 | 95.8 | +8.5 |
| Chameleon-2 | 812 | 74.2 | 83.1 | 85.7 | 95.1 | +9.4 |
| Mean | 1390 | 83.4 | 90.4 | 91.7 | 97.5 | +5.8 |
| Method | Clean DR | Adv. DR | Drop | Adv. FPR | Adv. |
|---|---|---|---|---|---|
| B1 MalConv+ | 91.42 | 61.3 | 2.8 | 0.658 | |
| B2 EMBER-RF | 89.74 | 58.7 | 2.4 | 0.631 | |
| B3 GCN-CFG | 93.17 | 72.4 | 1.9 | 0.748 | |
| B4 HMIL | 93.24 | 76.1 | 1.6 | 0.779 | |
| MetaGNN-Sec | 97.83 | 92.4 | 0.7 | 0.927 |
| Configuration | DR (%) | FPR (%) | FNR (%) | |
|---|---|---|---|---|
| Full MetaGNN-Sec | 97.83 | 0.41 | 2.17 | 0.978 |
| w/o heterogeneous edges | 95.12 | 0.68 | 4.88 | 0.951 |
| w/o WGAN hardening | 96.41 | 0.53 | 3.59 | 0.963 |
| w/o quantum layer | 96.61 | 0.55 | 3.39 | 0.965 |
| w/o DiffPool | 94.83 | 0.74 | 5.17 | 0.947 |
| w/o opcode embeddings | 93.47 | 0.92 | 6.53 | 0.935 |
| CFG only (no PDG) | 92.68 | 1.04 | 7.32 | 0.927 |
| Method | Throughput (s/s) | Params (M) | GPU Mem (GB) |
|---|---|---|---|
| B1 MalConv+ | 4210 | 12.3 | 1.2 |
| B2 EMBER-RF | 38,500 | 0.8 | — |
| B3 GCN-CFG | 1850 | 3.6 | 0.7 |
| B4 HMIL | 1120 | 8.9 | 2.1 |
| MetaGNN-Sec | 980 | 24.7 | 4.3 |
| MetaGNN-Sec (no Q) | 1340 | 24.1 | 4.1 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
González-Gorrín, V.M.; Prieto-Blázquez, J. Metamorphic Malware Detection via Graph-Augmented Neural Semantics and Adversarial Hardening: A Comprehensive Framework. J. Cybersecur. Priv. 2026, 6, 164. https://doi.org/10.3390/jcp6050164
González-Gorrín VM, Prieto-Blázquez J. Metamorphic Malware Detection via Graph-Augmented Neural Semantics and Adversarial Hardening: A Comprehensive Framework. Journal of Cybersecurity and Privacy. 2026; 6(5):164. https://doi.org/10.3390/jcp6050164
Chicago/Turabian StyleGonzález-Gorrín, Victor Manuel, and Josep Prieto-Blázquez. 2026. "Metamorphic Malware Detection via Graph-Augmented Neural Semantics and Adversarial Hardening: A Comprehensive Framework" Journal of Cybersecurity and Privacy 6, no. 5: 164. https://doi.org/10.3390/jcp6050164
APA StyleGonzález-Gorrín, V. M., & Prieto-Blázquez, J. (2026). Metamorphic Malware Detection via Graph-Augmented Neural Semantics and Adversarial Hardening: A Comprehensive Framework. Journal of Cybersecurity and Privacy, 6(5), 164. https://doi.org/10.3390/jcp6050164

