[论文解读] An Efficient Adversarial Attack for Tree Ensembles
本文提出 LT-Attack,一种针对 XGBoost 和随机森林等树集成模型的新型离散搜索对抗攻击方法,将攻击问题重新表述为在汉明距离-1 邻域内优化叶节点元组以寻找最小扰动。该方法相比 MILP 实现高达 80,000 倍的加速,且生成的扰动小于基于决策的攻击方法,为评估树集成模型的鲁棒性提供了一个实用基准。
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.
研究动机与目标
- 为解决树模型(如 GBDT 和随机森林)缺乏高效、高质量的对抗攻击方法的问题。
- 克服基于梯度和基于决策的攻击方法在非可微、分段常数树模型上的局限性。
- 开发一种实用且可扩展的方法,以最小化对抗扰动,同时利用树集成模型的离散结构。
- 提供一种用于评估树集成模型鲁棒性的基准工具,类似于神经网络中的 FGSM 或 PGD。
提出的方法
- 将连续输入空间转换为离散的 {1,2,...,N}^K 叶节点元组空间,其中 N 为每棵树的叶节点数,K 为树的数量。
- 将输入之间的距离定义为其叶节点元组之间的汉明距离,从而支持离散优化。
- 通过将叶节点元组移动到汉明距离 1 以内的最佳邻近元组,迭代改进对抗样本。
- 采用贪心策略探索邻域空间,利用树预测之间的独立性。
- 在确保误分类的前提下,优化最小 ℓp(p=1,2,∞)范数扰动。
- 采用避免梯度计算和数值估计的离散搜索框架,使其高效且有效。
实验结果
研究问题
- RQ1基于离散搜索的方法是否能在效率和扰动质量方面超越现有的基于梯度和基于决策的攻击方法?
- RQ2是否可以通过在离散叶节点元组空间上使用轻量级贪心算法,实现树集成模型的近似最优对抗样本?
- RQ3与基于 MILP 的精确求解器和基于决策的黑盒攻击相比,该方法在速度和扰动大小方面表现如何?
- RQ4该方法是否可推广至不同复杂度和规模的树集成模型与数据集?
- RQ5初始样本数量对攻击质量与效率有何影响?
主要发现
- 在 HIGGS 等大型模型上,LT-Attack 相比 MILP 实现高达 80,000 倍的加速,每测试样本耗时仅 0.237 秒,而 MILP 需 375 秒。
- 在 MNIST 上,LT-Attack 生成的 ℓ∞ 扰动仅比最优 MILP 解大 2.07 倍,但速度比 MILP 快 1,580 倍。
- 对于 ℓ2 范数,LT-Attack 在 9 个数据集中的 7 个达到 ¯r/r∗ 比值为 1.00,表明扰动质量接近最优。
- 在 Fashion-MNIST 上,LT-Attack 的 ℓ2 扰动为最优值的 1.33 倍(HSJA 为 2.15 倍,Cube 为 4.59 倍),且相比 MILP 加速 93 倍。
- 该方法在所有数据集上均保持了紧密的扰动大小边界,即使在大型模型(如 covtype 和 HIGGS)上,ℓ2 比值也接近 1.00。
- 运行时分析表明,LT-Attack 在所有数据集上均显著快于 SignOPT、HSJA 和 Cube,加速比范围从 14 倍到 80,000 倍不等。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。