Tag-Enriched Multi-Attention with Large Language Models for Cross-Domain Sequential Recommendation

Wangyu Wu, Xuhang Chen, Zhenhong Chen, Jing-En Jiang, Kim-Fung Tsang, Xiaowei Huang, Fei Ma, Jimin Xiao

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:

  1. Domain Imbalance: They often let high-frequency domains dominate user preference representations, drowning out signals from sparser domains.
  2. Underutilized Multimodal Data: They insufficiently leverage rich multimodal information, such as item descriptions and product images.
  3. 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.
Fig. 1. (a) Traditional CDSR models primarily rely on item basic features. (b) Our proposed TEMA-LLM enriches item representations by generating semantic tags from LLMs and integrating them with textual and visual features.

Methods

The authors propose TEMA-LLM (Tag-Enriched Multi-Attention with Large Language Models), which processes user sequences through a four-stage pipeline:

  1. 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.
  2. 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.
  3. 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).
  4. 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.
Fig. 2. Overview of the proposed TEMA-LLM framework. The Feature Preparation module generates multimodal item embeddings using a learnable ID matrix, a frozen CLIP image encoder, and a CLIP text encoder applied to LLM-augmented text. Enriched tag embeddings are fused into the item representation via weighted multi-hot encoding. These representations are processed by multi-head attention layers to model intra- and inter-sequence user preferences. Finally, cosine similarity with candidate embeddings is used for 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

BibTeX
@article{wu2026tag,
  author = {Wangyu Wu and Xuhang Chen and Zhenhong Chen and Jing-En Jiang and Kim-Fung Tsang and Xiaowei Huang and Fei Ma and Jimin Xiao},
  title = {{Tag-Enriched Multi-Attention with Large Language Models for Cross-Domain Sequential Recommendation}},
  journal = {IEEE Trans. Consumer Electron.},
  year = {2026},
  doi = {10.1109/tce.2025.3620527},
}
Figure