Deep Session Interest Network for Click-Through Rate Prediction

Yufei Feng, Fuyu Lv, Weichen Shen, Menghan Wang, Fei Sun, Yu Zhu, Keping Yang

TL;DR

The Deep Session Interest Network (DSIN) improves Click-Through Rate (CTR) prediction by explicitly modeling the hierarchical structure of user behavior. By dividing long behavior sequences into time-bounded "sessions," DSIN captures highly focused interests within each session and tracks how these interests evolve over time, outperforming previous state-of-the-art models on massive real-world datasets.

What Problem Does This Paper Address?

In modern recommender systems (like Amazon or Taobao), predicting whether a user will click an item (CTR) depends heavily on their past behavior. Most existing models treat a user's history as a single, flat sequence of items.

However, human behavior isn't a continuous stream; it's composed of sessions. A user might spend 10 minutes browsing trousers, stop for an hour, and then return to look at finger rings. As shown in the figure below, behaviors are typically homogeneous within a session (focused on one intent) but heterogeneous across different sessions.

Figure 1: Here is one demo of sessions collected from a real-world industrial application. The number beneath the picture indicates the time gap, specified in seconds, between the time of clicking on the current item and that of clicking on the first item. Sessions are di- vided in the principle of whenever there exists a time gap of more than 30 minutes.

Existing models often struggle with the "noise" created by these sudden jumps in interest. By ignoring session boundaries, they lose the fine-grained context of a user's specific intent at different points in time.

Methods

The authors propose DSIN, a model that processes user behavior through four specialized layers:

  1. Session Division Layer: The raw behavior sequence is split into sessions. Following industry standards, a new session begins whenever there is a time gap of more than 30 minutes between clicks.
  2. Session Interest Extractor Layer: To capture the core intent of a session, the model uses Multi-head Self-Attention. Crucially, they introduce Bias Encoding—a variation of positional encoding that accounts for the order of items within a session, the order of the sessions themselves, and the specific dimensions of the embedding.
  3. Session Interest Interacting Layer: Since a user's interests evolve (e.g., buying a phone in Session 1 might lead to looking for cases in Session 2), the model uses a Bi-LSTM to capture the sequential relationship and "flow" between these session-level interest vectors.
  4. Session Interest Activating Layer: Not all past sessions are equally relevant to a new "target item." This layer uses an Attention Mechanism (Local Activation Unit) to weight session interests based on their similarity to the item currently being ranked for the user.
Figure 2: The overview of our proposed model DSIN. Overall, before MLP layers, DSIN has two main components. One is sparse features and the other processes the user behavior sequence. From the bottom up, the user behavior sequence S is first divided into sessions Q, which are then added with bias encoding and extracted into session interests I with self-attention. With Bi-LSTM, we mix session interests I with contextual information as hidden states H. Both Vectors of session interests I and hidden states H activated by the target item and embedding vectors of User Profile and Item Profile are concatenated, flattened and then fed into MLP layers for the final prediction.

Datasets

The model was evaluated on two large-scale datasets:

  • Alimama Advertising Dataset: A public dataset containing 26 million records from 1 million users over 8 days.
  • Alibaba Recommender Dataset: A massive production dataset containing 6 billion logs from 100 million users.

Key Insights and Ideas

  • Intra-session Homogeneity: The self-attention mechanism is particularly effective here because it can "filter" out accidental clicks or unrelated items within a session to find the user's true underlying interest.
  • Inter-session Evolution: While raw item sequences are noisy, the sequence of session interests is much smoother. Applying a Bi-LSTM to these summarized interests allows the model to capture long-term trends more effectively than applying RNNs to raw item clicks (as seen in the DIN-RNN baseline).
  • Bias Encoding: Standard positional encodings only look at sequence order. DSIN's Bias Encoding captures the hierarchical nature of the data (position in session + session index), providing a richer structural prior for the attention mechanism.
Figure 3: This figure visualizes the attention weights in the self-attention mechanism at the lower half and the activation unit work at the upper half in DSIN. Note that the attention weights in the self-attention mechanism are the sum of that in each head. Also, the darker the line color, the greater the weight.

Key Results

DSIN consistently outperformed established models like Wide&Deep, Deep Interest Network (DIN), and Deep Interest Evolution Network (DIEN).

Table 1: Comparison of AUC scores across different models.

On the Advertising dataset, DSIN achieved an AUC of 0.6375, and on the Recommender dataset, it reached 0.6515. While these numerical gains might seem small, in the world of industrial CTR prediction, even a 0.001 improvement in AUC can lead to significant increases in revenue and user engagement.

Limitations and Future Work

The authors note that while DSIN captures temporal structure well, it doesn't yet incorporate external knowledge. They suggest that future work could involve Knowledge Graphs to provide prior knowledge that helps explain why a user might jump from one specific interest (e.g., trousers) to another (e.g., belts), further refining the interest evolution modeling.

Summary updated

BibTeX
@inproceedings{feng2019deep,
  author = {Yufei Feng and Fuyu Lv and Weichen Shen and Menghan Wang and Fei Sun and Yu Zhu and Keping Yang},
  title = {{Deep Session Interest Network for Click-Through Rate Prediction}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.24963/ijcai.2019/319},
}
Figure