Source-linked AI summary

A Hybrid Approach to Malware Detection: Integrating Few-Shot Model-Agnostic Meta-Learning with Autoencoders

Emmanuela Andam, Yasir Abbas Zaidi, Abdelali Hadir, Emmanuel Grant, Naima Kaabouch

arXiv:2610.01949v1cs.CRcs.AIcs.LG

TL;DR

Ransomware detection methods can struggle with novel or scarce samples. This paper combines autoencoder feature extraction with a MAML classifier for few-shot malware detection; the hybrid leads baselines in low-shot settings, while Random Forest surpasses other models at high shots.

  • Problem

    Conventional malware detection methods struggle with novel or scarce samples, motivating few-shot detection for emerging ransomware variants.

    Source: §I · p. 1, §IV · p. 7
  • Method

    An autoencoder extracts compact, low-dimensional features that a MAML classifier uses for task-specific adaptation with limited labeled samples.

    Source: B. Proposed Hybrid Model · p. 3
  • Results

    The MAML hybrid outperforms baseline models in 1–20-shot settings, while Random Forest surpasses the other models in high-shot regimes; MAML accuracy rises from 0.8755 at 1-shot to 0.9365 at 50-shot.

    Source: §III · pp. 5, 7
  • Takeaways & Limitations

    The results support the hybrid’s use for few-shot malware detection, including adapting to new threats with minimal labeled data.

    Source: §IV · p. 7

Abstract

from arXiv · show

Ransomware has emerged as a major cybersecurity threat, with incidents increasing in frequency and impact across critical sectors. These attacks are typically launched through phishing emails, malicious downloads, or exploitation of software vulnerabilities to gain system access. Once inside, the malware encrypts files and demands a ransom, often in cryptocurrency, for the decryption key. Conventional detection methods often struggle with novel or scarce samples, leaving systems vulnerable. To address these challenges, this paper proposes a hybrid deep learning framework that combines an Autoencoder Feature Extractor (AFE) with a Model Agnostic Meta Learning (MAML) classifier for few shot malware detection. The AFE generates compact latent features that reduce noise and dimensionality, while the MAML classifier rapidly adapts to new threats using limited labeled data. Experiments conducted on the Ransomware Dataset 2024 demonstrate the effectiveness of the framework in binary classification tasks. Across one to fifty shot settings, the proposed model consistently achieves high accuracy, F1 score, and Matthews Correlation Coefficient values, maintaining reliable classification even under extreme scarcity. These results highlight the model's robustness and effectiveness in adapting to limited data scenarios, demonstrating the potential of combining feature extraction with meta learning to enhance resilience against malware, particularly in sectors such as healthcare, manufacturing, and public infrastructure, where cyberattacks can cause significant operational and financial disruption.

I. INTRODUCTION

The introduction frames ransomware and other cyberattacks as costly threats to people and critical infrastructure, while noting that conventional detection methods struggle with new or scarce malware. It presents combining compact autoencoder features with MAML as an approach to few-shot detection.

I. INTRODUCTION

  • A phishing-initiated ransomware attack shut down electronic health-record systems across multiple states, costing the health system approximately $13 billion and contributing to a $1.8 billion fiscal-year-2024 operating loss.Source: §I · p. 1
  • Healthcare and Public Health recorded 238 ransomware attacks and 206 data breaches in 2024, while Critical Manufacturing reported 258 ransomware cases.The passage also reports cybercrime losses rising from $4.1 billion in 2020 to more than $16.6 billion in 2024.Source: §I · p. 1
  • Signature-based detection misses unseen variants, while heuristic methods can produce false positives and machine-learning models require retraining on massive datasets.Source: §I · p. 1
  • The proposed hybrid uses an autoencoder to create compact, low-dimensional features for a MAML classifier designed to adapt quickly to new few-shot tasks.The introduction describes this as combining unsupervised feature learning with rapid adaptation using minimal training data.Source: §I · pp. 1–2

II. METHODOLOGY

The methodology section introduces the study’s dataset and preprocessing, proposed model, and evaluation metrics for comparing its performance with other models.

II. METHODOLOGY

  • The section covers the dataset and its preprocessing.Source: §II · p. 2
  • It also presents the proposed hybrid model.Source: §II · p. 2
  • Evaluation metrics are used to compare the proposed model’s performance with that of other models.Source: §II · p. 2

A. Dataset Collection and Preprocessing

The study uses a balanced ransomware dataset with behavioral features, normalizes and encodes its inputs, and evaluates malware-family-versus-benign classification in few-shot episodes.

A. Dataset Collection and Preprocessing

  • The dataset contains 21,752 samples, evenly split between 10,876 malicious and 10,876 benign samples, with 72 features describing behavior and API/DLL classifications.It includes 11 ransomware variants, listed across the dataset description.Source: A. Dataset Collection and Preprocessing · p. 2
  • Categorical features are label-encoded, while numerical features are scaled to [0, 1] using Min-Max normalization.The passage says the normalization prevents high-magnitude features from dominating learning and accelerates convergence.Source: A. Dataset Collection and Preprocessing · p. 2
  • Each few-shot episode is a 2-way binary task distinguishing malware families from benign samples, with stratified sampling intended to ensure equal representation.Source: A. Dataset Collection and Preprocessing · pp. 2–3
  • The illustrated sampling workflow assigns K = 5 examples per class to the support set and N = 2000 per class to the query set.Source: Figure 2 · p. 2

B. Proposed Hybrid Model

The proposed hybrid model combines autoencoder feature extraction with MAML classification, using compact latent representations and task-specific fine-tuning to detect new, unseen malware families from limited labeled samples.

B. Proposed Hybrid Model

  • The pipeline pairs an autoencoder feature extractor with a MAML classifier for few-shot malware detection.Stratified sampling creates support and query sets before feature extraction and classification.Source: B. Proposed Hybrid Model · p. 3, Figure 3 · p. 3

a) Autoencoder Feature Extraction

  • The AFE encoder compresses high-dimensional inputs into a latent representation, while the decoder attempts to reconstruct the original input.The encoder captures salient features in a lower-dimensional space, reducing overfitting risk on small training sets.Source: B. Proposed Hybrid Model · p. 3
  • The autoencoder is trained by minimizing reconstruction error between each input and the decoder’s output.The paper identifies this loss as mean squared error; minimizing it is intended to reduce noise and dimensionality.Source: B. Proposed Hybrid Model · p. 4

b) Model-Agnostic Meta-Learning Classifier

  • The MAML classifier receives the autoencoder’s latent features and performs the final malware-detection step.Its nested optimization is designed to support few-shot adaptation.Source: B. Proposed Hybrid Model · p. 4
  • In the inner loop, gradient steps on a task’s support set update the model parameters using the support-set loss.The inner-loop learning rate is α.Source: B. Proposed Hybrid Model · p. 4
  • The outer loop evaluates adapted parameters on the query set and updates the original parameters to improve future adaptation.The paper evaluates models using confusion-matrix-derived metrics.Source: B. Proposed Hybrid Model · p. 4

III. RESULTS AND DISCUSSION

The section evaluates AFE-MAML across 1–50-shot settings and compares it with four baselines. Metrics generally improve as support samples increase, with AFE-MAML reported as the strongest model in 1–20-shot settings and Random Forest surpassing the other baselines in high-shot accuracy.

III. RESULTS AND DISCUSSION

  • Experiments vary support size from 1 to 50 shots while holding the query set at 1,000 samples per class, for 2,000 balanced evaluation samples.Table V aggregates accuracy, F1 score, precision, recall, and MCC by configuration.Source: Table IV · p. 4, §III · p. 5, Table V · p. 5
  • Across few-shot settings, accuracy rose from 0.8755 and MCC from 0.7584 at 1-shot to 0.9365 accuracy and 0.8730 MCC at 50-shot; 50-shot F1 was 0.9367.Source: §III · p. 5
  • At 1-shot, the model correctly classified 945 benign and 806 malware samples, with 55 false positives and 194 false negatives; at 50-shot, errors fell to 66 and 61.The 50-shot matrix reports 934 true negatives and 939 true positives.Source: Figure 5 · p. 5, §III · p. 5
  • At 5-shot, F1 is 0.9244; the authors present high F1 and MCC as evidence of resilience to class imbalance and warn that low scores risk missed detections or false alarms.They identify small-scale responses to novel ransomware or trojan variants as a relevant low-shot setting.Source: §III · p. 6
  • From 5-shot to 10-shot, accuracy rises from 0.9235 to 0.9270 and recall from 0.9350 to 0.9460, while precision dips from 0.9140 to 0.9114 before reaching 0.9400 at 20-shot.The paper notes that most metrics increase with shot count, with this temporary precision decline as an exception.Source: Figure 6 · p. 5, §III · p. 6
  • Across 1–20-shot settings, AFE-MAML is reported as the best performer; Random Forest surpasses the other three baselines in high-shot accuracy.The comparisons cover accuracy, F1 score, and MCC.Source: Figure 7 · p. 6, Figure 8 · p. 6, Figure 9 · p. 7

IV. CONCLUSION

The conclusion presents AFE-MAML for few-shot detection of emerging ransomware variants, pairing compact feature representations with rapid adaptation from minimal labeled data. It reports a clear advantage when labeled data are scarce and identifies multi-class detection and obfuscation resilience as future research directions.

IV. CONCLUSION

  • The architecture combines compact, informative autoencoder features with a MAML classifier that rapidly adapts to emerging ransomware variants using minimal labeled data.The paper reports that the hybrid outperformed four traditional models, but the supplied passage does not identify them or specify the comparison setting.Source: §IV · p. 7
  • The AFE-MAML hybrid maintains a clear advantage when labeled data are scarce, while Random Forest becomes competitive in high-shot settings.The conclusion also reports high accuracy, F1 score, and Matthews Correlation Coefficient values, with reliable classification under class imbalance.Source: §IV · p. 8
  • The conclusion identifies multi-class malware detection and obfuscation-resilient designs as future research directions.It characterizes the framework as a foundation for adaptive malware detection systems that are accurate and flexible.Source: §IV · p. 8
Loading 2610.01949v1…