Graph Similarity Metric Using Graph Convolutional Network: Application to Malware Similarity Match

Binglin Zhao, Fudong Liu, Zheng Shan, Yihang Chen, Jian LiuIEICE Trans. Information and Systems 2019

Abstract

This paper introduces MSM-GCN, a deep learning framework that utilizes Graph Convolutional Networks (GCNs) to measure similarity between malware samples. By representing malicious code as function dependency graphs and employing GCNs for embedding generation, the system achieves high accuracy in variant identification. Experimental results on the Microsoft Kaggle Malware dataset demonstrate a peak accuracy of 97.5% and significant computational efficiency gains over traditional graph-matching algorithms like Graph Edit Distance (GED).

Introduction

Traditional signature-based malware detection is increasingly vulnerable to code obfuscation techniques that alter binary appearance without changing underlying behavior. Structural analysis using Function Call Graphs (FCGs) offers a more robust alternative, as these semantic structures remain stable across variants. However, traditional graph matching is computationally expensive, creating a bottleneck for large-scale databases. This paper addresses these challenges by introducing an efficient, end-to-end graph similarity metric that learns features directly from graph topology.

Methodology

The authors propose a three-stage pipeline called MSM-GCN:

  1. Preprocessing & Graph Construction: Malware is disassembled to extract a "Function Dependency Graph." To handle varying graph sizes—a common issue in software analysis—the authors developed a Node Scale Adjustment algorithm. This adds "virtual nodes" to normalize inputs to a uniform scale without losing structural integrity.
  2. Graph Embedding (GCN): The system uses a GCN to transform raw graph data into compact numerical vectors (embeddings). To maintain efficiency, the model employs spectral graph theory and Chebyshev polynomial approximations, reducing computational complexity from $O(n^2)$ to linear $O(k)$.
  3. Similarity Metric Learning (MLP): Embeddings from two samples are concatenated and fed into a Multi-Layer Perceptron (MLP). The MLP is trained to output a similarity score, effectively learning the structural features that define malware families.
The MSM-GCN pipeline: Preprocessing, Graph Embedding, and Metric Learning stages.

Experimental Setup

The study utilizes the Microsoft Kaggle Malware Classification Dataset, a benchmark containing over 10,000 samples across nine malware families. The authors excluded the 5th family due to insufficient sample size for training. Evaluation was performed on 2,000 pairs of samples, consisting of 1,000 matching pairs from the same family and 1,000 non-matching pairs.

Results and Discussion

MSM-GCN achieved a peak similarity detection accuracy of 97.5% as the training set size increased. Furthermore, when paired with the Affinity Propagation Clustering (APC) algorithm, the system correctly grouped malware into their respective families with 97% accuracy.

A critical advantage of this approach is its scalability. Compared to the traditional Graph Edit Distance (GED) method, MSM-GCN maintains efficient processing times as the number of samples increases. As shown in the performance evaluation, the time required for GED spikes dramatically with larger datasets, while MSM-GCN remains significantly more efficient, proving its viability for real-world, large-scale malware analysis.

Comparison of processing time between GCN-based methods and traditional Graph Edit Distance (GED) as sample size increases.

Conclusion

MSM-GCN provides a scalable and accurate solution for malware similarity matching by learning features directly from graph topology. By overcoming the computational bottlenecks of traditional graph matching and the limitations of signature-based detection, it offers a robust tool for security researchers. Future work will explore integrating additional structural features, such as control flow or data flow graphs, to further enhance the model's robustness against sophisticated obfuscation.

Summary updated

BibTeX
@article{zhao2019graph,
  author = {Binglin Zhao and Fudong Liu and Zheng Shan and Yihang Chen and Jian Liu},
  title = {{Graph Similarity Metric Using Graph Convolutional Network: Application to Malware Similarity Match}},
  journal = {IEICE Trans. Information and Systems},
  year = {2019},
  doi = {10.1587/transinf.2018edl8259},
}
Figure