GAN

๋ถ„์•ผ
Generative Model
๋ฆฌ๋ทฐ ๋‚ ์งœ
2020/09/13
๋ณธ ํฌ์ŠคํŠธ๋Š” ์ œ๊ฐ€ ํœด๋จผ์Šค์ผ€์ดํ”„ ๊ธฐ์ˆ  ๋ธ”๋กœ๊ทธ์— ๋จผ์ € ์ž‘์„ฑํ•˜๊ณ  ์˜ฎ๊ธด ํฌ์ŠคํŠธ์ž…๋‹ˆ๋‹ค.
๋ณธ ํฌ์ŠคํŠธ์—์„œ๋Š” ์ด์ „ ํฌ์ŠคํŠธ selfie2anime์—์„œ ์‚ฌ์šฉํ•œ styleGAN์˜ ์ดˆ์„์ด ๋˜๋Š” ์•„ํ‚คํ…์ณ์ธ GAN์„ ์ฒ˜์Œ์œผ๋กœ ์„ ๋ณด์ธ ๋…ผ๋ฌธ์— ๋Œ€ํ•ด์„œ ๋ฆฌ๋ทฐํ•˜๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ์ด์ „ ํฌ์ŠคํŠธ๋ฅผ ์‚ดํŽด๋ณด๊ณ  ์‹ถ์œผ์‹  ๋ถ„์€ย ์ด๊ณณ์„ ์ฐธ๊ณ ํ•˜์‹œ๋ฉด ์ข‹์Šต๋‹ˆ๋‹ค. ๋ฆฌ๋ทฐํ•˜๋ ค๋Š” ๋…ผ๋ฌธ์˜ ์ œ๋ชฉ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.
โ€œGenerative Adversarial Netsโ€
๋…ผ๋ฌธ์— ๋Œ€ํ•œ ๋‚ด์šฉ์„ ์ง์ ‘ ๋ณด์‹œ๊ณ  ์‹ถ์œผ์‹  ๋ถ„์€ย ์ด๊ณณ์„ ์ฐธ๊ณ ํ•˜์‹œ๋ฉด ์ข‹์Šต๋‹ˆ๋‹ค.
Main stream of GAN

Objective

๋…ผ๋ฌธ์—์„œ ๋ชฉ์ ์œผ๋กœ ํ•˜๊ณ  ์žˆ๋Š” ๊ฒƒ์€ย ํ•™์Šต๋œ ๋ฐ์ดํ„ฐ ์…‹์˜ ๋ถ„ํฌ์™€ ๋น„์Šทํ•œ/๋™์ผํ•œ ์–‘์ƒ์„ ๋ณด์ด๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ƒ์„ฑํ•ด๋‚ด๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๊ฐ„๋‹จํ•œ ๋ถ€์—ฐ ์„ค๋ช…์œผ๋กœ, ์‚ฌ๋žŒ์˜ ์–ผ๊ตด ํ˜•ํƒœ๋ฅผ ํ‘œํ˜„ํ•œ ์ด๋ฏธ์ง€ ๋ฐ์ดํ„ฐ๋ฅผ ํ•™์Šต ๋ฐ์ดํ„ฐ๋กœ ์‚ฌ์šฉํ•œ๋‹ค๊ณ  ๊ฐ€์ •ํ•ด ๋ด…์‹œ๋‹ค. ์ด ๊ฒฝ์šฐ์—๋Š” ๋„คํŠธ์›Œํฌ๊ฐ€ ์‚ฌ๋žŒ ์–ผ๊ตด ํ˜•ํƒœ๋ฅผ ๋…ธ์ด์ฆˆ ๋ฐ์ดํ„ฐ(์˜๋ฏธ ์—†๋Š” ๊ฐ’๋“ค)๋กœ๋ถ€ํ„ฐ ์ƒ์„ฑํ•ด๋‚ผ ์ˆ˜ ์žˆ๋Š” ๋Šฅ๋ ฅ์„ ํ•™์Šตํ•œ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.
์ด๋ฅผ ๋‹ฌ์„ฑํ•˜๊ธฐ ์œ„ํ•ด์„œ ๋…ผ๋ฌธ์—์„œ๋Š” generator์™€ discriminator, 2๊ฐœ์˜ model์„ ๊ฒฝ์Ÿ์ ์œผ๋กœ ํ•™์Šต์‹œํ‚ค๋Š” ๊ตฌ์กฐ๋ฅผ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค. ๋…ผ๋ฌธ์˜ introduction์—์„œ ๋‚˜์˜จ ์„ค๋ช…์„ ๋•๊ธฐ ์œ„ํ•ด์„œ ์ œ์‹œํ•œ ๊ฐ„๋‹จํ•œ ์˜ˆ์‹œ๋Š” ์œ„์˜ ๊ทธ๋ฆผ๊ณผ ์—ฐ๊ด€์ด ์žˆ์Šต๋‹ˆ๋‹ค.
Generator๋ผ๋Š” ์œ„์กฐ์ง€ํ ์ œ์ž‘์ž์™€ย discriminator๋ผ๋Š” ์œ„์กฐ์ง€ํ ๊ฐ๋ณ„์‚ฌ๊ฐ€ ์กด์žฌํ•˜๋Š” ์ƒํ™ฉ์ž…๋‹ˆ๋‹ค.ย Generator๋Š” ์‹ค์ œ ์ง€ํ๋ž‘ ๊ตฌ๋ณ„๋˜์ง€ ์•Š๋Š” ์™„๋ฒฝํ•œ ์œ„์กฐ์ง€ํ๋ฅผ ์ œ์ž‘ํ•˜๋Š” ๊ฒƒ์„ ๋ชฉํ‘œ๋กœ ํ•˜๊ณ ,ย discriminator๋Š” ๊ทธ ์–ด๋–ค ์œ„์กฐ์ง€ํ๊ฐ€ ์˜ค๋”๋ผ๋„ ์‹ค์ œ ์ง€ํ์™€ ๊ตฌ๋ณ„ํ•ด๋‚ด๋Š” ๊ฒƒ์„ ๋ชฉํ‘œ๋กœ ํ•ฉ๋‹ˆ๋‹ค. ์ด ๋‘ ์‚ฌ๋žŒ์˜ ๋ชฉํ‘œ๊ฐ€ ์„œ๋กœ ์ถฉ๋Œํ•˜๋ฉด์„œ ๊ฒฝ์Ÿ์ ์œผ๋กœ ์ž‘์šฉํ•˜๊ฒŒ ๋˜๊ณ , ๊ทธ๋“ค์˜ ๋ชฉํ‘œ์™€๋Š” ๋ณ„๊ฐœ๋กœ ์œ„์กฐ์ง€ํ ์ œ์ž‘์ž๊ฐ€ ๋งŒ๋“ค์–ด๋‚ด๋Š” ์ง€ํ๊ฐ€ ๊ฒฝ์Ÿ๊ณผ์ •์—์„œ ์˜คํžˆ๋ คย ์‹ค์ œ ์ง€ํ์™€ ์ ์  ๋” ๊ฐ€๊นŒ์›Œ์ง€๊ฒŒ ๋˜๋Š” ํšจ๊ณผ๋ฅผ ๋ณด๊ฒŒ ๋˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.
์ด๋Ÿฌํ•œ GAN์€ ์ƒ์„ฑ๋ชจ๋ธ์ด๋ผ๋Š” ์ ์—์„œ VAE์™€ ๋งŽ์ด ๋น„๊ต๊ฐ€ ๋˜๊ธฐ๋„ ํ•ฉ๋‹ˆ๋‹ค. ์ด ๋‘˜์€ ๊ทผ๋ณธ์ ์œผ๋กœ ํ•™์Šต์„ ์ง„ํ–‰ํ•˜๋Š” ๊ฒƒ์—์„œ ์ฐจ์ด๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. VAE๋Š” ๋ฐ์ดํ„ฐ์…‹์˜ ํŠน์ง•์„ ํ•™์Šตํ•˜์—ฌ ๊ทธ ํŠน์ง•๊ณผ variational inference๋ฅผ ์ด์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐ์…‹์„ ์ƒ์„ฑํ•ด๋‚ด๋Š” ๋ฐ˜๋ฉด, GAN์€ ์ด๋Ÿฐ ๋ฐ์ดํ„ฐ์˜ ๋ถ„ํฌ๋ฅผ ์ถ”๋ก ํ•˜๋Š” ๊ณผ์ •์ด ์กด์žฌํ•˜์ง€ ์•Š๊ณ  ๋‹จ์ˆœํžˆ ๋…ธ์ด์ฆˆ๋กœ๋ถ€ํ„ฐ ๋ฐ์ดํ„ฐ๋ฅผ ์ƒ์„ฑํ•ด๋ƒ…๋‹ˆ๋‹ค.

Adversarial Nets

์•ž์„œ ์„ค๋ช…ํ–ˆ๋˜ ๊ฒฝ์Ÿ๊ด€๊ณ„๋ฅผ ๊ตฌํ˜„ํ•˜๊ธฐ ์œ„ํ•ด์„œ ๋…ผ๋ฌธ์—์„œ๋Š” adversarial nets๋ฅผ ์„ค๊ณ„ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ๊ฐ์˜ generator์™€ discriminator ๋ชจ๋‘ multilayer perceptron์œผ๋กœ ๊ตฌํ˜„ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๊ฒฝ์Ÿ์  ๊ด€๊ณ„๋ฅผ ํ†ตํ•œ ํ•™์Šตํšจ๊ณผ๋ฅผ ๋‚˜ํƒ€๋‚ด๊ธฐ ์œ„ํ•ด ์•„๋ž˜์™€ ๊ฐ™์ด cost function์„ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค.
minGmaxDV(D,G)=Exโˆผpdata(x)[logD(x)]+Ezโˆผpz(z)[log(1โˆ’D(G(z)))]min_Gmax_DV(D,G)=E_{x\sim p_{data}(x)}[logD(x)]+E_{z\sim p_z(z)}[log(1-D(G(z)))]
์œ„์˜ ์‹์—์„œ p_data๋Š” ํ•™์Šตํ•  ๋ฐ์ดํ„ฐ์˜ ๋ถ„ํฌ๋ฅผ ๋‚˜ํƒ€๋‚ด๊ณ , p_z๋Š” input์œผ๋กœ ๋“ค์–ด๊ฐ€๊ฒŒ ๋  ๋…ธ์ด์ฆˆ ๋ฐ์ดํ„ฐ์˜ ๋ถ„ํฌ๋ฅผ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. D์™€ G๋Š” ๊ฐ๊ฐ discriminator์™€ generator ๋ชจ๋ธ์˜ ์—ฐ์‚ฐ๊ณผ์ •์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.
๋จผ์ € ์œ„์˜ ์‹์˜ discriminator๋Š” ๋ฐ์ดํ„ฐ ๋ถ„ํฌ๊ฐ€ ์‹ค์ œ์ธ์ง€ ์ƒ์„ฑ๋œ ๊ฒƒ์ธ์ง€ ๊ฒฐ์ •ํ•˜๋Š” ๊ฐ’ D(x)์œผ๋กœ 1๊ณผ 0์„ ์‚ฐ์ถœํ•ฉ๋‹ˆ๋‹ค. ์‹ค์ œ๋กœ ํŒ๋‹จํ–ˆ์„ ๊ฒฝ์šฐ 1๋กœ, ์ƒ์„ฑ๋œ ๊ฒƒ์œผ๋กœ ํŒ๋‹จํ–ˆ์„ ๊ฒฝ์šฐ๋ฅผ 0์„ ์ฃผ๊ฒŒ ๋˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ๋‚ด์šฉ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์•„๋ž˜์˜ ๋‚ด์šฉ์„ ์‚ดํŽด๋ด…์‹œ๋‹ค.
๋จผ์ €, discriminator์˜ ๊ด€์ ์—์„œ ์œ„์˜ ์‹์„ ์‚ดํŽด๋ด…์‹œ๋‹ค. ์•ž์„œ ์„ค๋ช…ํ•œ ๋ฐ”์™€ ๊ฐ™์ด discriminator์˜ ๋ชฉํ‘œ๋Š” generator๊ฐ€ ์ƒ์„ฑํ•œ ๋ถ„ํฌ์™€ ์‹ค์ œ ๋ฐ์ดํ„ฐ์˜ ๋ถ„ํฌ์™€ ์ž˜ ๊ตฌ๋ณ„ํ•ด๋‚ด๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๊ทธ๋ ‡๊ธฐ์— x๊ฐ€ p_data ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅด๋Š” x์— ๋Œ€ํ•ด์„œ D(x)๋ฅผ 1๋กœ, z๊ฐ€ p_z ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅด๋Š” z๊ฐ€ gererator ์—ฐ์‚ฐ G๋ฅผ ๊ฑฐ์ณ ๋‚˜์˜ค๊ฒŒ ๋œ ๊ฐ’์„ 0์œผ๋กœ ์‚ฐ์ถœํ•˜์—ฌ ์ตœ์ข… ์‹์ดย ์ตœ๋Œ€๊ฐ€ ๋˜๋Š” ๊ฒƒ์„ ์›ํ•˜๊ฒŒย ๋ฉ๋‹ˆ๋‹ค.
๋‹ค์Œ์œผ๋กœ generator์˜ ๊ด€์ ์—์„œ ์œ„์˜ ์‹์„ ์‚ดํŽด๋ด…์‹œ๋‹ค. ์•ž์„œ ์„ค๋ช…ํ•œ ๋ฐ”์™€ ๊ฐ™์ด generator ์˜ ๋ชฉํ‘œ๋Š” discriminator๊ฐ€ ๊ตฌ๋ณ„ํ•˜์ง€ ๋ชปํ•˜๋Š” ๊ฐ€์งœ ๋ฐ์ดํ„ฐ ๋ถ„ํฌ๋ฅผ ์—ฐ์‚ฐ์„ ํ†ตํ•ด ํ˜•์„ฑํ•ด๋‚ด๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๊ทธ๋ ‡๊ธฐ์— z๊ฐ€ p_z ๋ถ„ํฌ๋ฅผ ๋”ฐ๋ฅด๋Š” z๊ฐ€ generator ์—ฐ์‚ฐ G๋ฅผ ๊ฑฐ์ณ ๋‚˜์˜ค๊ฒŒ ๋œ ๊ฐ’์„ 1๋กœ ์‚ฐ์ถœํ•˜์—ฌ ์ตœ์ข… ์‹์ดย ์ตœ์†Œ๊ฐ€ ๋˜๋Š” ๊ฒƒ์„ ์›ํ•˜๊ฒŒย ๋ฉ๋‹ˆ๋‹ค.
์ด ๋•Œ D์— ๋Œ€ํ•œ ํ•™์Šต์„ inner loop์—์„œ ๋งŽ์ด ์ง„ํ–‰ํ•˜๊ฒŒ ๋˜๋ฉด ์—ฐ์‚ฐ์ด ๊ต‰์žฅํžˆ ๋ณต์žกํ•ด์ง€๊ณ  ์œ ํ•œํ•œ ๋ฐ์ดํ„ฐ์…‹์—์„œ overfitting์ด ๋‚˜ํƒ€๋‚˜๋Š” ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒผ๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ๋…ผ๋ฌธ์—์„œ๋Š” ์ด๋ฅผ ํ•ด๊ฒฐํ•  ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ๊ณ ์•ˆํ–ˆ๋Š”๋ฐ, k๋ฒˆ์˜ D์— ๋Œ€ํ•œ gradient descent์„ ์ ์šฉํ•˜๊ณ  1๋ฒˆ์˜ G์— ๋Œ€ํ•œ gradient descent๋ฅผ ์ ์šฉํ•˜๋Š” ๊ฒƒ์ด์—ˆ์Šต๋‹ˆ๋‹ค.

Learning Aspect

์•ž์„œ๋Š” adversarial net์— ๋Œ€ํ•ด์„œ ์‚ดํŽด๋ณด์•˜์Šต๋‹ˆ๋‹ค. ์ด๋ฒˆ์—๋Š” ์•ž์„œ ์„ค๊ณ„ํ•œ ๋‚ด์šฉ์ด ์‹ค์ œ๋กœ ์–ด๋–ค ์–‘์ƒ์œผ๋กœ ํ•™์Šต์ด ์ง„ํ–‰๋˜๋Š”์ง€์— ๋Œ€ํ•ด์„œ ์‚ดํŽด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.
Generative adversarial nets training process
์œ„์˜ ๊ทธ๋ฆผ์€ ๋…ผ๋ฌธ์—์„œ ๊ฐ„๋‹จํ•˜๊ฒŒ ํ•™์Šต์ด ์ง„ํ–‰๋˜๋Š” ๊ณผ์ •์„ ๋‚˜ํƒ€๋‚ธ ๊ทธ๋ฆผ์ž…๋‹ˆ๋‹ค. ๋…ผ๋ฌธ์˜ ๊ฐ ์‚ฌ์ง„์—์„œ x์™€ z๋กœ ์ ํžŒ ์„ ์ด ์กด์žฌํ•˜๋ฉฐ ๊ทธ ์‚ฌ์ด๋ฅผ ์ž‡๋Š” ์„ ๋“ค์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋“ค ๋ณ€์ˆ˜๋Š” ๊ฐ๊ฐ ๋ถ„ํฌ์— ๋Œ€ํ•œ ๊ธฐ์ค€์ด ๋˜๋ฉฐ, ์„ ์€ G๊ฐ€ z๋กœ ๋ถ€ํ„ฐ x๋ฅผ ๋งคํ•‘ํ•˜๋Š” ๊ด€๊ณ„๋ฅผ ํ‘œํ˜„ํ•ด์ค๋‹ˆ๋‹ค.
๊ทธ๋ฆผ์—์„œ ๋ณด์ด๋Š” ๊ฒ€์€ ์ ๋“ค์˜ ๋ถ„ํฌ๊ฐ€ ์‹ค์ œ ๋ฐ์ดํ„ฐ์˜ ๋ถ„ํฌ์ž…๋‹ˆ๋‹ค. ์•ž์„œ ์„ค๋ช…ํ•œ ์–ธ์–ด์— ๋”ฐ๋ฅด๋ฉด p_data๋กœ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋…น์ƒ‰์„ ์˜๋ถ„ํฌ๋Š” ์ƒ์„ฑํ•œ ๋ฐ์ดํ„ฐ์˜ ๋ถ„ํฌ์ž…๋‹ˆ๋‹ค. ์•ž์„œ ์„ค๋ช…ํ•œ ์–ธ์–ด์— ๋”ฐ๋ฅด๋ฉด G์˜ ์—ฐ์‚ฐ์„ ๊ฑฐ์นœ z์˜ ๋ถ„ํฌ๋กœ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋งˆ์ง€๋ง‰์œผ๋กœ ํ‘ธ๋ฅธ ์ ๋“ค์˜ ๋ถ„ํฌ๋Š” D์˜ ์—ฐ์‚ฐ์„ ํ†ตํ•ด ๊ตฌ๋ณ„๋œ ์ •๋„์˜ ๋ถ„ํฌ๋กœ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
(a)์—์„œ (d)๋กœ iteration์„ ๊ฑฐ์ณ๊ฐ€๋ฉด์„œ ์ ์  mapping๊ณผ ํ•จ๊ป˜ ๋…น์ƒ‰ ์ƒ์„ฑ ๋ฐ์ดํ„ฐ๊ฐ€ ์ขŒ์ธก์œผ๋กœ ํŽธํ–ฅ๋˜๋Š” ์–‘์ƒ์„ ๋ณด์ด๋ฉด์„œ ํ•™์Šต ๋ฐ์ดํ„ฐ์™€ ์ผ์น˜ํ•˜๊ฒŒ ๋ณ€ํ•˜๋Š” ์–‘์ƒ์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋งˆ์ง€๋ง‰์œผ๋กœ ๊ฐˆ ์ˆ˜๋ก ํ‘ธ๋ฅธ ๋ฐ์ดํ„ฐ๊ฐ€ ์ผ์ •ํ•œ ๊ฐ’์„ ๋ณด์ด๊ฒŒ ๋˜๋Š”๋ฐ, ์ด๋Š” ์‹ค์ œ์™€ ์ƒ์„ฑ๋œ ๋ฐ์ดํ„ฐ๋ฅผ ๊ตฌ๋ณ„ํ•ด๋‚ด๊ธฐ ๊ฐ€์žฅ ์–ด๋ ต๋‹ค๊ณ  ๋ณผ ์ˆ˜ ์žˆ๋Š”ย 1/2๋กœ ๊ฐ’์ด ์ˆ˜๋ ดํ–ˆ๋‹ค๊ณ  ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Theoretical Results โ€” Algorithm

์•ž์—์„œ ๋…ผ๋ฌธ์—์„œ ์„ค๊ณ„ํ•œ ์•Œ๊ณ ๋ฆฌ์ฆ˜์— ๋Œ€ํ•ด์„œ ๊ฐ„๋žตํžˆ ์„ค๋ช…๋“œ๋ ธ์—ˆ์Šต๋‹ˆ๋‹ค. ๋…ผ๋ฌธ์—์„œ๋Š” ์ด๋ ‡๊ฒŒ ์•ž์„œ ์„ค๊ณ„ํ•œ cost function๊ณผ ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด ๋ชฉํ‘œ๋กœํ•˜๋Š” ๊ฒฝ์Ÿ๊ด€๊ณ„๋ฅผ ํ†ตํ•ด์„œ ์–ด๋–ป๊ฒŒ ํ•™์Šต์ด ์ง„ํ–‰๋˜๋Š”์ง€๋ฅผ ์ด๋ก ์ ์œผ๋กœ ์„ค๋ช…ํ•ด์ค๋‹ˆ๋‹ค.
๋จผ์ €, ์—ฌ๊ธฐ์„œ๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜์— ๋Œ€ํ•ด์„œ ์†Œ๊ฐœ๋ฅผ ๋“œ๋ฆฌ๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ์ƒ๊ฐ๋ณด๋‹ค ๊ฐ„๋‹จํ•œ๋ฐ, ๊ทธ ์ด์œ ๊ฐ€ GAN ์ž์ฒด๊ฐ€ โ€œ์–ด๋–ค ๋„คํŠธ์›Œํฌ์™€ ๊ทธ์— ํŠนํ™”๋œ ์ ํ•ฉํ•œ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์‚ฌ์šฉํ•œ๋‹คโ€๊ฐ€ ๋…ผ๋ฌธ์˜ ์ฃผ์š” ๋‚ด์šฉ์ด ์•„๋‹ˆ๋ผ, โ€œ์–ด๋–ค ๋„คํŠธ์›Œํฌ๋ฅผ ์‚ฌ์šฉํ•˜๋˜ ๊ฐ„์— ๋…ผ๋ฌธ์— ์ ํ˜€์žˆ๋Š” ํ˜•ํƒœ์˜ ๋กœ์ง์„ ์ ์šฉํ•˜์—ฌ ์ ๋Œ€์ ์œผ๋กœ ํ•™์Šต์„ ์ง„ํ–‰ํ•  ์ˆ˜ ์žˆ๋‹คโ€๊ฐ€ ์ฃผ์š”ํ•œ ๋‚ด์šฉ์ด๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.
์•ž์„œ ์†Œ๊ฐœ๋“œ๋ฆฐ ๋ฐ˜์—์„œ ์•ฝ๊ฐ„์˜ ๋ถ€์—ฐ ์„ค๋ช…์„ ์ง„ํ–‰ํ•˜์ž๋ฉด, minibatch๋ผ๊ณ  ํ•˜์—ฌ ๋ชจ๋“  ๋ฐ์ดํ„ฐ์…‹์„ ํ•™์Šต์— ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  ์žˆ๊ณ , ์ด์— ๋”ฐ๋ผ stochastic gradient๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๊ณ  ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  k๋ฒˆ์˜ D๋ฅผ ํ•™์Šต์‹œํ‚ค๋Š” ๊ณผ์ •์„ stochastic gradient๋กœ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค. ์ดํ›„, G๋ฅผ ํ•™์Šต์‹œํ‚ค๋Š” ๊ณผ์ •์„ ๋‹ค์‹œ ํ•œ ๋ฒˆ ์ง„ํ–‰ํ•˜๊ณ  ์ด ๊ณผ์ •์„ ํŠน์ • iteration ๋งŒํผ ๋ฐ˜๋ณตํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๊ธ€์— ์ ํ˜€ ์žˆ๋Š” ascending๊ณผ descending์€ ๊ฐ๊ฐ D๋ฅผ ํ•™์Šต์‹œํ‚ค๋Š” ๊ณผ์ •์—์„œ๋Š” cost function์„ ์ตœ๋Œ€ํ™”ํ•˜๋Š” ๊ฒƒ์ด ๋ชฉ์ ์ด๊ณ , G๋ฅผ ํ•™์Šต์‹œํ‚ค๋Š” ๊ณผ์ •์—์„œ๋Š” cost function์„ ์ตœ์†Œํ™”ํ•˜๋Š” ๊ฒƒ์ด ๋ชฉ์ ์ธ ๊ฒƒ์„ ๋ฐ˜์˜ํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

Theoretical Results โ€” Validation

์•ž์—์„œ ๋…ผ๋ฌธ์—์„œ ์„ค๊ณ„ํ•œ ์•Œ๊ณ ๋ฆฌ์ฆ˜์— ๋Œ€ํ•ด์„œ ๊ฐ„๋žตํžˆ ์„ค๋ช…๋“œ๋ ธ์—ˆ์Šต๋‹ˆ๋‹ค. ๋…ผ๋ฌธ์—์„œ๋Š” ์ด๋ ‡๊ฒŒ ์•ž์„œ ์„ค๊ณ„ํ•œ ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด ์ด๋ก ์ ์œผ๋กœ ํƒ€๋‹นํ•˜๊ฒŒ ์›ํ•˜๋Š” ๋ชฉ์ ์„ ๋‹ฌ์„ฑํ•  ์ˆ˜ ์žˆ๋Š”์ง€๋ฅผ ์ฆ๋ช…ํ•ฉ๋‹ˆ๋‹ค. ์ฒ˜์Œ์œผ๋กœ ์ง„ํ–‰ํ•˜๋Š” ๊ฒƒ์ด ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ๋”ฐ๋ผ์„œ ํ•™์Šตํ–ˆ์„ ๋•Œ ์ •๋ง๋กœ p_g๋ฅผ p_data์™€ ๊ฐ™๊ฒŒ ํ•™์Šตํ•  ์ˆ˜ ์žˆ๋Š”๊ฐ€์— ๋Œ€ํ•œ ๊ฒƒ์ด๊ณ , ๋‹ค์Œ์ด ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด ์ •๋ง๋กœ ์ˆ˜๋ ดํ•˜๋Š”๊ฐ€์— ๋Œ€ํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค.
Train algorithm really works
Train algorithm really converges
์œ„๋Š” ์ฆ๋ช…์— ๋Œ€ํ•œ ๋‚ด์šฉ์„ ๊ธ€์—์„œ ๋‹ค๋ฃจ๊ธฐ๊ฐ€ ํž˜๋“ค์–ด ์ •๋ฆฌํ•œ ๋‚ด์šฉ์„ ์‚ฌ์ง„์œผ๋กœ ์ฒจ๋ถ€ํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์•„๋ž˜์˜ convergence of algorithm์— ๋Œ€ํ•ด์„œ ์ฒจ์–ธํ•˜์ž๋ฉด, ์„ค๊ณ„ํ•œ ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด D*์„ ๊ตฌํ•œ ํ›„์— G์— ๋Œ€ํ•œ ํ•™์Šต์„ ๋ฐ˜์˜ํ•˜๋Š” ๊ฒƒ์œผ๋กœ ์ง„ํ–‰๋˜๋Š”๋ฐ, ๊ทธ๋Ÿผ์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ  ์ด ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด ์ „์ฒด cost function ์ตœ์ ํ™”์˜ ํ•ด๋กœ ์ˆ˜๋ ดํ•  ์ˆ˜ ์žˆ๋Š” ์ด์œ ๋ฅผ convex function์—์„œ ์ฐพ๋Š” ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค.

Experiments

๋…ผ๋ฌธ์—์„œ๋Š” ๋งˆ์ง€๋ง‰ ๋ถ€๋ถ„์—์„œ ์„ค๊ณ„ํ•œ ๋ฐฉ๋ฒ•๋ก ๊ณผ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ๊ฒ€์ฆํ•˜๊ธฐ ์œ„ํ•ด์„œ MNIST, Toronto Face Database(TFD), ๊ทธ๋ฆฌ๊ณ  CIFAR-10 ๋ฐ์ดํ„ฐ์…‹์— ๋Œ€ํ•ด์„œ ์‹คํ—˜์„ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ ๊ฒฐ๊ณผ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.
์‹คํ—˜์— ์‚ฌ์šฉํ•œ ํ™œ์„ฑํ™” ํ•จ์ˆ˜๋Š” generator์˜ ๊ฒฝ์šฐ์—๋Š” rectifier linear๊ณผ sigmoid๋ฅผ ํ˜ผํ•ฉํ•ด์„œ ์‚ฌ์šฉํ–ˆ์œผ๋ฉฐ, discriminator์˜ ๊ฒฝ์šฐ์—๋Š” maxout์„ ์‚ฌ์šฉํ–ˆ๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ๋”๋ถˆ์–ด D๋ฅผ ํ•™์Šต์‹œํ‚ฌ ๋•Œ dropout์„ ์‚ฌ์šฉํ–ˆ๊ณ , ์ตœ์ข…์ ์œผ๋กœ๋Š” gaussian parzen window density estimation์œผ๋กœ ํ‰๊ฐ€๋ฅผ ์ง„ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.
๊ฒฐ๊ณผ๋กœ ๋ณด์ด๋Š” ๋ฐ”๋Š” ๊ธฐ์กด์˜ ๋‹ค๋ฅธ ๋ฐฉ์‹ ๋“ค์— ๋น„ํ•ด์„œ ๋ˆˆ์— ๋„๊ฒŒ ํฐ ์ฐจ์ด๋กœ ์ข‹์€ ์„ฑ๋Šฅ์€ ๋‚ด๋Š” ๊ฒƒ์€ ์•„๋‹ˆ์ง€๋งŒ, ์ถฉ๋ถ„ํžˆ ๊ฒฝ์Ÿ๋ ฅ์ด ์กด์žฌํ•œ๋‹ค๋Š” ์ ์„ ๋ณด์—ฌ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค.
(a) MNIST (b) TFD (c) CIFAR-10 (fully-connected) (d) CIFAR-10 (convolutional D, deconvolutional G)

Conclusions

์ด๊ฒƒ์œผ๋กœ ๋…ผ๋ฌธย โ€œGenerative Adversarial Netsโ€์˜ ๋‚ด์šฉ์„ ๊ฐ„๋‹จํ•˜๊ฒŒ ์š”์•ฝํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค. ์ด ๋…ผ๋ฌธ์ด ์„ธ์ƒ์— ๋“ฑ์žฅํ•œ์ง€ 6๋…„์ด ๋˜์—ˆ๋Š”๋ฐ ๊ทธ ์‚ฌ์ด์— GAN์„ ๊ฐ€์ง€๊ณ  ์—„์ฒญ๋‚˜๊ฒŒ ๋งŽ์€ ๋…ผ๋ฌธ๋“ค๊ณผ ๊ตฌํ˜„๋“ค์ด ๋‚˜์˜จ ๊ฒƒ์„ ๋ณด๊ณ  ์ด ๋…ผ๋ฌธ์ด ๋”ฅ ๋Ÿฌ๋‹์—์„œ ์–ผ๋งˆ๋‚˜ ํฐ ์˜ํ–ฅ์„ ์ค€ ๋…ผ๋ฌธ์ธ์ง€ ๋Š๋‚„ ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.
์ฃผ์ œ ์ž์ฒด๋งŒ์œผ๋กœ๋„ ๊ต‰์žฅํžˆ ํฅ๋ฏธ๋กญ๊ณ  ์žฌ๋ฏธ์žˆ๊ฒŒ ์ฝ์„ ์ˆ˜ ์žˆ์–ด์„œ ์ข‹์•˜๋˜ ๋…ผ๋ฌธ์ด์—ˆ๋˜ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ํŠนํžˆ network์— ๋Œ€ํ•œ ์„ค๊ณ„์™€ ๊ทธ์— ๋Œ€ํ•œ ์„ฌ์„ธํ•œ ํ‰๊ฐ€๊ฐ€ ์ด๋ฃจ์–ด์ง€๋Š” ๋‹ค๋ฅธ ๋…ผ๋ฌธ๋“ค๊ณผ๋Š” ๋‹ค๋ฅด๊ฒŒ ๋ฐฉ๋ฒ•๋ก ๊ณผ ์•Œ๊ณ ๋ฆฌ์ฆ˜์— ๋Œ€ํ•œ ์„ค๊ณ„์™€ ๊ทธ์— ๋Œ€ํ•œ ์ด๋ก ์ ์ธ ๊ฒ€์ฆ์ด ๋“ค์–ด๊ฐ€๋Š” ๋ถ€๋ถ„์ด ์ฐจ๋ณ„์ ์ด๊ณ  ์‹ ์„ ํ•˜๊ฒŒ ๋Š๊ปด์กŒ๋˜ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.
์—ฌ๊ธฐ์„œ๋Š” ๋‹ค๋ฃจ์ง€ ์•Š์•˜์ง€๋งŒ, ๋…ผ๋ฌธ์—์„œ future work๋กœ ๋ฐœ์ „ํ•ด๋‚˜๊ฐˆ ์ˆ˜ ์žˆ๋Š” ์‚ฌํ•ญ๋“ค์„ ์ œ์‹œํ•˜๋Š”๋ฐ ๊ถ๊ธˆํ•˜์‹  ๋ถ„๋“ค์€ ์ฐพ์•„๋ณด์…”๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๊ผญ ์ด ๋ถ€๋ถ„์ด ์•„๋‹ˆ๋”๋ผ๋„ ํ•œ ๋ฒˆ ์ฏค์€ ์ฝ์–ด๋ณด์‹œ๋Š” ๊ฒƒ์„ ์ถ”์ฒœ๋“œ๋ฆฝ๋‹ˆ๋‹ค!