NDSS 2027 · Research & open-source implementation

Not all functions are equal.

Classifying new Android malware families from just a few examples, by learning which functions carry the strongest family-specific signals.

Pelumi Ogunwale · Yohan Hmaiti · Joseph J. LaViola Jr. · David Mohaisen
University of Central Florida · Ewha Womans University

Structure-aware inferenceFew-shot · 5-way
Functions are not pooled equally.SDL · Adaptive readout
2
learnable parameters in the SDL readout head
3
independent Android malware corpora
1 / 5
labeled examples per family at test time
500
evaluation episodes per configuration
The method

Structure matters. Function importance matters more.

Most functions in an APK are shared utilities or library code. SDL focuses the graph-level representation on functions that distinguish one malware family from another—particularly valuable when labeled examples are scarce.

01 / Approach
01 / represent

Hierarchical program graphs

Each APK becomes a two-level program representation: CFGs capture within-function execution structure; an FCG captures relationships between functions.

FCG + CFG
02 / learn

Contrastive function embeddings

A shared hierarchical GraphSAGE encoder learns representations with instance-level and set-level contrastive pre-training.

Dual contrastive objectives
03 / classify

Adaptive weighted readout

A TF-IDF-inspired gate emphasizes family-specific functions using support-set similarity and a program-structural prior, then builds few-shot prototypes.

Interpretable · 2 scalars
From APK to novel-family prediction
InputAPK → FCG + CFGProgram structure and features
EncoderGraphSAGE hierarchyFunction-level embeddings
Pre-train + weightContrastive + SDLAdaptive function importance
InferenceNearest prototypeFamily prediction from K examples
SDL / Structurally Driven Learning
w(v) = σ(τ [λₐ · simin(v) + λᵦ · p(v) − simout(v)])
Reward functions that resemble their own family, discount those that resemble many families, and incorporate a verifiable structural prior. Node scores are subsequently normalized within each graph for weighted readout.

One principle, multiple structural priors

SDL-Complexity uses CFG cyclomatic complexity. SDL-Degree uses FCG in-degree, and an ablation tests PageRank. The readout's key advantage comes from nonuniform, family-aware function weighting—not from any one chosen prior.

Semantic similarityStructural priorSoft gating
Evaluation

Consistent gains across independent corpora.

Mean 5-way few-shot classification accuracy on novel families. All compared methods use common family-disjoint evaluation episodes; scores come from Table II of the paper.

02 / Results

Accuracy by dataset

Change the number of support examples to compare methods.

SDL-Complexity Self-Attention FAMCF (flat features)Accuracy (%) · 500 episodes; no-overlap, novel-family evaluation
Two-parameter readout

SDL-Complexity achieves 83.00% on HiGraph and 92.30% on MalDroid at 5-shot, exceeding the learned Self-Attention head on both.

A qualified result

SDL leads on most settings, but FAMCF is stronger on MalDroid 1-shot (83.64% versus SDL's 80.79%). Strong flat API features can still be competitive.

Temporal generalization: with pre-2019 HiGraph training data and novel families drawn from a combined 2019–2021 pool, SDL-Complexity achieves 67.82% (1-shot) and 82.53% (5-shot) accuracy. See Table IV in the paper.
Experimental data

Three corpora, family-disjoint splits.

The study retains the subset of samples processable by all baseline pipelines, with disjoint training, validation, and novel-family partitions.

03 / Data
CorpusBaseValidationNovelTotal APKs
HiGraph50 families161834,006
MalDroid15 families557,676
KronoDroid27 families885,750
Combined92293147,432
Final filtered evaluation corpus; family counts and sample counts from Table I of the paper. Each dataset is evaluated independently.
Research release

Code, methodology, and reproduction.

The public repository provides the hierarchical encoder, SDL variants, baselines, datasets' family labels and mappings, scripts, and evaluation tooling.

04 / Resources
Quick start · terminal
# Prepare local environment
git clone https://github.com/calebdeji/not-all-functions-are-equal.git
cd not-all-functions-are-equal
pip install -r requirements.txt

# After obtaining APK datasets and completing README preprocessing
bash scripts/run_training.sh
bash scripts/run_evaluation.sh

Raw APKs are not included in the repository. The README specifies dataset acquisition, graph extraction, feature generation, and required splits before training.

Citation

Cite the NDSS 2027 paper.

If this code or method supports your research, please cite the associated conference paper.

05 / Cite
BibTeX
@inproceedings{ogunwale2027functions,
  title = {Not All Functions Are Equal: Adaptive Node
           Weighting for Few-Shot Android Malware Family
           Classification},
  author = {Ogunwale, Pelumi and Hmaiti, Yohan and
            LaViola Jr., Joseph J. and Mohaisen, David},
  booktitle = {Proceedings of the Network and Distributed
               System Security Symposium (NDSS)},
  year = {2027},
  doi = {10.14722/ndss.2027.233235}
}

Not All Functions Are Equal

Adaptive Node Weighting for Few-Shot Android Malware Family Classification
Pelumi Ogunwale, Yohan Hmaiti, Joseph J. LaViola Jr., and David Mohaisen.

Venue: Network and Distributed System Security (NDSS) Symposium, March 22–26, 2027 · Seoul, Republic of Korea.

DOI ↗

PDF is embedded in this single HTML file, so the download also works offline. The DOI may not resolve until the conference publishes its proceedings.