A Comprehensive Overview of Sequential Recommendation Models and Techniques
This article provides an in-depth overview of sequential recommendation, defining the problem, discussing data preparation, and reviewing various neural architectures—including MLP, CNN, RNN, Temporal CNN, self‑attention, and reinforcement‑learning approaches—while offering practical guidance on model selection and implementation.
Sequential recommendation aims to predict the next items a user will interact with based on their historical behavior sequence, where time order is a crucial constraint to avoid future information leakage.
Data preparation : Before training, raw interaction logs are filtered (e.g., removing bots, handling popular users/items, splitting long sequences) and split into training and test sets by selecting a temporal cut‑off per user to prevent leakage. Common statistics and visualizations help understand data distribution.
MLP (Multi‑Layer Perceptron) : Items in the recent N steps are embedded, pooled, and fed into several fully‑connected layers. The final softmax predicts the probability of each candidate item. Variants incorporate attention by weighting historical embeddings according to relevance with the target item.
CNN : Convolutional filters of different kernel sizes capture local patterns in the behavior sequence (similar to TextCNN). After convolution and max‑pooling, the resulting vectors are concatenated and passed to fully‑connected layers.
RNN (GRU/LSTM) : Recurrent units model the sequential dependence directly. The hidden state after processing the sequence represents user intent. Variations combine item IDs and rich item features either at the input or output stage, or via low‑rank interactions.
Temporal CNN (TCN) : A stack of causal, dilated 1‑D convolutions with residual connections processes the entire sequence in parallel while preserving temporal causality. Padding ensures output length matches input length.
Self‑Attention (Transformer) : Position embeddings encode temporal order, and multi‑head self‑attention layers model pairwise interactions among all time steps. Each block consists of multi‑head attention, a position‑wise feed‑forward network, layer normalization, and residual connections. The final representation can be used for ranking or recall.
Reinforcement Learning : The recommendation process is framed as a Markov Decision Process with states (user history), actions (candidate items), rewards (clicks, dwell time), and a policy πθ. Policy‑gradient methods optimize the expected discounted return, often using sampled softmax for large item vocabularies.
Practical guidance : Choose a model that matches business goals, data volume, and engineering constraints. Simpler models (e.g., MLP or basic RNN) often perform well and are easier to deploy; more complex architectures (e.g., attention or TCN) can be added incrementally.
References (selected): [1] Deep Learning based Recommender System: A Survey and New Perspectives [4] Deep Interest Network for Click‑Through Rate Prediction [5] Convolutional Sequence Embedding Recommendation Model [7] Session‑based Recommendations with Recurrent Neural Networks [12] Attention Is All You Need [14] Deep Neural Networks for YouTube Recommendations [15] Top‑K Off‑Policy Correction for a REINFORCE Recommender System
def conv_with_padding(input_sequence, kernel_size, dilation_rate, output_filters):
padding_size = (kernel_size - 1) * dilation_rate
padded_sequence = tf.pad(input_sequence, [[0,0], [padding_size,0], [0,0]])
conv_output = tf.layers.conv1d(padded_sequence, filters=output_filters,
kernel_size=kernel_size, activation=None,
padding='VALID', strides=1,
dilation_rate=dilation_rate)
return conv_outputSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
DataFunTalk
Dedicated to sharing and discussing big data and AI technology applications, aiming to empower a million data scientists. Regularly hosts live tech talks and curates articles on big data, recommendation/search algorithms, advertising algorithms, NLP, intelligent risk control, autonomous driving, and machine learning/deep learning.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
