MalTree: Tracing Malware Evolution from Embeddings at Scale

Akash Amalan, Georgios Smaragdakis, Tom Julian VieringICML 2026

Introduction: The Need for Lineage-Aware Defense

Current malware detection is largely a game of cat-and-mouse. Most machine learning models are "sample-centric"—they evaluate a single file in isolation to determine if it is malicious. However, as malware authors continuously release new variants to evade detection, these models quickly suffer from performance decay.

To build more resilient, proactive defenses, security teams must understand the lineage of malware: how code is inherited, modified, and shared across families. Traditionally, uncovering these evolutionary relationships requires manual reverse engineering, a painstaking process that can take months or even years. MalTree addresses this critical gap by providing an automated, scalable framework that applies bioinformatics-inspired phylogenetic algorithms to map the evolutionary history of malware, helping defenders anticipate future threats.

Methodology: Treating Malware Like Biological Organisms

The researchers propose a pipeline that models malware evolution by adapting techniques originally designed for tracing biological species.

1. Multi-Modal Embeddings

Instead of relying solely on raw code, MalTree extracts three distinct types of features from memory dumps to bypass packing and obfuscation:

  • Pseudo-static: Structural features (such as imports, exports, and headers) encoded using LLM-based text embeddings.
  • Dynamic: Behavioral traces captured during sandbox execution, including API calls and network activity.
  • Image-based: Binary files converted into RGB images and processed through a fine-tuned ResNet-50 model.

2. Embedding Fusion and Tree Construction

These multi-modal features are concatenated and compressed into a 1,000-dimensional vector using a supervised neural network. The framework then applies two classic bioinformatics algorithms to construct evolutionary trees:

  • UPGMA: A method that assumes a constant rate of evolution (a "molecular clock").
  • Neighbor-Joining (NJ): A more flexible approach that accommodates varying evolutionary speeds across different branches.

3. Temporal Validation

To ensure the generated trees reflect actual evolutionary history rather than mere structural similarity, the authors introduced a temporal validation metric. By comparing the tree structure against VirusTotal first-submission timestamps, they verified whether inferred ancestors actually appeared in the wild before their descendants.

Dataset

The study evaluated MalTree on a massive dataset comprising 103,883 malware samples across 538 families. Sourced from public repositories (MalwareBazaar, vx-underground, VirusTotal) and private collections, the dataset spans Windows (PE), Linux (ELF), and legacy DOS executables. Ground-truth family labels were established using a 30% consensus threshold among antivirus vendors on VirusTotal.

Key Insights and Results

High Accuracy and Temporal Consistency

The multi-modal embedding approach achieved 94.9% accuracy in family classification, establishing a robust foundation for distance-based tree construction. When evaluated for evolutionary accuracy, the best-performing model (Neighbor-Joining with outgroup rooting) achieved 87.1% temporal consistency. This indicates that the inferred evolutionary order aligns with real-world emergence timelines nearly 9 times out of 10.

The "Molecular Clock" is Broken in Malware

In biology, some models assume species evolve at a steady, predictable rate. MalTree's analysis revealed that malware families violate this "global clock" assumption. Some families, such as Bashlite, mutate 10 times faster than others. This variable mutation rate explains why the Neighbor-Joining algorithm significantly outperformed UPGMA. However, while global mutation rates vary wildly, they remain relatively consistent within individual families (a "local clock"), allowing for accurate ordering of variants within a specific lineage.

Functional vs. Organizational Lineage

A critical insight from the study is that MalTree clusters malware by functionality rather than by authorship. For instance, tools developed by the "Wizard Spider" threat actor (e.g., Conti ransomware and the TrickBot banking trojan) did not cluster together because their underlying tasks and behaviors are fundamentally different.

Scalability and Real-World Application

MalTree demonstrated exceptional scalability, constructing a validated phylogenetic tree of over 100,000 samples in just 11 hours (UPGMA) to 3 days (NJ) on a 20-core cluster. In a practical case study, the framework successfully recovered the well-documented lineage of the Mirai botnet, accurately identifying its descendants (such as Bashlite and Okiru) with high confidence.

Limitations and Future Work

While MalTree represents a significant leap forward, the authors note several areas for future refinement:

  • Reticulate Evolution: Phylogenetic trees inherently assume a simple branching structure where one parent splits into two. In reality, malware authors frequently "copy-paste" code from multiple sources. Future work will explore phylogenetic networks, which allow for merging branches, to better capture this behavior.
  • The "Loader" Problem: The framework occasionally conflates "delivery chains" with "evolution." For example, it might link SmokeLoader to RedLine Stealer because the former frequently delivers the latter, resulting in shared infrastructure patterns rather than shared genetic code.
  • Incremental Updates: Currently, adding new samples requires rebuilding the tree from scratch. Developing "online" algorithms capable of updating the evolutionary tree in real-time remains a crucial next step for operational deployment.

Summary updated

BibTeX
@inproceedings{amalan2026maltree,
  author = {Akash Amalan and Georgios SMARAGDAKIS and Tom Julian Viering},
  title = {{MalTree: Tracing Malware Evolution from Embeddings at Scale}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=RYaAyLMKy7},
}
Figure