Trie-Aware Transformers for Generative Recommendation
Zhenxiang Xu, Sirui Chen, Yong He, Jieyu Yang, Chuan Yuan, Ke Ding, Jing Cao, Can Wang, Jiawei Chen
NeurIPS page · OpenReview · Open on the map
Category: LLM Reasoning, Memory & RAG › Generative Recommendation · Type: new method · Keywords: generative recommendation, hierarchical tokenization, tree-structured positional encoding, Transformer augmentation
Areas: Model Architectures & Sequence Modeling › Language Model Architectures › Transformer Memory and Reasoning
Summary
TrieRec introduces trie-aware positional encodings to incorporate hierarchical item structure into Transformers for generative recommendation, improving performance across multiple datasets.
Explained to a 5-year-old
People want to suggest items they might like next, like recommending a toy after playing with one. They turn each item into little words, and these words are organized like a tree, where some words are parts of others. Usually, computers just look at the words in order, like a line, and miss the tree shape. The new idea adds extra information about the tree structure to the computer’s reading. This helps the computer make better suggestions for what you might want next.
Explained to a 5-year-old, longer
When you shop online, sometimes the system suggests the next thing you might want to buy. To do this, the system turns each product into a series of small words, like letters in a puzzle. These words are arranged in a special way, like a tree, where some words belong to others. Usually, the computer reads the words just in a line, ignoring the tree shape. This can make the suggestions less accurate because the computer misses important relationships. The new idea adds extra clues about the tree structure to the computer’s reading. It tells the computer how deep each word is, which words are its parents, and which are its children. It also helps the computer understand how any two words are related in the tree. By using these extra clues, the computer can better understand which words go together. This leads to more helpful and accurate recommendations for the user. The method works with many different recommendation systems without needing extra setup. Overall, it makes the suggestion process smarter and more reliable.
For a technical reader
TrieRec enhances generative recommendation by adding two structural positional encodings to standard Transformers, preserving the hierarchical relationships inherent in tokenized items. It introduces an absolute encoding that captures a token’s depth, ancestors, and descendants, and a relative encoding that injects pairwise tree relations into self-attention. These biases allow the model to understand semantic connections induced by the item trie without requiring additional training or hyper-parameter tuning. The design is model-agnostic, so it can be plugged into existing GR backbones, and it achieved an average 8.83% lift on four real-world datasets. This approach offers a simple, efficient way to improve recommendation accuracy while keeping the system lightweight and easy to deploy.
Problem
Generative recommendation models often treat hierarchical item tokens as a flat sequence, ignoring the underlying tree structure that could capture semantic relationships. This can limit the effectiveness of token-level generation for next-item prediction.
Method
The approach augments Transformers with two structural positional encodings: an absolute encoding that incorporates a token's depth, ancestors, and descendants, and a relative encoding that injects pairwise structural relations into self-attention. This allows the model to capture topology-induced semantic relatedness while remaining model-agnostic and hyperparameter-free.
Results
The approach achieved an average improvement of 8.83% across four real-world datasets when integrated with three different generative recommendation backbones.
Contributions
It introduces structural inductive biases via trie-aware absolute and relative positional encodings that capture hierarchical item relationships, and demonstrates broad applicability across multiple recommendation models and datasets.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction