---
title: 'IIRG: Item–Item Relation Generation in GR'
url: https://www.emergentmind.com/topics/iirg
type: topic
---

# IIRG: Item–Item Relation Generation in GR

IIRG, short for **Item–Item Relation Generation**, is a training strategy for **LLM-based generative recommendation (GR)** that augments standard next-item prediction with two auxiliary item-to-item generation tasks: **collaborative neighbor generation** and **semantic neighbor generation**. It was introduced to address a specific failure mode identified in LLM recommenders, namely **one-hop memorization**, in which models disproportionately recommend items that appeared as direct successors in training sequences. The central objective of IIRG is to teach LLMs to model **richer item–item relations beyond one-hop transitions** in user sequences, thereby improving recommendation quality, especially for users whose target items are not recoverable from memorized adjacent transitions [2606.17276].

## 1. Definition and research context

IIRG is situated in the literature on **generative recommendation**, where an LLM is fine-tuned to generate item identifiers rather than score candidates using a conventional retrieval model. In the formulation reported for IIRG, standard training uses **next-item prediction**: given a tokenized representation of a user sequence, the model is trained to generate the next item ID. The paper argues that this objective, by itself, encourages LLMs to rely too heavily on **one-hop memorization**, and that such reliance narrows the effective use of pretrained knowledge [2606.17276].

The motivating comparison is between LLM-based GR models and a non-LLM baseline, **TIGER**. The reported finding is that LLMs exhibit **stronger one-hop memorization** than TIGER, and that the gains of LLMs over TIGER are concentrated among users whose target items can already be reached via memorized one-hop transitions. This observation leads to the paper’s main hypothesis: improving recommendation for users not covered by one-hop memorization requires LLMs to learn **richer item–item relations** than direct successor patterns.

Within that framing, IIRG is not a decoding heuristic or post hoc reranker. It is a **multi-task training strategy**. The auxiliary supervision is intended to expose the model to two additional relational structures: multi-hop **collaborative** co-occurrence patterns in user sequences and **semantic** similarity derived from item text.

## 2. One-hop memorization and its operationalization

The paper defines one-hop memorization through the **adjacent neighbor set** for an item \(i_k\), denoted \(\mathcal{N}(i_k)\), which is the multiset of all items that immediately follow \(i_k\) in any training user sequence [2606.17276]. For a user \(u\), the one-hop-based candidate set is formed by aggregating adjacent neighbors over the items in the user’s sequence:
\[
\mathcal{M}_u = \uplus_{i_k \in s_u} \mathcal{N}(i_k),
\]
where \(\uplus\) is multiset union. The top-\(K\) most frequent items in \(\mathcal{M}_u\) are then taken, with
\[
K = \min\left(50,\left|\bigcup_{i_k\in s_u}\mathcal{N}(i_k)\right|\right),
\]
and ties broken by popularity.

This construction is used to quantify the fraction of a model’s top-5 predictions that fall in the one-hop candidate set. On that basis, the paper reports three central observations. First, LLM-based GR models consistently have a **higher one-hop memorization ratio** than TIGER. Second, this remains true for both **TIDs** and **SIDs**. Third, the effect persists even after applying regularization and scaling TIGER up to near-LLM size, which the paper uses to argue that neither model size alone nor overfitting alone explains the behavior [2606.17276].

The evaluation further partitions users into two groups: **one-hop-memorization-benefiting users**, whose target item lies in the one-hop candidate set, and **non-benefiting users**, whose target item does not. The reported pattern is that LLMs obtain much larger gains over TIGER on the former group than on the latter. This motivates IIRG’s design: the method is intended to supply recommendation signals that remain useful when direct train-time transitions do not cover the target item.

## 3. Relational supervision in IIRG

IIRG introduces two auxiliary generation targets for each item: **collaborative neighbors** and **semantic neighbors** [2606.17276].

### Collaborative relations

Collaborative neighbors are defined from item co-occurrences across multiple hops in user sequences. The pairwise weight between items \(i_k\) and \(i_q\) is
\[
w_{kq} = \sum_{u\in \mathcal{U}} \mathbb{I} \left[ i_k \sim_W^{(u)} i_q \right],
\]
with
\[
i_k \sim_W^{(u)} i_q \iff \exists t,j \in [|s_u|]: i_t^{(u)} = i_k,\ i_j^{(u)} = i_q,\ 0 < |t-j| \le W.
\]
Here, \(W\) is the time-window length. The collaborative neighbor sequence \(n_k\) is then defined as the top-\(N_1\) items sorted by descending \(w_{kq}\).

The intended effect is to capture **collaborative behavior beyond direct transitions**: items that frequently appear near each other in sequences and may therefore be predictive even when they are not immediate successors. The paper explicitly notes that a variant excluding one-hop transitions from this collaborative set was tested, but that the version **including** them performed better overall.

### Semantic relations

Semantic neighbors are built from textual similarity. For each item \(i_k\), the item text description \(t(i_k)\) is encoded with a pretrained embedding model \(f\):
\[
\mathbf{z}_k = f(t(i_k)).
\]
The semantic neighbor sequence \(m_k\) is formed by selecting the top-\(N_2\) items under cosine similarity,
\[
\frac{\mathbf{z}_k^T \mathbf{z}_q}{\|\mathbf{z}_k\|\|\mathbf{z}_q\|}.
\]

These neighbors are intended to encode **similar themes**, including semantically related products such as related LEGO products or compatible accessories. The paper characterizes them as signals for thematic similarity and for substitutable or complementary items.

A key empirical observation motivating the joint use of these two signals is that collaborative neighbors and semantic neighbors each cover a fraction of users comparable to one-hop memorization, while their overlap with one-hop neighbors is limited: the pairwise Jaccard similarity is reported to be **below 0.5**. The paper therefore treats them as **predictive but non-redundant** sources of supervision.

## 4. Objective function and multitask formulation

Under standard next-item prediction, the next-item loss for user \(u\) is written as
\[
\mathcal{L}_{u} = -\sum_{t=T+1}^{\left|\mathcal{T}^{(s_u)}\right|} \frac{\log p_{\theta} \left( \mathcal{T}^{(s_u)}_{t} \mid \mathcal{T}^{(s_u)}_{< t}, \mathcal{C} \right) } {\vert \mathcal{T}^{(s_u)}\vert - T}.
\]
In this expression, \(p_\theta\) is the token-generation probability of the LLM, \(\mathcal{T}^{(s_u)}\) is the tokenized sequence representation, \(T\) is the index of the final token for the anchor item \(i_1^{(u)}\), and \(\mathcal{C}\) is the instruction prompt for next-item prediction [2606.17276].

IIRG adds two auxiliary losses.

For collaborative-neighbor generation, the loss for item \(i_k\) is
\[
\mathcal{L}^{(C)}_{k}= \sum_{t=1}^{\left|\mathcal{T}^{(n_k)}\right|} \frac{\log p_{\theta} \left( \mathcal{T}^{(n_k)}_{t} \mid \mathcal{T}^{(n_k)}_{< t}, \mathcal{P} \right)}{-{\vert \mathcal{T}^{(n_k)}\vert} }.
\]

For semantic-neighbor generation, the loss for item \(i_k\) is
\[
\mathcal{L}^{(S)}_{k}= \sum_{t=1}^{\left|\mathcal{T}^{(m_k)}\right|} \frac{\log p_{\theta} \left( \mathcal{T}^{(m_k)}_{t} \mid \mathcal{T}^{(m_k)}_{< t}, \mathcal{S} \right)}{-{\vert \mathcal{T}^{(m_k)}\vert} }.
\]

The final batch loss is
\[
\mathcal{L} = \sum_{u\in\mathcal{U}_{(b)}} \frac{\mathcal{L}_{u}}{B} + \sum_{i_k\in \mathcal{I}^{(C)}_{(b)}} \frac{\lambda_1 \mathcal{L}^{(C)}_{k}}{B} + \sum_{i_t\in \mathcal{I}^{(S)}_{(b)}} \frac{\lambda_2 \mathcal{L}^{(S)}_{t}}{B},
\]
where \(B\) is batch size, and \(\lambda_1,\lambda_2\) weight the auxiliary tasks. The reported settings are \(\lambda_1 = 1\) and \(\lambda_2 \in \{10^{-1}, 1\}\), tuned by dataset and ID type [2606.17276].

Conceptually, the distinction from standard next-item prediction is exact: instead of learning only **user history \(\rightarrow\) next item**, the model also learns **item \(\rightarrow\) collaborative neighbors** and **item \(\rightarrow\) semantic neighbors**. This suggests a shift from purely sequential imitation toward explicit relational modeling within the same generative backbone.

## 5. Experimental protocol and empirical findings

The main experiments are conducted on Amazon Reviews sequential recommendation datasets: **Sports**, **Toys**, and **Beauty**, with additional evaluation on **Yelp** [2606.17276]. The reported dataset statistics are:

| Dataset | Users | Items | Interactions |
|---|---:|---:|---:|
| Sports | 35,598 | 18,357 | 296,337 |
| Toys | 19,412 | 11,924 | 167,597 |
| Beauty | 22,363 | 12,101 | 198,502 |
| Yelp | 30,431 | 20,033 | 316,354 |

The evaluation protocol is standard **leave-one-out**: the last item is used for test, the second-to-last for validation, and the remainder for training. Evaluation is in the **full-item ranking** setting, with **Recall@5, Recall@10, NDCG@5,** and **NDCG@10** as reported metrics.

The comparison covers **17 baselines** in four groups: traditional recommender systems (**LightGCN, SimGCL, SASRec, FDSA, S\(^3\)-Rec**), non-LLM-based GR models (**TIGER, LETTER**), GR methods with auxiliary tasks (**P5, ReAT, LC-Rec, EAGER-LLM**), and LLM-based GR models using SIDs or TIDs (**PLUM, OneRec-Think, Naive, GRAM, GRLM, AgenticTagger**). For the main results, the same LLM backbone is used across comparisons: **Qwen-3.5-4B** [2606.17276].

The principal empirical findings are fourfold.

First, IIRG is reported as the **best-performing method on every dataset and metric** in the main table. Relative to **Naive**, it improves by an average of **21% in Recall@5** across datasets. Example values reported in the paper are:

- **Sports**: Naive-TID \(R@5 = 0.0337\), IIRG \(R@5 = 0.0406\)
- **Toys**: Naive-TID \(R@5 = 0.0634\), IIRG \(R@5 = 0.0780\)
- **Beauty**: Naive-TID \(R@5 = 0.0606\), IIRG \(R@5 = 0.0726\)

Second, IIRG reduces the one-hop memorization ratio of Naive and, more importantly, yields larger gains for **non-one-hop-memorization-benefiting users** than for benefiting users. The reported average gain is **40%** for users who do **not** benefit from one-hop memorization, versus **16%** for users who **do** benefit. This is the paper’s main evidence that the method succeeds in shifting the model toward non-local recommendation signals [2606.17276].

Third, the method is reported to generalize across identifier schemes. Under **SIDs**, IIRG still improves over Naive and outperforms **LC-Rec**, which the paper identifies as the strongest SID-applicable baseline. The paper further reports that both the memorization findings and IIRG’s effectiveness hold under **Residual K-Means SIDs** as well.

Fourth, IIRG shows larger gains for **cold-start target items**, defined in the paper as target items with \(\leq 8\) interactions. The reported interpretation is that the semantic-neighbor task is particularly useful for sparse items. The Yelp results are used to argue that the method is not limited to Amazon Reviews.

## 6. Ablations, limitations, and significance

The ablation study supports the necessity of both auxiliary tasks [2606.17276]. Removing collaborative neighbor generation hurts performance, and removing semantic neighbor generation also hurts performance; using both gives the best results. A random-neighbor variant performs worse than IIRG and can even degrade Naive, which the paper takes as evidence that the auxiliary neighbors must be **predictive**, not arbitrary. The paper also evaluates heuristics that directly recommend from collaborative or semantic neighbors; these are worse than IIRG, indicating that it is more effective to **train the LLM to learn the relations** than to use the relations directly as recommendations. The alternative design that excludes one-hop successors from collaborative neighbors performs worse than the current design, suggesting that completely removing one-hop signals may overcorrect and discard useful predictive information.

The paper states two principal limitations. The first is that the **cause of one-hop memorization remains unknown**. The behavior is documented, but the underlying mechanism is not explained, and the experiments suggest that model size alone does not account for it. The second is that the experiments are limited to the **Qwen-3.5** family; testing whether the same memorization pattern and the same effectiveness of IIRG hold for other LLM families such as **Llama** or **Mistral** is identified as important future work. An additional caveat reported in the appendix is that **LoRA fine-tuning performed poorly** in this setting and produced many invalid outputs, which suggests that sufficient full-model capacity may be required for reliable generative recommendation [2606.17276].

In the generative-recommendation literature, IIRG is therefore best understood as a targeted response to a specific empirical diagnosis: **training LLM recommenders only with next-item prediction encourages shortcut-like one-hop memorization**. IIRG retains next-item prediction but supplements it with explicit supervision over **non-local collaborative structure** and **semantic item similarity**. A plausible implication is that the method’s main contribution is not only higher aggregate ranking performance, but also a redistribution of performance gains toward users and items that are poorly served by direct transition memory alone.

Source: https://www.emergentmind.com/topics/iirg