Tokens are All You Need: Dual-purpose Semantic IDs for Achieving LLM-Level I/O Efficiency in recommendation systems
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Computer Science. The day in computer science: software, systems and theory on arXiv.
Tom: We're looking at the paper: "Tokens are All You Need".
Paper summary: Tom: So, we're wrapping up our look at "Tokens are All You Need: Dual-purpose Semantic IDs for Achieving LLM-Level I/O Efficiency in recommendation systems," Tom This paper is tackling that memory wall problem in massive recommendation systems using dual purpose semantic IDs Tom
Jane: The title itself makes a lot of sense, it suggests that these discrete tokens are actually everything you need for both identity and content representation Jane But what does that actually mean for someone just trying to understand how we handle millions of user interactions? Jane
Lu: It means they've figured out how to use these IDs not just for storing data, but as a way to rebuild the original continuous embedding on demand Lu It’s about trading massive storage for on-the-fly reconstruction which saves a ton of I/O bandwidth Lu
Meng: From my side, it's about deployment; if you can reconstruct the vector from these tokens instead of fetching a huge dense matrix, that cuts down the required memory and speeds up inference dramatically Meng But I gotta ask, what's the actual trade off when you have to run this decoding process every time? Meng
Lalam: The paper shows that they use two roles for these IDs: one for modeling how users and items interact through a learnable table, and another one just for reconstructing the item’s original content embedding on the fly Lalam This dual purpose is what makes it work without losing information Lalam
Tom: So, we're looking at this concept—Semantic IDs—as this way to get LLM-level efficiency in recommendation systems by using tokens instead of huge vectors for everything Tom It’s a big move away from just storing massive continuous embeddings directly Tom
Jane: It shifts the focus from storing every single vector to storing and learning a compact set of discrete codes that can be decoded into anything you need Jane That sounds like it could make recommendation systems way more scalable for people who are dealing with truly enormous datasets Jane
Lu: The results show they can even reclaim lost representation capacity by just expanding the size of the codebook used for those tokens Lu It proves that quantization isn't just about cutting down size; it’s about how much information you keep inside those tokens Lu
Meng: I see the evidence saying they get a hit rate at one hundred percent higher when they do this expansion, which is pretty solid, but we still need to worry about how fast the training stays when you're constantly doing that on-the-fly decoding Meng That speed is what separates a neat idea from something we can actually ship at scale Meng
Lalam: My assessment is that the authors are very confident in this direction because they successfully integrated both identity learning and content reconstruction into one framework without needing huge precomputed tables for everything Lalam It’s about making the model itself smarter about how it accesses its information Lalam
Conclusion: Tom: So, we’re wrapping up our look at "Tokens are All You Need: Dual-purpose Semantic IDs for Achieving LLM-Level I/O Efficiency in recommendation systems" Tom This paper uses these dual purpose semantic IDs to solve that memory wall problem in big recommendation systems Tom
Jane: It’s about using discrete tokens to replace those massive dense floating point embeddings for both user identity and item content representation Jane But what does that actually mean for someone just trying to understand how we handle millions of user interactions? Jane
Lu: The core idea is they treat these semantic IDs as discrete codes derived from the content features, which dramatically cuts down storage requirements by about fifty to one hundred times Lu
Meng: It moves the burden away from massive disk retrieval and onto fast compute reconstruction inside the accelerator memory which means we can handle much longer user activity sequences at scale without hitting I/O walls Meng But I gotta ask, what's the actual trade off when you have to run that decoding process every time? Meng
Lalam: The paper shows they use these IDs for two concurrent roles: modeling how users and items interact through a learnable table and reconstructing the original content embedding on the fly Lalam This dual purpose is what makes it work without losing information Lalam
Tom: So, this approach suggests that almost any high dimensional dense continuous feature can be turned into a discrete token space for both identification and understanding Tom It’s about finding the optimal balance between what you store and what you need to reconstruct on demand Tom
Jane: It shifts the focus from storing every single massive vector to learning a compact set of discrete codes that can be decoded into whatever you need Jane That sounds like it could make recommendation systems way more scalable for people who are dealing with truly enormous datasets Jane
Lu: The results show they can even reclaim lost representation capacity by just expanding the size of the codebook used for those tokens Lu It proves that quantization isn't just about cutting down size; it’s about how much information you keep inside those tokens Lu
Meng: I see the evidence saying they get a hit rate at one hundred percent higher when they do this expansion, which is pretty solid but we still need to worry about how fast the training stays when you're constantly doing that on-the-fly decoding Meng That speed is what separates a neat idea from something we can actually ship at scale Meng
Lalam: My assessment is that the authors are very confident in this direction because they successfully integrated both identity learning and content reconstruction into one framework without needing huge precomputed tables for everything Lalam It’s about making the model itself smarter about how it accesses its information Lalam
Tom: So, "Tokens are All You Need" suggests that the next big step is figuring out how to make this reconstruction process even faster and more dynamic for real time needs Tom We've seen the theory; now we have to see how it actually holds up when we put it in a live serving environment Tom
Google DeepMind
cs.IR, cs.AI, cs.LG
Submitted: 2026-07-26
Updated: 2026-11-20
Comments: RecSys 2026
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 100/100
The gist: Large-scale recommendation systems face "Memory Wall" bottlenecks due to massive, dense embedding tables and this paper proposes Dual-purpose Semantic IDs to achieve LLM-level I/O efficiency in…
Key concepts
- Memory Wall Bottleneck
- Large recommendation systems struggle because they store huge, dense floating-point vectors for users and items. Loading these massive numerical tables during training or inference creates severe bottlenecks in memory bandwidth and I/O operations, slowing down the system.
- Semantic ID Generation
- This involves converting high-dimensional content features into discrete tokens, like a codebook. Instead of storing large vectors (e.g., 32 bits), an item gets a short sequence of integer IDs, achieving massive compression ratios and reducing storage needs by up to 100 times.
- Dual-purpose Semantic ID Framework
- This framework uses the same discrete tokens for two jobs: first, modeling user-item interactions (Collaborative Identity), and second, reconstructing the original content embedding on demand (Content Reconstruction). This dual role balances memorization and generalization efficiently.
- On-the-fly Semantic Decoding
- A lightweight decoder is used to look up the discrete token IDs from a codebook and aggregate their embeddings. This process reconstructs an approximation of the original high-dimensional content embedding without needing to store or join the full dense vector, saving significant I/O time.
Terminology
Summary
Large-scale recommendation systems face Memory Wall
bottlenecks due to massive, dense embedding tables and this paper proposes Dual-purpose Semantic IDs to achieve LLM-level I/O efficiency in recommendation systems.
The core problem addressed
Large-scale recommendation systems face Ingesting these massive numerical vectors
during training and inference creates immense I/O and memory
bandwidth bottlenecks, fundamentally capping the throughput and
serving efficiency of large-scale recommendation models. This is
particularly challenging when the recommendation system evolves
towards a more sequential formation and handling longer user
activity sequences with sequence lengths at scale of 104 or higher
[1].Memory Wall
bottlenecks due to massive, dense embedding tables Modern architectures rely heavily on vast, dense floating-point embedding tables to represent users, items, and high-dimensional continuous features Ingesting these massive numerical vectors during training and inference creates immense I/O and memory bandwidth bottlenecks. This is particularly challenging when the recommendation system evolves towards a more sequential formation and handling longer user activity sequences with sequence lengths at scale of 104 or higher. p. 0Where the paper says it
Dual-purpose Semantic ID Framework
The proposed framework integrates standard Semantic ID embedding learning with on-the-fly Semantic ID Decoding (SiDec) to achieve an optimal balance between item-specific memorization and contentaware generalization. This approach replaces massive vector storage with on-demand reconstruction, reducing system overhead and data footprints. p. 0 Our methodology uses hierarchical quantization to condense continuous embeddings into discrete
Semantic IDs performing two concurrent roles: (1) Collaborative
Identity: modeling user-item interactions via learnable embedding
table; and (2) Content Reconstruction: using a lightweight Semantic
Decoder for on-the-fly embedding approximation. This approach
replaces massive vector storage with on-demand reconstruction,
reducing system overhead and data footprints. Inspired by computer vision data compression, we propose Dual-purpose Semantic IDs to
achieve LLM-level I/O efficiency. Our methodology uses hierarchical quantization to condense continuous embeddings into discrete
Semantic IDs performing two concurrent roles: (1) Collaborative
Identity: modeling user-item interactions via learnable embedding
table; and (2) Content Reconstruction: using a lightweight Semantic
Decoder for on-the-fly embedding approximation.Where the paper says it
Where the paper says it
Semantic ID Generation and Representation
Semantic IDs are discrete tokenized codewords derived from high dimensional content features Formally, the Semantic ID for item i is defined as Si = [ti,1, ti,2,..., ti,K] where each ti,k ∈ (1..., V) is an index from a shared codebook C of size V. p. 2 , 𝑡𝑖,𝐾 ] (1)
where each 𝑡𝑖,𝑘 ∈ {1, . ,𝑉 } is an index from a shared codebook C of
size𝑉 . ,𝑉 } is an index from a shared codebook C of
size𝑉 . This discrete representation reduces the storage requirement
from 𝑑 × 32 bits (for floating-point vectors) to 𝐾 × log2
(𝑉 ) bits,
typically achieving a compression ratio of 50–100×.Where the paper says it
Where the paper says it
In-Graph Collaborative Identity Learning
The Semantic ID Si is treated as a set of categorical features for in-graph collaborative identity embedding learning. The model learns embeddings for each token ti,k, allowing it to capture user-item interaction patterns. p. 2 2 Dual-Purpose Semantic ID Framework
Unlike traditional systems that treat IDs and content features as
separate entities, our framework utilizes 𝑆𝑖 for two simultaneous
functions within the recommendation model:
(1) In-Graph Collaborative Identity Embedding Learning:
The sequence 𝑆𝑖
is treated as a set of categorical features. The model learns embeddings for each token 𝑡𝑖,𝑘 , allowing
it to capture user-item interaction patterns.Where the paper says it
-
Unigram Representation treats each token as an independent categorical feature. p. 2
Where the paper says it
1 Unigram Representation. The simplest approach treats each token as an independent categorical feature.
-
Overlapping Bigram Representation employs overlapping bigrams (sliding window) to capture local transitions within the semantic space. p. 2
Where the paper says it
2 Overlapping Bigram Representation. To capture local transitions within the semantic space without being strictly tied to the root of the hierarchy, we employ overlapping bigrams (sliding window): x 𝑜𝑣𝑒𝑟 𝑖 = Aggregate({Emb𝑘,𝑘+1 (𝑡𝑖,𝑘, 𝑡𝑖,𝑘+1) | 𝑘 = 1, .
-
Nested N-gram (Hierarchical) Representation explicitly models the hierarchical nature of Semantic IDs by using nested n-grams. p. 2
Where the paper says it
3 Nested N-gram (Hierarchical) Representation. To explicitly model the hierarchical nature of Semantic IDs—where the first token represents a coarse cluster and subsequent tokens represent finer refinements—we use nested n-grams.
-
Sentence Piece Model (SPM) uses an adaptive method that learns the representation based on empirical data distribution. p. 2
Where the paper says it
In addition to the fixed representation strategy above, we can also use the more adaptive method like Sentence Piece Model (SPM) [7, 14]. SPM learns the representation based on the empirical data distribution to automatically balance how the tokens are combined.
Semantic Decoding and Content Reconstruction
To capture the Our dual-purpose approach extracts maximum utility from these
discrete tokens by serving two concurrent, vital functions directly
inside the recommendation model:
(1) Collaborative Identity: Semantic IDs act as structured categorical features mapped to hierarchical, learnable token-level
embedding tables, enabling powerful collaborative filtering
capabilities that naturally generalize to cold-start and longtail items. (2) Content Reconstruction: A lightweight, task-aligned Semantic Decoder reconstructs high-fidelity approximations
of the original dense content embeddings on-the-fly, entirely
bypassing the need to store, log, or join wide floating-point
vectors. 4 The Semantic Decoder Architecture
The decoder 𝑓𝜃 is designed to be lightweight to maintain inference
efficiency. We employ a Multi-Layer Perceptron (MLP) or a shallow
Transformer that operates on the codebook embeddings in a latent
space of the tokens 𝜙 (𝑆𝑖), where 𝜙 is a static codebook-lookup and
summation layer.pure
content signal without I/O cost, a Semantic Decoder ftheta is introduced to perform codebook lookup for each token and aggregate their embedding from the codebook, as well as a Semantic Decoder ftheta. This reconstructs an approximation of the original content embedding eˆi = ftheta (phi (Si)). p. 6Where the paper says it
Where the paper says it
I/O Efficiency and System Integration
The primary bottleneck in large-scale ranking and retrieval is the The primary bottleneck in
large-scale ranking and retrieval is the "join" operation required
to attach dense content embeddings to user history, such as user’s
watch history. In our methodology, we replace this with a simple
lookup of the 𝐾 integer tokens. , 𝑗𝐿 }, the model performs the following:
(1) Token Parsing: Retrieve the 𝐾 discrete tokens 𝑆𝑗 via Eq. (2) Codebook lookup: Perform a codebook lookup 𝜙 to reconstruct the semantic representation in a hidden space, where
the codebook is exported from the pre-trained model for
Semantic ID generation. The reconstructed embeddings eˆ𝑗 are computed on-the-fly
within the model graph. This eliminates the need to log or join
𝑑-dimensional vectors for every item in the history, drastically reducing the training data footprint.join
operation required to attach dense content embeddings to user history. The methodology replaces this with a simple lookup of the K integer tokens for each item jl in the user history H. p. 3Where the paper says it
Where the paper says it
Where the paper says it
Empirical Results and Trade-offs
Offline studies show that discrete quantization successfully breaks the I/O bottleneck, recovering throughput up to 15.41 steps/s compared to 12. p. 4 Consequently, it suffers from
severe data sparsity and popularity bias, failing to generalize well
to new users or long-tail content. Conversely, the approach that ingests pre-trained, high dimensional dense content embeddings offers better robustness to sparsity and zero-shot generalization compared to the self-learned
embeddings. 7% over Arm 1) while maintaining a competitive convergence loss relative to the Control. Expanding the codebook resolution in Arm 3 (SID v1) reclaims lost representation capacity entirely,
elevating the Hit Rate @100 to 0. Expanding the codebook resolution in Arm 3 (SID v1) reclaims lost representation capacity entirely,
elevating the Hit Rate @100 to 0. 2870 while safely maintaining an
agile training speed of 15. Offline Fixed-Step Training: For our offline studies, particularly when evaluating I/O bottlenecks, we adopted a fixed-step
training schedule rather than the continuous training paradigm typical of production environments. Due to the substantial disparities
in training throughput (steps per second) caused by the varying I/O
demands of different experimental arms, time-bounded continuous
training would lead to faster models processing significantly more
data and receiving more gradient updates. This design successfully shifts the system-level burden
from costly, disk-bound dense vector retrieval to highly efficient,
compute-bound on-the-fly reconstruction within accelerator memory. Our dual-purpose approach extracts maximum utility from these
discrete tokens by serving two concurrent, vital functions directly
inside the recommendation model:
(1) Collaborative Identity: Semantic IDs act as structured categorical features mapped to hierarchical, learnable token-level
embedding tables, enabling powerful collaborative filtering
capabilities that naturally generalize to cold-start and longtail items.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Conclusion and Future Directions
The dual-purpose approach extracts maximum utility by serving two concurrent, vital functions directly inside the recommendation model. The philosophical takeaway suggests that tokens are indeed all you need, as almost any high-dimensional, dense continuous feature can be quantized into a discrete token space Future work plans include investigating Advanced Ultra-Compression Architectures and Dynamic Codebook Adaptation to push the boundaries of this paradigm. p. 6 Our results suggest a broader, highly promising system paradigm: tokens
are indeed all you need. Almost any high-dimensional, dense
continuous feature in recommendations—including complex user
contextual states, spatial representations, historical engagement
densities, and multi-modal feature vectors—can be quantized into a
discrete token space.Where the paper says it
Acknowledgments
The authors would like to thank the critical suggestions and technical support from our colleagues Lukasz Heldt, Vince Gatto and Nikhil Mehta. The paper is 2607. p. 0 By quantizing the continuous space into a learned codebook, VQGAN allowed standard Transformer architectures to process images with the same efficiency as text. The implication is
arXiv:2607.Where the paper says it
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Dual-purpose Semantic IDs enable extreme embedding compression, reducing storage requirements from dense floating-point vectors to discrete tokens with a compression ratio of 50–100x. This allows for
on-the-fly Semantic ID Decoding (SiDec)
to reconstruct high fidelity content embeddings without storing or joining wide floating-point vectors. -
The system can capture collaborative identity by treating the semantic ID sequence as categorical features, using strategies like Nested N-gram or Sentence Piece Model to model hierarchical structures of user interests and item similarity. This allows the model to
learn collaborative signals at multiple granularities.
-
The AI system can efficiently handle cold-start scenarios for new or long-tail items by leveraging the reconstructed content understanding from the Semantic Decoder, which is trained to
reconstruct high-fidelity approximations of the original dense content embeddings.
Abstract
Large-scale recommendation systems face "Memory Wall" bottlenecks due to massive, dense embedding tables. While generative retrieval uses discrete tokens for IDs, high-dimensional context still relies on inefficient dense formats. Inspired by computer vision data compression, we propose Dual-purpose Semantic IDs to achieve LLM-level I/O efficiency. Our methodology uses hierarchical quantization to condense continuous embeddings into discrete Semantic IDs performing two concurrent roles: (1) Collaborative Identity: modeling user-item interactions via learnable embedding table; and (2) Content Reconstruction: using a lightweight Semantic Decoder for on-the-fly embedding approximation. This approach replaces massive vector storage with on-demand reconstruction, reducing system overhead and data footprints. We demonstrate the efficacy of our framework through offline evaluations and successful online deployment in production-scale ranking and retrieval systems at a major video sharing platform, showing that discrete tokens are indeed all you need for highly efficient, content-rich recommendation.
Sources
- OneRec: Unifying Retrieve and Rank with Generative Recommender and Iterative Preference Alignment
- Representation Learning with Contrastive Predictive Coding
- Studying Quality Improvements Recommended via Manual and Automated Code Review
Related papers
- Semantic Tokens Beat IDs in Large Ranking Models: A Scaling Law Perspective
- Can Explanations Improve Recommendations? Evidence from Prediction-Informed Explanations
- ExpandR: Teaching Dense Retrievers Beyond Queries with LLM Guidance
- UniRank: Benchmarking Ranking Models for Unified Sequential Modeling and Feature Interaction
- Revisiting Text Ranking in Deep Research
- NewsReX: An Open-Source Multi-Framework for Neural News Recommendation