Hello World Dev Conference
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Scaling The E-Commerce Recommendations System - 黃耀慶(Arthur Huang) {%hackmd @HWDC/BJOE4qInR %} >#### 》[議程介紹](https://hwdc.ithome.com.tw/2024/session-page/3311) >#### 》[填寫議程滿意度問卷|回饋建言給辛苦的講者](https://forms.gle/yPVK5UJY2rVs7RVE7) # Agenda - Chanllenges in LINE Shopping - Multi-stage recommender - Retrieval - Ranking - Re-Rank .... # Challenges in LINE SHOPPING - Complex Scenario - More than 20 types of recommendations - Shopping Recommendation Scenario - Charts - Point - Search Keyword - Shop - Huge Item - More than millions of Products - 如何快速找到客戶有興趣的商品 # Multi-Stage Recommmender - 5 STEPS - Item Corpus (Millions) - Retrieval(Hundreds) - 快速找到用戶有興趣的商品 - Ranking (dozens) - 基於用戶行為進行排序 - Re-rank (dozens) - 新鮮度的問題 - 排序 - Recommended Items # Retrieval **Two-Tower Model (雙塔模型)** - Flow : User/Item Feature -> **Model Tower** -> **Dot Product** -> Product - **Model Tower**:NNs for Learning embedding (為了取得User/Item 的Embedding) - User Tower - Item Tower - **Dot Product**: - Get Simliarty between user-item embedding - 限制:無法使用User/Item feature - 推薦funnel - 有興趣: 用戶點擊 0.0001% - 沒興趣: 沒點擊商品(幾乎為全商品)做隨機抽樣 - Learning User-Item Embeddings - Target # In-Batch Negative Sampling # Feature Engineering ![IMG_4898](https://hackmd.io/_uploads/r1q8iX-a0.jpg) - **Numeric Feature ** - Normalization - Power Transform: 轉換成正態分佈 - Wilson Score Interval (e.g. CTR):削減與業務邏輯上特別情況(ex.曝光)的bias - **Categorical Feture** - One-Hot - Label Encoding + Embedding Layer (e.g. User ID, Item ID):解決稀疏矩陣的問題 - Feature Hashing:會有哈希衝突的問題,需trade-off - Ordinal Encoding - S, M, L, XL, XXL -> 0, 1, 2, 3, 4, 5 - Frequency Encoding - **Text Feature** - Bert Encoding:取得Embedding # Feature Enineering - Embedding Layer - Parameters Size = num_embeddings x embedding_dim - Shared Embedding:共用Embedding,可以節省一半左右的size - Reduce Param Size # Retrieval - Inference - 透過取得 Item/User Embedding,透過近似向量搜尋快速找到適合的推薦商品 - ANN index - Item (Offline) - 行為不常改變,可以線下批次更新 - User (Online) - 即時性的, 因用戶的行為是經常改變的, e.g. 這次想買滑鼠 , 下次想買 XXX - Item2Item(猜你喜歡):以用戶喜歡的商品,與其他商品進行相似度比對 # Ranking : Ranking based on user behavior in the module 雙塔模型無法使用user/item feature,所以會額外加上Ranking的手法 - Deep Ranking Network - Learning the probability of click event - Target(Focus on Module) - Positive : Click - Negative : Impression but no click - 這邊只在於"這個版面" 有沒有點 - e.g. 夯話題 - 思考:為什麼不能拿有曝光,但沒點擊的項目作為Negative? - 點擊:有興趣 → 非常有興趣 - 沒點擊:不一定沒興趣 → 有興趣 - 完全沒有被Retrival到:沒興趣 - 透過 PySpark 進行 scaling - 分散式運算的基本概念 - # Re-rank: Ranking by Divefrsity, Freshness, Business Logic - Diversity (推薦多樣性) - do not show items from the same category in a sequence. - Freshness (保持用戶的新鮮程度,新商品上架沒資料的時候可以這樣推) - Promote fresher items - e.g. Youtube 5%~10% for new items, this is good for long term , 避免同溫層, 讓user 做興趣探索 - Business Logic (特定節慶/檔期) - Promotion / Holiday Campagin - 在假期期間, 提高"對應產品"的權重. - 父親節 => 父親會用的 + 適合送禮的 - Product Profit - 新增商品上架時間 - 推薦系統本質上是一個GMV(網站成交金额)放大器 # Model Training - Petastorm - 過往記憶體不夠,就是狂加 - 需要取捨:大量資料處理 → Petastorm dataset (parquet) - 如何透過大量資料資料讀取,打亂資料 - 透過列式儲存降低資料存取的負擔,特別擅長處理稀疏矩陣 # ML flow - 搭配資料視覺化工具 # Pytorch Lighting - 透過將流程模組化之後,重複使用。 (template) # Airflow - 資料排程管理使用 ==聊天區== - DS or ML <=5 - Search or Recommendation <=5 好難記...都是圖 看講者能不能提供投影片了, .

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully