Manuscript Offprint
arXiv:2610.36000RELAY: One Query, Two Roles for Sequential Recommendation
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Sequential recommendation must combine semantic preferences with behavioral associations to deliver accurate rankings at low inference cost. Sharing history selection connects preference representation directly to the behavioral evidence used in candidate scoring. We present RELAY, a compact sequential recommender built around one query, two roles: semantic readout and behavioral-memory routing. A single learned query forms a semantic preference representation and reuses its attention to route direct-history and transition evidence into candidate scores. Candidate-conditioned gates calibrate the two memory channels for each candidate. RELAY trains both roles with a single catalog likelihood and produces the final ranking in one forward pass. Full-catalog experiments on six datasets show that RELAY achieves the highest Recall@5 and NDCG@5 among the compared methods on every dataset, improving over the previous best model by 14.22% and 17.88% on average. With 2.044 million predictor parameters, RELAY reduces predictor size by 65.12% and achieves a 1.75–1.79× inference speedup over the previous best model.
CCS Concepts
• Information systems → Recommender systems.
1 Introduction
Sequential recommendation on the Web must turn a user's interaction history into an accurate recommendation within a tight inference budget. That history carries two complementary forms of evidence. Shared item semantics reveal broader preferences, while observed behavioral associations identify specific choices that tend to follow past interactions [6, 20, 22, 33]. Neural sequence models summarize historical preferences for next-item prediction [5, 11, 25]. The modeling goal is to make semantic preferences and explicit behavioral evidence cooperate in one compact scoring path.
Semantic readout and behavioral-memory routing share a central decision: which historical interactions matter for the current recommendation. Semantic readout aggregates relevant interactions into a preference representation; memory routing uses those interactions to supply associations for candidate scoring. For example, in a history mixing LEGO themes, attention to a NINJAGO interaction expresses a theme preference and routes its observed transition evidence to specific candidate sets. Sharing their history selection lets the final ranking objective jointly determine what represents a

Mean NDCG@5 (%)
Figure 1: Accuracy, predictor size, and inference cost, averaged equally over six datasets. Cost uses a logarithmic axis. RELAY combines the highest mean NDCG@5 with the smallest predictor and lowest inference cost among the plotted models.
user’s preferences and which behavioral evidence supports each candidate. This motivates a simple principle: select the history once, use its evidence twice.
We present RELAY , a sequential recommender built around one query, two roles: semantic readout and memory routing. A single learned query reads the history to form a semantic preference representation and reuses the same history attention to route direct-history and transition evidence into candidate scores. Semantic matching scores the complete catalog, while candidate-conditioned gates calibrate the memory evidence for each candidate. A common catalog likelihood trains both roles through the final ranking scores, and recommendation takes one forward pass.
Figure 1 summarizes RELAY’s joint gains in ranking quality, predictor size, and inference time. Our contributions are:
• We introduce one query, two roles for semantic readout and behavioral-memory routing. Shared history selection links preference representation directly to candidate-level ranking evidence.
• We train both roles with one catalog likelihood and derive how the final ranking loss supervises shared attention through semantic readout and explicit memory routing.
Corresponding author.
Code: https://github.com/LIZESHENG13/RELAY.
• RELAY achieves the highest Recall@5 and NDCG@5 across the evaluated domains, improving over the previous best model by 14.22% and 17.88% on average, with 65.12% fewer predictor parameters and a 1.75–1.79× inference speedup.
2 Related Work
Sequential preference modeling. Recurrent and attention-based recommenders learn user preferences from interaction sequences [5, 11, 25]. Their history encoders capture dependencies among past actions and provide representations for next-item prediction. Multi-interest models use dynamic routing or attention to extract several preference vectors, supporting diverse interests and controllable retrieval [2, 12]. These studies establish history selection and aggregation as central modeling choices. RELAY assigns a single query two coupled responsibilities: its attention aggregates the semantic representation and allocates explicit memory evidence to catalog candidates. The shared selection connects representation learning directly to the local evidence used in ranking.
Semantic representations and direct ranking. Content-aware sequence learning and vector-quantized item representations share information across items and recommendation domains [6, 9]. Generative retrieval represents items with short semantic identifiers and predicts their tokens from user histories [20]. Tokenization research further incorporates collaborative semantics, code diversity, sequence context, and joint optimization of the index and recommender, including differentiable semantic-ID learning [3, 10, 15, 28, 32]. Semantic codes also support direct catalog scoring: DiGR composes SID representations and optimizes item-level matching [31]. RELAY uses SID representations within a unified catalog scorer. Its focus is the shared attention that links a semantic preference vector to bounded, explicit behavioral evidence.
Transition and history memory. Personalized Markov models combine user preferences with item transitions [22]; graph-based methods encode behavioral relations in item and session representations [13, 29]. Repeat-aware recommendation makes historical items explicitly available to a recommendation mechanism [21], and transition-aware distillation transfers global transition patterns into item embeddings [33]. RELAY retains a bounded transition memory at scoring time and routes its contributions with the attention already used for semantic readout. It also addresses a specific dependence introduced by aggregated transition counts: each training record contributes to the memory used to score that record. Target-statistic research studies related dependence between labels and derived features [19]. RELAY removes the current record's one-count contribution and exactly restores its top-neighbor set before computing the training loss.
Efficient recommendation and one-pass inference. Parallel SID prediction reduces sequential decoding, while structured search recovers legal catalog identifiers [8, 27]. Discrete diffusion provides another route to parallel SID modeling [17, 24], and single-step prediction directly estimates token probabilities for efficient catalog ranking [1]. Distillation transfers ranking information or teacher predictions into compact recommenders [4, 26]; OneChord learns and distills a fused catalog distribution [14]. RELAY brings these ideas into one full-catalog scorer: semantic matching assigns a score to every SID, while query-routed memory adjusts candidates reached by direct history and bounded transition neighborhoods. One catalog likelihood trains both terms, connecting preference estimation to candidate-level behavioral evidence.
3 Method
RELAY follows one principle: select the history once, use its evidence twice. A single query reads a semantic preference representation and routes behavioral memory with the same attention. The resulting evidence enters one catalog score, so the ranking objective jointly learns what to read and where to apply it. Figure 2 presents the framework.
3.1 Semantic Catalog and History Representation
For an interaction history and next item , a fixed semantic index assigns an L-code identifier:
(1)
The distinct tuples in define the candidate catalog; items assigned the same tuple share a candidate. Write . With code embeddings and a shared two-layer projection , the history encoder computes
(2)
Here denotes the learned embedding of the interaction’s position in the padded history. The bidirectional encoder contextualizes each interaction; padding is masked throughout. has a ReLU hidden layer and is shared by history encoding, semantic readout, and candidate representation.
3.2 One Query, Two Roles
One shared history selection. Let be a learned query, the number of attention heads, and . For head , let be the corresponding slice of RMSNorm( ) and the head slice of . The encoded history supplies both keys and values directly. The query defines
Because each head distribution is normalized, and . Contextual keys give each history its own allocation, so repeated occurrences of one SID can receive different weights. These shared weights drive both semantic readout and memory routing; longer histories distribute the same total mass across more positions.
(a) One shared selection → two evidence paths → one ranking

(b) Exact current-record exclusion
Figure 2: Overview of RELAY. (a) One learned query selects the encoded history for two roles: semantic readout and behavioral-memory routing. Their evidence forms one catalog score for Top-K recommendation. (b) Training removes the current record's transition contribution and recovers the adjusted top-B neighbors from a top- buffer. (c) A single catalog likelihood trains the readout, context-dependent memory strengths, and shared routing attention.
Role I: semantic readout. The head contexts form one query state through a residual cross-attention block and a feed-forward block:
Standard training dropout is omitted from the notation; memory routing always uses the normalized attention before dropout. The readout operates on one query state. Its normalized semantic representation and the candidate representation are
Here norm(x) = x/||x||_2 and . The stop-gradient sg applies only to candidate-side code embeddings; the shared projection remains trainable. Semantic matching therefore assigns a score to every catalog SID, including candidates without a direct history or transition match.
Role II: memory routing. The same weights the behavioral evidence contributed by each interaction. An interaction can support its own SID through direct history and associated SIDs through transitions, using the same allocation that forms the semantic readout.
3.3 Attention-Routed Behavioral Memory
Directed transition memory. Let contain training records . Write for the final SID in . Off-diagonal transition counts are
For each source , retains its largest positive counts, resolving ties by a fixed catalog order. The memory weight is
The logarithm compresses count magnitude, while the neighbor budget bounds the evidence retrieved from any history interaction. Self transitions are represented through direct history evidence.
Two memory channels, one routing decision. Direct history evidence identifies previously observed SIDs; transition evidence connects historical SIDs to associated choices:
(8)
A repeated SID receives the sum of attention weights at all matching history positions. Transition evidence also accumulates when several historical SIDs connect to the same candidate; each source contributes its attention weight times the corresponding log-count. Thus, two history SIDs with a shared outgoing neighbor jointly support that candidate, while contextual attention can weight their contributions differently. Both channels use the same normalized history allocation. The query state and each candidate vector then determine their separate strengths through candidate-conditioned gates. Let and be row of and entry of , where . The gates are
The shared attention selects the evidence; these gates calibrate each channel to the current candidate. The unified score is
The semantic term scores every catalog candidate; direct-history and transition terms contribute where the corresponding evidence is present. Their candidate-conditioned strengths are learned together with the shared query under the catalog likelihood.
3.4 Record-Excluded Catalog Learning
Learning from other records’ transitions. Each non-self training transition contributes one count to Eq. (6). To train its predictor using evidence from the remaining records, define
Training selects neighbors from after the decrement. The adjusted row applies to every occurrence of its source SID in ; direct-history evidence still comes from the observed history.
PROPOSITION 3.1 (EXACT NEIGHBOR REPLACEMENT). Suppose one count in a source row decreases by one, and neighbor ordering uses descending count followed by a fixed tie order. The updated top-B positive-count neighbors can be recovered exactly from the original top- neighbors and their adjusted counts.
A single decrement can move only one entry down, so its first possible replacement is already ranked . Retaining the top during training therefore suffices: decrement, rerank, and keep the top B, without scanning the catalog row. The proof is in Appendix A.2.
One likelihood for the complete ranking. Define a catalog distribution from the unified score:
All trainable components are optimized by the next-target likelihood
The full-catalog likelihood jointly trains query attention, semantic representations, and both candidate-conditioned gates; transition counts remain fixed statistics. At recommendation time, the full-data C supplies memory and ranks the catalog.
How one query learns both roles. For one training record, write and define
(14)
measures the ranking residual associated with the evidence routed by position . Let denote the derivative through the readout state , including its effect on semantic scores and candidate-conditioned gates. Put and .
PROPOSITION 3.2 (COUPLED SUPERVISION OF SHARED ATTENTION). For valid history positions, the attention-logit gradient is
The catalog cross-entropy residual and softmax Jacobian produce these two gradient paths (full derivation in Appendix A.3): the readout term updates semantic matching and candidate gates, while the routing term compares each position's residual with its head average.
3.5 Ranking Structure and One-Pass Recommendation
Memory as a contextual probability tilt. Let be the memory correction and let be the catalog softmax of .
Then
For any , memory changes their log odds by exactly ; it redistributes semantic preference at destinations supported by routed evidence.
Sparse memory support. The correction has support contained in
Memory changes scores only within this support; candidates outside it retain their semantic scores. Recommendation ranks the corrected scores over the full catalog.
One shared prediction path. At serving time, RELAY encodes the history and evaluates its query once, scores the catalog with cached vectors, then adds routed memory evidence at its destinations. Semantic scoring costs ; candidate gates add on the sparse support, and the readout costs when feed-forward width is proportional to . The transition table stores entries at inference and one additional entry per source during training. History length and memory budget control the additional scoring cost: behavioral evidence strengthens the ranking without a second catalog-wide neural evaluation. Algorithm 1 summarizes the procedure.
4 Experiments
We evaluate RELAY's ranking accuracy, predictor size, and inference cost. Ablations and routing interventions test shared history selection, while record-exclusion diagnostics examine generalization beyond recorded transitions.
4.1 Experimental Setup
Datasets and evaluation. We use Sports, Beauty, and Toys from Amazon Reviews 2014 [18], and Scientific, Instruments, and Games from Amazon Reviews 2023 [7]. We report Recall@5 (R@5) and NDCG@5 (N@5) under full-catalog evaluation. For SID-based ranking, the catalog consists of all distinct legal four-code identifiers, and a hit requires an exact match to the held-out target SID. Inference cost measures generation of the final Top-10 lists over the complete test set. Dataset statistics, chronological splits, and evaluation definitions appear in Appendix B.1.
Baselines. We compare RELAY with 16 methods spanning item ID-based recommendation, autoregressive SID-based generation, and non-autoregressive SID-based prediction (Table 1). OneChord provides the strongest accuracy baseline. The inference-cost comparison covers eight baselines (Table 2).
Algorithm 1 RELAY: shared-query learning and one-pass recommendation
Input: records , catalog , budget , epochs , cutoff . Output: trained parameters and Top- recommendations.
Build transition memory
1: // Eq. (6) 2: Store each source's top- positive neighbors and counts, with fixed tie order.
Train the shared query and catalog scorer
3: for epoch = 1, ..., do 4: for each mini-batch do 5: for each do 6: Compute query state , shared attention , and readout . 7: . 8: if then 9: Decrement ; recover its exact top- from the stored top-. 10: end if 11: using the full-catalog softmax. 12: end for 13: // Eq. (13) 14: end for 15: end for
Recommend in one pass
16: Cache and the full-data top- transition memory. 17: for each request history do 18: Compute , and once; set for all . 19: for , add to . 20: return Top. 21: end for
Implementation. RELAY uses a fixed semantic catalog, a bidirectional history encoder, and a single query readout. The shared history attention serves both semantic matching and behavioral-memory routing, trained through the complete-catalog likelihood in Eq. (13). Architecture, optimization, random seeds, checkpoint selection, and measurement settings are specified in Appendix B.
4.2 Overall Recommendation Performance
Consistent gains across domains. Table 1 shows that RELAY achieves the highest mean R@5 and N@5 on every dataset. Relative to OneChord, the average improvements are 14.22% and 17.88%, respectively. N@5 gains range from 7.91% on Scientific to 26.32% on Games.
Higher-ranked relevant predictions. RELAY improves both target retrieval and its position near the top. On Toys, R@5 increases from 0.0746 to 0.0890 and N@5 from 0.0546 to 0.0658. Compared with SPRINT, RELAY improves R@5 and N@5 by 21.38% and 26.20% on average.
4.3 Inference Efficiency and Model Size
One forward pass with faster inference. RELAY completes full-test Top-10 generation in 0.13–0.70 seconds (Table 2), with a 1.32–1.38× speedup over one-step FAVE, the fastest compared baseline. Its speedup is 1.75–1.79× over OneChord and 1.86–2.08×
Table 1: Full-catalog test Recall/NDCG@5. Baselines report means; RELAY reports mean ± standard deviation. Amber marks the strongest baseline and blue marks RELAY. Bold denotes the best mean; Improv. is relative to the strongest baseline.
| Type | Method | Sports | Beauty | Toys | Scientific | Instruments | Games | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| R@5 | N@5 | R@5 | N@5 | R@5 | N@5 | R@5 | N@5 | R@5 | N@5 | R@5 | N@5 | ||
| Item ID-based | GRU4Rec [5] (2015) | 0.0128 | 0.0087 | 0.0165 | 0.0098 | 0.0098 | 0.0060 | 0.0186 | 0.0127 | 0.0293 | 0.0195 | 0.0459 | 0.0310 |
| SASRec [11] (2018) | 0.0232 | 0.0155 | 0.0390 | 0.0248 | 0.0462 | 0.0304 | 0.0237 | 0.0150 | 0.0335 | 0.0212 | 0.0512 | 0.0326 | |
| BERT4Rec [25] (2019) | 0.0116 | 0.0074 | 0.0202 | 0.0125 | 0.0117 | 0.0070 | 0.0159 | 0.0101 | 0.0252 | 0.0158 | 0.0311 | 0.0198 | |
| PreferDiff [16] (2024) | 0.0276 | 0.0189 | 0.0453 | 0.0318 | 0.0605 | 0.0406 | 0.0163 | 0.0115 | 0.0210 | 0.0140 | 0.0353 | 0.0244 | |
| FAVE [23] (2026) | 0.0303 | 0.0193 | 0.0583 | 0.0407 | 0.0615 | 0.0447 | 0.0229 | 0.0144 | 0.0324 | 0.0208 | 0.0544 | 0.0350 | |
| SID-based (AR) | TIGER [20] (2023) | 0.0267 | 0.0179 | 0.0455 | 0.0325 | 0.0519 | 0.0373 | 0.0279 | 0.0182 | 0.0360 | 0.0234 | 0.0528 | 0.0345 |
| ActionPiece [10] (2025) | 0.0317 | 0.0203 | 0.0512 | 0.0341 | 0.0473 | 0.0311 | 0.0269 | 0.0172 | 0.0390 | 0.0245 | 0.0583 | 0.0381 | |
| COBRA [30] (2025) | 0.0301 | 0.0216 | 0.0539 | 0.0394 | 0.0621 | 0.0461 | 0.0275 | 0.0178 | 0.0345 | 0.0229 | 0.0473 | 0.0309 | |
| SID-MLP [4] (2026) | 0.0263 | 0.0174 | 0.0442 | 0.0303 | 0.0378 | 0.0243 | 0.0292 | 0.0194 | 0.0398 | 0.0254 | 0.0575 | 0.0381 | |
| DIGER [3] (2026) | 0.0159 | 0.0101 | 0.0443 | 0.0286 | 0.0432 | 0.0291 | 0.0265 | 0.0167 | 0.0303 | 0.0190 | 0.0454 | 0.0285 | |
| SID-based (NAR) | RPG [8] (2025) | 0.0312 | 0.0214 | 0.0546 | 0.0377 | 0.0593 | 0.0397 | 0.0259 | 0.0172 | 0.0358 | 0.0242 | 0.0582 | 0.0394 |
| LLaDA-Rec [24] (2025) | 0.0280 | 0.0186 | 0.0508 | 0.0348 | 0.0509 | 0.0345 | 0.0308 | 0.0202 | 0.0403 | 0.0265 | 0.0624 | 0.0414 | |
| DiffGRM [17] (2025) | 0.0366 | 0.0248 | 0.0605 | 0.0413 | 0.0617 | 0.0453 | 0.0404 | 0.0276 | 0.0430 | 0.0284 | 0.0619 | 0.0405 | |
| OneGR [27] (2026) | 0.0375 | 0.0254 | 0.0632 | 0.0430 | 0.0632 | 0.0462 | 0.0353 | 0.0244 | 0.0367 | 0.0248 | 0.0545 | 0.0366 | |
| SPRINT [1] (2026) | 0.0413 | 0.0271 | 0.0674 | 0.0452 | 0.0705 | 0.0500 | 0.0442 | 0.0300 | 0.0460 | 0.0306 | 0.0635 | 0.0426 | |
| OneChord [14] (2026) | 0.0438 | 0.0295 | 0.0731 | 0.0497 | 0.0746 | 0.0546 | 0.0475 | 0.0325 | 0.0480 | 0.0319 | 0.0671 | 0.0435 | |
| Ours | RELAY | 0.0007 | 0.0006 | 0.0014 | 0.0010 | 0.0016 | 0.0014 | 0.0010 | 0.0006 | 0.0006 | 0.0004 | 0.0007 | 0.0005 |
| Improv. | 16.14% | 19.66% | 11.09% | 17.79% | 19.26% | 20.44% | 5.37% | 7.91% | 13.50% | 15.14% | 19.96% | 26.32% | |
Table 2: Full-test inference cost (s) and RELAY's speedup over each baseline. Amber marks the lowest baseline cost; blue marks RELAY. Bold denotes the lowest cost.
| Method | Sports | Beauty | Toys | Scientific | Instruments | Games | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Cost | Speedup | Cost | Speedup | Cost | Speedup | Cost | Speedup | Cost | Speedup | Cost | Speedup | |
| FAVE [23] (2026) | 0.3437 | 1.36× | 0.2098 | 1.38× | 0.1818 | 1.38× | 0.5110 | 1.36× | 0.5705 | 1.32× | 0.9486 | 1.35× |
| TIGER [20] (2023) | 10.0199 | 39.67× | 6.2677 | 41.08× | 5.4396 | 41.19× | 14.3327 | 38.16× | 16.1564 | 37.45× | 26.7062 | 37.97× |
| ActionPiece [10] (2025) | 39.2035 | 155.20× | 24.7523 | 162.25× | 21.4593 | 162.51× | 56.9978 | 151.73× | 63.8786 | 148.07× | 105.9439 | 150.64× |
| RPG [8] (2025) | 0.7240 | 2.87× | 0.5641 | 3.70× | 0.3615 | 2.74× | 1.6441 | 4.38× | 1.8188 | 4.22× | 3.0426 | 4.33× |
| LLaDA-Rec [24] (2025) | 85.1093 | 336.93× | 56.8194 | 372.45× | 45.6964 | 346.05× | 121.7687 | 324.16× | 136.7625 | 317.00× | 228.0063 | 324.21× |
| DiffGRM [17] (2025) | 2.1590 | 8.55× | 1.3601 | 8.92× | 1.1404 | 8.64× | 3.0965 | 8.24× | 3.4338 | 7.96× | 5.7371 | 8.16× |
| SPRINT [1] (2026) | 0.5007 | 1.98× | 0.2844 | 1.86× | 0.2477 | 1.88× | 0.7681 | 2.04× | 0.8861 | 2.05× | 1.4658 | 2.08× |
| OneChord [14] (2026) | 0.4423 | 1.75× | 0.2732 | 1.79× | 0.2337 | 1.77× | 0.6700 | 1.78× | 0.7629 | 1.77× | 1.2441 | 1.77× |
| RELAY | 0.2526 | — | 0.1526 | — | 0.1320 | — | 0.3756 | — | 0.4314 | — | 0.7033 | — |
over SPRINT. It combines the highest mean accuracy with the lowest inference cost among the compared models.
A compact recommendation network. RELAY has 2.044 million parameters, the smallest predictor in Table 4. It reduces parameters by 65.12% relative to OneChord, 66.96% relative to SPRINT, and 31.84–57.25% relative to FAVE. Shared routing retains semantic and behavioral evidence within a compact network. Appendix B.4 gives the protocol; Appendix B.6 evaluates a multi-query extension.
4.4 Ablation Study
Table 3 evaluates the two memory channels, current-record exclusion, and attention sharing. Its lower panel compares SPRINT, OneChord, and RELAY with three quantizers on Sports, Beauty, and Toys: RELAY leads both metrics in every setting. Data and optimization are matched; Appendix B.5 defines each intervention.
Two memory channels strengthen semantic ranking. Removing all behavioral memory reduces average R@5 and N@5 by 9.25% and 12.33%. Removing transition memory while retaining direct-history
Table 3: Full-catalog test results for RELAY ablations and model performance under three quantization methods. The lower panel compares SPRINT, OneChord, and RELAY on Sports, Beauty, and Toys; means weight these datasets equally. The nonnegative controls are single-run references.
| Variant | Sports | Beauty | Toys | Scientific | Instruments | Games | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| R@5 | N@5 | R@5 | N@5 | R@5 | N@5 | R@5 | N@5 | R@5 | N@5 | R@5 | N@5 | |
| RELAY | 0.05087 | 0.03530 | 0.08121 | 0.05854 | 0.08897 | 0.06576 | 0.05005 | 0.03507 | 0.05448 | 0.03673 | 0.08049 | 0.05495 |
| w/o behavioral memory | 0.04465 | 0.02955 | 0.07430 | 0.05151 | 0.07980 | 0.05690 | 0.04625 | 0.03183 | 0.05045 | 0.03282 | 0.07307 | 0.04842 |
| w/o transition memory | 0.04567 | 0.02985 | 0.07357 | 0.05141 | 0.07738 | 0.05559 | 0.04515 | 0.03162 | 0.04962 | 0.03251 | 0.07210 | 0.04766 |
| w/o direct-history memory | 0.04985 | 0.03439 | 0.08007 | 0.05739 | 0.08736 | 0.06425 | 0.04885 | 0.03426 | 0.05355 | 0.03591 | 0.07941 | 0.05386 |
| w/o current-record exclusion | 0.03558 | 0.02511 | 0.06821 | 0.05099 | 0.07658 | 0.05861 | 0.03143 | 0.02352 | 0.03515 | 0.02459 | 0.06543 | 0.04592 |
| Separate memory routing | 0.04995 | 0.03439 | 0.08038 | 0.05770 | 0.08776 | 0.06485 | 0.04825 | 0.03416 | 0.05345 | 0.03580 | 0.07931 | 0.05375 |
| Original nonnegative control | 0.05085 | 0.03533 | 0.08040 | 0.05706 | 0.08783 | 0.06516 | 0.04949 | 0.03459 | 0.05254 | 0.03556 | 0.07531 | 0.05081 |
| Candidate-conditioned nonnegative control | 0.05096 | 0.03540 | 0.08161 | 0.05752 | 0.08773 | 0.06551 | 0.04933 | 0.03468 | 0.05315 | 0.03587 | 0.07537 | 0.05120 |
| Method | Model | Sports | Beauty | Toys | Mean | ||||
|---|---|---|---|---|---|---|---|---|---|
| R@5 | N@5 | R@5 | N@5 | R@5 | N@5 | R@5 | N@5 | ||
| OPQ | SPRINT | 0.04110 | 0.02700 | 0.06750 | 0.04510 | 0.07080 | 0.05010 | 0.05980 | 0.04073 |
| OneChord | 0.04380 | 0.02950 | 0.07310 | 0.04970 | 0.07460 | 0.05460 | 0.06383 | 0.04460 | |
| RELAY | 0.05087 | 0.03530 | 0.08121 | 0.05854 | 0.08897 | 0.06576 | 0.07368 | 0.05320 | |
| RQ-VAE | SPRINT | 0.02840 | 0.01860 | 0.05050 | 0.03480 | 0.04520 | 0.03070 | 0.04137 | 0.02803 |
| OneChord | 0.02871 | 0.01825 | 0.04932 | 0.03319 | 0.04863 | 0.03136 | 0.04222 | 0.02760 | |
| RELAY | 0.03840 | 0.02696 | 0.06484 | 0.04639 | 0.07166 | 0.05176 | 0.05830 | 0.04171 | |
| RQ-Kmeans | SPRINT | 0.02960 | 0.01950 | 0.05180 | 0.03520 | 0.05460 | 0.03550 | 0.04533 | 0.03007 |
| OneChord | 0.02809 | 0.01804 | 0.05017 | 0.03374 | 0.04832 | 0.03186 | 0.04219 | 0.02788 | |
| RELAY | 0.03806 | 0.02652 | 0.06573 | 0.04696 | 0.07212 | 0.05278 | 0.05864 | 0.04209 | |
Table 4: Predictor parameters across datasets and RELAY's parameter reduction. Amber marks the lowest baseline mean.
| Method | Parameters (M) | Reduction |
|---|---|---|
| FAVE | 2.998–4.780 | 31.84–57.25% |
| TIGER | 4.591 | 55.49% |
| ActionPiece | 9.580 | 78.67% |
| RPG | 8.515–13.568 | 76.00–84.94% |
| LLaDA-Rec | 4.749 | 56.97% |
| DiffGRM | 3.237 | 36.86% |
| SPRINT | 6.184 | 66.96% |
| OneChord | 5.860 | 65.12% |
| RELAY | 2.044 | - |
memory reduces them by 10.49% and 13.17%. Removing direct-history memory reduces them by 1.72% and 2.20%. Both channels contribute in every domain, with transition memory providing the larger gain.
Excluding a record's own contribution improves generalization. Removing current-record exclusion reduces average R@5 by 23.07% and N@5 by 20.12%, the largest ablation effect. Separate routing reduces them by 1.72% and 1.99%.
Table 5: Full-catalog test performance by interaction sparsity, averaged equally over six datasets. Gains are relative to OneChord.
| Group | OneChord | RELAY | Gain | |||
|---|---|---|---|---|---|---|
| R@5 | N@5 | R@5 | N@5 | R@5 | N@5 | |
| Target-item popularity | ||||||
| Tail | 0.0276 | 0.0198 | 0.0293 | 0.0208 | +6.06% | +4.92% |
| Middle | 0.0408 | 0.0293 | 0.0467 | 0.0342 | +14.44% | +16.66% |
| Head | 0.0851 | 0.0569 | 0.0993 | 0.0695 | +16.67% | +22.04% |
| Effective history length | ||||||
| Short | 0.0616 | 0.0419 | 0.0705 | 0.0499 | +14.48% | +18.96% |
| Medium | 0.0570 | 0.0389 | 0.0647 | 0.0453 | +13.50% | +16.68% |
| Long | 0.0545 | 0.0377 | 0.0646 | 0.0455 | +18.64% | +20.60% |
Shared attention improves accuracy with fewer parameters. Sharing saves 65,556 parameters by reusing the semantic readout's selector, while retaining higher average accuracy in all six domains. The same interaction weights determine both the semantic preference and the behavioral associations supplied to each candidate. The ranking objective therefore trains one history selection through both roles, directly coupling preference representation with the evidence used to rank candidates.
(a) Beauty
Fragrance series
History
earlier → later

Yacht Man Blue

Adidas Team Force

Yacht Man Red
Target
Nautica Classic
OneChord
Top-1
Target rank #8

Yacht Man Blue
RELAY
Top-1
Target rank #1

Nautica Classic
(b) Toys
LEGO themes
History
earlier → later

LEGO Ultra Sonic Raider

LEGO
Garmatron

LEGO Bug Obliterator
Target
LEGO Golden Dragon
OneChord
Top-1
Target rank #6

LEGO
Helm's Deep
RELAY
Top-1
Target rank #1

LEGO Golden Dragon
(c) Generalization

(d) Signed corrections

Effective transition correction
(e) Gain by transition count

Transition count
Figure 3: Recommendation examples (a,b) and exclusion diagnostics (c–e).
4.5 Performance across Interaction Sparsity
RELAY's advantage extends across target popularity and the amount of available history. Table 5 compares RELAY with OneChord [14] under full-catalog test ranking, averaging each group's metrics equally over the six datasets. The two partitions distinguish evidence available for a target from context available for a user. Groups use target-item training frequency and effective history length; Appendix B.7 specifies the partitions.
Gains span the popularity spectrum. RELAY improves N@5 by 4.92%, 16.66%, and 22.04% for tail, middle, and head targets. R@5 improves by 6.06%, 14.44%, and 16.67%. Gains remain positive across the popularity groups.
Gains persist across history lengths. For short, medium, and long histories, N@5 improves by 18.96%, 16.68%, and 20.60%; the corresponding R@5 gains are 14.48%, 13.50%, and 18.64%. Short histories test evidence recovery from limited context, while long histories test whether relevant interactions remain identifiable among more alternatives. The gains in both groups show that shared history selection supports accurate ranking across different amounts of available context.
4.6 Query-Guided Memory Routing
The query's attention selects useful behavioral evidence. On trained RELAY predictors, replacing query-guided memory routing with uniform weights reduces N@5 by 7.73%; shuffling the learned weights across valid history positions reduces it by 11.18% (Table 6). The semantic readout and candidate-conditioned gates remain fixed. Shuffling preserves the weight values while changing their historical sources, identifying the correspondence between an interaction and its routing weight as a source of ranking accuracy.
Content-dependent selection becomes more valuable in longer histories. Relative to position-based recency routing, the query's N@5 gains increase from 0.58% for short histories to 1.96% for medium histories and 2.84% for long histories. As the set of historical interactions grows, the learned selection supplies increasingly useful evidence for candidate ranking. Appendix B.8 defines the routing interventions and aggregation.
4.7 Record Exclusion and Test Cases
Figure 3 shows the effect of exact record exclusion: without it, training N@5 reaches 27.48% (vs. 12.65%) as validation falls to 4.40% (vs. 5.73%); removing each target transition reverses the training ranking (4.93% vs. 8.00%). Signed updates include negative evidence (0.53%), while unseen transitions account for most held-out gain. Memory complements semantic scores with evidence routed from relevant history interactions beyond the last item. In the examples, RELAY ranks Nautica Classic and LEGO Golden Dragon first, while OneChord ranks them eighth and sixth. Appendix C gives Top-3 recommendations and examples from four more domains.
Table 6: History routing interventions with fixed predictor parameters. Full-catalog test metrics average six domains equally.
| Routing | R@5 | N@5 | ΔN@5 |
|---|---|---|---|
| Learned query | 0.06768 | 0.04773 | - |
| Uniform | 0.06364 | 0.04404 | -7.73% |
| Recency | 0.06700 | 0.04711 | -1.29% |
| Shuffled | 0.06146 | 0.04239 | -11.18% |
5 Conclusion
RELAY realizes one query, two roles: the same history attention forms semantic preferences and routes behavioral evidence into candidate scores. One catalog likelihood trains both roles, with candidate-conditioned gates calibrating direct-history and transition evidence. Across six domains, RELAY improves Recall@5 and NDCG@5 over the strongest baseline by 14.22% and 17.88% on average, with 65.12% fewer predictor parameters and 1.75–1.79× faster inference. Shared history selection thus unifies preference representation and behavioral evidence within a compact recommendation network.
References
[1] Zhuo Cai, Shoujin Wang, Peilin Zhou, Min Xu, Julian McAuley, and Fang Chen. 2026. SPRINT: Single-Step Generative Recommendation via Average Probability Velocity. arXiv:2609.34306 [cs.IR]
[2] Yukuo Cen, Jianwei Zhang, Xu Zou, Chang Zhou, Hongxia Yang, and Jie Tang. 2020. Controllable Multi-Interest Framework for Recommendation. arXiv:2005.09347 [cs.IR]
[3] Junchen Fu, Xuri Ge, Alexandros Karatzoglou, Ioannis Arapakis, Suzan Verberne, Joemon M. Jose, and Zhaochun Ren. 2026. Differentiable Semantic ID for Generative Recommendation. arXiv:2601.19711 [cs.IR]
[4] Zitian Guo, Yupeng Hou, Clark Mingxuan Ju, Neil Shah, and Julian McAuley. 2026. MLPs are Efficient Distilled Generative Recommenders. arXiv:2605.12617 [cs.IR]
[5] Balázs Hidasi, Alexandros Karatzoglou, Linas Baltrunas, and Domonkos Tikk. 2015. Session-based Recommendations with Recurrent Neural Networks. arXiv:1511.06939 [cs.LG]
[6] Yupeng Hou, Zhankui He, Julian McAuley, and Wayne Xin Zhao. 2022. Learning Vector-Quantized Item Representation for Transferable Sequential Recommenders. arXiv:2210.12316 [cs.IR]
[7] Yupeng Hou, Jiacheng Li, Xiangjun Fu, Zhankui He, An Yan, Xiusi Chen, and Julian McAuley. 2024. Bridging Language and Items for Retrieval and Recommendation: Benchmarking LLMs as Semantic Encoders. arXiv:2403.03952 [cs.IR]
[8] Yupeng Hou, Jiacheng Li, Ashley Shin, Jinsung Jeon, Abhishek Santhanam, Wei Shao, Kaveh Hassani, Ning Yao, and Julian McAuley. 2025. Generating Long Semantic IDs in Parallel for Recommendation. arXiv:2506.05781 [cs.IR]
[9] Yupeng Hou, Shanlei Mu, Wayne Xin Zhao, Yaliang Li, Bolin Ding, and Ji-Rong Wen. 2022. Towards Universal Sequence Representation Learning for Recommender Systems. arXiv:2206.05941 [cs.IR]
[10] Yupeng Hou, Jianmo Ni, Zhankui He, Noveen Sachdeva, Wang-Cheng Kang, Ed H. Chi, Julian McAuley, and Derek Zhiyuan Cheng. 2025. ActionPiece: Contextually Tokenizing Action Sequences for Generative Recommendation. arXiv:2502.13581 [cs.IR]
[11] Wang-Cheng Kang and Julian McAuley. 2018. Self-Attentive Sequential Recommendation. arXiv:1808.09781 [cs.IR]
[12] Chao Li, Zhiyuan Liu, Mengmeng Wu, Yuchi Xu, Pipei Huang, Huan Zhao, Guoliang Kang, Qiwei Chen, Wei Li, and Dik Lun Lee. 2019. Multi-Interest Network with Dynamic Routing for Recommendation at Tmall. arXiv:1904.08030 [cs.IR]
[13] Zesheng Li, Chengchang Pan, and Honggang Qi. 2026. BRIDGE: Behavior-Guided Residual Integration with Dual-Frequency Graph Evidence. arXiv:2605.22073 [cs.IR]
[14] Zesheng Li, Chengchang Pan, and Honggang Qi. 2026. OneChord: Distill What You Rank, Recommend in One Pass. arXiv:2610.25805 [cs.IR]
[15] Enze Liu, Bowen Zheng, Cheng Ling, Lantao Hu, Han Li, and Wayne Xin Zhao. 2024. Generative Recommender with End-to-End Learnable Item Tokenization. arXiv:2409.05546 [cs.IR]
[16] Shuo Liu, An Zhang, Guoqing Hu, Hong Qian, and Tat-Seng Chua. 2024. Preference Diffusion for Recommendation. arXiv:2410.13117 [cs.IR]
[17] Zhao Liu, Yichen Zhu, Yiqing Yang, Xiao Lv, Guoping Tang, Rui Huang, Qiang Luo, Ruiming Tang, Kun Gai, and Guorui Zhou. 2025. DiffGRM: Diffusion-based Generative Recommendation Model. arXiv:2510.21805 [cs.IR]
[18] Julian McAuley, Christopher Targett, Qinfeng Shi, and Anton van den Hengel. 2015. Image-based Recommendations on Styles and Substitutes. arXiv:1506.04757 [cs.CV]
[19] Liudmila Prokhorenkova, Gleb Gusev, Aleksandr Vorobev, Anna Veronika Dorogush, and Andrey Gulin. 2017. CatBoost: Unbiased Boosting with Categorical Features. arXiv:1706.09516 [cs.LG]
[20] Shashank Rajput, Nikhil Mehta, Anima Singh, Raghunandan H. Keshavan, Trung Vu, Lukasz Heldt, Lichan Hong, Yi Tay, Vinh Q. Tran, Jonah Samost, Maciej Kula, Ed H. Chi, and Maheswaran Sathiamoorthy. 2023. Recommender Systems with Generative Retrieval. arXiv:2305.05065 [cs.IR]
[21] Pengjie Ren, Zhumin Chen, Jing Li, Zhaochun Ren, Jun Ma, and Maarten de Rijke. 2018. RepeatNet: A Repeat Aware Neural Recommendation Machine for Session-Based Recommendation. arXiv:1812.02646 [cs.IR]
[22] Steffen Rendle, Christoph Freudenthaler, and Lars Schmidt-Thieme. 2010. Factorizing Personalized Markov Chains for Next-Basket Recommendation. In Proceedings of the 19th International Conference on World Wide Web. Association for Computing Machinery, 811–820. doi:10.1145/1772690.1772773
[23] Ke Shi, Yao Zhang, Feng Guo, Jinyuan Zhang, JunShuo Zhang, Shen Gao, and Shuo Shang. 2026. FAVE: Flow-based Average Velocity Establishment for Sequential Recommendation. arXiv:2604.04427 [cs.IR]
[24] Teng Shi, Chenglei Shen, Weijie Yu, Shen Nie, Chongxuan Li, Xiao Zhang, Ming He, Yan Han, and Jun Xu. 2025. LLaDA-Rec: Discrete Diffusion for Parallel Semantic ID Generation in Generative Recommendation. arXiv:2511.06254 [cs.IR]
[25] Fei Sun, Jun Liu, Jian Wu, Changhua Pei, Xiao Lin, Wenwu Ou, and Peng Jiang. 2019. BERT4Rec: Sequential Recommendation with Bidirectional Encoder Representations from Transformer. arXiv:1904.06690 [cs.IR]
[26] Jiaxi Tang and Ke Wang. 2018. Ranking Distillation: Learning Compact Ranking Models With High Performance for Recommender System. arXiv:1809.07428 [cs.LG]
[27] Puji Wang, Yingchen Zhang, Ruqing Zhang, Jiafeng Guo, and Xueqi Cheng. 2026. One-Pass Decoding for Generative Recommendation with WFST-Constrained A* Search. In Proceedings of the 49th International ACM SIGIR Conference on Research and Development in Information Retrieval. Association for Computing Machinery, 4273–4278. doi:10.1145/3805712.3809884
[28] Wenjie Wang, Honghui Bao, Xinyu Lin, Jizhi Zhang, Yongqi Li, Fuli Feng, See-Kiong Ng, and Tat-Seng Chua. 2024. Learnable Item Tokenization for Generative Recommendation. arXiv:2405.07314 [cs.IR]
[29] Shu Wu, Yuyuan Tang, Yanqiao Zhu, Liang Wang, Xing Xie, and Tieniu Tan. 2018. Session-Based Recommendation with Graph Neural Networks. arXiv:1811.00855 [cs.IR]
[30] Yuhao Yang, Zhi Ji, Zhaopeng Li, Yi Li, Zhonglin Mo, Yue Ding, Kai Chen, Zijian Zhang, Jie Li, Shuanglong Li, and Liu Lin. 2025. Sparse Meets Dense: Unified Generative Recommendations with Cascaded Sparse-Dense Representations. arXiv:2503.02453 [cs.IR]
[31] Yuanbo Zhao, Ruochen Liu, Senzhang Wang, Jun Yin, Yuxin Dong, Huan Gong, Hao Chen, Shirui Pan, and Chengqi Zhang. 2026. From Token Generation to Item Ranking: Direct Generative Recommendation with Semantic IDs. arXiv:2602.07847 [cs.IR]
[32] Bowen Zheng, Yupeng Hou, Hongyu Lu, Yu Chen, Wayne Xin Zhao, Ming Chen, and Ji-Rong Wen. 2023. Adapting Large Language Models by Integrating Collaborative Semantics for Recommendation. arXiv:2311.09049 [cs.IR]
[33] Tianyu Zhu, Yansong Shi, Yuan Zhang, Yihong Wu, Fengran Mo, and Jian-Yun Nie. 2023. Collaboration and Transition: Distilling Item Transitions into Multi-Query Self-Attention for Sequential Recommendation. arXiv:2311.01056 [cs.IR]
A Derivations and Additional Method Details
A.1 Representation and Prediction Space
All scores, counts, likelihoods, and rankings use the distinct SID catalog S. History sums include valid positions only; padding has zero attention. The L digits occupy separate ranges of one embedding table. History codes, candidate codes, and L copies of the readout state use the shared projection
where and . Candidate code embeddings stop gradients; both uses train the projection. The encoder is bidirectional and pre-normalized. The readout projects a normalized query, takes encoded history head slices as keys and values, and applies an output projection, residual feed-forward block, and final RMS normalization. Routing averages pre-dropout head probabilities. Candidate vectors are cached for fixed parameters; memory stores destinations per source for serving and one additional destination for training. The two candidate-conditioned gates use parameters, the same count as the contextual strengths.
A.2 Exact Current-Record Exclusion
Proof of Proposition 3.1. Order a source's positive-count destinations as by decreasing count and a fixed tie order. Decrementing preserves every other pairwise order. If , the top- is unchanged. If , at most that entry leaves; among the remaining destinations, precedes every possible replacement. The updated top- therefore lies within the original top-. Re-sort these entries with adjusted counts and the same tie order, discard zero counts, and return at most entries. This recovers the exact updated neighborhood.
For record , the off-diagonal entry loses one count. Every occurrence of the same source in reads this adjusted row. Self transitions contribute no count. Exclusion removes one record's contribution; other training windows, including the same user's windows, remain. Counts use training records alone. Serving uses the original top- table.
A.3 Gradient of Shared Attention
Proof of Proposition 3.2. Fix the encoded history and . Treat readout state and routing weights as separate arguments:
Set . The state derivative and its attention contribution are
Routing contributes . Since ,
Applying to Eq. (21) gives Eq. (15). The identity also holds conditional on fixed dropout; query and encoder gradients include their other paths.
The residual compares target evidence with its model-weighted average. Shared attention receives this routing signal together with the state derivative through the same logits.
A.4 Probability Tilt
Writing and gives , establishing Eq. (16). Hence
Candidates outside the correction support preserve their pairwise odds and order; normalization remains catalog-wide. The implementation scores the full catalog, then adds the sparse memory corrections before selecting the final Top-K.
(a) Training fit

(b) Validation ranking

(c) Own-record sensitivity
Figure 4: Training and own-record sensitivity for candidate-conditioned signed RELAY. (a) Six-domain mean catalog cross-entropy during training. (b) Mean full-catalog validation N@5 across common epochs. (c) Training N@5 drop after removing each record's own transition, grouped by transition count.
Table 7: Dataset statistics after preprocessing. SIDs are distinct four-code identifiers; Avg. is mean sequence length.
| Dataset | Users | Items | SIDs | Interactions | Avg. |
|---|---|---|---|---|---|
| Sports | 35,598 | 18,357 | 15,102 | 296,337 | 8.32 |
| Beauty | 22,363 | 12,101 | 10,377 | 198,502 | 8.88 |
| Toys | 19,412 | 11,924 | 10,220 | 167,597 | 8.63 |
| Scientific | 50,985 | 25,848 | 19,810 | 412,947 | 8.10 |
| Instruments | 57,439 | 24,587 | 20,951 | 511,836 | 8.91 |
| Games | 94,762 | 25,612 | 20,944 | 814,586 | 8.60 |
B Experimental Protocol
B.1 Datasets and Evaluation
Amazon 2014 uses category-specific 5-core data. For Amazon 2023, we retain each user's longest chronologically ordered interaction sequence. The last two interactions are validation/test targets; windows use the earlier prefix. Histories retain at most 20 preceding interactions.
All methods are evaluated over the complete set of distinct four-code SIDs using exact matches to the held-out target SID. For item-ID baselines, we map the full-catalog item ranking through the fixed OPQ mapping and collapse repeated SIDs at their first-ranked position before computing the metrics. Items with the same SID
Table 8: RELAY full-catalog test performance at .
| Dataset | R@10 | N@10 |
|---|---|---|
| Sports | 0.07245 | 0.04223 |
| Beauty | 0.11139 | 0.06829 |
| Toys | 0.11720 | 0.07491 |
| Scientific | 0.07279 | 0.04238 |
| Instruments | 0.07920 | 0.04470 |
| Games | 0.11755 | 0.06686 |
Table 9: Item-level full-catalog results averaged over Sports, Beauty, and Toys. Each baseline leads its recommendation paradigm.
| Paradigm | Method | R@5 | N@5 |
|---|---|---|---|
| Item-ID | FAVE [23] | 0.04883 | 0.03408 |
| SID-based (AR) | ActionPiece [10] | 0.03530 | 0.02200 |
| SID-based (NAR) | OneGR [27] | 0.04490 | 0.03210 |
| Ours | RELAY | 0.05512 | 0.03930 |
occupy one candidate entry. For target rank among users,
Table 8 supplements the main comparison.
Item-level recommendation. Table 9 compares the strongest item-ID, autoregressive SID, and non-autoregressive SID baselines, using full-catalog item-level metrics averaged over Sports, Beauty, and Toys. RELAY improves mean R@5/N@5 by 12.88%/15.32% over the strongest baseline.
B.2 Architecture and Training
Predictor and memory. Each SID has four 256-value digits. RELAY uses width 256, four heads, feed-forward width 1024, dropout 0.1, one bidirectional encoder layer, and one cross-attention layer without query self-attention. The shared projection outputs 256 dimensions; , and candidate embeddings stop gradients. Memory retains off-diagonal destinations with weights and a ninth exclusion backup. A 256-to-2 affine gate (514 parameters) conditions memory corrections on the candidate; mean pre-dropout attention routes both channels.
Optimization. Training uses fresh initialization, AdamW ( learning rate, zero weight decay), gradient clipping at 1, batch size 1024, and cosine scheduling after 10,000 warmup steps. Catalog cross-entropy trains for at most 150 epochs with per-epoch validation and patience 10; evaluation batch size is 256.
B.3 Seeds and Aggregation
Main results average five seeds; all experiments other than the main and ablation tables use seed 2024. Checkpoints maximize validation before full-test evaluation. RELAY reports
Table 10: Six-domain means for the multi-query extension. Long histories contain 11–20 interactions; inference cost follows Appendix B.4.
| R@5 | N@5 | Long N@5 | Cost (s) | Params (M) | |
|---|---|---|---|---|---|
| 1 | 0.06768 | 0.04773 | 0.04549 | ||
| 2 | 0.07010 | 0.04968 | 0.04724 | 0.3797 | 2.04391 |
| 4 | 0.4571 | 2.04442 |
mean and sample standard deviation (denominator 4); baselines report means. Main improvements average six domain-relative gains between RELAY and each baseline:
This gives 14.22% R@5 and 17.88% N@5 over OneChord. Grouped gains compare equally averaged group metrics.
B.4 Efficiency and Parameters
Timing uses NVIDIA A800 80GB PCIe, FP32 without TF32, batch size 256, GPU-resident inputs, and cached candidate vectors. Each model uses its official inference configuration and is measured with six warmed-up full-test CUDA Graph passes; we report median latency. Timed passes include the complete inference path through Top-10 selection. Model loading, host transfer, data preparation, and warmup are excluded. All other measurement settings follow the RELAY protocol. Each model uses its checkpoint trained on the corresponding dataset. Speedup divides baseline time by RELAY time.
We count predictor scalars and embeddings once, excluding tokenizers, training-only components, memory, and caches. RELAY has 2,043,650 parameters (514 for strengths); RPG has 8,514,944 on Sports/Toys and 13,568,384 elsewhere. Parameter reductions are relative to each baseline. Figure 1 averages domain N@5, parameters, and inference seconds, with logarithmic cost.
B.5 Ablation Definitions
Table 3 reports full-catalog results. Memory/channel deletions remove their corresponding corrections. Without exclusion trains with rather than ; both serve with . Separate routing adds a projection and 20 positional biases: 2,109,206 parameters, a 65,556 (3.11%) difference. The quantizer panel changes only the four-code assignments, using the same Sentence-T5/PCA item vectors and training settings for OPQ, RQ-VAE, and residual K-means. The nonnegative rows are single-run controls.
B.6 Multi-Query Extension
With learned queries, RELAY shares the encoder, cross-attention, projection, and strength predictor. Each query performs semantic readout and memory routing; the maximum complete query score ranks each candidate. Table 10 averages six-domain full-test results. Two/four queries improve N@5 by 4.10%/5.08% and long-history N@5 by 3.85%/4.94%, adding 256/768 parameters and 11.28%/33.93% inference time.
(a) Sports
Golf equipment
History
KOR Nava
water bottle
earlier → later


Zepp Golf
swing analyzer
TaylorMade
Project (a)
Target OnCore MA 1.0 golf balls
OneChord
Target rank >10

Srixon
Soft Feel
Cabretta
glove
Srixon
Marathon
RELAY
Target rank #1

OnCore
MA 1.0
SKLZ
net
Srixon
Soft Feel
(b) Beauty
Fragrance series
History
Yacht Man
Blue
earlier → later
Adidas Team
Force
Yacht Man
Red
Target Nautica Classic
OneChord
Target rank #8

Yacht Man
Blue
Yacht Man
Red
RELAY
Target rank #1

Nautica
Classic
Yacht Man
Blue
Halston
1-12
(c) Toys
LEGO themes
History
earlier → later

LEGO Ultra
Sonic Raider

LEGO
Garmatron

LEGO Bug
Obligator
Target LEGO Golden Dragon
OneChord
Target rank #6

Helm's
Deep
9449
Raider
Kai's
Fire Mech
RELAY
Target rank #1

Golden
Dragon
Vermin
Vaporizer
Kai's
Fire Mech
(d) Scientific
Floor-care accessories
History
earlier → later

Oreck Orbiter
cleaner
...

Oreck shampoo
brush
Target Oreck wool pad
OneChord
Target rank #3

Oreck
Orbiter

Oreck
brush
Oreck
wool pad
RELAY
Target rank #2

Oreck
Orbiter

Oreck
wool pad
Oreck
brush
(e) Instruments
Audio production
History
earlier → later

VALinks USB
guitar cable

Korg Volca
Modular bundle

GLS Audio
instrument
cable
Target Behringer UMC1820
OneChord
Target rank >10

Monotron
Delay
Volca
Drum
Novation
MiniNova
RELAY
Target rank #1

Behringer
UMC1820
MPK Mini
MKII
PreSonus
Eris E3.5
(f) Games
Racing peripherals
History
earlier → later

PowerA
Seafoam pad

VEVOR racing
stand

Logitech
Driving Shifter
Target Logitech 6920
OneChord
Target rank #7

Logitech
shifter
T128P
wheel
6923 +
shifter
RELAY
Target rank #1

Logitech
6920
629 +
A10
6920 +
shifter
Figure 5: Full-catalog recommendation cases across six domains.
B.7 Interaction Sparsity
Table 5 pairs validation-selected models. Raw-item frequency counts each training-prefix interaction once; upward-rounded catalog percentiles preserve ties: tail , middle , head . Thresholds are (7, 15) Sports/Beauty, (6, 14) Toys, (7, 14) Scientific, (8, 17) Instruments, and (9, 25) Games. Short/medium/long histories contain interactions. Both partitions cover 280,559 test users; exact-SID metrics average domains equally, and gains use unrounded means.
B.8 Query Routing Intervention
Table 6 changes only memory attention: uniform 1/m, recency proportional to for final position t, or five shuffles of learned weights. Padding stays zero; shuffling preserves weights and normalization. Full-catalog evaluation covers all 280,559 users with equal-domain aggregation and the groups in Section B.7.
B.9 Record-exclusion Diagnostics
Figure 4 compares matched models over 52 shared epochs. The final panel removes each training record’s own transition at the selected checkpoint, grouping N@5 changes by that transition’s remaining frequency.
C Illustrated Recommendation Cases
Figure 5 shows full-catalog Top-3 recommendations with histories of up to 20 interactions. Each displayed item has a unique SID. RELAY ranks the target first in five domains and second in Scientific; OneChord ranks it > 10, 8, 6, 3, > 10, and 7 in Sports, Beauty, Toys, Scientific, Instruments, and Games. Histories are shortened for display.
In Beauty, OneChord's Top-3 stays within Yacht Man fragrances, while RELAY ranks Nautica Classic first. In Toys, RELAY places Golden Dragon ahead of other LEGO sets, distinguishing the exact continuation within the same theme.
Equipment histories lead to golf balls, an audio interface, and a racing wheel. In Scientific, RELAY places the target wool pad ahead of the brush.