← Back to AI Engineering Mind Map
中文·English
🤖 AI EngineeringID: adc-distance-computation

ADC Asymmetric Distance Computation

ADC 非对称距离计算
🎯Core Definition
Asymmetric Distance Computation (ADC) is a lookup-table acceleration algorithm in Product Quantization (PQ) that evaluates Euclidean distance or dot product between an unquantized query vector q∈RDq \in \mathbb{R}^D and a quantized database vector x^∈RD\hat{x} \in \mathbb{R}^D; at query onset, it pre-computes distances between query sub-vectors qmq_m and all K=256K=256 centroids cm,kc_{m, k} into a Look-Up Table (LUT: size M×256M \times 256), enabling database vector distance estimation via MM fast table lookups and additions ∑m=1MLUT[m][codem]\sum_{m=1}^M \text{LUT}[m][\text{code}_m].
💡Use Cases
High-throughput scanning and re-ranking of millions of candidate vectors within IVF-PQ buckets in vector databases (Faiss, Milvus).
⚡Key Problems Solved
Symmetric Distance Computation (SDC) quantizes both query and database vectors, compounding quantization error and destroying recall; ADC retains full FP32 query precision, converting DD floating-point multiplications into MM nanosecond table lookups, multiplying scanning throughput by 20x+ with minimal error.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of ADC Asymmetric Distance Computation.
Use Cases
In production engineering, what are the primary use cases for ADC Asymmetric Distance Computation and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Derive the ADC distance formula d(q,x^)2=∑m=1M∥qm−cm,codem(x)∥2d(q, \hat{x})^2 = \sum_{m=1}^M \|q_m - c_{m, \text{code}_m(x)}\|^2 and its computational complexity?
2
Why is LUT pre-computation complexity O(K⋅D)O(K \cdot D) negligible for single-query latency?
3
Quantify the differences between ADC and SDC in CPU L1/L2 cache hit rate and reconstruction accuracy?
4
How can CPU SIMD instructions (`_mm256_shuffle_epi8`) parallelize 16-byte LUT batch lookups?
5
How should the LUT be organized in GPU shared memory to prevent bank conflicts during batched ADC scans?
Updated 2026-08-14
🎯
Test Your Knowledge: Practice Questions for "ADC Asymmetric Distance Computation"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice ➔
← Previous CardProduct Quantization (PQ)Next Card →IVF Inverted File Indexing

🔗 More AI Engineering Knowledge Cards

Vector Distance Metrics & L2 NormalizationScalar Quantization (SQ8/SQ4)HNSW Multi-Layer Skip GraphHNSW Heuristic Search & Routing