Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
AWS ML@Loft #11 「BASE」類似商品APIの裏側
Search
bokeneko
March 24, 2020
Technology
720
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AWS ML@Loft #11 「BASE」類似商品APIの裏側
ML@Loft #11で発表したスライド
https://ml-loft.connpass.com/event/169623/
bokeneko
March 24, 2020
More Decks by bokeneko
See All by bokeneko
Terraformを用いた機械学習インフラの構築 / Developers Summit 2018 FUKUOKA A-8
bokeneko
0
610
Retty Tech Night #1 bokeneko
bokeneko
1
900
TechPlay DeepLearningAllStars2017
bokeneko
0
1.7k
TFUG#3 RettyにおけるDeep Learningの自然言語処理への応用事例
bokeneko
18
16k
Other Decks in Technology
See All in Technology
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
1
580
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
170
Temporal 最高!でも改めて「日付」について調べたら人類の負債すぎる件
riyaamemiya
0
150
AIにシークレットを見せない、WSL2で安全な開発環境
yazm
0
300
しろおびから始める!ログ活用の第一歩
shumei_ito
0
950
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
730
Running Kotlin + Quarkus with Lambda
nealle
1
3.7k
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
0
420
自作バイナリを動かす「入口」8選
puhitaku
2
1.3k
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
160
hackers_champloo_2026_tidb
makocchi
0
160
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
230
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1369
210k
What's in a price? How to price your products and services
michaelherold
247
13k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
How to train your dragon (web standard)
notwaldorf
96
6.9k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
730
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
310
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
260
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Fireside Chat
paigeccino
43
4.1k
Transcript
© - BASE, Inc. 「BASE」類似商品APIの裏側 © - BASE, Inc.
© - BASE, Inc. ⾃⼰紹介 ⽒原 淳志 BASE株式会社 / Data
Strategy Team • データ分析、機械学習などを担当するチームに所属 • TensorFlow出たくらいからDeep Learningに⼿を出 したりしてた • 今は機械学習で作成されたモデルを実運⽤するため のインフラ設計とかが中⼼ • クラフトビール好き。会社でビール部主催中
© - BASE, Inc. ネットショップ作成サービス「BASE」 出店ショップ数 (個⼈‧法⼈‧⾏政を含む) 90万ショップ以上 BASEかんたん決済利⽤料 3.6%+40円
サービス利⽤料 % コンセプト 「誰でも簡単に使えるネットショップ作成サービス」 初期費⽤‧⽉額費⽤ 0円 ショップオーナーのサポート機能が充実! 個⼈でも決済機能をかんたん導⼊。 審査もスピーディー! クレジットカード 銀⾏振込 コンビニ決済‧Pay-easy 後払い (BASE Apps) キャリア決済
© - BASE, Inc. 関連商品 • BASEアプリで商品詳細ページの下 部にある • 表⽰中の商品に類似した商品が並ん
でいる • DSチームが提供している類似商品 APIで候補を選んでいる
© - BASE, Inc. アジェンダ • 類似商品APIの仕組み • 類似商品APIのインフラ‧運⽤
© - BASE, Inc. 類似商品APIの仕組み
© - BASE, Inc. 類似商品APIの仕組み • 画像、テキストの特徴量の近さを商品の類似度に採⽤ • 画像の特徴量 •
MobileNet • テキストの特徴量 • 以前はfastTextのdoc vector → 現在はfastText & SCDVに移⾏ • 近傍探索 • 以前はNGT → 現在はfaissに移⾏
© - BASE, Inc. MobileNet • Kerasにおいて(というか⼤抵のフレーム ワークで)ImageNetでの事前学習済みのモ デルが提供されている •
include_top=Falseで全結合層なしで使えば 1024次元の特徴量抽出モデルとして使える
© - BASE, Inc. fastText, SCDV • fastTextはFacebookがOSSで開発している単語の分散表現学習など できるツール。doc vectorも計算可(ただのword
vectorの平均っぽ い) • https://github.com/facebookresearch/fastText • SCDVはdoc vectorを計算するための⼿法 • https://dheeraj .github.io/SDV/ • この辺がくわしい • https://qiita.com/fufufukakaka/items/a a c
© - BASE, Inc. NGT • Yahoo! JAPANがOSSで開発している⾼次元 vectorの近傍探索ツール •
https://github.com/yahoojapan/NGT • 数百万個の1024次元ベクトルから数⼗msく らいで近傍を取ってこれる • (でもくっそメモリ⾷う)
© - BASE, Inc. faiss • FacebookがOSSで開発している⾼次元ベクトルの近傍探 索ツール • https://github.com/facebookresearch/faiss
• NGTと⽐べると • 圧縮のための仕組みとかが⽤意されていて便利 • 圧縮⼿法によっては事前の学習が必要 • 圧縮フル活⽤したらNGTに⽐べて必要なメモリを1/100 くらいまで減らせる • ドキュメントが充実してる(⼤事)
© - BASE, Inc. 関連商品APIのインフラ‧運⽤
© - BASE, Inc. 類似商品APIの運⽤ • 画像の特徴量は事前計算、テキストはオン デマンド • モデルの更新はdaily
• ECSを利⽤したマイクロサービスの組み合わ せでAPIを提供
© - BASE, Inc. 事前計算 DS AWS SNS SQS ECS
SageMaker 新規画像登録通知 特徴量計算 対象画像取得 特徴量の保存 S S
© - BASE, Inc. モデルの更新 DS AWS ECS Task Step
Functions faiss indexの作成 ECS 特徴量index Lambda 対象商品の取得 特徴量の取得 faiss indexの保存 ECSの再起動 Cloud Watch Rule RDS S
© - BASE, Inc. APIの提供 DS AWS ECS API Proxy
ECS 類似画像商品API ALB Internal ALB ECS 画像特徴量index ECS 類似テキスト商品API ECS テキスト特徴量index
© - BASE, Inc. Future Work • 今はファッションとそれ以外で画像とテキ ストの特徴量を使い分けているが、画像‧ テキストの特徴量を同時に扱う汎⽤的な商
品特徴量モデルを作成中 • この商品特徴量を類似商品以外にも⾃動カ テゴリ分類とかに利⽤したい
© - BASE, Inc. ご清聴ありがとうございました