Disentangled Representation Learning in Heterogeneous Information Network for Large-scale Android Malware Detection in the COVID-19 Era and Beyond

Shifu Hou, Yujie Fan, Mingxuan Ju, Yanfang Ye, Wenqiang Wan, Kui Wang, Yinming Mei, Qi Xiong, Fudong ShaoAAAI 2021 · OpenReview

Abstract

In the fight against the COVID-19 pandemic, many social activities have moved online; society's overwhelming reliance on the complex cyberspace makes its security more important than ever. In this paper, we propose and develop an intelligent system named Dr.HIN to protect users against the evolving Android malware attacks in the COVID-19 era and beyond. In Dr.HIN, besides app content, we propose to consider higher-level semantics and social relations among apps, developers and mobile devices to comprehensively depict Android apps; and then we introduce a structured heterogeneous information network (HIN) to model the complex relations and exploit meta-path guided strategy to learn node (i.e., app) representations from HIN. As the representations of malware could be highly entangled with benign apps in the complex ecosystem of development, it poses a new challenge of learning the latent explanatory factors hidden in the HIN embeddings to detect the evolving malware. To address this challenge, we propose to integrate domain priors generated from different views (i.e., app content, app authorship, app installation) to devise an adversarial disentangler to separate the distinct, informative factors of variations hidden in the HIN embeddings for large-scale Android malware detection. This is the first attempt of disentangled representation learning in HIN data. Promising experimental results based on the large-scale and real sample collections from security industry demonstrate the performance of Dr.HIN in evolving Android malware detection, by comparison with baselines and popular mobile security products.

Introduction

Android malware is in a constant arms race with security software. During the COVID-19 pandemic, attackers exploited public fear by creating malicious apps disguised as trackers or health updates. The core challenge is evasion: attackers use "repackaging" techniques to make malicious code look nearly identical to legitimate apps. Traditional detection relies on "content-based" features (what the code says), which is easily fooled. To catch sophisticated malware, we need to look at the context: Who developed the app? What other apps does this developer make? What kind of devices install this app?

Motivation for Dr.HIN: (a) App content similarity due to repackaging, (b) App authorship relations, and (c) App installation patterns.

While these relationships can be modeled in a network, the features are often "entangled"—meaning the signals for "malicious" and "benign" are mixed together in the data. This paper aims to build a system that can look at the whole ecosystem and "disentangle" the specific factors that indicate a threat.

Methodology: The Dr.HIN Framework

The authors propose a framework called Dr.HIN, which operates in four main stages to address the limitations of traditional detection methods.

The overall architecture of the Dr.HIN framework, including HIN construction, domain prior generation, and the disentangled representation learner.
  1. HIN Construction: A massive network is built where nodes represent apps, APIs, developers (signatures), and mobile devices. Relationships (edges) include things like "App invokes API" or "Device installed App."
  2. Meta-path Learning: Predefined sequences of relations (meta-paths), such as App $\to$ Developer $\to$ App, are used to learn initial mathematical representations (embeddings) of the apps.
  3. Domain Prior Generation: To help the model understand what to look for, they generate "priors" from three views: app content, authorship, and installation patterns. For example, they calculate how "suspicious" a device is based on the ratio of unknown apps it has installed.
  4. Adversarial Disentangler: This is the core innovation. It uses an encoder-decoder architecture paired with a multi-task discriminator. The generator tries to create a "disentangled" version of the app's representation that incorporates the domain priors, while the discriminator tries to distinguish between real and synthetic representations while also predicting the app's class (malicious/benign). This adversarial struggle forces the system to isolate the most informative, distinct factors of variation in the data.

Experimental Evaluation

The study used a massive, real-world dataset provided by Tencent Security Lab, consisting of 75,397 apps collected in July 2020. The training set included 64,236 apps (25k malicious, 39k benign), with 11,161 apps reserved for testing. The resulting HIN was industrial-scale, containing 766,976 nodes and over 249 million edges, representing a truly large-scale environment.

Key Results and Discussion

Dr.HIN demonstrated superior performance across the board compared to both academic baselines and commercial products:

  • Accuracy: Achieved 0.9896, significantly higher than standard HIN models like metapath2vec (0.9798) and homogeneous models like DeepWalk (0.9683).
  • Industry Comparison: Dr.HIN outperformed established commercial products. In the test set, it achieved an F1-score of 0.9782, while Norton and Lookout scored 0.9047 and 0.8986, respectively.
  • Robustness: The adversarial training made the model more stable and better at identifying "novel" malware that had been repackaged to look like legitimate COVID-19 apps.

The results underscore that context is king: an app’s reputation and the types of devices it lives on are often more telling than its code alone. Furthermore, disentanglement matters: by explicitly forcing the model to separate malicious and benign features using domain priors, the researchers significantly reduced false positives and negatives.

Conclusion

Dr.HIN represents the first successful attempt to apply disentangled representation learning to Heterogeneous Information Networks, moving beyond simpler homogeneous networks. While the system relies on extensive telemetry (app installation data) typically available to major vendors, its framework is general-purpose. Future work could involve applying this adversarial disentangler to other complex network problems, such as fraud detection in finance or recommendation systems, and exploring how these HINs evolve dynamically over time to catch fleeting attack patterns.

Summary updated

Abstract

In the fight against the COVID-19 pandemic, many social activities have moved online; society's overwhelming reliance on the complex cyberspace makes its security more important than ever. In this paper, we propose and develop an intelligent system named Dr.HIN to protect users against the evolving Android malware attacks in the COVID-19 era and beyond. In Dr.HIN, besides app content, we propose to consider higher-level semantics and social relations among apps, developers and mobile devices to comprehensively depict Android apps; and then we introduce a structured heterogeneous information network (HIN) to model the complex relations and exploit meta-path guided strategy to learn node (i.e., app) representations from HIN. As the representations of malware could be highly entangled with benign apps in the complex ecosystem of development, it poses a new challenge of learning the latent explanatory factors hidden in the HIN embeddings to detect the evolving malware. To address this challenge, we propose to integrate domain priors generated from different views (i.e., app content, app authorship, app installation) to devise an adversarial disentangler to separate the distinct, informative factors of variations hidden in the HIN embeddings for large-scale Android malware detection. This is the first attempt of disentangled representation learning in HIN data. Promising experimental results based on the large-scale and real sample collections from security industry demonstrate the performance of Dr.HIN in evolving Android malware detection, by comparison with baselines and popular mobile security products.
BibTeX
@inproceedings{hou2021disentangled,
  author = {Shifu Hou and Yujie Fan and Mingxuan Ju and Yanfang Ye and Wenqiang Wan and Kui Wang and Yinming Mei and Qi Xiong and Fudong Shao},
  title = {{Disentangled Representation Learning in Heterogeneous Information Network for Large-scale Android Malware Detection in the COVID-19 Era and Beyond}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  url = {https://openreview.net/forum?id=jNvzBmnx8H},
}
Figure