Two-tower models are a prevalent matching framework for recommendation, which have been widely deployed in industrial applications. The success of two-tower matching attributes to its efficiency in retrieval among a large number of items, since the item tower can be precomputed and used for fast Approximate Nearest Neighbor (ANN) search. However, it suffers two main challenges, including limited feature interaction capability and reduced accuracy in online serving. Existing approaches attempt to design novel late interactions instead of dot products, but they still fail to support complex feature interactions or lose retrieval efficiency. To address these challenges, we propose a new matching paradigm named SparCode, which supports not only sophisticated feature interactions but also efficient retrieval. Specifically, SparCode introduces an all-to-all interaction module to model fine-grained query-item interactions. Besides, we design a discrete code-based sparse inverted index jointly trained with the model to achieve effective and efficient model inference. Extensive experiments have been conducted on open benchmark datasets to demonstrate the superiority of our framework. The results show that SparCode significantly improves the accuracy of candidate item matching while retaining the same level of retrieval efficiency with two-tower models. Our source code will be available at MindSpore/models.
翻译:双塔模型是推荐系统中一种主流的匹配框架,已在工业应用中广泛部署。双塔匹配的成功归因于其在海量物品检索中的高效性,因为物品塔可以预计算并用于快速近似最近邻(ANN)搜索。然而,它面临两大挑战:有限的特征交互能力和在线服务时准确度下降的问题。现有方法尝试设计新颖的延迟交互(替代点积),但仍无法支持复杂的特征交互或损失了检索效率。为解决这些挑战,我们提出一种名为SparCode的新匹配范式,它不仅支持复杂的特征交互,还能实现高效检索。具体而言,SparCode引入了一个全对全交互模块来建模细粒度的查询-物品交互。此外,我们设计了一个基于离散编码的稀疏倒排索引,与模型联合训练,以实现有效且高效的模型推理。在公开基准数据集上的大量实验证明了我们框架的优越性。结果表明,SparCode在显著提升候选物品匹配准确度的同时,保持了与双塔模型相同的检索效率。我们的源代码将发布在MindSpore/models。