# Diamond Sampling for Approximate Maximum All-pairs Dot-product (MAD) Search

arXiv: https://arxiv.org/abs/1506.03872 · HTML: https://mlsanity.com/paper/1506.03872/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 11 Jun 2015.

## Built on by (most cited first, 3 of 3)

- [Faster Maximum Inner Product Search in High Dimensions](https://mlsanity.com/paper/2212.07551/) (2022)
- [Minimizing low-rank models of high-order tensors: Hardness, span, tight relaxation, and applications](https://mlsanity.com/paper/2210.11413/) (2022)
- [SAH: Shifting-aware Asymmetric Hashing for Reverse k-Maximum Inner Product Search](https://mlsanity.com/paper/2211.12751/) (2022)

## Abstract (arXiv)

Given two sets of vectors, A = a1, dots, am and B=b1,dots,bn, our problem is to find the top-t dot products, i.e., the largest |ai·bj| among all possible pairs. This is a fundamental mathematical problem that appears in numerous data applications involving similarity search, link prediction, and collaborative filtering. We propose a sampling-based approach that avoids direct computation of all mn dot products. We select diamonds (i.e., four-cycles) from the weighted tripartite representation of A and B. The probability of selecting a diamond corresponding to pair (i,j) is proportional to (ai·bj)2, amplifying the focus on the largest-magnitude entries. Experimental results indicate that diamond sampling is orders of magnitude faster than direct computation and requires far fewer samples than any competing approach. We also apply diamond sampling to the special case of maximum inner product search, and get significantly better results than the state-of-the-art hashing methods.
