[Paper Review] Dimension Independent Similarity Computation
This paper introduces DISCO, a dimension-independent framework for computing pairwise similarities (cosine, Jaccard, Dice, overlap) between high-dimensional sparse vectors using efficient sampling in MapReduce. It achieves shuffle size and reduce-key complexity independent of dimension N, reducing communication costs by up to 99.8% while ensuring higher similarity pairs are estimated with better accuracy, validated at scale on Twitter data with production deployment.
We present a suite of algorithms for Dimension Independent Similarity Computation (DISCO) to compute all pairwise similarities between very high dimensional sparse vectors. All of our results are provably independent of dimension, meaning apart from the initial cost of trivially reading in the data, all subsequent operations are independent of the dimension, thus the dimension can be very large. We study Cosine, Dice, Overlap, and the Jaccard similarity measures. For Jaccard similiarity we include an improved version of MinHash. Our results are geared toward the MapReduce framework. We empirically validate our theorems at large scale using data from the social networking site Twitter. At time of writing, our algorithms are live in production at twitter.com.
Motivation & Objective
- To address the scalability challenge of computing all-pairs similarities in high-dimensional sparse vector spaces, where traditional methods scale poorly with dimension N.
- To design a sampling-based framework that achieves computational complexity independent of dimension N, enabling tractable processing on massive datasets.
- To ensure high accuracy for highly similar pairs—critical for applications like collaborative filtering and keyword expansion—by leveraging dimension-independent error bounds.
- To provide a practical, production-ready solution deployable in distributed systems like MapReduce, validated on real-world Twitter data.
Proposed method
- The DISCO framework uses a novel sampling strategy that samples vector entries based on their magnitude and a background model of known vector norms, enabling dimension-independent computation.
- For each similarity measure (cosine, Dice, overlap, Jaccard), the method constructs estimators whose expected values equal the true similarity, with variance controlled via sampling parameters.
- An improved MinHash variant is introduced for Jaccard similarity, with theoretical bounds showing it closely mimics standard MinHash while enabling dimension-independent processing.
- The framework operates under the MapReduce model, minimizing shuffle size and reduce-key complexity by ensuring each reducer receives only O(log D / ε) values per key, independent of N.
- The sampling scheme is designed so that higher similarity pairs are estimated with lower error, making it ideal for threshold-based similarity search.
- A background model is used to store known vector magnitudes, avoiding repeated computation, with a streaming extension that adds only a logarithmic memory cost.
Experimental results
Research questions
- RQ1Can all-pair similarity computation be made provably independent of data dimension N while maintaining high accuracy?
- RQ2Can shuffle size and reduce-key complexity in MapReduce be reduced to be independent of dimension N without sacrificing accuracy?
- RQ3Does the sampling strategy improve estimation accuracy for highly similar pairs, as required in real-world applications like collaborative filtering?
- RQ4Can the framework be generalized to multiple similarity measures (cosine, Jaccard, Dice, overlap) with a unified, scalable approach?
- RQ5How does the framework perform in practice on real-world, high-dimensional data at scale, such as Twitter user follow graphs?
Key findings
- The DISCO framework reduces shuffle size to O(DL log D / ε), independent of dimension N, achieving up to 99.8% reduction compared to the naive O(NL²) approach on Twitter-scale data.
- Reduce-key complexity is bounded by O(log D / ε) per key, making it feasible even for very large datasets, with no dependence on N.
- Error for all similarity measures (cosine, Dice, overlap, Jaccard) decreases for higher similarity pairs, with error on pairs ≥ ε decreasing by up to 99.8% in shuffle size reduction.
- The improved MinHash variant in DISCO closely mimics standard MinHash, with theoretical bounds confirming its accuracy and dimension independence.
- Empirical results on Twitter data show that DISCO maintains high accuracy while drastically reducing communication costs, with results validated against ground truth on subsets.
- The framework is deployed in production at Twitter.com, demonstrating real-world scalability and utility in live systems for user similarity and keyword suggestion.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.