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
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
8
2.2k
ハードウェアコンペでもAI駆動開発が進んでいる話
iotengineer22
1
690
触りたくないデータに、どう触るか AI時代のRBACアクセスガバナンス
ivry_presentationmaterials
0
120
Claude Code本は、どのように執筆チームで書かれたか
oikon48
1
360
今こそ知りたいAmplifyGen2
mkdev10
2
160
DevelopersIO 2026 知識の地図を描く ─ オントロジーとは何か?
ishikawa_satoru
1
1.5k
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
2
850
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
170
継続的なAIコスト最適化
bgpat
1
290
初対面のメンバーがチームを組み、Claude Codeでゼロからサービスをリリース
mkdev10
1
120
しろおびから始める!ログ活用の第一歩
shumei_ito
0
910
【Data Engineering Summit2026_登壇資料】医療ビッグデータ×AIエージェントを支えるデータ基盤とハーネスエンジニアリング
jmdc_presentation
0
130
Featured
See All Featured
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
350
Git: the NoSQL Database
bkeepers
PRO
433
67k
RailsConf 2023
tenderlove
30
1.6k
WENDY [Excerpt]
tessaabrams
14
40k
The SEO identity crisis: Don't let AI make you average
varn
0
590
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
470
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
58k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
67k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
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. ご清聴ありがとうございました