Table of Contents
Fetching ...

APAO: Adaptive Prefix-Aware Optimization for Generative Recommendation

Yuanqing Yu, Yifan Wang, Weizhi Ma, Zhiqiang Guo, Min Zhang

TL;DR

The Adaptive Prefix-Aware Optimization (APAO) framework is proposed, which introduces prefix-level optimization losses to better align the training objective with the inference setting and designs an adaptive worst-prefix optimization strategy that dynamically focuses on the most vulnerable prefixes during training, thereby enhancing the model's ability to retain correct candidates under beam search constraints.

Abstract

Generative recommendation has recently emerged as a promising paradigm in sequential recommendation. It formulates the task as an autoregressive generation process, predicting discrete tokens of the next item conditioned on user interaction histories. Existing generative recommendation models are typically trained with token-level likelihood objectives, such as cross-entropy loss, while employing multi-step beam search during inference to generate ranked item candidates. However, this leads to a fundamental training-inference inconsistency: standard training assumes ground-truth history is always available, ignoring the fact that beam search prunes low-probability branches during inference. Consequently, the correct item may be prematurely discarded simply because its initial tokens (prefixes) have low scores. To address this issue, we propose the Adaptive Prefix-Aware Optimization (APAO) framework, which introduces prefix-level optimization losses to better align the training objective with the inference setting. Furthermore, we design an adaptive worst-prefix optimization strategy that dynamically focuses on the most vulnerable prefixes during training, thereby enhancing the model's ability to retain correct candidates under beam search constraints. We provide theoretical analyses to demonstrate the effectiveness and efficiency of our framework. Extensive experiments on multiple datasets further show that APAO consistently alleviates the training-inference inconsistency and improves performance across various generative recommendation backbones. Our codes are publicly available at https://github.com/yuyq18/APAO.

APAO: Adaptive Prefix-Aware Optimization for Generative Recommendation

TL;DR

The Adaptive Prefix-Aware Optimization (APAO) framework is proposed, which introduces prefix-level optimization losses to better align the training objective with the inference setting and designs an adaptive worst-prefix optimization strategy that dynamically focuses on the most vulnerable prefixes during training, thereby enhancing the model's ability to retain correct candidates under beam search constraints.

Abstract

Generative recommendation has recently emerged as a promising paradigm in sequential recommendation. It formulates the task as an autoregressive generation process, predicting discrete tokens of the next item conditioned on user interaction histories. Existing generative recommendation models are typically trained with token-level likelihood objectives, such as cross-entropy loss, while employing multi-step beam search during inference to generate ranked item candidates. However, this leads to a fundamental training-inference inconsistency: standard training assumes ground-truth history is always available, ignoring the fact that beam search prunes low-probability branches during inference. Consequently, the correct item may be prematurely discarded simply because its initial tokens (prefixes) have low scores. To address this issue, we propose the Adaptive Prefix-Aware Optimization (APAO) framework, which introduces prefix-level optimization losses to better align the training objective with the inference setting. Furthermore, we design an adaptive worst-prefix optimization strategy that dynamically focuses on the most vulnerable prefixes during training, thereby enhancing the model's ability to retain correct candidates under beam search constraints. We provide theoretical analyses to demonstrate the effectiveness and efficiency of our framework. Extensive experiments on multiple datasets further show that APAO consistently alleviates the training-inference inconsistency and improves performance across various generative recommendation backbones. Our codes are publicly available at https://github.com/yuyq18/APAO.
Paper Structure (34 sections, 3 theorems, 24 equations, 5 figures, 5 tables)

This paper contains 34 sections, 3 theorems, 24 equations, 5 figures, 5 tables.

Key Result

Theorem 1

Optimizing the prefix-aware loss (Eq. (equ:overall_loss)) essentially optimizes a lower bound of the ranking metric (e.g., recall) under beam search. Therefore, optimizing the prefix-aware loss improves the ranking performance in the beam search setting.

Figures (5)

  • Figure 1: Analysis of Beam Search. (a) Illustration of the beam search inference process. (b) Efficiency comparison: Beam Search vs. Full Sorting. (c) Retention of global Top-20 items: Our method (green) effectively prevents the early discarding of optimal items observed in the baseline (yellow).
  • Figure 2: Ablation analysis on the Beauty dataset using the Llama backbone. Similar trends are observed across other datasets.
  • Figure 3: Parameter sensitivity analysis of APAO-pointwise and APAO-pairwise with respect to hyperparameters $\beta$ and $\eta$ on the Beauty dataset. The experiments are conducted on two generative backbones: TIGER (left) and Llama (right).
  • Figure 4: Scalability analysis of beam size $K$ on the Beauty and Yelp datasets.
  • Figure 5: Prefix-level Recall@20 and relative improvement on the Office and Beauty dataset. The left axis represents absolute recall, and the right axis denotes the relative improvement over the best baseline across prefixes 0–3 (prefix 3 corresponds to the complete item).

Theorems & Definitions (3)

  • Theorem 1: Optimization Consistency
  • proposition 1: Closed-form update via KKT
  • Theorem 2: Optimization Consistency