G2Rec: Scalable Generative Recommendation
- The paper introduces G2Rec, a generative recommendation framework that fuses graph-based user co-engagement with semantic tokenization for scalable sequential recommendations.
- It constructs a sparsified item co-engagement graph and employs soft clustering to derive latent interest prototypes, enabling enriched user-context modeling with efficiency guarantees.
- Empirical results on multiple datasets demonstrate that G2Rec outperforms baselines with minimal computational overhead, supporting industrial deployment and improved engagement metrics.
Searching arXiv for G2Rec and closely related generative recommendation work to ground the article. G2Rec is a generative recommendation framework that combines holistic graph-based user co-engagement modeling with semantic tokenization for industrial-scale sequential recommendation. Introduced in “Structuring and Tokenizing Distributed User Interest Context for Generative Recommendation” (Qiu et al., 18 Jun 2026), it addresses a central bottleneck in generative recommendation: how to inject both rich user-behavior context and item semantics into an autoregressive or LLM-based recommender in a form that is scalable and semantically grounded. Its pipeline consists of three coupled stages: construction of a sparsified item-item co-engagement graph, learning of soft interest prototypes by differentiable graph clustering, and tokenization of user histories with alternating item embeddings and graph-derived interest-profile embeddings.
1. Conceptual setting and problem formulation
G2Rec is situated within generative recommendation, where a LLM or autoregressive backbone predicts a user’s next interaction from historical behaviors. In the formulation used by the paper, the data consist of a user set , an item set , user histories , item embeddings , and the stacked embedding matrix . The predictive objective is to estimate
The paper identifies item tokenization as the core interface between item semantics and the recommendation model. Two deficiencies in prior approaches motivate G2Rec (Qiu et al., 18 Jun 2026). First, existing graph-based integration methods are divided between graph serialization and graph neural networks. Graph serialization converts graph structures into long sequences and therefore incurs poor scalability as sequence length grows, while graph neural networks rely on local message passing and do not fully exploit holistic global graph information. Second, existing semantic tokenization methods frequently depend on heuristics, implicit objectives, or weak alignment signals, so their learned semantic tokens may be inaccurate or suboptimal and typically lack explicit supervision for semantic interest prototypes.
Against this background, G2Rec is designed to unify graph-structural and semantic signals. The framework uses an item-item co-engagement graph to discover latent interest prototypes, derives item-specific soft interest profiles from those prototypes, and then exposes both the item representation and the interest-profile representation to the generative backbone. The intended effect is to capture user interest transitions more explicitly than an item-only token stream.
2. Sparse item co-engagement graph schema
The graph substrate in G2Rec is an item-item co-engagement graph rather than a user-item bipartite graph. The full graph is
with edge set
This construction encodes item co-occurrence in user histories. The paper notes that every user sequence can be viewed as a path on this graph, with for all .
Because the full co-engagement graph can be quadratic in the number of interactions, with 0 for total interactions 1, G2Rec introduces a sparsified graph:
2
yielding 3. The paper proves a Laplacian preservation guarantee: with probability at least 4,
5
if
6
This leads to the stated edge complexity
7
The significance of this step is structural rather than merely computational. The paper’s claim is that sparsification preserves the full graph’s Laplacian while reducing the graph to nearly linear size, so the subsequent clustering stage can still exploit global co-engagement structure rather than only local neighborhoods. In the framework’s own terms, this is what makes holistic graph-based user co-engagement modeling compatible with industrial-scale recommendation.
3. Soft interest prototypes and differentiable modularity
The second stage learns latent interest prototypes by soft clustering on the sparsified co-engagement graph. Rather than assigning each item to exactly one cluster, G2Rec assigns each item a membership distribution
8
where 9 is the number of prototypes and 0 is the probability that item 1 belongs to prototype 2. The full membership matrix is
3
with
4
The paper states that these variables are initialized and sparsified using Leiden to make optimization practical (Qiu et al., 18 Jun 2026).
The rationale for soft rather than hard clustering is that recommendation items often have multi-interest semantics. The paper contrasts this with hard clustering methods such as Louvain and Leiden, which assume one node belongs to one cluster. G2Rec instead maximizes a differentiable version of graph modularity. For hard assignments 5, the classical modularity is given as
6
where 7 is the adjacency matrix, 8 is the degree of node 9, and 0 is the resolution parameter. G2Rec replaces the non-differentiable indicator by the expectation under soft assignments:
1
with the derived closed form
2
The first term rewards co-engaged items for sharing prototype mass, while the second term penalizes degenerate over-grouping under the null model. The paper further states that if each row of 3 has at most 4 nonzero entries, then 5 can be computed in 6, which is the key efficiency claim for the clustering stage. In the ablation study, soft clustering achieves higher modularity than hard Leiden clustering on all four reported datasets: Beauty, Sports, Toys, and Yelp.
4. Interest-profile tokenization and sequence construction
After learning the soft memberships, G2Rec converts prototype structure into semantic tokens. For each prototype 7, the prototype embedding is defined as the weighted average of item embeddings:
8
Stacking these gives
9
or equivalently
0
with row-wise normalization. Each item then receives an interest-profile token
1
or in matrix form
2
This tokenization stage is the point at which graph-structural information becomes a recommendation-model input. For a user history 3, G2Rec constructs the sequence
4
The alternating pattern explicitly exposes both the raw item representation 5 and the graph-derived interest-profile representation 6.
A defining property of this design is that it does not require manually labeled user interests. Interest prototypes are discovered from graph structure by soft modularity optimization, and the resulting soft memberships 7 serve as pseudo-labels or soft labels. The paper therefore characterizes the supervision as self-generated from graph structure rather than from human annotation (Qiu et al., 18 Jun 2026). This is central to the claim that the model is semantically grounded without requiring ground-truth user interests.
5. Training objective and generative backbone
The recommendation model is trained with two losses at each time step. The next-item prediction loss is
8
and the interest-profile prediction loss is
9
The combined objective is
0
where 1 balances next-item prediction and interest profiling.
The paper’s experimental backbone is Llama 2 13B, fine-tuned with LoRA using rank 2, dropout 3, and 4 epochs, with Adam, learning rate 5, cosine scheduling with 6 warmup steps, SASRec item embeddings with 7, and maximum sequence length 8 (Qiu et al., 18 Jun 2026). The reported prototype resolution parameter is 9 for Beauty and Toys and 0 for Sports and Yelp. Evaluations use Recall@1, Recall@5, Recall@10, NDCG@5, NDCG@10, and MRR, and compare against POP, MF, GRU4Rec, SASRec, BERT4Rec, Caser, EAGER, LightGCN, and HeLLM.
The role of the auxiliary profile objective is not merely architectural. The paper reports that varying 1 changes performance in ways that confirm the value of the interest-profile supervision term, indicating that gains are not attributable only to the item-prediction loss.
6. Empirical results, deployment, and scope conditions
On the four public datasets reported in the paper—Beauty, Sports, Toys, and Yelp—G2Rec is stated to outperform all baselines on all datasets and metrics (Qiu et al., 18 Jun 2026). The paper gives the following example results. On Beauty, Recall@10 is 2, NDCG@10 is 3, and MRR is 4. On Sports, Recall@10 is 5, NDCG@10 is 6, and MRR is 7. On Toys, Recall@10 is 8, NDCG@10 is 9, and MRR is 0. On Yelp, Recall@10 is 1, NDCG@10 is 2, and MRR is 3. A highlighted result is a 4 higher NDCG@5 than the best baseline on Sports, and the paper reports an average rank of 5 across datasets.
Efficiency overhead is reported as small. On Beauty, per-batch training time increases from 6 for Item-Only to 7 for G2Rec, and inference time from 8 to 9, corresponding to overheads of 0 and 1. The paper attributes this to the fact that interest tokens are computed offline and only concatenated with item embeddings at runtime.
The paper also reports industrial deployment at Meta across multiple product surfaces, including scenarios like Instagram Reels, with online A/B testing in both short-term 2-day and long-term settings. Although exact setups are not disclosed, the reported gains are 3 in-session improvement and 4 to 5 improvement on engagement metrics including total time spent, likes, and shares, along with claimed improvements in content diversity and serving efficiency.
The paper explicitly notes several limitations. It does not deeply explore sensitivity to the number of prototypes 6, robustness under severe domain shifts, direct human interpretability of learned interest prototypes, or full details of online deployment beyond aggregate gains. It also performs graph clustering offline, so the learned interest schema may lag behind rapidly changing trends unless updated periodically.
A terminological caution is warranted. In the recommendation literature, G2Rec denotes the generative recommendation framework just described. A separate Monte Carlo Tree Search paper does not define “G2Rec” as an official term; it only suggests it as an informal interpretation combining GRAVE7 and node recycling, with the closest paper-defined algorithm being GRAVER8 (Rautureau et al., 26 Feb 2026). The recommendation framework and the memory-constrained GRAVE variants are therefore distinct usages of a similar string rather than a shared method.