JP2018045564A - Maximum-inner product search apparatus, maximum-inner product search method, and maximum-inner product search program - Google Patents
Maximum-inner product search apparatus, maximum-inner product search method, and maximum-inner product search program Download PDFInfo
- Publication number
- JP2018045564A JP2018045564A JP2016181489A JP2016181489A JP2018045564A JP 2018045564 A JP2018045564 A JP 2018045564A JP 2016181489 A JP2016181489 A JP 2016181489A JP 2016181489 A JP2016181489 A JP 2016181489A JP 2018045564 A JP2018045564 A JP 2018045564A
- Authority
- JP
- Japan
- Prior art keywords
- search
- vector
- inner product
- block
- representative
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims description 34
- 239000013598 vector Substances 0.000 claims abstract description 414
- 239000011159 matrix material Substances 0.000 claims description 56
- 238000010276 construction Methods 0.000 claims description 30
- 238000013139 quantization Methods 0.000 abstract description 50
- 238000004364 calculation method Methods 0.000 description 35
- 238000010586 diagram Methods 0.000 description 12
- 238000004891 communication Methods 0.000 description 4
- 238000003491 array Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 101100153586 Caenorhabditis elegans top-1 gene Proteins 0.000 description 1
- 101100370075 Mus musculus Top1 gene Proteins 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 230000017105 transposition Effects 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、クエリベクトルに対して内積が最大となるデータベース中のベクトルを探索する最大内積探索装置、最大内積探索方法及び最大内積探索プログラムに関する。 The present invention relates to a maximum inner product search apparatus, a maximum inner product search method, and a maximum inner product search program for searching for a vector in a database in which an inner product is maximum with respect to a query vector.
画像、音声及びセンサデータ等の分類及び検索において、最大内積探索(MIPS:Maximum Inner Product Search)は重要である。 A maximum inner product search (MIPS) is important in classification and search of images, sounds, sensor data, and the like.
MIPSとは、例えば、データベース中のベクトル{d1,d2,…,dn}とクエリqが与えられた時に、内積<q,di>が最大となるデータベース中のベクトルを探すことである。なお、Top−K MIPSとは、上記の例でいうと、データベース中のベクトルのうち内積<q,di>が大きい順にk個のベクトルを探すことである。すなわち、MIPSとはTop−1 MIPSである。以降では、MIPSはTop−K MIPSも含めるものとする。 MIPS is, for example, by searching for a vector in the database in which the inner product <q, d i > is maximum when a vector {d 1 , d 2 ,..., D n } in the database and a query q are given. is there. Note that Top-K MIPS refers to searching for k vectors in descending order of the inner product <q, d i > among the vectors in the database in the above example. That is, MIPS is Top-1 MIPS. Hereinafter, MIPS shall also include Top-K MIPS.
分類におけるMIPSの使用例を挙げると、データベースが各クラスに対応するベクトルであり、クエリが入力データ又はニューラルネットなどで変換された特徴表現であり、MIPSは分類結果を返す。また、検索におけるMIPSの使用例を挙げると、データベースが過去のデータであり、クエリが現在のデータであり(これらのデータは元のデータの場合もあるしニューラルネット等で変換された特徴表現の場合もある)、MIPSは最も似ている検索結果を探す。 As an example of the use of MIPS in classification, the database is a vector corresponding to each class, the query is a feature expression converted by input data or a neural network, and MIPS returns a classification result. As an example of the use of MIPS in search, the database is past data, and the query is current data (these data may be original data or feature representations converted by a neural network or the like). MIPS) looks for the most similar search results.
MIPSを行う方法としては、インデックスを使わない方法、LSH(Locality Sensitive Hashing)を使う方法及びブロック量子化を使う方法が従来知られている。以下では、ベクトル長をm、データベース中のベクトルの数をnとして、各方法について簡単に説明する。 Conventionally known methods for performing MIPS include a method that does not use an index, a method that uses LSH (Locality Sensitive Hashing), and a method that uses block quantization. In the following, each method will be briefly described, where the vector length is m and the number of vectors in the database is n.
インデックスを使わない方法では、そのまま内積を全て計算する。計算量はO(nm)である。 In the method that does not use an index, all inner products are calculated as they are. The calculation amount is O (nm).
LSHを使う方法では、ベクトルを長さbのビットベクトルに変換し、ビットベクトル同士の内積(XOR演算)で近似する。一度に計算できるビット幅数をwとすると、計算量はO(nb/w)である。LSHを使う方法は、精度が低いことが知られている。 In the method using LSH, a vector is converted into a bit vector of length b and approximated by an inner product (XOR operation) of the bit vectors. If the number of bit widths that can be calculated at one time is w, the amount of calculation is O (nb / w). It is known that the method using LSH has low accuracy.
ブロック量子化を使う方法では、ベクトルをブロックに分割し、ブロック毎に量子化する。量子化する際は、クエリの情報も使い、適切なブロックを決定する。ブロック数をkとすると、計算量はO(nk)である。下記非特許文献1には、ブロック量子化を使う方法が開示されている。
In the method using block quantization, a vector is divided into blocks, and quantization is performed for each block. When quantizing, the query information is also used to determine an appropriate block. If the number of blocks is k, the amount of calculation is O (nk).
上述の通り最大内積探索は重要であり、特にビッグデータ等の大量のデータが含まれるデータベースに対して最大内積探索を行う場合、計算量の少ない最大内積探索の方法が望まれる。 As described above, the maximum inner product search is important. In particular, when the maximum inner product search is performed on a database including a large amount of data such as big data, a method of maximum inner product search with a small amount of calculation is desired.
そこで、本発明は、かかる課題に鑑みて為されたものであり、計算量の少ない最大内積探索を行うことができる最大内積探索装置、最大内積探索方法及び最大内積探索プログラムを提供することを目的とする。 Accordingly, the present invention has been made in view of such problems, and an object thereof is to provide a maximum inner product search device, a maximum inner product search method, and a maximum inner product search program that can perform a maximum inner product search with a small amount of calculation. And
上記課題を解決するため、本発明の一側面に係る最大内積探索装置は、所定の要素数の検索ベクトルの集合である検索ベクトル集合と、検索ベクトル集合の各検索ベクトルについて、要素を複数のブロックに分けてブロックごとに代表ベクトルに量子化した量子化検索ベクトル集合と、ブロックごとの代表ベクトルの集合である代表ベクトル集合とを格納する検索データベースと、要素数のクエリベクトルを取得するクエリ取得部と、クエリ取得部によって取得されたクエリベクトルの要素をブロックに分け、ブロックごとに、当該ブロックのクエリベクトルと検索データベースによって格納された代表ベクトル集合の当該ブロックの代表ベクトルそれぞれとの内積を算出し、算出された内積に基づいてブロックごとに当該ブロックの代表ベクトルを選択し、検索データベースによって格納された検索ベクトル集合に含まれる検索ベクトルのうち、全てのブロックにおいて各ブロックに対して選択された代表ベクトルを含む検索ベクトルを、検索データベースによって格納された量子化検索ベクトル集合に基づいて探索する最大内積探索部と、を備える。 In order to solve the above problems, a maximum inner product search device according to an aspect of the present invention includes a search vector set that is a set of search vectors having a predetermined number of elements, and a plurality of blocks for each search vector in the search vector set. A search database that stores a quantized search vector set that is quantized into representative vectors for each block, a representative vector set that is a set of representative vectors for each block, and a query acquisition unit that acquires a query vector of the number of elements The query vector elements acquired by the query acquisition unit are divided into blocks, and for each block, the inner product of the query vector of the block and each representative vector of the block of the representative vector set stored by the search database is calculated. , Based on the calculated inner product, for each block, Quantize the search vector containing the representative vector selected for each block among the search vectors included in the search vector set stored in the search database. A maximum inner product search unit that searches based on a set of search vectors.
このような最大内積探索装置によれば、最大内積探索部により、ブロックごとに、当該ブロックのクエリベクトルと代表ベクトル集合の当該ブロックの代表ベクトルそれぞれとの内積に基づく代表ベクトルが選択され、検索ベクトル集合に含まれる検索ベクトルのうち、全てのブロックにおいて各ブロックに対して選択された代表ベクトルを含む検索ベクトルが探索される。ここで、検索ベクトル集合に含まれる検索ベクトルのうち、全てのブロックにおいて各ブロックに対して選択された代表ベクトルを含む検索ベクトルが探索される際に、例えば、Wavelet行列を利用した演算を行うことができる。Wavelet行列を利用すれば、ある範囲内で共通して出現する値を探索する演算を少ない計算量で行うことができる。つまり、検索ベクトルの全てのブロックそれぞれにおいて選択された代表ベクトルを含む検索ベクトルを少ない計算量で探索することができる。すなわち、計算量の少ない最大内積探索を行うことができる。 According to such a maximum inner product search device, the maximum inner product search unit selects, for each block, a representative vector based on the inner product of the query vector of the block and the representative vector of the block of the representative vector set. Of the search vectors included in the set, search vectors including representative vectors selected for each block in all blocks are searched. Here, when a search vector including a representative vector selected for each block is searched for among all search vectors included in the search vector set, for example, an operation using a Wavelet matrix is performed. Can do. If the Wavelet matrix is used, an operation for searching for a value that appears in common within a certain range can be performed with a small amount of calculation. That is, the search vector including the representative vector selected in each of all the search vector blocks can be searched with a small amount of calculation. That is, the maximum inner product search with a small amount of calculation can be performed.
また、本発明の一側面に係る最大内積探索装置において、検索データベースは、代表ベクトル集合に含まれるブロックごとの代表ベクトルごとに、当該代表ベクトルが含まれる検索ベクトルを識別する検索ベクトル識別情報の集合に対応するWavelet行列をさらに格納し、最大内積探索部は、検索ベクトルを探索する際に、検索データベースによって格納されたWavelet行列を利用した演算を行うこととしてもよい。このような最大内積探索装置によれば、最大内積探索部により、検索ベクトル集合に含まれる検索ベクトルのうち、全てのブロックにおいて各ブロックに対して選択された代表ベクトルを含む検索ベクトルが探索される際に、Wavelet行列を利用した演算が行われる。Wavelet行列を利用すれば、ある範囲内で共通して出現する値を探索する演算を少ない計算量で行うことができる。かかる構成を採れば、検索ベクトルの全てのブロックそれぞれにおいて選択された代表ベクトルを含む検索ベクトルを少ない計算量で探索することができる。すなわち、計算量の少ない最大内積探索を行うことができる。 In the maximum inner product search device according to one aspect of the present invention, the search database includes a set of search vector identification information for identifying a search vector including the representative vector for each representative vector for each block included in the representative vector set. The maximum inner product search unit may perform an operation using the Wavelet matrix stored in the search database when searching for the search vector. According to such a maximum inner product search device, the maximum inner product search unit searches for search vectors including representative vectors selected for each block in all the blocks among the search vectors included in the search vector set. At this time, an operation using a Wavelet matrix is performed. If the Wavelet matrix is used, an operation for searching for a value that appears in common within a certain range can be performed with a small amount of calculation. With this configuration, it is possible to search for a search vector including a representative vector selected in each of all blocks of the search vector with a small amount of calculation. That is, the maximum inner product search with a small amount of calculation can be performed.
また、本発明の一側面に係る最大内積探索装置において、最大内積探索部は、検索ベクトルを探索する際に、選択された全ての代表ベクトルそれぞれに対応するWavelet行列を取得し、取得した全てのWavelet行列に対して、共通して出現する検索ベクトル識別情報を求める演算を行うこととしてもよい。Wavelet行列を利用すれば、ある範囲内で共通して出現する値を探索する演算を少ない計算量で行うことができる。かかる構成を採れば、検索ベクトルの全てのブロックそれぞれにおいて選択された代表ベクトルを含む検索ベクトルを少ない計算量で探索することができる。すなわち、計算量の少ない最大内積探索を行うことができる。 In the maximum inner product search device according to one aspect of the present invention, the maximum inner product search unit acquires a Wavelet matrix corresponding to each of all selected representative vectors when searching for a search vector, It is also possible to perform an operation for obtaining search vector identification information that appears in common on the Wavelet matrix. If the Wavelet matrix is used, an operation for searching for a value that appears in common within a certain range can be performed with a small amount of calculation. With this configuration, it is possible to search for a search vector including a representative vector selected in each of all blocks of the search vector with a small amount of calculation. That is, the maximum inner product search with a small amount of calculation can be performed.
また、本発明の一側面に係る最大内積探索装置において、代表ベクトル集合に含まれるブロックごとの代表ベクトルごとに、当該代表ベクトルが含まれる検索ベクトルを識別する検索ベクトル識別情報の集合に対応するWavelet行列を構築するWavelet行列構築部をさらに備え、検索データベースは、Wavelet行列構築部によって構築されたWavelet行列を格納することとしてもよい。かかる構成を採れば、計算量の少ない最大内積探索を行うためのWavelet行列を確実に構築及び格納することができる。 In the maximum inner product search device according to one aspect of the present invention, for each representative vector for each block included in the representative vector set, a Wavelet corresponding to a set of search vector identification information for identifying the search vector including the representative vector. A wavelet matrix construction unit that constructs a matrix may be further provided, and the search database may store the wavelet matrix constructed by the wavelet matrix construction unit. By adopting such a configuration, it is possible to reliably construct and store a Wavelet matrix for performing a maximum inner product search with a small amount of calculation.
ところで、本発明は、上記のように最大内積探索装置の発明として記述できる他に、以下のようにそれぞれ最大内積探索方法及び最大内積探索プログラムの発明としても記述することができる。これはカテゴリが異なるだけで、実質的に同一の発明であり、同様の作用及び効果を奏する。 By the way, the present invention can be described as an invention of a maximum inner product search device as described above, and can also be described as an invention of a maximum inner product search method and a maximum inner product search program as follows. This is substantially the same invention only in different categories, and has the same operations and effects.
即ち、本発明の一側面に係る最大内積探索方法は、所定の要素数の検索ベクトルの集合である検索ベクトル集合と、検索ベクトル集合の各検索ベクトルについて、要素を複数のブロックに分けてブロックごとに代表ベクトルに量子化した量子化検索ベクトル集合と、ブロックごとの代表ベクトルの集合である代表ベクトル集合とを格納する検索データベースを備える最大内積探索装置により実行される最大内積探索方法であって、要素数のクエリベクトルを取得するクエリ取得ステップと、クエリ取得ステップにおいて取得されたクエリベクトルの要素をブロックに分け、ブロックごとに、当該ブロックのクエリベクトルと検索データベースによって格納された代表ベクトル集合の当該ブロックの代表ベクトルそれぞれとの内積を算出し、算出された内積に基づいてブロックごとに当該ブロックの代表ベクトルを選択し、検索データベースによって格納された検索ベクトル集合に含まれる検索ベクトルのうち、全てのブロックにおいて各ブロックに対して選択された代表ベクトルを含む検索ベクトルを、検索データベースによって格納された量子化検索ベクトル集合に基づいて探索する最大内積探索ステップと、を含む。 That is, the maximum inner product search method according to one aspect of the present invention includes a search vector set that is a set of search vectors having a predetermined number of elements, and each search vector of the search vector set by dividing an element into a plurality of blocks. A maximum inner product search method executed by a maximum inner product search device including a search database that stores a quantized search vector set quantized into a representative vector and a representative vector set that is a set of representative vectors for each block, A query acquisition step of acquiring a query vector of the number of elements, and the elements of the query vector acquired in the query acquisition step are divided into blocks, and for each block, the query vector of the block and the representative vector set stored by the search database Calculate the dot product with each representative vector of the block and calculate The representative vector of the block is selected for each block based on the inner product, and the representative vector selected for each block in all the blocks among the search vectors included in the search vector set stored by the search database is selected. And a maximum inner product search step of searching for a search vector including the search vector based on a set of quantized search vectors stored by the search database.
また、本発明の一側面に係る最大内積探索プログラムは、コンピュータを、所定の要素数の検索ベクトルの集合である検索ベクトル集合と、検索ベクトル集合の各検索ベクトルについて、要素を複数のブロックに分けてブロックごとに代表ベクトルに量子化した量子化検索ベクトル集合と、ブロックごとの代表ベクトルの集合である代表ベクトル集合とを格納する検索データベースと、要素数のクエリベクトルを取得するクエリ取得部と、クエリ取得部によって取得されたクエリベクトルの要素をブロックに分け、ブロックごとに、当該ブロックのクエリベクトルと検索データベースによって格納された代表ベクトル集合の当該ブロックの代表ベクトルそれぞれとの内積を算出し、算出された内積に基づいてブロックごとに当該ブロックの代表ベクトルを選択し、検索データベースによって格納された検索ベクトル集合に含まれる検索ベクトルのうち、全てのブロックにおいて各ブロックに対して選択された代表ベクトルを含む検索ベクトルを、検索データベースによって格納された量子化検索ベクトル集合に基づいて探索する最大内積探索部、として機能させる。 The maximum inner product search program according to one aspect of the present invention divides an element into a plurality of blocks for a search vector set that is a set of search vectors having a predetermined number of elements and each search vector of the search vector set. A search database that stores a quantized search vector set quantized into a representative vector for each block, a representative vector set that is a set of representative vectors for each block, a query acquisition unit that acquires a query vector of the number of elements, The elements of the query vector acquired by the query acquisition unit are divided into blocks, and for each block, the inner product of the query vector of the block and the representative vector of the block of the representative vector set stored by the search database is calculated and calculated. For each block based on the inner product Quantization stored in the search database includes search vectors including representative vectors selected for each block in the search vectors included in the search vector set stored in the search database. It functions as a maximum inner product search unit that searches based on the search vector set.
本発明によれば、計算量の少ない最大内積探索を行うことができる。 According to the present invention, it is possible to perform a maximum inner product search with a small amount of calculation.
以下、図面とともに最大内積探索装置、最大内積探索方法及び最大内積探索プログラムの好適な実施形態について詳細に説明する。なお、図面の説明においては同一要素には同一符号を付し、重複する説明を省略する。 Hereinafter, preferred embodiments of a maximum inner product search device, a maximum inner product search method, and a maximum inner product search program will be described in detail with reference to the drawings. In the description of the drawings, the same elements are denoted by the same reference numerals, and redundant description is omitted.
図1は、最大内積探索装置1の機能ブロック図である。図1に示す通り、最大内積探索装置1は、検索データベース10、ブロック量子化部11、転置ファイル構築部12、Wavelet行列構築部13、クエリ取得部14及び最大内積探索部15を含んで構成される。
FIG. 1 is a functional block diagram of the maximum inner
最大内積探索装置1は、CPU等のハードウェアから構成されているものである。図2は、最大内積探索装置1のハードウェア構成の一例を示す図である。図1に示される最大内積探索装置1は、物理的には、図2に示すように、一つ以上のCPU100、主記憶装置であるRAM101及びROM102、キーボードやディスプレイ等の入出力装置103、通信モジュール104、及び補助記憶装置105などを含むコンピュータシステムとして構成されている。
The maximum inner
図1に示す最大内積探索装置1の各機能ブロックの機能は、図2に示すCPU100、RAM101等のハードウェア上に所定のコンピュータソフトウェアを読み込ませることにより、CPU100の制御のもとで入出力装置103、通信モジュール104、及び補助記憶装置105を動作させるとともに、RAM101におけるデータの読み出し及び書き込みを行うことで実現される。
The function of each functional block of the maximum inner
以下、図1に示す最大内積探索装置1の各機能ブロックについて説明する。
Hereinafter, each functional block of the maximum inner
検索データベース10は、所定の要素数k(kは自然数)の検索ベクトルの集合である検索ベクトル集合を格納する。検索ベクトルとは、後述のクエリベクトルに対して類似する(内積が最大となる、又は内積が比較的大きい)ベクトルを探索する際に、探索対象となる一般的なベクトルである。図3は、検索データベース10によって格納された検索ベクトル集合の一例を示す図である。図3に示す検索ベクトル集合は、要素数が6の検索ベクトルが16個集まったものである。説明の便宜上、検索ベクトル集合に含まれる検索ベクトルそれぞれを識別するための識別情報として、各検索ベクトルにはベクトル番号が付与されているものとする。ベクトル番号は、例えば、検索ベクトル集合が配列で実装される際のインデックスに対応する。図3において、ベクトル番号が「0」の検索ベクトルは、要素として値「0.64」、「0.62」、「0.81」、「0.31」、「0.29」及び「0.85」を持っていることを示している。検索データベース10は、検索ベクトル集合を、予め格納してもよいし、最大内積探索装置1が備える検索ベクトル集合登録部(不図示)の命令に基づいて格納してもよいし、インターネット等のネットワークを介して他の装置から受信して格納してもよい。
The
ブロック量子化部11は、検索データベース10によって格納された検索ベクトル集合の各検索ベクトルについて、要素を複数のブロックに分けてブロックごとに代表ベクトルに量子化した量子化検索ベクトル集合を構築する。ブロック量子化部11は、代表ベクトルに量子化する際に、検索データベース10によって格納された、ブロックごとの代表ベクトルの集合である代表ベクトル集合を利用する。なお、代表ベクトル集合は、ブロック量子化部11が検索データベース10によって格納された検索ベクトル集合に基づいて構築したものであってもよい。
The
ここで、検索ベクトルの要素を複数のブロックに分けるとは、例えば、図3に示す通り、検索ベクトルの6つの要素を、要素が2つずつの3つのブロック(b1、b2及びb3)に分けることである。図4は、量子化検索ベクトル集合の一例及び代表ベクトル集合の一例を示す図である。図4に示す量子化検索ベクトル集合は、ブロック量子化部11が、図3に示す検索ベクトル集合の各検索ベクトルについて、要素をブロックb1、b2及びb3に分けて、ブロックごとに代表ベクトルに量子化したものである。ここで、ブロック量子化部11は、代表ベクトルに量子化する際に、図4に示す代表ベクトル集合を用いている。
Here, to divide the elements of the search vector into a plurality of blocks, for example, as shown in FIG. 3, the six elements of the search vector are divided into three blocks (b 1 , b 2 and b 3 each having two elements). ). FIG. 4 is a diagram illustrating an example of a quantized search vector set and an example of a representative vector set. In the quantized search vector set shown in FIG. 4, the
図4に示す代表ベクトル集合は、ブロックb1、b2及びb3ごとの代表ベクトルの集合である。説明の便宜上、代表ベクトル集合に含まれる代表ベクトルそれぞれを識別するための識別情報として、各代表ベクトルには量子化番号が付与されているものとする。量子化番号は、例えば、代表ベクトル集合が配列で実装される際のインデックスに対応する。図4に示す代表ベクトル集合の一例では、ブロックb1では8つの代表ベクトルが含まれている。ブロックごとに任意の数の代表ベクトルが含まれていてもよく、ブロック毎に、含まれる代表ベクトルの数は異なっていてもよいし、同じであってもよい。図4に示す量子化検索ベクトル集合において、各ブロックは、同図に示す代表ベクトル集合の量子化番号が割り当てられている。例えば、量子化検索ベクトル集合のベクトル番号が「0」のレコード(「量子化検索ベクトル」と呼ぶ)のうち、ブロックb1は、量子化番号が「4」である代表ベクトル「[0.80,0.09]」に量子化されていることを示す。同様に、ブロックb2は、量子化番号が「7」であるブロックb2の代表ベクトルに量子化され、ブロックb3は、量子化番号が「4」であるブロックb3の代表ベクトルに量子化されていることを示す。 The representative vector set shown in FIG. 4 is a set of representative vectors for each of the blocks b 1 , b 2, and b 3 . For convenience of explanation, it is assumed that a quantization number is assigned to each representative vector as identification information for identifying each representative vector included in the representative vector set. The quantization number corresponds to, for example, an index when the representative vector set is implemented as an array. In the example of the representative vector set shown in FIG. 4, the block b 1 includes eight representative vectors. An arbitrary number of representative vectors may be included in each block, and the number of representative vectors included in each block may be different or the same. In the quantization search vector set shown in FIG. 4, each block is assigned the quantization number of the representative vector set shown in FIG. For example, among records whose vector number of the quantized search vector set is “0” (referred to as “quantized search vector”), the block b 1 has a representative vector “[0.80” whose quantization number is “4”. , 0.09] ”. Similarly, the block b 2 is quantized to the representative vector of the block b 2 whose quantization number is “7”, and the block b 3 is quantized to the representative vector of the block b 3 whose quantization number is “4”. Indicates that
検索データベース10は、ブロック量子化部11によって構築された量子化検索ベクトル集合を格納する。また、検索データベース10は、ブロック量子化部11によって構築された代表ベクトル集合を格納する。なお、検索データベース10は、予め用意された、又はネットワークを介して他の装置から受信した量子化検索ベクトル集合及び代表ベクトル集合を格納してもよい。
The
転置ファイル構築部12は、検索データベース10によって格納された量子化検索ベクトル集合のブロックごとの転置ファイルの集合である転置ファイル集合を構築する。図5は、転置ファイル集合の一例を示す図である。図5に示す転置ファイル集合は、転置ファイル構築部12により、図4に示す量子化検索ベクトル集合のブロックごとの転置ファイルの集合として構築されたものである。図5に示す転置ファイル集合は、ブロックごとに、量子化番号とベクトル番号とが対応付けられている。量子化番号は、図4に示す代表ベクトル集合の量子化番号である。ベクトル番号は、図4に示す量子化検索ベクトル集合のベクトル番号である。例えば、図5に示すブロックb1の転置ファイル集合について、量子化番号が「4」に、ベクトル番号「0」、「5」、「11」及び「15」が対応付けられている。これは、量子化番号が「4」である代表ベクトルをブロックb1に含む量子化検索ベクトルは、ベクトル番号が「0」、「5」、「11」及び「15」である量子化検索ベクトルであることを示している。
The transposed
検索データベース10は、転置ファイル構築部12によって構築された転置ファイル集合を格納する。なお、検索データベース10は、予め用意された、又はネットワークを介して他の装置から受信した転置ファイル集合を格納してもよい。
The
Wavelet行列構築部13は、代表ベクトル集合に含まれるブロックごとの代表ベクトルごとに、当該代表ベクトルが含まれる検索ベクトルを識別する検索ベクトル識別情報(ベクトル番号)の集合に対応するWavelet行列(ウェーブレット行列、Wavelet Matrix)を構築する。Wavelet行列とは、計算量が定数時間のrank関数及びselect関数、並びにintersect関数等をサポートする完備辞書である。完備辞書とは、「0」と「1」とからなるビット列に対して操作を高速に行えるデータ構造である。rank関数とは、配列中の指定した範囲の「1」の数を返す関数である。select関数とは、配列中の指定した番目の1の位置を返す関数である。intersect関数は、指定された範囲内で共通して出現する値を返す関数である。intersect関数は、rank関数及びselect関数を利用した計算量の少ない演算を行うことができる。
The Wavelet
Wavelet行列構築部13は、具体的には、転置ファイル構築部12により構築された転置ファイル集合に含まれる各ブロックの各レコード(量子化番号とベクトル番号とが対応付けられたレコード)のベクトル番号の配列に対して、Wavelet行列を構築する。図6は、Wavelet行列の構築例を示す図であり、具体的には、図5に示す転置ファイル集合のうち、ブロックb1の量子化番号が「4」のベクトル番号の配列である「0,5,11,15」について、Wavelet行列構築部13がWavelet行列を構築する際の処理例を示した図である。
Specifically, the Wavelet
図6において、まず、各ベクトル番号が示す値のビット列を求める。ベクトル番号「0」のビット列は「0000」であり、ベクトル番号「5」のビット列は「0101」であり、ベクトル番号「11」のビット列は「1011」であり、ベクトル番号「15」のビット列は「1111」である。次に、配列「0,5,11,15」をその順で左から並べ、それぞれの値のビット列の1桁目のビット値を当該順で左から並べる。次に、ビット値が「0」のベクトル番号を当該順で左側に寄せ、ビット値が「1」のベクトル番号を当該順で右側に寄せる。この場合は、ビット値が「0011」であり、寄せる必要はないため、順番は変わらず、そのまま次(下)の段に配列「0,5,11,15」を並べる。以下は同様の処理を繰り返す。並べられた配列「0,5,11,15」のそれぞれの値のビット列の2桁目のビット値を当該順で左から並べる。そして同様に寄せを行うが、今回の場合は、ビット値が「0101」であるため、3つ目のベクトル番号「11」を1つ左に寄せ、2つ目のベクトル番号「5」を1つ右に寄せる。すなわち、ベクトル番号「5」と「11」との位置を入れ替える。そして、次の段に位置が入れ替えられた配列「0,11,5,15」を並べ、それぞれの値のビット列の3桁目のビット値を当該順で左から並べる。今回の場合は、ビット値が「0101」であるため、3つ目のベクトル番号「5」を1つ左に寄せ、2つ目のベクトル番号「11」を1つ右に寄せる。そして、次の段に位置が入れ替えられた配列「0,5,11,15」を並べ、それぞれの値のビット列の4桁目のビット値を当該順で左から並べる。最後に、これまで並べられた各桁のビット値をその順で上の段から順に合わせた行列としてWavelet行列を構築する。 In FIG. 6, first, a bit string having a value indicated by each vector number is obtained. The bit string of vector number “0” is “0000”, the bit string of vector number “5” is “0101”, the bit string of vector number “11” is “1011”, and the bit string of vector number “15” is “1111”. Next, the arrays “0, 5, 11, 15” are arranged in that order from the left, and the bit values of the first digit of the bit strings of the respective values are arranged in the order from the left. Next, vector numbers with a bit value of “0” are moved to the left in that order, and vector numbers with a bit value of “1” are moved to the right in that order. In this case, since the bit value is “0011” and it is not necessary to shift it, the order is not changed, and the array “0, 5, 11, 15” is arranged as it is in the next (lower) stage. The same process is repeated thereafter. The bit values of the second digit of the bit strings of the values of the arranged arrays “0, 5, 11, 15” are arranged in this order from the left. In this case, since the bit value is “0101”, the third vector number “11” is shifted to the left by one, and the second vector number “5” is shifted to “1”. Move right one. That is, the positions of the vector numbers “5” and “11” are switched. Then, the array “0, 11, 5, 15” whose positions are changed is arranged in the next stage, and the bit values of the third digit of the bit strings of the respective values are arranged in this order from the left. In this case, since the bit value is “0101”, the third vector number “5” is moved to the left by one, and the second vector number “11” is moved to the right by one. Then, the array “0, 5, 11, 15” whose positions are changed is arranged in the next stage, and the bit values of the fourth digit of the bit strings of the respective values are arranged in this order from the left. Finally, a Wavelet matrix is constructed as a matrix in which the bit values of each digit arranged so far are matched in order from the top.
検索データベース10は、Wavelet行列構築部によって構築されたWavelet行列を格納する。なお、検索データベース10は、予め用意された、又はネットワークを介して他の装置から受信したWavelet行列を格納してもよい。
The
クエリ取得部14は、要素数kのクエリベクトルを取得する。すなわち、クエリ取得部14は、検索データベース10によって格納された検索ベクトル集合に含まれる各検索ベクトルと同じ要素数のクエリベクトルを取得する。クエリベクトルは、ユーザ等によって指定された一般的なベクトルであり、クエリベクトルに類似するベクトルが検索ベクトル集合から探索される。クエリ取得部14は、クエリベクトルを、入出力装置103から取得してもよいし、他の装置からネットワークを介して取得してもよいし、予め最大内積探索装置1に格納されたクエリベクトルを取得してもよい。クエリ取得部14は、取得したクエリベクトルを最大内積探索部15に出力する。図7は、クエリベクトルの一例を示す図である。図7に示すクエリベクトルは、図3に示す検索ベクトル集合に含まれる検索ベクトルの要素数と同じ6つの要素から構成される。
The
最大内積探索部15は、クエリ取得部14によって取得されたクエリベクトルの要素をブロックに分け、ブロックごとに、当該ブロックのクエリベクトルと検索データベース10によって格納された代表ベクトル集合の当該ブロックの代表ベクトルそれぞれとの内積を算出し、算出された内積に基づいてブロックごとに当該ブロックの代表ベクトルを選択し、検索データベース10によって格納された検索ベクトル集合に含まれる検索ベクトルのうち、全てのブロックにおいて各ブロックに対して選択された代表ベクトルを含む検索ベクトルを、検索データベース10によって格納された量子化検索ベクトル集合に基づいて探索する。また、最大内積探索部15は、検索ベクトルを探索する際に、検索データベース10によって格納されたWavelet行列を利用した演算を行う。より具体的には、最大内積探索部15は、検索ベクトルを探索する際に、選択された全ての代表ベクトルそれぞれに対応するWavelet行列を取得し、取得した全てのWavelet行列に対して、共通して出現する検索ベクトル識別情報を求める演算を行う。以下、最大内積探索部15の処理を具体的に説明する。
The maximum inner
まず、最大内積探索部15は、クエリ取得部14から入力されたクエリベクトルの要素を、検索データベース10によって格納された量子化検索ベクトル集合と同じブロックに分ける。図7に示すクエリベクトルでは、6つの要素が、要素が2つずつの3つのブロック(b1、b2及びb3)に分けられている。次に、最大内積探索部15は、ブロックごとに、当該ブロックのクエリベクトルと検索データベース10によって格納された代表ベクトル集合の当該ブロックの代表ベクトルそれぞれとの内積を算出する。図8は、最大内積探索の処理のうち内積を算出する処理の一例を示す図である。図8に示す通り、最大内積探索部15は、例えば、クエリベクトルのブロックb1のベクトルと、代表ベクトル集合のブロックb1対応する代表ベクトルそれぞれとの内積を順に算出し、同様にブロックb1及びb2に対しても内積を順に算出する。
First, the maximum inner
次に、最大内積探索部15は、算出された内積に基づいてブロックごとに当該ブロックの代表ベクトルを選択する。図9は、最大内積探索の処理のうち内積の大きい代表ベクトルを含む検索ベクトルを探索する処理の一例を示す図である。図9において、ブロックごとに算出された内積が降順に並べられており、各内積の算出対象である代表ベクトルの量子化番号が対応付けられている。最大内積探索部15は、例えば、ブロックごとに、内積が最大の代表ベクトルを選択する。例えば、図9において、最大内積探索部15は、ブロックb1から量子化番号が「4」の代表ベクトルを選択し、ブロックb2から量子化番号が「1」の代表ベクトルを選択し、ブロックb3から量子化番号が「5」の代表ベクトルを選択する。なお、最大内積探索部15による代表ベクトルの選択方法はこれに限るものではない。例えば、最大内積探索部15は、ブロックごとに内積が上位2位までの代表ベクトルを選択してもよいし、ブロックごとに内積が所定の順位以上の代表ベクトルを選択してもよいし、ブロックごとに所定の順位を変えるなどブロックごとに基準を変えてもよい。また、最大内積探索部15は、まず、ブロックごとに最大(1位)の内積の代表ベクトルを選択し、選択された代表ベクトルに基づいて後述の検索ベクトルの探索が失敗した(探索ができなかった)場合に、続いて、ブロックごとに2位以上の内積の代表ベクトルを選択し、選択された代表ベクトルに基づいて再度検索ベクトルの探索を行う等、検索ベクトルの探索が行えるまで繰り返し最大内積探索部15の処理を実行し、その都度、代表ベクトルの選択基準を変えてもよい。
Next, the maximum inner
次に最大内積探索部15は、検索データベース10によって格納された検索ベクトル集合に含まれる検索ベクトルのうち、全てのブロックにおいて各ブロックに対して選択された代表ベクトルを含む検索ベクトルを、検索データベース10によって格納された量子化検索ベクトル集合に基づいて探索する。図9の例で説明すると、ブロックb1から選択された量子化番号が「4」の代表ベクトルを検索ベクトルのブロックb1に含み、ブロックb2から選択された量子化番号が「1」の代表ベクトルを検索ベクトルのブロックb2に含み、ブロックb3から選択された量子化番号が「5」の代表ベクトルを検索ベクトルのブロックb3に含む検索ベクトルを最大内積探索部15は探索する。その際、最大内積探索部15は、例えば、検索データベース10によって格納された転置ファイル集合を利用してもよい。例えば、図9の例で説明すると、最大内積探索部15は転置ファイル集合を利用することで、ブロックb1から選択された量子化番号が「4」の代表ベクトルはベクトル番号が「0」、「5」、「11」及び「15」の検索ベクトルに含まれることを判定し、ブロックb2から選択された量子化番号が「1」の代表ベクトルはベクトル番号が「2」、「5」、「6」及び「11」の検索ベクトルに含まれることを判定し、ブロックb3から選択された量子化番号が「5」の代表ベクトルはベクトル番号が「1」、「5」、「11」及び「15」の検索ベクトルに含まれることを判定することができる。そして、最大内積探索部15は、各ブロックに共通して現れるベクトル番号として、「5」及び「11」を判定することができる。すなわち、最大内積探索部15は、ベクトル番号が「5」及び「11」の検索ベクトルを、クエリベクトルに類似するベクトルとして探索する。
Next, the maximum inner
最大内積探索部15は、各ブロックに共通して現れるベクトル番号を求める際に、選択された全ての代表ベクトルそれぞれに対応するWavelet行列を検索データベース10によって格納されたWavelet行列から取得し、取得した全てのWavelet行列に対して、共通して出現するベクトル番号を求める演算を行ってもよい。上述した通り、Wavelet行列のintersect関数を利用することで、各ブロックに共通して現れるベクトル番号を計算量の少ない演算によって求めることができる。
The maximum inner
最大内積探索部15は、探索した検索ベクトル又は検索ベクトル識別情報を、入出力装置103(例えばディスプレイ)に出力(表示)してもよいし、ネットワークを介して他の装置に出力してもよい。
The maximum inner
続いて、図10及び図11に示すフローチャートを用いて、それぞれ最大内積探索装置1における検索データベース構築処理及び最大内積探索方法の処理について説明する。
Next, a search database construction process and a maximum inner product search method process in the maximum inner
図10において、まず、ブロック量子化部11により、検索データベース10によって予め格納された検索ベクトル集合に対してブロック量子化が行われ、量子化検索ベクトル集合及び代表ベクトル集合が構築される(ステップS1)。次に、転置ファイル構築部12により、S1にて構築された代表ベクトル集合の転置ファイルが構築される(ステップS2)。次に、Wavelet行列構築部13により、S2にて構築された転置ファイルに対してWavelet行列が構築される(ステップS3)。
In FIG. 10, first, block quantization is performed on the search vector set stored in advance by the
図11において、まず、クエリ取得部14により、クエリベクトルが取得される(ステップS10、クエリ取得ステップ)。次に、最大内積探索部15により、S10にて取得されたクエリベクトルと検索データベース10によって格納された情報に基づいて、クエリベクトルに類似する検索ベクトルが探索される(ステップS11、最大内積探索ステップ)。
In FIG. 11, first, a query vector is acquired by the query acquisition unit 14 (step S10, query acquisition step). Next, the maximum inner
引き続いて、上述した一連の最大内積探索装置1による処理をコンピュータに実行させるための最大内積探索プログラム2を説明する。図12に示すように、最大内積探索プログラム2は、コンピュータに挿入されてアクセスされる、あるいはコンピュータが備える記憶媒体30に形成されたプログラム格納領域31内に格納される。より具体的には、最大内積探索プログラム2は、最大内積探索装置1が備える記憶媒体30に形成されたプログラム格納領域31内に格納される。
Subsequently, a maximum inner
最大内積探索プログラム2は、検索データベースモジュール20と、ブロック量子化モジュール21と、転置ファイル構築モジュール22と、Wavelet行列構築モジュール23と、クエリ取得モジュール24と、最大内積探索モジュール25とを備えて構成される。検索データベースモジュール20と、ブロック量子化モジュール21と、転置ファイル構築モジュール22と、Wavelet行列構築モジュール23と、クエリ取得モジュール24と、最大内積探索モジュール25とを実行させることにより実現される機能は、上述した最大内積探索装置1の検索データベース10と、ブロック量子化部11と、転置ファイル構築部12と、Wavelet行列構築部13と、クエリ取得部14と、最大内積探索部15との機能とそれぞれ同様である。
The maximum inner
なお、最大内積探索プログラム2は、その一部若しくは全部が、通信回線等の伝送媒体を介して伝送され、他の機器により受信されて記憶(インストールを含む)される構成としてもよい。また、最大内積探索プログラム2の各モジュールは、1つのコンピュータでなく、複数のコンピュータのいずれかにインストールされてもよい。その場合、当該複数のコンピュータによるコンピュータシステムよって上述した一連の最大内積探索プログラム2の処理が行われる。
Note that a part or all of the maximum inner
次に、本実施形態のように構成された最大内積探索装置1の作用効果について説明する。
Next, the effect of the maximum inner
本実施形態の最大内積探索装置1によれば、最大内積探索部15により、ブロックごとに、当該ブロックのクエリベクトルと代表ベクトル集合の当該ブロックの代表ベクトルそれぞれとの内積に基づく代表ベクトルが選択され、検索ベクトル集合に含まれる検索ベクトルのうち、全てのブロックにおいて各ブロックに対して選択された代表ベクトルを含む検索ベクトルが探索される。ここで、検索ベクトル集合に含まれる検索ベクトルのうち、全てのブロックにおいて各ブロックに対して選択された代表ベクトルを含む検索ベクトルが探索される際に、例えば、Wavelet行列を利用した演算を行うことができる。Wavelet行列を利用すれば、ある範囲内で共通して出現する値を探索する演算を少ない計算量で行うことができる。つまり、検索ベクトルの全てのブロックそれぞれにおいて選択された代表ベクトルを含む検索ベクトルを少ない計算量で探索することができる。すなわち、計算量の少ない最大内積探索を行うことができる。
According to the maximum inner
また、本実施形態の最大内積探索装置1によれば、最大内積探索部15により、検索ベクトル集合に含まれる検索ベクトルのうち、全てのブロックにおいて各ブロックに対して選択された代表ベクトルを含む検索ベクトルが探索される際に、Wavelet行列を利用した演算が行われる。本実施形態のようにWavelet行列を利用すれば、ある範囲内で共通して出現する値を探索する演算を少ない計算量で行うことができる。かかる構成を採れば、検索ベクトルの全てのブロックそれぞれにおいて選択された代表ベクトルを含む検索ベクトルを少ない計算量で探索することができる。すなわち、計算量の少ない最大内積探索を行うことができる。また、検索ベクトルの全てのブロックそれぞれにおいて選択された代表ベクトルを含む検索ベクトルを少ない計算量で探索することができる。すなわち、計算量の少ない最大内積探索を行うことができる。
Further, according to the maximum inner
また、本実施形態の最大内積探索装置1によれば、Wavelet行列構築部13を備えることで、計算量の少ない最大内積探索を行うためのWavelet行列を確実に構築及び格納することができる。
In addition, according to the maximum inner
本実施形態の最大内積探索装置1は、内積の問題を、最頻の問題に変換し、Wavelet行列を用いて処理を行うことで、計算量の少ない最大内積探索を行うことができる。最大内積探索装置1は、画像、音声及びセンサデータの分類及び検索において利用することができる。データの数をn、次元数をm、ブロック数をs、量子化数をkとすると、全てのデータを調べる手法の計算量はO(nm)となる。一方、本実施形態の最大内積探索装置1では、計算量はO(ns/k)であり、通常k>>sであるため、最大内積探索装置1により、計算量の少ない、高速な探索を行うことができる。
The maximum inner
1…最大内積探索装置、2…最大内積探索プログラム、10…検索データベース、11…ブロック量子化部、12…転置ファイル構築部、13…Wavelet行列構築部、14…クエリ取得部、15…最大内積探索部、20…検索データベースモジュール、21…ブロック量子化モジュール、22…転置ファイル構築モジュール、23…Wavelet行列構築モジュール、24…クエリ取得モジュール、25…最大内積探索モジュール、30…記憶媒体、31…プログラム格納領域、100…CPU、101…RAM、102…ROM、103…入出力装置、104…通信モジュール、105…補助記憶装置。
DESCRIPTION OF
Claims (6)
前記要素数のクエリベクトルを取得するクエリ取得部と、
前記クエリ取得部によって取得されたクエリベクトルの要素を前記ブロックに分け、前記ブロックごとに、当該ブロックのクエリベクトルと前記検索データベースによって格納された代表ベクトル集合の当該ブロックの代表ベクトルそれぞれとの内積を算出し、算出された内積に基づいて前記ブロックごとに当該ブロックの代表ベクトルを選択し、前記検索データベースによって格納された検索ベクトル集合に含まれる検索ベクトルのうち、全ての前記ブロックにおいて各前記ブロックに対して選択された代表ベクトルを含む検索ベクトルを、前記検索データベースによって格納された量子化検索ベクトル集合に基づいて探索する最大内積探索部と、
を備える最大内積探索装置。 A search vector set that is a set of search vectors of a predetermined number of elements, and for each search vector of the search vector set, a quantized search vector set in which elements are divided into a plurality of blocks and quantized into representative vectors for each block; A search database that stores a representative vector set that is a set of representative vectors for each block;
A query acquisition unit for acquiring a query vector of the number of elements;
The elements of the query vector acquired by the query acquisition unit are divided into the blocks, and for each block, the inner product of the query vector of the block and the representative vector of the block of the representative vector set stored by the search database is obtained. Calculating a representative vector of the block for each block based on the calculated inner product, and out of the search vectors included in the search vector set stored by the search database, all the blocks are assigned to each block. A maximum inner product search unit for searching a search vector including a representative vector selected for the search based on a set of quantized search vectors stored in the search database;
A maximum inner product search device.
前記最大内積探索部は、検索ベクトルを探索する際に、前記検索データベースによって格納されたWavelet行列を利用した演算を行う、
請求項1に記載の最大内積探索装置。 The search database further stores, for each representative vector for each block included in the representative vector set, a Wavelet matrix corresponding to a set of search vector identification information for identifying a search vector including the representative vector,
The maximum inner product search unit performs an operation using a Wavelet matrix stored in the search database when searching for a search vector.
The maximum inner product search device according to claim 1.
請求項2に記載の最大内積探索装置。 When searching for a search vector, the maximum inner product search unit acquires a Wavelet matrix corresponding to each of all selected representative vectors, and a search vector identification that appears in common for all of the acquired Wavelet matrices Perform operations to obtain information,
The maximum inner product search device according to claim 2.
前記検索データベースは、前記Wavelet行列構築部によって構築されたWavelet行列を格納する、
請求項2又は3に記載の最大内積探索装置。 A wavelet matrix constructing unit that constructs a wavelet matrix corresponding to a set of search vector identification information for identifying a search vector including the representative vector for each representative vector included in the representative vector set;
The search database stores the Wavelet matrix constructed by the Wavelet matrix construction unit.
The maximum inner product search device according to claim 2 or 3.
前記要素数のクエリベクトルを取得するクエリ取得ステップと、
前記クエリ取得ステップにおいて取得されたクエリベクトルの要素を前記ブロックに分け、前記ブロックごとに、当該ブロックのクエリベクトルと前記検索データベースによって格納された代表ベクトル集合の当該ブロックの代表ベクトルそれぞれとの内積を算出し、算出された内積に基づいて前記ブロックごとに当該ブロックの代表ベクトルを選択し、前記検索データベースによって格納された検索ベクトル集合に含まれる検索ベクトルのうち、全ての前記ブロックにおいて各前記ブロックに対して選択された代表ベクトルを含む検索ベクトルを、前記検索データベースによって格納された量子化検索ベクトル集合に基づいて探索する最大内積探索ステップと、
を含む最大内積探索方法。 A search vector set that is a set of search vectors of a predetermined number of elements, and for each search vector of the search vector set, a quantized search vector set in which elements are divided into a plurality of blocks and quantized into representative vectors for each block; A maximum inner product search method executed by a maximum inner product search device including a search database that stores a representative vector set that is a set of representative vectors for each block,
A query acquisition step of acquiring a query vector of the number of elements;
The element of the query vector acquired in the query acquisition step is divided into the blocks, and for each block, the inner product of the query vector of the block and the representative vector of the block of the representative vector set stored by the search database is obtained. Calculating a representative vector of the block for each block based on the calculated inner product, and out of the search vectors included in the search vector set stored by the search database, all the blocks are assigned to each block. A maximum inner product search step for searching a search vector including a representative vector selected for the search based on a set of quantized search vectors stored by the search database;
Maximum inner product search method including
所定の要素数の検索ベクトルの集合である検索ベクトル集合と、検索ベクトル集合の各検索ベクトルについて、要素を複数のブロックに分けて前記ブロックごとに代表ベクトルに量子化した量子化検索ベクトル集合と、前記ブロックごとの代表ベクトルの集合である代表ベクトル集合とを格納する検索データベースと、
前記要素数のクエリベクトルを取得するクエリ取得部と、
前記クエリ取得部によって取得されたクエリベクトルの要素を前記ブロックに分け、前記ブロックごとに、当該ブロックのクエリベクトルと前記検索データベースによって格納された代表ベクトル集合の当該ブロックの代表ベクトルそれぞれとの内積を算出し、算出された内積に基づいて前記ブロックごとに当該ブロックの代表ベクトルを選択し、前記検索データベースによって格納された検索ベクトル集合に含まれる検索ベクトルのうち、全ての前記ブロックにおいて各前記ブロックに対して選択された代表ベクトルを含む検索ベクトルを、前記検索データベースによって格納された量子化検索ベクトル集合に基づいて探索する最大内積探索部、
として機能させる最大内積探索プログラム。
Computer
A search vector set that is a set of search vectors of a predetermined number of elements, and for each search vector of the search vector set, a quantized search vector set in which elements are divided into a plurality of blocks and quantized into representative vectors for each block; A search database that stores a representative vector set that is a set of representative vectors for each block;
A query acquisition unit for acquiring a query vector of the number of elements;
The elements of the query vector acquired by the query acquisition unit are divided into the blocks, and for each block, the inner product of the query vector of the block and the representative vector of the block of the representative vector set stored by the search database is obtained. Calculating a representative vector of the block for each block based on the calculated inner product, and out of the search vectors included in the search vector set stored by the search database, all the blocks are assigned to each block. A maximum inner product search unit for searching a search vector including a representative vector selected for the search based on a set of quantized search vectors stored by the search database;
Maximum inner product search program that functions as
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016181489A JP6872333B2 (en) | 2016-09-16 | 2016-09-16 | Maximum inner product search device, maximum inner product search method and maximum inner product search program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016181489A JP6872333B2 (en) | 2016-09-16 | 2016-09-16 | Maximum inner product search device, maximum inner product search method and maximum inner product search program |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2018045564A true JP2018045564A (en) | 2018-03-22 |
JP2018045564A5 JP2018045564A5 (en) | 2019-10-24 |
JP6872333B2 JP6872333B2 (en) | 2021-05-19 |
Family
ID=61695008
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016181489A Active JP6872333B2 (en) | 2016-09-16 | 2016-09-16 | Maximum inner product search device, maximum inner product search method and maximum inner product search program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6872333B2 (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000004164A (en) * | 1998-04-17 | 2000-01-07 | Tadahiro Omi | Device and method for vector quantization and recording medium |
JP2006235877A (en) * | 2005-02-23 | 2006-09-07 | Nippon Telegr & Teleph Corp <Ntt> | Advertising rate setting system and advertising rate setting program |
JP2006525603A (en) * | 2003-05-02 | 2006-11-09 | オーバーチュア サービシズ インコーポレイテッド | Detect inappropriate search queries submitted to wide area network search engines |
JP2012048718A (en) * | 2010-08-25 | 2012-03-08 | Nhn Corp | Online advertisement charging system, method thereof and computer readable recording medium |
JP2012088803A (en) * | 2010-10-15 | 2012-05-10 | Univ Of Aizu | Malignant web code determination system, malignant web code determination method, and program for malignant web code determination |
JP2013050502A (en) * | 2011-08-30 | 2013-03-14 | Seiko Epson Corp | Advertisement display control device, advertisement display control method, and program |
WO2016043121A1 (en) * | 2014-09-19 | 2016-03-24 | Necソリューションイノベータ株式会社 | Information processing device, information processing method, and computer-readable storage medium |
-
2016
- 2016-09-16 JP JP2016181489A patent/JP6872333B2/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000004164A (en) * | 1998-04-17 | 2000-01-07 | Tadahiro Omi | Device and method for vector quantization and recording medium |
JP2006525603A (en) * | 2003-05-02 | 2006-11-09 | オーバーチュア サービシズ インコーポレイテッド | Detect inappropriate search queries submitted to wide area network search engines |
JP2006235877A (en) * | 2005-02-23 | 2006-09-07 | Nippon Telegr & Teleph Corp <Ntt> | Advertising rate setting system and advertising rate setting program |
JP2012048718A (en) * | 2010-08-25 | 2012-03-08 | Nhn Corp | Online advertisement charging system, method thereof and computer readable recording medium |
JP2012088803A (en) * | 2010-10-15 | 2012-05-10 | Univ Of Aizu | Malignant web code determination system, malignant web code determination method, and program for malignant web code determination |
JP2013050502A (en) * | 2011-08-30 | 2013-03-14 | Seiko Epson Corp | Advertisement display control device, advertisement display control method, and program |
WO2016043121A1 (en) * | 2014-09-19 | 2016-03-24 | Necソリューションイノベータ株式会社 | Information processing device, information processing method, and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
JP6872333B2 (en) | 2021-05-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102411921B1 (en) | A method for calculating relevance, an apparatus for calculating relevance, a data query apparatus, and a non-transitory computer-readable storage medium | |
KR102449191B1 (en) | Method and apparatus for supporting machine learning algorithms and data pattern matching in ethernet solid state drive | |
Chaudhuri et al. | CMIR-NET: A deep learning based model for cross-modal retrieval in remote sensing | |
JP6265921B2 (en) | Method, apparatus and product for semantic processing of text | |
KR102371167B1 (en) | Methods and systems for mapping data items to sparse distributed representations | |
CN110023924A (en) | Device and method for semantic search | |
WO2021064907A1 (en) | Sentence generation device, sentence generation learning device, sentence generation method, sentence generation learning method, and program | |
KR101435010B1 (en) | Method for learning of sequential binary code using features and apparatus for the same | |
JP7483320B2 (en) | Automated Search Dictionary and User Interface | |
EP3278238A1 (en) | Fast orthogonal projection | |
Lian et al. | Product quantized collaborative filtering | |
JP2019023612A (en) | System and method for signal analysis | |
Le et al. | Efficient retrieval of matrix factorization-based top-k recommendations: A survey of recent approaches | |
CN110442749B (en) | Video frame processing method and device | |
CN117171393A (en) | Multi-mode retrieval-oriented self-adaptive semi-pairing inquiry hash method | |
Jain et al. | Approximate search with quantized sparse representations | |
EP3655862B1 (en) | Multiscale quantization for fast similarity search | |
CN112905809B (en) | Knowledge graph learning method and system | |
CN113918807A (en) | Data recommendation method and device, computing equipment and computer-readable storage medium | |
De Vries et al. | Parallel streaming signature em-tree: A clustering algorithm for web scale applications | |
JP6872333B2 (en) | Maximum inner product search device, maximum inner product search method and maximum inner product search program | |
Yang et al. | Isometric hashing for image retrieval | |
KR102062139B1 (en) | Method and Apparatus for Processing Data Based on Intelligent Data Structure | |
Guo et al. | New loss functions for fast maximum inner product search | |
Pronobis et al. | Sharing hash codes for multiple purposes |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190912 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190912 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200728 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200929 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20201127 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210309 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20210323 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210419 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6872333 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |