๐ค AI Summary
This work addresses a critical limitation in existing generative recommendation methods: the neglect of how decoding trie structures influence the efficiency and accuracy of constrained beam search when constructing textual item identifiers. To overcome this, the authors propose BONSAI, a novel framework that jointly optimizes adaptive-length textual identifiers and the underlying trie structure by introducing two key propertiesโvariable identifier length and shallow, constrained branching factor. Through a synergistic design combining informative term extraction, minimum set cover modeling, and a recursive trie construction algorithm, BONSAI significantly enhances the performance of large language models in generative recommendation. Extensive experiments demonstrate that the method outperforms state-of-the-art baselines by up to 21.6% across multiple benchmarks, confirming its effectiveness and strong generalization capability.
๐ Abstract
Generative recommendation (GR) is an increasingly popular paradigm in recommender systems, with a prominent line of work using LLMs as autoregressive backbones to predict the next item's term IDs (e.g., titles or keywords). The success of autoregressive generation hinges on constrained beam search over a decoding trie to ensure that generated outputs correspond to valid items. However, current research predominantly focuses on generating more comprehensive term IDs to describe items, while largely neglecting the structural design of the decoding trie formed by these terms. This can lead to a trie that is poorly suited to beam search, which degrades performance. To address this, we examine the effectiveness of term IDs from the perspective of decoding trie optimization. Through empirical and theoretical analyses, we identify two desirable properties for a highly performant trie: (1) adaptive and variable ID length, enabling items with varying semantic richness to be represented by IDs of appropriate lengths, and (2) constrained branching factors, especially at shallow levels, which drastically improves the success rate of constrained beam search. Motivated by these properties, we introduce BONSAI: Branching-Optimized Node Structure for Adaptive Identifiers, a novel framework that co-designs textual term IDs and their underlying decoding trie. BONSAI extracts recommendation-informative words from item metadata and employs a minimum set cover formulation to recursively build a trie that satisfies the above properties. Experiments reveal that BONSAI achieves up to a 21.6% relative improvement over state-of-the-art baselines. Further analyses confirm the crucial role of our proposed properties, and demonstrate their generalizability to be applied to enhance the performance of other term ID methods.