Short-video recommenders such as Douyin must exploit extremely long user histories without breaking latency or cost budgets. We present an end-to-end system that scales long-sequence modeling to 10k-length histories in production. First, we introduce Stacked Target-to-History Cross Attention (STCA), which replaces history self-attention with stacked cross-attention from the target to the history, reducing complexity from quadratic to linear in sequence length and enabling efficient end-to-end training. Second, we propose Request Level Batching (RLB), a user-centric batching scheme that aggregates multiple targets for the same user/request to share the user-side encoding, substantially lowering sequence-related storage, communication, and compute without changing the learning objective. Third, we design a length-extrapolative training strategy -- train on shorter windows, infer on much longer ones -- so the model generalizes to 10k histories without additional training cost. Across offline and online experiments, we observe predictable, monotonic gains as we scale history length and model capacity, mirroring the scaling law behavior observed in large language models. Deployed at full traffic on Douyin, our system delivers significant improvements on key engagement metrics while meeting production latency, demonstrating a practical path to scaling end-to-end long-sequence recommendation to the 10k regime.
翻译:抖音等短视频推荐系统需要在不超过延迟与成本预算的前提下,利用超长用户行为序列。我们提出了一套端到端系统,在生产环境中将长序列建模扩展至万级历史长度。首先,我们引入堆叠式目标到历史交叉注意力(STCA),以目标到历史间的堆叠交叉注意力替代历史自注意力,将序列长度的计算复杂度从二次方降为线性,并支持高效的端到端训练。其次,我们提出请求级批处理(RLB)——一种以用户为中心的批处理方案,通过聚合同一用户/请求的多个目标以共享用户端编码,在保持学习目标不变的前提下显著降低序列相关的存储、通信与计算开销。第三,我们设计了长度外推训练策略——在较短窗口上训练,在更长窗口上推理——使模型无需额外训练成本即可泛化至万级历史长度。在离线与在线实验中,我们观察到随着历史长度与模型容量的扩展,性能呈现可预测的单调提升,这与大语言模型中观察到的规模法则行为一致。该模型已在抖音全量流量部署,在满足生产环境延迟要求的同时显著提升了关键参与度指标,为端到端长序列推荐系统扩展至万级规模提供了可行路径。