Paper commentary
Deep Interest Network for Click-Through Rate Prediction
Deep Interest Network scores each past behavior against the candidate ad
- Problem Embedding&MLP click models squeeze a user's whole history into one fixed-length vector. That vector stays the same for every ad, so it cannot capture several interests at once.
- Method Deep Interest Network weights each past behavior by its match to the candidate ad, then sums them into a user vector that changes per ad.
- Results On the Alibaba dataset, DIN with MBA regularization and Dice reaches 0.6083 AUC and 11.65% RelaImpr over BaseModel.
Why one fixed user vector limits CTR models
Embedding&MLP models embed each sparse feature group, pool the behavior embeddings into a fixed-length vector, and feed the concatenated result to an MLP. For the behavior group, that pooled vector is the same for a given user whatever ad is scored, so one point in the embedding space has to stand for every interest the user has. A larger vector would hold more interests, but it enlarges the parameter count, raises the risk of overfitting on limited data, and adds computation and storage cost.
The argument rests on the observation that a click usually responds to only part of a user's history. A swimmer who clicks a goggle ad is mostly responding to a recent bathing-suit purchase rather than to shoe browsing. The study asks whether a user vector recomputed for each candidate ad can express diverse interests better under a limited dimension, and whether training such large sparse networks can be made practical.
How the local activation unit makes the user vector depend on the ad
DIN keeps the Embedding&MLP structure and changes only how the behavior group is pooled. Each behavior embedding \(e_j\) of the user is paired with the candidate ad embedding \(v_A\), and a small feed-forward network \(a(\cdot)\) turns the pair into an activation weight. The user vector for ad A is \[ v_U(A)=\sum_{j=1}^{H} a(e_j, v_A)\, e_j=\sum_{j=1}^{H} w_j\, e_j \] where \(H\) is the length of the behavior list, so each behavior embedding is scaled by its own weight before the sum.
The input of \(a(\cdot)\) also includes the product of the two embeddings, which the paper presents as explicit knowledge for relevance modeling.
Unlike the attention used in NMT, the weights \(w_j\) are not normalized by softmax, so they need not sum to one. The authors keep this scale because they read the total of the weights as an approximation of how strongly the user's interests are activated. In their example, a history made of 90% clothes and 10% electronics gives a larger \(v_U\) for a T-shirt candidate than for a phone candidate, because the T-shirt matches the clothing part of the history.
Softmax normalization would remove that scale, which the authors say loses resolution in the numerical size of the user vector.
Why full L2 is too costly for embedding tables, and the batch-restricted fix
In these CTR networks the embedding dictionary holds most of the parameters, and with fine-grained ids it reaches about 0.6 billion dimensions in the Alibaba setting. SGD already updates only the embedding rows of ids present in a mini-batch, but an ordinary L2 penalty would need the norm over every row at every step, which is too heavy at this scale.
The regularizer therefore penalizes only the ids that appear in the current mini-batch.
The starting point is the full penalty \(L_2(W)=\|W\|_2^2\), summed over samples so that each id \(j\) contributes \(\|w_j\|_2^2\) divided by its occurrence count \(n_j\) for every sample that contains it. Grouping the samples into mini-batches, with \(\alpha_{mj}\) equal to the maximum over the batch's instances of the indicator that id \(j\) occurs, gives the approximation \[ L_2(W)\approx\sum_{j=1}^{K}\sum_{m=1}^{B}\frac{\alpha_{mj}}{n_j}\|w_j\|_2^2 \] where \(K\) is the dimensionality of the feature space and \(B\) is the number of mini-batches.
For mini-batch \(B_m\), each embedding row is updated as \[ w_j\leftarrow w_j-\eta\left(\frac{1}{|B_m|}\sum_{(x,y)\in B_m}\frac{\partial L(p(x),y)}{\partial w_j}+\lambda\frac{\alpha_{mj}}{n_j}w_j\right) \] with \(\eta\) as the learning rate and \(\lambda\) as the regularization weight. For ids absent from the batch, \(\alpha_{mj}\) is zero, so the penalty term adds nothing to their update.
In the Alibaba regularization study, \(\lambda\) was searched and then fixed at 0.01 for both DiFacto and MBA.
Dice: an activation whose switch point follows the batch statistics
PReLU is written as \(f(s)=p(s)\,s+(1-p(s))\,\alpha s\) with \(p(s)=\mathbb{I}(s>0)\), so it switches hard at zero between the identity and a learned slope \(\alpha\) on the negative side. A fixed switch at zero may be a poor choice when the input to each layer follows a different distribution.
Dice keeps the same two-channel form, with the control function \[ p(s)=\frac{1}{1+e^{-\frac{s-E[s]}{\sqrt{Var[s]+\epsilon}}}} \] so the switch sits at the mean of the input rather than at zero. Because the sigmoid replaces the hard step, the switch between the two channels is smooth. The paper notes that Dice degenerates into PReLU when \(E[s]=0\) and \(Var[s]=0\).
Datasets, baselines and metrics
The Amazon Electronics subset has 192,403 users, 63,001 goods, 801 categories and 1,689,188 samples. For each user the task predicts the (k+1)-th reviewed goods from the first k, with training examples for k from 1 to n-2, and the test set predicts the last review from the first n-1.
MovieLens has 138,493 users, 27,278 movies, 21 categories and 20,000,263 samples, and ratings of 4 and 5 are labelled positive. The split is by user: 100,000 users go to training (about 14,470,000 samples) and 38,493 to testing (about 5,530,000 samples).
LR is the shallow baseline, and BaseModel is the Embedding&MLP model that the authors treat as the strong baseline for comparison. Wide&Deep adds cross-product features of user behaviors and candidates as its wide input, following the DeepFM practice, PNN adds a product layer after the embeddings, and DeepFM replaces the wide part with a factorization machine.
AUC is computed as \[ \mathrm{AUC}=\frac{\sum_{i=1}^{n}\#\mathrm{impression}_i\times \mathrm{AUC}_i}{\sum_{i=1}^{n}\#\mathrm{impression}_i} \] where \(n\) is the number of users and \(\mathrm{AUC}_i\) is the AUC of the \(i\)-th user, so the metric weights per-user orderings by impression count.
Amazon and MovieLens comparison
Each row is averaged over 5 repeated runs, and the influence of random initialization on AUC is below 0.0002. All deep models beat LR on both public datasets, which the authors take as evidence of what deep learning brings to this task.
Among the compared models, DIN has the highest AUC on both public datasets, with PNN and DeepFM ahead of Wide&Deep. The authors say DIN stands out most on Amazon, whose users have rich behavior histories, and credit the local activation unit with the gain.
Apart from the LR row, the lines use PReLU as the activation, and the DIN with Dice line is the one that swaps in Dice. DIN with Dice improves further over DIN on these datasets, which the authors read as support for the Dice activation.
Results on the Alibaba dataset and the training-technique ablations
With the full feature set, LR reaches 0.5738 AUC and BaseModel reaches 0.5970. The DIN row trained with PReLU and dropout reaches 0.6029 AUC, a RelaImpr of 6.08% and a gain of 0.0059 absolute AUC over BaseModel. In that table, models marked a use PReLU and models marked b use dropout regularization.
Under the same activation and regularization, Wide&Deep reaches 0.5977, PNN 0.5983 and DeepFM 0.5993, all below DIN. The authors call DeepFM the best competitor on this dataset, and DIN is 0.009 absolute AUC above it.
Replacing dropout with MBA regularization, with PReLU kept, raises DIN to 0.6060 AUC, a RelaImpr of 9.28%. The authors put the MBA gain over dropout at 0.0031 absolute AUC. Keeping dropout and replacing PReLU with Dice gives 0.6044 AUC, a RelaImpr of 7.63%, and the authors put the Dice gain over PReLU at 0.0015 absolute AUC.
Using MBA regularization and Dice together gives 0.6083 AUC and a RelaImpr of 11.65%, which is 0.0113 absolute AUC above BaseModel. The authors argue that 0.001 absolute AUC matters at the scale of their advertising traffic.
Regularizing fine-grained goods_ids features
Adding goods_ids features of about 0.6 billion dimensions improves test AUC in the first epoch, but without regularization the model overfits after that epoch and its performance drops rapidly.
Dropout randomly discards 50% of feature ids in each sample. The filter keeps only the top 20 million visited goods_id values by occurrence frequency. DiFacto's regularization gives frequent features a larger penalty, and MBA uses the batch-restricted penalty described above with \(\lambda\) set to 0.01.
Against a BaseModel without goods_ids and without regularization at 0.5940 AUC, adding goods_ids alone gives 0.5959 (2.02%), dropout 0.5970 (3.19%), the filter 0.5983 (4.57%), DiFacto 0.5954 (1.49%) and MBA 0.6031 (9.68%).
The authors say MBA prevents overfitting most effectively among these options, that dropout slows convergence, and that the frequency filter does slightly better than dropout but discards most low-frequency ids. They also note that models with goods_ids beat those without them, which they attribute to the richer information in fine-grained features.
Online A/B test and serving constraints
From 2017-05 to 2017-06 the authors ran an online A/B test over almost a month, comparing DIN against BaseModel, the last version of their serving model. DIN trained with the proposed regularizer and activation function raised CTR by up to 10.0% and RPM by 3.8%. Ads are ranked by CTR to the power α times bid price, with α above 1.0, which sets the balance between CTR and RPM promotion.
Serving must handle more than 1 million users per second at peak and predict hundreds of ads per visitor in under 10 milliseconds. Request batching, GPU memory access optimization and concurrent kernel computation together doubled the QPS capacity of a single machine, and DIN serving benefits from the same work.
What the activation weights and embedding layout show
On an Alibaba case, behaviors closely related to the candidate ad receive high activation weights.
For one user, 9 categories with 100 goods each were scored as candidates, and a t-SNE projection of the learned embeddings places goods of the same category in one cluster. Coloring the candidates by predicted CTR gives a multimodal interest density over the embedding space, which the authors read as the model capturing several interests at once.
Limits of the evidence
The LSTM tried on behavior sequences gave no improvement in the authors' experiments, which they attribute to concurrent interests making the sequences noisy, and sequence-specific structures are left to future work.
The offline comparisons use Amazon Electronics, MovieLens and one Alibaba split, and the public-dataset rows are averaged over 5 runs. The text gives no repeat count for the Alibaba comparison table.
The regularization study uses BaseModel with goods_ids features rather than the full DIN, so its comparison is on that base model.
The online result covers one A/B period of almost a month against BaseModel, and no online comparison with the other baselines is reported. The activation-weight and embedding analysis is a view of a single user.
Paper info
- Authors
- Guorui Zhou, Chengru Song, Xiaoqiang Zhu, Ying Fan, Han Zhu, Xiao Ma, Yanghui Yan, Junqi Jin, Han Li, Kun Gai
- Venue
- arXiv · Preprint
- First published
- 2017-6-21
- Added
- 2026-11-12
- Updated
- 2018-9-13
- Version
- v4
- arXiv
- 1706.06978
- Category
- stat.ML · cs.LG
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Guorui Zhou, Chengru Song, Xiaoqiang Zhu, Ying Fan, Han Zhu, Xiao Ma, Yanghui Yan, Junqi Jin, Han Li, Kun Gai (2017). Deep Interest Network for Click-Through Rate Prediction. arXiv:1706.06978v4. https://arxiv.org/abs/1706.06978v4
BibTeX
@misc{zhou2017deep,
title = {{Deep Interest Network for Click-Through Rate Prediction}},
author = {Guorui Zhou and Chengru Song and Xiaoqiang Zhu and Ying Fan and Han Zhu and Xiao Ma and Yanghui Yan and Junqi Jin and Han Li and Kun Gai},
year = {2017},
eprint = {1706.06978},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1706.06978v4}
}