Source-linked AI summary

SDM: Sequential Deep Matching Model for Online Large-scale Recommender System

Fuyu Lv, Taiwei Jin, Changlong Yu, Fei Sun, Quan Lin, Keping Yang, Wilfred Ng

arXiv:1909.00385v2cs.IR

TL;DR

Large-scale recommender systems need to model users’ dynamic preferences beyond static item-based CF, including multiple interests within sessions and relevant long-term behavior. SDM addresses these gaps with multi-head self-attention and gated long-short-term fusion, then matches the resulting user vector to item embeddings. Offline experiments report superior performance, and deployment at Taobao achieved improvements in important commercial metrics.

  • Problem

    Item-based CF is widely used for matching but does not effectively model users’ dynamic and evolving preferences.

  • Method

    SDM combines multi-head self-attention for multiple short-session interests with gated fusion of short- and long-term behaviors.

  • Results

    SDM outperformed other state-of-the-art methods in offline experiments and achieved significant improvements over the previous online system at Taobao.

  • Takeaways & Limitations

    SDM provides a sequential matching model that captures dynamic preferences by combining multiple short-session interests with relevant long-term behavior.

  • Takeaways & Limitations

    The related sequence-aware methods discussed overlook multiple interests within one session.

Abstract

from arXiv · show

Capturing users' precise preferences is a fundamental problem in large-scale recommender system. Currently, item-based Collaborative Filtering (CF) methods are common matching approaches in industry. However, they are not effective to model dynamic and evolving preferences of users. In this paper, we propose a new sequential deep matching (SDM) model to capture users' dynamic preferences by combining short-term sessions and long-term behaviors. Compared with existing sequence-aware recommendation methods, we tackle the following two inherent problems in real-world applications: (1) there could exist multiple interest tendencies in one session. (2) long-term preferences may not be effectively fused with current session interests. Long-term behaviors are various and complex, hence those highly related to the short-term session should be kept for fusion. We propose to encode behavior sequences with two corresponding components: multi-head self-attention module to capture multiple types of interests and long-short term gated fusion module to incorporate long-term preferences. Successive items are recommended after matching between sequential user behavior vector and item embedding vectors. Offline experiments on real-world datasets show the superior performance of the proposed SDM. Moreover, SDM has been successfully deployed on online large-scale recommender system at Taobao and achieves improvements in terms of a range of commercial metrics.

1 INTRODUCTION

SDM replaces static item-based CF matching with a sequential model that separately represents short- and long-term behaviors. It uses multi-head attention for multiple session interests and gated fusion for relevant long-term preferences, with offline and Taobao deployment gains.

  • Item-based CF models static interactions and does not adequately capture evolving behavior sequences in large-scale recommender systems.
  • SDM separates latest-session short-term behaviors from earlier long-term behaviors to represent different levels of user interest.The goal is to recall top N items as matching candidates after the user sequence.
  • Multi-head self-attention captures multiple interest tendencies within a single session that single-attention representations can miss.The module represents preferences from different views, such as category, brand, color, style, and shop reputation.
  • A gated fusion module combines short- and long-term representations while preserving long-term information related to the current session.The gate uses user profile, long-term, and short-term vectors to model their correlation and control fusion.
  • SDM was evaluated on two real-world offline datasets, outperformed other state-of-the-art methods, and was deployed in Taobao’s production recommender.The production system had run online since December 2018 and achieved significant improvements over the previous online system.

2 RELATED WORK

Related work progresses from latent-factor and neural matching toward sequential recommendation, but prior sequence-aware methods overlook multiple interests within a session. Other approaches incorporate long-term preferences or memory, with additional storage and feature-design costs for some memory methods.

  • Matrix factorization and neural matching learn user and item representations for nearest-neighbor retrieval, while sequential recommendation predicts future actions from observed behavior sequences.
  • Sequence-aware Recommendation: GRU, attention, convolutional, and related sequence models represent short-session behavior, but existing methods overlook multiple interests within one session.
  • Sequence-aware Recommendation: Memory-augmented sequential recommenders express fine-grained interests, but some require extra storage, manual feature design, and memory-network computation.
  • Long-term preference methods concatenate stable historical preferences or use hierarchical attention and multi-time-scale representations alongside session behavior.

3 THE PROPOSED APPROACH

The proposed approach formulates sequential matching around a user’s latest session and prior long-term behaviors. It encodes these inputs into short- and long-term representations, combines them into a predicted user vector, and retrieves item candidates by similarity.

  • Problem Formulation: The model formulates whether user u will interact with item i at time t from the user’s latest time-ordered sessions.
  • Problem Formulation: A session groups interactions by backend session ID, nearby timestamps, and a maximum length of 50 interactions.
  • Problem Formulation: The latest session is the short-term behavior, while interactions before it during the past 7 days form the long-term behavior sequence.
  • User Prediction Network: The user prediction network takes short-term and long-term behaviors as inputs and encodes them into separate representations before fusion.
  • Candidate Matching: The fused user behavior vector is matched with item embedding vectors through inner products to predict the top N item candidates.

3.2 Training and Online Serving

Training predicts the next interacted item with sampled softmax and cross-entropy, while online serving combines the user prediction network with KNN retrieval over item embeddings. Short- and long-term inputs are encoded from behavioral and side-information features before fusion.

  • Training: The next interacted item is the positive training label, and negative labels are sampled from the item set excluding that target.
  • Training: Sampled softmax computes probabilities over sampled positive and negative items, using cross-entropy as the loss function.
  • Online Serving: Online serving imports item embeddings into a K-Nearest-Neighborhood similarity search system and retrieves the most similar items to the predicted user vector.
  • Representation and Fusion: The short-term representation is encoded with LSTM and attention, while long-term behavior is represented from varied side information and fused with user profile features.

3.3 Input Embedding with Side Information

SDM represents items and users through multiple feature scales rather than item IDs alone, embedding side information for direct use in the deep neural network.

  • Input Embedding with Side Information: Items are described using multiple feature scales, including item ID, brand, shop, and price, because item-ID-only encoding is insufficient for sparse industrial catalogs.The model addresses customers’ differing preferences for brands, shops, and other item attributes.
  • Input Embedding with Side Information: Each item feature is embedded and transformed into a dense vector before entering the deep neural network.For feature f, the input embedding has size d_f and is mapped using a feature-specific transformation W_f.
  • Input Embedding with Side Information: User profiles are represented from features such as age, gender, and life stage as a dense embedding vector.Profile feature embeddings are combined to describe user u across different feature scales.

3.4 Recurrent Layer

The recurrent layer applies an LSTM to embedded short-term interaction sequences, producing a sequential preference representation that preserves temporal information for later attention processing.

  • Recurrent Layer: An LSTM processes the embedded short-term sequence to capture global temporal dependencies in session behavior.This follows session-based recommendation approaches that model users’ current short sessions.
  • Recurrent Layer: The LSTM encodes the interaction sequence into a hidden output vector h^u_t called the sequential preference representation.The representation has dimension d×1 at time t.
  • Recurrent Layer: The cell-state vector carries information from the recurrent layer to the attention network for higher-order representation.This connects recurrent sequence encoding with the subsequent attention mechanism.

3.5 Attention Mechanism

SDM uses attention to reduce the influence of unrelated session actions and represent multiple personalized interests from different positions and representation subspaces.

  • Attention Mechanism: Self-attention assigns different weights to sequence components to reduce the effect of unrelated browsing actions.Attention aggregates vectors into an overall representation rather than treating every action equally.
  • Multi-head Self-Attention: Multi-head attention models multiple interest aspects by attending jointly to information from different representation subspaces and positions.This supports preferences such as color and style when a user browses a skirt.
  • Multi-head Self-Attention: The multi-head output is formed by concatenating attention heads and applying an output linear transformation.The number of heads is h, and W^O denotes the output transformation matrix.
  • User Attention: A user-attention module uses the user profile embedding as a query to extract finer-grained personalized information from the self-attention outputs.The mechanism is intended to represent users with multiple points of interest.

3.6 Long-term Behaviors Fusion

SDM encodes heterogeneous long-term behaviors and uses gated fusion to combine them with short-term preferences, selectively controlling their contributions at each time step.

  • Long-term Behaviors Fusion: Long-term behavior encoding captures accumulated interests across dimensions such as repeatedly visited shops and purchased categories.The model organizes long-term behavior into feature subsets, including first-level category and brand.
  • Long-term Behaviors Fusion: Entries in each long-term feature subset are embedded and attention-pooled into an overall vector for rapid online response.The representation includes behaviors such as shops interacted with during the past week.
  • Long-short Term Gated Fusion: A gated neural network takes the user profile, short-term representation, and long-term representation as inputs to control their fusion.The gate vector is designed to regulate how global and local preference features are combined.
  • Long-short Term Gated Fusion: The gate determines contribution percentages for short- and long-term preferences, and the final output uses element-wise multiplication in the fusion computation.This allows relevant long-term information to be fused with short-term behavior representations.

4 EXPERIMENT SETUP

The experiments use two offline e-commerce datasets and a large-scale online Taobao deployment, with offline ranking metrics and online commercial metrics evaluating matching methods.

  • Datasets: The offline evaluation uses Mobile Taobao and JD e-commerce datasets, while online training uses seven days of unsampled Mobile Taobao logs.The online deployment scales to hundreds of millions of users and items, uses more long-term behaviors, and updates models and features daily.
  • Datasets: Taobao offline data uses seven days for training and the eighth day for testing, with approximately 10 thousand active users evaluated online.Users with fewer than 40 interactions or more than 1000 interactions are excluded from the offline Taobao dataset; sessions shorter than two behaviors are removed during training.
  • Evaluation Metrics: Offline effectiveness is measured with HitRate@K, Precision@K, Recall@K, and F1@K at K = 100 and K = 20.These metrics evaluate correct top-K recommendations, candidate precision, ground-truth coverage, and their combined F1 score.
  • Evaluation Metrics: Online evaluation considers pCTR, pGMV, and discovery to capture clicks, merchandise volume, and novel-item recommendation.pCTR is measured per page view, pGMV per 1,000 page views, and discovery reflects novel categories among categories clicked by users.
  • Comparison Methods: The comparison includes item-based CF, DNN, GRU4REC, and five SDM variants evaluated under shared datasets, features, and training hyper-parameters.The study also includes ablation variants that combine short- and long-term representations, use multiple target items, or remove side-information embeddings.

5 EMPIRICAL ANALYSIS

Offline and online analyses show that SDM's multi-head attention captures multiple session interests, while gated fusion selectively incorporates relevant long-term preferences. Four attention heads perform best, and PSDMMAL-N improves online pCTR, pGMV, and discovery over the item-based CF baseline.

  • Offline Results: Offline results show SDM variants outperform competing models by combining short-term behavior, long-term preferences, and user-profile information.Deep sequential methods outperform traditional item-based CF, while PSDMMAL outperforms the evaluated alternatives by modeling long-term preferences through fusion.
  • Online A/B Test: 7.04%, 4.50%, and 24.37% are PSDMMAL-N's average improvements in pCTR, pGMV, and discovery over the online item-based CF baseline.The comparison covers seven successive days in December 2018 on Mobile Taobao; both sequential models outperform the baseline.
  • The Effect of Multi-head Attention: Four attention heads achieve the best results; adding more than four heads causes a dramatic decline because each head receives a smaller representation dimension.The head-count experiment evaluates PSDMMAL on the offline Taobao dataset with hidden dimension d set to 64.
  • The Effect of Multi-head Attention: Different attention heads focus on different session interests, including white down jackets, dresses, and jeans.Figure 4 visualizes attention weights computed using the last LSTM hidden output as the query vector.
  • The Fusion Gate: Gated fusion selectively combines long-term preferences related to the current session instead of importing all long-term behavior information.A Taobao case combines current red wine glasses and relevant historical red wine behavior to recommend a red wine decanter while ignoring unrelated clicks.

6 CONCLUSIONS

The paper proposes SDM to capture users’ dynamic preferences by combining short-term sessions with long-term behaviors. It reports effectiveness offline and improved important commercial metrics after deployment on Taobao’s recommender system.

  • SDM combines short-term sessions and long-term behaviors to capture users’ dynamic preferences.
  • Multi-head self-attention captures multiple interests in short-term sessions.
  • Long-short term gated fusion incorporates users’ long-term preferences.
  • SDM showed effectiveness in extensive offline experiments and improved important commercial metrics after deployment on Taobao’s recommender system.
Loading 1909.00385v2…