Paper deep dive
TopoGR: Revealing and Preserving Latent Structure of Semantic ID in Generative Recommendation
Ziyu Zheng, Zhengshun Du, Yaming Yang, Bin Tong, Guan Wang, Meng Yan, Ziyu Guan, Wei Zhao
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 91%
Last extracted: 8/1/2026, 11:25:43 AM
Summary
The paper introduces TopoGR, a topology-preserving generative recommendation framework that addresses the structural mismatch between semantic ID (SID) tokenization and generation. It proposes Bit-decomposable Semantic IDs (Binary SIDs) to expose explicit Hamming geometry, allowing the model to capture item relatedness beyond exact SID overlap through binary SID features, Hamming-aware supervision, and Hamming-consistent reranking.
Entities (7)
Relation Signals (6)
TopoGR → uses → Binary SID
confidence 95% · TopoGR, a topology-preserving generative recommendation framework based on Bit-decomposable Semantic ID(Binary SID).
Bit-Decomposable Quantizer (BDQ) → produces → Binary SID
confidence 93% · BDQ produces both the standard integer SID sequence... and its binary form
TopoGR → addresses → structural mismatch
confidence 92% · We identify a structural mismatch between tokenization and generation... To address this issue, we propose TopoGR
Binary SID → exposes → Hamming geometry
confidence 90% · Each Binary SID is learned in a bit-decomposable form... while exposing an explicit Hamming geometry.
Semantic ID (SID) → isoverlookedby → existing generative recommendation methods
confidence 88% · existing methods typically regard SIDs as independent discrete symbols, while often overlooking the topology of the learned semantic ID space.
TopoGR → outperforms → existing state-of-the-art baselines
confidence 85% · Experiments on four benchmark datasets show that TopoGR consistently outperforms existing state-of-the-art baselines
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Semantic ID-based generative recommendation tokenizes each item into a sequence of discrete semantic IDs and predicts the next item by generating semantic IDs. However, existing methods typically regard SIDs as independent discrete symbols, while often overlooking the topology of the learned semantic ID space. We identify a structural mismatch between tokenization and generation: the tokenizer learns a structured code space with semantic neighborhood relations, whereas the generator consumes semantic ID tokens as independent categorical symbols. Consequently, item relatedness is reduced to exact semantic ID overlap, making it difficult to identify semantically similar items whose semantic IDs do not overlap. To address this issue, we propose TopoGR, a topology-preserving generative recommendation framework based on Bit-decomposable Semantic ID(Binary SID). Each Binary SID is learned in a bit-decomposable form and can be deterministically converted to a standard integer SID, while exposing an explicit Hamming geometry. TopoGR exploits this topology at three stages: binary SID features preserve Hamming proximity at the input layer; Hamming soft targets inject topology-aware supervision; and Hamming-consistent reranking aligns candidate items with the predicted binary prototype during inference. We further verify that the Hamming topology can capture item relatedness beyond exact SID matching. Experiments on four benchmark datasets show that TopoGR consistently outperforms existing state-of-the-art baselines in recommendation performance.
Tags
Links
- Source: https://arxiv.org/abs/2607.25216v1
- Canonical: https://arxiv.org/abs/2607.25216v1
Trouble viewing inline? Open PDF directly →
Full Text
76,416 characters extracted from source content.
Expand or collapse full text
TopoGR: Revealing and Preserving Latent Structure of Semantic ID in Generative Recommendation Ziyu Zheng https://orcid.org/0009-0000-3662-0832 Xidian University,Xi’anChina zhengziyu@stu.xidian.edu.cn , Zhengshun Du AlibabaBeijingChina duzhengshun.dzs@alibaba-inc.com , Yaming Yang https://orcid.org/0000-0002-8186-0648 Xidian University,Xi’anChina yym@xidian.edu.cn , Bin Tong AlibabaBeijingChina tongbin.tb@alibaba-inc.com , Guan Wang AlibabaBeijingChina shangfeng.wg@taobao.com , Meng Yan University of Science and Technology of ChinaHefeiChina 0000-0001-8478-4823 mengyan917@ustc.edu.cn , Ziyu Guan https://orcid.org/0000-0003-2413-4698 Xidian University,Xi’anChina zyguan@xidian.edu.cn and Wei Zhao https://orcid.org/0000-0002-9767-1323 Xidian University,Xi’anChina ywzhao@mail.xidian.edu.cn (2018) Abstract. Semantic ID-based generative recommendation tokenizes each item into a sequence of discrete semantic IDs and predicts the next item by generating semantic IDs. However, existing methods typically regard SIDs as independent discrete symbols, while often overlooking the topology of the learned semantic ID space. We identify a structural mismatch between tokenization and generation: the tokenizer learns a structured code space with semantic neighborhood relations, whereas the generator consumes semantic ID tokens as independent categorical symbols. Consequently, item relatedness is reduced to exact semantic ID overlap, making it difficult to identify semantically similar items whose semantic IDs do not overlap. To address this issue, we propose TopoGR, a topology-preserving generative recommendation framework based on Bit-decomposable Semantic ID(Binary SID). Each Binary SID is learned in a bit-decomposable form and can be deterministically converted to a standard integer SID, while exposing an explicit Hamming geometry. TopoGR exploits this topology at three stages: binary SID features preserve Hamming proximity at the input layer; Hamming soft targets inject topology-aware supervision; and Hamming-consistent reranking aligns candidate items with the predicted binary prototype during inference. We further verify that the Hamming topology can capture item relatedness beyond exact SID matching. Experiments on four benchmark datasets show that TopoGR consistently outperforms existing state-of-the-art baselines in recommendation performance. †copyright: acmlicensed†journalyear: 2018†doi: X.X†conference: Make sure to enter the correct conference title from your rights confirmation email; June 03–05, 2018; Woodstock, NY†isbn: 978-1-4503-X-X/2018/06†ccs: Information systems Recommender systems 1. Introduction Generative recommendation (GR) has recently emerged as a promising paradigm for next-item prediction (Deldjoo et al., 2024; Li et al., 2024). Rather than ranking items in the full ID space (Fang et al., 2020), GR represents each item with a sequence of discrete semantic IDs (SIDs) and casts recommendation as SID sequence generation. As illustrated in Figure 1, the GR pipeline is typically composed of two stages. The first stage is tokenization, which converts pretrained item semantic representations into discrete codeword sequences, usually via vector quantization (Lee et al., 2022; Ge et al., 2013; Jegou et al., 2010; Deng et al., 2025). Each item is therefore assigned a SID sequence as its generative identifier. The second stage is generation, where a sequential recommender (Wolf et al., 2020; Vaswani et al., 2017) takes the user’s interaction history as input and autoregressively predicts the SID sequence of the next item. By operating over a compact semantic token space, GR improves modeling flexibility and provides a discrete interface for incorporating item semantics into recommendation. Figure 1. Structural mismatch between SID tokenization and generation. While the tokenizer preserves latent proximity among SID codes (e.g., 38 is closer to 36 than 72), integer SID lookup maps non-identical codes to independent categorical embeddings, treating both 38 and 72 as mismatches to 36 and discarding their relative proximity. Although SIDs serve as the interface between item semantics and generative models, existing GR methods (Rajput et al., 2023; Hou et al., 2025; Wei et al., 2026) typically regard them as discrete sequences and overlook the structure within the SID space. Our analysis shows that the learned codebooks are not merely collections of independent categorical symbols, but preserve structures inherited from the original semantic space. Figure 2 compares the similarity structure before and after SIDs enter the generation side, with optimized product quantization(OPQ) (Ge et al., 2013) used as a representative tokenizer. On the tokenization side, codeword similarities exhibit clear off-diagonal correlations, indicating latent semantic proximity among different SIDs. In contrast, on the generation side, integer SIDs are mapped to independent trainable embeddings as item inputs, whose similarity pattern is weakly structured and not explicitly aligned with the tokenizer-induced topology. This contrast indicates that the structural information encoded by the tokenizer is not explicitly exposed during generation. (a) Tokenization (b) Generation Figure 2. Codeword similarity heatmaps for the tokenization and generation stages by OPQ tokenizer. Additional analyses for RQ-KMeans and RQ-VAE are provided in the Appendix. This structural loss is especially problematic for item-level matching. Exact SID overlap captures only a coarse form of semantic relatedness: two items sharing SID tokens are likely to be related, but the converse does not necessarily hold. Semantically close items may fall into neighboring yet distinct codeword regions and therefore receive non-overlapping SIDs. Thus, item relatedness is determined not only by shared SID tokens, but also by the latent proximity among different codewords. As illustrated in Figure 1, in the tokenizer-induced latent space, two non-identical SID codes may still be close to each other, indicating that they encode similar semantic factors. However, under exact integer-token matching, all non-identical codes are simply treated as mismatches. Once these codes are mapped to independent lookup embeddings in the generator, their relative proximity is no longer explicitly preserved. Consequently, a code that is close to the target in the tokenizer’s latent space and a code that is far away become indistinguishable from the perspective of exact SID matching. We refer to this problem as the structural mismatch between tokenization and generation, which hinders GR models from exploiting the latent topology of the SID space and from generalizing to semantically similar items with non-overlapping SIDs. The above observations suggest that the key challenge in GR is not only how to assign discrete SIDs to items, but also how to preserve the structural information learned during tokenization when these SIDs are consumed by the generator. Ideally, SID tokens should retain the efficiency and compatibility of discrete indices while exposing their latent structural relations to the recommender. Such a representation would allow the model to go beyond exact SID overlap and capture semantic relatedness between items whose SIDs are different but structurally close. To address this structural mismatch, we propose TopoGR, a topology-preserving generative recommendation framework built upon Bit-decomposable Semantic IDs (Binary SIDs). Instead of treating each SID token as an opaque categorical label, Binary SID decomposes each token into a deterministic binary code. This representation remains fully compatible with the conventional integer SID format used for target generation, while inducing an explicit hamming geometry over the resulting binary codes. As a result, non-identical SID tokens can still be partially related through shared binary factors, providing a finer-grained notion of similarity beyond exact token overlap. Built on Binary SIDs, TopoGR makes the SID topology available throughout the generation process. At the input stage, historical items are represented by binary SID features, allowing the model to directly access structural relations among item SIDs. During training, we introduce Hamming-aware supervision, which assigns softer penalties to predictions closer to the target code in the binary space instead of treating all incorrect codes equally. During inference, we refine the original SID generation scores by measuring the consistency between candidate Binary SIDs and the predicted binary prototype. These components follow a unified principle: the structure learned during tokenization should remain available to guide generation, rather than being discarded after discretization. To summarize, our main contributions are as follows: • We reveal a structural mismatch in current GR methods: the tokenizer learns structured SID codebooks, whereas the generator consumes SID tokens as independent categorical symbols and thus fails to exploit their latent topology. • We propose TopoGR, a topology-preserving GR framework based on Bit-decomposable Semantic IDs, which retain the integer SID format while making Hamming geometry explicit. • We incorporate SID topology into generation through structure aware input, Hamming aware supervision, and Hamming consistent rerank, enabling the model to capture relations between items with non-overlapping but structurally close SIDs. • Extensive experiments on four benchmark datasets show that TopoGR achieves consistent improvements over competitive item ID-based and semantic ID-based recommendation methods. 2. Related Work Discriminative recommendation methods (Ko et al., 2022) formulate item prediction as a ranking problem over a fixed corpus, where each item is assigned an atomic, randomly initialized ID embedding (Kang and McAuley, 2018; Sun et al., 2019). This paradigm suffers from limitations: the sparsity and semantic vacuity of random IDs hinder cold-start generalization and fail to capture semantic relationships among items (Li et al., 2024). Generative recommendation addresses these issues by first encoding item content, such as text, images, or multimodal attributes, into continuous semantic embeddings, and then discretizing them into semantic IDs that reflect high-level semantic features. A generative model then takes the SID sequences of historically interacted items as input and generates the SID of the target item (Rajput et al., 2023; Hou et al., 2025). Early studies, such as TIGER (Rajput et al., 2023), employ RQ-VAE (Lee et al., 2022) for hierarchical quantization and generate SIDs in an autoregressive manner. LETTER (Wang et al., 2024) improves the quality of quantization; LC-Rec (Zheng et al., 2024) aligns the semantic and collaborative spaces through a contrastive loss; OneRec (Deng et al., 2025) unifies retrieval, ranking, and generation within a single architecture; and HSTU (Zhai et al., 2024) demonstrates the scaling laws of generative recommendation models. MHL (Wei et al., 2026) introduces entropy-guided masked history reconstruction and curriculum learning to improve user intent modeling. Recent advances further introduce parallel generation techniques to accelerate inference in generative recommendation: RPG (Hou et al., 2025) enables parallel prediction of long SIDs via graph-based decoding, while LLaDA-Rec (Shi et al., 2025) and DiffGRM (Liu et al., 2026) adopt discrete diffusion for bidirectional SID generation, thereby mitigating error accumulation in autoregressive decoding. However, these integer-SID-based methods independently embed each ID through an embedding table during recommendation. As a result, the relationships between different items are determined only by the number of shared SIDs, while the latent structural dependencies among distinct IDs are largely overlooked. 3. Preliminary 3.1. Problem Formulation Let ℐI denote the item corpus. For a user u, the historical interaction sequence is denoted as u=[v1,v2,…,vT],vt∈ℐS_u=[v_1,v_2,…,v_T], v_t . The goal of next-item recommendation is to predict the next item vT+1v_T+1 conditioned on uS_u: (1) v^T+1=argmaxv∈ℐP(v∣u). v_T+1= _v P(v _u). In semantic ID-based generative recommendation, each item v is represented by a sequence of discrete semantic tokens: (2) SID(v)=v=(sv1,sv2,…,svM),svm∈0,1,…,K−1,SID(v)=s_v=(s_v^1,s_v^2,…,s_v^M), s_v^m∈\0,1,…,K-1\, where M is the number of SID positions and K is the vocabulary size of each position. 3.2. Lookup-Free-Quantization Lookup-Free Quantization (LFQ) (Yu et al., 2024; Mentzer et al., 2024) refers to a family of discrete quantization methods that do not rely on explicit codebook lookup, which replaces explicit codebook lookup with element-wise binary quantization. In conventional vector quantization, a latent vector is assigned to one of K learnable codewords in a codebook ∈ℝK×dC ^K× d. LFQ removes this lookup operation by representing each codeword as a binary vector. Let K=2rK=2^r, where r is the number of bits used to represent one SID token. Given a latent vector ∈ℝrz ^r, LFQ quantizes each dimension independently: (3) q()=sign(l)=+1,l>0,−1,l≤0,l=1,2,…,r.q(z_l)=sign(z_l)= cases+1,&z_l>0,\\ -1,&z_l≤ 0, cases l=1,2,…,r. The resulting binary code is =(b1,b2,…,br)∈−1,+1rb=(b^1,b^2,…,b^r)∈\-1,+1\^r. Since there are 2r2^r possible binary patterns, the binary code b is equivalent to a categorical code from a vocabulary of size K, but without storing an explicit codebook. 4. Methodology Figure 3. Overview of TopoGR. TopoGR first constructs Bit-decomposable Semantic IDs through binary-structured tokenization, then uses Binary SID features as item-level inputs for generative recommendation. During training, Hamming soft targets provide topology-aware supervision, and during inference, Hamming-consistent reranking refines candidate items according to the predicted binary prototype. For illustration, binary codes are shown in 0,1\0,1\, while the model uses sign codes in −1,+1\-1,+1\. To bridge SID tokenization and generation, we propose TopoGR, a topology-preserving framework for generative recommendation, consisting of bit-decomposable item tokenization, binary-feature sequence modeling, and Hamming-aware prediction and reranking, as illustrated in Figure 3. 4.1. Bit-Decomposable Quantizer Semantic ID-based generative recommenders represent each item v by a tuple of discrete codes. Although these codes are learned from item semantic representations, existing quantization methods usually treat them as opaque categorical labels during generation. As a result, the generator can only exploit exact token matching, i.e., whether two items share the same SID code at a position, while the potential relation between different codes is ignored. To preserve the fine-grained structure of the semantic code space, we introduce the Bit-Decomposable Quantizer (BDQ), which constructs topology-aware Semantic IDs for generative recommendation. BDQ follows the lookup-free quantization principle and uses multiple LFQ-style codebooks to organize an item representation into M binary groups. Each group corresponds to one SID position and is quantized into an r-bit binary code, which can be deterministically converted into an integer SID token. Different from vanilla LFQ, BDQ further introduces a bit-compositional reconstruction mechanism, where each SID-position representation is explicitly composed from its bit-level bases. This design ties Hamming proximity to representation similarity and makes the learned binary topology meaningful for recommendation. For each item v, let v∈ℝdxx_v ^d_x denote its continuous semantic representation. BDQ first maps vx_v into an M×rM× r latent representation: (4) v=Encoder(v)∈ℝM×r,Z_v=Encoder(x_v) ^M× r, where M is the number of SID positions and r is the number of bits for each SID token. Following the LFQ principle introduced in Section 3.2, BDQ treats the M groups of vZ_v as M LFQ-style codebooks and quantizes each group into an r-bit binary code: (5) vm=sign(vm),vm∈−1,+1r,m=1,2,…,M.b_v^m=sign(z_v^m), _v^m∈\-1,+1\^r, m=1,2,…,M. The resulting Binary SID is denoted as v=[v1;v2;…;vM]∈−1,+1M×r.B_v=[b_v^1;b_v^2;…;b_v^M]∈\-1,+1\^M× r. Each binary group can be deterministically converted into a conventional integer SID token: (6) svm=∑l=1r[bvm,l>0]⋅2r−l,svm∈0,1,…,2r−1.s_v^m= _l=1^r 1[b_v^m,l>0]· 2^r-l, s_v^m∈\0,1,…,2^r-1\. Thus, BDQ produces both the standard integer SID sequence v=(sv1,…,svM)s_v=(s_v^1,…,s_v^M) and its binary form vB_v. The former keeps compatibility with existing SID-based generative recommendation, while the latter exposes the Hamming geometry used by TopoGR. Bit-compositional Reconstruction. Although the above quantization follows the LFQ-style binary coding process, simply obtaining binary codes does not guarantee that their Hamming distance is semantically meaningful. To explicitly connect bit-level similarity with representation similarity, BDQ introduces a bit-compositional reconstruction mechanism. For the m-th SID position, we maintain learnable base embeddings m,ll=1r\a_m,l\_l=1^r, where m,l∈ℝdba_m,l ^d_b. Given the binary code vmb_v^m, the representation of this SID position is composed as: (7) vm=∑l=1rbvm,lm,l.g_v^m= _l=1^rb_v^m,la_m,l. Stacking all SID-position representations gives v=[v1;v2;…;vM]G_v=[g_v^1;g_v^2;…;g_v^M]. This additive bit-basis formulation ties Hamming proximity to representation similarity: two codes with a small Hamming distance share most bit bases in reconstruction, and are therefore encouraged to preserve similar semantic information. Tokenizer Training Objective. Since the sign operation is non-differentiable, we optimize BDQ with the straight-through estimator (Bengio et al., 2013). In the forward pass, the discrete binary code vB_v is used to compose SID-position representations through the bit bases; in the backward pass, gradients are passed through the continuous latent representation vZ_v. Following the bit-compositional reconstruction defined above, the tokenizer reconstructs the original item representation as (8) ^v=Decoder(v), x_v=Decoder (G_v ), The reconstruction objective is: (9) ℒrecon=1|ℬ|∑v∈ℬℓrecon(^v,v),L_recon= 1|B| _v _recon( x_v,x_v), where ℬB is a mini-batch and ℓrecon(⋅) _recon(·) can be instantiated as cosine distance or mean squared error. To avoid code collapse and encourage balanced code utilization, we additionally adopt the standard entropy auxiliary loss from LFQ: (10) ℒent=1M∑m=1M[v∈ℬH(pv,m)−H(v∈ℬpv,m)],L_ent= 1M _m=1^M [E_v H(p_v,m)-H (E_v p_v,m ) ], where pv,mp_v,m denotes the LFQ soft assignment distribution of the m-th binary group over the implicit binary codebook. The first term encourages confident per-item assignments, while the second term encourages diverse code usage at the batch level. Please see Appendix A.3 for more specific details. The tokenizer objective is: (11) ℒtok=ℒrecon+λentℒent.L_tok=L_recon+ _entL_ent. After training, each item is assigned both a integer SID vs_v and its corresponding Binary SID vB_v. The integer form is used as the generation target, while the binary form is used as structured input and for Hamming-aware training and inference. Why Hamming Geometry Works. The learned Binary SID naturally defines a Hamming distance over items: (12) dH(Bu,Bv)=∑m=1M∑l=1r[bum,l≠bvm,l].d_H(B_u,B_v)= _m=1^M _l=1^r1[b_u^m,l≠ b_v^m,l]. This distance is meaningful because Binary SID is learned through the bit-compositional reconstruction in Eq. (7), rather than assigned as arbitrary binary strings. For two items u and v, identical bits contribute the same learnable basis components, while only different bits change the reconstructed representation: (13) um−vm=∑l:bum,l≠bvm,l(bum,l−bvm,l)m,l.g_u^m-g_v^m= _l:b_u^m,l≠ b_v^m,l(b_u^m,l-b_v^m,l)a_m,l. Thus, Hamming distance counts how many learned basis components are changed between two Binary SID. Since the tokenizer reconstructs item representations from these bit-basis compositions, the learned Hamming geometry is tied to the reconstruction structure and can capture item relatedness beyond exact SID matching. A more detailed derivation is provided in Appendix C. 4.2. Binary Feature Input for Generative Recommendation After obtaining Bit-decomposable Semantic IDs, existing SID-based generators usually map each integer SID token to a learnable embedding and aggregate the embeddings across SID positions as the item representation. However, this converts structured SID codes into independent categorical embeddings, making the tokenizer-induced topology implicit and leaving the generator to relearn such relations from recommendation signals. TopoGR instead directly feeds the binary structure exposed by BDQ into the sequence model. For an item v, we concatenate the binary codes of all SID positions and use the resulting Binary SID as its item-level input feature. In this way, the input representation is no longer an aggregation of independent SID token embeddings, but an explicit binary encoding of the tokenizer-induced structure. The generator can therefore observe which bits are shared or different between items, making the Hamming topology directly available from the input layer. Formally, for each item v, we flatten its Binary SID into a vector before feeding it into the sequence model. For padding items, we use an all-zero vector and mask them out in attention. Given a user behavior sequence Su=[v1,v2,…,vT]S_u=[v_1,v_2,…,v_T], the input sequence is constructed as: (14) u=[v1,v2,…,vT]∈ℝT×d,X_u=[B_v_1,B_v_2,…,B_v_T] ^T× d, where d=Mrd=Mr. The sequence is then fed into a causal Transformer decoder (Radford et al., 2019): (15) u=CausalDecoder(u).H_u=CausalDecoder(X_u). This design keeps each historical item as one timestep in the user sequence, while replacing token-embedding aggregation with explicit binary SID features. As a result, TopoGR preserves the original item-level sequential modeling form and directly exposes the tokenizer-induced bit-level structure to the generator. For two items u and v, their Binary SIDs satisfy (16) ⟨u,v⟩F=Mr−2dH(u,v), _u,B_v _F=Mr-2d_H(B_u,B_v), where ⟨⋅,⋅⟩F ·,· _F denotes the Frobenius inner product. Thus, before any learned transformation, Hamming-close items are already close in the input space, whereas this structural relation would be lost if SID tokens were first mapped to independent embedding vectors. 4.3. Parallel SID Prediction Autoregressive SID generation predicts the tokens of the next item one by one, which couples the inference cost with the SID length. Following recent parallel SID generation methods, we instead formulate next-item generation as a multi-token prediction problem (Gloeckle et al., 2024): given the user sequence representation, the model predicts all SID positions of the next item simultaneously. Given the binary feature sequence, the decoder produces contextualized hidden states =[1,…,t]H=[h_1,…,h_t]. Following parallel SID generation methods, we predict all SID positions of the next item simultaneously. For each prediction position t, the hidden state th_t is used to predict the SID of the next item vt+1v_t+1. For each SID position m, an independent projection head maps the sequence representation th_t to a position-specific prediction state tmo_t^m. The prediction probability over codes at position m is computed by matching tmo^m_t with the corresponding code: (17) Pm(k∣u,≤t)=exp(sim(tm,km)/τ)∑j=0K−1exp(sim(tm,jm)/τ),P_m(k _u,≤ t)= (sim(o_t^m,e_k^m)/τ ) _j=0^K-1 (sim(o_t^m,e_j^m)/τ ), where kme_k^m is the embedding of the k-th code at the m-th SID position, and τ is the temperature. We keep a standard categorical prediction head over integer SID tokens to maintain compatibility with existing generative recommendation objectives. Under the standard conditional independence assumption over SID positions, the next-SID likelihood is factorized as: (18) P(vt+1∣u,≤t)=∏m=1MPm(svt+1m∣u,≤t).P(s_v_t+1 _u,≤ t)= _m=1^MP_m(s_v_t+1^m _u,≤ t). The multi-token prediction loss is then (19) ℒMTP=−1M∑m=1MlogPm(svt+1m∣u,≤t),L_MTP=- 1M _m=1^M P_m(s_v_t+1^m _u,≤ t), where svt+1ms_v_t+1^m is the ground-truth codeword index at the m-th position. This prediction module keeps the standard semantic-token supervision used in generative recommendation. The difference is that these integer targets are derived from bit-decomposable Semantic IDs, whose binary structure will be further exploited by the Hamming-aware objectives and decoding strategy introduced next. 4.4. Hamming Soft Targets The multi-token cross-entropy loss treats the target SID code as a one-hot label. For a ground-truth code y, all incorrect codes k≠yk≠ y are penalized equally, regardless of whether k differs from y by one bit or by many bits. This is inconsistent with the bit-decomposable SID space, where Hamming-neighbor codes share more binary factors and should be considered closer semantic alternatives. To inject this topology into supervision, we construct a Hamming-aware soft target distribution for each local SID code. Since K=2rK=2^r, every integer code k∈0,…,K−1k∈\0,…,K-1\ has a deterministic sign-bit representation k∈−1,+1rc_k∈\-1,+1\^r. We pre-compute a code-level Hamming distance table: (20) i,j=dH(ci,cj)=∑l=1r[cil≠cjl],i,j∈0,…,K−1.D_i,j=d_H(c_i,c_j)= _l=1^r 1[c_i^l≠ c_j^l], i,j∈\0,…,K-1\. This table is shared by all SID positions. For a ground-truth code y=svt+1my=s_v_t+1^m, we define the Hamming soft target over candidate codes as (21) qy(k)=exp(−y,k/τH)∑j=0K−1exp(−y,j/τH),k=0,…,K−1,q_y(k)= (-D_y,k/ _H ) _j=0^K-1 (-D_y,j/ _H ), k=0,…,K-1, where τH _H is the Hamming temperature. A smaller τH _H makes qyq_y close to a one-hot label, while a larger τH _H assigns more probability mass to Hamming-neighbor codes. Given the predicted distribution Pm(⋅∣u,≤t)P_m(· _u,≤ t), we minimize the KL divergence from the Hamming soft target to the model prediction: (22) ℒHam=1M∑m=1MKL(qsvt+1m(⋅)∥Pm(⋅∣u,≤t)).L_Ham= 1M _m=1^MKL (q_s_v_t+1^m(·)\,\|\,P_m(· _u,≤ t) ). The final training objective is: (23) ℒrec=ℒMTP+λHamℒHam.L_rec=L_MTP+ _HamL_Ham. The MTP term preserves exact SID prediction, while the Hamming soft target provides graded supervision among non-target codes. Therefore, predictions close to the ground-truth code in the binary space are encouraged more than far-away codes, enabling the generator to learn the local topology of the Binary SID space instead of relying only on hard token matching. 4.5. Inference with Hamming-Consistent Reranking Inference first converts the parallel token predictions into item-level scores by gathering the log-probabilities of each candidate item’s SID tokens. For a candidate item v with SID v=(sv1,…,svM)s_v=(s_v^1,…,s_v^M), the original score is computed by gathering the corresponding token log-probabilities and averaging them across SID positions: (24) Scoreori(v∣u)=1M∑m=1MlogPm(svm∣u).Score_ori(v _u)= 1M _m=1^M P_m(s_v^m _u). This score can be efficiently computed for all items through a vectorized gather operation over the pre-computed item-SID table. We first select the top-P items according to ScoreoriScore_ori as the candidate pool PC_P. Although ScoreoriScore_ori evaluates the likelihood of each integer SID code, it still relies on exact code matching. To further exploit the binary topology, we construct a predicted full-SID prototype from the model’s output distributions. For each SID position m, let k∈−1,+1rc_k∈\-1,+1\^r denote the sign-bit representation of code k. The expected sign vector at position m is: (25) ¯m=∑k=0K−1Pm(k|u)k, b^m= _k=0^K-1P_m(k|S_u)c_k, where ¯m∈[−1,1]r b^m∈[-1,1]^r is a soft binary prototype. Concatenating all positions yields the predicted full-SID prototype ¯=[¯1;¯2;…;¯M]∈ℝM×r B=[ b^1; b^2;…; b^M] ^M× r. For each candidate v∈Pv _P, let v∈−1,+1M×rB_v∈\-1,+1\^M× r be its Binary SID. We measure its consistency with the predicted prototype by normalized sign similarity: (26) Simpred(v)=1Mr∑m=1M∑l=1r¯m,lvm,l.Sim_pred(v)= 1Mr _m=1^M _l=1^r b^m,lb_v^m,l. This similarity favors candidates whose Binary SIDs are close to the model’s expected binary pattern, providing a Hamming-aware correction to the original token likelihood score. The final reranking score is computed as: (27) Score(v∣u)=Scoreori(v∣u)+αSimpred(v),Score(v _u)=Score_ori(v _u)+ _pred(v), where α controls the strength of the Hamming-consistent correction. Finally, we return the top-k items according to Score(v∣u)Score(v _u). This decoding procedure keeps the efficient gather-and-rank paradigm of parallel SID generation. The additional reranking only operates on a small candidate pool and does not require autoregressive beam search. By using the predicted Binary SID prototype, the decoder exploits fine-grained Hamming structure among SIDs instead of relying solely on exact integer-code likelihood. 5. Experiment Table 1. Top-K recommendation performance on four datasets. The best and second-best results are highlighted in bold and underlined, respectively. Model Beauty Sports and Outdoors Toys and Games CDs and Vinyl R@5 N@5 R@10 N@10 R@5 N@5 R@10 N@10 R@5 N@5 R@10 N@10 R@5 N@5 R@10 N@10 Item ID-based Caser 0.0205 0.0131 0.0347 0.0176 0.0116 0.0072 0.0194 0.0097 0.0166 0.0107 0.0270 0.0141 0.0116 0.0073 0.0205 0.0101 GRU4Rec 0.0164 0.0099 0.0283 0.0137 0.0129 0.0086 0.0204 0.0110 0.0097 0.0059 0.0176 0.0084 0.0195 0.0120 0.0353 0.0171 HGN 0.0325 0.0206 0.0512 0.0266 0.0189 0.0120 0.0313 0.0159 0.0321 0.0221 0.0497 0.0277 0.0259 0.0153 0.0467 0.0220 BERT4Rec 0.0203 0.0124 0.0347 0.0170 0.0115 0.0075 0.0191 0.0099 0.0116 0.0071 0.0203 0.0099 0.0326 0.0201 0.0547 0.0271 SASRec 0.0387 0.0249 0.0605 0.0318 0.0233 0.0154 0.0350 0.0192 0.0463 0.0306 0.0675 0.0374 0.0351 0.0177 0.0619 0.0263 FDSA 0.0267 0.0163 0.0407 0.0208 0.0182 0.0122 0.0288 0.0156 0.0228 0.0140 0.0381 0.0189 0.0226 0.0137 0.0378 0.0186 S3-Rec 0.0387 0.0244 0.0647 0.0327 0.0251 0.0161 0.0385 0.0204 0.0443 0.0294 0.0700 0.0376 0.0213 0.0130 0.0375 0.0182 Semantic ID-based RecJPQ 0.0311 0.0167 0.0482 0.0222 0.0141 0.0076 0.0220 0.0102 0.0331 0.0182 0.0484 0.0231 0.0075 0.0046 0.0138 0.0066 VQ-Rec 0.0457 0.0317 0.0664 0.0383 0.0208 0.0144 0.0300 0.0173 0.0497 0.0346 0.0737 0.0423 0.0352 0.0238 0.0520 0.0292 HSTU 0.0469 0.0314 0.0704 0.0389 0.0258 0.0165 0.0414 0.0215 0.0433 0.0281 0.0669 0.0357 0.0417 0.0275 0.0638 0.0346 TIGER 0.0454 0.0321 0.0648 0.0384 0.0264 0.0181 0.0400 0.0225 0.0521 0.0371 0.0712 0.0432 0.0492 0.0329 0.0748 0.0411 RPG 0.0550 0.0381 0.0809 0.0464 0.0314 0.0216 0.0463 0.0263 0.0592 0.0401 0.0869 0.0490 0.0498 0.0338 0.0735 0.0415 MHL 0.0574 0.0424 0.0795 0.0495 0.0359 0.0249 0.0511 0.0298 0.0672 0.0489 0.0903 0.0564 0.0488 0.0337 0.0701 0.0405 DiffGRM 0.0603 0.0414 0.0876 0.0502 0.0363 0.0245 0.0550 0.0305 0.0618 0.0455 0.0834 0.0524 0.0348 0.0228 0.0550 0.0293 TopoGR 0.0620 0.0439 0.0883 0.0522 0.0374 0.0258 0.0554 0.0314 0.0712 0.0497 0.0995 0.0588 0.0531 0.0364 0.0783 0.0445 To evaluate the effectiveness of TopoGR and validate our hypothesis that preserving SID topology benefits generative recommendation, we aim to answer the following research questions: • RQ1(Performance): How does TopoGR perform compared with state-of-the-art recommendation baselines? • RQ2(Effectiveness of Binary SID): Does BDQ provide a more useful binary SID structure than conventional quantization or random binary assignment? • RQ3(Impact of Topology-aware Modeling): Do binary feature input, Hamming soft targets, and Hamming-consistent reranking effectively improve generative recommendation? • RQ4(Role of Hamming Geometry): Does Hamming proximity capture item relatedness beyond exact SID overlap, and does this topology help generalize to sparse or cold-start items? 5.1. Experimental Settings Datasets. We evaluate our model on four categories from the Amazon Review dataset (McAuley et al., 2015): Sports & Outdoors (Sports), Beauty, Toys & Games (Toys), and CDs & Vinyl (CDs). Following prior work (Hou et al., 2025; Zheng et al., 2024; Rajput et al., 2023), user reviews are treated as interactions and chronologically ordered to form interaction sequences. For item metadata, we concatenate title, brand, category, and description into natural language sentences to enable semantic representation learning. Appendix A.1 summarizes the statistics of all four datasets. Baselines. We evaluate TopoGR against both item ID-based and semantic ID-based recommendation baselines. Specifically, the item ID-based methods include Caser (Tang and Wang, 2018), GRU4Rec (Hidasi et al., 2015), HGN (Ma et al., 2019), BERT4Rec (Sun et al., 2019), SASRec (Kang and McAuley, 2018), FDSA (Zhang et al., 2019), and S³-Rec (Zhou et al., 2020), while the semantic ID-based methods include RecJPQ (Petrov and Macdonald, 2024), VQ-Rec (Hou et al., 2023), HSTU (Zhai et al., 2024), TIGER (Rajput et al., 2023), RPG (Hou et al., 2025), MHL (Wei et al., 2026), and DiffGRM (Liu et al., 2026). Evaluation Protocol. We adopt the standard leave-one-out evaluation scheme (Rajput et al., 2023; Hou et al., 2025). Recommendation performance is measured by two widely used ranking metrics: Recall@K and Normalized Discounted Cumulative Gain (NDCG@K), with K∈5,10K∈\5,10\. All results are reported based on the best validation performance. Implementation Details. We use Sentence-T5-base (Ni et al., 2022) to encode item metadata and obtain 768-dimensional item embeddings, which are then reduced to 256 dimensions via PCA. The decoder adopts the same architecture as (Hou et al., 2025). Specifically, the hidden dimension is set to the product of the bit number and the SID length. We use a 2-layer Transformer decoder. The feed-forward dimension is set to 1024, and the number of attention heads is set to 4. The size of the candidate pool is set to 1000. We set the number of bits to 8, yielding an integer ID range from 0 to 255 for each SID position. For hyperparameter tuning, we search the learning rate in 0.01,0.003,0.001,0.0005\0.01,0.003,0.001,0.0005\ and the SID length in 8,16,32,64,128\8,16,32,64,128\. The weights of both the Hamming Soft Targets loss and the Hamming-aware correction score during inference are tuned from 0 to 1.0 with an interval of 0.1. For detailed hyperparameter experiments, please refer to Appendix B.3. For baseline results, we adopt the reported numbers from (Rajput et al., 2023). For all other datasets and baseline models, we reproduce the results using the official implementations or the RecBole (Zhao et al., 2021) to ensure fair comparison. All experiments were conducted on a single NVIDIA H20 GPU with 96GB memory. 5.2. Performance Comparison(RQ1) Table 1 presents the overall performance on four datasets. TopoGR achieves the best results across all datasets and metrics. Compared with RPG, which also adopts a parallel SID generation framework, TopoGR consistently improves performance by replacing the conventional SID-token embedding table with Binary SID features. The gains are especially clear on Toys and Sports: on Toys, our method improves N@5 by about 24%24\% over RPG; on Sports, it improves N@5 by around 19%19\%. These results indicate that the performance gain mainly comes from making the bit-level structure of SIDs visible to the generator, rather than from changes in the decoding framework. Moreover, TopoGR outperforms recent state-of-the-art generative recommendation models such as MHL and DiffGRM without requiring additional masked reconstruction or diffusion-style generation. This suggests that explicitly preserving the internal geometry of Semantic IDs can provide a strong and lightweight alternative to more complex generation objectives. The consistent improvements on both small item corpora such as Beauty and Toys and the larger CDs dataset further show that the proposed topology-preserving design is robust under different item-space scales. Figure 4. Ablation study on Binary SID. Figure 5. Component ablation study. 5.3. Ablation Study We conduct ablation studies to examine whether the improvements of TopoGR come from the proposed topology-preserving design. Binary SID construction(RQ2). Figure 4 compares different ways of introducing binary structures into semantic IDs. OPQ+Binary consistently improves over OPQ, showing that exposing a binary form of SID tokens can benefit the generator. However, its performance is still lower than BDQ+Binary, which directly learns bit-decomposable codes during tokenization. This suggests that the binary structure is more effective when it is aligned with the quantization process, rather than imposed after discrete indices have been produced. In contrast, Random+Binary is consistently inferior to topology-aware binary constructions, indicating that the improvement comes from meaningful binary topology rather than the binary representation itself. Model components(RQ3). Figure 5 further studies the contribution of the main components in TopoGR. Removing any component leads to a consistent performance drop across datasets. The variant without BE shows that the basis embedding used in tokenization contributes to learning better binary-structured SIDs. The degradation of w/o HST indicates that treating all non-target codes equally is suboptimal; Hamming-aware supervision provides graded training signals by assigning higher tolerance to codes that are closer to the target in the binary space. The drop caused by removing HCR indicates that the predicted binary prototype provides useful information for reranking. Overall, the full model achieves the best results, demonstrating that the proposed components are complementary in preserving and exploiting SID topology. 5.4. Further Analysis(RQ4) Effectiveness of Hamming Proximity. We further investigate whether the Hamming geometry of Binary SIDs captures item relatedness beyond exact SID overlap. To isolate the effect of Hamming proximity, we control the maximum integer SID overlap between the target item and the user’s historical items. For each test instance, we compute the number of shared integer SID tokens between the target item and each historical item, and group the instance by the maximum overlap count. Buckets 0–4 contain instances with exactly the corresponding maximum overlap, while the ≥5≥ 5 bucket collects high-overlap cases. Within each bucket, we compare instances whose closest maximum-overlap historical items are Hamming-close or Hamming-far from the target item. The detailed grouping procedure is described in Appendix B.4. Table 2 reports the controlled comparison. Under the same integer SID overlap, Hamming-close pairs consistently obtain higher NDCG@10 than Hamming-far pairs on both Toys and Beauty. The Close/Far ratio ranges from 1.99× to 6.22×. Notably, even when the integer SID overlap is zero, the Hamming-close group outperforms the Hamming-far group by 3.06× on Toys and 3.37× on Beauty. This verifies that Hamming proximity provides additional semantic signals that cannot be captured by exact SID matching alone. Figure 6 provides a finer-grained view by sorting pairs within each overlap bucket according to their average Hamming distance. Across most overlap buckets, NDCG@10 decreases as the Hamming decile increases, indicating that items with closer binary codes are more likely to be relevant even when their integer SID overlap is fixed. These results support our central motivation: Binary SIDs expose meaningful topology among non-identical SID tokens. This topology explains why Hamming-aware supervision and Hamming-consistent decoding can improve generative recommendation beyond overlap-based SID matching. Appendix B.2 further validates this observation through content-similarity analysis under integer and Binary SID overlap. Table 2. Comparison of Hamming-close and Hamming-far groups under the same SID overlap count on NDCG@10. Overlap Toy Beauty Close Far Ratio Close Far Ratio 0 0.0338 0.0110 3.06× 0.0305 0.0091 3.37× 1 0.0496 0.0122 4.06× 0.0453 0.0152 2.98× 2 0.1007 0.0270 3.73× 0.0991 0.0226 4.38× 3 0.1958 0.0315 6.22× 0.1193 0.0423 2.82× 4 0.2085 0.0821 2.54× 0.1457 0.0732 1.99× ≥5≥ 5 0.3915 0.1476 2.65× 0.2948 0.1375 2.14× (a) Beauty (b) Toy Figure 6. Effect of Hamming distance at fixed SID-overlap. Cold-Start Recommendation. We evaluate cold-start performance by grouping test cases according to the frequency of target items in the training set. As shown in Figure 7, TopoGR consistently outperforms RPG across all buckets on Beauty, Toys, and Sports, with larger gains on low-frequency items where item-specific supervision is limited. These results show that preserving SID topology improves generalization to sparse items. Unlike conventional SID-based generators that mainly rely on exact token overlap, TopoGR exploits Hamming proximity between different Binary SID codes, enabling low-frequency items to benefit from semantically related neighbors in the binary SID space. Figure 7. Cold-start recommendation performance. 6. Conclusion In this paper, we reveal a structural mismatch in semantic ID-based generative recommendation, where structured SID spaces learned by tokenizers are reduced to independent categorical tokens in generators. We propose TopoGR with Bit-decomposable Semantic IDs, which preserve the standard integer SID format while exposing Hamming geometry. TopoGR exploits this topology through binary input representation, Hamming-aware supervision, and Hamming-consistent reranking. Experiments on four datasets show consistent improvements over strong baselines. Ablation and further analyses confirm that preserving SID topology provides useful signals beyond exact SID overlap, especially for sparse and cold-start items. References Y. Bengio, N. Léonard, and A. Courville (2013) Estimating or propagating gradients through stochastic neurons for conditional computation. External Links: 1308.3432, Link Cited by: §4.1. Y. Deldjoo, Z. He, J. McAuley, A. Korikov, S. Sanner, A. Ramisa, R. Vidal, M. Sathiamoorthy, A. Kasirzadeh, and S. Milano (2024) A review of modern recommender systems using generative models (gen-recsys). In Proceedings of the 30th ACM SIGKDD conference on Knowledge Discovery and Data Mining, p. 6448–6458. Cited by: §1. J. Deng, S. Wang, K. Cai, L. Ren, Q. Hu, W. Ding, Q. Luo, and G. Zhou (2025) Onerec: unifying retrieve and rank with generative recommender and iterative preference alignment. arXiv preprint arXiv:2502.18965. Cited by: §1, §2. H. Fang, D. Zhang, Y. Shu, and G. Guo (2020) Deep learning for sequential recommendation: algorithms, influential factors, and evaluations. ACM Transactions on Information Systems (TOIS) 39 (1), p. 1–42. Cited by: §1. T. Ge, K. He, Q. Ke, and J. Sun (2013) Optimized product quantization. IEEE transactions on pattern analysis and machine intelligence 36 (4), p. 744–755. Cited by: §1, §1. F. Gloeckle, B. Y. Idrissi, B. Rozière, D. Lopez-Paz, and G. Synnaeve (2024) Better & faster large language models via multi-token prediction. arXiv preprint arXiv:2404.19737. Cited by: §4.3. B. Hidasi, A. Karatzoglou, L. Baltrunas, and D. Tikk (2015) Session-based recommendations with recurrent neural networks. arXiv preprint arXiv:1511.06939. Cited by: §5.1. Y. Hou, Z. He, J. McAuley, and W. X. Zhao (2023) Learning vector-quantized item representation for transferable sequential recommenders. In Proceedings of the ACM Web Conference 2023, p. 1162–1171. Cited by: §5.1. Y. Hou, J. Li, A. Shin, J. Jeon, A. Santhanam, W. Shao, K. Hassani, N. Yao, and J. McAuley (2025) Generating long semantic ids in parallel for recommendation. In Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V. 2, p. 956–966. Cited by: §1, §2, §2, §5.1, §5.1, §5.1, §5.1. H. Jegou, M. Douze, and C. Schmid (2010) Product quantization for nearest neighbor search. IEEE transactions on pattern analysis and machine intelligence 33 (1), p. 117–128. Cited by: §1. W. Kang and J. McAuley (2018) Self-attentive sequential recommendation. In 2018 IEEE international conference on data mining (ICDM), p. 197–206. Cited by: §2, §5.1. H. Ko, S. Lee, Y. Park, and A. Choi (2022) A survey of recommendation systems: recommendation models, techniques, and application fields. Electronics 11 (1), p. 141. Cited by: §2. D. Lee, C. Kim, S. Kim, M. Cho, and W. Han (2022) Autoregressive image generation using residual quantization. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, p. 11523–11532. Cited by: §1, §2. L. Li, Y. Zhang, D. Liu, and L. Chen (2024) Large language models for generative recommendation: a survey and visionary discussions. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024), p. 10146–10159. Cited by: §1, §2. Z. Liu, Y. Zhu, Y. Yang, X. Lv, G. Tang, R. Huang, Q. Luo, R. Tang, and G. Zhou (2026) Diffgrm: diffusion-based generative recommendation model. In Proceedings of the ACM Web Conference 2026, p. 5853–5864. Cited by: §2, §5.1. C. Ma, P. Kang, and X. Liu (2019) Hierarchical gating networks for sequential recommendation. In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, p. 825–833. Cited by: §5.1. J. McAuley, C. Targett, Q. Shi, and A. van den Hengel (2015) Image-based recommendations on styles and substitutes. In Proceedings of the 38th International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR ’15, New York, NY, USA, p. 43–52. External Links: ISBN 9781450336215, Link, Document Cited by: §5.1. F. Mentzer, D. Minnen, E. Agustsson, and M. Tschannen (2024) Finite scalar quantization: vq-vae made simple. In International Conference on Learning Representations, Vol. 2024, p. 51772–51783. Cited by: §3.2. J. Ni, G. H. Abrego, N. Constant, J. Ma, K. Hall, D. Cer, and Y. Yang (2022) Sentence-t5: scalable sentence encoders from pre-trained text-to-text models. In Findings of the association for computational linguistics: ACL 2022, p. 1864–1874. Cited by: §5.1. A. V. Petrov and C. Macdonald (2024) RecJPQ: training large-catalogue sequential recommenders. In Proceedings of the 17th ACM International Conference on Web Search and Data Mining, p. 538–547. Cited by: §5.1. A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, I. Sutskever, et al. (2019) Language models are unsupervised multitask learners. OpenAI blog 1 (8), p. 9. Cited by: §4.2. S. Rajput, N. Mehta, A. Singh, R. Hulikal Keshavan, T. Vu, L. Heldt, L. Hong, Y. Tay, V. Tran, J. Samost, et al. (2023) Recommender systems with generative retrieval. Advances in Neural Information Processing Systems 36, p. 10299–10315. Cited by: §1, §2, §2, §5.1, §5.1, §5.1, §5.1. T. Shi, C. Shen, W. Yu, S. Nie, C. Li, X. Zhang, M. He, Y. Han, and J. Xu (2025) LLaDA-rec: discrete diffusion for parallel semantic id generation in generative recommendation. arXiv preprint arXiv:2511.06254. Cited by: §2. F. Sun, J. Liu, J. Wu, C. Pei, X. Lin, W. Ou, and P. Jiang (2019) BERT4Rec: sequential recommendation with bidirectional encoder representations from transformer. In Proceedings of the 28th ACM international conference on information and knowledge management, p. 1441–1450. Cited by: §2, §5.1. J. Tang and K. Wang (2018) Personalized top-n sequential recommendation via convolutional sequence embedding. In Proceedings of the Eleventh ACM International Conference on Web Search and Data Mining, WSDM ’18, New York, NY, USA, p. 565–573. External Links: ISBN 9781450355810, Link, Document Cited by: §5.1. A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin (2017) Attention is all you need. Advances in neural information processing systems 30. Cited by: §1. W. Wang, H. Bao, X. Lin, J. Zhang, Y. Li, F. Feng, S. Ng, and T. Chua (2024) Learnable item tokenization for generative recommendation. In Proceedings of the 33rd ACM International Conference on Information and Knowledge Management, p. 2400–2409. Cited by: §2. K. Wei, X. Kang, J. Zhang, Y. Yang, L. Jin, Z. Li, J. Zhong, R. H. Bai, J. Zhu, et al. (2026) From past to path: masked history learning for next-item prediction in generative recommendation. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), p. 10421–10441. Cited by: §1, §2, §5.1. T. Wolf, L. Debut, V. Sanh, J. Chaumond, C. Delangue, A. Moi, P. Cistac, T. Rault, R. Louf, M. Funtowicz, et al. (2020) Transformers: state-of-the-art natural language processing. In Proceedings of the 2020 conference on empirical methods in natural language processing: system demonstrations, p. 38–45. Cited by: §1. L. Yu, J. Lezama, N. B. Gundavarapu, L. Versari, K. Sohn, D. Minnen, Y. Cheng, A. Gupta, X. Gu, A. G. Hauptmann, et al. (2024) Language model beats diffusion-tokenizer is key to visual generation. In International Conference on Learning Representations, Vol. 2024, p. 765–783. Cited by: §A.3, §3.2. J. Zhai, L. Liao, X. Liu, Y. Wang, R. Li, X. Cao, L. Gao, Z. Gong, F. Gu, J. He, Y. Lu, and Y. Shi (2024) Actions speak louder than words: trillion-parameter sequential transducers for generative recommendations. In Proceedings of the 41st International Conference on Machine Learning, ICML’24. Cited by: §2, §5.1. T. Zhang, P. Zhao, Y. Liu, V. S. Sheng, J. Xu, D. Wang, G. Liu, X. Zhou, et al. (2019) Feature-level deeper self-attention network for sequential recommendation.. In IJCAI, p. 4320–4326. Cited by: §5.1. W. X. Zhao, S. Mu, Y. Hou, Z. Lin, Y. Chen, X. Pan, K. Li, Y. Lu, H. Wang, C. Tian, et al. (2021) Recbole: towards a unified, comprehensive and efficient framework for recommendation algorithms. In proceedings of the 30th acm international conference on information & knowledge management, p. 4653–4664. Cited by: §5.1. B. Zheng, Y. Hou, H. Lu, Y. Chen, W. X. Zhao, M. Chen, and J. Wen (2024) Adapting large language models by integrating collaborative semantics for recommendation. In 2024 IEEE 40th International Conference on Data Engineering (ICDE), p. 1435–1448. Cited by: §2, §5.1. K. Zhou, H. Wang, W. X. Zhao, Y. Zhu, S. Wang, F. Zhang, Z. Wang, and J. Wen (2020) S3-rec: self-supervised learning for sequential recommendation with mutual information maximization. In Proceedings of the 29th ACM international conference on information & knowledge management, p. 1893–1902. Cited by: §5.1. Appendix A More Details A.1. Datasets and Hyperparameters details Table 3. Statistics of the processed datasets. “Avg. t” denotes the average number of interactions per input sequence. Datasets Users Items Interactions Avg. t Sports 35,599 18357 296,337 8.32 Beauty 22,363 12,101 198,502 8.88 Toys 19,412 11,924 167,597 8.63 CDs 75,258 64,443 1,022,334 13.58 Table 4. Detailed hyperparameter settings of TopoGR on different datasets. Hyperparameter Beauty Sports Toys CDs Learning Rate 0.01 0.003 0.003 0.0005 ncodebookn_codebook 64 64 64 64 Bit Number r 8 8 8 8 Code Size K 256 256 256 256 τ 0.03 0.03 0.03 0.03 λent _ent 0.1 0.1 0.1 0.1 λHam _Ham 0.1 0.1 0.1 0.1 α 0.3 0.3 0.3 0.3 τH _H 0.1 0.1 1.0 1.0 Table 5. Full-SID uniqueness statistics. The collapse ratio is close to zero on all datasets, indicating that the learned full SIDs rarely collapse. Datasets Items Unique SIDs Collapse Ratio Beauty 12,101 12,099 0.000165 Toys 11,924 11,915 0.000755 Sports 18,357 18,317 0.002179 CDs 64,443 64,252 0.002964 A.2. SID Collapse Analysis We further examine whether the learned SIDs suffer from collapse, where multiple items are assigned to the same SID. As shown in Table 5, the learned SIDs exhibit negligible collapse across all datasets. The collapse ratio is consistently below 0.003. These results indicate that the proposed bit-decomposable tokenizer can assign highly distinguishable SIDs to items and does not suffer from severe SID collapse. A.3. Implementation of LFQ Entropy Regularization We adopt the standard entropy regularization of Lookup-Free Quantization (LFQ) (Yu et al., 2024). This regularizer is inherited from LFQ and is not a methodological contribution of TopoGR. For each SID position m, the encoder produces a continuous pre-quantization vector v,m∈ℝrz_v,m ^r. LFQ performs hard quantization independently along each dimension: v,m=sign(v,m)∈−1,+1r.b_v,m=sign(z_v,m)∈\-1,+1\^r. Although LFQ does not maintain learnable codebook centroids, the K=2rK=2^r possible binary patterns can be deterministically enumerated as =kk=0K−1,k∈−1,+1r.C=\c_k\_k=0^K-1, _k∈\-1,+1\^r. These binary vertices are fixed buffers rather than learnable parameters. They are only instantiated during training to compute the entropy regularizer; the hard forward quantization remains an element-wise sign operation without nearest-codeword lookup. Given v,mz_v,m, the implementation defines a differentiable soft assignment over the implicit binary codebook as pv,m(k)=exp(2βv,m⊤k)∑j=0K−1exp(2βv,m⊤j),k=0,…,K−1,p_v,m(k)= (2β\,z_v,m c_k ) _j=0^K-1 (2β\,z_v,m c_j ), k=0,…,K-1, where β denotes the inverse temperature. This formulation is equivalent, up to code-independent terms, to applying a softmax over the negative squared Euclidean distances between v,mz_v,m and the fixed binary vertices. Importantly, pv,mp_v,m is computed from the continuous pre-quantization vector, rather than from the discrete output of the sign operation. For a mini-batch ℬB, we first compute the average assignment distribution at SID position m: p¯m=1|ℬ|∑v∈ℬpv,m. p_m= 1|B| _v p_v,m. The entropy regularizer is then defined as ℒent=1M∑m=1M[1|ℬ|∑v∈ℬH(pv,m)−γH(p¯m)],L_ent= 1M _m=1^M [ 1|B| _v H\! (p_v,m )-γ H\! ( p_m ) ], where H(p)=−∑k=0K−1p(k)logp(k),H(p)=- _k=0^K-1p(k) p(k), and γ controls the strength of batch-level code diversity. The first term encourages each item to make a confident assignment, whereas the second term encourages the batch-aggregated distribution to utilize diverse binary codes. We use γ=1γ=1 in our experiments. The entropy path is fully differentiable with respect to v,mz_v,m. In particular, ∂pv,m(k)∂v,m=2βpv,m(k)(k−∑j=0K−1pv,m(j)j). ∂ p_v,m(k) _v,m=2β p_v,m(k) (c_k- _j=0^K-1p_v,m(j)c_j ). Thus, gradients from ℒentL_ent are directly back-propagated to the encoder through the continuous logits. The binary vertices kc_k receive no gradients because they are fixed buffers. Separately, the reconstruction path uses the straight-through estimator: ~v,m=v,m+sg(v,m−v,m), b_v,m=z_v,m+sg\! (b_v,m-z_v,m ), where sg(⋅)sg(·) denotes stop-gradient. The forward value of ~v,m b_v,m is the hard binary code, while its backward derivative with respect to v,mz_v,m is treated as the identity. The resulting binary code is subsequently composed with the learnable bit bases for semantic reconstruction. Therefore, the soft assignment is used only for entropy regularization and does not replace the hard Binary SID used by the tokenizer. A.4. Complexity Analysis Let L denote the user sequence length, M the number of SID positions per item, r the number of bits per SID position, and K=2rK=2^r the local code vocabulary size. The binary item feature dimension is d=Mrd=Mr. Let |ℐ||I| denote the number of items in the corpus, and let P denote the size of the candidate pool used for reranking. Training. TIGER flattens all M SID tokens of each item into the sequence. Therefore, the effective sequence length becomes LMLM, and the self-attention complexity is O(L2M2d).O(L^2M^2d). This cost grows quadratically with the SID length and becomes expensive when long SIDs are used. RPG keeps each item as one timestep and aggregates the M SID tokens into a single item representation, reducing the self-attention complexity to O(L2d).O(L^2d).However, the aggregation may lose fine-grained token-level structure. TopoGR also keeps each historical item as one timestep. It represents each item as a binary feature vector of dimension d=Mrd=Mr, and therefore has the same self-attention complexity as RPG: O(L2d).O(L^2d). In addition to the Transformer backbone, TopoGR uses M parallel prediction heads to compute logits over K codes at each sequence position. This introduces an additional cost of O(LMKd)O(LMKd). The Hamming soft-target loss computes a KL divergence over K codes for each SID position, which costs O(LMK).O(LMK). Therefore, the overall training complexity of TopoGR is O(L2d+LMKd+LMK)O(L^2d+LMKd+LMK). Since the last term is dominated by the prediction-head computation, this can be simplified as O(L2d+LMKd)O(L^2d+LMKd). The prediction-head computation is linear in the sequence length and fully parallelizable across SID positions and code indices. Although this term can be non-negligible when M and K are large, it is efficiently implemented with batched matrix operations and remains practical in our experiments. Figure 8. Comparison of inference time and throughput of different baselines on the Beauty dataset. Inference. TIGER performs autoregressive SID generation. With beam width W, its decoding cost scales with the SID length as O(MWKd)O(MWKd), which introduces a serial decoding bottleneck. RPG avoids serial generation by predicting SID positions in parallel, but its graph-constrained decoding requires additional candidate propagation and graph traversal, whose cost depends on the graph construction and decoding hyperparameters. TopoGR predicts all M SID positions in parallel. Computing the logits of all SID positions costs O(MKd).O(MKd). Then, for each item in the corpus, TopoGR gathers the log-probabilities of its M SID tokens and averages them to obtain the original item score. This full-corpus scoring step costs O(|ℐ|M).O(|I|M). After selecting the top-P candidates according to the original score, Hamming-consistent reranking computes the normalized bit-level similarity between each candidate Binary SID and the predicted binary prototype, which costs O(PMr)O(PMr). Thus, the overall inference complexity of TopoGR is O(MKd+|ℐ|M+PMr),O(MKd+|I|M+PMr), plus the cost of top-P selection. With an efficient top-P operator, the selection can be implemented in approximately linear time with respect to |ℐ||I| in practice. TopoGR therefore eliminates the serial autoregressive decoding bottleneck of TIGER and avoids the iterative graph traversal used by RPG. Its inference procedure consists of parallel SID prediction, vectorized full-corpus gather scoring, and lightweight reranking over a small candidate pool. Figure 8 further compares the inference latency and throughput of different generative recommendation methods under the same experimental environment. TIGER performs autoregressive SID generation, whose sequential decoding procedure results in high latency. RPG enables parallel SID prediction but introduces graph-constrained decoding, which incurs additional candidate propagation and graph traversal overhead. DiffGRM adopts bidirectional masked diffusion and requires multiple denoising iterations, leading to high inference latency. In contrast, TopoGR predicts all SID positions in parallel and performs full-corpus scoring and Hamming-consistent reranking with vectorized matrix operations. Although TopoGR still scores the item corpus through gather operations, this step is highly parallelizable and avoids serial decoding or iterative graph traversal. Consequently, TopoGR achieves low inference latency and high throughput. Appendix B More Experiments B.1. Additional Codeword Similarity Analysis (a) RQ-Kmeans (b) RQ-VAE Figure 9. Codeword similarity heatmaps for RQ-KMeans and RQ-VAE. The off-diagonal correlations suggest that different SID codes preserve latent semantic proximity in the tokenizer-induced code space. Figure 9 provides additional codeword similarity heatmaps for RQ-KMeans and RQ-VAE. Similar to the OPQ result shown in the main text, both tokenizers exhibit non-trivial off-diagonal correlations, suggesting that learned SID code spaces preserve latent neighborhood relations among distinct codewords. These results indicate that the structural mismatch discussed in the main text is not specific to a particular tokenizer: semantic tokenizers can learn structured code spaces, whereas standard generators consume the resulting integer SIDs as independent categorical symbols. Figure 10. Mean item content similarity with respect to integer SID overlap and Binary SID overlap. Only bins with sufficient item pairs are shown. Figure 11. Sensitivity analysis of λHam _Ham. Figure 12. Sensitivity analysis of α. Figure 13. Sensitivity analysis of ncodebookn_codebook. Figure 14. Sensitivity analysis of bit number r. Table 6. Ablation results on Beauty, Sports, and Toys datasets. Method Beauty Sports Toys R@5 R@10 N@5 N@10 R@5 R@10 N@5 N@10 R@5 R@10 N@5 N@10 Binary SID Ablation OPQ_SID 0.0495 0.0701 0.0343 0.0409 0.0275 0.0423 0.0187 0.0234 0.0520 0.0719 0.0369 0.0433 BDQ_SID 0.0497 0.0740 0.0344 0.0423 0.0297 0.0448 0.0202 0.0251 0.0524 0.0747 0.0367 0.0439 Random SID + Binary 0.0486 0.0671 0.0361 0.0421 0.0282 0.0396 0.0194 0.0231 0.0541 0.0706 0.0399 0.0453 OPQ_SID + Binary 0.0566 0.0811 0.0404 0.0483 0.0364 0.0525 0.0248 0.0299 0.0641 0.0893 0.0445 0.0527 BDQ_SID + Binary 0.0609 0.0867 0.0432 0.0515 0.0365 0.0538 0.0251 0.0307 0.0674 0.0961 0.0467 0.0561 Component Ablation w/o Basis Embedding (BE) 0.0589 0.0859 0.0412 0.0499 0.0370 0.0546 0.0249 0.0306 0.0682 0.0979 0.0483 0.0579 w/o Hamming-Consistent Reranking (HCR) 0.0604 0.0871 0.0426 0.0512 0.0371 0.0546 0.0257 0.0313 0.0691 0.0977 0.0491 0.0583 w/o Hamming Soft Target (HST) 0.0614 0.0868 0.0430 0.0512 0.0370 0.0545 0.0255 0.0310 0.0688 0.0977 0.0487 0.0581 TopoGR 0.0620 0.0883 0.0439 0.0522 0.0374 0.0554 0.0258 0.0314 0.0712 0.0995 0.0497 0.0588 B.2. Content Similarity under Integer and Binary SID Overlap. To further examine whether the binary topology reflects semantic relatedness in the original item content space, we analyze the mean content similarity of item pairs with respect to both integer SID overlap and Binary SID overlap. Here, integer SID overlap measures the number of shared SID tokens, while Binary SID overlap measures the number of matched bits in the corresponding Binary SIDs, which is equivalent to the complement of the full-SID Hamming distance. As shown in Figure 10, item pairs with more shared integer SID tokens generally exhibit higher content similarity, confirming that exact SID overlap provides a coarse semantic signal. More importantly, within the same integer-overlap level, content similarity still varies substantially with Binary SID overlap. Item pairs with larger Binary SID overlap tend to have higher content similarity, even when their integer SID overlap is small or zero. This indicates that the Hamming geometry exposed by Binary SIDs captures fine-grained semantic relations that are not reflected by exact SID-token matching alone. These observations are consistent with the controlled Hamming-distance analysis in Table 2 and Figure 6. They further support our central claim that item relatedness resides not only in shared integer SID tokens, but also in the latent proximity among distinct SID codes. By making this topology explicit, TopoGR can exploit semantic relations among non-overlapping but structurally close SIDs during input modeling, training supervision, and inference-time reranking. B.3. Hyperparameter Sensitivity Analysis We conduct sensitivity analysis on three key hyperparameters of TopoGR across Beauty, Toys, and Sports datasets. Unless otherwise stated, all other hyperparameters are fixed at their default values. Effect of Hamming Loss Weight λHam _Ham. Figure 14 shows the sensitivity of TopoGR to the Hamming soft-target loss weight λHam _Ham (Eq. 22), which controls the relative contribution of topology-aware supervision versus standard cross-entropy. We observe that performance remains relatively stable across λHam∈[0.1,0.5] _Ham∈[0.1,0.5] on all three datasets, indicating that TopoGR is not overly sensitive to this hyperparameter. When λHam _Ham is too small (approaching 0), the model degenerates to standard categorical prediction without topology-aware smoothing, losing the benefit of Hamming soft targets. When λHam _Ham is too large (approaching 1.0), the Hamming proximity objective dominates training, potentially over-smoothing the prediction distribution and weakening the model’s ability to discriminate the exact target code. The default value λHam=0.1 _Ham=0.1 achieves consistently strong performance across datasets, providing a suitable balance between exact token prediction and topology preservation. Effect of Reranking Weight α. Figure 14 presents the sensitivity to the reranking weight α, which controls the strength of Hamming-consistent reranking (Eq. 26) during inference. Specifically, α scales the Hamming similarity correction applied to the raw likelihood scores of candidate items. A larger α places more emphasis on Hamming proximity when re-scoring candidates, while α=0α=0 disables reranking entirely. The results show a clear inverted-U trend: performance peaks at moderate values (α∈[0.3,0.5]α∈[0.3,0.5]) and degrades at both extremes. At very small α (e.g., 0.1), the reranking correction is negligible, and the model relies almost entirely on raw likelihood scores without exploiting the Hamming structure of the Binary SID space. At very large α (e.g., 1.0), the Hamming proximity term dominates the final score, causing the model to favor candidates that are bit-level close to the prediction but may not be the true target—effectively introducing a proximity bias that overrides the learned generative signal. The optimal range α∈[0.3,0.5]α∈[0.3,0.5] ensures that Hamming reranking provides a meaningful correction to disambiguate candidates with similar likelihood scores, without overwhelming the primary prediction. Effect of SID Length ncodebookn_codebook. Figure 14 investigates the effect of SID length M by varying it over 8,16,32,64,128\8,16,32,64,128\ while fixing the number of bits per position. Overall, recommendation performance consistently improves as M increases across datasets and metrics. Longer SIDs provide greater representational capacity, enabling the tokenizer to encode more fine-grained item information and yielding richer binary features and Hamming relations for topology-aware modeling. Moreover, TopoGR predicts all SID positions in parallel, avoiding the serial decoding overhead commonly associated with long autoregressive SIDs. Nevertheless, increasing M enlarges the input dimension and computational cost, and thus should be selected by balancing effectiveness and efficiency. Effect of the bit number r. Figure 14 shows the effect of the bit number r, where the local code size is K=2rK=2^r. The performance consistently improves as r increases from 3 to 8. When r is too small, the local code capacity is insufficient and the induced Hamming space becomes overly coarse, leading to inferior recommendation performance. A moderate bit number, e.g., r=8r=8, provides sufficient code capacity and more fine-grained Hamming topology. B.4. Details of Hamming-close/Far Grouping We describe how the Hamming-close and Hamming-far groups are constructed. For each test instance, let v∗v denote the target item and ℋuH_u denote the user’s historical items. Each item v has an SID v=[sv1,…,svM]s_v=[s_v^1,…,s_v^M], where M is the SID length. We first compute the exact SID overlap count between the target item and each historical item: Overlap(vh,v∗)=∑m=1M[svhm=sv∗m].Overlap(v_h,v )= _m=1^MI[s_v_h^m=s_v ^m]. For each test instance, we then take the maximum overlap count over the whole history: Ou=maxvh∈ℋuOverlap(vh,v∗).O_u= _v_h _uOverlap(v_h,v ). The test instances are grouped by this maximum overlap count, i.e., Ou∈0,1,2,3,4,≥5O_u∈\0,1,2,3,4,≥ 5\. Thus, for buckets 0–44, all instances in the same bucket have exactly the same number of overlapped SID digits between the target item and its closest-overlap historical item. To define Hamming distance, we convert each SID digit into a fixed-length binary code and concatenate all digits into a binary SID representation vb_v. The Hamming distance between a historical item vhv_h and the target item v∗v is dH(vh,v∗)=∑ℓ[bvhℓ≠bv∗ℓ].d_H(v_h,v )= _ I[b_v_h ≠ b_v ]. A smaller Hamming distance means that two items are closer in the binary SID topology. For the close/far comparison in Table 2, we do not use the minimum Hamming distance over all historical items directly. Instead, we only consider historical items that achieve the maximum exact overlap OuO_u. Specifically, we define Du=minvh∈ℋu:Overlap(vh,v∗)=OudH(vh,v∗).D_u= _v_h _u:Overlap(v_h,v )=O_ud_H(v_h,v ). This quantity measures the smallest Hamming distance among the historical items that already have the maximum exact SID overlap with the target item. Within each overlap-count bucket, we compute the empirical 30th and 70th percentiles of DuD_u, denoted as Q30Q_30 and Q70Q_70. We then define Hamming-close: -close: Du≤Q30, D_u≤ Q_30, Hamming-far: -far: Du≥Q70. D_u≥ Q_70. The comparison focuses on the two clearly separated groups. Importantly, the percentile thresholds are computed separately within each overlap-count bucket and each dataset. Appendix C Why Learned Hamming Geometry Works This section provides a simple justification for why Hamming distance is meaningful in the learned Binary SID space. Binary SID is not an arbitrary binary encoding; instead, it is learned through a bit-compositional reconstruction structure. For the m-th SID position, the bit-compositional representation of item v is defined as vm=∑l=1rbvm,lm,l,g_v^m= _l=1^rb_v^m,la_m,l, where bvm,l∈−1,+1b_v^m,l∈\-1,+1\ denotes the l-th binary bit and m,la_m,l is the corresponding learnable bit basis. For two items u and v, we have um−vm=∑l=1r(bum,l−bvm,l)m,l.g_u^m-g_v^m= _l=1^r(b_u^m,l-b_v^m,l)a_m,l. Since identical bits have zero difference, only the differing bits contribute to the representation difference: um−vm=∑l:bum,l≠bvm,l(bum,l−bvm,l)m,l.g_u^m-g_v^m= _l:b_u^m,l≠ b_v^m,l(b_u^m,l-b_v^m,l)a_m,l. Taking the ℓ2 _2 norm and using |bum,l−bvm,l|=2|b_u^m,l-b_v^m,l|=2 for different bits, we obtain ‖um−vm‖2≤2∑l:bum,l≠bvm,l‖m,l‖2.\|g_u^m-g_v^m\|_2≤ 2 _l:b_u^m,l≠ b_v^m,l\|a_m,l\|_2. This shows that two codes with small Hamming distance share most learned bit bases and differ only in a few basis components. For the full SID, define the set of differing bit positions as Δ(u,v)=(m,l)∣bum,l≠bvm,l. (u,v)=\(m,l) b_u^m,l≠ b_v^m,l\. The full-SID Hamming distance is then dH(Bu,Bv)=|Δ(u,v)|.d_H(B_u,B_v)=| (u,v)|. Therefore, the Hamming distance can be interpreted as counting how many learned basis components are changed between two Binary SID codes. This provides a structural explanation for why Hamming distance works in our method. Since the tokenizer is trained to reconstruct item representations from these bit-basis compositions, the learned Hamming geometry is tied to the reconstruction structure rather than being an arbitrary distance over binary strings. This also explains why random binary SIDs are less effective: although they also have Hamming distances, their bits are not associated with reconstruction-trained basis components and thus are not aligned with item representation reconstruction.