← Lab /AI/ML

Gradient-based attacks seem robust on XGBoost yet still cause SHAP explanation drift

Gradient-based black-box attacks achieve near-perfect robustness on XGBoost while inducing notable attribution drift

AI/ML arXiv 2 Jul 2026 Measurement Simulation evidence

Published as “Beyond Gradient-Based Attacks: Adversarial Robustness and Explainability Stability in Cybersecurity Classifiers”

Why it matters

Security analysts should not rely on a single black-box attack to assess tree-based detectors, and must consider explanation stability because attacks can mislead SHAP-based triage even when predictions remain correct.

Summary

The study shows that black-box ZOO attacks dramatically overestimate XGBoost robustness (RI ≈0.98) due to a degeneracy, while Square Attack uncovers true vulnerability with RI as low as 0.36, yielding gaps up to 0.62 across four cybersecurity tabular datasets. It also finds that prediction robustness (RI) can be high while explanation stability (ESI) is low, meaning attacks can destabilise SHAP explanations even when classifications stay correct. Additional contributions include a PGD step-size ablation that explains why FGSM appears stronger than PGD on z-score normalised data, and a black-box adversarial training scheme for tree ensembles. Evidence is based on single-run point estimates from five random seeds on real-world datasets, with modest variance reported for the key gaps.

What they found 3

  1. Square Attack reveals genuine vulnerability of XGBoost with low RI values.

    “Square Attack reveals true vulnerability. Under Square Attack, XGBoost RI drops to 0.362 (Phishing) and 0.299 (UNSW-NB15), yielding ZOO-Square gaps of 0.618 and 0.587 respectively.”

  2. Explanation stability can be poor even when predicted robustness appears high.

    “Prediction robustness vs. explanation stability. Although XGBoost’s RI under ZOO appears high (an artefact of ZOO degeneracy rather than genuine robustness), its ESI is consistently the lowest of the three models across all datasets (0.056-0.111 vs. RF’s 0.140-0.287; all values are point estimates from a single evaluation run).”

  3. PGD underperforms FGSM on z-score normalised tabular data when using the conventional step size.

    “The ablation reveals a monotonic decrease in RI as α increases: PGD becomes progressively stronger as the step size grows, converging toward and eventually surpassing FGSM at α ≥0.05.”

Caveats 7

  • ZOO’s near-degenerate gradient estimates inflate XGBoost RI, contradicting any claim of inherent robustness for that model family.
  • Different query budgets across attacks (e.g., HopSkipJump evaluated on 120 samples vs. 300 for others) make direct RI comparisons non-strict.
  • ESI measurements rely on ZOO-perturbed inputs; a stronger drift-maximising attack could change the RF > XGB ordering.
  • Feature validity. Our attacks apply l∞perturbations independently to each feature, which can violate the dependencies inherent in structured security data.
  • Dataset scope. We evaluate four datasets drawn from three domains... Other important security tasks, notably static and dynamic malware classification and host-based intrusion detection, are not covered.
  • Computational constraints. All experiments run on CPU, which limits attack strength. We cap HopSkipJump at 120 samples, against 300 for the other attacks, and restrict the number of ZOO iterations to keep evaluation tractable.
  • Variance and statistical significance. We ran each experiment across five random seeds... The ZOO degeneracy gap is highly reproducible: std ≤0.035 across all four datasets... ESI is more variable: RF ESI std reaches 0.084-0.101 on low-dimensional datasets.

What’s new here 4

  • Evaluation of tree ensembles (Random Forest and XGBoost) alongside MLPs.
  • Implementation and comparison of three black-box attacks (ZOO, Square Attack, HopSkipJump).
  • Introduction of the Explainability Stability Index (ESI) to quantify SHAP attribution drift.
  • Addition of two new cybersecurity datasets (NF-ToN-IoT and HIKARI-2021) for cross-domain validation.