software engineering/ํŒŒ์ด์ฌ ๋จธ์‹ ๋Ÿฌ๋‹

[Machine Learning] ๋”ฅ๋Ÿฌ๋‹์˜ ๋น„์ง€๋„ํ•™์Šต

jjingle 2024. 1. 19. 10:14

Autoencoder ์˜ ๊ตฌ์กฐ

  • Input๊ณผ output์˜ ๊ฐ’์ด ๊ฐ™์•„์ง€๋„๋ก ํ•™์Šตํ•˜๋Š” ๋‰ด๋Ÿด๋„คํŠธ์›Œํฌ

 

Autoencoder ์˜ ์œ ์šฉ์„ฑ๊ณผ ํ•™์Šต๋ฐฉ๋ฒ•

  • output์„ input๊ณผ ์™„์ „ํžˆ ๋™์ผํ•˜๊ฒŒ ๋ณต์›ํ•˜๋Š” ๋‰ด๋Ÿด๋„คํŠธ์›Œํฌ๋Š” ์œ ์šฉํ•˜์ง€ ์•Š์Œ
    • => ์˜คํžˆ๋ ค ์™„์ „ํžˆ ๋™์ผํ•˜๊ฒŒ ๋ณต์›๋˜์ง€ ์•Š๋„๋ก ํ•™์Šต์‹œํ‚ค๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•จ
    • Autoencoder์— ์ œํ•œ์กฐ๊ฑด์„ ๋‘์–ด input์— ๊ทผ์‚ฌํ•˜๊ฒŒ ๋ณต์›๋˜๋„๋ก ํ•™์Šต์‹œํ‚ด
    • ์ด๋ฅผํ†ตํ•ด, autoencoder๊ฐ€ ๋ฐ์ดํ„ฐ์˜ ์ค‘์š”ํ•œ ์†์„ฑ(property)๋งŒ ํ•™์Šตํ•˜๋„๋ก ํ•จ
  • ์ „ํ†ต์ ์œผ๋กœ๋Š” autoencoder๋ฅผ dimension reduction์„ ์œ„ํ•ด ์‚ฌ์šฉ
    • ์••์ถ•๋œ code๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ €์ฐจ์›์—์„œ ํ‘œํ˜„ํ•œ ๋ฒกํ„ฐ
    • PCA์˜ ์ฐจ์› ์ถ•์†Œ์™€ ์œ ์‚ฌํ•˜๋‚˜ ๋น„์„ ํ˜•์„ฑ์„ ๋ฐ˜์˜ํ•  ์ˆ˜ ์žˆ์–ด ๋” ์œ ์šฉํ•  ์ˆ˜ ์žˆ์Œ
  • Multilayer Neural Network์˜ ํŠน๋ณ„ํ•œ ๊ฒฝ์šฐ๋ผ๊ณ  ๋ณผ ์ˆ˜ ์žˆ์Œ
    • =>Mini-batch, gradient descent, back-propagation ๋“ฑ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ผ๋ฐ˜์ ์ธ ๋„คํŠธ์›Œํฌ์™€ ๊ฐ™์€ ๋ฐฉ์‹์œผ๋กœ ํ•™์Šต

 

GAN(Generative Adversarial Network,  ์ƒ์„ฑ์  ์ ๋Œ€ ๋„คํŠธ์›Œํฌ)

  • ์ƒ์„ฑ์ž(generator)๊ฐ€ ์ƒ๋Œ€๋ฐฉ(adversary)์„ ๋ฐ˜๋“œ์‹œ ์ด๊ฒจ์•ผํ•˜๋Š” ๊ฒŒ์ž„์ด๋ก  ์‹œ๋‚˜๋ฆฌ์˜ค(game theoretic scenario)์— ๊ธฐ๋ฐ˜ํ•œ ์ƒ์„ฑ ๋„คํŠธ์›Œํฌ
  • ํ•™์Šต ๊ณผ์ • ๋™์•ˆ generator๋Š” ์ ์ฐจ ์‹ค์ œ์™€ ์œ ์‚ฌํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์ƒ์„ฑํ•˜๊ณ  discriminator๋Š” real๊ณผ fake ๋ฐ์ดํ„ฐ๋ฅผ ๋” ์ž˜ ๊ตฌ๋ณ„ํ•˜๊ฒŒ ๋จ

 

GAN์˜ ๊ตฌ์กฐ

  • Generator์™€ discriminator๋Š” ๋ชจ๋‘ ๋‰ด๋Ÿด๋„คํŠธ์›Œํฌ์ž„
  • Generator์˜ input์€ ์ž„์˜์˜(random) ๋…ธ์ด์ฆˆ(noise)์ž„

Generative Adversarial Network

 

 

GAN์˜ ํ•™์Šต(discriminator)

  • Discriminator๋Š” ์‹ค์ œ ๋ฐ์ดํ„ฐ์™€ generator๊ฐ€ ์ƒ์„ฑํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์ž…๋ ฅ๋ฐ›์•„ ์ด๋ฅผ ๋” ์ž˜ ๊ตฌ๋ถ„ํ•˜๋Š” ๋ฐฉํ–ฅ์œผ๋กœ ํ•™์Šต๋จ
    • => ์ด ๋•Œ generator๋Š” ํ•™์Šต๋˜์ง€ ์•Š์Œ(weight๊ฐ€ ๊ณ ์ •,freeze ๋จ)

  • Generator๊ฐ€ ๋งŒ๋“  fake ๋ฐ์ดํ„ฐ๋ฅผ discriminator๊ฐ€ ๊ตฌ๋ถ„ํ•ด๋ƒˆ์„ ๋•Œ, penalty๋ฅผ ๋ฐ›์•„ ์ด๋ฅผ ์ค„์ด๋Š” ๋ฐฉํ–ฅ์œผ๋กœ ํ•™์Šต๋จ
    • => ์ด ๋•Œ discriminator๋Š” ํ•™์Šต๋˜์ง€ ์•Š์Œ(weight๊ฐ€ ๊ณ ์ •,freeze ๋จ)