TL;DR
Generative recommendation models achieve high accuracy by representing items as sequences of semantic tokens, but this drastically increases sequence lengths and training overhead. RASTP (Representation-Aware Semantic Token Pruning) solves this by dynamically dropping less informative tokens mid-network during training. By combining semantic saliency and attention weights, RASTP slashes training time by 26.7% while maintaining or even slightly improving recommendation quality.
What Problem Does This Paper Address?
Generative Recommendation (GR) is an emerging paradigm where a model learns to directly generate an item's identifier (akin to next-token prediction in Large Language Models) rather than ranking a massive list of pre-computed embeddings. To make this work without an exploding vocabulary, state-of-the-art systems use Semantic Identifiers (SIDs)—hierarchical sequences of discrete tokens that group semantically similar items together.
However, SIDs introduce a major computational bottleneck: representing every item in a user's interaction history as a multi-token sequence drastically inflates the total input sequence length. In industrial settings where recommendation models must be retrained daily on billions of new interactions, this sequence elongation leads to unsustainable training times and memory consumption. While prior work has focused on optimizing attention math or KV caching, this paper targets the root cause: the redundant tokens themselves.
Methods
The authors introduce RASTP, a lightweight, dynamic token-pruning module that can be seamlessly integrated into transformer-based generative recommenders. Instead of carrying all tokens through every layer of the network, RASTP evaluates token importance during the forward pass by multiplying two distinct signals:
- Semantic Saliency: Measured by the $\ell_1$ norm of a token's intermediate hidden representation, which reflects how much unique semantic information it carries.
- Attention Centrality: The cumulative attention weight a token receives across all query positions and attention heads, indicating how heavily other tokens rely on it for context.
Tokens with the lowest combined scores are pruned out according to a target reduction ratio ($\rho$). The remaining high-information tokens are sorted chronologically to preserve their temporal sequence before being passed to the subsequent Transformer layers.
Datasets
The authors evaluated RASTP using a T5 encoder-decoder architecture on three standard, 5-core filtered real-world Amazon benchmarks:
- Beauty
- Sports
- Toys
For each user profile, the model was trained on historical interactions to predict the next item, using standard recommendation metrics like Recall@K and NDCG@K ($K \in \{5, 10\}$).
Key Insights and Ideas
- Redundancy develops contextually: Not all semantic features of an item contribute equally to predicting user intent. As tokens pass through the initial layers of a Transformer, highly informative tokens naturally "absorb" the context of weaker, redundant, or noisy tokens, making the latter safe to discard.
- Timing is everything: Pruning tokens at the very first layer hurts accuracy because tokens haven't had enough opportunity to interact and share context. Conversely, pruning too late saves very little computation. The authors discovered that pruning right after the second encoder layer strikes the optimal balance between efficiency and performance.
- Pruning as a regularizer: Surprisingly, completely removing low-information tokens actually improved recommendation metrics slightly on the Beauty and Toys datasets. This suggests that token pruning can act as a regularizer, filtering out background noise and reducing representation interference.
Key Results
- 26.7% Training Speedup: By dynamically compressing sequences after the second Transformer layer, RASTP achieved a substantial reduction in total training time.
- Preserved (or Enhanced) Accuracy: RASTP consistently matched or exceeded the baseline across all datasets. For instance, on the Beauty dataset, Recall@5 improved from 0.0426 to 0.0441, and NDCG@5 improved from 0.0282 to 0.0289.
- Outperforming Simple Baselines: RASTP significantly outperformed standard sequence reduction techniques like max/average pooling (which destroy fine-grained semantics) and pure $\ell_2$-norm selection.
Limitations and Future Work
While RASTP demonstrates strong empirical gains, the authors note a few areas for improvement:
- Fixed Pruning Ratios: The current implementation relies on a predefined, static reduction ratio ($\rho$) applied at a single chosen layer.
- Future Directions: The authors plan to explore layer-wise adaptive pruning strategies, allowing the model to dynamically determine how many tokens to drop at each layer based on the input complexity. They also intend to validate RASTP across a wider variety of large language model (LLM) architectures.
Summary updated