TL;DR
The paper introduces TEMA-LLM, a novel framework for Cross-Domain Sequential Recommendation (CDSR) that leverages Large Language Models (LLMs) to extract fine-grained, domain-aware semantic tags from item metadata. By combining these tags with multimodal features (text, images, and IDs) through a hierarchical multi-attention mechanism, it effectively balances intra- and inter-domain user preferences, achieving state-of-the-art recommendation performance on large-scale e-commerce datasets.
What Problem Does This Paper Address?
Sequential Recommendation (SR) models a user's dynamic preferences by analyzing their chronological interaction history. Cross-Domain Sequential Recommendation (CDSR) takes this a step further by transferring knowledge across multiple distinct domains (e.g., predicting what book a user might buy based on their movie-watching history), which helps alleviate data sparsity and cold-start issues.
However, existing CDSR techniques face three major challenges:
- Domain Imbalance: They often let high-frequency domains dominate user preference representations, drowning out signals from sparser domains.
- Underutilized Multimodal Data: They insufficiently leverage rich multimodal information, such as item descriptions and product images.
- Coarse Semantic Alignment: Even recent LLM-based recommenders rarely generate fine-grained semantic tags tailored for cross-domain alignment, making it difficult to bridge the conceptual gap between completely different product categories.
Methods
The authors propose TEMA-LLM (Tag-Enriched Multi-Attention with Large Language Models), which processes user sequences through a four-stage pipeline:
- Tag List Generation via LLM: To create a consistent tag space, the framework uses a self-refine generation strategy. It queries an LLM (GPT-4o) multiple times with fixed prompts under deterministic settings ($T=0$) to generate stable, domain-specific tag lists, followed by a frequency-based voting mechanism to retain the most representative tags.
- Tag Embedding Generation: The LLM matches item titles and descriptions against the tag vocabulary to produce a relevance-weighted soft tag vector. This vector undergoes weighted average pooling to form a dense tag embedding.
- Multimodal Item Embedding Construction: For each item, the model unifies four distinct feature types: a learnable item ID, visual features from a frozen CLIP-ViT encoder, textual features from a CLIP text encoder, and the LLM-derived tag embeddings. These are concatenated and projected into a unified latent space via a Multi-Layer Perceptron (MLP).
- Tag-Enriched Multi-Attention Mechanism: To prevent any single domain or modality from dominating, a hierarchical attention framework processes three behavior sequences (Domain X, Domain Y, and the combined cross-domain sequence) across all four modalities independently. This creates 12 distinct preference vectors, which are fused via a weighted combination for final next-item prediction.
Datasets
The framework was evaluated on the standard Amazon dataset benchmark, focusing on two distinct cross-domain scenarios:
- Food-Kitchen: Consisting of 29,207 items in the Food domain and 34,886 items in the Kitchen domain.
- Movie-Book: Consisting of 36,845 items in the Movie domain and 63,937 items in the Book domain.
Users with fewer than 10 total interactions or fewer than 3 interactions per domain were filtered out to ensure sufficient sequence context.
Key Insights and Ideas
- LLMs as Offline Feature Enrichers: Instead of using computationally expensive LLMs inline during recommendation, TEMA-LLM utilizes them offline to construct structured, domain-aware semantic tags. This acts as a universal semantic bridge (e.g., linking a "Sports" movie to a "Sports" book).
- Disentangled Modality-Domain Modeling: By maintaining 12 separate attention streams (3 sequences $\times$ 4 modalities), the model prevents dominant modalities (like text in books or images in movies) or high-frequency domains from skewing user preference representations.
- Soft Weighting over One-Hot Tags: Moving away from binary (one-hot) tag assignments, the authors use continuous relevance scores (1-100) normalized into soft weights. This allows the model to capture nuanced, multi-label item characteristics more effectively.
Key Results
TEMA-LLM consistently outperformed state-of-the-art baselines (including MAN, LLMRec, and IFCDSR) across Mean Reciprocal Rank (MRR) and NDCG metrics:
- Food-Kitchen Scenario:
- Food: Achieved 9.34% MRR and 10.32% NDCG@10 (outperforming LLMRec's 9.05% MRR and 10.03% NDCG@10).
- Kitchen: Achieved 5.24% MRR and 5.50% NDCG@10 (outperforming LLMRec's 5.02% MRR and 5.34% NDCG@10).
- Movie-Book Scenario:
- Movie: Achieved 6.41% MRR and 5.89% NDCG@10 (outperforming LLMRec's 6.21% MRR and 5.71% NDCG@10).
- Book: Achieved 2.94% MRR and 2.91% NDCG@10 (outperforming LLMRec's 2.80% MRR and 2.74% NDCG@10).
Efficiency Note
Because the LLM queries and CLIP feature extractions are executed offline and cached, the online inference complexity remains $O(n^2d)$—the same order as standard Transformer-based self-attention. This makes TEMA-LLM highly practical for real-world production deployment.
Limitations and Future Work
- Static Prompts and Hyperparameters: The framework relies on fixed prompt templates and manually tuned domain-balancing coefficients ($\lambda_1, \lambda_2$). This rigidity could introduce domain bias or limit scalability if user behavior shifts dramatically.
- Future Directions: The authors suggest exploring adaptive prompt-tuning strategies and developing more efficient, real-time tag generation mechanisms to handle dynamically evolving item catalogs without requiring full offline re-indexing.
Summary updated