Cache locality is not enough
Authors:
Open Access
- 1 December 2015
- journal article
- Published by Association for Computing Machinery (ACM) in Proceedings of the VLDB Endowment
- Vol. 9 (4) , 288-299
Abstract
Nearest Neighbor (NN) search in high dimension is an important feature in many applications (e.g., image retrieval, multimedia databases). Product Quantization (PQ) is a widely used solution which offers high performance, i.e., low response time while preserving a high accuracy. PQ represents high-dimensional vectors (e.g., image descriptors) by compact codes. Hence, very large databases can be stored in memory, allowing NN queries without resorting to slow I/O operations. PQ computes distances to neighbors using cache-resident lookup tables, thus its performance remains limited by (i) the many cache accesses that the algorithm requires, and (ii) its inability to leverage SIMD instructions available on modern CPUs. In this paper, we advocate that cache locality is not sufficient for efficiency. To address these limitations, we design a novel algorithm, PQ Fast Scan, that transforms the cache-resident lookup tables into small tables, sized to fit SIMD registers. This transformation allows (i) in-register lookups in place of cache accesses and (ii) an efficient SIMD implementation. PQ Fast Scan has the exact same accuracy as PQ, while having 4 to 6 times lower response time (e.g., for 25 million vectors, scan time is reduced from 74ms to 13ms).Keywords
This publication has 22 references indexed in Scilit:
- SK-LSHProceedings of the VLDB Endowment, 2014
- Optimized Product QuantizationIEEE Transactions on Pattern Analysis and Machine Intelligence, 2013
- Multi-core, main-memory joinsProceedings of the VLDB Endowment, 2013
- Magnetic signaling controlNature Methods, 2013
- Sort vs. Hash revisitedProceedings of the VLDB Endowment, 2009
- Aerobic Oxidation of Alcohols with Carbon-Supported Pt CatalystSynfacts, 2008
- Efficient implementation of sorting on multi-core SIMD CPU architectureProceedings of the VLDB Endowment, 2008
- Experiencing SAX: a novel symbolic representation of time seriesData Mining and Knowledge Discovery, 2007
- Database compressionACM SIGMOD Record, 1993
- Least squares quantization in PCMIEEE Transactions on Information Theory, 1982