TL;DR
The MACL (Multi-modal Adaptive Contrastive Learning) framework addresses data sparsity in session-based recommendation by moving beyond simple "item ID" shuffling. By leveraging item images and text for semantically consistent data augmentation and introducing an adaptive loss function that weights training signals by their utility, MACL significantly outperforms state-of-the-art methods, particularly for long-tail items and short user sessions.
What Problem Does This Paper Address?
Session-based Recommendation (SBR) is the "anonymous" version of recommendation. Unlike Netflix or Amazon, which know your years of history, SBR models must predict what you want based only on a few clicks in a single session (e.g., a guest user browsing a web store).
This task faces two massive "sparsity" hurdles:
- Item-level sparsity: Most items are "long-tail," meaning they have very few interactions, making them hard for models to learn.
- Session-level sparsity: Many sessions are incredibly short (often just 2-3 items), providing very little context for intent prediction.
While Contrastive Learning (CL) has become a popular way to "fill in the gaps" by creating artificial training data (augmentations), the authors argue that current methods are flawed. They typically use random operations like cropping or masking item IDs. This often destroys the "semantic consistency" of a session—for example, if a user is looking for an iPhone and the model "masks" the phone but keeps the charger, the core intent is lost. Furthermore, standard CL treats all training signals as equally important, even though some "negative" examples are much more informative than others.
Methods
The authors propose MACL (Multi-modal Adaptive Contrastive Learning), which introduces two primary innovations:
- Multi-modal Augmentation: Instead of just messing with item IDs, MACL looks at the content of the items. It uses pre-trained models (GoogLeNet for images and BERT for text) to extract features. To create "augmented" views for contrastive learning, it applies domain-specific transformations—like horizontal flips or Gaussian noise for images, and word substitution or deletion for text. This ensures that the "augmented" version of an item still "means" roughly the same thing as the original.
- Adaptive Contrastive Loss: Standard contrastive loss functions treat every negative sample the same. MACL uses a small, two-layer Multi-Layer Perceptron (MLP) to evaluate the "utility" of each positive-negative pair. This allows the model to automatically highlight informative signals (harder examples that help the model learn) and downplay uninformative ones during training.
The architecture combines these into a dual-level contrastive task: one at the item level (to help with long-tail items) and one at the session level (to help with short sequences).
Datasets
The framework was evaluated on three real-world datasets:
- Cellphones (Amazon): Electronics browsing data.
- Grocery (Amazon): Food and household item interactions.
- Instacart: A large-scale dataset of grocery shopping sequences.
The authors notably performed specific evaluations on "unpopular" items and "short" sessions to prove the model's robustness against data sparsity.
Key Insights and Ideas
- IDs are Symbols, Modalities are Semantics: The core "aha moment" is that an item ID is just an arbitrary number. If you have very little data for "Item #402," the ID tells you nothing. However, if you know Item #402 is a "Blue Canvas Backpack" and you have an image of it, you can use CV and NLP techniques to create meaningful variations that help the model understand the item's essence.
- Consistency Matters: By augmenting the features (images/text) rather than the sequence (dropping items), the model maintains the user's original intent. A blurred image of a backpack is still a backpack; a session where the phone is deleted is no longer a "phone-buying" session.
- Not All Negatives are Equal: In contrastive learning, we push "negative" samples away from the "anchor." If a negative sample is too easy (e.g., comparing a laptop to a banana), the model learns nothing. The adaptive loss function acts as an automated "curator," focusing the model's energy on samples that actually challenge its current understanding.
Key Results
MACL demonstrated consistent superiority over competitive baselines like COTREC, CL4SRec, and SASRec:
- Significant Accuracy Gains: On the Cellphones dataset, MACL improved MRR@20 (Mean Reciprocal Rank) by a staggering 25.8% over the best baseline.
- Sparsity Resilience: In experiments specifically targeting long-tail items (item-level sparsity), MACL showed the least performance degradation compared to other models. It also significantly outperformed others on sessions with a length of only 1 or 2 items.
- Efficiency: Despite adding an MLP for adaptive loss, the training time increase was minimal (only about 2 seconds per epoch on an RTX 4090), proving the method is practical for real-world deployment.
Limitations and Future Work
The authors identify two main areas for improvement:
- Feature Scope: Currently, MACL only uses images and text. Future versions could incorporate other "side information" like item categories, brands, or user reviews to create even richer representations.
- Negative Sampling: While the loss is adaptive, the selection of negative samples is still random. The authors suggest that moving toward "hard negative mining"—actively looking for the most confusing items to train against—could further boost performance.
Summary updated