Certified Robustness
Certified robustness は、特定の perturbation set の中では model の予測が変わらないことを数学的に保証する分野です。Empirical robustness が「この attack では破れなかった」という経験的評価であるのに対し、certified robustness は「この radius までは破れない」と証明します。
自作概念図。Randomized smoothing は、入力周辺に Gaussian noise を加えて base classifier の多数決を取り、class probability の差から certified radius を計算します。
Certificate の定義
入力 に対して、半径 の範囲では予測が変わらないことを保証できるとします。
この を certified radius と呼びます。Dataset 上では、ある半径 で certificate を持つ sample の割合を certified accuracy として報告します。
Randomized smoothing
Randomized smoothing は、任意の base classifier から smoothed classifier を作ります。
最も確率が高い class を 、二番目に高い class を とし、確率を 、 とします。このとき、 certified radius は次のように与えられます。
ここで は standard Gaussian CDF の inverse です。 と の差が大きいほど、より大きい radius を certify できます。
Monte Carlo 推定
実際には と は closed-form でわからないため、多数の noise sample で推定します。Certification では統計的 confidence bound を使い、過大評価しないように lower bound / upper bound を計算します。
Bound propagation
Interval Bound Propagation (IBP) は、入力の perturbation interval を layer ごとに伝播し、出力 logit の上限 / 下限を計算します。
入力が にあるとき、linear layer の bound は、 の正負に分けて計算できます。
ここで、、 です。最後に、正解 class の logit lower bound が他 class の upper bound より大きければ certify できます。
Convex relaxation
ReLU network の exact verification は一般に難しいため、ReLU を convex relaxation で緩めて bound を計算する方法があります。CROWN、Fast-Lin、DeepPoly などはこの family に入ります。
Lipschitz bound
Model の Lipschitz constant がわかれば、logit margin から certificate を得られます。
正解 class と他 class の margin が十分大きければ、予測が変わらない半径を下界できます。ただし、tight な Lipschitz bound を得るのは難しいです。
Certified robustness の限界
| 観点 | 内容 |
|---|---|
| Scalability | 大規模 model では verification cost が高い |
| Norm specificity | certificate は patch や spatial attack を保証しない |
| Accuracy trade-off | certificate を強めると clean accuracy が下がる場合がある |
| Tightness | Bound が緩いと、本当は robust でも certify できない |
| Domain | Text や LLM の離散入力では連続 norm certificate が扱いにくい |
数式で見る certified radius
Certified robustness は、「半径 以内の perturbation に対して prediction が変わらない」ことを保証します。
Randomized smoothing では、base classifier に Gaussian noise を加えた smoothed classifier を定義します。
Top class の確率を 、runner-up class の確率を とすると、certified radius は次のように書けます。
この式の気持ちは、「noise を加えても class A が十分に安定して勝つなら、入力の周りの一定半径では class が変わらないと保証できる」というものです。Certified robustness は attack に依存しない保証を与えますが、保証半径や clean accuracy には限界があります。
関連ページ
主なソース
- Certified Adversarial Robustness via Randomized Smoothing: https://arxiv.org/abs/1902.02918
- Provable Defenses against Adversarial Examples via the Convex Outer Adversarial Polytope: https://arxiv.org/abs/1711.00851
- Scaling provable adversarial defenses: https://arxiv.org/abs/1805.12514
- CROWN: https://arxiv.org/abs/1811.00866
- On the Effectiveness of Interval Bound Propagation: https://arxiv.org/abs/1810.12715