This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2013-260471, filed on Dec. 17, 2013, the entire contents of which are incorporated herein by reference.
The embodiments discussed herein are directed to space division methods, etc.
For example, when authenticating a user for various systems, a process is performed for obtaining biological information of the user and determining whether or not biological information that matches the obtained biological information exists in a pre-registered database. Now, a similarity search is effective because biological information obtained at the time of authentication hardly matches completely with the biological information obtained at the time of registration.
As to representation of the degree of similarity when performing a similarity search, there is a technique for converting feature values of biological information into a hash vector so that biological information for which the hamming distance between their hash vectors is short are specified as similar biological information.
With conventional techniques, feature values are converted into a hash vector by using a hyper-plane, but there are also processes where feature values are converted into a hash vector by using a hyper-sphere, and improvements to the precision can be better expected when a hyper-sphere is used.
With conventional techniques, however, a similarity search using hash vectors are not performed with a high precision.
For example, when feature vectors are converted into hash vectors by using a hyper-sphere, there are cases where the hamming distance after the conversion into hash vectors may turn out to be small for feature vectors that are significantly different from each other, due to an influence of a worm hole. Therefore, different feature vectors may be determined erroneously as being similar feature vectors.
Now, a worm hole will be described.
Where the phenomenon illustrated in
According to an aspect of an embodiment, a space division method includes specifying an intersection position of a plurality of hyper-planes such that the intersection position is present within a sphere, when the plurality of hyper-planes are placed so as to divide the sphere present in a space of a dimension higher than a dimension of a feature space by one dimension or more; and initially placing the plurality of hyper-planes passing through the set intersection position.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
Preferred embodiments of the present invention will be explained with reference to accompanying drawings. Note that the embodiments are not to limit the scope of the present invention.
An example configuration of a search device according to Embodiment 1 will be described. The search device is an example of the space division device.
The feature value storage unit 101 is a storage unit for storing a plurality of feature vectors.
The query storage unit 102 is a storage unit for storing a query feature vector. The search device 100 searches through the feature value storage unit 101 for a feature vector that is similar to the query feature vector.
The bit string storage unit 103 is a storage unit for storing bit strings obtained from a bit string generating unit 105 to be described later.
The inverse stereographic projection units 104a and 104b are processing units for subjecting the m-dimensional feature space V to an inverse stereographic projection so that the feature space V is associated with the (m+p−1)-dimensional hyper-sphere S, which is embedded in a space W of which the number of dimensions is higher than m by p. Here, p is an integer of 1 or more. In the following description, the inverse stereographic projection units 104a and 104b may be referred to collectively as an inverse stereographic projection unit 104.
The height from the feature space V to the north pole SN of the hyper-sphere S is defined as d. The intersection between the straight line passing through the north pole SN and the point xV and the surface of the hyper-sphere S corresponds to xS. For example, a cross section SA of the hyper-sphere S corresponds to an area VA of the feature space V, as illustrated in
Now, an inverse stereographic projection is the inverse of a stereographic projection. Where the hyper-sphere S and the feature space V are arranged with a straight line extending from the north pole SN to intersect with the hyper-sphere S, as illustrated in
It is assumed that where the feature vector (coordinate set) of the feature space V is (x1, x2, . . . , xm), the inverse stereographic projection “f−1:V→U” is as expressed in Expression (1) below. Note however that r2 in Expression (1) is defined as in Expression (2).
In Expressions (1) and (2), x0 and d are parameters. The parameters x0 and d correspond to x0 and d illustrated in
The inverse stereographic projection unit 104 performs an inverse stereographic projection of the feature vector on the basis of the specified parameters x0 and d, and Expression (1). Note that the inverse stereographic projection unit 104 may have the information of the parameter x0 and the parameter d pre-stored therein.
The inverse stereographic projection unit 104a performs an inverse stereographic projection on the basis of a feature vector stored in the query storage unit 102 and Expression (1), thereby calculating a set of coordinates on the hyper-sphere S corresponding to the feature vector. The inverse stereographic projection unit 104a outputs the calculated set of coordinates to the bit string generating unit 105a.
The inverse stereographic projection unit 104b performs an inverse stereographic projection on the basis of the feature vectors stored in the feature value storage unit 101 and Expression (1), thereby calculating a plurality of sets of coordinates on the hyper-sphere S corresponding to the respective feature vectors. The inverse stereographic projection unit 104b outputs the calculated sets of coordinates to the bit string generating unit 105b.
The bit string generating units 105a and 105b are processing units for converting a set of coordinates on the hyper-sphere S into a bit string in accordance with a conversion rule. The bit string corresponds to a hash vector. In the following description, the bit string generating units 105a and 105b may be referred to collectively as the bit string generating unit 105. The bit string generating unit 105 is an example of the generating unit.
In Expression (3), the information of the n×(m+1) matrix “W11, W12, . . . , Wn(m+1)” and the information of n×1 “c1, c2, . . . , cn” are a conversion rule. The bit string generating unit 105 obtains the conversion rule from the placement unit 106 to be described later. In Expression (3), the information “x1, x2, . . . , xm+1” is a set of coordinates on the hyper-sphere S.
The bit string generating unit 105 calculates “b1, b2, . . . , b3, . . . , bn” by solving Expression (3). For example, the bit string generating unit 105 calculates bN as illustrated in Expression (4) below.
b
N=(WN1×x1+WN2×x2+ . . . +WN,m+1×xm+1)+cN (4)
After calculating “b1, b2, b3, . . . , bn,” the bit string generating unit 105 converts bN to “1” if the value of bN is positive and converts bN to “0” if the value of bN is not positive, thereby calculating a bit string. For example, where the values of “b1, b2, b3, . . . , bn” are positive, negative, positive, . . . , positive, respectively, the bit string generating unit 105 generates a bit string “1, 0, 1, . . . , 1.”
The bit string generating unit 105a generates a bit string on the basis of a set of coordinates obtained from the inverse stereographic projection unit 104a, and outputs the generated bit string to the hamming distance calculation unit 107.
The bit string generating unit 105b generates a plurality of bit strings on the basis of sets of coordinates obtained from the inverse stereographic projection unit 104b, and outputs the generated bit strings to the bit string storage unit 103.
The placement unit 106 is a processing unit for placing, in the hyper-sphere S, n hyper-planes across the (m+p−1)-dimensional hyper-sphere S. The placement unit 106 also generates a conversion rule on the basis of the results of the placement. Hereinafter, the process by which the placement unit 106 specifies initial placements of the respective hyper-planes will be described, and then the process by which the placement unit 106 generates the conversion rule will be described.
The process by which the placement unit 106 specifies initial placements of the respective hyper-planes will now be described. The placement unit 106 obtains feature vectors from the feature value storage unit 101, and calculates the square root of the eigenvalue of the variance-covariance matrix for each feature vector. The placement unit 106 specifies, as a, the largest one of the eigenvalues. The placement unit 106 also defines the direction of the specified a as “vecN.”
The placement unit 106 calculates, as v, the third-order moment in the vecN direction. For example, the placement unit 106 calculates the third-order moment on the basis of Expression (5) below. In Expression (5), xi(k) corresponds to the ith bit of the k-th feature vector, u corresponds to the average value of the feature vectors, and K corresponds to the number of the feature vectors.
Then, the placement unit 106 performs a principal component analysis on the feature vector, and calculates the cumulative contribution ratio. For example, the placement unit 106 performs a principal component analysis so as to obtain the spreads of the first to Nth principal components. The placement unit 106 arranges the spreads of the respective principal components in a descending order to denote the principal components as σ1, σ2, . . . , σN, starting from one with the largest spread. The placement unit 106 calculates λ on the basis of Expression (6) below. The placement unit 106 also calculates the cumulative contribution ratio λm on the basis of Expression (7) below.
On a graph of which the horizontal axis represents the number “i” of components and the vertical axis represents the logarithmic cumulative contribution ratio “log λi,” the placement unit 106 plots the relationship between i and log λi, thereby specifying an approximate straight line from the results of plotting. For example, the placement unit 106 specifies the approximate straight line by using the least squares method, or the like.
The placement unit 106 denotes, as R, the radius of a circular image obtained by a stereographic projection of the equator of the hyper-sphere S.
The placement unit 106 calculates c1 on the basis of Expression (8), and c2 on the basis of Expression (9).
c1=(2/(1+exp(σ/((γ+1)R))))−1 (8)
c2=sgn(v)|v|1/3/R (9)
The placement unit 106 sets the position of a common intersection among hyper-planes to be a position shifted from the center of the hyper-sphere S by c1 in the m+1-dimensional direction and by c2 in the vecN direction. The placement unit 106 also samples n normal vectors from the multi-dimensional standard normal distribution. The placement unit 106 sets, as an initial position, a hyper-plane having the sampled normal vectors and passing through the common intersection.
Next, the process by which the placement unit 106 generates the conversion rule will be described. The placement unit 106 generates information of the conversion rule on the basis of information of the normal vector of the hyper-plane and the offset amount of the hyper-plane. The placement unit 106 generates the information of the n×(m+1) matrix “W11, W12, . . . , Wn(m+1)” by arranging the n normal vectors. For example, each row of the n×(m+1) matrix of Expression (3) corresponds to a normal vector. Note that the placement unit 106 assigns a random value to any missing dimension in the information of the n×(m+1) matrix. The placement unit 106 also generates offset coordinates as information of n×1.
The placement unit 106 outputs the information of the n×(m+1) matrix and the information of n×1 to the bit string generating unit 105.
The hamming distance calculation unit 107 is a processing unit for calculating the hamming distance between the bit string obtained from the bit string generating unit 105a and each of the bit strings stored in the bit string storage unit 103. A hamming distance obtained from a comparison between two binary values having the same number of digits is the number of digits for which the binary values differ from each other. In the following description, the bit string obtained from the bit string generating unit 105a is denoted as a query bit string.
The hamming distance calculation unit 107 outputs, to the similar vector specifying unit 108, the calculated hamming distance between the query bit string and each of the bit strings from the bit string storage unit 103.
The similar vector specifying unit 108 obtains the calculated hamming distances from the hamming distance calculation unit 107, and ranks the bit strings in an ascending order of the hamming distance with respect to the query bit string. The similar vector specifying unit 108 may output the highest-ranked bit string among the ranked bit strings as the bit string corresponding to the query bit string, or may output the ranking results.
Next, an example procedure of the search device 100 according to the present embodiment will be described.
The inverse stereographic projection unit 104a of the search device 100 subjects the feature vector of the query to an inverse stereographic projection, thereby generating the query bit string (step S102). The inverse stereographic projection unit 104b subjects feature vectors from the feature value storage unit 101 to an inverse stereographic projection, thereby generating bit strings (step S103).
The hamming distance calculation unit 107 of the search device 100 calculates the hamming distance between the query bit string and the bit strings from the bit string storage unit 103, and the similar vector specifying unit 108 specifies a bit string that is similar to the query bit string (step S104).
Next, the process of setting initial positions of hyper-planes in step S101 of
The placement unit 106 sets the direction of σ to vecN (step S202). The placement unit 106 performs a principal component analysis for the feature vectors and calculates the cumulative contribution ratio (step S203). The placement unit 106 specifies an approximate straight line that is obtained as a result of plotting, where the horizontal axis represents the number of components and the vertical axis represents the logarithmic cumulative contribution ratio (step S204).
The placement unit 106 sets the gradient of the approximate straight line to γ+1 (step S205). The placement unit 106 sets, to R, the radius of a circular image obtained by a stereographic projection of the equator of the hyper-sphere S (step S206).
The placement unit 106 calculates c1 and c2 (step S207). For this step, the placement unit 106 calculates c1 and c2 on the basis of Expressions (8) and (9).
The placement unit 106 determines the position c of the common intersection to be a position shifted from the center of the hyper-sphere S by c1 in the m+1-dimensional direction and by c2 in the vecN direction (step S208).
The placement unit 106 samples n normal vectors from the multi-dimensional standard normal distribution (step S209). The placement unit 106 sets, as an initial hyper-plane position, a hyper-plane having the sampled normal vectors and passing through the common intersection (step S210).
Next, the advantageous effects of the search device 100 according to the present embodiment will be described. When specifying a bit string through an inverse stereographic projection of a feature vector onto a hyper-sphere divided into areas by a plurality of hyper-planes, the search device 100 sets the initial positions of the hyper-planes so that the intersections of the hyper-planes are contained within the hyper-sphere S. Thus, by setting the initial positions of the hyper-planes so that the intersections of the hyper-planes are contained within the hyper-sphere, it is possible to prevent the occurrence of a worm hole, thereby eliminating instances where the hamming distance after the conversion into hash vectors turns out to be small for feature vectors that are significantly different from each other. Therefore, with the search device 100, it is possible to perform a similarity search using feature vectors with a high precision.
Now, the process by which the placement unit 106 sets the initial positions of hyper-planes is not limited to the process described above. Another process by which the placement unit 106 sets the initial positions of hyper-planes will be described below.
The placement unit 106 samples n normal vectors and offsets from the standard normal distribution, and determines the placement of the n hyper-planes on the basis of the sampled normal vectors and offsets. If an intersection for the n hyper-planes exists at the point at infinity, the placement unit 106 performs the sampling again to determine the placement of the n hyper-planes.
If the intersection is not present at the point at infinity for the n hyper-planes, the placement unit 106 determines whether or not the intersections are all present within the hyper-sphere S. If not all of the intersections are present within the hyper-sphere S, the placement unit 106 reduces in half the offsets of the n hyper-planes, and determines again whether or not the intersections are all present within the hyper-sphere S.
If the intersections are all present within the hyper-sphere S, the placement unit 106 specifies, as initial positions, the current positions of the hyper-planes.
On the other hand, if no intersection is present at the point at infinity (No in step S302), the placement unit 106 determines whether or not the intersections formed by the hyper-planes are all present within the hyper-sphere S (step S303). If not all of the intersections formed by the hyper-planes are present within the hyper-sphere S (No in step S303), the placement unit 106 reduces the offsets of all the hyper-planes to ½ (step S304), and proceeds to step S303.
On the other hand, if the intersections formed by the hyper-planes are all present within the hyper-sphere S (Yes step S303), the placement unit 106 sets, as initial positions, the current positions of the hyper-planes (step S305).
As the placement unit 106 specifies the initial positions of the hyper-planes as described above, the intersections of the hyper-planes are contained within the hyper-sphere S, and it is possible to prevent the occurrence of a worm hole, thereby eliminating instances where the hamming distance after the conversion into hash vectors turns out to be small for feature vectors that are significantly different from each other. Therefore, with the search device 100, it is possible to perform a similarity search using feature vectors with a high precision.
The embodiment described above is directed to a case where an inverse stereographic projection is performed on a hyper-sphere S that is present in the space of a dimension higher than the dimension of the feature space V by one dimension, but the present invention is not limited thereto. The present invention is similarly applicable to cases where an inverse stereographic projection is performed on an m-dimensional sphere that is present in the space of a dimension higher than the dimension of the feature space V by two or more dimensions, for example.
Next, an example computer will be described, which serves as an image processing device realizing similar functions to those of the search device 100 illustrated in the embodiment described above.
As illustrated in
The hard disk device 207 includes a placement program 207a. The CPU 201 reads out and extracts the program 207a onto the RAM 206. The placement program 207a functions as a placement process 206a. The placement process 206a corresponds to the placement unit 106, for example.
Note that the placement program 207a does not necessarily need to be stored in the hard disk device 207 in advance. For example, a program may be stored on a “portable physical medium”, such as a flexible disk (FD), a CD-ROM, a DVD disc, a magneto-optical disc, an IC card, etc., to be inserted into the computer 200. Then, the computer 200 may read out the placement program 207a therefrom, and execute the placement program 207a.
One embodiment of the present invention provides an advantageous effect of making it possible to perform a similarity search using feature vectors with a high precision.
All examples and conditional language recited herein are intended for pedagogical purposes of aiding the reader in understanding the invention and the concepts contributed by the inventor to further the art, and are not to be construed as limitations to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiment of the present invention has been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2013-260471 | Dec 2013 | JP | national |