Efficient Swing Computation for Retrieval in Large-Scale Recommender Systems
AuthorsRunhao Jiang, Renchi Yang
AffiliationsHong Kong Baptist University, Hong Kong SAR, China
Resources
This paper makes massive-scale item recommendations much faster by approximating graph-based similarity scores without sacrificing retrieval quality.
Key results
Real user-item graph datasets used to evaluate ASC and K-ASC.
Average precision achieved by K-ASC for top-100 queries.
Milliseconds required for the MAG top-100 query.
Seconds required by exact Swing computation for the same query.
Speedup over exact Swing for item-to-item retrieval while retaining about 99% recall.
What the paper found
Swing measures item similarity through user-item-user structures, weighting each shared user pair by the inverse of their co-interacted item count, and is used in industrial item-to-item retrieval at companies including Alibaba, Kuaishou, and Shopee. This paper introduces Adaptive Swing Computation, or ASC, which combines Grouped Naïve Sampling, or GNS, for eliminating repeated pair intersections with User Subset Sampling, or USS, for estimating intersection cardinalities without materializing them. ASC adaptively selects between the estimators while providing probabilistic relative and additive error guarantees. Its top-K extension, K-ASC, uses filter-refinement: it cheaply generates candidates, identifies borderline items with empirical Bernstein bounds, and spends the remaining sampling budget only on those candidates. QFilter++ accelerates graph set operations through BSR encoding, SIMD-friendly filtering, and hardware popcount. Across 8 real datasets, including the billion-edge Yambda and MAG graphs, K-ASC achieves more than 99.9% average precision for top-100 queries on MAG in 1.5 milliseconds, compared with 8.5 seconds for exact computation. For item-to-item retrieval on MAG, it delivers over 4,000× speedup while retaining about 99% recall, demonstrating that Swing can remain accurate and practical at billion-scale interaction volumes.
Original abstract
Given a user-item graph $G$, a query item $v_q$ and a target item $v_t$, the Swing score $sw(v_q, v_t)$ of the item pair $(v_q, v_t)$ leverages the user-item-user interaction structure to evaluate their similarity. This measure is found to be highly effective in item-to-item (i2i) retrieval task and finds extensive applications in industrial-scale recommender systems. However, existing solutions towards computing Swing scores are either prohibitively expensive due to their quadratic time complexity w.r.t. the item degree, or rely on truncation heuristics that yield unsatisfactory quality, rendering them impractical particularly on graphs with billions of interactions. In this paper, we present ASC and $K$-ASC, two novel and efficient algorithms for approximate and top-$K$ Swing queries, to address the aforementioned limitations. Specifically, these algorithms provide rigorous theoretical guarantees in probabilistic relative and additive errors of Swing values. The basic idea of ASC is to combine two randomized algorithms, GNS and USS, in a simple yet non-trivial way to adaptively process high- and low-degree query items with minimal runtime cost. In particular, $K$-ASC offers practical efficiency and effectiveness for top-$K$ queries through a filter-refinement paradigm with carefully-designed heuristics. Extensive experiments over eight real datasets demonstrate that ASC and $K$-ASC can achieve orders of magnitude speed-up over competitors in terms of computational time while offering the same approximate and top-$K$ query result quality, and in particular, $K$-ASC is highly efficient on massive graphs including the billion-edge Yambda and MAG datasets.
Read the original paperMore in Graph Learning
Browse all 32 papers →CodeGraph: Open-Taxonomy Knowledge Graph for Source Code with Wikidata Grounding
Federico Pennino, Andrea Gurioli, Stefano Zacchiroli, Maurizio Gabbrielli, Paolo Ferragina
CodeGraph turns 167 million source files into a Wikidata-grounded knowledge graph of algorithms, paradigms, patterns, and software domains.
GraphWrit3R: End-to-End 3D Scene Graph Writing
Luka Milivojevic, Nikola Popovic, Sayan Deb Sarkar, Sebastian Koch, Iro Armeni, Luc Van Gool, Danda Pani Paudel
GraphWrit3R turns 3D spatial data into open-vocabulary scene graphs using multimodal encoders and an LLM, without requiring ground-truth object annotations at inference.
Statistical Inference for Causal Discovery under Selection and Latent Variables via Single-Target Interventions
Xiaotian Hou, Kwangmoon Park, Hongzhe Li
This work shows how a small, carefully designed set of single-variable interventions can recover causal structure even when hidden confounders and selection bias complicate the data.