SlideShare a Scribd company logo
1 of 24
Download to read offline
Neural Input Search 

for Large Scale

Recommendation Models

秋葉原ラボ

渡部 裕晃

論文

● Manas R. Joglekar, et al., “ Neural Input Search for Large Scale Recommendation Models ”

○ https://dl.acm.org/doi/pdf/10.1145/3394486.3403288 

○ 著者は Google

● 背景

○ 推薦問題に DNN の利用が増えてきて離散的な表現をよく embedding する 

● よくある話

○ vocabulary size と embedding dimension はモデルの精度に大きな影響を与えるにも関わらず
,heuristic かつ suboptimal な方法で選択される 

○ すべての特徴量に対して同じ embedding dimension を使うため,モデルの容量と学習データの非
効率な使用に悩まされる [Paul Covington+, 2016]


● 本研究

○ 最適な vocabulary size と embedding dimension を学習するための手法 Neural Input Search (NIS)
を提案

○ 異なる特徴量に対して embedding dimension を変化させることができる新しい埋め込み手法
Muti-size Embedding (ME) を提案

概要

定義と表記法

𝐸
𝑑
● ℱ:カテゴリ特徴量の集合 

● 𝐸:(学習可能な) embedding matrix 

● 𝑣:vocabulary size

● 𝑑:embedding dimension 

● 𝐸[𝑖]:embedding matrix 𝐸 の 𝑖 番目の行 (0 ≤ 𝑖 < 𝑣)

● ℬ :memory budget (使用するメモリの制約) 

● 𝐶 :memory cost (the number of parameters) 

𝑣
𝐸[𝑖]
𝑖
従来のアプローチ 

● Single-size Embedding (SE) 

○ 𝑣 個のアイテムを 𝑑 次元のベクトルで表現する embedding matrix 

○ 従来の研究では 𝑣, 𝑑 の値はヒューリスティックな方法で選択されて最適でない場合がある 

● SE のトレードオフの問題 

○ vocabulary のカバレッジを上げて出現頻度の低いitemも使えるようにしたい 

■ 精度は上がるがmemoryの使用量も増える 

○ embedding の次元を上げて出現頻度の高いitemのベクトルの表現力を上げたい 

■ 精度は上がるが必要のないitemの次元も増えてmemoryの使用量も増える 



SE では高いカバレッジと高品質な embedding を同時に得ることが難しい 

● 各特徴量に対して最適な vocabulary size と embedding dimension を探索する問題を Neural Input
Search (NIS) と名付ける

● SE を用いたモデルでは,下記の制約の元で, 𝐹 ∈ ℱ においてモデルの目的関数が最大となる
vocabulary size と embedding dimension を求める問題を解けば良い: 







問題設定1:NIS-SE

Multi-size Embedding (ME) の提案

● Multi-size Embedding (ME) 

○ item ごとに異なる次元の embedding を持つことができる 

● Multi-size Embedding Spec (MES) 

○ vocabulary size と embedding dimension のペアのリスト 

○ 最も出現頻度の高い 𝑣1 個の item 群は 𝑑1 次元のベクトルを持つ ( 𝑑1 > 𝑑2 > ••• > 𝑑M ≧ 1)

● SE の代わりに ME を扱えるようにするための学習可能な projection matrix 

○ projection matrix 𝑃𝑚 の形状は 𝑑𝑚 × 𝑑1 となる (1 ≤ 𝑚 ≤ 𝑀)

○ 𝑑𝑚 次元の embedding を 𝑑1次元の空間にマッピングする 

Projection matrix

● projection matrix を用いて,下記のように 𝑘 番目の item の embedding 𝑒𝑘 を取得できる:





○ ここで,𝑉• は累積の vocabulay size を表し, 𝑉0 = 0,𝑉𝑚 = ∑[𝑖=1→𝑚]𝑣𝑖 (1 ≤ 𝑚 ≤ 𝑀) 

● e.g. ME を用いた BOW の計算 ( MBOW)

○ vocabulary ID の集合を 𝐾 としたとき,MBOW は下記のように計算できる: 



MEを用いたベクトルの計算

● ME 用いたモデルでは,下記の制約の元で, 𝐹 ∈ ℱ においてモデルの目的関数が最大となる MES を求
める問題を考える:







問題設定2:NIS-ME

● NIS-SE と NIS-ME を解くためのアプローチ 

1. モデルの入力コンポーネントの探索空間 ( Embedding Blocks) を用意する

2. 各ステップで各特徴量に対して SE もしくは ME を選択する controller を用意する 

3. NAS[Barret Zoph+, 2017] のように強化学習のアプローチで最適な embedding 構成を探索する 

○ SE, ME は controller を除くメインモデルとともに学習する 

○ メインモデルの feedforward で controller の報酬を計算して学習する 

■ 報酬の計算には A3C を用いる 

Neural Input Search Approach

Embedding Blocks

● 各学習ステップで controller が異なる SE や ME を選択することを可能にする探索空間の構成要素 

○ 𝑑 は vocabulary 内の任意の item について許容される最大の埋め込みサイズ 

○ Projection Matrix のパラメータの数は   >> 𝑑 より,無視できるものとする 

𝑣1
−
● Controller

○ Softmax 関数を出力層に持ち,異なる SE や ME を選択する Neural Network 

○ SE, ME のどちらに最適化するかで Embedding Blocks からサンプリングする方法が異なる 

Controller による選択

1. { (𝑠, 𝑡) | 1 ≦ 𝑠 ≦ 𝖲, 1 ≦ 𝑡 ≦ 𝑇 } ∪ { (0, 0) } から1つの ( , ) をサンプリングする 

○ Embedding Blocks { 𝐸𝑠,𝑡 | 1 ≦ 𝑠 ≦ , 1 ≦ 𝑡 ≦ } がその学習ステップで使われる 

○ 探索空間のサイズは (𝖲 × 𝑇 + 1) となる

2. 𝑘 番目の item の embedding を計算する 





○ out-of-vocabulary は 0ベクトルとして扱う 

○ (0, 0) が選ばれる = その学習ステップ内では全ての item に0ベクトルが使われ,Memory Cost は0
となる

3. 報酬に基づいて学習する 

○ (0, 0) に収束した場合は,その特徴量は削除されるべきであることを意味する 

NIS-SEの場合

𝑡
−
��
−
𝑡
−
��
−
NIS-MEの場合

1. 各 𝑡 ∈ 1, ..., 𝑇 に対して ∈ { 1, ..., 𝖲 } ∪ { 0 } から1つサンプリングする 

a. > 0 ならば Embedding Blocks { 𝐸𝑠,𝑡 | 1 ≦ 𝑠 ≦ } が使われる 

b. = 0 ならば vocabulary 内の全ての item について embedding が削除される 

c. 探索空間のサイズは (𝖲 + 1)^𝑇

2. 𝑘 番目の item の embedding を計算する 





a. 𝒯𝑠 = { 𝑡 | 𝐸𝑠,𝑡 is selected } であり, 𝒯𝑠𝑘 が空であれば 𝑒𝑘 は0ベクトルとなる

3. 報酬に基づいて学習する 

𝑠𝑡
−
𝑠𝑡
−
𝑠𝑡
−
𝑠𝑡
−
Reward の計算

● メインモデルは controller が選択した SE/ME を使って学習され,controller はメインモデルの
feedforward pass から計算された報酬を用いて学習する 

● Reward は下記の式で定義される: 





○ 𝑅𝑄:最大化したい品質の報酬 

■ e.g. retrieval problem なら Recall@N,Sampled Recall@N 

■ e.g. ranking problem なら ROC-AUC 

○ 𝐶𝑀:controller が選択した over-budget embedding にペナルティを与えるため memory cost 項 

○ 𝜆:memory budget を超えたコストに見合う 𝑅𝑄 の増加量

● メモリコストは下記の式で定義される: 





○ 𝐶𝐹:controller の選択に基づくメモリ使用量 

○ ℬ:あらかじめ定義された memory budget 

○ 𝜆:memory budget を超えたコストに見合う 𝑅𝑄 の増加量

■ e.g. 𝑅𝑄 を ROC-AUC とし, 𝜆=0.1 とすると,ROC-AUC を 0.1 以上増加させることができれば
,ペナルティを受け入れられることになる 

Memory Cost の計算

● The warm up phase 

○ 始めに全ての Embedding Block を学習 (controller 変数は固定)し,その後,A3C にしたがってメイ
ンモデルと controller を交互に学習する 

○ controller が選択しなかった Embedding Block が学習されないことを防ぐ 

● The Baseline Network 

○ controller network と同じ構造を持つ baseline network を使って,controller の選択前に期待される
報酬を予測する

○ baseline network は自身の変数を持っていて,contoller の変数と一緒に更新される 

○ 報酬から baseline 分を減算して,controller の学習に使用する 

NIS の学習におけるテクニック

Public Datasets を用いた実験

● メインモデル:Neural Collaborative Filtering (NCF) [Xiangnan He+, 2017]


● データセット:

○ Movie Lens 1M

○ KKBox (WSDM) 

● NIS-ME モデルは同じ ℬ が与えられた場合,NIS-SE より少ないパラメータで良い性能を発揮した 

● NIS モデルは ℬ が Baseline の半分でも優れた性能を発揮した 

● NIS モデルは memory budget を超えることでより優れた性能を発揮することもあった 

Public Datasets を用いた実験

● メインモデルの目的:アプリがインストールされそうなランキングを作成すること 

● データセット:(Context, App, Label) のタプルで構成される 

○ Label:アプリがインストールされているかどうかを示すバイナリ 

○ Context, App:アプリID,開発者ID,アプリタイトルなどの合計20個のカテゴリ特徴量.vocabulary
size は,数百から数百万まで様々 

● オフラインテストの結果 

○ SE,ME ともに ROC-AUC について既存のモデルの性能を向上させることができた 

Google Play App Store における実験

● オンラインテストの結果 

○ NIS-ME モデルのみで実施し,App Install が 1.02% 増加した 

● 時間の経過とパフォーマンス 

○ 各特徴量の分布が時間の経過とともに変化した場合,NIS の再実行が必要となる 

○ 2ヶ月間 NIS-ME とオリジナルモデルの ROC-AUC をモニタリングしたが,NIS の再実行の必要性
が見受けられず安定していることが分かった 

Google Play App Store における実験

● モデルの input compornent における最適な vocabulary size と embedding dimension を自動的に探索す
る手法である Neural Input Search (NIS) を提案 

● 出現頻度の高い item には高い表現力を与えつつ,出現頻度の低い item もカバーできる新しい埋め込
み手法である Multi-size Embedding (ME) を提案 

● public datasets と Google Play App Store のデータを用いた実験を行い,NISとMEの有効性を実証した 

● NISはモデル性能の大幅な向上につながる embedding configurations を見つけることができた 

まとめ

参考文献

● [Paul Covington+, 2016] Paul Covington, Jay Adams, and Emre Sargin., “Deep Neural Networks for YouTube Recommendations”
(RecSys, 2016)

● [Xiangnan He+, 2017] Xiangnan He, Lizi Liao, Hanwang Zhang, Liqiang Nie, Xia Hu, and Tat-Seng Chua., “Neural collaborative
filtering” (WWW, 2017) 

● [Barret Zoph+, 2017] Barret Zoph and Quoc V. Le., “Neural Architecture Search with Reinforcement Learning” (ICLR, 2017) 

● [Hieu Pham+, 2018] Hieu Pham, Melody Guan, Barret Zoph, Quoc Le, and Jeff Dean., “Efficient Neural Architecture Search via
Parameters Sharing” (ICML, 2018) 


More Related Content

Similar to Neural Input Search for Large Scale Recommendation Models

Embedded based retrieval in modern search ranking system
Embedded based retrieval in modern search ranking systemEmbedded based retrieval in modern search ranking system
Embedded based retrieval in modern search ranking systemMarsan Ma
 
Transformation Functions for Text Classification: A case study with StackOver...
Transformation Functions for Text Classification: A case study with StackOver...Transformation Functions for Text Classification: A case study with StackOver...
Transformation Functions for Text Classification: A case study with StackOver...Sebastian Ruder
 
MongoDB World 2019: Fast Machine Learning Development with MongoDB
MongoDB World 2019: Fast Machine Learning Development with MongoDBMongoDB World 2019: Fast Machine Learning Development with MongoDB
MongoDB World 2019: Fast Machine Learning Development with MongoDBMongoDB
 
Data Structures 2004
Data Structures 2004Data Structures 2004
Data Structures 2004Sanjay Goel
 
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBLisa Roth, PMP
 
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB
 
Machine Learning Applied - Contextual Chatbots Coding, Oracle JET and Tensor...
 Machine Learning Applied - Contextual Chatbots Coding, Oracle JET and Tensor... Machine Learning Applied - Contextual Chatbots Coding, Oracle JET and Tensor...
Machine Learning Applied - Contextual Chatbots Coding, Oracle JET and Tensor...andrejusb
 
Task Adaptive Neural Network Search with Meta-Contrastive Learning
Task Adaptive Neural Network Search with Meta-Contrastive LearningTask Adaptive Neural Network Search with Meta-Contrastive Learning
Task Adaptive Neural Network Search with Meta-Contrastive LearningMLAI2
 
Build a simple image recognition system with tensor flow
Build a simple image recognition system with tensor flowBuild a simple image recognition system with tensor flow
Build a simple image recognition system with tensor flowDebasisMohanty37
 
Context-based movie search using doc2vec, word2vec
Context-based movie search using doc2vec, word2vecContext-based movie search using doc2vec, word2vec
Context-based movie search using doc2vec, word2vecJIN KYU CHANG
 
Feature Engineering - Getting most out of data for predictive models - TDC 2017
Feature Engineering - Getting most out of data for predictive models - TDC 2017Feature Engineering - Getting most out of data for predictive models - TDC 2017
Feature Engineering - Getting most out of data for predictive models - TDC 2017Gabriel Moreira
 
Neural netorksmatching
Neural netorksmatchingNeural netorksmatching
Neural netorksmatchingMasa Kato
 
Introduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnIntroduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnBenjamin Bengfort
 
Machine Learning with JavaScript
Machine Learning with JavaScriptMachine Learning with JavaScript
Machine Learning with JavaScriptIvo Andreev
 
A Benchmark for the Use of Topic Models for Text Visualization Tasks - Online...
A Benchmark for the Use of Topic Models for Text Visualization Tasks - Online...A Benchmark for the Use of Topic Models for Text Visualization Tasks - Online...
A Benchmark for the Use of Topic Models for Text Visualization Tasks - Online...Matthias Trapp
 

Similar to Neural Input Search for Large Scale Recommendation Models (20)

Embedded based retrieval in modern search ranking system
Embedded based retrieval in modern search ranking systemEmbedded based retrieval in modern search ranking system
Embedded based retrieval in modern search ranking system
 
Deep Meta Learning
Deep Meta Learning Deep Meta Learning
Deep Meta Learning
 
Transformation Functions for Text Classification: A case study with StackOver...
Transformation Functions for Text Classification: A case study with StackOver...Transformation Functions for Text Classification: A case study with StackOver...
Transformation Functions for Text Classification: A case study with StackOver...
 
MongoDB World 2019: Fast Machine Learning Development with MongoDB
MongoDB World 2019: Fast Machine Learning Development with MongoDBMongoDB World 2019: Fast Machine Learning Development with MongoDB
MongoDB World 2019: Fast Machine Learning Development with MongoDB
 
Data Structures 2004
Data Structures 2004Data Structures 2004
Data Structures 2004
 
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
 
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDBMongoDB .local London 2019: Fast Machine Learning Development with MongoDB
MongoDB .local London 2019: Fast Machine Learning Development with MongoDB
 
Machine Learning Applied - Contextual Chatbots Coding, Oracle JET and Tensor...
 Machine Learning Applied - Contextual Chatbots Coding, Oracle JET and Tensor... Machine Learning Applied - Contextual Chatbots Coding, Oracle JET and Tensor...
Machine Learning Applied - Contextual Chatbots Coding, Oracle JET and Tensor...
 
CSSC ML Workshop
CSSC ML WorkshopCSSC ML Workshop
CSSC ML Workshop
 
InternshipReport
InternshipReportInternshipReport
InternshipReport
 
Practical ML
Practical MLPractical ML
Practical ML
 
Task Adaptive Neural Network Search with Meta-Contrastive Learning
Task Adaptive Neural Network Search with Meta-Contrastive LearningTask Adaptive Neural Network Search with Meta-Contrastive Learning
Task Adaptive Neural Network Search with Meta-Contrastive Learning
 
Build a simple image recognition system with tensor flow
Build a simple image recognition system with tensor flowBuild a simple image recognition system with tensor flow
Build a simple image recognition system with tensor flow
 
Context-based movie search using doc2vec, word2vec
Context-based movie search using doc2vec, word2vecContext-based movie search using doc2vec, word2vec
Context-based movie search using doc2vec, word2vec
 
Feature Engineering - Getting most out of data for predictive models - TDC 2017
Feature Engineering - Getting most out of data for predictive models - TDC 2017Feature Engineering - Getting most out of data for predictive models - TDC 2017
Feature Engineering - Getting most out of data for predictive models - TDC 2017
 
Neural netorksmatching
Neural netorksmatchingNeural netorksmatching
Neural netorksmatching
 
Introduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnIntroduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-Learn
 
Machine Learning with JavaScript
Machine Learning with JavaScriptMachine Learning with JavaScript
Machine Learning with JavaScript
 
RNN.pdf
RNN.pdfRNN.pdf
RNN.pdf
 
A Benchmark for the Use of Topic Models for Text Visualization Tasks - Online...
A Benchmark for the Use of Topic Models for Text Visualization Tasks - Online...A Benchmark for the Use of Topic Models for Text Visualization Tasks - Online...
A Benchmark for the Use of Topic Models for Text Visualization Tasks - Online...
 

Recently uploaded

AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)Wonjun Hwang
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfalexjohnson7307
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Paige Cruz
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?Paolo Missier
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxjbellis
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 

Recently uploaded (20)

AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 

Neural Input Search for Large Scale Recommendation Models

  • 1. Neural Input Search 
 for Large Scale
 Recommendation Models
 秋葉原ラボ
 渡部 裕晃

  • 2. 論文
 ● Manas R. Joglekar, et al., “ Neural Input Search for Large Scale Recommendation Models ”
 ○ https://dl.acm.org/doi/pdf/10.1145/3394486.3403288 
 ○ 著者は Google

  • 3. ● 背景
 ○ 推薦問題に DNN の利用が増えてきて離散的な表現をよく embedding する 
 ● よくある話
 ○ vocabulary size と embedding dimension はモデルの精度に大きな影響を与えるにも関わらず ,heuristic かつ suboptimal な方法で選択される 
 ○ すべての特徴量に対して同じ embedding dimension を使うため,モデルの容量と学習データの非 効率な使用に悩まされる [Paul Covington+, 2016] 
 ● 本研究
 ○ 最適な vocabulary size と embedding dimension を学習するための手法 Neural Input Search (NIS) を提案
 ○ 異なる特徴量に対して embedding dimension を変化させることができる新しい埋め込み手法 Muti-size Embedding (ME) を提案
 概要

  • 4. 定義と表記法
 𝐸 𝑑 ● ℱ:カテゴリ特徴量の集合 
 ● 𝐸:(学習可能な) embedding matrix 
 ● 𝑣:vocabulary size
 ● 𝑑:embedding dimension 
 ● 𝐸[𝑖]:embedding matrix 𝐸 の 𝑖 番目の行 (0 ≤ 𝑖 < 𝑣)
 ● ℬ :memory budget (使用するメモリの制約) 
 ● 𝐶 :memory cost (the number of parameters) 
 𝑣 𝐸[𝑖] 𝑖
  • 5. 従来のアプローチ 
 ● Single-size Embedding (SE) 
 ○ 𝑣 個のアイテムを 𝑑 次元のベクトルで表現する embedding matrix 
 ○ 従来の研究では 𝑣, 𝑑 の値はヒューリスティックな方法で選択されて最適でない場合がある 
 ● SE のトレードオフの問題 
 ○ vocabulary のカバレッジを上げて出現頻度の低いitemも使えるようにしたい 
 ■ 精度は上がるがmemoryの使用量も増える 
 ○ embedding の次元を上げて出現頻度の高いitemのベクトルの表現力を上げたい 
 ■ 精度は上がるが必要のないitemの次元も増えてmemoryの使用量も増える 
 
 SE では高いカバレッジと高品質な embedding を同時に得ることが難しい 

  • 6. ● 各特徴量に対して最適な vocabulary size と embedding dimension を探索する問題を Neural Input Search (NIS) と名付ける
 ● SE を用いたモデルでは,下記の制約の元で, 𝐹 ∈ ℱ においてモデルの目的関数が最大となる vocabulary size と embedding dimension を求める問題を解けば良い: 
 
 
 
 問題設定1:NIS-SE

  • 7. Multi-size Embedding (ME) の提案
 ● Multi-size Embedding (ME) 
 ○ item ごとに異なる次元の embedding を持つことができる 
 ● Multi-size Embedding Spec (MES) 
 ○ vocabulary size と embedding dimension のペアのリスト 
 ○ 最も出現頻度の高い 𝑣1 個の item 群は 𝑑1 次元のベクトルを持つ ( 𝑑1 > 𝑑2 > ••• > 𝑑M ≧ 1)

  • 8. ● SE の代わりに ME を扱えるようにするための学習可能な projection matrix 
 ○ projection matrix 𝑃𝑚 の形状は 𝑑𝑚 × 𝑑1 となる (1 ≤ 𝑚 ≤ 𝑀)
 ○ 𝑑𝑚 次元の embedding を 𝑑1次元の空間にマッピングする 
 Projection matrix

  • 9. ● projection matrix を用いて,下記のように 𝑘 番目の item の embedding 𝑒𝑘 を取得できる:
 
 
 ○ ここで,𝑉• は累積の vocabulay size を表し, 𝑉0 = 0,𝑉𝑚 = ∑[𝑖=1→𝑚]𝑣𝑖 (1 ≤ 𝑚 ≤ 𝑀) 
 ● e.g. ME を用いた BOW の計算 ( MBOW)
 ○ vocabulary ID の集合を 𝐾 としたとき,MBOW は下記のように計算できる: 
 
 MEを用いたベクトルの計算

  • 10. ● ME 用いたモデルでは,下記の制約の元で, 𝐹 ∈ ℱ においてモデルの目的関数が最大となる MES を求 める問題を考える:
 
 
 
 問題設定2:NIS-ME

  • 11. ● NIS-SE と NIS-ME を解くためのアプローチ 
 1. モデルの入力コンポーネントの探索空間 ( Embedding Blocks) を用意する
 2. 各ステップで各特徴量に対して SE もしくは ME を選択する controller を用意する 
 3. NAS[Barret Zoph+, 2017] のように強化学習のアプローチで最適な embedding 構成を探索する 
 ○ SE, ME は controller を除くメインモデルとともに学習する 
 ○ メインモデルの feedforward で controller の報酬を計算して学習する 
 ■ 報酬の計算には A3C を用いる 
 Neural Input Search Approach

  • 12. Embedding Blocks
 ● 各学習ステップで controller が異なる SE や ME を選択することを可能にする探索空間の構成要素 
 ○ 𝑑 は vocabulary 内の任意の item について許容される最大の埋め込みサイズ 
 ○ Projection Matrix のパラメータの数は   >> 𝑑 より,無視できるものとする 
 𝑣1 −
  • 13. ● Controller
 ○ Softmax 関数を出力層に持ち,異なる SE や ME を選択する Neural Network 
 ○ SE, ME のどちらに最適化するかで Embedding Blocks からサンプリングする方法が異なる 
 Controller による選択

  • 14. 1. { (𝑠, 𝑡) | 1 ≦ 𝑠 ≦ 𝖲, 1 ≦ 𝑡 ≦ 𝑇 } ∪ { (0, 0) } から1つの ( , ) をサンプリングする 
 ○ Embedding Blocks { 𝐸𝑠,𝑡 | 1 ≦ 𝑠 ≦ , 1 ≦ 𝑡 ≦ } がその学習ステップで使われる 
 ○ 探索空間のサイズは (𝖲 × 𝑇 + 1) となる
 2. 𝑘 番目の item の embedding を計算する 
 
 
 ○ out-of-vocabulary は 0ベクトルとして扱う 
 ○ (0, 0) が選ばれる = その学習ステップ内では全ての item に0ベクトルが使われ,Memory Cost は0 となる
 3. 報酬に基づいて学習する 
 ○ (0, 0) に収束した場合は,その特徴量は削除されるべきであることを意味する 
 NIS-SEの場合
 𝑡 − �� − 𝑡 − �� −
  • 15. NIS-MEの場合
 1. 各 𝑡 ∈ 1, ..., 𝑇 に対して ∈ { 1, ..., 𝖲 } ∪ { 0 } から1つサンプリングする 
 a. > 0 ならば Embedding Blocks { 𝐸𝑠,𝑡 | 1 ≦ 𝑠 ≦ } が使われる 
 b. = 0 ならば vocabulary 内の全ての item について embedding が削除される 
 c. 探索空間のサイズは (𝖲 + 1)^𝑇
 2. 𝑘 番目の item の embedding を計算する 
 
 
 a. 𝒯𝑠 = { 𝑡 | 𝐸𝑠,𝑡 is selected } であり, 𝒯𝑠𝑘 が空であれば 𝑒𝑘 は0ベクトルとなる
 3. 報酬に基づいて学習する 
 𝑠𝑡 − 𝑠𝑡 − 𝑠𝑡 − 𝑠𝑡 −
  • 16. Reward の計算
 ● メインモデルは controller が選択した SE/ME を使って学習され,controller はメインモデルの feedforward pass から計算された報酬を用いて学習する 
 ● Reward は下記の式で定義される: 
 
 
 ○ 𝑅𝑄:最大化したい品質の報酬 
 ■ e.g. retrieval problem なら Recall@N,Sampled Recall@N 
 ■ e.g. ranking problem なら ROC-AUC 
 ○ 𝐶𝑀:controller が選択した over-budget embedding にペナルティを与えるため memory cost 項 
 ○ 𝜆:memory budget を超えたコストに見合う 𝑅𝑄 の増加量

  • 17. ● メモリコストは下記の式で定義される: 
 
 
 ○ 𝐶𝐹:controller の選択に基づくメモリ使用量 
 ○ ℬ:あらかじめ定義された memory budget 
 ○ 𝜆:memory budget を超えたコストに見合う 𝑅𝑄 の増加量
 ■ e.g. 𝑅𝑄 を ROC-AUC とし, 𝜆=0.1 とすると,ROC-AUC を 0.1 以上増加させることができれば ,ペナルティを受け入れられることになる 
 Memory Cost の計算

  • 18. ● The warm up phase 
 ○ 始めに全ての Embedding Block を学習 (controller 変数は固定)し,その後,A3C にしたがってメイ ンモデルと controller を交互に学習する 
 ○ controller が選択しなかった Embedding Block が学習されないことを防ぐ 
 ● The Baseline Network 
 ○ controller network と同じ構造を持つ baseline network を使って,controller の選択前に期待される 報酬を予測する
 ○ baseline network は自身の変数を持っていて,contoller の変数と一緒に更新される 
 ○ 報酬から baseline 分を減算して,controller の学習に使用する 
 NIS の学習におけるテクニック

  • 19. Public Datasets を用いた実験
 ● メインモデル:Neural Collaborative Filtering (NCF) [Xiangnan He+, 2017] 
 ● データセット:
 ○ Movie Lens 1M
 ○ KKBox (WSDM) 

  • 20. ● NIS-ME モデルは同じ ℬ が与えられた場合,NIS-SE より少ないパラメータで良い性能を発揮した 
 ● NIS モデルは ℬ が Baseline の半分でも優れた性能を発揮した 
 ● NIS モデルは memory budget を超えることでより優れた性能を発揮することもあった 
 Public Datasets を用いた実験

  • 21. ● メインモデルの目的:アプリがインストールされそうなランキングを作成すること 
 ● データセット:(Context, App, Label) のタプルで構成される 
 ○ Label:アプリがインストールされているかどうかを示すバイナリ 
 ○ Context, App:アプリID,開発者ID,アプリタイトルなどの合計20個のカテゴリ特徴量.vocabulary size は,数百から数百万まで様々 
 ● オフラインテストの結果 
 ○ SE,ME ともに ROC-AUC について既存のモデルの性能を向上させることができた 
 Google Play App Store における実験

  • 22. ● オンラインテストの結果 
 ○ NIS-ME モデルのみで実施し,App Install が 1.02% 増加した 
 ● 時間の経過とパフォーマンス 
 ○ 各特徴量の分布が時間の経過とともに変化した場合,NIS の再実行が必要となる 
 ○ 2ヶ月間 NIS-ME とオリジナルモデルの ROC-AUC をモニタリングしたが,NIS の再実行の必要性 が見受けられず安定していることが分かった 
 Google Play App Store における実験

  • 23. ● モデルの input compornent における最適な vocabulary size と embedding dimension を自動的に探索す る手法である Neural Input Search (NIS) を提案 
 ● 出現頻度の高い item には高い表現力を与えつつ,出現頻度の低い item もカバーできる新しい埋め込 み手法である Multi-size Embedding (ME) を提案 
 ● public datasets と Google Play App Store のデータを用いた実験を行い,NISとMEの有効性を実証した 
 ● NISはモデル性能の大幅な向上につながる embedding configurations を見つけることができた 
 まとめ

  • 24. 参考文献
 ● [Paul Covington+, 2016] Paul Covington, Jay Adams, and Emre Sargin., “Deep Neural Networks for YouTube Recommendations” (RecSys, 2016)
 ● [Xiangnan He+, 2017] Xiangnan He, Lizi Liao, Hanwang Zhang, Liqiang Nie, Xia Hu, and Tat-Seng Chua., “Neural collaborative filtering” (WWW, 2017) 
 ● [Barret Zoph+, 2017] Barret Zoph and Quoc V. Le., “Neural Architecture Search with Reinforcement Learning” (ICLR, 2017) 
 ● [Hieu Pham+, 2018] Hieu Pham, Melody Guan, Barret Zoph, Quoc Le, and Jeff Dean., “Efficient Neural Architecture Search via Parameters Sharing” (ICML, 2018)