๐Ÿง‘๐Ÿป‍๐Ÿ’ป์šฉ์–ด ์ •๋ฆฌ
 
Non-Sequential vs. Sequential

 

Time-Series Data

  • Sequential Data๋ผ๊ณ  ์ƒ๊ฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • Non-Seuential Data๋Š” ์‹œ๊ฐ„ ์ •๋ณด๋ฅผ ํฌํ•จํ•˜์ง€ ์•Š๊ณ  ์ƒ์„ฑ๋˜๋Š” ๋ฐ์ดํ„ฐ์ž…๋‹ˆ๋‹ค.
    • ์ˆœ์ฐจ ๋ฐ์ดํ„ฐ๊ฐ€ ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐ์ดํ„ฐ๋Š” ์šฐ๋ฆฌ๊ฐ€ ๊ด€์ธกํ•˜๋Š” Data์˜ ๊ฐœ์ˆ˜์ธ N๊ณผ ๋ณ€์ˆ˜์˜ ๊ฐœ์ˆ˜์ธ D๋ฅผ ๊ณฑํ•œ ํ–‰๋ ฌ๋กœ ์ด๋ฃจ์–ด์ง‘๋‹ˆ๋‹ค.
  • Sequential Data๋Š” ์‹œ๊ฐ„ ์ •๋ณด๋ฅผ ํฌํ•จํ•˜์—ฌ ์ˆœ์ฐจ์ ์œผ๋กœ ์ƒ์„ฑ๋˜๋Š” ๋ฐ์ดํ„ฐ์ž…๋‹ˆ๋‹ค.
    • ์ˆœ์ฐจ๋ฐ์ดํ„ฐ์˜ ๊ฒฝ์šฐ ๋ฐ์ดํ„ฐ๋Š” N by T by D Tensor(๋˜๋Š” array)๋กœ ํ‘œํ˜„๋ฉ๋‹ˆ๋‹ค.
    • ๊ณผ๊ฑฐ์˜ ์ •๋ณด๊ฐ€ ๊ณ„์†์ ์œผ๋กœ ๋ˆ„์ ํ•ด์„œ ์ „๋‹ฌ์ด ๋˜๋Š” ๊ตฌ์กฐ์ž…๋‹ˆ๋‹ค.
    •  x์—์„œ hidden layer, ๊ทธ๋ฆฌ๊ณ  ์ถœ๋ ฅ y๋กœ ๊ฐ€๋Š” ๊ตฌ์กฐ์—์„œ ์ด๋Ÿฌํ•œ ์ž๊ธฐ ์ž์‹ ์„ ์ฐธ์กฐ๋กœ ํ•˜๋Š”, h์—์„œ h๋กœ ์—ฐ๊ฒฐ์ด ๋˜๋Š” ๊ตฌ์กฐ๊ฐ€ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์ด๋Ÿฌํ•œ ์ธ๊ณต์‹ ๊ฒฝ๋ง์„ ์ˆœํ™˜์‹ ๊ฒฝ๋ง์ด๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค.
  • ์ด ์ˆœํ™˜ ์‹ ๊ฒฝ๋ง์„ Vanlia RNN์ด๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค.
  • hyperbolic tangent function (tanh)๋ฅผ f๋ผ๋Š” ํ™œ์„ฑํ•จ์ˆ˜๋กœ ๊ฐ€์ •ํ•ฉ๋‹ˆ๋‹ค.
    • ์–ผ๋งˆ๋งŒํผ ํ‹€๋ ธ๋Š”์ง€๋ฅผ ํ™•์ธ ํ›„, ์—ญ ๋ฐฉํ–ฅ์œผ๋กœ ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ๊ฐ€์žฅ ํ˜„์žฌ ์ž…๋ ฅ๊ณผ ์ถœ๋ ฅ์˜ ์Œ์„ ์ž˜ ๋งž์ถœ ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์ธ์ง€๋ฅผ ๋ณด๋Š” ๊ฒƒ์ด back propagation์˜ ๋ชฉ์ ์ž…๋‹ˆ๋‹ค.
    • chain rule์„ ์ด์šฉํ•ด์„œ gradient๋ฅผ ํŽธ๋ฏธ๋ถ„ํ•˜์—ฌ ๊ตฌํ•ฉ๋‹ˆ๋‹ค.
      • ์ด ๊ฒฝ์šฐ, 1 - tanh^2 ํ•จ์ˆ˜์˜ ํŠน์„ฑ์œผ๋กœ ์ธํ•ด gradient exploding problem์ด ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
      • ์ด๊ฒƒ์„ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด LSTM, GRU์ด ์“ฐ์ž…๋‹ˆ๋‹ค.
      • ์–‘๋ฐฉํ–ฅ ์ˆœํ™˜์‹ ๊ฒฝ๋ง์„ ํ†ตํ•ด ์ •๋ณด์˜ ์ž…๋ ฅ์„ ์‹œ๊ฐ„์˜ ์ˆœ๋ฐฉํ–ฅ๊ณผ ์—ญ๋ฐฉํ–ฅ ๊ด€์ ์—์„œ ํ•จ๊ป˜ ์ฒ˜๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
      • Deep-Bidirectional RNN๋„ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ์ด๋Š” ์—ฌ๋Ÿฌ ๊ฐ€์ง€ hidden layer๋ฅผ ์Œ“๋Š” ๊ธฐ๋ฒ•์ž…๋‹ˆ๋‹ค.
      • ๊ทธ๋Ÿฌ๋‚˜ RNN์€ CNN๊ณผ ๋‹ค๋ฅด๊ฒŒ ์ธต์„ ๊นŠ๊ฒŒ ์Œ“๋Š” ๊ฒƒ์ด ์ข‹์€ ๊ฒƒ๋งŒ์€ ์•„๋‹™๋‹ˆ๋‹ค. ์ผ๋ฐ˜์ ์œผ๋กœ 2 ~ 4๊ฐœ์˜ ์ธต์ด max๊ฐ€ ๋ฉ๋‹ˆ๋‹ค.
      • attention ์€ ์–ด๋Š ์‹œ์  ์ •๋ณด๊ฐ€ RNN์˜ ์ตœ์ข… ์ถœ๋ ฅ ๊ฐ’์— ์˜ํ–ฅ์„ ๋ฏธ์น˜๋Š”์ง€๋ฅผ ์•Œ๋ ค์ค„ ์ˆ˜ ์žˆ๋Š” ๋งค์ปค๋‹ˆ์ฆ˜์ž…๋‹ˆ๋‹ค.
        • Bahadanau attention
        • Luong attention

BELATED ARTICLES

more