SLIDE 1
Ruiqi Guo, Philip Sun, Erik Lindgren, Quan Geng, David Simcha, Felix - - PowerPoint PPT Presentation
Ruiqi Guo, Philip Sun, Erik Lindgren, Quan Geng, David Simcha, Felix - - PowerPoint PPT Presentation
Ruiqi Guo, Philip Sun, Erik Lindgren, Quan Geng, David Simcha, Felix Chern, Sanjiv Kumar Overview Application: recommender systems Application: recommender systems Application: recommender systems Application: recommender systems Application:
SLIDE 2
SLIDE 3
Application: recommender systems
SLIDE 4
Application: recommender systems
SLIDE 5
Application: recommender systems
SLIDE 6
Application: recommender systems
SLIDE 7
Application: recommender systems
SLIDE 8
MIPS: paruitioning and quantization
Paruitioning:
- Split database into disjoint subsets
- Search only the most promising subsets
SLIDE 9
MIPS: paruitioning and quantization
Paruitioning:
- Split database into disjoint subsets
- Search only the most promising subsets
Quantization:
- Reduce the number of bits used to describe data
points.
- Leads to smaller index size and faster inner
product calculations.
SLIDE 10
MIPS: paruitioning and quantization
Paruitioning:
- Split database into disjoint subsets
- Search only the most promising subsets
Quantization:
- Reduce the number of bits used to describe data
points.
- Leads to smaller index size and faster inner
product calculations.
SLIDE 11
Quantization overview: codebooks
Given a set of vectors x1, x2, …, xn, we want to create a quantized dataset x̃
1, x̃ 2, …, x̃ n.
Quantize to an element of the codebook, Cθ
SLIDE 12
Example codebook: vector quantization
Parameters are a set of centers c1, c2, …, ck. Codebook Cθ is the set of all centers: {c1, c2, …, ck}.
SLIDE 13
Example codebook: vector quantization
Parameters are a set of centers c1, c2, …, ck. Codebook Cθ is the set of all centers: {c1, c2, …, ck}. Product quantization:
- splits the space into multiple subspaces
- uses a vector quantization codebook for each subspace.
SLIDE 14
Quantization basics: assignment
To assign a datapoint to a codeword, we select the codeword that minimizes a loss function.
SLIDE 15
Traditional loss function choice
Classic approach: reconstruction error.
SLIDE 16
Traditional loss function choice
Classic approach: reconstruction error. By Cauchy-Schwaruz:
SLIDE 17
Some inner product errors are worse than others
Consider a query q and database points x1, … , xn Rank points by inner product
SLIDE 18
Some inner product errors are worse than others
Consider a query q and database points x1, … , xn Rank points by inner product
SLIDE 19
Some inner product errors are worse than others
Consider a query q and database points x1, … , xn Rank points by inner product
Low inner product High inner product
a1 a2 a3 a4 a5 … an-
3
an-
2
an-1 an
SLIDE 20
Some inner product errors are worse than others
Consider a query q and database points x1, … , xn Rank points by inner product
Low inner product High inner product
a1 a2 a3 a4 a5 … an-
3
an-
2
an-1 an MIPS Results
SLIDE 21
Some inner product errors are worse than others
Consider a query q and database points x1, … , xn Rank points by inner product
Low inner product High inner product
a1 a2 a3 a4 a5 … an-
3
an-
2
an-1 an MIPS Results Peruurbations of low inner products are unlikely to result in changes to top-k
SLIDE 22
Some inner product errors are worse than others
Consider a query q and database points x1, … , xn Rank points by inner product
Low inner product High inner product
a1 a2 a3 a4 a5 … an-
3
an-
2
an-1 an MIPS Results Peruurbations of low inner products are unlikely to result in changes to top-k Peruurbations of high inner products change top-k and lead to recall loss
SLIDE 23
Some inner product errors are worse than others
Consider a query q and database points x1, … , xn Rank points by inner product
Low inner product High inner product
a1 a2 a3 a4 a5 … an-
3
an-
2
an-1 an MIPS Results Peruurbations of low inner products are unlikely to result in changes to top-k Peruurbations of high inner products change top-k and lead to recall loss Takeaway: to maximize recall, emphasize reducing quantization error for high inner products
SLIDE 24
Visualization of query distribution
x
SLIDE 25
Visualization of query distribution
Quantization error: litule impact on MIPS recall x
SLIDE 26
Visualization of query distribution
Quantization error: some impact on MIPS recall x
SLIDE 27
Visualization of query distribution
Quantization error: signifjcant impact on MIPS recall x
SLIDE 28
Visualization of query distribution
Quantization error: signifjcant impact on MIPS recall x x Reconstruction loss
SLIDE 29
Score-aware quantization loss
Traditional quantization loss: Score-aware loss: N By earlier intuition, w should put more weight on higher . Example weight function: w(t) = 1(t ≥T).
SLIDE 30
Evaluating and minimizing score-aware loss
Expand expectation:
SLIDE 31
Evaluating and minimizing score-aware loss
x x̃ r|| error r⟂
SLIDE 32
Evaluating and minimizing score-aware loss
Integral evaluates to a weighted sum of r|| and r⟂: For w that weight higher inner products more,
SLIDE 33
Visualization of result
c1 gives lower inner product error than c2 even though ||x - c1|| > ||x - c2|| Reason: x - c1 is oruhogonal, not parallel, to x
SLIDE 34
Applications to quantization
Given a family of codewords C, we now want to solve the following optimization problem. We work out an approach for effjcient approximate
- ptimization in the large-scale setuing for:
1. Vector Quantization 2. Product Quantization
SLIDE 35
Constant-bitrate comparison
GloVe: 100 dimensions, 1183514 points Cosine distance dataset; normalize dataset to unit-norm during training time 25 codebooks, 16 centers each 50 codebooks, 16 centers each
SLIDE 36
Glove: QPS-recall experiment setup
Higher a, b result in higher recall, lower QPS Exact re-scoring
Top b inner products from AH are re-computed exactly; top 10 are returned as MIPS results
Pruning via K-means tree
2000 centers; all but the closest a centers to the query are pruned
Quantized Scoring
Compute approximate inner products via with quantized database (product quantization with anisotropic loss)
SLIDE 37
Glove: QPS-recall pareto frontier
SLIDE 38