LESSRec: Level-Specific History Modeling for Semantic ID Recommenders
When items are encoded as residual-quantized semantic IDs, splitting history by semantic level and attending only to the target token's own level beats feeding all levels to the decoder, at the cost of adding a separate item-level summary sequence.
On this page
One team has a 4-level semantic ID recommender already in production, but the vendor's renewal deck never says which history levels the decoder is supposed to read. The usual advice is to feed every level and let attention sort it out. Most people assume extra history tokens can only help, because attention weights are learned and more context looks free. A 2026 paper on semantic ID-based recommendation tests that assumption with an inference-time masking change and nothing else, and the result runs the other way: when a model predicts a token at one semantic level, history tokens at that same level carry more of the signal, while the remaining levels mostly contribute interference [1].
The default assumption: more history levels means more evidence
The standard design, represented by TIGER, is an encoder-decoder: the encoder mixes every historical token with self-attention, and the decoder cross-attends to the full history regardless of which level it is currently predicting. A semantic ID here means an item compressed into an ordered string of discrete tokens, something like (a, b, c, d). Those tokens come from residual quantization: quantize a coarse code first, then quantize the leftover error into the next level, so level 1 carries the coarsest category and level 4 the finest distinctions [1].
The trouble is that two different sequence structures get blended together. Same-level tokens across items record behaviour patterns at one consistent semantic granularity, while the levels inside a single item record a coarse-to-fine refinement path. Mixed together, the decoder cannot tell which piece of evidence relates to the level it must predict. The paper asks the question bluntly: when predicting a level-r token, which levels of the history actually carry useful evidence?
The masking experiment: let each prediction see only its own level
The diagnostic comes first. All parameters stay frozen; only the decoder's cross-attention mask changes, that is the channel through which the decoder pulls information from history. Each target position is restricted to tokens from a single semantic level, and the number of visible tokens is held constant across configurations so that "sees more, does better" cannot explain the result.
| Model variant | Recall@10 gain, fully aligned vs fully mismatched | Visible history tokens when aligned |
|---|---|---|
| Standard TIGER encoding (cross-level mixing) | 11.59% | about 1/4 |
| Level-isolated encoding (TIGER variant) | 49.46% | about 1/4 |
Both figures are Recall@10 on the Games dataset. Under standard encoding, aligning every target position to its own level beats full mismatching by 11.59%; once encoder self-attention is also restricted to same-level tokens, the gap widens to 49.46% [1]. The second half of the finding matters more: when fully aligned, each prediction reads only a quarter of the history tokens, meaning this semantic ID has four levels, and it still slightly outperforms the original TIGER with unrestricted access. Fewer visible tokens and a better score means cross-level history was a net cost.
Three parts of LESSRec: separate, align, then add an item summary
- Level-Isolated Self-Attention (LIS). During encoding, tokens at each level exchange information only with same-level tokens of other items. The mask is applied in every encoder layer, which stops the encoder from mixing levels early. EOS is the exception: it may attend to all valid positions, but historical tokens cannot attend back to EOS, so the aggregated EOS state never leaks into the isolated level states.
- Level-Aligned Cross-Attention (LAC). During decoding, predicting a level-r token cross-attends only to level-r history tokens; predicting the end token opens up to all valid positions.
- Item-Level Semantic Sequence (ILS). Reading one level gives only a quarter of the view, so a second sequence summarises each historical item. The four level encodings of item i are averaged into z_i, then passed through a residual MLP, m_i = z_i + MLP(LN(z_i)), and the results are ordered by the user's interaction sequence [1].
ILS forces a small but easily missed change to positional encoding. The original relative position bias is token-level, yet in the item-level sequence two adjacent items sit four positions apart in the original input, so the token bias no longer matches item spacing. The paper therefore adds a separate bias table B_item that buckets relative offsets over item positions, keeping the decoder's positional signal aligned with chronological order.
Dual-branch fusion, and how LESSRec+ cuts encoder compute
The decoder runs two cross-attention branches over the two sequences and fuses them with a weighted sum: o = (1 minus alpha) times o_level plus alpha times o_item, with alpha in [0,1]. That alpha is the hyperparameter trading off level-aligned history against the item-level summary, and the paper devotes a separate subsection to its sensitivity, which suggests it is not a constant you can guess.
LESSRec+ addresses a waste inside LESSRec itself. LESSRec achieves level isolation through masks, but it still computes attention over all history tokens, so the masked cross-level interactions are paid for and thrown away. LESSRec+ partitions the encoder layers into level-specific groups, each processing only its own level's tokens. The total parameter count is unchanged while encoder computation and intermediate activation storage both drop, and the complexity and resource-efficiency analysis plus the encoder depth allocation study speak to exactly this [1].
What the evidence covers: three datasets, three tokenizers, one named
The paper reports experiments on three public datasets and three tokenizers. A tokenizer here is the quantizer that assigns item codes, and swapping it replaces the whole semantic structure, so three tokenizers is not padding; it is a robustness check on the coding scheme. The appendix implements two residual quantizers, RQ-VAE and RQ-Kmeans. Yet the only dataset named in the excerpt is Games, which is where the 11.59% and 49.46% Recall@10 numbers come from [1].
That is a gap in the excerpt rather than in the work: the other two datasets and the three specific tokenizers are not spelled out, and anyone reproducing or procuring against this should ask the authors directly. The excerpt's table of contents also lists ablations, the number of semantic tokens per item, encoder depth allocation, and history length, so five research questions hang on variables a buyer would want pinned down.
Where the method fails
- It fails when item codes are not residual-quantized. Hash IDs, random IDs, or a single-level quantization of a collaborative-filtering vector have no coarse-to-fine level semantics, so same-level alignment is undefined.
- It does not apply when the tokenizer must keep changing. Refreshing the item catalogue means re-quantizing, and once the code mapping shifts, historical tokens are invalidated and the trained level encoders cannot be carried over.
- It is out of scope when a single level is too thin a view. Each target position reads only one of four levels and relies on the ILS summary to recover item semantics; where meaning depends on cross-level composition and single-level sequences are noisy, alpha must be pushed toward the item branch.
- The efficiency claim holds for LESSRec+ only. LESSRec itself still attends over all history tokens, so cost savings require accepting encoders split into level-specific groups.
- The evidence in the excerpt sits on recall-style metrics over public datasets, with no online A/B test and no cold-start or long-tail breakdown. That last point is my own reading, not a claim from the paper.
Back to the decision at the top. If your item codes really are multi-level residual-quantized semantic IDs and the model is already running, splitting history by level and aligning only within the target level is a supported upgrade whose changes concentrate in masks and attention branches [1]. If your IDs are single-level or hashed, the premise does not exist and there is nothing here worth re-architecting for.
