Deep Session Interest Network for Click-Through Rate Prediction

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

Abstract

Click-Through Rate (CTR) prediction is a fundamental task in industrial recommender systems, where understanding historical user behavior is key to accurate modeling. While traditional models treat user history as a continuous, flat sequence, human behavior is naturally organized into discrete sessions characterized by focused intent. This paper presents the Deep Session Interest Network (DSIN), a novel architecture that explicitly models the hierarchical structure of user behavior. By partitioning sequences into sessions and utilizing a combination of self-attention with Bias Encoding and Bi-directional LSTMs, DSIN effectively captures both intra-session homogeneity and inter-session evolution. Experimental results on large-scale datasets, including a 6-billion-record production dataset, demonstrate that DSIN significantly outperforms existing state-of-the-art models.

Introduction

In the domain of online advertising and recommendation, predicting whether a user will click a specific item (CTR) is essential for optimizing user experience and revenue. Modern deep learning models like the Deep Interest Network (DIN) and Deep Interest Evolution Network (DIEN) have made significant strides by attending to historical behaviors. However, these models typically view a user's history as a single, uninterrupted sequence.

In reality, user behavior is punctuated by time gaps, forming distinct "sessions." The authors of DSIN observe two critical patterns in this structure:

  1. Intra-session Homogeneity: Within a single session (e.g., a 30-minute window), a user's interests are usually highly focused on a specific category or intent.
  2. Inter-session Heterogeneity: Across different sessions, interests can shift dramatically as the user's context or needs change over days or weeks.
User behavior sequences partitioned into sessions, illustrating intra-session homogeneity and inter-session heterogeneity.

By failing to account for this session-based structure, flat sequence models often struggle with "noise"—where a sudden shift in interest is treated as a random fluctuation rather than a meaningful change in session context.

The DSIN Architecture

The Deep Session Interest Network introduces a four-layer framework to process user behavior sequences hierarchically.

1. Session Division Layer

The raw behavior sequence is first divided into sessions. A common heuristic used in the industry, and adopted by the authors, is to start a new session if the time gap between two consecutive behaviors exceeds 30 minutes. This transforms the input from a simple list of items into a sequence of session-based item sets.

2. Session Interest Extractor Layer

To extract the underlying "intent" of each session, DSIN employs Multi-head Self-attention. To preserve the structural information of the sessions, the authors introduce Bias Encoding. This mechanism adds learnable tensors that represent three dimensions: the session index, the position of the item within that session, and the embedding dimension. This allows the model to distinguish between the temporal order of sessions and the relative order of clicks within a session.

3. Session Interest Interacting Layer

Once session-level interests are extracted, the model must capture how these interests evolve over time. DSIN uses a Bi-directional LSTM (Bi-LSTM) to model the sequential relationship and "flow" between different sessions. This layer is crucial for understanding how a user's broader interests develop across multiple interactions.

4. Session Interest Activating Layer

Not all past sessions are equally relevant to a current "target" item. DSIN uses a Local Activation Unit (an attention mechanism) to weigh the extracted session interests based on their similarity to the item currently being ranked. This ensures that the model focuses on the most relevant historical contexts when making a prediction.

Experimental Results

DSIN was evaluated against several industry-standard baselines, including YouTubeNet, Wide&Deep, DIN, and DIEN, using two major datasets:

  • Alimama Advertising Dataset: 26 million records from 1 million users.
  • Production Recommender Dataset: An internal Alibaba dataset containing 6 billion display/click logs.

Performance Comparison

DSIN demonstrated superior performance across both datasets. On the Alimama dataset, DSIN achieved an AUC of 0.6375, outperforming DIEN (0.6343) and DIN (0.6330). On the massive production dataset, DSIN reached an AUC of 0.6515. In the high-stakes environment of CTR prediction, even a 0.001 improvement in AUC is considered a significant achievement with substantial impact on platform revenue.

Ablation studies further confirmed the necessity of the model's core components. Removing the Bias Encoding or the Bi-LSTM layer resulted in a measurable drop in AUC, validating the importance of both structural encoding and temporal session modeling.

Conclusion

The Deep Session Interest Network (DSIN) highlights the value of modeling the hierarchical, session-based nature of human behavior. By aggregating clicks into session interests, the model becomes more robust to sequence noise and better at capturing the evolution of user intent. Future work may involve incorporating external knowledge sources, such as Knowledge Graphs, to better model cross-category interest relationships and further refine session-based representations.

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