boostcampaitech3 / level2-dkt-level2-recsys-10

๋ถ€์ŠคํŠธ์บ ํ”„ AI Tech 3๊ธฐ RecSys-10 / ๐Ÿ‘จโ€๐Ÿซ Deep Knowledge Tracing(DKT) Competition ๐Ÿ‘จโ€๐Ÿซ
2 stars 5 forks source link

[model] Add UltraGCN model #35

Closed Gangtaro closed 2 years ago

Gangtaro commented 2 years ago

๐Ÿ’ก Issue

lightgcn baseline์— Ultragcn ๋ชจ๋ธ์„ ์ถ”๊ฐ€ํ•˜๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค. ์˜ค๋Š˜ ํ”ผ์–ด์„ธ์…˜๊นŒ์ง€ ์ž์›์ž ์—†์„์‹œ, ์ œ๊ฐ€ ํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

*์ถ”๊ฐ€

๐Ÿ“ TODO

๐Ÿ“š Reference

dongseoklee1541 commented 2 years ago

๋‚˜๋‹ค ์‹ถ์œผ๋ฉด ์†๋“œ์„ธ์š”

Gangtaro commented 2 years ago

UltraGCN ๋ชจ๋ธ์˜ ๋…ผ๋ฌธ์„ ํ•œ ๋ฒˆ ์ฝ์–ด๋ดค์Šต๋‹ˆ๋‹ค. ๊ฐœ๋…์€ LightGCN์˜ layer๊ฐ€ 1~4๊ฐœ์”ฉ ์Œ“๋Š” ๊ฒƒ์—์„œ, layer๊ฐ€ ์Œ“์ผ์ˆ˜๋ก ์–ด๋Š ๊ฐ’์œผ๋กœ ์œ ์ €์™€ ์•„์ดํ…œ์˜ ์ž„๋ฒ ๋”ฉ ๋ฒกํ„ฐ๊ฐ€ ํŠน์ • ๊ฐ’์œผ๋กœ ์ˆ˜๋ ดํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๋งŽ์€ Layer์˜ ๊ณ„์‚ฐ์ด ํ•„์š”์—†์–ด์„œ, ์ˆ˜๋ ดํ•œ ์ƒํƒœ์˜ layerํ•˜๋‚˜๋งŒ ํ•„์š”ํ•˜๋‹ค๋Š” ๊ฐœ๋…์—์„œ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ํ•ด๋‹น ์ˆ˜์‹๊ณผ ๊ด€๋ จ๋œ ๋‚ด์šฉ ์ž์ฒด๊ฐ€ Loss ๊ฐ’์„ ์–ด๋–ป๊ฒŒ ํ˜•์„ฑํ•˜๋Š๋ƒ์— ์ขŒ์šฐ ๋˜๋ฏ€๋กœ, ๊ธฐ์กด์˜ DKT์˜ Binary Classification ๋ฐฉ์‹์„ ์ ์šฉํ•˜๊ธฐ ํž˜๋“ค๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.

ํ•ด๋‹น ๋‚ด์šฉ์€ #9 RecBole lightgcn ์„ฑ๋Šฅ์ด Baseline์˜ lightgcn ์˜ ์„ฑ๋Šฅ๊ณผ ์ฐจ์ด๋‚˜๋Š” ์ด์œ ๋ฅผ ์ดํ•ดํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. RecBole์˜ ๊ฒฝ์šฐ, ํ’€์—ˆ๋˜ ๋ฌธ์ œ๋งŒ interaction์œผ๋กœ ๊ฐ€์ •ํ•˜๊ณ  ํ•ด๋‹น ๋งํฌ์˜ ์—ฐ๊ฒฐ์„ฑ์„ ๊ฐ€์ง€๊ณ ๋งŒ ํ•™์Šต์„ ์ง„ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ, Baseline ์˜ ๊ฒฝ์šฐ์—๋Š” Negative sampling์„ ํ•ด์ฃผ์ง€ ์•Š๊ณ , ์•„์ดํ…œ๊ณผ ์œ ์ € ์ž„๋ฒ ๋”ฉ ๋ฒกํ„ฐ์˜ dot product์˜ ๊ฐ’์„ label (0, 1)๊ณผ BCE loss ๊ฐ’์„ objective๋กœ ํ•˜์—ฌ ํ•™์Šตํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ฑ„ํƒํ•˜์—ฌ, ๊ธฐ์กด์˜ lightgcn์˜ ํ•™์Šต ๋ฐฉ๋ฒ•๊ณผ๋Š” ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ด๊ฒŒ ๋” ์„ฑ๋Šฅ์ด ์ข‹์•˜์Šต๋‹ˆ๋‹ค.

์ด๊ฒƒ์„ ๋‹ค์‹œ ๋งํ•˜์ž๋ฉด, ํ•ด๋‹น ๋Œ€ํšŒ์˜ ๋ฌธ์ œ ์ƒํ™ฉ์— ๋” ์˜ฌ๋ฐ”๋ฅธ ๋ฐฉ๋ฒ•์œผ๋กœ ๋ชจ๋ธ์˜ Loss ๊ฐ’์„ ๊ตฌํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” BCE Loss ๊ฐ’์„ ์ฑ„ํƒํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ, UltraGCN์˜ ๊ฒฝ์šฐ, ์• ์ดˆ์— ๊ฐœ๋… ์ž์ฒด๊ฐ€ LightGCN์˜ Recommeder System ์ƒํ™ฉ์„ ์ƒ์ •ํ•˜๊ณ  ์ด์— ๋Œ€ํ•œ ๊ทนํ•œ๊ฐ’์„ ์ถ”์ •ํ•˜์—ฌ ๊ทธ๊ฒƒ์„ Loss ๊ณ„์‚ฐ์— ์ ์šฉํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๋”ฐ๋ผ์„œ ๋…ผ๋ฌธ๊ณผ ์˜ˆ์‹œ ์ฝ”๋“œ์—์„œ ์ฃผ์–ด์ง„ Loss ๊ฐ’ ๊ณ„์‚ฐ์„ ๋ฌด์‹œํ•˜๊ฒŒ ๋˜๋ฉด ์ˆ˜๋งŽ์€ ๋‚ด์šฉ์„ ์žƒ์–ด๋ฒ„๋ฆฌ๊ฒŒ ๋˜๊ณ  ๋‹จ์ˆœ GCN Classification model๊ณผ ๋‹ค๋ฆ„์ด ์—†์–ด์ง„๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.

๊ทธ๋ž˜์„œ ์œ„์™€ ๊ฐ™์€ ์ด์œ ์— ๋”ฐ๋ฅธ ์„ฑ๋Šฅ์„ ๋ณด์žฅํ•  ์ˆ˜ ์—†์„ ๊ฒƒ ๊ฐ™๋‹ค๋Š” ๋ฆฌ์Šคํฌ์™€ ์‹œ๊ฐ„์ ์ธ ์š”์†Œ ๋•Œ๋ฌธ์— UltraGCN ๋ชจ๋ธ ๊ฐœ๋ฐœ์„ ์ž ์ • ์ค‘๋‹จํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

ahyeon0508 commented 2 years ago

๊ณ ์ƒ ๋งŽ์œผ์…จ์Šต๋‹ˆ๋‹ค!