Better Call Graphs: A New Dataset of Function Call Graphs for Malware Classification
Organizations: University at Buffalo, Buffalo, NY, USA
Abstract
Function call graphs (FCGs) have emerged as a powerful abstraction for malware detection, capturing the behavioral structure of applications beyond surface-level signatures. Their utility in traditional program analysis has been well established, enabling effective classification and analysis of malicious software. In the mobile domain, especially in the Android ecosystem, FCG-based malware classification is particularly critical due to the platform's widespread adoption and the complex, component-based structure of Android apps. However, progress in this direction is hindered by the lack of large-scale, high-quality Android-specific FCG datasets. Existing datasets are often outdated, dominated by small or redundant graphs resulting from app repackaging, and fail to reflect the diversity of real-world malware. These limitations lead to overfitting and unreliable evaluation of graph-based classification methods. To address this gap, we introduce Better Call Graphs (BCG), a comprehensive dataset of large and unique FCGs extracted from recent Android application packages (APKs). BCG includes both benign and malicious samples spanning various families and types, along with graph-level features for each APK. Through extensive experiments using baseline classifiers, we demonstrate the necessity and value of BCG compared to existing datasets. BCG is publicly available at https://erdemub.github.io/BCG-dataset.
Figures & tables
| Dataset | # APKs | Collection Period | # Types | Family Info. |
| Drebin | 5,560 | 2010-2012 | N/A | Yes (179, no benign) |
| AndroZoo | 25M | Dynamic | N/A | No |
| CICAndMal2017 | 10,854 | 2015-2017 | 5 | No |
| CICMalDroid | 17,341 | 2018 | 5 | No |
| MalNet | 1.2M | 2006-2021 | 47 | Yes (696) |
| MalNet-Tiny | 5,000 | 2006-2021 | 5 | Yes (5) |
| Final Label | # Graphs | # Fam. | #Nodes | #Edges | ||||||
| Min | Mean | Max | Std | Min | Mean | Max | Std | |||
| benign | 5986 | 1 | 108 | 30.4K | 59.7K | 12.4K | 120 | 64.6K | 190.2K | 28.8K |
| trojan | 1757 | 90 | 101 | 22.7K | 59.5K | 13.5K | 109 | 50.5K | 143.2K | 31.0K |
| adware | 1438 | 98 | 101 | 22.1K | 58.7K | 13.0K | 110 | 49.0K | 159.9K | 30.6K |
| adware++trojan | 318 | 55 | 107 | 22.6K | 59.4K | 13.6K | 110 | 50.3K | 166.6K | 31.5K |
| trojan++riskware | 157 | 26 | 112 | 20.1K | 50.7K | 11.8K | 116 | 43.8K | 117.8K | 26.7K |
| Feature | Description |
| APK size | The size of the APK file in bytes. |
| DEX size | The size of the Dex file in bytes. |
| App name | The application name of the APK. |
| Package name | The unique package name of the APK. |
| App permissions | The list of permissions requested by the app, indicating the resources and data the app needs access to. |
| App main activity | The main activity of the app and entry point when users launch the app. |
| Method | Accuracy | Macro-F1 | ||||||||
| MT | MT* | CMD | CMD* | BCG | MT | MT* | CMD | CMD* | BCG | |
| LDP | 86.6 0.7 | 77.9 1.0 | 92.2 0.1 | 87.3 0.3 | 75.2 0.4 | 86.7 0.7 | 78.9 1.0 | 91.6 0.1 | 81.8 0.3 | 18.3 0.7 |
| AF | 78.8 0.6 | 74.8 1.0 | 90.8 0.2 | 85.0 0.8 | 74.8 0.3 | 78.7 0.6 | 70.6 1.2 | 89.7 0.0 | 78.1 1.2 | 11.9 0.6 |
| GF | 80.5 0.7 | 66.8 0.8 | 89.9 0.2 | 82.3 0.1 | 70.5 0.3 | 80.6 0.7 | 69.0 0.8 | 88.6 0.2 | 74.6 0.3 | 14.9 0.3 |
| AF+GF | 88.3 0.0 | 82.9 0.5 | 92.6 0.2 | 86.9 0.4 | 76.9 0.3 | 88.3 0.0 | 82.7 0.5 | 91.9 0.2 | 80.4 0.6 | 12.2 0.4 |
| LDP+AF+GF | 89.6 0.5 | 83.8 0.5 | 93.0 0.2 | 88.1 0.3 | 77.1 0.5 | 89.6 0.6 | 83.9 0.0 | 92.5 0.2 | 82.5 0.6 | 18.8 1.2 |
| Dataset | Raw LDP | GCN | GIN | GraphSAGE |
| BCG (26 Types) | ||||
| MalNet-Tiny (5 Types) |
| Method | Accuracy | Macro-F1 | Precision | Recall |
| LDP | 75.4 0.37 | 19.4 0.85 | 25.6 1.01 | 17.8 0.83 |
| AF | 76.6 0.19 | 16.0 0.50 | 21.8 0.75 | 14.7 0.62 |
| GF | 72.1 0.55 | 14.9 1.26 | 17.1 1.71 | 14.6 1.18 |
| AF + GF | 79.6 0.21 | 19.7 0.37 | 30.9 0.65 | 16.7 0.33 |
| LDP+AF+ GF | 79.9 0.28 | 21.5 1.01 | 33.1 1.40 | 18.0 0.91 |
| GCN | 63.6 9.60 | 1.16 0.30 | 1.05 0.30 | 1.23 0.40 |
| Method | Accuracy | Macro-F1 | ||
| Random split | Time-based split | Random split | Time-based split | |
| LDP | 75.24 0.43 | 59.39 1.54 | 18.32 0.65 | 5.60 0.13 |
| AF | 74.84 0.32 | 51.82 0.96 | 11.89 0.62 | 4.18 0.27 |
| GF | 70.47 0.26 | 54.55 0.66 | 14.85 0.34 | 4.73 0.16 |
| AF + GF | 76.94 0.27 | 55.62 0.73 | 12.23 0.41 | 4.93 0.19 |
| LDP + AF + GF | 77.14 0.53 | 60.41 1.18 | 18.80 1.21 | 5.86 0.21 |
| Method | Accuracy | Macro-F1 | ||
| BCG first half | BCG second half | BCG first half | BCG second half | |
| LDP | 87.63 0.21 | 63.39 0.40 | 18.82 0.31 | 16.34 0.08 |
| AF | 89.62 0.23 | 62.69 0.47 | 14.52 0.66 | 11.23 2.45 |
| GF | 87.19 0.34 | 55.82 0.35 | 19.96 1.04 | 13.09 0.68 |
| AF + GF | 89.81 0.29 | 65.63 0.35 | 14.53 0.54 | 14.18 1.77 |
| LDP + AF + GF | 89.75 0.24 | 66.65 0.62 | 19.77 3.21 | 16.32 0.34 |
| Type/ Year | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 |
| benign | 3 | 5 | 1 | 2 | 3897 | 1381 | 252 | 194 | 251 |
| trojan | 1 | 19 | 16 | 19 | 30 | 1314 | 302 | 44 | 12 |
| adware | 4 | 37 | 26 | 21 | 17 | 988 | 315 | 26 | 4 |
| adware++trojan | 0 | 8 | 4 | 5 | 0 | 229 | 58 | 4 | 10 |
| trojan++riskware | 0 | 1 | 0 | 2 | 2 | 130 | 19 | 2 | 1 |
| adware++addisplay | 0 | 5 | 7 | 4 | 1 | 62 | 2 | 0 | 0 |
| Family/ Year | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 |
| presenoker | 0 | 9 | 6 | 6 | 5 | 406 | 11 | 0 | 0 |
| smsreg | 0 | 2 | 0 | 2 | 3 | 353 | 63 | 2 | 1 |
| hqwar | 0 | 1 | 0 | 0 | 0 | 172 | 4 | 1 | 0 |
| kuguo | 1 | 8 | 16 | 6 | 1 | 104 | 9 | 0 | 0 |
| ewind | 0 | 2 | 0 | 1 | 0 | 93 | 13 | 0 | 0 |
| igexin | 0 | 9 | 7 | 7 | 0 | 56 | 20 | 0 | 0 |
| Type | Time-based split | First half | Second half | ||||||
| Train | Val | Test | Train | Val | Test | Train | Val | Test | |
| benign | 4,569 | 307 | 1,110 | 3,010 | 424 | 854 | 1,196 | 173 | 329 |
| trojan | 1,086 | 308 | 363 | 216 | 33 | 57 | 1,000 | 159 | 292 |
| adware | 829 | 264 | 345 | 168 | 27 | 68 | 811 | 114 | 250 |
| adware++trojan | 187 | 59 | 72 | 49 | 7 | 5 | 193 | 18 | 46 |
| trojan++riskware | 108 | 27 | 22 | 21 | 3 | 7 | 86 | 13 | 27 |
| Unique Type | Description |
| adware | Displays unsolicited advertisements to users, often bundled with legitimate apps to generate revenue. |
| addisplay | Aggressively forces advertisement display, including pop-ups and overlays, disrupting normal app usage. |
| backdoor | Allows attackers remote access to a device, enabling unauthorized control or data theft. |
| banker | Focuses on stealing banking credentials by logging input during online transactions. |
| clicker | Simulates user interactions like ad clicks to fraudulently generate ad revenue. |
| downloader | Downloads and installs additional malicious payloads or components from the internet. |
| Family | Description |
| presenoker | Known for aggressive adware behavior and unauthorized promotion of apps without user consent. |
| smsreg | Abuses SMS functionality to send premium messages or register users for paid services without their knowledge. |
| hqwar | A trojan family that may perform hidden operations like unauthorized data collection or command execution. |
| kuguo | Adware often bundled with games and apps, designed to display intrusive advertisements. |
| ewind | Disguises itself as legitimate software to install additional payloads and track user behavior. |
| igexin | Embeds backdoor components into applications to collect sensitive data and connect to remote servers. |
| Feature | Description |
| Num Nodes | Number of nodes in the FCG. |
| Num Edges | Number of edges in the FCG. |
| Node degree | Degree of the nodes in the FCG. |
| Selfloop | Number of self-loops in the FCG. |
| Indegree | Indegree of the nodes in the FCG. |
| Closeness | Closeness centrality of the nodes in the FCG. |
Malware Classification
Malware classification uses features of files, apps, and behavior to identify malicious code and assign it to families or types.
See all 47 papers