TL;DR
The paper introduces G2Rec, a highly scalable framework that enhances generative recommendation systems by combining holistic graph-based user behavior with semantic item tokenization. By utilizing a sparsified item-item co-engagement graph and a novel "soft" clustering algorithm, G2Rec captures multi-faceted user interest transitions and injects them into Large Language Model (LLM) recommenders with negligible computational overhead.
What Problem Does This Paper Address?
Generative Recommendation (GR) treats recommendation as a sequential generation task, leveraging the autoregressive capabilities of LLMs to predict a user's next interaction based on their history. A core challenge in GR is item tokenization—effectively translating complex item features and user behaviors into tokens the LLM can understand.
Current approaches fall into two flawed camps:
- Graph-based methods (like graph neural networks or graph serialization) capture relational user behavior but suffer from massive scalability issues or only look at local subgraphs, missing the big picture.
- Semantic tokenization methods rely on rigid heuristics and lack explicit supervision signals, often leading to inaccurate representations of user intent.
The authors address this by asking: How can we inject holistic, global user-behavior graph contexts into an LLM recommender efficiently at an industrial scale?
Methods
The authors propose G2Rec (Sparse Co-Engagement Graph Schema for Generative Recommendation), which operates in four main stages:
- Sparse Co-Engagement Graph Construction: Instead of a massive user-item bipartite graph, G2Rec builds an item-item co-engagement graph, completely removing user nodes to keep the graph static and compact. To ensure scalability, they sample $O(M \log M)$ edges (where $M$ is the total number of interactions), which theoretically preserves the structural information of the graph Laplacian while avoiding quadratic complexity.
- Scalable Soft Graph Clustering: Real-world items often cater to multiple interests (e.g., a video about an avocado toast recipe appeals to both "healthy eating" and "morning routines"). G2Rec introduces a differentiable "soft" modularity objective function ($Q_{\text{soft}}$) that allows items to have continuous membership across multiple interest prototypes simultaneously. This is optimized efficiently on GPUs in nearly linear time.
- Interest Profile Tokenization: Continuous item interest profiles are converted into continuous tokens by calculating the weighted average of item embeddings within each interest prototype.
- Sequence Formulation & Joint Training: User history is formatted as an alternating sequence of items and their corresponding interest profiles. The backbone LLM (Llama 2 13B with LoRA) is trained on a joint objective: predicting the next item and predicting the next soft interest profile.
Datasets
The framework was evaluated offline on four standard, highly sparse public benchmarks:
- Amazon Beauty
- Amazon Sports
- Amazon Toys
- Yelp
Additionally, G2Rec was deployed and tested online via large-scale A/B testing on Meta's production surfaces (e.g., Instagram Reels), serving billions of active users.
Key Insights and Ideas
- User-Free Graphs Scale Better: Eliminating user nodes from the behavioral graph shifts the focus to more static item-item relationships, drastically reducing the need for frequent graph updates in production.
- Interests are Soft, Not Hard: Traditional hard clustering algorithms (like Louvain or Leiden) force an item into a single community. Soft clustering preserves the multi-faceted nature of content, mapping user behavior more accurately.
- Alternating Sequences as Semantic Guides: Interleaving items with interest profiles acts as a structural guide for the LLM, allowing it to learn high-level interest transition patterns without requiring explicit ground-truth user interest labels.
Key Results
Offline Evaluation
G2Rec consistently outperformed classic, sequential, and graph-based baselines across all metrics (Recall@k, NDCG@k, and MRR) on all four public datasets. For instance, G2Rec achieved a 14.9% improvement in NDCG@5 over the best-performing baseline on the Sports dataset.
Online Deployment & Efficiency
When deployed at Meta, G2Rec achieved solid wins in production, leading to a >0.03% in-session improvement and significant gains (0.06% to 0.19%) across core user engagement metrics like total time spent, likes, and shares.
Crucially, because the interest tokens are computed offline, G2Rec introduces virtually zero latency overhead during live serving, requiring only 0.0027 additional seconds per batch during inference.
Limitations and Future Work
While G2Rec successfully moves heavy graph computations offline to maintain real-time efficiency, this introduces a dependency on periodic offline updates. Consequently, the system might experience a slight lag in capturing structural patterns for brand-new items immediately after they are uploaded.
As a direction for future work, the authors suggest integrating additional multimodal data sources (such as video features or text descriptions) directly into the soft clustering framework to further refine item interest profiles.
Summary updated