[论文解读] CollectiveKV: Decoupling and Sharing Collaborative Information in Sequential Recommendation
CollectiveKV 将 KV 缓存解耦为面向用户的部分和跨用户的共享部分,通过全局 KV 池和路由器学习,以在不牺牲多模型序列推荐准确性的前提下压缩 KV 缓存并降低延迟。
Sequential recommendation models are widely used in applications, yet they face stringent latency requirements. Mainstream models leverage the Transformer attention mechanism to improve performance, but its computational complexity grows with the sequence length, leading to a latency challenge for long sequences. Consequently, KV cache technology has recently been explored in sequential recommendation systems to reduce inference latency. However, KV cache introduces substantial storage overhead in sequential recommendation systems, which often have a large user base with potentially very long user history sequences. In this work, we observe that KV sequences across different users exhibit significant similarities, indicating the existence of collaborative signals in KV. Furthermore, we analyze the KV using singular value decomposition (SVD) and find that the information in KV can be divided into two parts: the majority of the information is shareable across users, while a small portion is user-specific. Motivated by this, we propose CollectiveKV, a cross-user KV sharing mechanism. It captures the information shared across users through a learnable global KV pool. During inference, each user retrieves high-dimensional shared KV from the pool and concatenates them with low-dimensional user-specific KV to obtain the final KV. Experiments on five sequential recommendation models and three datasets show that our method can compress the KV cache to only 0.8% of its original size, while maintaining or even enhancing model performance.
研究动机与目标
- 为实现低延迟约束,推动在长序列序列推荐中对 KV 缓存进行压缩的需求。
- 识别 KV 表示中的跨用户相似性并量化其可共享性。
- 提出 CollectiveKV 框架,将 KV 解耦为用户特定成分和可学习的全局 KV 池的集体成分。
- 设计路由器和损失函数以学习跨用户 KV 索引,并确保对池的使用保持平衡且有意义。
- 证明 CollectiveKV 在多种模型和数据集上实现压缩的同时维持或提升准确性。
提出的方法
- 使用余弦相似性和 SVD 分析跨用户的 K/V 相似性,表明大部分信息是可共享的。
- 通过 SVD 将 KV 分解为主成分(共享)和残差分量(用户特定),并量化可共享性。
- 引入全局 KV 池和按用户的路由器,检索集体 KV/V 索引并与用户特定 KV 拼接。
- 在推理阶段,将 K_u 和 K_c 拼接形成最终 K,V;训练阶段采用基于 sigmoid 的路由,并使用峰值和负载均衡损失实现可学习、平衡的共享。
- 提供两阶段推理(预填充和解码),将 KV 计算分离以降低延迟。
- 在五个序列模型(目标注意力和自注意力)上的三个长序列 CTR 数据集进行评估。

实验结果
研究问题
- RQ1键和值是否在跨用户层面表现出足够的相似性,从而在序列推荐中实现 KV 共享?
- RQ2跨用户的 KV 信息有多大比例是可共享的,相对于用户特定信息如何量化?
- RQ3可学习的全局 KV 池加路由器能否在保持或提升推荐性能的同时有效压缩 KV 缓存?
- RQ4与标准 KV 缓存在实时推理中的延迟相比,CollectiveKV 的影响如何?
- RQ5用户特定 KV 维度和全局池容量的最佳平衡对性能与压缩有何影响?
主要发现
- 跨用户的 KV 序列在 K 和 V 表示上显示出显著的跨用户相似性。
- 基于 SVD 的分解表明主成分 K/V 捕获了大部分信息(高共享性),而残差 K/V 大体上是用户特定的。
- CollectiveKV 将 KV 缓存压缩至原始大小的最低 0.8%(压缩),并且在模型和数据集上可维持或提升 GAUC/AUC/Logloss。
- 具有学习路由索引的全局 KV 池使在解码阶段高效检索集体 KV/V,相较于传统 KV 缓存显著降低延迟(例如批量大小扩展的结果)。
- 随着批量大小的增加,CollectiveKV 的延迟增速比 KV 缓存要慢得多(例如从 1 增至 512 时,KV 缓存延迟从 0.099ms 上升至 32.991ms,而 CollectiveKV 为 0.084ms 上升至 0.695ms)。
- 在数据集之间,用户特定 KV 的维度与共享 KV 容量之间的最佳平衡不同;通常较小的用户特定 KV 能获得更好的性能,随着其增大收益递减。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。