arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.39273cs.IR
收藏

PFA:在长序列生成式推荐中可逐步聚焦的注意力机制

PFA: Attention Can Be Progressively Focused in Long-Sequence Generative Recommendation

Alibaba International Digital Commerce Group(阿里巴巴国际数字商业集团);Zhejiang University(浙江大学)

Pengjie Zhou, Weiqin Yang, Haibo Xing, Hao Deng, Jinxin Hu

AI总结:

本研究针对长序列生成式推荐的解码延迟问题,提出逐步聚焦注意力(PFA)框架,通过跨束排序与几何级token预算缩减,在保留关键语义的同时提升性能并降低延迟。

摘要:

长用户行为序列可提升生成式推荐(GR)的性能,但在自回归束搜索解码过程中对长历史序列计算全注意力会产生显著的在线推理延迟。为加速长序列解码,现有方法通常依赖静态历史压缩或动态top-k稀疏注意力;然而前者存在丢失关键语义的风险,后者则因重复的token选择和非连续内存访问产生显著开销。本研究深入分析GR解码过程中的注意力模式,揭示两个关键特性:(i)逐步注意力聚焦,即注意力会逐步聚焦于一小部分关键历史token;(ii)跨步排序一致性,即这些token的重要性排序在后续解码步骤中保持相对稳定。基于这些发现,我们提出逐步聚焦注意力(PFA),一种用于长序列GR的高效稀疏解码框架。PFA在初始解码步骤保留全注意力以探索全局历史偏好,随后通过跨束加权聚合建立共享重要性排序,并将所选token的键值缓存重新排序为连续内存布局。后续解码步骤复用该排序并按几何级数减少token预算,在保留关键语义的同时降低计算与内存访问开销。在两个公开基准和一个大规模工业数据集上的大量实验表明,PFA优于现有最先进的基线方法;在某大规模电商广告平台进行的7天在线A/B测试进一步证实,PFA在保持低推理延迟的同时带来了显著的业务收益。我们的代码可在此URL获取。

英文摘要:

Long user behavioral sequences improve the performance of generative recommendation (GR), but computing full attention over long histories during autoregressive beam search decoding incurs substantial online inference latency. To accelerate long-sequence decoding, existing approaches typically rely on static history compression or dynamic top-k sparse attention; however, the former risks losing critical semantics, whereas the latter incurs significant overhead from repeated token selection and non-contiguous memory access. In this work, we thoroughly analyze attention patterns during GR decoding and reveal two key properties: (i) progressive attention focusing, where attention progressively focuses on a small subset of critical historical tokens; and (ii) cross-step ranking consistency, where their importance rankings remain relatively stable across subsequent decoding steps. Motivated by these observations, we propose Progressively Focused Attention (PFA), an efficient sparse decoding framework for long-sequence GR. PFA retains full attention at the initial decoding step to explore global historical preferences. It then establishes a shared importance ranking through cross-beam weighted aggregation and reorders the key-value cache of the selected tokens into a contiguous memory layout. Subsequent decoding steps reuse this ranking and geometrically reduce the token budget, preserving critical semantics while lowering computational and memory access overhead. Extensive experiments on two public benchmarks and a large-scale industrial dataset demonstrate that PFA outperforms state-of-the-art baselines. A 7-day online A/B test on a large-scale e-commerce advertising platform further confirms that PFA delivers substantial business gains while maintaining low inference latency. Our code is publicly available at https://anonymous.4open.science/r/PFA-review-088D.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑