{'fraction_non_alphanumeric': 0.030302184770780435, 'fraction_numerical': 0.011272635955244288, 'mean_word_length': 4.579947065234315, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
User Behavior Retrieval for Click-Through Rate Prediction

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.


INTRODUCTION
Click-through rate (CTR) prediction plays a key role in today's online personalization platforms (e.g., e-commerce, online advertising, recommender systems), whose goal is to predict a user's clicking probability on a specific item under a particular context. With more than a decade of development for the online personalization platforms, the amount of user behaviors logged on the platforms grows rapidly. There are 23% of users have more than 1000 behaviors during six months on Taobao [23]. As there exist resourceful temporal patterns embedded in user behaviors, it becomes an essential problem for both industry and academia to build an effective and efficient model which could utilize user sequential behaviors to obtain accurate predictions of CTR.
In the deep learning era, there are many deep neural network (DNN) based CTR prediction models such as Wide&Deep [4], FNN [43], DeepCross [36], DeepFM [7], PNN [21,22] and xDeepFM [17], most of which have been deployed on commercial personalization platforms. These models emphasize mining feature interactions, and are proposed to utilize the multi-categorical features of the data better. Nonetheless, such models ignore the sequential or temporal patterns of user behaviors.
As shown in [1,8,11,16], the temporal dynamics of user behavior play a key role in predicting the user's future interests. These sequential patterns include concept drifting [37], long-term behavior dependency [16,23], periodic patterns [26], etc. Thus, there are models proposed to capture the user's sequential patterns in both CTR prediction and sequential recommendation tasks. For CTR prediction, there are attention-based models like DIN [45] and DIEN [44], memory network-based models like HPMN [23]. More user behavior modeling methods are proposed for sequential recommendation, which is a quite similar task to CTR prediction. There are RNN-based models [12], CNN-based models [31], Transformerbased models [15] and memory network-based models [5,35]. However, most of the sequential models above have a common problem in real-world practice. When the platforms have logged a large number of user behaviors, the common industrial solution is to truncate the whole behavior sequence and only uses the most recent N behaviors as the input to the prediction model [44,45], as illustrated in the upper part of Figure 1. The strict requirements of online serving time plus bottleneck of system load and computational capacity put limits on the length of user sequence that could be used. As a result, in most of industrial cases, no more than 50 recent behaviors are used [44].
Traditional framework that uses the most recent N behaviors could cause negative issues. It is obvious that the effective sequential patterns may be not just embedded in the recent sequence of behaviors. It may be traced back into further history such as periodicity and long-term dependencies [23]. If we try to use a longer sequence, however, a lot of irrelevant behaviors and noises could be introduced. Let alone the time and space complexity the longer history brings.
In this paper, to tackle the above practical issues, we try to solve the problem from the data perspective instead of designing more sophisticated yet complicated model. Specifically, we target to design a framework to retrieve a limited number of historic behaviors that are most useful for each CTR prediction target. As shown in Figure 1, a prediction target consists of three parts, i.e.,the target user, the target item and the corresponding context. There are features of the prediction target, such as the user's location, gender, occupation, and item's category, brand, merchant, and context features such as time and scenario. Then we use a model to select a subset of these features, which builds a query to retrieve the relevant historical behaviors. All the user's behaviors are stored as the information items in a search engine, and we use the generated query to search from the historical records. The retrieved behaviors are used in CTR prediction.
For every different candidate target item for the same user, we will retrieve different behaviors for prediction because the generated queries are different. This is a significant change compared with traditional framework that uses exactly the same recent N behaviors for prediction on different items with the same user.
The resulted solution framework is called User Behavior Retrieval for CTR (UBR4CTR). In UBR4CTR, the task is divided into two modules. The first is a learnable retrieval module which consists of a self-attentive network to select the features and form the query, and a search engine in which the user behaviors are stored in an inverted index manner. The other module is the prediction module in which an attention-based deep neural network is built to make the final prediction based on the retrieved user behaviors as well as the features of the prediction target.
The contributions of the paper can be summarized in three-fold: • We reveal an important fact that it is important to retrieve more relevant user behaviors than just use the most recent behaviors in user response prediction. Instead of designing more sophisticated and complex models, we put more attention on retrieving user's behavioral data. • We propose a new framework called UBR4CTR which manages to retrieve different behaviors for the same user when predicting her CTR to different items under different contexts. All the previous sequential models only use the most recent behaviors of a user. We propose a search engine based method and an effective training algorithm to learn to retrieve appropriate behavioral data. • We conduct extensive experiments and compare our framework with several strong baselines using traditional framework over three real-world large-scale e-commerce datasets. The results verify the efficacy of UBR4CTR framework.
The rest of the paper is organized as follows. In Section 2, we will introduce the preliminaries and some notations used in this paper. Section 3 is about the detailed description of our proposed framework and models. The experimental settings and corresponding results are shown in Section 4. The deployment feasibility is discussed in Section 5. In Section 6 we discuss about some important related works. Finally, we conclude the paper and discuss the future work in Section 7.

PRELIMINARIES
In this section, we formulate the problem and introduce the notations. For CTR prediction task, there are M users in U = {u 1 , ..., u M } and N items in V = {v 1 , ..., v N }. The user-item interactions are denoted as Y = {y uv |u ∈ U, v ∈ V} and, Furthermore, each user-item interaction has a timestamp and context in which the interaction happened, thus the data is formulated as quadruples which is {u, v, c, ts} indicating u clicked v at time ts in context c.
To model user's evolving interests, we organize the user behavioral history as H u = {b u 1 , b u 2 , ..., b u T } in which b u i stands for i-th behavior record of user u sorting by timestamp.
As click-through rate is essentially a matching probability between user, item and context, each behavior record b u i is consist of these three parts that where v i is the i-th clicked item and c i is the context at which the interaction happened.
At the feature level, each user u is represented by a bunch of fea- where f u p denotes the p-th feature of u. It is a common practice that all the features are multiple categorical features [24,45]. Numerical features, if any, are discretized to categorical features.
]. The goal of CTR prediction is to predict probability of target user u clicking target item v given historical behaviors of u under context c. It is formulated asŷ where f is the learned function with parameters θ . We conclude the notations and the corresponding descriptions in Table 1.

METHODOLOGY
In this section, we describe our proposed UBR4CTR (User Behavior Retrieval for CTR prediction) framework in detail. We firstly give a big picture of the overall framework, then we give detailed descriptions on the user behavior retrieval module and the prediction module. Moreover, the training methods and some analysis about time complexity are given in the following sections.   Description. u, v The target user and the target item.

M, N
The number of users and items. y,ŷ The label and the predicted probability of the user-item interaction.
One feature of user, item and context. u, v, c Embedding representation of target user u, target item v and the corresponding context c.
The set of u's retrieved behaviors.

S
Number of retrieved behaviors.

Overall Framework
The overall framework of UBR4CTR is illustrated in Figure 2. The framework can be divided into two major modules: user behavior retrieval module and prediction module. The user behavior retrieval module consists of a feature selection model, a search engine client and a user history archive. All the user historical behaviors are stored in the archive and they are organized in a feature-based inverted index manner which will be explained in details in Section 3.2.2. As shown in Figure 2, when we need to predict the click-through rate between the target user and target item in a certain context, all of the three parts of information are combined to form a prediction target. The prediction target essentially consists of a bunch of features of the target user, target item and the context. So the prediction target is then fed to the feature selection model which will select the appropriate features to form a query. Detailed design of the feature selection model is in Section 3.2.1. Then we use the query to search in the user history archive through a search engine client.
The search engine client retrieved a certain number of user behavior records and these records are then used by the prediction module. In the prediction module, we use an attention-based deep model to distinguish the influence of each behavior to the clicking probability and make the final prediction which will be discussed in Section 3.3.
The feature selection model and the prediction model are trained in turn. The goal of feature selection model is to select the most useful subset of features. The features of this subset will be combined to generate a query which is used to retrieve the most relevant user behaviors for the final prediction.

User Behavior Retrieval Module
In this section, we introduce the user behavior retrieval module which consists of a feature selection model and a behavior searching process. Figure 3, we regard all the features of target user u, target item v and the corresponding context c as the input of the feature selection model. Without loss of generality, we set f u 1 as the user id feature. User id is a special feature which we must select because we want to retrieve behaviors of user u herself. All the other features are concatenated as a whole. For simplicity, we denote all the features

Feature Selection Model. As shown in
To better model the relationships and interactive patterns between the features, we use self-attention mechanism [32]. Specifically, we define that where f i is the dense embedding representation of the i-th feature. And K = Q = V ∈ R K q ×d where d is the dimension of the embeddings. The self-attention is defined as, and multihead self-attention is where The output of multihead self-attention E is then fed to a multilayer perceptron with ReLU (x) = max(0, x) activation function asÊ whereÊ ∈ R K q ×1 . And the probability of selecting each corresponding feature is obtained by taking a sigmoid function as where σ (x) = 1 1+exp −x . Then we sample the features according to these probabilities and thus get the selected subset of features. Note that the user id feature is always in the subset because we have to retrieve from the target user's own behaviors.

Behavior Searching.
We use the typical search engine approach to store and retrieve the user behaviors. We regard each user behavior as a document and each feature as a term. Inverted index is used to track all the behaviors, which is shown in Figure 4. Each feature value is associated with a posting list which consists of all the behaviors that has this specific feature value. For instance, the "user_id_1" has the posting list of all the behaviors of the user whose id is 1 and "Nike" has the posting list which consists of the behavior records that brand ids are "Nike". The logic of the query is essentially formulated as where f u 1 is user id. The selected query feature set is The posting list of f u 1 and the union set of f 1 to f n 's posting lists are intersected. The intersection is the candidate behavior set. Then we use BM25 [29] to score every behavior document in the candidate set and the top S are retrieved.
The similarity s between the query q and a behavior document D is calculated as, where t f (f i , D) is feature f i 's term frequency in D which is 1 or 0. The length of a behavior document is defined as the number of the features in that behavior, so all the behavior documents have the same length. Thus the average length is each documents' length and |D | avgdl = 1. k 1 and b are free parameters. We set k 1 = 1.2 and b = 0.75. IDF is defined as, where N is the total number of the behavior documents and N (f i ) is the number of documents that contains the feature f i . The IDF term gives the common features less importance than rare features. It makes sense that rare features imply stronger signals on user's preference compared to the commonly seen features. By ranking the candidate behaviors using BM25, we obtain the top S documents as the retrieved behaviors.

Prediction Module
For the prediction module, we use an attention-based deep neural network to model the importance of different user behaviors to the final prediction. As shown in Figure 5, the comprehensive user representation r u is calculated by weighted sum pooling as and α i represents the contribution of b u i to the comprehensive user representation. The attention weight α i is calculated as where w i is defined as, and Att is a multi-layer deep network with ReLU activation function. Then the final prediction is calculated aŝ where f is implemented as a three-layer perceptron, whose widths are 200, 80 and 1 respectively. ϕ is the parameters. The output layer uses sigmoid function and other layers use ReLU as activation.

Model Training
As the objective is to estimate the click-through rate accurately, we utilize the log-likelihood as our objective function which is defined as, where LL is the log-likelihood of predicted score on target user-item pair u, i given retrieved user behaviors B u under context c. It is defined as, In Eq. 15, q is the query which consists of the selected features as described in Section 3.2.1. Sampling is used to select features and then they form the query string. After the query string is formed, searching results, a.k.a, retrieved behaviors are deterministic. Thus we could regard the behaviors are sampled from a probability distribution π θ (B u |q).

Optimize the Prediction Module.
To optimize the attentionbased prediction network f ϕ , we could have that, where L ce is cross entropy loss and L r is regularization term. When we are optimizing the prediction network, the retrieval module remains unchanged, so if the function f is differential with respect to ϕ, the above optimization can be solved by typical stochastic gradient descent algorithm.

Optimize the Retrieval Module.
For the retrieval module, only the feature selection model needs to be optimized. As a sampling process is evolved, we could not directly use SGD to optimize it. Instead, we use the REINFORCE [38,42] algorithm to deal with the discrete optimization.
Specifically, while keeping the prediction network f ϕ fixed, the feature selection model is optimized via performing its maximization: as LL(·) because it doesn't have parameter θ . For each query q, we denote objective function as J q which is We regard the retrieval module π θ (B u |q) as a policy and use the likelihood ratio to estimate its gradients as, which is an unbiased estimation on the gradients of Eq. 19.
As the uncertainty of the entire retrieval module actually comes from the feature selection model, we could derive that, where f j ∈ { f 1 , .., f n } and p(f j ) is the sampling probability obtained in Eq. 7. So in Eq. 20 the gradient of θ can be further derive as where f l j is j-th feature of l-th query. To train the model with a reward that has a better scale, we replace LL(·) with Relative Information Gain (RIG) as the reward function here. RIG is defined as RIG = 1 − N E where NE is the normalized entropy [10]. NE is calculated as, where p is the average experienced CTR.

Pseudo Code of Training Process.
In this subsection, we give a detailed pseudo code of the training process. First we pre-train the prediction network with the initial feature selection model. After the pre-train, the two models are optimized in turn. Algorithm 1 shows the training process.

Algorithm 1 Training the UBR4CTR framework
Require: Dataset D = (U t ar дet , V t ar дet , C t ar дet ) containing all the target user-item-context triples; User history archive H u . Ensure: final CTR predictionŶ between all the target user u and target item v. Train retrieval model using Eq. 18 for one epoch. Train attention-based prediction network using Eq. 17 for one epoch. 10: until convergence

Model Analysis
In this section, we analyze the time complexity and feasibility of our method. We use N to denote the total number of all users' logged behaviors and use F to denote the total number of unique features (equivalent to term) that have ever appeared in the whole dataset. Then the average length of the posting lists in the user history archive is N F . Recall the searching operation described in Section 3.2.2 and Eq. 8, we first retrieve all the postings of features in q which takes O(1) time. Then the interaction operation takes O(T +K q · N F ) time where T is the average length of a user sequence and K q = K u + K v + K c − 1 is the upper bound of the number of selected features. The next scoring operations does not increase the complexity because it is linear to O(T + K q · N F ). The complexity of the self-attention in feature selection model is O(K 2 q ). The attentionbased prediction network takes O(C) time where C is the cost of computing one Att operation in Eq. 13 because all the attention operations can be paralleled. These two constants can be ignored and the total time complexity of UBR4CTR is O(T + K q · N F ).

EXPERIMENTS
In this section, we present our experimental settings and corresponding results in detail. We compare our model with several strong baselines and achieve the state-of-the-art performance. Furthermore, we have published our code for reproduction 1 .
We start with three research questions (RQ) and use them to lead the following discussions.
• RQ1 Does UBR4CTR achieves the best performance compared to other baselines? 1 https://github.com/qinjr/UBR4CTR • RQ2 What is the convergence performance of Algorithm 1? Is the training process effective and stable? • RQ3 What is the influence of the retrieval module in UBR4CTR and how the retrieval size affect the performance?  For UBR4CTR, the datasets are processed into the format of comma separated features. A line containing user, item and context features is treated as a behavior document. For baselines, the user behaviors are simply sorted by timestamp. As the datasets don't contain specific context features, we manually design some features using behavior timestamp to make it possible to capture periodicity. We design features such as season id (spring, summer, etc), weekend or not, and which half of the month it is.

Experimental Settings
Search Engine. After the datasets are preprocessed, they are inserted into a search engine using a comma separated tokenizer. We use Elastic Search 5 as the search engine client which is based on Apache Lucene 6 .
Train & Test Splitting. We split the datasets using the time step. The training dataset contains the 1st to (T − 2)th user behaviors, in which the 1st to (T − 3)th behaviors are used to predict the behavior at (T − 2)th step. Similarly, the validation set uses 1st to (T − 2)th behaviors to predict (T − 1)th behavior and the test set uses 1st to (T − 1)th behaviors to predict T th behavior.

Evaluation Metrics.
We evaluate the CTR prediction performance with two widely used metrics. The first one is area under ROC curve (AUC) which reflects the pairwise ranking performance between click and non-click samples. The other metric is log loss. Log loss is to measure the overall likelihood of the test data and has been widely used for the classification tasks [24,25].

Compared Baselines.
We compare our framework and models with seven different strong baselines from both sequential CTR prediction and recommendation scenarios.
GRU4Rec [12] is based on GRU and it is the first work using the recurrent cells to model sequential user behaviors for session-based recommendation. Caser [31] is a CNNs-based model that regards the user sequence as an image thus uses horizontal and vertical convolutional layers to capture temporal patterns of user behaviors. SASRec [15] uses Transformer [32]. It regards the user behaviors as a sequence of tokens and uses self-attention mechanism and position embedding to capture the dependencies and relations between behaviors. HPMN [23] is a hierarchical periodic memory network that is proposed to handle very long user historical sequence. Moreover, the user memory state can be updated incrementally. MIMN [19] is based on Neural Turing Machine [6] which models multiple channels of user interests drifting. The model is implemented as a part of user interest center [19] which could model very long user behavior sequences. DIN [45] is the first model that uses attention mechanism in CTR prediction of online advertising. DIEN [44] uses two-layer RNNs with attention mechanism to capture evolving user interests. It uses the calculated attention values to control the second recurrent layer, which is called AUGRU. UBR4CTR is our proposed framework and models described in Section 3.

Performance Comparison: RQ1
We conduct two groups of comparisons between our UBR4CTR and baseline models. In the first group of experiments, all of the models are using the same amount of user behaviors which are 20, 20, 12 for the three datasets respectively. The only difference is that baselines are using the most recent behaviors (about 20% of the total length) and UBR4CTR retrieve 20% of behaviors from the whole sequence. The experimental results are shown in Table 3.
From the table, we could find the following facts. (i) The performance is improved significantly compared to the baselines. AUC are improved by 4.1%, 10.9% and 22.3% on three datasets respectively, and log-loss are improved by 9.0%, 12.0% and 32.3% respectively. (ii) The vast improvement is a demonstration that the most recent behaviors do not embed enough temporal patterns so the baselines can not capture them effectively. Although some of the baselines are Table 3: The first group of results of CTR prediction in terms of AUC (the higher, the better) and log-loss (LL, the lower, the better). Bold values are the best in each column, while the second best values are underlined. Improvements are against the second best results.

Model
Tmall Taobao  Alipay  AUC  LL  AUC  LL  AUC  4.1% 9.0% 10.9% 12.0% 22.3% 32.3% Table 4: The second group of results of CTR prediction in terms of AUC (the higher, the better) and log-loss (LL, the lower, the better). Improvements are against the second best results. 0.2% 4.1% 6.8% 12.7% 4.6% 15.1% pretty complex and fancy, they cannot perform well if the patterns that they try to capture are not contained in the recent behavior sequence in the first place.

Model
In the second group of experiment, we use different settings for the baselines and exactly the same settings for UBR4CTR as the first group of experiment. We feed the full-length sequences to all the baseline models which are 100, 100 and 60 respectively on three datasets. They are the maximum lengths of user behaviors in these datasets. And the sizes of the retrieved behaviors remain the same for UBR4CTR which are 20, 20 and 12. The results are shown in Table 4.
In Table 4, the performance of UBR4CTR is the same as that in Table 3 because we don't change any settings.
From the table, we could find the following facts. (i) UBR4CTR still has the best performance even though it uses 80% less behaviors than other baselines. This shows that longer sequence may has more noise and irrelevant information thus it is necessary to obtain only the most useful data out of the whole sequence. (ii) Most of the baselines achieve better performance than themselves compared to Table 3, especially DIN and DIEN. This shows that behaviors from further history do contain richer information and patterns. And these patterns are easier to be captured using attention mechanism. (iii) Although the improvement of AUC is much smaller due to the better performance of baselines, log-loss still improves significantly. The reason is that the optimization objective of the retrieval module is RIG (equivalent to log-loss) after all.

Learning Process: RQ2
To illustrate the convergence of our framework, we plot the learning curves of UBR4CTR. In Figure 6, the upper three subplots are the AUC curves of the attentive prediction network when training on three datasets, respectively. Each step of the x-axis is corresponding to the iteration over 4% of the training set. The lower three sub-figures show the "reward" of the REIN-FORCE algorithm w.r.t the feature selection model of the retrieval module. The "reward" is essentially RIG which is a variant of loglikelihood. Each step of the x-axis means the iteration over 4% of the training set. The rewards increase during the training process implying that the feature selection model actually learns useful patterns.
From the AUC figures, we could find that our models converge effectively. For the prediction network, we can observe that there are flat areas in the middle of training process followed by a rapid increase, especially in the second and third AUC plots. Recall our training procedure described in Algorithm 1, the retrieval module is trained after the prediction network. It means that when the prediction network is about to converge, the retrieval module begins training, and after that, there will be a performance break though for the prediction network.

Extensive Study: RQ3
In this section, we conduct some extensive and ablation studies on our framework. Figure 7 illustrates the influence of different retrieval sizes on the prediction performance. From the figure, we can find that the fluctuation of AUC and log-loss is not very severe in terms of the absolute values. However, there exists an optimal size for each dataset. This reveals that smaller sizes may not contain enough behaviors and information, while too much retrieved behaviors are not always suitable for performance either. Because it will introduce too much noise. To illustrate the importance of the retrieval module of our framework, we plot the performance comparisons between the sum pooling model and attention network with&without user behaviors retrieval. Sum pooling model just uses a very simple sum pooling operation on user behaviors which means the α i = 1 in Eq. 11. The results are shown in Figure 8. From the figure, we find that the sum pooling model without retrieving (SP) performs very poorly. Once equipped with the retrieval module, the performance of it increases significantly (UBR_SP). The same phenomenon applies for attention network which performance is largely improved when equipped with behavior retrieval module (ATT vs. UBR4CTR).

DEPLOYMENT FEASIBILITY
The deployment of UBR4CTR has been made on the engineering schedule of a daily item recommendation platform under a mainstream bank company. In this section, we mainly discuss the feasibility of industrial deployment of UBR4CTR framework. First, it is not difficult to switch the current model pipeline to UBR4CTR because the main change brought from UBR4CTR is the how the historical user behaviors is obtained. To update the model pipeline to UBR4CTR, a search engine of historical user behaviors needs to be built, while the whole CTR prediction model pipeline remain almost the same but adding an additional retrieval module. As Figure 2 shows, the prediction module is not different from that of the traditional solutions.
Efficiency is another essential concerns in industrial applications. We analyze the time complexity of UBR4CTR which is O(T +K q · N F ) in Section 3.5. For most of the sequential CTR models which are normally based on RNN, time complexity of them is O(C ·T ) where T is the average length of user sequences and C is the cost of one operation (e.g. GRU rolling). The time complexity of UBR4CTR is not totally infeasible because the term N F is very closed to a constant as F is a big number and it will slow the increase of this term.
From the perspective of system load, UBR4CTR is better because it does not require maintaining all the T behaviors in memory which is a common practice for the traditional methods.
Moreover, we compare the actual inference time between our UBR4CTR and other sequential CTR baselines in experiments. The average inference time of the models are illustrated in Figure 9. The time is calculated by dividing the overall time (only the time that  Figure 8: Ablation study on the influence of retrieval module. Note: AUC, the higher, the better; log-loss, the lower, the better contains the forward computations and behavior searching) on test dataset with the number of prediction targets. From the figure, we could find that the absolute value of UBR4CTR's inference time on three datasets is less than 1ms which is efficient enough for online serving [34]. The inference time of UBR4CTR is the longest among all the sequential CTR models but the gap is not that large. Particularly, compared with DIEN which has been deployed in Alibaba online advertising platform [44], the average inference time of UBR4CTR is about 15% to 30% longer, which can be optimized via further infrastructure implementation.

User Response Prediction
For user response prediction, there are two main streams of methods. One stream is about modeling the interactions of multiple categorical features. The key point of these models is to design structure that could capture the cross feature interactions. Factorization machine [27] is the pioneer model which uses matrix factorization in CTR prediction task and a lot of variants of FM [14,30,41] are proposed in recent years. Except for the early feature interaction models, deep neural networks are also used in CTR prediction. Wide&Deep [4] is the first deep learning model which effectively transform the high dimensional discrete features into dense representation and achieve good prediction performance. After Wide&Deep and FM, more and more models which combine the feature interaction structure and deep neural networks are proposed. DeepFM [7] uses both FM and DNN to improve the CTR prediction performance. DeepCross [36] and PNN [21] automatically models the cross feature interactions by outer product and inner product respectively. There are similar models such as xDeepFM [17], FNN [43] etc.
The other stream of models focuses more on mining temporal patterns from sequential user behaviors. DIN [45] is an attentionbased network which attributes different weights on different items that user has interacted with. DIEN [44] utilizes two layers of GRU and attention mechanism to capture evolving user interests. HPMN [23] is a memory network-based method which model very long sequences for user response prediction. MIMN [19] is based on neural Turing machine [6] that models the multiple channels of user evolving interests.

Sequential User Modeling
Sequential user modeling is about capture user's drifting dynamics of behaviors. It is a research hotspot for recommender systems recently. Multiple types of model are proposed. The first is temporal collaborative filtering [16] which considers the drifting user preferences. The second type is based on Markov chains [8,9,28] which models the user state dynamics in an implicitly way and drive the future behaviors. The third category is based on deep learning. There are RNN-based models [2, 11-13, 18, 33, 39] that regard user behaviors as sequence of tokens, CNN-based models [15,31] which regard the behaviors as an image and Transformer-based models [15]. Furthermore, there are models [40] that not only utilize userside sequence but also item-side sequence. Qin et al. [20] propose dual side neighbor based CF for sequential user modeling. Memory networks are also used for sequential user modeling [3,5,19,35] which aim to memorize longer sequence of user behaviors.

CONCLUSION AND FUTURE WORK
In this paper, we propose the UBR4CTR framework of user response prediction. The retrieval module of our framework generates a query to search from the whole user behaviors archive to retrieve the most useful behavioral data for prediction. The retrieved data is then used by an attention-based deep network to make the final prediction. Our framework overcomes the practical problems of traditional framework which simply uses most recent behaviors and significantly improves the CTR prediction performance. The deployment of UBR4CTR has been made on the engineering schedule of a daily item recommender system of a mainstream bank company.
For the future work of research, we will put more efforts on distributed training algorithm which will make the framework more efficient to train in a mini-batch manner. Furthermore, we will explore new effective indexing and retrieval methods for storing and searching the user behavioral archive.