Large Scale Product Graph Construction for Recommendation in E-commerce

Xiaoyong Yang, Yadong Zhu, Yi Zhang, Xiaobo Wang, Quan Yuan · DOI

Abstract

Building a recommendation system that serves billions of users on daily basis is a challenging problem, as the system needs to make astronomical number of predictions per second based on real-time user behaviors with O(1) time complexity. Such kind of large scale recommendation systems usually rely heavily on pre-built index of products to speedup the recommendation service so that online user waiting time is un-noticeable. One important indexing structure is the product-product index, where one can retrieval a list of ranked products given a seed product. The index can be viewed as a weighted product-product graph. In this paper, we present our novel technologies to efficiently build such kind of indexed product graphs. In particular, we propose the Swing algorithm to capture the substitute relationships between products, which can utilize the substructures of user-item click bi-partitive graph. Then we propose the Surprise algorithm for the modeling of complementary product relationships, which utilizes product category information and solves the sparsity problem of user co-purchasing graph via clustering technique. Base on these two approaches, we can build the basis product graph for recommendation in Taobao. The approaches are evaluated comprehensively with both offline and online experiments, and the results demonstrate the effectiveness and efficiency of the work.

Introduction

In a giant marketplace like Taobao, recommendation systems must make millions of predictions per second. To achieve $O(1)$ time complexity during a live user session, these systems rely on pre-built indices—essentially a graph where one product points to a list of related ones. However, building this graph at scale is difficult due to noise from accidental clicks, extreme data sparsity in purchase history, and the need to distinguish between different types of product relationships (substitutes vs. complements).

The Swing Algorithm: Identifying Substitutes

Traditional collaborative filtering (CF) calculates similarity based on how many users clicked both Item A and Item B. The Swing algorithm goes deeper by looking for "quasi-local" structures in the user-item bipartite graph. A "swing" occurs when two users share a common interest in multiple items. If User 1 and User 2 both clicked Item A and Item B, the relationship between A and B is much stronger than if they only shared one click. The algorithm also penalizes "hyperactive" users whose broad clicking behavior is less indicative of specific product similarity.

Figure 1: Similar products, such as these shirts, are identified as substitutes by the Swing algorithm.

The Surprise Algorithm: Identifying Complements

Complementary relationships (like a phone and its case) are harder to find because purchase data is sparse. The Surprise algorithm solves this in three steps:

  1. Category-level relevance: It identifies which categories are naturally related (e.g., "Mobile Phones" and "Phone Shells").
  2. Product-level relevance: It uses purchase sequences with a time-decay factor, recognizing that buying Item B shortly after Item A is a strong signal of complementarity.
  3. Cluster-level relevance: To fix the sparsity problem, it uses the Swing graph to cluster similar items together. If many people buy items from Cluster Y after buying Item A, then all items in Cluster Y are considered potential complements for A.
Figure 2: The Surprise algorithm identifies complementary items, such as trousers, to complete a user's purchase.

Experimental Results

The algorithms were tested on a massive dataset from Taobao involving over 400 million users and 500 million products.

  • Offline Performance: Swing achieved a 67.6% improvement in Precision and a 46.1% improvement in Recall over standard item-based CF. The Surprise algorithm's clustering step outperformed a version without clustering by 27.9% in CTR, proving its necessity for sparse data.
  • Online Impact: In live traffic on the Taobao mobile app, the Swing algorithm increased Click-Through Rate (CTR) by up to 9.3% and Conversion Rate (CVR) by 17.6%.
  • Efficiency: Despite the scale, the authors implemented these via Map-Reduce, allowing them to cluster billions of items in just 15 minutes.

Conclusion

By focusing on the underlying topology of user behavior and leveraging cross-category clustering, the Swing and Surprise algorithms significantly improve recommendation quality at scale. Future work will focus on incorporating content-based features like text and images to further refine these product relationships.

Summary updated

BibTeX
@misc{yang2020large,
  author = {Xiaoyong Yang and Yadong Zhu and Yi Zhang and Xiaobo Wang and Quan Yuan},
  title = {{Large Scale Product Graph Construction for Recommendation in E-commerce}},
  year = {2020},
  eprint = {2010.05525},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.05525},
}
Figure