Notice
Recent Posts
Recent Comments
ยซ   2024/10   ยป
์ผ ์›” ํ™” ์ˆ˜ ๋ชฉ ๊ธˆ ํ† 
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Tags
more
Archives
Today
Total
๊ด€๋ฆฌ ๋ฉ”๋‰ด

Hello Potato World

[ํฌํ…Œ์ดํ†  ์Šคํ„ฐ๋””] Global Surrogate ๋ณธ๋ฌธ

Study๐Ÿฅ”/XAI

[ํฌํ…Œ์ดํ†  ์Šคํ„ฐ๋””] Global Surrogate

Heosuab 2021. 5. 24. 01:06

 

โ‹† ๏ฝก หš โ˜๏ธŽ หš ๏ฝก โ‹† ๏ฝก หš โ˜ฝ หš ๏ฝก โ‹† 

[XAI study_ Interpretable Machine Learning]

 

 

 


5.6 Global Surrogate


 

Global Surrogate Model์ด๋ž€? Black box model์˜ ์˜ˆ์ธก์— ๊ทผ์‚ฌํ•˜๋„๋ก ํ•™์Šต๋œ interpretable model

 

์•„๋ž˜์™€ ๊ฐ™์€ ๋‹ค์–‘ํ•œ ์ด๋ฆ„์œผ๋กœ๋„ ํ†ตํ•œ๋‹ค

Surrogate(๋Œ€์ฒด) Model = Approximation model = metamodel = response surgace model = emulator = ...

  • Blackbox ๋ชจ๋ธ, Surrogate ๋ชจ๋ธ ๋‘˜ ๋‹ค Machine Learning model
  • Blackbox ๋ชจ๋ธ์˜ ์˜ˆ์ธก์— ์ตœ๋Œ€ํ•œ ๊ทผ์‚ฌ
  • Surrogate ๋ชจ๋ธ์€ ํ•ด์„๊ฐ€๋Šฅํ•˜์—ฌ์•ผ ํ•จ

 

 


5.6.1 Theory


 

Black box ์˜ˆ์ธก ํ•จ์ˆ˜๋ฅผ f, ํ•ด์„ ๊ฐ€๋Šฅํ•œ Surrogate model ์˜ˆ์ธกํ•จ์ˆ˜๋ฅผ g๋ผ๊ณ  ํ•˜๋ฉด,

Training a Surrogate model : g๋ฅผ f์— ๊ฐ€๋Šฅํ•œ ํ•œ ๊ฐ€๊น๊ฒŒ ๊ทผ์‚ฌํ•˜๊ณ ์ž ํ•จ

  • Black box model์˜ ๋‚ด๋ถ€ ์ž‘์—…์— ๋Œ€ํ•œ ์ •๋ณด ํ•„์š” ์—†์Œ
  • Data์™€ Prediction ํ•จ์ˆ˜์— ๋Œ€ํ•œ ์ •๋ณด๋งŒ ํ•„์š”
  • Black box ๋ชจ๋ธ์ด ๋ฐ”๋€Œ๋”๋ผ๋„ Surrogate ํ•จ์ˆ˜๋Š” ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉ ๊ฐ€๋Šฅ
  • Black box ํ•จ์ˆ˜์˜ ๋ชจ๋ธ ์ข…๋ฅ˜์™€ Surrogate ํ•จ์ˆ˜์˜ ๋ชจ๋ธ ์ข…๋ฅ˜ ๋ฌด๊ด€

Steps to obtain a Surrogate Model :

 

  1. Dataset X์„ ํƒ.

       - Black box model training์— ์‚ฌ์šฉํ•œ ๊ฐ™์€ Dataset
       - ๊ฐ™์€ Distribution๋งŒ ๊ฐ€์ง€๋Š” ์ƒˆ๋กœ์šด Dataset
       - Subset์œผ๋กœ ์ด๋ฃจ์–ด์ง„ Dataset

  2. Dataset X์— ๋Œ€ํ•œ Black box model์˜ ์˜ˆ์ธก๊ฐ’ ๊ตฌํ•˜๊ธฐ

  3. ํ•ด์„ ๊ฐ€๋Šฅํ•œ Surrogate ํ•จ์ˆ˜์˜ ๋ชจ๋ธ ํƒ€์ž… ์„ ํƒ

  4. Dataset X์™€ Black box model์˜ ์˜ˆ์ธก๊ฐ’์„ ์‚ฌ์šฉํ•˜์—ฌ Surrogate ๋ชจ๋ธ ํ•™์Šต

  5. Black box model์˜ ์˜ˆ์ธก๊ฐ’์„ ์ž˜ ๋ฐ˜์˜ํ–ˆ๋Š”์ง€ ์ธก์ •ํ•˜๊ณ , Surrogate ๋ชจ๋ธ์˜ ๊ฒฐ๊ณผ๊ฐ’ ํ•ด์„

 

 

 

 

Measurement for Surrogate Model

=> R-squared measure ์‚ฌ์šฉ

  • R-square๊ฐ’์ด 1์— ๊ฐ€๊นŒ์šฐ๋ฉด
    = Low Sum of Squares error
    = Surrogate model์ด Blackbox model์— ์ž˜ ๊ทผ์‚ฌ
  • R-square๊ฐ’์ด 0์— ๊ฐ€๊นŒ์šฐ๋ฉด
    = High Sum of Squares error
    = Surrogate model์ด Blackbox model์„ ์ž˜ ์„ค๋ช…ํ•˜์ง€ ๋ชปํ•จ

 

- Surrogate Training์„ ํ•  ๋•Œ์— Blackbox ๋ชจ๋ธ์˜ ์„ฑ๋Šฅ์€ ๊ณ ๋ คํ•˜์ง€ ์•Š์Œ

=>Blackbox model์˜ ์„ฑ๋Šฅ์€ Surrogate model์„ ํ•™์Šตํ•˜๋Š” ๋ฐ ์˜ํ–ฅ์„ ์ฃผ์ง€ ์•Š์ง€๋งŒ, Blackbox model์˜ ์„ฑ๋Šฅ์ด ๋งค์šฐ ๋‚˜์˜๋‹ค๋ฉด Surrogate model์„ ํ•ด์„ํ•˜๋Š” ๊ฒƒ์ด ๋ฌด์˜๋ฏธํ•ด์ง

 

 

- Surrogate model์˜ input dataset์˜ ๋ถ„ํฌ๋ฅผ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ์Œ

  • ์›๋ณธ ๋ฐ์ดํ„ฐ์˜ subset
  • ๊ฐ instance์˜ reweight
    => Interpretation์˜ ์ดˆ์ ์„ ๋ฐ”๊ฟˆ(๋”์ด์ƒ Globalํ•˜์ง€ ์•Š์Œ)
    Local Surrogate Model : ํŠน์„ฑ instance๋“ค์— ๊ฐ€์ค‘์น˜๋ฅผ ํฌ๊ฒŒ ๋‘๋Š” Local๋ฐฉ์‹

 

 


5.6.2 Example


1. Regression

  • Black Box Model : ์ผ๋ณ„ ์ž์ „๊ฑฐ ๋Œ€์—ฌ ์ˆ˜๋ฅผ ์˜ˆ์ธกํ•˜๋Š” SVM ๋ชจ๋ธ
  • Surrogate Model : CART decision tree

SVM์˜ ์˜ˆ์ธก์— ๊ทผ์‚ฌํ•™์Šตํ•œ Tree model์˜ terminal node

  • Temparature 13๋„ ์ด์ƒ์ผ ๊ฒฝ์šฐ
  • 2๋…„ ํ›„

์™€ ๊ฐ™์€ feature ์กฐ๊ฑด ๋‚ด์—์„œ ์ž์ „๊ฑฐ ๋Œ€์—ฌ ์ˆ˜๊ฐ€ ๋” ๋งŽ์„ ๊ฒƒ์œผ๋กœ ์˜ˆ์ธก

 

์ด ๋•Œ R-squared๊ฐ’์ด 0.77์œผ๋กœ Blackbox model์„ ๊ฝค ์ž˜ ๋ฐ˜์˜ํ–ˆ์œผ๋ฏ€๋กœ ์œ„์™€ ๊ฐ™์€ Surrogate model์˜ ํ•ด์„์„ Blackbox model์˜ ํ•ด์„์ฒ˜๋Ÿผ ์‚ฌ์šฉ ๊ฐ€๋Šฅ

 

 

 

 

2. Classification

  • Black Box Model : ์ž๊ถ๊ฒฝ๋ถ€์•” ํ™•๋ฅ ์„ ์˜ˆ์ธกํ•˜๋Š” Random Forest
  • Surrogate Model : Decision Tree

Random Forest์˜ ์˜ˆ์ธก์— ๊ทผ์‚ฌํ•™์Šตํ•œ Decision Tree

 

์ด ๋•Œ R-squared๊ฐ’์ด 0.19์œผ๋กœ Blackbox model์„ ๋ฐ˜์˜ํ•˜์ง€ ๋ชปํ–ˆ์œผ๋ฏ€๋กœ Surrogate model์„ ํ•ด์„ํ•ด๋„ Blackbox model์˜ ํ•ด์„์ฒ˜๋Ÿผ ์‚ฌ์šฉํ•˜์ง€ ๋ชปํ•œ๋‹ค.

 

 

 


5.6.3 Advantages


  • ํ•ด์„๊ฐ€๋Šฅํ•œ ๋ชจ๋“  ์ข…๋ฅ˜์˜ ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— flexible
    (ex) ๋ณต์žกํ•œ ๋ชจ๋ธ์„ ๋งŒ๋“ค์–ด ๋‘ ํšŒ์‚ฌ์— ์„ค๋ช…ํ•˜๋ ค๊ณ  ํ•˜๋Š” ๊ฒฝ์šฐ
    (1) ์„ ํ˜• ๋ชจ๋ธ์ด ์ต์ˆ™ํ•œ ํšŒ์‚ฌ์—๊ฒŒ๋Š” ์„ ํ˜• ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•˜์—ฌ ํ•ด์„
    (2) ๊ฒฐ์ • ํŠธ๋ฆฌ๊ฐ€ ์ต์ˆ™ํ•œ ํšŒ์‚ฌ์—๊ฒŒ๋Š” ๊ฒฐ์ • ํŠธ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ•ด์„
  • ์ง๊ด€์ ์ด๊ณ  ๊ฐ„๋‹จํ•˜๋ฉฐ ๊ตฌํ˜„์ด ์‰ฌ์›€
  • R-square๋ฅผ ํ†ตํ•ด ์ž˜ ๊ทผ์ ‘ํ–ˆ๋Š”์ง€ ์„ฑ๋Šฅ ์‰ฝ๊ฒŒ ์ธก์ • ๊ฐ€๋Šฅ

 

 


5.6.4 Disadvantages


  • Data๊ฐ€ ์•„๋‹ˆ๋ผ Model์— ๋Œ€ํ•œ ๊ฒฐ๋ก ์„ ๋„์ถœํ•ด์•ผ ํ•จ
  • R-square์˜ cut-off ๊ธฐ์ค€์ด ๋ถˆ๋ถ„๋ช…ํ•จ
  • ๋ชจ๋“  data point์— ๋™์ผํ•œ ํ•ด์„๋ ฅ์„ ๊ฐ–์ง€ ๋ชปํ•  ์ˆ˜ ์žˆ์Œ
    ์ผ๋ถ€ subset์—๋Š” ๋งค์šฐ ์ž˜ fit, ์ผ๋ถ€ subset์—์„œ๋Š” divergent

 

 

 

 

 


References


[1] Interpretable Machine Learning, Christoph Molnar

Comments