Problem
A marketplace has an effectively unlimited assortment, and the same product arrives from several sellers under different names and descriptions ("console", "set-top box"). The platform has to merge such listings into groups attached to one product card. Sellers use the groups to compare their offers with analogs and competitors, and buyers get alternatives by price and availability. A wrong merge puts different products into one card, so the target is precision of 97% or higher with maximum recall.
Example from the article: Megamarket grouped a sample of 6 million products and tuned thresholds on it; a second sample of similar size served as the test set.
Solution in brief
Run product matching on the catalog against itself, keep only pairs whose score passes a threshold, and treat the kept pairs as a weighted graph. Cluster the graph with a community detection algorithm. The team compared several algorithms, found surprise_community from CDLib best on recall at 0.97 precision, and showed that pair filtering before clustering matters a lot.
Questions this case answers
- How to turn pairwise same-entity scores into entity groups at very high precision when a few false links can merge distinct groups
- How to choose a graph clustering algorithm when the number of groups is unknown, edges are weighted and the graph has millions of nodes
- How to merge identical or near-identical marketplace products from different sellers into groups attached to one card?
- How to choose a community detection algorithm for a graph of millions of product-to-product similarity links?
Tools and methods
- Product matching — scores candidate pairs with an image model, a text bi-encoder with FAISS, a cross-encoder reranker and CatBoost on top
- Louvain — modularity-based community detection, the suggested starting point
- Label propagation (semi-synchronous) — used in the team's research
- surprise_community (CDLib) — best recall at 0.97 precision
- CDLib, NetworkX, igraph — library and graph objects for running and comparing algorithms
Google or a one-time email code. No password.
