Successfully reported this slideshow.
Your SlideShare is downloading. ×

PoisoningAttackSVM (ICMLreading2012)

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
FOBOS
FOBOS
Loading in …3
×

Check these out next

1 of 26 Ad

More Related Content

Slideshows for you (20)

Viewers also liked (16)

Advertisement

Similar to PoisoningAttackSVM (ICMLreading2012) (20)

Advertisement

Recently uploaded (20)

PoisoningAttackSVM (ICMLreading2012)

  1. 1. Poisoning Attacks against Support Vector Machines ICML読み会 2012/07/28 Hidekazu Oiwa (@kisa12012) oiwa (at) r.dl.itc.u-tokyo.ac.jp 12年7月28日土曜日 1
  2. 2. 読む論文 • Poisoning Attacks against Support Vector Machines • Battista Biggio (Itary), Blaine Nelson, Pavel Laskov (German) • http://icml.cc/2012/papers/880.pdf (論文) • http://www.slideshare.net/pragroup/battista- biggio-icml2012-poisoning-attacks-against- support-vector-machines (スライド) • 第一著者がDr. Laskovの元へ約半年visitingしてた時の論文 • Adversarial Classificationの研究者 12年7月28日土曜日 2
  3. 3. 目次 • 研究の概要 • Poisoning Attacksとは? • 問題設定 • 提案アルゴリズム • Poisoning Attacks against SVMs • カーネルSVMへの拡張 • 実験 • 人工データ実験 • 手書き文字認識実験 12年7月28日土曜日 3
  4. 4. 研究概要 12年7月28日土曜日 4
  5. 5. 背景 • (大規模)機械学習流行中 • Malicious Behavior : 悪意あるエージェントの行動 • 分類器や異常検知器を混乱させる様に動く • Ex. スパムフィルタリング・マルウェア解析 • 目標:Malicious Behaviorに頑健なアルゴリズム • そのためには… • Malicious Behaviorの性質の分析が求められる 12年7月28日土曜日 5
  6. 6. Malicious Behaviorの分類 [Barreno+ ML10] • Causative Attack • 設計者が持っている訓練データを直接操作,書き換え • Exploratory Attack • 設計者が持っている分類器を直接操作,書き換え • これらに対応したアルゴリズムは,すでに複数提案されている • Poisoning Attack • 設計者の訓練データに新しく悪性データを注入 • 他の手法と比べて,より現実的な攻撃方法 • 設計者のデータベースを直接弄る必要がないため • 異常検知系の先行研究しかない [Kloft+ AISTATS10]+ 12年7月28日土曜日 6
  7. 7. Poisoning Attack 訓練データ SVM 12年7月28日土曜日 7
  8. 8. Poisoning Attack 訓練データ SVM 12年7月28日土曜日 7
  9. 9. Poisoning Attack 訓練データ SVM 性能劣化 12年7月28日土曜日 7
  10. 10. 問題設定 設計者 攻撃者 training set validation set n m Dtr = {xi , yi }i=1 Dval = {xk , yk }k=1 悪性データ (xc , yc ) yc は予め固定 SVMは悪性データを含めた Validation Setに対する分類性能を training setから学習 一番押し下げる xc を生成 12年7月28日土曜日 8
  11. 11. 本研究の概要 • SVMへのPoisoning Attacksの解析 • 悪性データ作成アルゴリズムの提案 • Incremental SVM • カーネル拡張 • 人工データ実験 • 手書き文字認識データ実験 12年7月28日土曜日 9
  12. 12. 提案アルゴリズム 12年7月28日土曜日 10
  13. 13. 最適化問題 X X max L(xc ) = [1 yk fxc (xk )]+ = gk (xc ) xc k k • Validation Setにおける損失を最大化 • fx (·) : 悪性データ込みで学習されたSVM c • 非凸な最適化問題 0 xc = xc + t · u • 解法:Gradient Ascent u / rL(xc ) • SVMの更新と悪性データの更新を繰り返す • ステップ幅を適切に設定すれば局所最適解に収束 12年7月28日土曜日 11
  14. 14. アルゴリズムの概要 Poisoning Attacks against SVMs Algorithm 1 Poisoning attack against SVM 3.1. Artificial data Input: Dtr , the training data; Dval , the validation (0) data; yc , the class label of the attack point; xc , the 初期点は,既存データ We first consider a two-dimensional da model in which each class follows a G initial attack point; t, the step size. のラベルをflipして作成 bution with mean and covariance mat Output: xc , the final attack point. µ = [ 1.5, 0], µ+ = [1.5, 0], ⌃ = 1: {↵i , b} learn an SVM on Dtr . The points from the negative distributio 2: k 0. the label 1 (shown as red in the subse 3: repeat and otherwise +1 (shown as blue). Th (p) 4: Re-compute the SVM solution on Dtr [{xc , yc } the validation sets, Dtr and Dval (consis using incremental SVM (e.g., Cauwenberghs & SVMの更新 500 points per class, respectively) are ra Poggio, 2001). This step requires {↵i , b}. from this distribution. 5: Compute @L on Dval according to Eq. (10). 6: @u Set u to a unit vector aligned with @L . 勾配を算出 In the experiment presented below, the r (p) (p 1) @u attacking class. To this end, a random 7: k k⇣ 1 and xc⇣ + ⌘ xc⌘ + tu blue class is selected and its label is fli (p) (p 1) 8: until L xc L xc <✏ 悪性データの更新 as the starting point for our method. 9: return: xc = xc (p) ascent method is then used to refine t til its termination condition is satisfied. from [Biggio+ 12] trajectory is traced as the black line in F 12年7月28日土曜日 the linear kernel (upper two plots) and 12
  15. 15. SVMの更新 • Incremental SVM [Cauwenberghs+ NIPS00] • 1つずつデータを追加しながらSVMを学習 • 全データの役割が不変な範囲の最適化問題を反復的に解く • Reserve Point / Support Vector / Error Vector • 条件を破らないと収束しない場 W W W 合,データの役割を変更 gi=0 gi>0 gi<0 • 各最適化時には,サポートベク αi=0 xi C αi xi C αi=C ターのパラメータのみが更新 xi • データが追加されるたびに,全 support vector error vector パラメータが収束するまで最適 Figure 1: Soft-margin classification SVM training. from [Cauwenberghs+ NIPS00] 化すれば,SVMの最適解に収束 coefficients are obtained by minimizing a convex quadratic objective func constraints [12] 12年7月28日土曜日 13
  16. 16. 最適化問題の勾配計算 • Incremental SVMのアイデアを用いる Poisoning Attacks against SVMs product rule: • 更新時に各データの役割が変動しない仮定を置く inverted matrix are independent of x , we obtain: c @b • サポートベクターのみに着目すれば良い @↵ = 1 ↵ (Qc ss 1 )· @Q > sc + yk , (3) @u ⇣ @u @u • 更新式はカーネル関数に依存 @b = 1 ↵ c· @Q > . sc (9) @u ⇣ @u • 厳密な計算には,条件を破らないステップ幅の導出が必要 Substituting (9) into (3) and further into (1), we obtain @Qkc @b il. , @u @u . • 本研究では定数ステップ幅で値を更新,計算をサボる the desired gradient used for optimizing our attack: @L X⇢ m @Qsc @Qkc = Mk + ↵c , (10) @u @u @u can be further re- k=1 taken in direction where VM solution. This ate condition using 1 Mk = (Qks (Qss1 T ) + yk T ). enberghs & Poggio, ⇣ from [Biggio+ 12] oint in the training 12年7月28日土曜日 14
  17. 17. 実験 12年7月28日土曜日 15
  18. 18. 人工データ実験 Poisoning Attacks against SVMs mean Σi ξi (hinge loss) classification error 5 5 0.06 0.16 0.14 0.05 0.12 0.04 線形 0 0.1 0.08 0 0.03 カーネル 0.06 0.04 0.02 0.01 0.02 −5 0 −5 −5 0 5 −5 0 5 mean Σi ξi (hinge loss) classification error 5 5 0.145 0.14 0.035 RBF 0.135 0.13 0.03 0 0 カーネル 0.125 0.12 0.025 0.115 −5 0.11 −5 0.02 −5 0 5 −5 0 5 from [Biggio+ 12] 12年7月28日土曜日 16
  19. 19. 手書き文字認識 実験設定 MNIST 実験データ ( 7 vs. 1; 9 vs. 8; 4 vs. 0) 線形カーネル SVM C=1 training set 100 validation set 500 12年7月28日土曜日 17
  20. 20. 手書き文字認識 実験結果 (7 vs. 1) Poisoning Attacks against SVMs Before attack (7 vs 1) After attack (7 vs 1) classification error 0.4 validation error 5 5 0.3 testing error 10 10 15 15 0.2 20 20 0.1 25 25 0 5 10 15 20 25 5 10 15 20 25 0 200 400 number of iterations ラベルは1 from [Biggio+ 12] Before attack (9 vs 8) After attack (9 vs 8) classification error 0.4 validation error 5 5 0.3 testing error 10 10 15 12年7月28日土曜日 15 0.2 18
  21. 21. Before attack (7 vs 1) After attack (7 vs 1) classification error 0.4 5 10 手書き文字認識 5 10 0.3 validation error testing error 0.2 実験結果 (8 vs. 9) 15 15 20 20 0.1 25 25 0 5 10 15 20 25 5 10 15 20 25 0 200 400 number of iterations Before attack (9 vs 8) After attack (9 vs 8) classification error 0.4 validation error 5 5 0.3 testing error 10 10 15 15 0.2 20 20 0.1 25 25 0 5 10 15 20 25 5 10 15 20 25 0 200 400 number of iterations ラベルは8 from [Biggio+ 12] Before attack (4 vs 0) After attack (4 vs 0) classification error 0.4 validation error 5 5 0.3 testing error 10 10 15 12年7月28日土曜日 15 0.2 19
  22. 22. Before attack (9 vs 8) After attack (9 vs 8) classification error 0.4 5 10 手書き文字認識 5 10 0.3 validation error testing error 実験結果 (4 vs. 0) 15 15 0.2 20 20 0.1 25 25 0 5 10 15 20 25 5 10 15 20 25 0 200 400 number of iterations Before attack (4 vs 0) After attack (4 vs 0) classification error 0.4 validation error 5 5 0.3 testing error 10 10 15 15 0.2 20 20 0.1 25 25 0 5 10 15 20 25 5 10 15 20 25 0 200 400 number of iterations ラベルは0 from [Biggio+ 12] Modifications to the initial (mislabeled) attack point performed by the proposed attack strategy, for d two-class problems from the MNIST data set. The increase in validation and testing errors across is also reported. 12年7月28日土曜日 20
  23. 23. 実験結果から • 悪性データがラベルクラスの性質を取り込んだデータに変化 • 7の下部が1の横棒に似た形になるなど • 1データで,15-20%のエラー率向上を達成 • 初期点では2-5% • その後のデータ改良にて,上記のエラー率を達成 • アルゴリズムの有効性を示した形に • training dataの数を増やした時は,もっと性能は悪いで しょうが… 12年7月28日土曜日 21
  24. 24. 0.25 0.2 0.15 複数データ実験 0.1 0.05 Poisoning Attacks against SVMs 0 0 2 4 6 8 ing manyattack points in training steps. It would be int % of tiny gradient data to investigate a more accurate and e cient co tion of the largest possible step that does not a classification error (7 vs 1) classification error (9 vs 8) 0.4 0.4 structure of the optimal solution. validation error validation error 0.35 testing error 0.35 Anothererror testing direction for research is the simultaneo • mization of multi-point attacks, which we succ 悪性データを一個ずつ追加で入れていった場合の性能推移 0.3 0.3 0.25 approached with sequential single-point attac 0.25 first question is how to optimally perturb a s 0.2 • 0.2 the training data; that is, instead of individua 決定境界に近いデータを初期点に置くと,悪性データ 0.15 0.15 mizing each attack point, one could derive sim 0.1 0.1 ous steps for every attack point to better optim がreserve pointに陥るため,そこで更新がストップ Poisoning Attacks against SVMs 0.05 0.05 overall e↵ect. The second question is how to the best subset of points to use as a startin 0 0 ing many attack points in trainingsteps. It would be interestingof attack points in training datathe latter is a subs for the attack. Generally, 0 2 0 2 4 6 8 % of tiny 4gradient data 6 8 % to investigate a more accurate and e cient computa- tion problem but heuristics may allow for impr tion of the largest possible step that does not alter the proximations. Regardless, we demonstrate th classification error (7 vs 1) structureclassificationoptimal8)solution. of the error (9 vs non-optimal multi-point attack strategies sign classification error (4 vs 0) 0.4 0.4 0.4 validation error validation error degrade the SVM’s performance. validation error 0.35 testing error 0.35 Another direction for research is the simultaneous opti- error testing error 0.35 testing mization of multi-point attacks, which we0.3 An important practical limitation of the p successfully 0.3 0.3 approached with sequential single-point 0.25 method is the assumption that the attacker attacks. The first question is how to optimally perturb a subset of of the injected points. Such assu the labels 0.25 0.25 0.2 0.2 0.2 may not hold when the labels are only assi the training data; that is, instead of individually opti- 0.15 0.15 trusted sources such as humans. For instance, 0.15 mizing each attack point, one could derive simultane- filter uses its users’ labeling of messages as its 0.1 0.1 ous steps for every attack point to better optimize their0.1 truth. Thus, although an attacker can send a 0.05 0.05 overall e↵ect. The second question is how to choose 0.05 messages, he cannot guarantee that they will h the best subset of points to use as a starting point 0 0 0 0 0 labels2 necessary for his attack. This imposes 4 6 8 0 2 4 6 8 for the%attack.4 Generally, the latter is a subset selec-of attack points in training data 2 6 8 % of attack points in training data of attack points in training data ditional requirement that the attack data mus % tion problem but heuristics may allow for improved ap- certain side constraints to fool the labeling orac from [Biggio+ 12] proximations. Regardless, we demonstrate Results of the multi-point, multi-run experiments Figure 3. that even is needed to understand these poten ther work classification error (9 vs 8) non-optimal multi-point0) classification error (4 vs attack strategies MNIST data set. In each plot, we show the clas- on the significantly 0.4 0.4 constraints and to incorporate them into atta validation error degrade the SVM’s performance. sification errors due to poisoning as a function of the per- validation error 0.35 centage of training contamination would bethe incorporate t 0.35 testing error testing error The final extension for both to validation 0.3 An important practical limitation of solid line) and inverse sets (black dashed problem; that (red the proposedtesting feature-mapping line). The world 0.3 12年7月28日土曜日 method is the assumption that the attacker controls of7 finding real-worldmiddle is data t topmost plotproblem is for the vs.1 classifier, the attack for 22 0.25
  25. 25. まとめ • SVMに毒を盛る! • SVMの精度をガタ落ちさせるデータを新しく注入 • 性能を落とすデータの作り方を提案 • 最適化問題は非凸だが,勾配法で解く形に • カーネルSVMにも適用可能 • 手書き文字認識タスクで実験 • たった1データで精度を2割前後落とす事に成功 12年7月28日土曜日 23
  26. 26. Future Work • より効率的,頑健,高速な最適化手法 • カーネル毎でのPoisoning Attackへの耐性評価 • 複数の悪性データを同時に注入可能なケース • データのラベルを攻撃者が固定できないケース • 設計者の人力でラベル付けされる場合等 • ラベル付を誘導するため,入力データに制約が必要 • 現実的には,入力データの人工生成は困難 • 入力ベクトルがbag-of-wordsの場合,それっぽいテキストに 変換可能な結果を返す必要がある 12年7月28日土曜日 24

×