arXiv:2607.25110cs.IRcs.LG2026-07

让推荐模型在训练时就内置缓存,解决部署与训练的表示不一致问题。

Memory Layer: Train the In-Model Cache for Recommendation Models

  • 训练时同步写入物品嵌入,推理时直接读取,统一表示来源。
  • 覆盖率从96%提升至100%,嵌入更新延迟从5分钟缩短至20秒。
  • 减少计算冗余,冷启动内容点击率提升5-6%,适合大规模推荐系统部署。

推荐系统早期排序阶段会预先计算物品嵌入并将其缓存在模型中以满足严格延迟要求。由于该缓存仅存在于推理阶段,不在训练循环中,导致训练与推理使用不同的物品表示,造成结构差异,限制性能并增加运维复杂性。我们提出通过联合设计训练与推理路径,从源头消除这一表示差异。引入记忆层(memory layer),一种与模型共同训练的键值嵌入缓存:物品塔在训练时写入嵌入,模型在推理时读取,构建统一的物品表示源。始终启用的嵌入覆盖未缓存物品,确保所有物品都有预测结果;该设计将三个独立的训练到预测更新路径整合为单一自包含流程。在Instagram Reels上线后,预测覆盖率从96%提升至100%,嵌入新鲜度从O(5分钟)提升至O(20秒),训练-推理归一化熵(NE)差距缩小高达86%,对最新内容的召回率提升超2倍,冷启动内容互动率提升5-6%。因嵌入在训练时生成,无需额外批量评估或发布前重计算,训练与发布计算成本降低30%,且不影响推理计算开销。

原文摘要 · Abstract (English)

Early ranking stages in recommendation systems precompute item embeddings and cache them in-model for scoring within strict latency constraints. Because this cache exists only at serving time, outside the training loop, training and serving use different item representations, a structural discrepancy that limits quality and adds operational fragility. We show that co-designing the training and serving paths removes this representation discrepancy at its source. We introduce the memory layer, an in-model key-value embedding cache co-trained with the model: the item tower writes embeddings during training and the model reads them at serving, one source of truth for item representations by construction. Always-on embeddings cover items not yet cached, so every item receives a prediction, and the design consolidates three separate trainer-to-predictor update paths into a single self-contained pipeline. Deployed in production on Instagram Reels, the memory layer raises prediction coverage from 96% to 100%, improves embedding freshness from $O(5\text{ min})$ to $O(20\text{ s})$, and narrows the training-serving Normalized Entropy (NE) gap by up to 86%, yielding over $2\times$ recall for the freshest content and a 5-6% cold start engagement lift. Because embeddings are produced during training, the system needs no separate bulk-evaluation or publish-time recomputation, cutting training-and-publish computational cost by 30% at neutral serving computational cost.

推荐系统嵌入缓存模型一致性冷启动

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。