Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AWS ML@Loft #11 「BASE」類似商品APIの裏側
Search
bokeneko
March 24, 2020
Technology
700
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
600
Retty Tech Night #1 bokeneko
bokeneko
1
880
TechPlay DeepLearningAllStars2017
bokeneko
0
1.6k
TFUG#3 RettyにおけるDeep Learningの自然言語処理への応用事例
bokeneko
18
16k
Other Decks in Technology
See All in Technology
プロンプト_きのこカンファレンス2026_LT
yurufuwahealer
0
140
Text-to-SQLをAgentCoreで実現し、生成されるSQLの精度を定量的に評価する
yakumo
2
670
Agentic AI 時代のテスト手法: Kiro とはじめるプロパティベーステスト (AWS Summit Japan 2026 | DEV212)
ymhiroki
0
220
依頼文化をやめる日 EM視点で語るPlatform EngineeringとInclusive SRE / Discussing Platform Engineering and Inclusive SRE from an EM's Perspective
shin1988
4
4.2k
初めてのDatabricks勉強会
taka_aki
2
240
AI駆動開発におけるQAエンジニアの役割事例 〜AI駆動開発の現場から〜
kobayashiyorimitsu
0
400
AWS Blocks を触ってみた/first-tach-aws-blocks
fossamagna
2
150
地域 SRE コミュニティ最前線 / SRE NEXT 2026 Discussion Night Track C
muziyoshiz
0
160
Compose 新機能総まとめ / What's New in Jetpack Compose
yanzm
0
150
AI時代のエンジニアキャリアについて今一度考える
sakamoto_582
2
1.3k
ポストモーテム! DDoSからサイトは守れた。 でもビジネスは守れなかった。
bengo4com
0
1.8k
「ちゃんとやっている」は独りよがりだった ― 不安に寄り添うインシデント対応へ / Towards incident response that addresses anxieties
chmikata
1
3.7k
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
310
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
610
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
220
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
A designer walks into a library…
pauljervisheath
211
24k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
180
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
870
Product Roadmaps are Hard
iamctodd
55
12k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
260
Balancing Empowerment & Direction
lara
6
1.2k
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. ご清聴ありがとうございました