Factorization Machines (ICDM 2010) èªãã
Factorization Machines (pdf)
Factorization Machines with libFM (TOIS, pdf)
CriteoãAvazuã® Click-through rate ã³ã³ãã§ãè¯ãæ績ãæ®ãã¦ãã (GitHub - guestwalk/kaggle-2014-criteo, GitHub - guestwalk/kaggle-avazu) Field-aware Factorization Machinesãç¥ãåã«ã¾ã㯠Factorization Machnes (以ä¸FM) ã®è«æãèªãäºã«ããï¼
FMã®ç´¹ä»ã¯ä»ã®äºº(Factorization Machinesについて調べてみたï¼Matrix Factorizationとは)ãæ¢ã«æ¸ãã¦ãããï¼ããããèªãã§ãã©ãã«ãèªåã«ã¯ãã³ã¨ããªãã£ãï¼å ·ä½çã«ã¯ï¼
- 交äºä½ç¨ãèãããã¨ããã¨ãã©ã¡ã¼ã¿ãè¨å¤§/ãã¤ã¹ãã¼ã¹ã«ãªãã®ã§ã¯ãªãã
- ããã ãã§ãªãï¼è¨ç®éçã«å³ããã®ã§ã¯ãªãã
- factorizaion ã¨ã¯ä½ãæãã¦ããã®ã
ã¨ããç¹ã§ããï¼
ãããã®çåã¸ã®è§£æ±ºçã¯é常ã«ãã£ããããå½¢ã§ç¾ããã¦ãã¦ï¼é常ã«é¢ç½ãã£ãï¼ãã£ã¨æ©ãï¼ããã¦å»å¹´èªãã°ããã£ãï¼
æ¦è¦
SVM 㨠Matrix Factorization ãçµã¿åãããã¢ãã«ã§ãã FM ãææ¡ããï¼
FM 㯠SVMãè¦æã¨ãã(æ¨è¦åé¡ã®ãããª)é常ã«ã¹ãã¼ã¹ãªãã¼ã¿ã«å¯¾å¿ãããã¨ãå¯è½ã§ããï¼
ãã¤ï¼è¡åå解ã«ãã¨ã¥ãã¢ãã«ãæ±ããåé¡(ä¸è¬çãªäºæ¸¬åé¡ã«å¯¾å¿ã§ããªããã¨ï¼åã³ï¼ããããã®ã¢ãã«ãåã¿ã¹ã¯ç¨ã«ç¹åãã¦ãããã¨)ã«ã対å¿ãã¦ããï¼
ã¾ã¨ããã¨ï¼é«æ¬¡å
ãã¤é常ã«ã¹ãã¼ã¹ãªãã¼ã¿ã«å¯¾ããä¸è¬çãªäºæ¸¬åé¡ã解ãããã®ææ³ã§ããï¼
å®å¼å
å
¥åxã¨åºåyãããã¨ããï¼yã¯å帰ã ãããåé¡ã ãããã©ã³ãã³ã°ã ããããªãã§ãããï¼ä»¥ä¸ï¼ã¦ã¼ã¶ãæ ç»ã«ã©ã®ãããªratingããããï¼ã¨ããä¾ã«çµãï¼
ã¾ãï¼1 rating ãä¸ã¤ã®å¦ç¿ãã¼ã¿ã¨ãã(購買ã®æèã§è¨ãã°ï¼1ãã©ã³ã¶ã¯ã·ã§ã³ã§ã¯ãªãï¼1ãã©ã³ã¶ã¯ã·ã§ã³ä¸ã®ä¸ã«å«ã¾ããå
¨ååã«ã¤ãã¦ï¼ããããã®ååãå¦ç¿ãã¼ã¿ã¨ãã)ï¼
ããã¦ï¼ã¦ã¼ã¶idãååidã1-of-K表ç¾ã®ç¹å¾´éã¨ãã¦å
¥åããï¼ã¦ã¼ã¶ã¨æ ç»ã®ratingãã¼ã¿ã ã£ãå ´åï¼ç¹å¾´éã®å¤§ãã㯠ã¦ã¼ã¶æ° * æ ç»æ° ã«ãªãï¼ãã¨ã¯ããã«å¥½ãåæã«ç¹å¾´éãå
¥ãã¦ããï¼è«æã§ã¯ããã¦ã¼ã¶ãããã¾ã§rateãã¤ããæ ç»ã«ã¤ã㦠1/(ãã®ã¦ã¼ã¶ãrateãã¤ããæ ç»ã®æ¬æ°) ã¨ãããè¬ã®ãã¯ãã«(A)ãï¼ããæ ç»ã¸ã® rate ããã¤ä»ããã(B)ï¼ãã® rate ãã¤ããåã«è¦ãæ ç»ã¯ä½ã(C)ï¼ã¨ãã£ãæãã§è¿½å ãã¦ããï¼
è½ã¡çãã¦èããã¨ï¼(B)ã¯ä¸æ¬¡å
ã§ããã¨ã¯ããï¼(A)ã(C)ã®ãã¯ãã«ã¯ããããå
¨æ ç»æ°ã®é·ããæã¤ããï¼çµæã¨ãã¦ãã®ç¹å¾´éã¯é常ã«å¤§ããï¼ãã¤ï¼ã¹ãã¼ã¹ã«ãªãï¼ãã®ãããªãã¼ã¿ã«å¯¾ãã¦äº¤äºä½ç¨ãèããã¨é常ã«å³ããäºã«ãªãã¨æãããï¼ãï¼FMãªãã°åé¡ãªãï¼
ã§ã¯ã©ããããã¨ããã¨ï¼FM ã¯æ¬¡ã®ããã«ã¢ãã«ãæ§ç¯ãã(以ä¸ã¯äº¤äºä½ç¨ã®æ¬¡å
ã¨ãã¦ãããï¼ãããã§ãèæ
®å¯è½)ï¼nã¯ç¹å¾´éã®æ¬¡å
æ°ï¼
ãã®å¼ã®åè¦ç´ ãè¦ã¦ããã¨ï¼ä¸é
ç®ã¯å®æ°é
ï¼äºé
ç®ã¯æ®éã®ç·å½¢ã¢ãã«ã表ç¾ãã¦ãããã¨ããããï¼éè¦ãªã®ã¯ä¸é
ç®ï¼ããã§å¤æ°(ä»ã¯2å¤æ°)ã®äº¤äºä½ç¨ãã¢ãã«ã«çµã¿è¾¼ãã§ããï¼
交äºä½ç¨ã表ç¾ããã«ãããï¼æ°ãã«ç»å ´ããã®ãï¼ããã¯ï¼ã¨ãªããããªè¡åã«ãããçªç®ã®è¦ç´ ã§ããï¼kã¯è¡åå解ã«ãããåæ¸ãã次å
æ°ï¼ãããã¯ã¢ãã«ã«ããããããã¯æ°ã«ç¸å½ãããã¤ãã¼ãã©ã¡ã¼ã¿ï¼ãã®ä¸ã§ã¨ãã¦å¯¾å¿ãã2ã¤ã®ç¹å¾´éã®å
ç©ãåãï¼
ããã¯ã¤ã¾ãï¼ç¹å¾´éã®å次å
ã次å
ã®ãã¯ãã«ã§è¡¨ç¾ãï¼ãã¨ã¯ãã®ãã¯ãã«ã®å
ç©ãç¨ãã¦äº¤äºä½ç¨ã表ç¾ãã¦ããï¼æããï¼ç¹å¾´éãä½æ¬¡å
表ç¾ããã¨ããã matrix factorization ã«ç¸å½ãã¦ããï¼
交äºä½ç¨ã®éã¿ãVã«ãããå ç©ã§è¡¨ç¾ããã¨ä½ãå¬ããã
ããã®ä½ãããããã¨ããã¨ï¼èæ
®ãã交äºä½ç¨ã®æ°ããã£ã¨å¢ããããï¼ä¾ãã°100ã®å¤æ°ã®äº¤äºä½ç¨ãèããããªã£ãã¨ãããï¼
ä¾ãã°ãã®å ´åï¼FMã使ããã«ã¢ããªã³ã°ããããã¨ããã¨ï¼(交äºä½ç¨ã«çµã£ã¦è¨ãã°)çµã¿åããã«å¯¾ããéã¿ãæ¨å®ããå¿
è¦ãããï¼ããã¯ï¼ç¹å¾´éã®æ¬¡å
æ°ãnã¨ããã¨ã¨ãªãããé常ã«è¨å¤§ãªéã¨ãªãï¼å
¨ãç¾å®çã§ã¯ãªãï¼
ãããï¼FMã§ããã°ï¼äº¤äºä½ç¨ã®æ°ããããå¢ããã¨ãã¦ãï¼ãµã¤ãºã®è¡åã«ãããåè¦ç´ ã®å ç©ãç¹°ãè¿ãåãã ãã§æ¸ã(ãã®è¨ç®ã³ã¹ãã¯ããããã©ï¼ã®ãã©ã¡ã¼ã¿ãæ¨å®ããããã¯ã¾ã)ï¼ããªãã¡ï¼ãã©ã¡ã¼ã¿ã交äºä½ç¨ã®æ°ã«å ¨ãä¾åããªã(å®éã¯äº¤äºä½ç¨ã®æ°ãå¢ããã°å¢ããã»ã©ï¼ä¸ã¤ã®ã§è¡¨ç¾ãã¹ãæ å ±ã¯å¢ããããï¼Vã®æ¬¡å æ°ã§ããkãå¢ããå¿ è¦ãããã¨æããã)ï¼
ã¾ãï¼ãã¤ã¼ãã«è¨ç®ããã¨ï¼å¦ç¿ãã¼ã¿ã«ããã¦ä¸åº¦ãç»å ´ãã¦ããªãçµã¿åããã«å¯¾ãã交äºä½ç¨ãè¨ç®ã§ããªã(ä½æ ãªãã°xã®ç©ãåãé¨åã§ä¸åº¦ã§ã0ãåºã¦ããã¨ãã®é ãæ¶ãããã)ï¼ãããï¼FMã®ããã«ä½æ¬¡å ã®è¡åãèæ ®ãããã¨ã«ãã£ã¦ï¼äº¤äºä½ç¨éã®é¢ä¿ãèæ ®ããªããæ¨å®ãè¡ããã¨ã«ããï¼ç»å ´ãã¦ãªããã¢ã«å¯¾ãã交äºä½ç¨ãè¨ç®å¯è½ã«ãªãï¼ã¨ããã®ãã¡ãªããã§ããï¼ããã¯åæã«ï¼FMã¯äº¤äºä½ç¨åæãç¬ç«ã§ãªãï¼ã¨ãããã¨ãä»®å®ãã¦ããï¼
ãã®ä»
- 交äºä½ç¨é ã®è¨ç®ããã¤ã¼ãã«ããã¨ããããã©å¼å¤å½¢ããã¨ã§å¯è½
- ãã©ã¡ã¼ã¿æ¨å®ã¯SGDï¼TOISã®å稿ã«ã¯MCMCã«ããæ¨å®ãALSã«ããæ¨å®ãæ¸ãã¦ããï¼
- SVM(ç¹ã«çµã¿åãããèæ
®ã§ãã polynomial kernel)ã¨ã®æ¯è¼ã¯
- 交äºä½ç¨ãç¬ç«ã¨ãããå¦ã
- FMã¯ä¸»åé¡ã解ããã©SVMã¯å対åé¡ã解ãã¦ã(?)
- SVMã¯ãµãã¼ããã¯ã¿ã¼ãå¿ è¦ã ãã©FMã¯ãã©ã¡ã¼ã¿ã ãã§äºæ¸¬å¯è½
- FMã¯ãã ã® Matrix/Tensor Factorizationã ãã§ãªãï¼SVD++ï¼Pairwise Interaction Tensor Factorizationï¼Factorizing Personalized Markov Chains(Factorizing Personalized Markov Chains for Next-Basket Recommendation (WWW 2010) 読んだ - 糞ネット弁慶)ã®ä¸è¬å½¢ã¨ãã¦å®å¼åããã¦ããï¼ããã¯åé ã«è§¦ãããmatrix factorizationç³»ã®ã¢ãã«ã¯specificããããã¨ããåé¡ç¹ã¸ã®è§£çã¨ãªã£ã¦ããï¼ãããFMãæ±åã¢ãã«ã¨å¼ã°ããçç±ï¼