Research Paper:
Adversarial Malware Detection Using Feature Contribution Difference Analysis with Kernel SHAP
Yoshiki Namura*, Tomotaka Kimura*,
, Moto Kamiura**
, and Jun Cheng*

*Graduate School of Science and Engineering, Doshisha University
1-3 Tataramiyakodani, Kyotanabe, Kyoto 610-0394, Japan
Corresponding author
**Institute for Advanced Research and Education, Doshisha University
1-3 Tataramiyakodani, Kyotanabe, Kyoto 610-0394, Japan
Adversarial malware evades machine-learning-based detection by modifying its feature vector while preserving its malicious functionality. As attack methods continue to diversify, learning all possible adversarial patterns using conventional adversarial training has become impractical. However, because adversarial malware must retain its malicious functionality, certain intrinsic characteristics are common across diverse attacks. Based on this observation, we propose a two-stage adversarial malware detection method that leverages explainable artificial intelligence to analyze feature contributions in the prediction process. In the first stage, a neural network classifier performs the initial detection. In the second stage, Kernel SHAP is used to quantify each feature’s contribution to the model’s prediction, and the average contribution difference between benign software and malware is computed. The proposed method assigns higher weights to features with small contribution differences, which tend to exhibit high contributions when malware is present, and computes a maliciousness score to redetect adversarial samples that are misclassified as benign. Experimental results on Android application datasets demonstrate that the proposed method significantly outperforms existing approaches across four representative adversarial attacks (fast gradient sign method, JSMA, Mimicry, and Pointwise) without explicitly learning attack-specific characteristics.
Detecting adversarial malware via SHADE
- [1] A. P. Namanya, A. Cullen, I. U. Awan, and J. P. Disso, “The world of malware: An overview,” 2018 IEEE 6th Int. Conf. on Future Internet of Things and Cloud (FiCloud), pp. 420-427, 2018. https://doi.org/10.1109/ficloud.2018.00067
- [2] J. Singh and J. Singh, “A survey on machine learning-based malware detection in executable files,” J. of Systems Architecture, Vol.112, Article No.101861, 2021. https://doi.org/10.1016/j.sysarc.2020.101861
- [3] B. Yang, Y. Xiao, X. Wang, Z. Cui, and C. Peng, “An intrusion detection model based on afsa-svm for petroleum multi-channel industrial control network communication,” J. Adv. Comput. Intell. Intell. Inform., Vol.29, No.4, pp. 703-710, 2025. https://doi.org/10.20965/jaciii.2025.p0703
- [4] J. Saxe and K. Berlin, “Deep neural network based malware detection using two dimensional binary program features,” 2015 10th Int. Conf. on Malicious and Unwanted Software (MALWARE), pp. 11-20, 2015. https://doi.org/10.1109/malware.2015.7413680
- [5] D. Gibert, J. Planes, C. Mateu, and Q. Le, “Fusing feature engineering and deep learning: A case study for malware classification,” Expert Systems with Applications, Vol.207, Article No.117957, 2022. https://doi.org/10.1016/j.eswa.2022.117957
- [6] K. Grosse, N. Papernot, P. Manoharan, M. Backes, and P. McDaniel, “Adversarial examples for malware detection,” Lecture Notes in Computer Science, pp. 62-79, 2017. https://doi.org/10.1007/978-3-319-66399-9_4
- [7] G. Lan, Z. Gao, L. Tong, and T. Liu, “Class binarization to neuroevolution for multiclass classification,” Neural Computing and Applications, Vol.34, No.22, pp. 19845-19862, 2022. https://doi.org/10.1007/s00521-022-07525-6
- [8] D. Li and Q. Li, “Adversarial deep ensemble: Evasion attacks and defenses for malware detection,” IEEE Trans. on Information Forensics and Security, Vol.15, pp. 3886-3900, 2020. https://doi.org/10.1109/tifs.2020.3003571
- [9] S. M. Lundberg and S.-I. Lee, “A unified approach to interpreting model predictions,” Proc. of the 31st Int. Conf. on Neural Information Processing Systems, 2017.
- [10] Y. Namura, T. Kimura, M. Kamiura, and J. Cheng, “Adversarial malware detection using feature contribution analysis with Kernel SHAP,” Proc. of the 22nd Int. Conf. on Modeling Decisions for AI (MDAI’25), 2025.
- [11] I. A. Saeed, A. Selamat, and A. M. A. Abuagoub, “A survey on malware and malware detection systems,” Int. J. of Computer Applications, Vol.67, No.16, pp. 25-31, 2013. https://doi.org/10.5120/11480-7108
- [12] W. Yuan, H. H. Nguyen, L. Jiang, Y. Chen, J. Zhao, and H. Yu, “Api recommendation for event-driven android application development,” Information and Software Technology, Vol.107, pp. 30-47, 2019. https://doi.org/10.1016/j.infsof.2018.10.010
- [13] A. Hussain, M. Asif, M. B. Ahmad, T. Mahmood, and M. A. Raza, “Malware detection using machine learning algorithms for windows platform,” Lecture Notes in Networks and Systems, pp. 619-632, 2022. https://doi.org/10.1007/978-981-16-7618-5_53
- [14] A. Öztürk and S. Hızal, “Detection and analysis of malicious software using machine learning models,” Sakarya University J. of Computer and Information Sciences, Vol.7, No.2, pp. 264-276, 2024. https://doi.org/10.35377/saucis...1489237
- [15] C. Guo, J. Gardner, Y. You, A. G. Wilson, and K. Weinberger, “Simple black-box adversarial attacks,” Proc. of Int. Conf. on Machine Learning, pp. 2484-2493, 2019.
- [16] I. Goodfellow, J. Shlens, and C. Szegedy, “Explaining and harnessing adversarial examples,” Proc. of Int. Conf. on Learning Representations, 2015.
- [17] N. Srndic and P. Laskov, “Practical evasion of a learning-based classifier: A case study,” 2014 IEEE Symp. on Security and Privacy (SP), pp. 197-211, 2014. https://doi.org/10.1109/sp.2014.20
- [18] Y. Wang, X. Ma, J. Bailey, J. Yi, B. Zhou, and Q. Gu, “On the convergence and robustness of adversarial training,” Proc. of the 36th Int. Conf. on Machine Learning, pp. 6586-6595, 2019.
- [19] A. Shafahi, M. Najibi, M. A. Ghiasi, Z. Xu, J. Dickerson, C. Studer, L. S. Davis, G. Taylor, and T. Goldstein, “Adversarial training for free!” Advances in Neural Information Processing Systems, Vol.32, 2019.
- [20] F. Abramovich and M. Pensky, “Classification with many classes: Challenges and pluses,” J. of Multivariate Analysis, Vol.174, Article No.104536, 2019. https://doi.org/10.1016/j.jmva.2019.104536
- [21] H. Rathore, S. K. Sahay, P. Nikam, and M. Sewak, “Robust android malware detection system against adversarial attacks using Q-learning,” Information Systems Frontiers, Vol.23, No.4, pp. 867-882, 2021. https://doi.org/10.1007/s10796-020-10083-8
- [22] D. Li, S. Cui, Y. Li, J. Xu, F. Xiao, and S. Xu, “Pad: Towards principled adversarial malware detection against evasion attacks,” IEEE Trans. on Dependable and Secure Computing, Vol.21, No.2, pp. 920-936, 2024. https://doi.org/10.1109/tdsc.2023.3265665
- [23] K. Allix, T. F. Bissyandé, J. Klein, and Y. L. Traon, “AndroZoo: Collecting millions of Android apps for the research community,” Proc. of 2016 IEEE/ACM 13th Working Conf. on Mining Software Repositories (MSR), 2016.
- [24] N. Papernot, P. McDaniel, S. Jha, M. Fredrikson, Z. B. Celik, and A. Swami, “The limitations of deep learning in adversarial settings,” 2016 IEEE European Symp. on Security and Privacy (EuroS&P), pp. 372-387, 2016. https://doi.org/10.1109/eurosp.2016.36
This article is published under a Creative Commons Attribution-NoDerivatives 4.0 Internationa License.