This application is a National Stage Entry of PCT/JP2020/025048 filed on Jun. 25, 2020, the contents of all of which are incorporated herein by reference, in their entirety.
The present disclosure relates to an inference process using a decision tree.
In recent years, there has been a demand for high speed processing of a large amount of data. One method of speeding up data processing is parallelization of processing. For example, a repetitive process that can independently operate a plurality of pieces of data can be expanded and processed in parallel. As a system of parallel processing, a SIMD (Single Instruction Multiple Data) method is known. The SIMD is a parallel processing method that speeds up a process by executing one instruction simultaneously on the plurality of pieces of data. Examples of SIMD processors include a vector processor, a GPU (Graphics Processing Unit), and the like.
Patent Document 1 describes a technique in which the parallel processing is applied to an inference using a decision tree. In Patent Document 1, identification information and a condition determination result of each node in the decision tree are expressed in binary numbers so that the condition determination of each layer can be collectively processed.
However, in a technique of Patent Document 1, since all data are used to process all condition determination nodes, the process is not conducted efficiently.
It is one object of the present disclosure to speed up the inference process using a decision tree by parallel processing.
According to an example aspect of the present disclosure, there is provided an information processing device including:
According to another example aspect of the present disclosure, there is provided an information processing method, including:
According to still another example aspect of the present disclosure, there is provided a recording medium storing a program, the program causing a computer to perform a process including:
According to the present disclosure, it becomes possible to speed up an inference process using a decision tree by a parallel processing.
In the following, example embodiments will be described with reference to the accompanying drawings.
The decision tree model in
First, at the root node N1, it is determined whether the debtor has a regular job or not. When the debtor does not have the regular job, the process advances to the leaf node N2, and the debt is predicted to be uncollectible (NO). On the other hand, in a case where the debtor has the regular job, the process advances to the condition determination node N3, and determines whether or not an annual income of the debtor is 4.8 million yen or more. With respect to the annual income of the debtor that is 4.8 million yen or more, the process advances to the leaf node N4, and the debt is predicted to be collectible (YES). With respect to the annual income of the debtor that is lower than 4.8 million yen, the process advances to the condition determination node N5, and determines whether or not an age of the debtor is 51 years or older. With respect to the age of the debtor that is 51 years or older, the process advances to the leaf node N6 and the debt is predicted to be collectible (YES). On the other hand, with respect to the age of the debtor that is younger than 51 years old, the process advances to the leaf node N7, and the debt is predicted to be uncollectible (NO). Accordingly, the availability for collecting the debt from each debtor is output as the predicted value.
Now, in a case of applying the parallel processing to the decision tree inference, it becomes a problem which part of the decision tree inference is processed in parallel. Although a method for processing data rows of the input data in parallel may be considered, since each data row may go down to a different child node, comparison instructions in the condition determination nodes may not be matched, and the parallel processing cannot be performed without modification. Therefore, in the present example embodiment, comparison instructions which are executed at respective condition determination nodes are forcibly unified. Specifically, different comparison instructions respective to condition determination nodes are converted into a single comparison instruction. As the comparison instruction is converted, the threshold defined by the comparison instruction is changed. Accordingly, it is possible to unify the comparison instructions of all condition determination nodes included in the decision tree to the same instruction, and it is possible to realize the parallel processing.
It is determined whether or not a “value” indicating a value to be determined (hereinafter referred to as a “determination target value”) is matched with a “category” indicating a category value.
It is determined whether or not the “value” indicating the determination target value is less than a “threshold” indicating the threshold value.
It is determined whether or not the “value” indicating the determination target value is equal to or less than the “threshold” indicating the threshold value.
It is determined whether or not the “value” indicating the determination target value is greater than the “threshold” indicating the threshold value.
It is determined whether or not the “value” indicating the determination target value is equal to or greater than the “threshold” indicating the threshold value.
In the present example embodiment, the information processing device 100 converts the above described five comparison instructions into one comparison instruction (hereinafter, also referred to as a “unified instruction”) in the following form.
Specifically, as depicted in
“Categories” indicating the same category value can be used to “category≤value≤category”.
A “minus infinity (−∞)” indicating a threshold value and a “threshold” indicating a threshold value can be used to convert into “−∞≤value≤prev(threshold)”.
The “minus infinity (−∞)” indicating the threshold value and the “threshold” indicating the threshold value can be used to convert into “−∞≤value≤threshold”.
A “next (threshold)” indicating a threshold value and an “infinity (∞)” indicating a threshold value can be used to convert into “next(threshold)≤value≤∞”.
The “threshold” indicating the threshold value and the “infinity (∞)” indicating the threshold value can be used to convert into “threshold≤value≤∞”.
Note that when functions prey( ) and next( ) are intuitively represented as prev( )=x−ε and next( )−x+ε, respectively, where ε is a small positive number. Although a threshold value used in a comparison instruction is of a real number type, since the threshold value is an expression with finite precision, there exists a value b such that “there is no representable value between a and b” for a certain value a. A value of prev(threshold) is a value that is less than the threshold value and has no expressible value between the value of prev(threshold) and the “threshold”. A value of next(threshold) is a value that is greater than the “threshold” and is not representable between the value and the “threshold”. In other words, the value of prev(threshold) is a value (hereinafter, also referred to as an “adjacent value”) that is less than the “threshold” and is adjacent to the “threshold” among discrete values in a predetermined resolution (that is, 32-bit, 64-bit, or the like). Similarly, the value of next(threshold) is a value that is greater than the “threshold” and is adjacent to the “threshold” among the discrete values in the predetermined resolution. In practice, the values of prev(threshold) and next(threshold) can be obtained by using a function “nextafter( )” in a standard library for C language, for instance.
Accordingly, by unifying individual comparison instructions used in the condition determination nodes of the decision tree to the same comparison instruction, even in a case where each data row goes down to different child nodes in the decision tree, it is possible to process the comparison instructions of all condition determination nodes in parallel.
Next, a specific example in which the comparison instructions executed by the condition determination nodes are unified and processed in parallel will be described.
As described above, according to the information processing device 100 of the present example embodiment, since the different comparison instruction which is set in each of the condition determination nodes of the determination tree is converted into the unified instruction by adjusting each threshold value, even in a case where the condition determination node is different for each piece of data, the parallel processing can be performed on all data.
(Hardware Configuration)
The input IF 11 inputs and outputs data. Specifically, the input IF 11 acquires input data from an outside, and outputs the inference result generated by the information processing device 100 based on the input data.
The processor 12 corresponds to one or more processors each being a computer such as a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit), and controls the entire information processing device 100 by executing programs prepared in advance. In particular, the processor 12 performs the parallel processing of the data. As one method for realizing the parallel processing, there is a method of using a SIMD processor such as the GPU. In a case where the information processing device 100 performs the parallel processing using the SIMD processor, the processor 12 may be the SIMD processor or the SIMD processor may be provided as a separate processor from the processor 12. Also, in the latter case, the information processing device 100 causes the SIMD processor to execute an operation capable of the parallel processing, and causes the processor 12 to execute other operations.
The memory 13 is formed by a ROM (Read Only Memory), a RAM (Random Access Memory), and the like. The memory 13 stores various programs to be executed by the processor 12. The memory 13 is also used as a working memory during the execution of various processes by the processor 12.
The recording medium 14 is a non-volatile and non-transitory recording medium such as a disk-shaped recording medium, a semiconductor memory, and is formed to be detachable from the information processing device 100. The recording medium 14 records various programs executed by the processor 12.
The DB 15 stores data input from the input IF 11. Specifically, the input data acquired by the input IF 11 are stored in the DB 15. In addition, the DB 15 stores information of the decision tree model used for the inference. In detail, information indicating a tree structure of the trained decision tree model and node settings (a condition determination node setting and a leaf node setting) are stored for each node.
The instruction unification unit 21 acquires a comparison instruction for each condition determination node included in the decision tree, and performs a process for converting the result into the unified instruction as described above. Specifically, the threshold reading unit 21a reads the threshold value (threshold) or the category value (category) for each condition determination node, and outputs the read value to the instruction conversion unit 21c. The comparison instruction reading unit 21b reads the comparison instruction for each condition determination node, and outputs the read instruction to the instruction conversion unit 21c. For instance, in the case of the condition determination node 1 depicted in
The instruction conversion unit 21c converts the comparison instruction into a unified instruction of the form “X≤value≤Y” based on the input threshold value or the input category value and the comparison instruction. Here, with respect to the input comparison instruction that is the match determination, the instruction conversion unit 21c uses the input category value as the threshold values X and Y. On the other hand, with respect to the input comparison instruction that is the magnitude determination, the instruction conversion unit 21c changes the threshold value in accordance with the unification instruction. That is, the instruction conversion unit 21c creates the threshold values X and Y in the unified instruction from the input threshold so that the input comparison instruction has a form of “X≤value≤Y”. For instance, in a case of the condition determination node 1 illustrated in
The input data reading unit 22 reads the input data to be inferred by the decision tree model, and outputs the input data to the parallel process unit 23. In the example of
In the above configuration, the instruction unification unit 21 is an example of the instruction unification means, the input data reading unit 22 is an example of the acquisition means, and the parallel process unit 23 is an example of the condition determination unit.
First, the parallel process unit 23 sets a root node to the current location of all data (current location nodes) (step S1). Next, the parallel process unit 23 repeats the parallel processing of steps S4 to S7 while there exist data that has not reached the leaf node (step S3). In the parallel processing of steps S4 to S7, the parallel process unit 23 sets the current location node number of data [i] being i-th data to “m” (step S4). Accordingly, the current location node is set for each piece of data.
Next, the parallel process unit 23 sets a left threshold value of the unified instruction of the current location node [m] to X[i], sets a right threshold value of the unified instruction of the current location node [m] to Y[i], and sets a feature number referred to by the unified instruction of the current location node [m] to “j” (step S5). Accordingly, the unified instruction to be executed is acquired for each piece of data. Next, the parallel process unit 23 executes the unified instruction for each piece of data. In detail, the parallel process unit 23 determines whether or not (X[i]≤data[i][j]) and (data[i]≤Y[i]) are satisfied, and sets “true” or “false” to the condition determination result of the data[i] (step S6). Next, the parallel process unit 23 sets each child node of the current location node [m] corresponding to the condition determination result of the data[i] to the current location of the data[i] (step S7).
Accordingly, the parallel process unit 23 executes the parallel processing of steps S4 to S7 for all data. As long as there exist data that have not reached the leaf node, the parallel process unit 23 executes the parallel processing of steps S4 to S7 while moving the current location to a lower layer in the decision tree model, and terminates the condition determination process when all data reach the leaf nodes.
A part or all of the example embodiments described above may also be described as the following supplementary notes, but not limited thereto.
1. An information processing device comprising:
2. The information processing device according to supplementary note 1, wherein the instruction unification means changes a threshold value for each of the condition determination nodes in order for all condition decision nodes included in the decision tree to execute the unified instruction.
3. The information processing device according to supplementary note 2, wherein the unified instruction is a comparison instruction that determines whether or not a value to be determined in each of the condition decision nodes is equal to or greater than a first threshold value and is equal to or less than a second threshold value.
4. The information processing device according to supplementary note 3, wherein the instruction unification means converts an instruction that determines whether or not the value to be determined is less than a predetermined value, into an instruction that determines whether or not the value to be determined is equal to or greater than minus infinity and is equal to or less than an adjacent value.
5. The information processing device according to supplementary note 4, wherein the instruction unification means converts an instruction that determines whether or not the value to be determined is greater than a predetermined value, into an instruction that determines whether or not the value to be determined is equal to or greater than an adjacent value being greater than the predetermined value and is equal to or less than plus infinity.
6. The information processing device according to any one of supplementary notes 3 to 5, wherein the instruction unification means converts an instruction that determines whether or not the value to be determined matches a predetermined value, into an instruction that determines whether or not the valued to be determined is equal to or less than the predetermined value and is equal to or greater than the predetermined value.
7. The information processing device according to any one of supplementary notes 3 to 6, wherein the instruction unification means converts an instruction that determines whether or not the value to be determined is equal to or less than a predetermined value, into an instruction that determines whether or not the value to be determined is equal to or greater than minus infinity and is equal to or less than the predetermined value.
8. The information processing device according to supplementary note 7, wherein the instruction unification means converts an instruction that determines whether or not the value to be determined is equal to or greater than a predetermined value, into an instruction that determines whether or not the value to be determined is equal to or greater than the predetermined value and is equal to or less than plus infinity.
9. The information processing device according to any one of supplementary notes 1 to 8, wherein the condition determination means performs a parallel SIMD processing.
10. An information processing method, comprising:
11. A recording medium storing a program, the program causing a computer to perform a process comprising:
While the disclosure has been described with reference to the example embodiments and examples, the disclosure is not limited to the above example embodiments and examples. It will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present disclosure as defined by the claims.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2020/025048 | 6/25/2020 | WO |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2021/260888 | 12/30/2021 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
4542456 | Hill | Sep 1985 | A |
20050289529 | Almog | Dec 2005 | A1 |
20130185239 | Dedeoglu et al. | Jul 2013 | A1 |
20130246753 | Bradbury et al. | Sep 2013 | A1 |
20130246758 | Bradbury et al. | Sep 2013 | A1 |
20170011294 | Jagannathan et al. | Jan 2017 | A1 |
Number | Date | Country |
---|---|---|
113407154 | Sep 2021 | CN |
2013-117862 | Jun 2013 | JP |
2015-513749 | May 2015 | JP |
2017-224070 | Dec 2017 | JP |
2018-520443 | Jul 2018 | JP |
Entry |
---|
International Search Report for PCT Application No. PCT/JP2020/025048, mailed on Sep. 29, 2020. |
JP Office Action for JP Application No. 2022-532182, mailed on Dec. 26, 2023 with English Translation. |
Number | Date | Country | |
---|---|---|---|
20230237097 A1 | Jul 2023 | US |