NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Robust Malware Classification via Deep Graph Networks on Call Graph Topologies

Federico Errica, Giacomo Iadarola, Fabio Martinelli, Francesco Mercaldo, Alessio Micheli

Abstract

Malware detection increasingly struggles against sophisticated obfuscation techniques that alter code content while preserving malicious behavior. This paper presents a novel classification framework that relies exclusively on the structural topology of a program's Call Graph (CG). By utilizing Deep Graph Networks (DGNs)—specifically the Contextual Graph Markov Model (CGMM)—the researchers demonstrate that the "skeleton" of function interactions provides a highly discriminative signature for malware families. The proposed method achieves a 96.4% classification accuracy on Android applications and remains inherently robust against intra-procedural obfuscation by design.

Introduction: The Challenge of Code Obfuscation

Static analysis is a cornerstone of malware detection, yet it is frequently undermined by obfuscation. Malware authors typically employ two categories of transformation:

  1. Intra-procedural Obfuscation: This involves modifying the internal logic of a function—such as renaming variables, swapping instructions, or inserting junk code—without altering how the function interacts with the rest of the program.
  2. Inter-procedural Obfuscation: This involves changing the program's overall structure by adding, removing, or redirecting function calls.

Most current machine learning models for malware detection rely on features like opcode frequencies or control-flow dependencies. These features are highly susceptible to intra-procedural changes. This research explores a more resilient alternative: classifying malware based solely on its Call Graph topology. By focusing on the "who calls whom" rather than the "what is inside," the classifier can ignore internal code changes entirely.

Methodology

The researchers developed a multi-stage pipeline to extract structural fingerprints from Android APKs for classification.

The proposed malware classification pipeline, illustrating the flow from raw APK files through static analysis and graph embedding to final classification.

Graph Construction and Feature Selection

The process begins with the Soot Framework, which decompiles Android APKs into Jimple, an intermediate representation. From this, a Call Graph (CG) is generated where nodes represent methods and edges represent calls between them. To ensure the model is robust against content-level changes, all semantic features (like function names or logic) are discarded. The only feature assigned to each node is its out-degree—the count of other functions it calls.

Deep Graph Learning with CGMM

The core of the system is the Contextual Graph Markov Model (CGMM). CGMM is a generative, deep graph network that learns to produce vector embeddings of graphs in an unsupervised manner. It processes the graph layer-by-layer, allowing it to capture increasingly complex structural patterns and neighborhood contexts. These embeddings serve as a compressed, topological signature of the application.

Experimental Results and Discussion

The methodology was evaluated using a dataset of 5,669 Android applications, comprising one benign class and seven distinct malware families (Airpush, Dowgin, FakeInst, Kuguo, Youmi, Fusob, and Mecor). The resulting graphs were large and sparse, averaging over 5,000 nodes each.

Performance comparison between the structure-agnostic baseline and the CGMM model, highlighting the critical role of topological information in achieving high accuracy.

As shown in the performance summary, the CGMM model significantly outperformed a structure-agnostic baseline. While the baseline—which considered node features but ignored connections—only achieved 56.7% accuracy, the CGMM model reached 96.4% accuracy on the test set. This confirms that the arrangement of function calls is the primary source of discriminative information for malware family identification.

Furthermore, the model demonstrated exceptional robustness. When tested against a subset of malware specifically modified with "Code Reordering" and "Junk Code" (intra-procedural obfuscation), the model maintained a 99.6% accuracy. Even for small classes like Mecor (only 30 samples), the model achieved near-perfect classification, indicating that topological signatures are highly unique even with limited data.

Conclusion

This research demonstrates that program topology is a powerful and resilient signal for malware classification. By intentionally ignoring function content, the model becomes immune to common evasion tactics. While the current approach is vulnerable to inter-procedural obfuscation that alters the graph structure itself, it provides a strong foundation for robust static analysis. Future work will investigate the impact of including external library calls and extending the methodology to other binary formats like Windows and Linux.

Summary updated

BibTeX
@inproceedings{errica2021robust,
  author = {Federico Errica and Giacomo Iadarola and Fabio Martinelli and Francesco Mercaldo and Alessio Micheli},
  title = {{Robust Malware Classification via Deep Graph Networks on Call Graph Topologies}},
  booktitle = {ESANN},
  year = {2021},
  doi = {10.14428/esann/2021.es2021-82},
}
Figure