← Lab /AI/ML

Explainability tools enable evasion of transformer-based malware detectors by swapping function calls

The authors claim their white-box attack using integrated gradients can reliably cause misclassification of a RoBERTa-based malware detector.

AI/ML arXiv 4 Apr 2026 Attack Prototype evidence

Published as “Explainability-Guided Adversarial Attacks on Transformer-Based Malware Detectors Using Control Flow Graphs”

Why it matters

Adversaries can exploit XAI explanations to reliably evade transformer-based malware detectors, indicating that such models may need additional hardening before deployment.

Summary

Explainability-guided white-box attacks on a RoBERTa malware detector can misclassify up to ~100% of samples on a small CFG dataset and about 94% on a large real-world dataset, but success drops to around 70% when the model is trained on the larger set. The attack iteratively replaces high-attribution function calls with synthetic imports using Integrated Gradients, and the evidence shows high success rates on small data but noticeably lower efficacy on larger data. The paper provides concrete success-rate numbers, but also notes practical challenges in turning the modified CFG back into a functional executable.

What they found 3

  1. On the small dataset the single-iteration attack achieves an average general success rate of 87.72%

    “The worst-performing attack for the small dataset was the single-iteration attack with an average sg of 87.72%.”

  2. When trained on the large dataset the best attack (3 iterations) reaches an average general success rate of 69.88%

    “The best performing attack was using 3 iterations, with an average general success rate of 69.88%.”

  3. Excluding unimprovable samples, success rates rise to above 95% even on the large dataset

    “Again, excluding unimprovable samples, we see the success rate increase to as high as 97%.”

Caveats 3

  • Attack efficacy drops markedly on the larger dataset, with the overall success rate falling to around 61-70% compared to near-100% on the small dataset
  • While converting an adversarial sequence of function calls back into an executable program may be difficult to achieve, it is theoretically possible given the correct toolkit.
  • The practicality of this endeavor may become more difficult if a large number of functions have to be moved to external files, which could lead to broken dependencies.

What’s new here 4

  • Uses integrated-gradients explanations to select function calls for perturbation in a transformer-based malware detector
  • Applies a multi-iteration word-level replacement attack on CFG-derived token sequences
  • Evaluates the attack on both a small (≈9 k samples) and a large (≈148 k samples) Windows PE dataset
  • Shows that even high-accuracy RoBERTa models remain vulnerable to explainability-driven evasion