TL;DR
Contrastive self-supervised learning (SSL) has become a go-to approach for sequential recommendation, but conventional methods rely heavily on heuristic data perturbations (masking, cropping, reordering) that often scramble real user intent. SRMA introduces model augmentation—perturbing the encoder network via neuron masking, layer dropping, and complementary pre-trained encoders—to create contrastive view pairs without corrupting sequence data. This yields more faithful positive pairs and consistently outperforms state-of-the-art data-augmented sequential recommenders.
What Problem Does This Paper Address?
Sequential recommenders (like SASRec) predict a user's next action by modeling chronological interactions. However, real-world user interaction histories are notoriously sparse and noisy. Contrastive SSL tackles this by generating two "views" of an interaction sequence and pulling their latent representations together while pushing representations of different sequences apart.
Historically, these views have been generated via data augmentation (e.g., randomly dropping, cropping, or reordering items). The authors point out three fundamental flaws in this approach:
- Expensive tuning: Finding optimal combinations of heuristic augmentations requires exhaustive grid searches across different datasets.
- Disrupted chronological semantics: Randomly deleting or swapping items alters behavioral context, meaning two augmented versions of a sequence may describe completely different user intents—leading to noisy or false positive pairs.
- Limited supervisory signal: Purely data-side heuristics operate outside the optimization loop and fail to leverage internal model dynamics or alternative modeling inductive biases.
Methods
The authors introduce SRMA (Sequential Recommendation with Model Augmentation), which injects perturbations directly into the network architecture across three hierarchical levels:
+---------------------------------------+
| User Item Sequence |
+-------------------+-------------------+
|
[Optional Sequence Data Augmentation]
|
+------------------+------------------+
| |
Branch 1 Branch 2
| |
+------------------+ +------------------+
| Primary Encoder | | Primary Encoder |
| (e.g., SASRec) | | (e.g., SASRec) |
+--------+---------+ +--------+---------+
| |
[1. Neuron Masking] [1. Neuron Masking]
(Random FFN dropout) (Independent dropout mask)
| |
[2. Layer Dropping] [2. Layer Dropping]
(Drop M of K FFN layers) (Independent layer drop)
| |
| [3. Complementary Enc.]
| (+ γ · Pre-trained GRU/Trans)
v v
Representation h₁ Representation h₂
\ /
+----------------+------------------+
|
Contrastive Loss (InfoNCE)
+
Next-Item Prediction Loss
- Neuron Masking (Dropout): Passes the identical sequence through the Transformer encoder twice with standard dropout active in the Feed-Forward Network (FFN) layers (masking probability $p$). This creates two subtly perturbed views in embedding space without altering the input sequence.
- Layer Dropping: Rather than dropping core self-attention layers (which can destroy learned sequential dependencies), the model appends $K$ extra FFN layers after the sequence encoder and randomly drops $M$ of them during each training step ($M < K$). This forces the contrastive objective to align deeper features with shallower representations.
- Encoder Complementing: To incorporate diverse structural priors, a separate lightweight encoder (e.g., a 1-layer Transformer or a GRU) is pre-trained on the next-item objective and frozen. Its output embedding is scaled by a factor $\gamma$ and added to one branch of the contrastive pair. This infuses alternative inductive biases (e.g., Markovian transition modeling from RNNs) into the primary attention-based encoder.
The model is trained end-to-end using a multi-task loss combining cross-entropy for next-item prediction ($\mathcal{L}_{rec}$) and InfoNCE contrastive loss ($\mathcal{L}_{ssl}$): $\mathcal{L} = \mathcal{L}_{rec} + \lambda \mathcal{L}_{ssl}$.
Datasets
The authors evaluate SRMA across three standard "5-core" recommendation benchmarks (where users and items with fewer than 5 interactions are removed):
- Amazon Sports: 35,598 users, 18,357 items, and 296,337 interactions.
- Amazon Toys & Games: 19,412 users, 11,924 items, and 167,597 interactions.
- Yelp: 30,431 users, 20,033 business items, and 316,354 interactions.
No new datasets were introduced. Evaluation uses full-item-ranking Hit Ratio (HR@$k$) and Normalized Discounted Cumulative Gain (NDCG@$k$) for $k \in \{5, 10, 20\}$.
Key Insights and Ideas
- Dropout is an implicit contrastive view generator: Prior contrastive baselines (like CL4SRec) actually relied partially on dropout noise between forward passes. Setting dropout to zero ($p=0$) causes a catastrophic drop in CL4SRec's performance, showing that model perturbation was doing much of the heavy lifting all along.
- Model perturbation preserves sequence integrity: Evaluating "SRMA w/o Data Augmentation" beats standard baselines and achieves performance competitive with fully data-augmented models on Amazon Sports, proving that latent perturbations avoid the semantic distortion caused by deleting or reordering items.
- Heterogeneous encoders provide complementary contrast: Injecting representations from a distinct pre-trained architecture (GRU) improved sports recommendation more than another Transformer. This confirms that contrasting representations from models with fundamentally different inductive biases prevents representation collapse and exposes richer sequence dynamics.
Key Results
- Outperforming SSL Baselines: When combined with data augmentation, SRMA outperforms state-of-the-art contrastive models (CL4SRec and CoSeRec):
- On Amazon Sports, SRMA delivers a 18.9% relative gain in HR and a 27.9% relative gain in NDCG over CL4SRec (NDCG@5 of 0.0199 vs. 0.0146).
- On Amazon Toys, it achieves an 8.6% HR gain and 13.8% NDCG gain over CL4SRec (HR@5 of 0.0598 vs. 0.0525).
- On Yelp, it yields 4.5% HR and 6.4% NDCG improvements over CL4SRec.
- Sensitivity:
- A moderate masking rate ($0.1 < p < 0.6$) is optimal; aggressive dropout ($p \ge 0.7$) degrades representation quality.
- For layer dropping, $K=2, M=1$ was optimal across datasets; adding too many post-encoder layers ($K=4$) degraded generalization.
Limitations and Future Work
- Hyperparameter Sensitivity: SRMA introduces several structural hyperparameters ($K, M$, dropout rate $p$, and scaling factor $\gamma$), as well as an architectural choice for the complementary encoder (GRU vs. Transformer) that varies by dataset.
- Two-Stage Overhead: Encoder complementing requires pre-training and caching a secondary network before contrastive training can begin.
- Hybrid Dependence: While model augmentation alone is strong, the peak results still require combining model augmentation with traditional data augmentation heuristics.
- Broader Scope: The paper focuses exclusively on sequential recommendation; extending model-level augmentation to other domains (graphs, NLP, computer vision) remains open for exploration.
Summary updated