SlideShare a Scribd company logo
1 of 20
Enhancing VAEs for Collaborative Filtering:
Flexible Priors & Gating Mechanisms
(2019)
Seung Woo Kim
Movie Lens Recommendation
Leader-board and Champion Model
Introduction
Kaggle MovieLens Recommendation Leader Board
Kaggle MovieLens Recommendation Leader Board
[Data Set]
Related Works
Vanilia VAE (Variational Auto Encoder)
https://ratsgo.github.io/generative%20model/2018/01/27/VAE/ https://github.com/AntixK/PyTorch-VAE/blob/master/models/vanilla_vae.py
Encoder
Mean Vector
Std Vector
Sampled
Latent
Space
Sample Noise
*
+
Decoder
MSE
Loss
-KL
Loss
+
reparameterization Trick
Variationa
l
Inference
N(0,1)
Loss =
Amortized Inference
Reconstruction
Error
Loss = +
Regularization
Error
Variational Auto Encoder 논문은 이해하기가 난해한 측면이 있는데, 이는 통계적인 접근 방법으로 전체를
설명하고, 그래서 결론적으로 만들어 보니 Encoder - Decoder 구조의 신경망과 Loss 가 설계되었다의 순서로
이야기가 진행되기 때문인것 같다. 그래서 역으로 신경망 구조를 먼저 시각화 해놓고, 논문에서 이야기하는
논리가 무엇인지를 순서대로 이해하는 방법으로 풀어가보고자 한다.
Vanilia VAE (Variational Auto Encoder)
[Amortized Inference] 원래 데이터 마다 latent vector 인 z 를 구하기 위한 아래 도표로 하면 stochastic
variational inference 의 ksi는 z 의 수만큼 필요한 문제가 있어서, VAE 에서는 데이터 x를 받아서 z 를 생성하
는 모델 phi를 전체 훈련 데이터로 훈련하고, 이 모델 phi 가 데이터 x 를 받아서 매번 다른 z 를 생성하는 형태
로 연산량을 절약한다는 이야기인데, 근데 신경망 구조로 보면 결국 z를 Encoder를 붙였음이 결론이다 => 공
통된 Encoder 가 주어진 데이터에 맞는 z를 생성해 줄꺼야!
Encoder (x1~xn 데이터 전체 훈련된 모델)
https://ricoshin.tistory.com/3
x 別 ksi 가 필요함
x
https://arxiv.org/pdf/1711.05597.pdf
Vanilia VAE (Variational Auto Encoder)
[Reparameterization trick] VAE 는 기본적으로 평균과 분산을 Encoder 에서 추출하여 어떤 분포를 만들고, 이
분포에 가장 적합한 데이터를 Decoder 를 통해서 Generation 해내는 것이 그 설계 목적이다. 그 의미 그대로 해
석해서 신경망을 설계하면 그림에서 좌측과 같이 평균과 분석으로 Distribution 을 만들고 이것을 Decoder 에 넣
어야 하는데 이렇게 하면 Back Prop 이 안된다. 왜냐면, Graph 상으로 연결이 안되어 있기 때문이다. 그래서
Noise Distribution 을 만들고 여기에 분산을 곱하고 평균을 더해서 Decoder 에 연결하는 Trick 을 사용한다
=> 이제 그래프에 연결되었다 !!
https://gregorygundersen.com/blog/2018/04/29/reparameterization/
Back Prop 불가 Back Prop 가능
Vanilia VAE (Variational Auto Encoder)
[ELBO : Evidence Lowerbound] ELBO = Reconstruction Term + Regularlization Term 으로 구성된다. 여기에
서 원래 가정은 뭐였는데, 구할수가 없어서 정규분포로 대신하고 어쩌구 이런 이야기들은 뒤에 하고, 그냥 신경
망 관점에서 Loss Function 으로만 생각하고 보면 너무 간단하다. Decoder 가 만들어낸 데이터가 원래 데이터
와 가까워 지도록 훈련해야 하니 그 차이를 MSE Loss로 설계하고, Z(Latent Space) 를 통제하기 좋은 형태가
되도록 유도하려고 하니 정규분포와 Ecnoder 와 Reparameterized를 통해 생성된 Z 와의 차이를 최소화하도록
하는 Term 추가 사실 이렇게 해석하면 신경망 관점에서는 끝이다.
VAE with a VampPrior
https://arxiv.org/pdf/1705.07120.pdf
Vamp Prior 논문 및 코드를 확인 결과 Loss Function 만 차이가 있다. 그 차이는 p(z) 에대한 정의의 차이인데,
Vanila VAE 에서는 N(0,1) 로 보통 정의하는 Prior 를 Pseudo 라고 지칭하는 Sample 된 데이터들의 평균 분포
로 대체하는 것이 핵심이다. 직관적으로 생각해보면, 그냥 Gaussian 에 수렴하게 훈련하세요 보다는, q_pi함
수의 결과 값의 평균을 사용하는게 더 합리적이라고 생각된다.
Vanilia VAE
Sample (k개) Over fitting 방지
Encoder
sample 수
https://github.com/AntixK/PyTorch-VAE/blob/master/models/vanilla_vae.py
Variational Autoencoders for Collaborative Filtering
이 논문은 Vanilia VAE 와의 차이점은 데이터 구성을 CF 로 하였다는 점(user x item) , Loss Function에 Binary
Cross Entropy 를 사용했다는 점, KL 에 Annealing 라는 가중치를 부여하였다는 점 3가지로 요약된다.
https://arxiv.org/pdf/1802.05814.pdf
annealing
(가중치)
Item (Bag of Words)
u
s
e
r
Encoder
Mean Vector
Std Vector
Sampled
Latent
Space
Sample Noise
*
+
Decoder
BCE
Loss
-KL
Loss
+
reparameterization Trick Variationa
l
Inference
N(0,1)
Loss =
Amortized Inference
Item (Bag of Words)
u
s
e
r
*
https://github.com/mkfilipiuk/VAE-CF
Champion Model
Enhancing VAEs for Collaborative Filtering: Flexible
Priors & Gating Mechanisms
https://arxiv.org/ftp/arxiv/papers/1911/1911.00936.pdf
이 논문은 Variational Autoencoders for Collaborative Filtering 을 Base 로 하고 있으며, 단순히 Layer를
추가하는 것으로 성능이 향상되지 않아, Gated Mechanism 의 적용과 VampPrior 적용 두 가지가 핵심이다.
annealing
(가중치)
Item (Bag of Words)
u
s
e
r
Encoder
(Gated
Mechanism)
Mean Vector
Std Vector
Sampled
Latent
Space
Sample Noise
*
+
Decoder
(Gated
Mechanism)
BCE
Loss
-KL
Loss
+
reparameterization Trick
Loss =
Amortized Inference
Item (Bag of Words)
u
s
e
r
* VampPrior
Binary Cross Entropy
Enhancing VAEs for Collaborative Filtering: Flexible
Priors & Gating Mechanisms
https://arxiv.org/ftp/arxiv/papers/1911/1911.00936.pdf
⊗ is the element-wise product with 𝑿 the
input of the layer and 𝑾, 𝑽, 𝒃, 𝒄 learned
parameters, and 𝜎 the sigmoid function.
[FCC Version gated Mechanism]
Language modeling with gated convolutional networks.(2016) 논문의 아이디어를 차용하여, AutoEncoder에
적용 함. W ,V, B, C 는 모두 학습되는 Parameter 이며, Gate Vector 생성에 사용되는 Activation Function 은
Sigmoid 이다. => 이게 Vanishing Gradient 문제를 해결해 준다고 하는 듯.
More to Think about..
Multi Level VAE
Encoder
Mean Vector
Std Vector
[Style]
Sampled
Latent
Space
Random
*
+
Decoder
Mean Vector
Std Vector
[Group]
Sampled
Latent
Space
Random
*
+
concat
https://github.com/ananyahjha93/multi-level-vae/blob/master/training.py
Multi Level VAE 의 Concept 은 기본적인 VAE 와 약간 다릅니다. 기본적인 VAE 와는 달리 Group Latent
Space를 추가하였습니다. Reparamerization 시 전체 훈련 데이터 대해서 동일한 Noise 를 사용하는 VAE와는
달리 Group Latent 는 우리가 알고 있는 Label 별 Noise 를 따로 관리하여 훈련하는 구조를 가지고 있습니다.
Label 별 Latent Space Vector 사용
Multi Level VAE
https://github.com/ananyahjha93/multi-level-vae/blob/master/training.py
이러한 구조를 통해서 이루고자 하는 목적은 아래 그림으로 잘 설명이 됩니다. 기존의 VAE 는 입력이 되는 x
의 그룹과 항상 동일한 데이터만 생성하게 됩니다. 하지만 ML-VAE 에서는 두개의 Latent 를 분리하였기 때문
에
아래의 예시처럼 두가지 다른 조합을 통한 생성이 가능하게 됩니다.
Multi Level VAE
아래와 같은 예시들이 ML VAE 의 결과물이라고 볼 수 있습니다. 추천에 있어서 Random 성은 굉장히 중요하
다고 생각합니다. 상품 추천에 있어서, Group 이라는 요소를 활용하며, 추천에 Random 성격을 부여하거나,
원하는 상품 그룹으로 추천을 한다던지 하는 적용이 가능하지 않을지 고민해면 어떨지요.
You Tube Recommendation
현재 대부분의 추천 알고리즘 논문은 MovieLens 와 같은 Toy Data 에 기반하여 만들어져 있습니다. You-
Tube 논문도 실제 시스템 구축을 위해서는 더 많은 고민이 필요해 보지만, 다른 실험실에서만 동작하는 논문
들 보다는 실용성 측면의 고민이 많이 가미되었다고 생각합니다. 그렇다면 VAE-CF 같은 연구들이 실무에서
는 아주 무가치할까요? You Tube 추천 시스템의 Candidate Generation 에 사용해 보면 어떨지 고민해 봅니다

More Related Content

Similar to Enhancing VAEs for collaborative filtering : flexible priors & gating mechanisms

"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav DukhinFwdays
 
Working Effectively With Legacy Perl Code
Working Effectively With Legacy Perl CodeWorking Effectively With Legacy Perl Code
Working Effectively With Legacy Perl Codeerikmsp
 
jefferson-mae Masked Autoencoders based Pretraining
jefferson-mae Masked Autoencoders based Pretrainingjefferson-mae Masked Autoencoders based Pretraining
jefferson-mae Masked Autoencoders based Pretrainingcevesom156
 
MV(C, mvvm) in iOS and ReactiveCocoa
MV(C, mvvm) in iOS and ReactiveCocoaMV(C, mvvm) in iOS and ReactiveCocoa
MV(C, mvvm) in iOS and ReactiveCocoaYi-Shou Chen
 
Real world java_ee_patterns
Real world java_ee_patternsReal world java_ee_patterns
Real world java_ee_patternsAlassane Diallo
 
Ben Agre - Adding Another Level of Hell to Reverse Engineering
Ben Agre - Adding Another Level of Hell to Reverse EngineeringBen Agre - Adding Another Level of Hell to Reverse Engineering
Ben Agre - Adding Another Level of Hell to Reverse EngineeringSource Conference
 
Chapter 14 AutoEncoder
Chapter 14 AutoEncoderChapter 14 AutoEncoder
Chapter 14 AutoEncoderKyeongUkJang
 
ujava.org Deep Learning with Convolutional Neural Network
ujava.org Deep Learning with Convolutional Neural Network ujava.org Deep Learning with Convolutional Neural Network
ujava.org Deep Learning with Convolutional Neural Network 신동 강
 
Evo star2012 Robot Base Disturbance Optimization with Compact Differential Ev...
Evo star2012 Robot Base Disturbance Optimization with Compact Differential Ev...Evo star2012 Robot Base Disturbance Optimization with Compact Differential Ev...
Evo star2012 Robot Base Disturbance Optimization with Compact Differential Ev...Fabio Caraffini
 
닷넷 개발자를 위한 패턴이야기
닷넷 개발자를 위한 패턴이야기닷넷 개발자를 위한 패턴이야기
닷넷 개발자를 위한 패턴이야기YoungSu Son
 
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben EvansJava Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben EvansJAX London
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS MeetupLINAGORA
 
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...tutorialsruby
 
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...tutorialsruby
 
Matrix Multiplication with Ateji PX for Java
Matrix Multiplication with Ateji PX for JavaMatrix Multiplication with Ateji PX for Java
Matrix Multiplication with Ateji PX for JavaPatrick Viry
 
Modular Java EE in the Cloud
Modular Java EE in the CloudModular Java EE in the Cloud
Modular Java EE in the CloudBert Ertman
 
Object Oriented Concepts in Real Projects
Object Oriented Concepts in Real ProjectsObject Oriented Concepts in Real Projects
Object Oriented Concepts in Real ProjectsEPAM
 

Similar to Enhancing VAEs for collaborative filtering : flexible priors & gating mechanisms (20)

"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
 
Working Effectively With Legacy Perl Code
Working Effectively With Legacy Perl CodeWorking Effectively With Legacy Perl Code
Working Effectively With Legacy Perl Code
 
jefferson-mae Masked Autoencoders based Pretraining
jefferson-mae Masked Autoencoders based Pretrainingjefferson-mae Masked Autoencoders based Pretraining
jefferson-mae Masked Autoencoders based Pretraining
 
MV(C, mvvm) in iOS and ReactiveCocoa
MV(C, mvvm) in iOS and ReactiveCocoaMV(C, mvvm) in iOS and ReactiveCocoa
MV(C, mvvm) in iOS and ReactiveCocoa
 
Real world java_ee_patterns
Real world java_ee_patternsReal world java_ee_patterns
Real world java_ee_patterns
 
Ben Agre - Adding Another Level of Hell to Reverse Engineering
Ben Agre - Adding Another Level of Hell to Reverse EngineeringBen Agre - Adding Another Level of Hell to Reverse Engineering
Ben Agre - Adding Another Level of Hell to Reverse Engineering
 
Chapter 14 AutoEncoder
Chapter 14 AutoEncoderChapter 14 AutoEncoder
Chapter 14 AutoEncoder
 
ujava.org Deep Learning with Convolutional Neural Network
ujava.org Deep Learning with Convolutional Neural Network ujava.org Deep Learning with Convolutional Neural Network
ujava.org Deep Learning with Convolutional Neural Network
 
Evo star2012 Robot Base Disturbance Optimization with Compact Differential Ev...
Evo star2012 Robot Base Disturbance Optimization with Compact Differential Ev...Evo star2012 Robot Base Disturbance Optimization with Compact Differential Ev...
Evo star2012 Robot Base Disturbance Optimization with Compact Differential Ev...
 
닷넷 개발자를 위한 패턴이야기
닷넷 개발자를 위한 패턴이야기닷넷 개발자를 위한 패턴이야기
닷넷 개발자를 위한 패턴이야기
 
JAVA Collection and generics
JAVA Collection and genericsJAVA Collection and generics
JAVA Collection and generics
 
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben EvansJava Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
Java Core | Modern Java Concurrency | Martijn Verburg & Ben Evans
 
Java Starting
Java StartingJava Starting
Java Starting
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS Meetup
 
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
 
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
 
Matrix Multiplication with Ateji PX for Java
Matrix Multiplication with Ateji PX for JavaMatrix Multiplication with Ateji PX for Java
Matrix Multiplication with Ateji PX for Java
 
Javamschn3
Javamschn3Javamschn3
Javamschn3
 
Modular Java EE in the Cloud
Modular Java EE in the CloudModular Java EE in the Cloud
Modular Java EE in the Cloud
 
Object Oriented Concepts in Real Projects
Object Oriented Concepts in Real ProjectsObject Oriented Concepts in Real Projects
Object Oriented Concepts in Real Projects
 

More from seungwoo kim

Graph neural network #2-2 (heterogeneous graph transformer)
Graph neural network #2-2 (heterogeneous graph transformer)Graph neural network #2-2 (heterogeneous graph transformer)
Graph neural network #2-2 (heterogeneous graph transformer)seungwoo kim
 
Graph Neural Network #2-1 (PinSage)
Graph Neural Network #2-1 (PinSage)Graph Neural Network #2-1 (PinSage)
Graph Neural Network #2-1 (PinSage)seungwoo kim
 
Graph neural network 2부 recommendation 개요
Graph neural network  2부  recommendation 개요Graph neural network  2부  recommendation 개요
Graph neural network 2부 recommendation 개요seungwoo kim
 
Graph Neural Network 1부
Graph Neural Network 1부Graph Neural Network 1부
Graph Neural Network 1부seungwoo kim
 
Deep neural networks for You-Tube recommendations
Deep neural networks for You-Tube recommendationsDeep neural networks for You-Tube recommendations
Deep neural networks for You-Tube recommendationsseungwoo kim
 
XAI recent researches
XAI recent researchesXAI recent researches
XAI recent researchesseungwoo kim
 
Siamese neural networks+Bert
Siamese neural networks+BertSiamese neural networks+Bert
Siamese neural networks+Bertseungwoo kim
 
MRC recent trend_ppt
MRC recent trend_pptMRC recent trend_ppt
MRC recent trend_pptseungwoo kim
 
NLP Deep Learning with Tensorflow
NLP Deep Learning with TensorflowNLP Deep Learning with Tensorflow
NLP Deep Learning with Tensorflowseungwoo kim
 

More from seungwoo kim (10)

Graph neural network #2-2 (heterogeneous graph transformer)
Graph neural network #2-2 (heterogeneous graph transformer)Graph neural network #2-2 (heterogeneous graph transformer)
Graph neural network #2-2 (heterogeneous graph transformer)
 
Graph Neural Network #2-1 (PinSage)
Graph Neural Network #2-1 (PinSage)Graph Neural Network #2-1 (PinSage)
Graph Neural Network #2-1 (PinSage)
 
Graph neural network 2부 recommendation 개요
Graph neural network  2부  recommendation 개요Graph neural network  2부  recommendation 개요
Graph neural network 2부 recommendation 개요
 
Graph Neural Network 1부
Graph Neural Network 1부Graph Neural Network 1부
Graph Neural Network 1부
 
Deep neural networks for You-Tube recommendations
Deep neural networks for You-Tube recommendationsDeep neural networks for You-Tube recommendations
Deep neural networks for You-Tube recommendations
 
XAI recent researches
XAI recent researchesXAI recent researches
XAI recent researches
 
Albert
AlbertAlbert
Albert
 
Siamese neural networks+Bert
Siamese neural networks+BertSiamese neural networks+Bert
Siamese neural networks+Bert
 
MRC recent trend_ppt
MRC recent trend_pptMRC recent trend_ppt
MRC recent trend_ppt
 
NLP Deep Learning with Tensorflow
NLP Deep Learning with TensorflowNLP Deep Learning with Tensorflow
NLP Deep Learning with Tensorflow
 

Recently uploaded

Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxMohammedJunaid861692
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一ffjhghh
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Delhi Call girls
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 

Recently uploaded (20)

Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 

Enhancing VAEs for collaborative filtering : flexible priors & gating mechanisms

  • 1. Enhancing VAEs for Collaborative Filtering: Flexible Priors & Gating Mechanisms (2019) Seung Woo Kim
  • 2. Movie Lens Recommendation Leader-board and Champion Model Introduction
  • 4. Kaggle MovieLens Recommendation Leader Board [Data Set]
  • 5.
  • 7. Vanilia VAE (Variational Auto Encoder) https://ratsgo.github.io/generative%20model/2018/01/27/VAE/ https://github.com/AntixK/PyTorch-VAE/blob/master/models/vanilla_vae.py Encoder Mean Vector Std Vector Sampled Latent Space Sample Noise * + Decoder MSE Loss -KL Loss + reparameterization Trick Variationa l Inference N(0,1) Loss = Amortized Inference Reconstruction Error Loss = + Regularization Error Variational Auto Encoder 논문은 이해하기가 난해한 측면이 있는데, 이는 통계적인 접근 방법으로 전체를 설명하고, 그래서 결론적으로 만들어 보니 Encoder - Decoder 구조의 신경망과 Loss 가 설계되었다의 순서로 이야기가 진행되기 때문인것 같다. 그래서 역으로 신경망 구조를 먼저 시각화 해놓고, 논문에서 이야기하는 논리가 무엇인지를 순서대로 이해하는 방법으로 풀어가보고자 한다.
  • 8. Vanilia VAE (Variational Auto Encoder) [Amortized Inference] 원래 데이터 마다 latent vector 인 z 를 구하기 위한 아래 도표로 하면 stochastic variational inference 의 ksi는 z 의 수만큼 필요한 문제가 있어서, VAE 에서는 데이터 x를 받아서 z 를 생성하 는 모델 phi를 전체 훈련 데이터로 훈련하고, 이 모델 phi 가 데이터 x 를 받아서 매번 다른 z 를 생성하는 형태 로 연산량을 절약한다는 이야기인데, 근데 신경망 구조로 보면 결국 z를 Encoder를 붙였음이 결론이다 => 공 통된 Encoder 가 주어진 데이터에 맞는 z를 생성해 줄꺼야! Encoder (x1~xn 데이터 전체 훈련된 모델) https://ricoshin.tistory.com/3 x 別 ksi 가 필요함 x https://arxiv.org/pdf/1711.05597.pdf
  • 9. Vanilia VAE (Variational Auto Encoder) [Reparameterization trick] VAE 는 기본적으로 평균과 분산을 Encoder 에서 추출하여 어떤 분포를 만들고, 이 분포에 가장 적합한 데이터를 Decoder 를 통해서 Generation 해내는 것이 그 설계 목적이다. 그 의미 그대로 해 석해서 신경망을 설계하면 그림에서 좌측과 같이 평균과 분석으로 Distribution 을 만들고 이것을 Decoder 에 넣 어야 하는데 이렇게 하면 Back Prop 이 안된다. 왜냐면, Graph 상으로 연결이 안되어 있기 때문이다. 그래서 Noise Distribution 을 만들고 여기에 분산을 곱하고 평균을 더해서 Decoder 에 연결하는 Trick 을 사용한다 => 이제 그래프에 연결되었다 !! https://gregorygundersen.com/blog/2018/04/29/reparameterization/ Back Prop 불가 Back Prop 가능
  • 10. Vanilia VAE (Variational Auto Encoder) [ELBO : Evidence Lowerbound] ELBO = Reconstruction Term + Regularlization Term 으로 구성된다. 여기에 서 원래 가정은 뭐였는데, 구할수가 없어서 정규분포로 대신하고 어쩌구 이런 이야기들은 뒤에 하고, 그냥 신경 망 관점에서 Loss Function 으로만 생각하고 보면 너무 간단하다. Decoder 가 만들어낸 데이터가 원래 데이터 와 가까워 지도록 훈련해야 하니 그 차이를 MSE Loss로 설계하고, Z(Latent Space) 를 통제하기 좋은 형태가 되도록 유도하려고 하니 정규분포와 Ecnoder 와 Reparameterized를 통해 생성된 Z 와의 차이를 최소화하도록 하는 Term 추가 사실 이렇게 해석하면 신경망 관점에서는 끝이다.
  • 11. VAE with a VampPrior https://arxiv.org/pdf/1705.07120.pdf Vamp Prior 논문 및 코드를 확인 결과 Loss Function 만 차이가 있다. 그 차이는 p(z) 에대한 정의의 차이인데, Vanila VAE 에서는 N(0,1) 로 보통 정의하는 Prior 를 Pseudo 라고 지칭하는 Sample 된 데이터들의 평균 분포 로 대체하는 것이 핵심이다. 직관적으로 생각해보면, 그냥 Gaussian 에 수렴하게 훈련하세요 보다는, q_pi함 수의 결과 값의 평균을 사용하는게 더 합리적이라고 생각된다. Vanilia VAE Sample (k개) Over fitting 방지 Encoder sample 수 https://github.com/AntixK/PyTorch-VAE/blob/master/models/vanilla_vae.py
  • 12. Variational Autoencoders for Collaborative Filtering 이 논문은 Vanilia VAE 와의 차이점은 데이터 구성을 CF 로 하였다는 점(user x item) , Loss Function에 Binary Cross Entropy 를 사용했다는 점, KL 에 Annealing 라는 가중치를 부여하였다는 점 3가지로 요약된다. https://arxiv.org/pdf/1802.05814.pdf annealing (가중치) Item (Bag of Words) u s e r Encoder Mean Vector Std Vector Sampled Latent Space Sample Noise * + Decoder BCE Loss -KL Loss + reparameterization Trick Variationa l Inference N(0,1) Loss = Amortized Inference Item (Bag of Words) u s e r * https://github.com/mkfilipiuk/VAE-CF
  • 14. Enhancing VAEs for Collaborative Filtering: Flexible Priors & Gating Mechanisms https://arxiv.org/ftp/arxiv/papers/1911/1911.00936.pdf 이 논문은 Variational Autoencoders for Collaborative Filtering 을 Base 로 하고 있으며, 단순히 Layer를 추가하는 것으로 성능이 향상되지 않아, Gated Mechanism 의 적용과 VampPrior 적용 두 가지가 핵심이다. annealing (가중치) Item (Bag of Words) u s e r Encoder (Gated Mechanism) Mean Vector Std Vector Sampled Latent Space Sample Noise * + Decoder (Gated Mechanism) BCE Loss -KL Loss + reparameterization Trick Loss = Amortized Inference Item (Bag of Words) u s e r * VampPrior Binary Cross Entropy
  • 15. Enhancing VAEs for Collaborative Filtering: Flexible Priors & Gating Mechanisms https://arxiv.org/ftp/arxiv/papers/1911/1911.00936.pdf ⊗ is the element-wise product with 𝑿 the input of the layer and 𝑾, 𝑽, 𝒃, 𝒄 learned parameters, and 𝜎 the sigmoid function. [FCC Version gated Mechanism] Language modeling with gated convolutional networks.(2016) 논문의 아이디어를 차용하여, AutoEncoder에 적용 함. W ,V, B, C 는 모두 학습되는 Parameter 이며, Gate Vector 생성에 사용되는 Activation Function 은 Sigmoid 이다. => 이게 Vanishing Gradient 문제를 해결해 준다고 하는 듯.
  • 16. More to Think about..
  • 17. Multi Level VAE Encoder Mean Vector Std Vector [Style] Sampled Latent Space Random * + Decoder Mean Vector Std Vector [Group] Sampled Latent Space Random * + concat https://github.com/ananyahjha93/multi-level-vae/blob/master/training.py Multi Level VAE 의 Concept 은 기본적인 VAE 와 약간 다릅니다. 기본적인 VAE 와는 달리 Group Latent Space를 추가하였습니다. Reparamerization 시 전체 훈련 데이터 대해서 동일한 Noise 를 사용하는 VAE와는 달리 Group Latent 는 우리가 알고 있는 Label 별 Noise 를 따로 관리하여 훈련하는 구조를 가지고 있습니다. Label 별 Latent Space Vector 사용
  • 18. Multi Level VAE https://github.com/ananyahjha93/multi-level-vae/blob/master/training.py 이러한 구조를 통해서 이루고자 하는 목적은 아래 그림으로 잘 설명이 됩니다. 기존의 VAE 는 입력이 되는 x 의 그룹과 항상 동일한 데이터만 생성하게 됩니다. 하지만 ML-VAE 에서는 두개의 Latent 를 분리하였기 때문 에 아래의 예시처럼 두가지 다른 조합을 통한 생성이 가능하게 됩니다.
  • 19. Multi Level VAE 아래와 같은 예시들이 ML VAE 의 결과물이라고 볼 수 있습니다. 추천에 있어서 Random 성은 굉장히 중요하 다고 생각합니다. 상품 추천에 있어서, Group 이라는 요소를 활용하며, 추천에 Random 성격을 부여하거나, 원하는 상품 그룹으로 추천을 한다던지 하는 적용이 가능하지 않을지 고민해면 어떨지요.
  • 20. You Tube Recommendation 현재 대부분의 추천 알고리즘 논문은 MovieLens 와 같은 Toy Data 에 기반하여 만들어져 있습니다. You- Tube 논문도 실제 시스템 구축을 위해서는 더 많은 고민이 필요해 보지만, 다른 실험실에서만 동작하는 논문 들 보다는 실용성 측면의 고민이 많이 가미되었다고 생각합니다. 그렇다면 VAE-CF 같은 연구들이 실무에서 는 아주 무가치할까요? You Tube 추천 시스템의 Candidate Generation 에 사용해 보면 어떨지 고민해 봅니다