Quantization-based fast inner product search
First Claim
1. A computer system comprising:
- at least one processor; and
memory storing;
a database of search items, each of the search items being represented by a respective vector of d elements, andinstructions that, when executed by the at least one processor, cause the system to;
re-order the d vector elements of each search item using a random rotation,project each re-ordered search item vector into K subspaces of i elements,generate a codebook for each subspace, each entry in each codebook being a vector with i elements, the codebook being generated within constraints based on example queries,assign each subspace of each search item an entry in the codebook for the subspace, the assignments for all subspaces of a search item representing a quantized search item, andstore the codebooks and the quantized search items in the memory.
2 Assignments
0 Petitions
Accused Products
Abstract
Implementations provide an improved system for efficiently calculating inner products between a query item and a database of items. An example method includes generating a plurality of subspaces from search items in a database, the search items being represented as vectors of elements, a subspace being a block of elements from each search item that occur at the same vector position, generating a codebook for each subspace within soft constraints that are based on example queries, assigning each subspace of each search item an entry in the codebook for the subspace, the assignments for all subspaces of a search item representing a quantized search item, and storing the codebooks and the quantized search items. Generating a codebook for a particular subspace can include clustering the search item subspaces that correspond to the particular subspace, finding a cluster center for each cluster, and storing the cluster center as the codebook entry.
30 Citations
20 Claims
-
1. A computer system comprising:
-
at least one processor; and memory storing; a database of search items, each of the search items being represented by a respective vector of d elements, and instructions that, when executed by the at least one processor, cause the system to; re-order the d vector elements of each search item using a random rotation, project each re-ordered search item vector into K subspaces of i elements, generate a codebook for each subspace, each entry in each codebook being a vector with i elements, the codebook being generated within constraints based on example queries, assign each subspace of each search item an entry in the codebook for the subspace, the assignments for all subspaces of a search item representing a quantized search item, and store the codebooks and the quantized search items in the memory. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A method comprising:
-
for each respective search item of search items in a database, each search item being represented as a vector of elements, re-ordering the elements of the vector using a random permutation, generating a plurality of subspaces from the search items, a subspace being a block of elements from each search item that occur at the same vector positions; generating a codebook for each subspace within soft constraints that are based on example queries; assigning each subspace of each search item an entry in the codebook for the subspace, the assignments for all subspaces of a search item representing a quantized search item; and storing the codebooks and the quantized search items. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17)
-
-
18. A method comprising:
-
generating a plurality of subspaces from search items in a database, the search items being represented as vectors of elements, a subspace being a block of elements from each search item that occurs at the same vector positions; learning a codebook for each subspace by optimizing a task-dependent objective function that minimizes quantization error within soft constraints established by example queries, wherein the example queries are used to identify violated constraints and adjust the codebooks over iterative rounds, the learning resulting in assignment of each block of elements for each search item to an entry in the codebook, generating a quantized search item; projecting a query vector into the plurality of subspaces; using the query vector, the quantized search items and the codebooks to perform an inner product search for search items responsive to the query; and providing at least the search item with the highest similarity score as responsive to the query. - View Dependent Claims (19, 20)
-
Specification