SlideShare a Scribd company logo
1 of 32
Download to read offline
DistributedRepresentationsof
SentencesandDocuments
(2014) Quoc Le, Tomas Mikolov
발표: 곽근봉
© NBT All Rights Reserved.
이논문을선정한이유
추천 엔진에서의
Cold Start Problem
© NBT All Rights Reserved.
이논문을선정한이유
추천 엔진에서의
Cold Start Problem
컨텐츠 태깅
© NBT All Rights Reserved.
이논문을선정한이유
추천 엔진에서의
Cold Start Problem
컨텐츠 태깅
문서 유사도
© NBT All Rights Reserved.
이논문을선정한이유
추천 엔진에서의
Cold Start Problem
컨텐츠 태깅
컨텐츠 유사도컨텐츠 임베딩
© NBT All Rights Reserved.
참고 자료
Lucy Park님 Pycon 발표자료
https://www.lucypark.kr/docs/2015-pyconkr/#1
Ratsgo님 블로그
https://ratsgo.github.io/natural%20language%20processing/2017/03/08/word2vec/
PyData 2017 발표자료
https://www.youtube.com/watch?v=zFScws0mb7M
© NBT All Rights Reserved.
개요
Word2Vec의후속버전Doc2Vec
• 문장 분석을 위한 새로운 embedding방식을 제안
• Word2Vec의 아이디어를 활용
• PV-DM & PV-DBOW
© NBT All Rights Reserved.
문제정의–이논문에서풀고자했던것
• 문장, 문단, 문서의 특징을 capture할 수 있는 embedding
• Embedding을 통한 Classification 성능 향상
© NBT All Rights Reserved.
Word2Vec
딥러닝을 활용한 자연어처리에
단어가 출현하는 위치를 기반으로 단어를 학습시켜보자 (Skip-grams)
Center word
(Position t)
Output Context words
(m word window)
Output Context words
(m word window)
P(wt+1|wt)P(wt-1|wt)
“저는
P(wt-2|wt)
관심이 많습니다”
P(wt+2|wt)
© NBT All Rights Reserved.
Word2Vec
단어가 출현하는 위치를 기반으로 단어를 학습시켜보자
© NBT All Rights Reserved.
Word2Vec
학습 결과
의미, 문법과 관련된 정보들이 Capture 된다!
© NBT All Rights Reserved.
모델설명PV-DM
© NBT All Rights Reserved.
모델설명PV-DM(예시)
“나는 배가 고파서 밥을 먹었다”
Paragraph Dictionary Word Dictionary
ID Paragraph
1 나는 배가 고파
서 밥을 먹었다
ID Word
1 나는
2 배가
3 고파서
4 밥을
5 먹었다
© NBT All Rights Reserved.
모델설명PV-DM(예시)
“나는 배가 고파서 밥을 먹었다”
Paragraph Embedding Word Embedding
ID Paragraph
Embedding
1 [0.5, 0.41, 0.55
…]
ID Word Embedding
1 [0.2, 0.11, 0.55 …]
2 [0.9, 0.41, 0.75 …]
3 [0.4, 0.15, 0.53 …]
4 [0.3, 0.78, 0.48 …]
5 [0.6, 0.23, 0.12 …]
© NBT All Rights Reserved.
모델설명PV-DM(예시)
“나는 배가 고파서 밥을 먹었다”
Step Input Label
1 [나는 배가 고파서 밥을 먹었다, 나는, 배가, 고파서] 밥을
2 [나는 배가 고파서 밥을 먹었다, 배가, 고파서, 밥을] 먹었다
© NBT All Rights Reserved.
모델설명PV-DM(예시)
“나는 배가 고파서 밥을 먹었다”
Step Input Label
1 [d1, w1, w2, w3] w4
2 [d1, w2, w3, w4] w5
© NBT All Rights Reserved.
모델설명PV-DM(예시)
“나는 배가 고파서 밥을 먹었다”
Step Input Label
1
[[0.5, 0.41, 0.55 …], [0.2, 0.11, 0.55 …]
, [0.9, 0.41, 0.75 …], [0.4, 0.15, 0.53 …]]
[0,0,0,0,1,0]
2
[[0.5, 0.41, 0.55 …], [0.9, 0.41, 0.75 …],
[0.4, 0.15, 0.53 …], [0.3, 0.78, 0.48 …]]
[0,0,0,0,0,1]
© NBT All Rights Reserved.
PV-DMInferenceStage
© NBT All Rights Reserved.
모델설명PV-DBOW
© NBT All Rights Reserved.
모델설명PV-DBOW(예시)
“나는 배가 고파서 밥을 먹었다”
Step Input Label
1 나는 배가 고파서 밥을 먹었다 나는
2 나는 배가 고파서 밥을 먹었다 배가
3 나는 배가 고파서 밥을 먹었다 고파서
4 나는 배가 고파서 밥을 먹었다 밥을
5 나는 배가 고파서 밥을 먹었다 먹었다
© NBT All Rights Reserved.
실험및결과
© NBT All Rights Reserved.
실험및결과
© NBT All Rights Reserved.
실험및결과
© NBT All Rights Reserved.
그이외의발견들
• PV-DM이 PV-DBOW 보다 일반적으로 더 좋은 성능을 낸다
• PV-DM이랑 PV-DBOW를 concat으로 합치는게 sum 보다 낫다
• Window size는 5~12로 잡는게 일반적으로 좋더라
© NBT All Rights Reserved.
사용해보기
https://github.com/RaRe-Technologies/gensim/blob/develop/docs/notebooks/doc2vec-lee.ipynb
© NBT All Rights Reserved.
Gensim사용법
© NBT All Rights Reserved.
Gensim사용법
© NBT All Rights Reserved.
Gensim사용법
© NBT All Rights Reserved.
Gensim사용법
© NBT All Rights Reserved.
Gensim사용법
© NBT All Rights Reserved.
결론
• Word2Vec과 유사한 아이디어로 문서도 Embedding 가능
• 성능도 꽤 잘 나옴
• 쉽게 활용 가능
© NBT All Rights Reserved.
감사합니다.

More Related Content

What's hot

言語系統樹と雑煮の祖先形質復元(Kashiwa.R #2)
言語系統樹と雑煮の祖先形質復元(Kashiwa.R #2)言語系統樹と雑煮の祖先形質復元(Kashiwa.R #2)
言語系統樹と雑煮の祖先形質復元(Kashiwa.R #2)
tmr_kohei
 
テスト分析入門 -「ゆもつよメソッド」を例に- #wacate
テスト分析入門 -「ゆもつよメソッド」を例に- #wacateテスト分析入門 -「ゆもつよメソッド」を例に- #wacate
テスト分析入門 -「ゆもつよメソッド」を例に- #wacate
Kinji Akemine
 
Dockerの事例紹介
Dockerの事例紹介Dockerの事例紹介
Dockerの事例紹介
Hiroki Endo
 
기계독해를 위한 BERT 언어처리 모델 활용
기계독해를 위한 BERT 언어처리 모델 활용기계독해를 위한 BERT 언어처리 모델 활용
기계독해를 위한 BERT 언어처리 모델 활용
Kenneth Jung
 

What's hot (20)

ぜんぜんスマートじゃないプライベートクラウドの現実 - 運用担当者が苦労する4つの問題と3つの救済策
ぜんぜんスマートじゃないプライベートクラウドの現実 - 運用担当者が苦労する4つの問題と3つの救済策ぜんぜんスマートじゃないプライベートクラウドの現実 - 運用担当者が苦労する4つの問題と3つの救済策
ぜんぜんスマートじゃないプライベートクラウドの現実 - 運用担当者が苦労する4つの問題と3つの救済策
 
言語系統樹と雑煮の祖先形質復元(Kashiwa.R #2)
言語系統樹と雑煮の祖先形質復元(Kashiwa.R #2)言語系統樹と雑煮の祖先形質復元(Kashiwa.R #2)
言語系統樹と雑煮の祖先形質復元(Kashiwa.R #2)
 
Klocworkのご紹介
Klocworkのご紹介Klocworkのご紹介
Klocworkのご紹介
 
Azure Service Fabric 概要
Azure Service Fabric 概要Azure Service Fabric 概要
Azure Service Fabric 概要
 
テスト分析入門 -「ゆもつよメソッド」を例に- #wacate
テスト分析入門 -「ゆもつよメソッド」を例に- #wacateテスト分析入門 -「ゆもつよメソッド」を例に- #wacate
テスト分析入門 -「ゆもつよメソッド」を例に- #wacate
 
【Swift】 それ、enumとstructでやってみましょう!!
【Swift】 それ、enumとstructでやってみましょう!!【Swift】 それ、enumとstructでやってみましょう!!
【Swift】 それ、enumとstructでやってみましょう!!
 
Node.js with WebRTC DataChannel
Node.js with WebRTC DataChannelNode.js with WebRTC DataChannel
Node.js with WebRTC DataChannel
 
제 14회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [주식팀] : 특정 시간대의 주가 변동 패턴을 이용한 실시간 주가 예측
제 14회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [주식팀] : 특정 시간대의 주가 변동 패턴을 이용한 실시간 주가 예측제 14회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [주식팀] : 특정 시간대의 주가 변동 패턴을 이용한 실시간 주가 예측
제 14회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [주식팀] : 특정 시간대의 주가 변동 패턴을 이용한 실시간 주가 예측
 
5分で解るセキュアコーディング
5分で解るセキュアコーディング5分で解るセキュアコーディング
5分で解るセキュアコーディング
 
クリーンランゲージについて
クリーンランゲージについてクリーンランゲージについて
クリーンランゲージについて
 
Python과 Tensorflow를 활용한 AI Chatbot 개발 및 실무 적용
Python과 Tensorflow를 활용한  AI Chatbot 개발 및 실무 적용Python과 Tensorflow를 활용한  AI Chatbot 개발 및 실무 적용
Python과 Tensorflow를 활용한 AI Chatbot 개발 및 실무 적용
 
【NGINXセミナー】API ゲートウェイとしてのNGINX Plus活用方法
【NGINXセミナー】API ゲートウェイとしてのNGINX Plus活用方法【NGINXセミナー】API ゲートウェイとしてのNGINX Plus活用方法
【NGINXセミナー】API ゲートウェイとしてのNGINX Plus活用方法
 
cloudpack負荷職人結果レポート(サンプル)
cloudpack負荷職人結果レポート(サンプル)cloudpack負荷職人結果レポート(サンプル)
cloudpack負荷職人結果レポート(サンプル)
 
ヤフーでは開発迅速性と品質のバランスをどう取ってるか
ヤフーでは開発迅速性と品質のバランスをどう取ってるかヤフーでは開発迅速性と品質のバランスをどう取ってるか
ヤフーでは開発迅速性と品質のバランスをどう取ってるか
 
2019 11-code review
2019 11-code review2019 11-code review
2019 11-code review
 
Dockerの事例紹介
Dockerの事例紹介Dockerの事例紹介
Dockerの事例紹介
 
기계독해를 위한 BERT 언어처리 모델 활용
기계독해를 위한 BERT 언어처리 모델 활용기계독해를 위한 BERT 언어처리 모델 활용
기계독해를 위한 BERT 언어처리 모델 활용
 
Pycon2014 django performance
Pycon2014 django performancePycon2014 django performance
Pycon2014 django performance
 
ボケてが300万DL到達までに行ったグロースハックを少し紹介
ボケてが300万DL到達までに行ったグロースハックを少し紹介ボケてが300万DL到達までに行ったグロースハックを少し紹介
ボケてが300万DL到達までに行ったグロースハックを少し紹介
 
What should you shift left
What should you shift leftWhat should you shift left
What should you shift left
 

More from keunbong kwak

More from keunbong kwak (12)

그로스해킹 기초
그로스해킹 기초그로스해킹 기초
그로스해킹 기초
 
NBT 그로스해킹 교육 자료
NBT 그로스해킹 교육 자료NBT 그로스해킹 교육 자료
NBT 그로스해킹 교육 자료
 
PR-099: MRNet-Product2Vec
PR-099: MRNet-Product2VecPR-099: MRNet-Product2Vec
PR-099: MRNet-Product2Vec
 
Wide&Deep Learning for Recommender Systems
Wide&Deep Learning for Recommender SystemsWide&Deep Learning for Recommender Systems
Wide&Deep Learning for Recommender Systems
 
논문리뷰: Deep Neural Networks for YouTube Recommendations
논문리뷰: Deep Neural Networks for YouTube Recommendations논문리뷰: Deep Neural Networks for YouTube Recommendations
논문리뷰: Deep Neural Networks for YouTube Recommendations
 
Ad Tech 개요
Ad Tech 개요Ad Tech 개요
Ad Tech 개요
 
Ask me anything: Dynamic memory networks for natural language processing
Ask me anything: Dynamic memory networks for natural language processingAsk me anything: Dynamic memory networks for natural language processing
Ask me anything: Dynamic memory networks for natural language processing
 
딥러닝 논문 리뷰 Learning phrase representations using rnn encoder decoder for stati...
딥러닝 논문 리뷰 Learning phrase representations using rnn encoder decoder for stati...딥러닝 논문 리뷰 Learning phrase representations using rnn encoder decoder for stati...
딥러닝 논문 리뷰 Learning phrase representations using rnn encoder decoder for stati...
 
에디터스랩 발표
에디터스랩 발표에디터스랩 발표
에디터스랩 발표
 
Convolutional neural networks for sentence classification
Convolutional neural networks for sentence classificationConvolutional neural networks for sentence classification
Convolutional neural networks for sentence classification
 
NBT 유클라우드 사례 발표
NBT 유클라우드 사례 발표NBT 유클라우드 사례 발표
NBT 유클라우드 사례 발표
 
Window manager활용하기 곽근봉
Window manager활용하기 곽근봉Window manager활용하기 곽근봉
Window manager활용하기 곽근봉
 

PR12 논문 리뷰 Distributed Representations of Sentences and Documents

  • 2. © NBT All Rights Reserved. 이논문을선정한이유 추천 엔진에서의 Cold Start Problem
  • 3. © NBT All Rights Reserved. 이논문을선정한이유 추천 엔진에서의 Cold Start Problem 컨텐츠 태깅
  • 4. © NBT All Rights Reserved. 이논문을선정한이유 추천 엔진에서의 Cold Start Problem 컨텐츠 태깅 문서 유사도
  • 5. © NBT All Rights Reserved. 이논문을선정한이유 추천 엔진에서의 Cold Start Problem 컨텐츠 태깅 컨텐츠 유사도컨텐츠 임베딩
  • 6. © NBT All Rights Reserved. 참고 자료 Lucy Park님 Pycon 발표자료 https://www.lucypark.kr/docs/2015-pyconkr/#1 Ratsgo님 블로그 https://ratsgo.github.io/natural%20language%20processing/2017/03/08/word2vec/ PyData 2017 발표자료 https://www.youtube.com/watch?v=zFScws0mb7M
  • 7. © NBT All Rights Reserved. 개요 Word2Vec의후속버전Doc2Vec • 문장 분석을 위한 새로운 embedding방식을 제안 • Word2Vec의 아이디어를 활용 • PV-DM & PV-DBOW
  • 8. © NBT All Rights Reserved. 문제정의–이논문에서풀고자했던것 • 문장, 문단, 문서의 특징을 capture할 수 있는 embedding • Embedding을 통한 Classification 성능 향상
  • 9. © NBT All Rights Reserved. Word2Vec 딥러닝을 활용한 자연어처리에 단어가 출현하는 위치를 기반으로 단어를 학습시켜보자 (Skip-grams) Center word (Position t) Output Context words (m word window) Output Context words (m word window) P(wt+1|wt)P(wt-1|wt) “저는 P(wt-2|wt) 관심이 많습니다” P(wt+2|wt)
  • 10. © NBT All Rights Reserved. Word2Vec 단어가 출현하는 위치를 기반으로 단어를 학습시켜보자
  • 11. © NBT All Rights Reserved. Word2Vec 학습 결과 의미, 문법과 관련된 정보들이 Capture 된다!
  • 12. © NBT All Rights Reserved. 모델설명PV-DM
  • 13. © NBT All Rights Reserved. 모델설명PV-DM(예시) “나는 배가 고파서 밥을 먹었다” Paragraph Dictionary Word Dictionary ID Paragraph 1 나는 배가 고파 서 밥을 먹었다 ID Word 1 나는 2 배가 3 고파서 4 밥을 5 먹었다
  • 14. © NBT All Rights Reserved. 모델설명PV-DM(예시) “나는 배가 고파서 밥을 먹었다” Paragraph Embedding Word Embedding ID Paragraph Embedding 1 [0.5, 0.41, 0.55 …] ID Word Embedding 1 [0.2, 0.11, 0.55 …] 2 [0.9, 0.41, 0.75 …] 3 [0.4, 0.15, 0.53 …] 4 [0.3, 0.78, 0.48 …] 5 [0.6, 0.23, 0.12 …]
  • 15. © NBT All Rights Reserved. 모델설명PV-DM(예시) “나는 배가 고파서 밥을 먹었다” Step Input Label 1 [나는 배가 고파서 밥을 먹었다, 나는, 배가, 고파서] 밥을 2 [나는 배가 고파서 밥을 먹었다, 배가, 고파서, 밥을] 먹었다
  • 16. © NBT All Rights Reserved. 모델설명PV-DM(예시) “나는 배가 고파서 밥을 먹었다” Step Input Label 1 [d1, w1, w2, w3] w4 2 [d1, w2, w3, w4] w5
  • 17. © NBT All Rights Reserved. 모델설명PV-DM(예시) “나는 배가 고파서 밥을 먹었다” Step Input Label 1 [[0.5, 0.41, 0.55 …], [0.2, 0.11, 0.55 …] , [0.9, 0.41, 0.75 …], [0.4, 0.15, 0.53 …]] [0,0,0,0,1,0] 2 [[0.5, 0.41, 0.55 …], [0.9, 0.41, 0.75 …], [0.4, 0.15, 0.53 …], [0.3, 0.78, 0.48 …]] [0,0,0,0,0,1]
  • 18. © NBT All Rights Reserved. PV-DMInferenceStage
  • 19. © NBT All Rights Reserved. 모델설명PV-DBOW
  • 20. © NBT All Rights Reserved. 모델설명PV-DBOW(예시) “나는 배가 고파서 밥을 먹었다” Step Input Label 1 나는 배가 고파서 밥을 먹었다 나는 2 나는 배가 고파서 밥을 먹었다 배가 3 나는 배가 고파서 밥을 먹었다 고파서 4 나는 배가 고파서 밥을 먹었다 밥을 5 나는 배가 고파서 밥을 먹었다 먹었다
  • 21. © NBT All Rights Reserved. 실험및결과
  • 22. © NBT All Rights Reserved. 실험및결과
  • 23. © NBT All Rights Reserved. 실험및결과
  • 24. © NBT All Rights Reserved. 그이외의발견들 • PV-DM이 PV-DBOW 보다 일반적으로 더 좋은 성능을 낸다 • PV-DM이랑 PV-DBOW를 concat으로 합치는게 sum 보다 낫다 • Window size는 5~12로 잡는게 일반적으로 좋더라
  • 25. © NBT All Rights Reserved. 사용해보기 https://github.com/RaRe-Technologies/gensim/blob/develop/docs/notebooks/doc2vec-lee.ipynb
  • 26. © NBT All Rights Reserved. Gensim사용법
  • 27. © NBT All Rights Reserved. Gensim사용법
  • 28. © NBT All Rights Reserved. Gensim사용법
  • 29. © NBT All Rights Reserved. Gensim사용법
  • 30. © NBT All Rights Reserved. Gensim사용법
  • 31. © NBT All Rights Reserved. 결론 • Word2Vec과 유사한 아이디어로 문서도 Embedding 가능 • 성능도 꽤 잘 나옴 • 쉽게 활용 가능
  • 32. © NBT All Rights Reserved. 감사합니다.