Source-linked AI summary

User Behavior Retrieval for Click-Through Rate Prediction

Jiarui Qin, Weinan Zhang, Xin Wu, Jiarui Jin, Yuchen Fang, Yong Yu

arXiv:2005.14171v1cs.IR

TL;DR

Long user histories make CTR prediction difficult because truncation can omit distant sequential patterns while full histories add noise and serving cost. UBR4CTR learns target-dependent queries to retrieve relevant behaviors from the full archive before attention-based prediction, and the paper reports improved performance with industrial deployment. The authors identify distributed training and improved indexing and retrieval as future work.

  • Problem

    CTR models must capture user-interest dynamics, but industrial systems truncate histories because long sequences are costly and may contain noise, potentially omitting distant patterns.

  • Method

    UBR4CTR learns a retrieval query from the prediction target, searches the full user-behavior archive, and feeds retrieved behaviors to an attention-based deep prediction model.

  • Results

    UBR4CTR significantly improves CTR prediction performance and has been deployed on the engineering schedule of a daily item recommender system.

  • Takeaways & Limitations

    Target-dependent behavior retrieval provides a practical alternative to using only the most recent behaviors in CTR prediction.

  • Takeaways & Limitations

    The authors leave distributed training efficiency and new indexing and retrieval methods for future work.

Abstract

from arXiv · show

Click-through rate (CTR) prediction plays a key role in modern online personalization services. In practice, it is necessary to capture user's drifting interests by modeling sequential user behaviors to build an accurate CTR prediction model. However, as the users accumulate more and more behavioral data on the platforms, it becomes non-trivial for the sequential models to make use of the whole behavior history of each user. First, directly feeding the long behavior sequence will make online inference time and system load infeasible. Second, there is much noise in such long histories to fail the sequential model learning. The current industrial solutions mainly truncate the sequences and just feed recent behaviors to the prediction model, which leads to a problem that sequential patterns such as periodicity or long-term dependency are not embedded in the recent several behaviors but in far back history. To tackle these issues, in this paper we consider it from the data perspective instead of just designing more sophisticated yet complicated models and propose User Behavior Retrieval for CTR prediction (UBR4CTR) framework. In UBR4CTR, the most relevant and appropriate user behaviors will be firstly retrieved from the entire user history sequence using a learnable search method. These retrieved behaviors are then fed into a deep model to make the final prediction instead of simply using the most recent ones. It is highly feasible to deploy UBR4CTR into industrial model pipeline with low cost. Experiments on three real-world large-scale datasets demonstrate the superiority and efficacy of our proposed framework and models.

1 INTRODUCTION

UBR4CTR addresses the limits of truncating user histories by retrieving target-relevant behaviors before CTR prediction. Its learnable retrieval framework is evaluated on large-scale e-commerce datasets and is designed for practical deployment.

  • CTR models need sequential behavior modeling because user interests contain temporal dynamics such as concept drift, long-term dependencies, and periodic patterns.
  • Industrial systems commonly use no more than 50 recent behaviors because online serving time, system load, and computational capacity constrain sequence length.
  • Using only recent behaviors can miss distant periodicity and long-term dependencies, whereas using longer histories introduces irrelevant behaviors, noise, and higher complexity.
  • UBR4CTR retrieves a limited number of historic behaviors most useful for each target user, item, and context instead of designing a more complex prediction model.
  • Different candidate items for the same user generate different queries and therefore retrieve different behaviors, unlike traditional frameworks using the same recent N behaviors.
  • UBR4CTR combines a learnable retrieval module with an attention-based prediction module, and experiments on three large-scale e-commerce datasets verify its efficacy.

2 PRELIMINARIES

The CTR task predicts whether a target user clicks a target item under a context using user-item interactions and timestamped behavioral histories. Users, items, and contexts are represented through categorical features.

  • User-item interactions are represented as quadruples {u,v,c,ts}, recording the user, item, context, and interaction timestamp.
  • A user’s behavioral history H_u is an ordered sequence of behavior records sorted by timestamp.
  • Each behavior record contains the user, the clicked item, and the context in which the interaction occurred.
  • Users, items, and contexts are represented by multiple categorical features, with numerical features discretized when necessary.
  • CTR prediction estimates the probability that target user u clicks target item v given historical behaviors and context c.
  • The click outcome is binary: 1 when the user clicks the item and 0 otherwise, modeled by a learned function with parameters θ.

3 METHODOLOGY

UBR4CTR separates user behavior retrieval from CTR prediction. It forms target-dependent queries, searches an indexed behavior archive, and applies attention to the retrieved records for final prediction.

  • UBR4CTR consists of a user behavior retrieval module and a prediction module.
  • The retrieval module contains a feature selection model, search engine client, and user history archive organized as a feature-based inverted index.
  • The search engine retrieves a fixed number of behavior records, which an attention-based deep model weights for final click-probability prediction.
  • The feature selection model chooses useful target features, which are combined into a query for retrieving relevant user behaviors.

3.2 User Behavior Retrieval Module

The retrieval module learns target features for query construction, searches an inverted index of user behaviors, and ranks candidate records with BM25. Rare features receive greater query importance than common features.

  • 3.2.1 Feature Selection Model: The feature selection model takes target-user, target-item, and context features as input and samples a selected feature subset using learned probabilities.
  • 3.2.1 Feature Selection Model: The user ID is always selected so retrieval searches the target user’s own behavior records.
  • 3.2.2 Behavior Searching: The archive treats each behavior as a document and each feature as a term, associating feature values with posting lists of matching behaviors.
  • 3.2.2 Behavior Searching: The selected query features are combined with the user-ID posting list to form a candidate behavior set through posting-list intersection and union operations.
  • 3.2.2 Behavior Searching: BM25 scores candidate behavior documents and returns the top S records as the retrieved behaviors.
  • 3.2.2 Behavior Searching: The query’s IDF term gives common features less weight than rare features because rare features are treated as stronger preference signals.

3.3 Prediction Module

The prediction module uses an attention-based deep neural network to weight retrieved user behaviors and combine them with the prediction target for CTR estimation.

  • An attention-based deep neural network models the importance of different user behaviors for the final prediction.
  • The comprehensive user representation is computed by weighted-sum pooling over user behaviors, using attention weights.
  • Attention weights are calculated from each behavior and the prediction target, which contains the user, item, and context.
  • The final prediction is produced by combining the learned representation with the target through a multilayer network.
  • The prediction network uses a three-layer perceptron with widths 200, 80, and 1, sigmoid output, and ReLU hidden activations.

3.4 Model Training

UBR4CTR trains retrieval and prediction jointly around a log-likelihood objective. The prediction network is pretrained, then the prediction and retrieval components are optimized alternately, using REINFORCE for discrete feature selection.

  • The training objective is log-likelihood of the predicted score given the target user-item pair, context, and retrieved behaviors.
  • Sampling selects query features, after which deterministic search results are treated as behaviors sampled from πθ(Bu |q).
  • The prediction network is optimized while the retrieval module remains fixed, using stochastic gradient descent when the objective is differentiable with respect to ϕ.
  • The retrieval module treats its behavior distribution as a policy and uses REINFORCE to optimize the discrete feature-selection process.
  • The retrieval reward replaces log-likelihood with Relative Information Gain, defined as RIG = 1 − NE, where NE is normalized entropy.
  • Training first pretrains the prediction network, then alternates optimization of the prediction and retrieval models across epochs.
  • Each training iteration forms queries from selected features, retrieves behaviors, trains the attention-based predictor, and trains the retrieval model.

3.5 Model Analysis

UBR4CTR’s search complexity depends on the average user-history length and the number of selected query features, while the attention components contribute smaller parallelizable or quadratic terms.

  • The average posting-list length in the user-history archive is N/F, where N is total logged behaviors and F is the number of unique features.
  • Retrieving postings takes O(1), while interaction and scoring operations take O(T + Kq · N/F).
  • The total UBR4CTR time complexity is O(T + Kq · N/F) after treating the attention-related constants as negligible.
  • The feature-selection self-attention has complexity O(Kq^2), and the attention-based prediction network contributes O(C).

4 EXPERIMENTS

Experiments on three real-world, large-scale e-commerce datasets compare UBR4CTR with strong sequential CTR and recommendation baselines. UBR4CTR improves performance, learns useful retrieval patterns, and remains effective with substantially fewer behaviors than full-sequence baselines.

  • Experimental Setup: Experiments use three large-scale Alibaba e-commerce datasets, time-based train/validation/test splits, and AUC and log-loss evaluation.The baselines include seven models from sequential CTR prediction and recommendation scenarios.
  • Performance Comparison: RQ1: UBR4CTR improves AUC by 4.1%, 10.9%, and 22.3% and log-loss by 9.0%, 12.0%, and 32.3% across the three datasets.The first comparison gives all models the same behavior count, while UBR4CTR retrieves behaviors from the full sequence.
  • Performance Comparison: RQ1: UBR4CTR retains the best performance while using 80% fewer behaviors than baselines fed the full-length sequences.The results indicate that longer histories can add noise and irrelevant information, making selective retrieval useful.
  • Performance Comparison: RQ1: Further-history behaviors contain richer patterns, while attention mechanisms help capture them when longer sequences are available.Baselines generally improve with full-length sequences, especially DIN and DIEN, although UBR4CTR still performs best with fewer retrieved behaviors.
  • Learning Process: RQ2: The retrieval model’s REINFORCE reward increases during training, indicating that its feature-selection model learns useful patterns.The reward is RIG, a variant of log-likelihood, and each x-axis step represents an iteration over 4% of the training set.
  • Retrieval Analysis: RQ3: Retrieval size has an intermediate optimum: too few behaviors omit information, whereas too many introduce noise.The learning curves also show effective convergence, with retrieval training beginning after the prediction network approaches convergence.

5 DEPLOYMENT FEASIBILITY

UBR4CTR is designed for industrial deployment by adding a retrieval module while keeping the prediction pipeline largely unchanged. Its inference time remains below 1 ms across three datasets, with a modest latency gap versus DIEN.

  • Deployment integration: UBR4CTR requires a historical-behavior search engine, while the existing CTR prediction pipeline remains almost unchanged.The main engineering change is how historical behaviors are obtained; the prediction module is not different from traditional solutions.
  • Efficiency analysis: UBR4CTR has time complexity O(T + Kq · N_F), whereas many RNN-based sequential CTR models have complexity O(C · T).The framework argues that N_F is close to constant because F is large, limiting growth of the corresponding term.
  • System load: UBR4CTR avoids maintaining all T user behaviors in memory, reducing system-load requirements relative to traditional methods.Traditional sequential methods commonly maintain the full behavior sequence in memory.
  • Inference time: UBR4CTR’s average inference time is less than 1 ms on all three datasets.Inference time includes forward computation and behavior searching on the test dataset.
  • Inference time: UBR4CTR is the slowest sequential CTR model, but its inference time is only about 15% to 30% longer than DIEN.The authors state that this gap could be optimized through further infrastructure implementation.

6 RELATED WORK

Related CTR methods primarily model categorical-feature interactions or temporal patterns in sequential user behaviors. Sequential user modeling spans temporal, Markov, deep-learning, and memory-network approaches for capturing drifting user dynamics.

  • Feature-interaction models: One stream of user-response models focuses on interactions among multiple categorical features.Factorization machines and models such as DeepFM, DeepCross, PNN, xDeepFM, and FNN use structures including matrix factorization, DNNs, outer products, or inner products.
  • Sequential user modeling: A second stream models temporal patterns in sequential user behaviors for user-response prediction.Examples include DIN’s attention mechanism, DIEN’s GRU and attention layers, and HPMN’s memory network for long sequences.
  • Sequential user modeling: Sequential user modeling targets users’ drifting behavioral dynamics and includes temporal collaborative filtering, Markov-chain, and deep-learning methods.Deep-learning approaches include RNN-, CNN-, and Transformer-based models, as well as methods using user-side and item-side sequences.
  • Sequential user modeling: Memory networks are also used to memorize longer sequences of user behaviors.This approach appears among the deep-learning and sequential user-modeling methods surveyed.

7 CONCLUSION AND FUTURE WORK

The paper concludes that UBR4CTR retrieves useful historical behaviors before attention-based prediction and has been scheduled for deployment in a daily recommender system. Future work targets distributed training and improved behavioral indexing and retrieval.

  • Conclusion: UBR4CTR searches the whole user-behavior archive for useful data before using an attention-based deep network for prediction.The framework addresses the limitations of using only the most recent behaviors.
  • Conclusion: UBR4CTR has been scheduled for deployment in a daily item recommender system at a mainstream bank company.
  • Future work: Future work will develop distributed training algorithms to improve mini-batch training efficiency.
  • Future work: Future work will explore more effective indexing and retrieval methods for storing and searching the user-behavior archive.
Loading 2005.14171v1…