[Paper Review] An Efficient Adversarial Attack for Tree Ensembles
This paper proposes LT-Attack, a novel discrete search-based adversarial attack for tree ensembles like XGBoost and random forests, which reformulates the attack as optimizing a leaf tuple within Hamming distance-1 neighborhoods to find minimal perturbations. It achieves up to 80,000x speedup over MILP and produces smaller perturbations than decision-based attacks, offering a practical benchmark for evaluating tree ensemble robustness.
We study the problem of efficient adversarial attacks on tree based ensembles such as gradient boosting decision trees (GBDTs) and random forests (RFs). Since these models are non-continuous step functions and gradient does not exist, most existing efficient adversarial attacks are not applicable. Although decision-based black-box attacks can be applied, they cannot utilize the special structure of trees. In our work, we transform the attack problem into a discrete search problem specially designed for tree ensembles, where the goal is to find a valid "leaf tuple" that leads to mis-classification while having the shortest distance to the original input. With this formulation, we show that a simple yet effective greedy algorithm can be applied to iteratively optimize the adversarial example by moving the leaf tuple to its neighborhood within hamming distance 1. Experimental results on several large GBDT and RF models with up to hundreds of trees demonstrate that our method can be thousands of times faster than the previous mixed-integer linear programming (MILP) based approach, while also providing smaller (better) adversarial examples than decision-based black-box attacks on general $\ell_p$ ($p=1, 2, \infty$) norm perturbations. Our code is available at https://github.com/chong-z/tree-ensemble-attack.
Motivation & Objective
- To address the lack of efficient, high-quality adversarial attack methods for tree-based ensembles such as GBDTs and random forests.
- To overcome the limitations of gradient-based and decision-based attacks on non-differentiable, piecewise-constant tree models.
- To develop a practical, scalable method that finds minimal adversarial perturbations while leveraging the discrete structure of tree ensembles.
- To provide a benchmark tool for evaluating the robustness of tree ensemble models, analogous to FGSM or PGD for neural networks.
Proposed method
- Transforms the continuous input space into a discrete {1,2,...,N}^K leaf tuple space, where N is leaves per tree and K is number of trees.
- Defines the distance between inputs as the Hamming distance between their leaf tuples, enabling discrete optimization.
- Iteratively improves the adversarial example by moving the leaf tuple to the best neighboring tuple within Hamming distance 1.
- Uses a greedy strategy to explore the neighborhood space, exploiting the independence of tree predictions.
- Optimizes for minimal ℓp (p=1,2,∞) norm perturbations while ensuring misclassification.
- Employs a discrete search framework that avoids gradient computation and numerical estimation, making it efficient and effective.
Experimental results
Research questions
- RQ1Can a discrete search-based method outperform existing gradient-based and decision-based attacks in efficiency and perturbation quality for tree ensembles?
- RQ2Is it possible to achieve near-optimal adversarial examples for tree ensembles using a lightweight, greedy algorithm on a discrete leaf tuple space?
- RQ3How does the proposed method compare in speed and perturbation size to MILP-based exact solvers and decision-based black-box attacks?
- RQ4Can the method be generalized across diverse tree ensemble models and datasets with varying complexity and size?
- RQ5What is the impact of initial example count on the quality and efficiency of the attack?
Key findings
- LT-Attack achieves up to 80,000x speedup over MILP on large models like HIGGS, with 0.237 seconds per test example compared to MILP’s 375 seconds.
- On MNIST, LT-Attack produces ℓ∞ perturbations only 2.07x larger than the optimal MILP solution, while being 1,580x faster than MILP.
- For ℓ2 norm, LT-Attack achieves a ¯r/r∗ ratio of 1.00 on 7 out of 9 datasets, indicating near-optimal perturbation quality.
- On Fashion-MNIST, LT-Attack achieves 1.33x the optimal ℓ2 perturbation (vs. 2.15x for HSJA and 4.59x for Cube), with 93x speedup over MILP.
- The method maintains tight bounds on perturbation size across all datasets, with ℓ2 ratios close to 1.00 even on large models like covtype and HIGGS.
- Runtime analysis shows that LT-Attack is consistently faster than SignOPT, HSJA, and Cube across all datasets, with speedups ranging from 14x to 80,000x.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.