Discrimination device, discrimination method, and program

The discrimination device addresses the challenge of unlearned vectors in deep learning by employing a hash function to convert data for high-speed neighborhood searches, ensuring accurate vector similarity checks and maintaining inference accuracy.

WO2024214282A1PCT designated stage expired Publication Date: 2024-10-17NT T INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2023/015162
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-04-14
Publication Date
2024-10-17

AI Technical Summary

Technical Problem

Deep learning models face accuracy issues due to incomplete coverage of input vector patterns, leading to unlearned vector data during inference, which results in meaningless output values despite large amounts of learning data.

Method used

A discrimination device and method using a hash function that increases the probability of similar converted values for closer distances, allowing high-speed neighborhood searches to identify unlearned vectors by converting data into a format that enables efficient proximity checks.

Benefits of technology

Effectively determines unlearned vectors during inference, preventing their inclusion in neural network inputs and maintaining inference accuracy by employing a Locality-sensitive Hash (LSH) function for rapid vector similarity checks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2023015162_17102024_PF_FP_ABST
    Figure JP2023015162_17102024_PF_FP_ABST
Patent Text Reader

Abstract

This discrimination device is provided with: a conversion unit (11) that outputs a converted value for vector data as obtained by a preset function, which converts a vector into a form that allows high-speed neighborhood search using a hash function with which the closer the distance between two points, the higher the probability of outputting the same converted value for the two points; a storage unit (12) that stores, for a set of learning vector data, a set of converted values obtained by the preset function; and a discrimination unit (13) that acquires, for inference vector data, converted values obtained by the preset function, performs the neighborhood search using these converted values and the set of converted values stored in the storage unit (12), and if it is found that the set of learning vector data includes no vector the distance of which from the inference vector data is within a specified range, determines that the inference vector data is vector data that has not been learned.
Need to check novelty before this filing date? Find Prior Art

Description

Discrimination device, discrimination method, and program

[0001] The present disclosure relates to a discrimination device, a discrimination method, and a program for discriminating unlearned vectors.

[0002] In deep learning using neural networks and other technologies, various types of data in the real world are often converted into vector format that can be handled by computer systems.

[0003] In order to improve the accuracy of inference in deep learning, it is necessary to train the system in advance with a large number of patterns of combinations of input vectors and correct answer data, and it is desirable to obtain a large amount of training vector data.

[0004] Non-Patent Document 1 discloses data augmentation to increase the amount of training data, and Non-Patent Document 2 discloses a representative data augmentation method applied to natural language processing data.

[0005] S. Yang, et al., "Image Data Augmentation for Deep Learning: A Survey, "arXiv:2204.08610v1 [cs.CV] 19 Apr 2022.B. Li, et al., "Data Augmentation Approaches in NaturalLanguage Processing: A Survey, "arXiv:2110.01852v3 [cs.CL] 27 Jun 2022.

[0006] However, even if a method of expanding and increasing the amount of learning data is adopted, as in the techniques disclosed in Non-Patent Documents 1 and 2, it is not necessarily possible to completely cover all patterns of input vectors.

[0007] When using training data that does not cover a wide range of vector appearance patterns, it is possible that untrained vector data will be input during inference. Since the untrained vector data is significantly different from all the vector data input to the neural network during training, the inference results derived based on the output values ​​of the neural network may be meaningless.

[0008] In other words, even if a large amount of training data is prepared, it is not possible to cover all vector data, and there is a possibility that untrained data will be input during inference, which poses a problem that the inference accuracy of deep learning cannot be improved.

[0009] The present disclosure has been made in consideration of the above circumstances, and its purpose is to provide a discrimination device, a discrimination method, and a program capable of discriminating unlearned vectors contained in vector data for inference.

[0010] A discrimination device according to one embodiment of the present disclosure includes a conversion unit that uses a hash function to convert vector data into a form that enables high-speed neighborhood search, the conversion function being such that the closer the distance between two points, the higher the probability that the converted values ​​will be the same, and outputs the converted values ​​obtained by converting the vector data using the conversion function; a memory unit that stores a set of converted values ​​obtained by converting a set of vector data for learning using the conversion function; and a discrimination unit that acquires the converted values ​​obtained by converting vector data for inference using the conversion function, performs the neighborhood search using the converted values ​​and the set of converted values ​​stored in the memory unit, and determines that the vector data for inference does not contain any vector data in the set of vector data for learning that is within a predetermined range of distance from the vector data for inference, as unlearned vector data.

[0011] A discrimination method according to one aspect of the present disclosure involves storing a set of transformed values ​​obtained by transforming a set of training vector data using a transformation function that uses a hash function that increases the probability that the transformed values ​​will be the same the closer the distance between two points, and converting the vector data into a form that allows for fast neighborhood search; obtaining transformed values ​​obtained by transforming the inference vector data using the transformation function; performing the neighborhood search using these transformed values ​​and the stored set of transformed values; and discriminating the inference vector data that is found to have no vector data within a predetermined range of distance from the inference vector data in the set of training vector data from which it is determined that it is unlearned vector data.

[0012] One aspect of the present disclosure is a program for causing a computer to function as the discrimination device.

[0013] According to the present disclosure, it is possible to identify unlearned vectors included in vector data for inference.

[0014] FIG. 1 is a block diagram showing the configuration of a discrimination device according to an embodiment. FIG. 2 is an explanatory diagram schematically showing a distance W when a discrimination unit discriminates whether a vector is an unlearned vector. FIG. 3 is a flowchart showing a processing procedure for converting learning vector data into a format that enables a neighborhood search. FIG. 4 is a flowchart showing a detailed processing procedure of step S1 shown in FIG. 3. FIG. 5 is a flowchart showing a detailed processing procedure of step S4 shown in FIG. 3. FIG. 6 is a flowchart showing a processing procedure for discriminating an unlearned vector from vector data for inference. FIG. 7 is a flowchart showing a detailed processing procedure of step S8 shown in FIG. 6. FIG. 8 is a block diagram showing the hardware configuration of this embodiment.

[0015] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present disclosure will now be described with reference to the accompanying drawings. Fig. 1 is a block diagram showing the configuration of a discrimination device 1 according to the present embodiment.

[0016] As shown in FIG. 1, the discrimination device 1 includes a conversion unit 11, a storage unit 12, and a discrimination unit 13.

[0017] The conversion unit 11 receives vector data for learning and vector data for inference. A function (hereinafter referred to as a "conversion function") for converting vectors into a format that allows for a neighborhood search is set in the conversion unit 11. When the conversion unit 11 receives vector data for learning and vector data for inference, it converts each vector data into a format that allows for a neighborhood search using the conversion function.

[0018] When vector data for learning is input, the conversion unit 11 converts the vector data into a format that allows for a neighborhood search using a conversion function, and outputs the converted vector data to the storage unit 12. When vector data for inference is input, the conversion unit 11 converts the vector data into a format that allows for a neighborhood search using a conversion function, and outputs the converted vector data to the discrimination unit 13.

[0019] That is, the conversion unit 11 has a conversion function for converting vector data into a format that enables high-speed determination of whether or not there are vectors that are close in distance, and outputs a converted value obtained by converting the vector data using the conversion function.

[0020] The storage unit 12 stores a set of values ​​(hereinafter referred to as "training conversion values") obtained by converting a set of learning vector data using a conversion function.

[0021] The determination unit 13 obtains a value (hereinafter referred to as an “inference conversion value”) obtained by converting the vector data for inference using the conversion function. The determination unit 13 refers to a set of learning conversion values ​​stored in the storage unit 12.

[0022] The discrimination unit 13 determines whether or not a member having the same value as the inference conversion value exists in the set of training conversion values ​​stored in the storage unit 12. This determination is a determination as to whether or not a vector exists in the set of training vector data whose distance to the inference vector data is within a predetermined range, i.e., a process equivalent to a vector neighborhood search.

[0023] The discrimination unit 13 determines that the vector data for inference is unlearned vector data if the set of training conversion values ​​does not contain a member with the same value as the inference conversion value, and determines that the vector data for inference is learned vector data if the set of training conversion values ​​contains a member with the same value as the inference conversion value.

[0024] This determination is equivalent to the determination shown in Figure 2. That is, when a set X1 of learned vectors is set, if an element of set X1 exists within a range of distance W, as in the case of vector x1, x1 is determined to be a learned vector, and if an element of set X1 does not exist within a range of distance W, as in the case of vector x2, x2 is determined to be an unlearned vector. The reason why these two determinations are equivalent is explained in Reference 1 below, and will be discussed later in this specification. (Reference 1) Hisashi Koga, "Hashing-Based Similarity Search Technology and Its Applications," IEICE Fundamentals Review Vol. 7 No. 3, January 2014.

[0025] The discrimination unit 13 outputs the vector data that is determined to have been learned to a downstream device (not shown), and discards the vector data that is determined to have not been learned.

[0026] Next, the operation of this embodiment will be described with reference to a flowchart of FIG.

[0027] First, in step S1, the conversion unit 11 performs data conversion preprocessing. Specifically, the conversion unit 11 sets a conversion function that converts this vector data into a format that allows for neighborhood search. The conversion function will be described in detail later.

[0028] FIG. 4 is a flowchart showing the detailed processing procedure of the data conversion pre-processing shown in step S1 of FIG.

[0029] 4, the conversion unit 11 sets the numerical values ​​k, L, and W. Specifically, k is the number of hash functions h (described later) used in each function g in the function g determined in step S12, L is the number of functions g, and W is the value of W commonly used by all hash functions h. Note that various methods can be used to determine these numerical values.

[0030] Specifically, function g is a function that outputs a k-dimensional vector obtained by concatenating the hash values ​​of the k hash functions h. This function g is an example of the conversion function, i.e., a function that enables high-speed neighborhood search of a vector. Specifically, hash function h is a hash function expressed by the following formula (1) (see Reference 1 mentioned above):

[0031]

[0032] In equation (1), "a" represents an m-dimensional vector whose elements are m random variables "a1, a2, ..., am" selected from a p-stable distribution (m is the number of dimensions of vector v, which is the argument of hash function h). "b" represents a real number randomly selected from the closed interval [0, W] (W > 0). The L-shaped brackets on the right side of equation (1) represent the floor function.

[0033] This hash function h is an example of a hash function that has the property that the closer the distance between vectors, the higher the probability that the converted values ​​will be the same, i.e., a function called LSH (Locality-sensitive Hash).Furthermore, the function g is expressed as g(v) = {h1(v), h2(v), ..., hk(v)} using k hash functions h1, h2, ..., hk, each of which has different values ​​for the random variables a and b.

[0034] In step S12, the conversion unit 11 prepares L functions g, i.e., g (1≦i≦L), and sets the values ​​of k random variables a and b used in each hash function g, i.e., a(i_j) and b(i_j) (1≦i≦L, 1≦j≦k). This determines the specific function g.

[0035] In step S13, the conversion unit 11 prepares a hash function Gi (1≦i≦L) that converts the k-dimensional vector value of the function g into a real scalar value. Various specific formats of the hash function G can be used. However, it is desirable that the hash function have a low collision probability. Note that in the processing of step S13, the hash function G is introduced to simplify the comparison between functions g to a comparison between scalar values. The processing of step S13 is not essential and may be omitted.

[0036] In step S14, the conversion unit 11 sets a data structure for managing a set Ui (1≦i≦L) whose members are the numerical values ​​of each hash function Gi, and initializes it to an empty set.

[0037] In step S15, the conversion unit 11 sets a data structure for managing the above set Ui in the storage unit 12. By the processing of steps S11 to S15 described above, the data conversion pre-processing shown in step S1 in FIG.

[0038] In step S2 of FIG. 3, the conversion unit 11 acquires learning vector data provided from the outside.

[0039] In step S3, the conversion unit 11 determines whether each vector included in the learning vector data includes data that has not been converted into a learning conversion value (unprocessed data). If unprocessed data is included (S3; YES), the process proceeds to step S4. If not (S3; NO), the process ends. Initially, the determination in S3 is YES.

[0040] In step S4, the conversion unit 11 extracts the vectors included in the acquired unprocessed learning vector data one by one, and converts them into learning conversion values ​​using the above-mentioned functions g i and G i .

[0041] Fig. 5 is a flowchart showing in detail the processing of step S4 shown in Fig. 3. First, in step S41, the conversion unit 11 calculates L function values ​​g(v) (1 ≤ i ≤ L) for a vector v of the selected unprocessed learning vector data.

[0042] In step S42, the conversion unit 11 calculates a hash value Gi(gi(v)) (1≦i≦L) (the learning conversion value) by a hash function Gi based on the function value gi(v).

[0043] In step S43, the conversion unit 11 registers the hash value Gi(gi(v)) as a member of the set Ui set in the storage unit 12. As a result, it is recorded that a vector whose hash value is Gi(gi(v)) exists in the training data. In this way, the conversion process for the training vector data to the training conversion value is performed.

[0044] Next, the process of determining unlearned vectors from vector data for inference will be described with reference to the flowchart shown in FIG.

[0045] First, in step S5 of Fig. 6, the conversion unit 11 reads vector data for inference provided from the outside. The vector data for inference includes learned vectors and unlearned vectors.

[0046] In step S6, the conversion unit 11 determines whether or not an unprocessed vector (hereinafter referred to as vector q) exists in the vector data for inference read in the processing of step S5. An "unprocessed vector" refers to a vector that has not been determined as learned or unlearned. If an unprocessed vector exists (S6; YES), the processing proceeds to step S7; if not (S6; NO), the processing ends.

[0047] In step S7, the conversion unit 11 extracts the unprocessed vector q and calculates a hash value Gi (gi(q)) (1≦i≦L) (the inference conversion value) using the hash function Gi.

[0048] In step S8, the discrimination unit 13 performs a search process to determine whether each vector q is a learned vector or an unlearned vector by referring to the learning conversion values ​​stored in the memory unit 12.

[0049] Fig. 7 is a flowchart showing the detailed processing procedure of step S8 shown in Fig. 6. In step S81, the discriminator 13 sets the numerical value i indicating the member to "i=1".

[0050] In step S82, the determination unit 13 determines whether or not a member having the same numerical value as the hash value Gi (gi(q)) exists in the set Ui.

[0051] If there is a member with the same numerical value (S82; YES), the process proceeds to step S83; if not (S82; NO), the process proceeds to step S84.

[0052] In step S83, the discriminator 13 determines that the vector q is a learned vector, and then ends this process.

[0053] In step S84, the determination unit 13 determines whether or not i = L. If i = L (S84; YES), the process proceeds to step S85, and if not (S84; NO), the process proceeds to step S86.

[0054] In step S85, the discriminator 13 determines that the vector q is an unlearned vector.

[0055] In step S86, the determination unit 13 sets "i=i+1" and repeats the process from step S82.

[0056] That is, for "i" in the range "1≦i≦L", if there is no set Ui that includes the hash value G(g(q)) as a member (YES determination in S84), the vector q is determined to be an unlearned vector. Otherwise, that is, if there is at least one set Ui that includes the hash value G(g(q)) as a member (YES determination in S82), the vector q is determined to be a learned vector. In this way, it can be determined whether the vector data for inference is a learned vector or an unlearned vector.

[0057] Next, we will explain the basis for the processing shown in steps S83 and S85 of Figure 7, i.e., why whether or not there is a set Ui that includes the hash value G(g(q)) as a member is equivalent to whether or not the vector q is a learned vector.

[0058] Generally, a hash function h is said to be "(r1, r2, p1, p2)-sensitive" when it satisfies the two conditions shown in the following equations (2A) and (2B). Here, d(u, v) is the Euclidean distance between two vectors u and v. The symbol P represents probability. In other words, P[h(u) = h(v)] indicates the probability that the hash value of vector u and the hash value of vector v are the same.

[0059]

[0060] Equations (2A) and (2B) indicate that the closer the two points u and v are, the higher the probability that the hash values ​​will be identical. The hash function h(v) shown in equation (1) above is known to be (W / 2, 2W, 1 / 2, 1 / 3)-sensitive (see, for example, Reference 2 below). (Reference 2) Kesselheim and Mehlhorn, "Bloom Filters and Locality-Sensitive Hashing," Randomized Algorithms, Lecture 4, Page 6, Summer 2016.

[0061] That is, when applied to equation (2), p1=1 / 2 and p2=1 / 3.

[0062] Let us consider a method for performing a neighborhood search for a vector using multiple hash functions with these properties. Let k and L be natural numbers, and W be a positive real number. Let us define the values ​​of aij and bij (where 1≦i≦L, 1≦j≦k), and define L functions g that concatenate the hash values ​​of k hash functions hij (aij, bij, W).

[0063] That is, the function g i is a function that outputs a k-dimensional vector shown in the following equation (3).

[0064]

[0065] In this case, a necessary and sufficient condition for g(q)=g(v1) is that all hash values ​​from h1 to hk match, so the following equation (4) holds.

[0066]

[0067] Therefore, for a query vector q (a vector for which it is desired to search for the presence or absence of a nearby vector), the probability that g(q) and g(v) match for at least one of functions g to g (where (d(q, v)≦W / 2); see equation (2A) above) can be expressed by the following equation (5). Therefore, if L is made sufficiently large, this probability can be made to approach "1".

[0068]

[0069] In equation (5), when L is increased, the probability that gi(q) = gi(v2) for any hash function gi (where (d(q,v2) ≥ 2W); see equation (2B) above) also increases. To address this issue, the following equation (6) holds true based on the same reasoning as equation (4) above.

[0070]

[0071] Furthermore, the following equation (7) is established from equations (4) and (6).

[0072]

[0073] By increasing k and amplifying the probability ratio shown in the above equation (7) sufficiently, this probability can be relatively reduced and dealt with.

[0074] From the above, if the hash values ​​of all hashes g(q) do not match any of the members of the set constructed by the learned vectors, it can be assumed that there is no vector v that satisfies d(q, v) ≦ W / 2 based on the above formula (5). As a result, it is possible to determine unlearned vector data from multiple vector data for inference.

[0075] Furthermore, if a certain g(q) matches any member of a set constructed by learned vectors, that alone does not necessarily mean that a vector v exists that satisfies d(q, v) ≦ W / 2. In other words, it can only be determined that the vector q is unlearned. In this embodiment, if it cannot be determined that the vector q is unlearned, it is determined that it has been learned.

[0076] In this way, the discrimination device 1 according to this embodiment has a conversion function that converts vector data into a form that enables high-speed neighborhood search by using a hash function that increases the probability that the converted values ​​will be the same the closer the distance between two points, and is equipped with a conversion unit 11 that outputs the converted values ​​obtained by converting the vector data using the conversion function, a memory unit 12 that stores a set of converted values ​​obtained by converting a set of vector data for learning using the conversion function, and a discrimination unit 13 that acquires the converted values ​​obtained by converting the vector data for inference using the conversion function, performs a neighborhood search using these converted values ​​and the set of converted values ​​stored in the memory unit 12, and discriminates the vector data for inference that is found to have no vector data in the set of vector data for learning that is within a predetermined range of distance from the vector data for inference as unlearned vector data.

[0077] In this embodiment, even if unlearned vector data is included in the vector data for inference, this unlearned vector data can be identified and discarded. This makes it possible to prevent unlearned vector data from being included in the vector data used for neural network inference, and to prevent a decrease in inference accuracy due to deep learning.

[0078] In this embodiment, the conversion unit 11 uses a function that converts vector data into a form that enables high-speed neighborhood search using an LSH (Locality-sensitive Hash) function, making it possible to perform distance searches with higher accuracy.

[0079] In this embodiment, the conversion unit 11 uses a hash function Gi to convert vector values ​​into a data structure of real scalar values ​​that allows for high-speed searches. Therefore, the process of comparing vector values ​​of the hash function g can be a comparison between scalar values. This simplifies the comparison of vector values ​​and reduces the computational load on the device.

[0080] The discrimination device 1 of the present embodiment described above can be, for example, a general-purpose computer system including a CPU (Central Processing Unit, processor) 901, a memory 902, a storage 903 (HDD: Hard Disk Drive, SSD: Solid State Drive), a communication device 904, an input device 905, and an output device 906, as shown in Fig. 8. The memory 902 and the storage 903 are storage devices. In this computer system, the CPU 901 executes a predetermined program loaded on the memory 902, thereby realizing each function of the discrimination device 1.

[0081] The discrimination device 1 may be implemented by one computer or by multiple computers, or may be a virtual machine implemented on a computer.

[0082] The program for the discrimination device 1 can be stored in a computer-readable recording medium such as a HDD, SSD, USB (Universal Serial Bus) memory, CD (Compact Disc), or DVD (Digital Versatile Disc), or can be distributed via a network. The computer-readable recording medium is, for example, a non-transitory recording medium.

[0083] The present disclosure is not limited to the above-described embodiments, and various modifications are possible within the scope of the present disclosure.

[0084] 1 Discrimination device 11 Conversion unit 12 Storage unit 13 Discrimination unit

Claims

1. A discrimination device comprising: a conversion unit having a conversion function that converts vector data into a form that allows for high-speed neighborhood search using a hash function that increases the probability that the converted value will be the same as the distance between two points is closer, and that outputs the converted value obtained by converting the vector data using the conversion function; a memory unit that stores a set of converted values ​​obtained by converting a set of learning vector data using the conversion function; and a discrimination unit that obtains the converted value obtained by converting inference vector data using the conversion function, performs the neighborhood search using this converted value and the set of converted values ​​stored in the memory unit, and discriminates the inference vector data for which it is found that there is no vector data in the set of learning vector data whose distance to the inference vector data is within a specified range as unlearned vector data.

2. The discrimination device according to claim 1, wherein the conversion function is a function utilizing a Locality-sensitive Hash (LSH) function.

3. The discrimination device according to claim 2, wherein the conversion unit converts the converted value into a data structure of a real number scalar value and records the converted value in the storage unit.

4. A method of determining whether or not a set of training vector data is unlearned vector data, the method comprising: converting a set of training vector data using a hash function that uses a higher probability that the converted values ​​will be the same as the closer the distance between two points, and storing a set of converted values ​​that convert the vector data into a form that allows for high-speed neighborhood search; obtaining converted values ​​obtained by converting vector data for inference using the conversion function; performing the neighborhood search using these converted values ​​and the set of stored converted values; and determining whether or not there is any vector data in the set of training vector data that is within a specified range of distance from the inference vector data, the set of training vector data, is unlearned vector data.

5. A program for causing a computer to function as the discrimination device according to claim 1 or 2.

Citation Information

Patent Citations

  • Evaluation device, motion control device, evaluation method, and evaluation program

    JP2019139277A

  • Data evaluation method and device, and breakdown diagnosis method and device

    WO2016132468A1

  • Equipment state monitoring device and equipment state monitoring method

    WO2021240750A1