While deep neural networks get all the headlines for being "fooled" by adversarial examples, tree ensembles—the ubiquitous workhorses of industry—are often even more brittle. In security-critical machine learning applications like spam filtering or malware detection, "evasion" is the name of the game. An attacker wants to find the smallest possible change to an input (a "perturbation") that flips the classifier's prediction.
Most research into these adversarial examples focuses on differentiable models like Deep Neural Networks (DNNs), where one can simply follow the gradient to find a weakness. However, tree-based models like Random Forests and Gradient Boosted Trees are non-differentiable and discontinuous. You can't "slope" your way to an evasion because the model's decision surface consists of discrete steps. This raises a critical question: Are tree ensembles naturally more robust because they are harder to optimize against, or are they actually brittle structures waiting to be shattered?
This paper introduces a rigorous framework using Mixed Integer Linear Programming (MILP) to find optimal attacks and a novel "Adversarial Boosting" technique to harden these models against evasion without sacrificing accuracy.
Methods: Breaking and Fixing the Models
The authors tackle the problem from two angles: breaking the models (evasion) and fixing them (hardening).
- Optimal Evasion (The MILP Approach): To find the absolute "nearest" evading instance, the authors translate the entire tree ensemble into a Mixed Integer Linear Program (MILP). By representing tree splits as logical constraints and leaf values as variables, they can use off-the-shelf solvers to find the mathematically optimal perturbation for various distance metrics ($L_0, L_1, L_2, L_\infty$).
- Approximate Evasion (Symbolic Prediction): Since MILP can be computationally expensive, they developed a faster greedy algorithm called Symbolic Prediction. This method performs a coordinate descent by efficiently calculating "finite differences" across the trees, allowing them to generate millions of adversarial examples quickly.
- Hardening (Adversarial Boosting): To make models tougher, the authors propose Adversarial Boosting. During each round of gradient boosting, they don't just train on the original data; they use their Symbolic Prediction algorithm to generate "budgeted" adversarial versions of every training point and add them to the dataset.
Datasets
The primary benchmark used is the MNIST handwritten digit dataset. Specifically, the authors focus on a binary classification task: distinguishing between the digits "2" and "6".
- Training set: 11,876 images.
- Testing set: 1,990 images.
- Evaluation set: 100 instances correctly classified by all benchmarked models to ensure a fair "starting point" for evasion.
Key Insights and Results
Despite their high accuracy and non-linear nature, standard Boosted Decision Trees (BDT) and Random Forests (RF) were found to be surprisingly brittle. They ranked lower in robustness than even simple Logistic Regression or 3-layer DNNs. Because trees make hard splits on features, a tiny change in a single pixel can sometimes trigger a cascade of different paths through the ensemble, leading to a completely different classification (the "discontinuity trap").
By forcing the model to "see" its own weaknesses during training, Adversarial Boosting successfully created a hardened model (BDT-R) that was significantly more robust than a classic RBF-SVM, which was previously considered one of the tougher models to evade.
- Robustness Ranking: In the $L_0$ (Hamming distance) metric, standard BDTs required a median perturbation of only ~12 pixels to flip a prediction. In contrast, the hardened BDT-R required ~35 pixels, outperforming the RBF-SVM (~25 pixels).
- The Robustness Trade-off: Interestingly, hardening a model against $L_0$ perturbations (changing a few pixels by any amount) actually made the model more sensitive to $L_1$ and $L_2$ perturbations (changing many pixels by a tiny amount). Robustness isn't a single number; it depends heavily on the specific distance metric evaluated.
- No Accuracy Penalty: The hardened model (BDT-R) achieved a 0.20% test error, matching or slightly exceeding the accuracy of the standard, non-hardened models.
- Computational Efficiency: While the MILP solver could take over a day to find an optimal solution for complex hardened models, the Symbolic Prediction algorithm was fast enough to generate 11 million synthetic adversarial instances during the training process.
Limitations and Future Work
The "cat-and-mouse" norm problem remains a significant hurdle: hardening against one type of attack (like $L_0$) can weaken the model against others ($L_2$). A truly "universal" hardening technique remains elusive. Furthermore, while the MILP approach is highly effective for MNIST-sized problems, it is NP-complete. Finding optimal evasions for massive ensembles on high-dimensional data (like 4K video or complex malware features) may remain computationally prohibitive. Future work should investigate if Adversarial Boosting succeeds across a wider variety of datasets, particularly in domains where features are not as spatially correlated as image pixels.
Summary updated