Abstract
Self-supervised learning (SSL) has emerged as a powerful paradigm for learning user and item embeddings in recommendation systems without the need for extensive manual labeling. However, traditional contrastive SSL methods often rely on computationally intensive negative sampling. In this paper, we adapt the Barlow Twins framework to user sequence modeling. By optimizing for redundancy reduction in the cross-correlation matrix of augmented sequence views, our approach achieves significant performance gains (8-20%) over standard baselines, particularly in low-label regimes. We evaluate various sequence augmentation strategies and demonstrate the robustness of the proposed method across multiple benchmark datasets.
Introduction
Modern recommendation systems rely heavily on high-quality embeddings—mathematical representations of users and items—to predict future interactions. While supervised learning has been the standard for training these embeddings, its dependence on high-quality, often private or scarce labels limits its scalability. Self-supervised learning (SSL) offers a solution by learning directly from the data itself.
Contrastive learning, the most common SSL approach, works by pulling similar items together and pushing dissimilar ones apart. However, this requires a massive number of "negative samples" to be effective, which is computationally expensive and difficult to scale in production environments. This paper explores an alternative: the Barlow Twins framework, which avoids negative sampling by focusing on redundancy reduction.
Methodology
The proposed framework adapts the Barlow Twins objective, originally designed for computer vision, to handle sequential user interaction data (e.g., a history of movies watched).
The Barlow Twins Objective
The core mechanism involves a dual-stream architecture. A batch of user sequences is subjected to two different augmentations to create two "views" of the same data. These views are processed through a shared representation network (a 1D-CNN) and a projection network (a Multi-Layer Perceptron). The model then computes the cross-correlation matrix of the outputs. The training objective is to make this matrix as close to an identity matrix as possible. This forces the diagonal elements to be 1 (ensuring invariance to the augmentations) and the off-diagonal elements to be 0 (reducing redundancy between different dimensions of the embedding).
Sequence Augmentations
Since user sequences differ fundamentally from images, the authors evaluated three specific augmentation strategies:
- Random Masking (RM): Randomly hiding individual items in the sequence.
- Segment Masking (SM): Hiding a continuous chunk of the sequence.
- Permutation: Shuffling the temporal order of items.
Experimental Setup
The model was evaluated on three benchmark datasets: MovieLens-1M, MovieLens-20M, and Yelp tips. A primary focus of the evaluation was the "low-label" regime, testing performance when only a tiny fraction (e.g., 1%, 0.1%, or 0.01%) of training labels were available. This simulates real-world scenarios where new users or items have very little associated metadata.
Key Results and Discussion
The Barlow Twins approach consistently outperformed standard dual-encoder (DE) baselines by 8% to 20% across various recommendation tasks.
Insights and Observations
- Segment Masking is Most Effective: The researchers found that masking continuous segments (SM) outperformed random masking. This suggests that forcing the model to reconstruct larger missing contexts helps it capture broader user "intent" and habits rather than just local patterns.
- Temporal Order is Critical: Shuffling the sequence (permutation) resulted in poor performance, confirming that the chronological order of user actions is a vital signal for capturing meaningful behavior.
- Data Efficiency and Robustness: As shown in the results, the Barlow Twins model trained on just 1% of labels often outperformed baselines trained on significantly more data. Furthermore, the method proved robust to small batch sizes, unlike contrastive methods that require large batches for negative sampling.
- Success of Frozen Weights: In many instances, using "frozen" pre-trained weights—where the model's representations are not updated during the final task—outperformed fine-tuning. This indicates that the self-supervised process learns highly informative, general-purpose features.
Conclusion
This research demonstrates that the Barlow Twins framework can be effectively adapted to user sequence modeling, offering a scalable and data-efficient alternative to contrastive learning. While the method excels at learning sequence-level representations, it was found to be less effective at learning fine-grained item-level embeddings compared to traditional dual encoders. Future work will explore hybrid objectives to improve item-level granularity and the integration of Transformer-based architectures to further enhance performance.
Summary updated