Dataset Card for MalNet-Tiny Distribution Shift Benchmarks
This dataset contains three datasets, MalNet-Tiny, MalNet-Tiny-Common and MalNet-Tiny-Distinct, designed to evaluate the robustness of graph-based Android malware classifiers under distribution shift. Derived from the MalNet-Tiny dataset, these benchmarks introduce specific partitions to simulate realistic covariate shift (intra-family) and domain (cross-family) shifts by enriching Function Call Graphs (FCGs) with semantic function metadata and LLM-based code embeddings.
Dataset Details
Dataset Description
The dataset consists of Android Function Call Graphs (FCGs) where nodes represent functions and edges represent invocations. Unlike the original MalNet-Tiny, which relies on structure-only representations, this dataset enriches the graphs with:
- Function Metadata: Lightweight features such as function names, method signatures, and access flags.
- LLM Embeddings: Dense semantic representations of function bodies derived from Large Language Models (LLMs), extracted when source code is available.
The available datasets are defined as follows:
- MalNet-Tiny: The original MalNet-Tiny dataset with semantic features for nodes in the FCGs.
- MalNet-Tiny-Common: Evaluates generalization of the model under covariate shift.
- MalNet-Tiny-Distinct: Evaluates generalization of the model under domain shift.
Dataset Specification
- License: Creative Commons Attribution 4.0 International (CC-BY 4.0)
Uses
Direct Use
- Robust Malware Detection: Developing and benchmarking Graph Neural Networks (GNNs) that are resilient to evolving malware variants.
- Distribution Shift Evaluation: Testing model performance under covariate shift (Common) and domain shift (Distinct).
- Graph Representation Learning: Studying the integration of structural (graph) and semantic (LLM/Metadata) features in learning tasks.
Out-of-Scope Use
- This dataset is intended for research purposes (defense) and should not be used to generate or obfuscate malware.
- The semantic features rely on static analysis; dynamic execution traces are not included.
Dataset Structure
To improve usability, we have reworked the precomputed data structure such that there are no duplicate weights across the files, broken down large files into smaller ones for easy storage, and improved code to not unnecessarily allocate memory during the data loading process. Meanwhile, we retain the user's ability to download specific files needed for any requested split. The dataloading code is provided in mntf.py within this repository, with example usage:
from mntf import MNTF
from torch_geometric.loader import DataLoader
from torch_geometric.transforms import LocalDegreeProfile
dataset = MNTF(
collator="zero", ablation="all", variant="tiny", llm_name="cxe",
remove_isolated=True, transform=LocalDegreeProfile()
)
trainloader = DataLoader(
dataset[dataset.splits["train"]], batch_size=32, shuffle=True
)
The code has been upgraded to work with the newer PyTorch Geometric 2.3+, whereas the original code extending from Exphormer used the now-defunct PyG 2.0.4. While we strongly recommend installing PyG 2.3+ for seamless installation (as it removes various hard component requirements such as torch_scatter) and set our minimum requirement as such, this code can be minimally adjusted to work with earlier versions. Another requirement is safetensors for loading graph features, replacing .pt checkpoints that requires torch.load(weights_only=False) in newer versions of PyTorch; and its default mmap backend eliminates the need to allocate each sub-tensor twice during concatenation.
Additionally, huggingface_hub is an optional dependency, which automatically downloads the required files to load the dataset. If not installed, these files need to be manually downloaded before dataset creation.
Dataset Creation
Curation Rationale
Existing graph-based classifiers achieve high accuracy on standard benchmarks (like MalNet-Tiny) but suffer noticeable performance drops on unseen families. These benchmarks were created to rigorously evaluate and improve the generalization capabilities of malware detectors in realistic, evolving threat environments.
Source Data
The data are processed from raw APK files from AndroZoo, a repository of real-world Android packages. Labels are derived from MalNet, a large-scale dataset containing Android Function Call Graphs and their malware classifications.
Data Collection and Processing
- Base Data: Samples and labels were selected from MalNet, then corresponding raw APK were downloaded from AndroZoo.
- MalNet-Tiny: The split from the original MalNet.
- MalNet-Tiny-Common: Samples from same malware families but different malware types.
- MalNet-Tiny-Distinct: Samples from completely unseen families of malwares.
- Feature Extraction:
- Metadata Extraction: Function names, signatures, and flags were extracted to provide lightweight semantic context.
- LLM Embedding: Source code (decompiled Smali/Java) of function bodies was processed using Large Language Models to generate dense code embeddings.
Accompanied code on dataset construction can be found at this project page.
Bias, Risks, and Limitations
- Static Analysis Limitations: The graphs are based on static analysis and may be vulnerable to obfuscation techniques that alter call graphs (e.g., reflection, dynamic loading) without changing behavior.
- Feature Availability: LLM embeddings depend on the successful decompilation and availability of function bodies.
Recommendations
Users should be made aware of the risks, biases, and limitations of the dataset. Models trained on this dataset should be evaluated in conjunction with dynamic analysis methods for deployment in critical security environments.
Citation
@misc{tran2026evaluating,
title={Evaluating Out-of-Distribution Robustness in Graph-Based Android Malware Classification: A New Principled Benchmark},
author={Ngoc N. Tran and Anwar Said and Waseem Abbas and Tyler Derr and Xenofon D. Koutsoukos},
year={2026},
eprint={2508.06734},
archivePrefix={arXiv},
primaryClass={cs.CR},
url={https://arxiv.org/abs/2508.06734},
}
- Downloads last month
- 40