Threat Models and Notation
Adversarial attack を評価するときは、まず threat model を明示する必要があります。Threat model とは、攻撃者が何を知っていて、何を変更でき、何を成功と見なすかを定める条件です。これを曖昧にすると、防御の強さを比較できません。
基本記法
Classifier 、logit 、loss を考えます。
Untargeted attack は、正解 class での loss を最大化します。
Targeted attack は、target class に分類させるため、target loss を最小化します。
または、target class の logit を他 class より大きくする margin objective を使います。
Perturbation set
もっともよく使われる constraint は ball です。
| Norm | 意味 | 典型的な攻撃 |
|---|---|---|
| 各 pixel の最大変化量を制限 | FGSM、PGD | |
| 全体の Euclidean distance を制限 | DeepFool、CW 、randomized smoothing | |
| 変更する feature 数を制限 | JSMA、one-pixel attack | |
| Spatial / patch | 位置、変形、貼り紙を制限 | physical attack、adversarial patch |
画像では のような 制約がよく使われますが、これは domain と preprocessing に強く依存します。
攻撃者の知識
| Setting | 攻撃者が知るもの | 代表 method |
|---|---|---|
| White-box | model architecture、weight、gradient、defense | FGSM、PGD、CW、AutoAttack |
| Gray-box | training data や model family の一部 | transfer attack、surrogate attack |
| Black-box score-based | input に対する confidence / logit を query できる | NES、SPSA、Square Attack |
| Black-box decision-based | 最終 label だけを query できる | Boundary Attack、HopSkipJump |
防御を評価するときは、white-box adaptive attack がもっとも重要です。防御を知らない攻撃だけで強いと主張すると、gradient masking を robustness と誤認する危険があります。
成功条件
Untargeted success は、予測が変わることです。
Targeted success は、指定 target class に分類されることです。
Robust accuracy は、各 sample について許容 perturbation 内の攻撃に耐えた割合です。
実際には全探索できないため、強い attack で近似します。
Adaptive attack
Adaptive attack とは、防御手法を知った上で、その防御を含めて最適化する攻撃です。
たとえば、入力変換で防御しているなら、その変換を通した loss を攻撃します。非微分変換なら BPDA、randomized defense なら EOT を使います。
Evaluation protocol
Adversarial robustness の比較では、次を明示します。
- Dataset と preprocessing
- Norm と
- Attack algorithm と iteration 数
- Random restarts 数
- White-box / black-box の違い
- Targeted / untargeted の違い
- Defense を知った adaptive attack かどうか
- Clean accuracy と robust accuracy の両方
数式で見る threat model
Threat model は、攻撃者が選べる perturbation 集合 として定義できます。
画像分類の代表例は norm-bounded perturbation です。
ここで、 は や がよく使われます。 は各 pixel の最大変化量を制限し、 は全体のエネルギーを制限します。
LLM や multimodal model では、perturbation は pixel norm ではなく、prompt rewrite、suffix、tool observation injection、image patch などになります。
この式の気持ちは、「robustness は攻撃者に何を許すかを明確にしないと意味がない」ということです。評価では、norm、query budget、model access、semantic preservation を必ず明記する必要があります。
関連ページ
- Adversarial Robustness Overview
- Adversarial Examples and FGSM
- PGD and Adversarial Training
- Robustness Evaluation
主なソース
- Towards Evaluating the Robustness of Neural Networks: https://arxiv.org/abs/1608.04644
- Towards Deep Learning Models Resistant to Adversarial Attacks: https://arxiv.org/abs/1706.06083
- Obfuscated Gradients Give a False Sense of Security: https://arxiv.org/abs/1802.00420
- AutoAttack: https://arxiv.org/abs/2003.01690