Secret decision tree learning device, secret decision tree learning system, secret decision tree learning method, and computer program product
By centralizing node division at the same level, the secret decision tree learning device reduces the calculation time of decision tree learning, solves the problem of too long calculation time, and realizes efficient decision tree learning.
Patent Information
- Application Number
- CN202080106144.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-16
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2040-10-16
AI Technical Summary
When learning the decision tree through secret calculations, the calculation time is longer, especially when the decision tree height increases, the calculation time required for learning will also become longer.
The secret decision tree learning device centrally divides the data sets of all nodes at the same level, reduces the number of references to the data sets, and uses secret calculations to efficiently learn the decision tree.
Reduces the calculation time when the decision tree is learned through secret calculations, and improves learning efficiency.
Smart Images

Figure CN116324938B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a secret decision tree learning device, a secret decision tree learning system, a secret decision tree learning method, and a program. Background Art
[0002] As a method for obtaining specific operation (calculation) results without restoring encrypted values, a method known as secret computing is known (e.g., Non-Patent Document 1). In this method, by performing encryption processing to distribute numerical values across three secret computing devices, and then having the three secret computing devices perform collaborative calculations, the results of addition and subtraction, constant addition, multiplication, constant multiplication, logical operations (negation, logical product, logical sum, and exclusive OR), and data format conversion (integer to binary) can be obtained as the state distributed to the three secret computing devices without restoring the numerical values.
[0003] In addition, it is also well known that when a decision tree is learned (i.e., trained) based on a given data set, each node calculates an evaluation (assessment) value when dividing (splitting) the data set based on the attribute value of each data, and adopts the division with the largest evaluation value.
[0004] [Reference Document]
[0005] [Non-patent document]
[0006] Non-patent document 1: Hiroshi Chida, Hiroki Hamada, Dai Igarashi, and Katsumi Takahashi, "Reexamination of the Calculation of the Number of Hidden Levels in Lightweight Verification Possible 3-Party," in CSS, 2010. Summary of the Invention
[0007] [Technical problems to be solved]
[0008] However, when learning a decision tree through secret computing, the computation time is long. For example, when the decision tree is a binary tree with a height of less than h, in order to hide the number of data classified in each node (i.e., the amount of data), the number of references to the data set must be Θ(2 h ) times. Therefore, if the height of the decision tree increases, the computation time required for learning will also increase.
[0009] One embodiment of the present invention is proposed in view of the above-mentioned problem, and its purpose is to reduce the computation time when learning a decision tree through secret computing.
[0010] [Technical solution]
[0011] In order to achieve the above-mentioned purpose, a secret decision tree learning device of one embodiment is a secret decision tree learning device that learns a decision tree through secret computing, which comprises: an input unit, which inputs a data set consisting of multiple (plural) records, and the multiple records include attribute values of one or more explanatory variables and attribute values of objective variables; and a learning unit, which divides the data set into all nodes contained in each level (hierarchy) of the decision tree, thereby learning the decision tree.
[0012] [Beneficial Effects]
[0013] It is possible to reduce the computation time when learning decision trees through secret computing. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] [ Figure 1 ] is a schematic diagram showing an example of the functional structure of the secret decision tree learning device of this embodiment.
[0015] [ Figure 2 ] is a schematic diagram showing an example of the hardware configuration of the secret decision tree learning device of the present embodiment.
[0016] [ Figure 3 ] is a flowchart showing an example of the process of secret decision tree learning processing in this embodiment.
[0017] [ Figure 4 ] A flowchart (part 1) showing an example of the process of secret decision tree test processing in this embodiment.
[0018] [ Figure 5 ] A flowchart (part 2) showing an example of the process of secret decision tree test processing in this embodiment.
[0019] [ Figure 6 ] is a flowchart showing an example of the process of secret packet processing in this embodiment. DETAILED DESCRIPTION
[0020] An embodiment of the present invention is described below. In this embodiment, a secret decision tree learning device 10 is described, which can efficiently learn a decision tree by secret computing (that is, learn the decision tree without disclosing the input and output). As described later, the secret decision tree learning device 10 of this embodiment utilizes the characteristic that "each data in a given data set is classified in a non-overlapping manner between nodes at the same level of the decision tree" and concentrates on classifying all nodes at the same level. Based on this, the number of references to the entire data set can be reduced exponentially. It should be noted that in this embodiment, a decision tree whose input and output are kept confidential using secret computing is also called a secret decision tree.
[0021] <Notation>
[0022] First, various notations will be described. It should be noted that notations that are not necessarily used in this embodiment will be described below.
[0023] The value obtained by hiding a value a through encryption, secret sharing, etc. is called the hidden value of a and is denoted as [a]. When a is hidden through secret sharing, [a] can be used to reference the set of fragments (shards) of the secret share held (owned) by each secure computing device.
[0024] ·recover
[0025] The process of taking the hidden value [a] of a as input and calculating the value c when c=a is expressed as the following formula.
[0026] c←Open([a])
[0027] Arithmetic operations
[0028] Each operation of addition, subtraction, and multiplication takes two hidden values, a and b, [a] and [b] as inputs and calculates the hidden values [c1], [c2], and [c3] of a+b, ab, and the result of ab, c1, c2, and c3, respectively. The execution of each operation of addition, subtraction, and multiplication is expressed as the following formula.
[0029] [c1]←Add([a],[b])
[0030] [c2]←Sub([a],[b])
[0031] [c3]←Mul([a],[b])
[0032] Without causing misunderstanding, Add([a], [b]), Sub([a], [b]), and Mul([a], [b]) are abbreviated as [a]+[b], [a]-[b], and [a]×[b], respectively.
[0033] · Comparison
[0034] The operation of comparison takes the hidden values [a] and [b] of two values a and b as inputs and calculates the hidden values [c1], [c2], and [c3] of the truth values c ∈ {0, 1} of a = b, a ≤ b, and a < b. In terms of truth values, it is 1 when true and 0 when false. The execution of the comparison operations of a = b, a ≤ b, and a < b is respectively denoted by the following formulas. [[ID=X]] [[ID=X]]
[0035] [c1] ← EQ([a], [b])[[ID=X]] [[ID=X]]
[0036] [c2] ← LE([a], [b])[[ID=X]] [[ID=X]]
[0037] [c3] ← LT([a], [b])[[ID=X]] [[ID=X]]
[0038] · Selection
[0039] The operation of selection takes the hidden value [c] of the truth value c ∈ {0, 1} and the hidden values [a] and [b] of two values a and b as inputs and calculates the hidden value [d] of d that satisfies [[ID=X]] [[ID=X]]
[0040] [Equation 1][[ID=X]] [[ID=X]]
[0041] [[ID=X]] The hidden value [d]. The execution of this operation is denoted by the following formula. [[ID=X]] [[ID=X]]
[0042] [d] ← IfElse([c], [a], [b])[[ID=X]] [[ID=X]]
[0043] This operation can be implemented by the following formula. [[ID=X]] [[ID=X]]
[0044] [d] ← [c] × ([a] - [b]) + [b][[ID=X]] [[ID=X]]
[0045] <Decision Tree>
[0046] A decision tree is a directed graph that expresses knowledge about a certain attribute of data through a combination of rules based on a tree structure. In addition, attributes include an attribute called the target variable and an attribute called the explanatory variable. The decision tree takes the attribute values of the explanatory variable as inputs and predicts and outputs the attribute values of the target variable. A decision tree contains one or more nodes. Each node other than the leaf (leaf node) is set with a partitioning rule (partitioning condition) related to the explanatory variable, such as "age less than 30 years" (note: "" is equivalent to ""). On the other hand, the leaf node (i.e., the terminal (end) node of the decision tree) is set with the attribute value of the target variable. [[ID=X]] [[ID=X]]
[0047] After receiving the attribute value of the explanatory variable, the decision tree first determines the splitting condition at the root node. Next, based on the result of the splitting condition determination, the tree branches to one of the child nodes. The tree then recursively repeats the splitting condition determination and child node branching for each node, outputting the attribute value assigned to the final leaf node as the predicted value of the target variable.
[0048] Decision tree learning algorithm
[0049] As algorithms for learning decision trees based on a data set consisting of explanatory variables and target variables, for example, CART, ID3, C4.5, etc. are known. Although these algorithms differ in details, they all divide the data set in a greedy recursive manner and then learn the decision tree so that a certain objective function is maximized from the root node to the leaf node (Step 1 to Step 8 described later). In addition, the input to the algorithm is the data set Q = (X, y), and the output is a decision tree, which is expressed as a directed graph from the root node to the leaf. In the following, each data contained in the data set will also be referred to as a record. It should be noted that, for example, a data set can also be referred to as a "learning data set", "supervisory data set", etc., and each data contained in a data set can also be referred to as "learning data", "supervisory data", etc.
[0050] Here, X is a matrix whose elements are the attribute values of the explanatory variables for each record, and is represented, for example, by a matrix with the total number of records as the number of rows and the total number of explanatory variables as the number of columns. y is a vector whose elements are the attribute values of the target variable for each record, and is represented, for example, by a vertical vector with the attribute value of the target variable for the record in the nth row of X as the nth element.
[0051] It should be noted that, as mentioned above, each node other than the leaf node of the decision tree is set with a partitioning condition, and the leaf node is set with the attribute value of the target variable. In addition, the target variable takes a categorical value, the explanatory variable takes a numerical value or a categorical value, the target variable is also called a label, and its value (attribute value) is also called a label value. In addition, hereinafter, the explanatory variable that takes a numerical value is also called a numerical attribute, and its value is also called a numerical attribute value. Similarly, the explanatory variable that takes a categorical value is also called a categorical attribute (that is, when recorded as a "categorical attribute", it refers to the explanatory variable that takes a categorical value), and its value is also called a categorical attribute value. A decision tree when the target variable is a numerical value is also called a regression tree.
[0052] Step 1: Generate (create) node v.
[0053] Step 2: If the end condition of the partition is met, the attribute value of the target variable is set to the node v, which is then output as a leaf node and the process ends. In this case, the attribute value (label value) set to the node v is, for example, the most frequently occurring value among the values of the elements contained in y. It should be noted that as end conditions, for example, the elements contained in y have the same value (that is, the attribute value of the target variable is the same) or the decision tree has reached a predetermined height.
[0054] Step 3: If the end condition of the partition is not met, list the partition conditions r1, r2, ... that can be applied to the node v.
[0055] Step 4: Use the objective function to calculate the partition conditions r i Evaluation value s i Perform calculations.
[0056] Step 5: From the set of partition conditions {r i}Select the partition condition r with the maximum evaluation value * , and the partition condition r * Set to the node v.
[0057] Step 6: According to the division condition r * Divide the data set (X, y) into data sets (X1, y1), (X2, y2), ..., (X d ,y d ). In other words, this means that according to the partition condition r * Classify each record contained in the data set (X, y) into data sets (X1, y1), (X2, y2), ..., (X d ,y d It should be noted that d is the number of branches (i.e., the number of child nodes held by a node).
[0058] Step 7: For each (X j ,y j ) recursively execute Step 1 to Step 7. That is, each (X j ,y j ) is treated as (X, y) and the functions, methods, etc. executing Steps 1 through 7 are called. Here, after node v is generated in the recursive Step 1, the branch extends to the node v generated in the calling Step 1. Note that node v generated in the calling Step 1 is the parent node, and node v generated in the called Step 1 is the child node.
[0059] Step8: For all data sets (X j ,y j) completes execution of Steps 1 through 7 (that is, all recursive calls to Steps 1 through 7 are complete), the set of nodes v (and the partitioning conditions r set for each node v) and the set of branches extending between the nodes are output, and processing ends. This set of nodes v and branches constitutes the decision tree.
[0060] In this embodiment, the evaluation of the partitioning conditions for each node at the same level (Steps 4 and 5 above) and the partitioning of the data set based on the evaluation results (Step 6 above) are collectively performed. These processes are then recursively repeated for each level, thereby learning the secret decision tree. It should be noted that a level refers to a collection of nodes with the same depth from the root node, also referred to as a "layer."
[0061] Number of branches
[0062] The number of branches d can be any integer greater than 2, but in this embodiment, a binary tree is assumed, so d = 2. It should be noted that this embodiment can also be applied to the case where d is greater than 3, but the larger the value of d, the longer the calculation time.
[0063] ·Partition conditions
[0064] As a partitioning condition, any condition for the attribute value of the explanatory variable can be used. However, generally speaking, conditions such as size comparison and inclusion in a certain set are more commonly used. In this embodiment, the explanatory variable takes either a numerical value or a categorical value. Therefore, when taking a numerical value, the partitioning condition is a comparison with a threshold value (for example, C is the threshold value, x is the numerical attribute value of the explanatory variable, x ≤ C, etc.). When taking a categorical value, the partitioning condition is inclusion in a certain set (for example, X is the set, x is the categorical attribute value, x∈X, etc.). It should be noted that the partitioning condition may also be referred to as a partitioning rule, classification condition, classification rule, etc.
[0065] Purity index
[0066] As an indicator for measuring the quality of the partitioning (or classification) of a data set into multiple data sets (in other words, the classification of each record contained in a data set into multiple data sets), a known indicator, H(·), which indicates whether a data set is fuzzy and pure, is known. Commonly used indicators include the Gini coefficient and entropy.
[0067] Set the set of records with the attribute value (i.e., label value) of the target variable in the data set Q as k to Q k At this time, the ratio of records of the label value k of the node whose data set Q is input is defined as follows.
[0068] [Formula 2]
[0069]
[0070] In addition, in this embodiment, entropy represented by the following formula is used as an index of purity.
[0071] [Formula 3]
[0072]
[0073] Objective function
[0074] The quality of each partitioning condition is evaluated by an objective function (ie, the value of the objective function is the evaluation value of the partitioning condition). Commonly used objective functions include mutual information (Mutual Information), gain ratio, etc.
[0075] Assume that the partition condition is θ, and the data set Q is divided into two data sets, Q(θ, 0) and Q(θ, 1) under the partition condition θ.
[0076] [Formula 4]
[0077]
[0078] Gain(Q,θ):=H(Q)-G(Q,θ)
[0079]
[0080] The defined GainRatio() is called a gain ratio. In this embodiment, the gain ratio is used as an objective function.
[0081] <Calculation of evaluation value>
[0082] The splitting conditions for each node are set by selecting a splitting condition that maximizes a predetermined objective function at that node. Since the objective function value must be calculated for each candidate splitting condition, it is important to be able to efficiently calculate the objective function value for a given splitting condition.
[0083] The gain ratio defined by Equation 4 above requires complex calculations to determine the frequency of each label value (the target variable value) after actual segmentation. Therefore, in this embodiment, the gain ratio calculation method is streamlined and simplified, allowing for centralized calculation of gain ratios for multiple segmentation conditions using secret computation.
[0084] In order to simplify the calculation of the gain ratio, we focus on the large number of ratios required in the gain ratio. Since the ratio requires division, it is computationally expensive to calculate directly. However, it can be converted into a statistic (statistical value) called frequency that is easy to calculate by multiplying the total number. Based on this observation, this embodiment uses SplitInfo after multiplying by the size of the input data set. + 、H + 、Gain + and G + The functions of are used to replace the functions of SplitInfo, H, Gain and G.
[0085] For simplicity, when using
[0086] [Formula 5]
[0087] f(x):=xlog2x
[0088] When SplitInfo + can be organized as follows.
[0089] [Formula 6]
[0090]
[0091] Similarly, H + can be organized as follows.
[0092] [Formula 7]
[0093]
[0094] Similarly, G + can be organized as follows.
[0095] [Formula 8]
[0096]
[0097] In addition, similarly, Gain + can be organized as follows.
[0098] [Formula 9]
[0099] Gain + (Q,θ):=|Q|Gain(Q,θ)
[0100] =|Q|H(Q)-|Q|G(Q,θ)=H + (Q)-G + (Q,θ)
[0101] The above SplitInfo + 、H + 、Gain + and G+ Each function is composed of the number of records included in the data set Q, the frequency of the number of records in the data set Q that meet a certain condition, f(·), and addition and subtraction.
[0102] GainRatio is determined by
[0103] [Equation 10]
[0104]
[0105] It is shown that the numerator and denominator of GainRatio of the partition condition θ of the data set Q can be finally obtained by
[0106] (1) The number of records of Q |Q|;
[0107] (2) Number of records with label value k in Q | Q k |;
[0108] (3) the number of records |Q(θ, i)| in each data set after Q is partitioned based on θ; and
[0109] (4) The number of records with label value k in each data set after Q is divided according to θ | Q(θ, i) k |
[0110] Calculation is performed using these four record numbers, f(·), and addition and subtraction.
[0111] The input of f(·) is the above four frequencies (number of records |Q|, |Q k |, |Q(θ, i)|, |Q(θ, i) k |). Therefore, when the number of records in the given training data set is n, the input of f(·) must be an integer greater than or equal to n. Therefore, when f(·) is hidden through secret sharing, the calculation of f(·) can be achieved Θ(n) times with O(nlogn) communication traffic by using secret batch mapping, which uses a correspondence table (lookup table) that represents the following correspondence relationship between sizes Θ(n).
[0112] [Equation 11]
[0113]
[0114] According to this, in the present embodiment, when learning the secret decision tree, by calculating each frequency at each node, the evaluation value (GainRatio) of a plurality of division conditions at each node can be calculated collectively.
[0115] Furthermore, the result of comparing two values (a, b) and (c, d), given as a pair of non-negative numerators and denominators, is equivalent to the result of comparing ad and bc. Since both the numerator and denominator of GainRatio are non-negative, using the above method instead when comparing GainRatios (i.e., comparing evaluation values) avoids division. This reduces the computation time required to compare evaluation values to select the split condition that maximizes the evaluation value.
[0116] <Functional Configuration>
[0117] Next, see Figure 1 The functional configuration of the secret decision tree learning device 10 according to this embodiment will be described. Figure 1 This is a schematic diagram showing an example of the functional configuration of the secret decision tree learning device 10 according to the present embodiment.
[0118] like Figure 1 As shown, the secret decision tree learning device 10 of this embodiment includes an input unit 101 , a secret decision tree learning unit 102 , an output unit 103 , and a storage unit 104 .
[0119] The storage unit 104 stores various data (i.e., various hidden data) used to train the secret decision tree. This data includes a data set given as a learning data set (hereinafter referred to as the learning data set). The learning data set consists of a vector whose elements are the values of the explanatory variables for each record and a vector whose elements are the label values for each record. Specifically, for example, if the number of records constituting the learning data set is n and the total number of explanatory variables is m-1, then the learning data set is represented by a matrix with n rows and m columns.
[0120] Furthermore, the various data stored in the storage unit 104 also include a group information vector indicating to which node (ie, group) a certain record is classified during the training of the secret decision tree.
[0121] The input unit 101 inputs a set of training data for training a secret decision tree.
[0122] The secret decision tree learning unit 102 uses the training data set and the group information vector to recursively repeat the evaluation (testing) of the partitioning conditions for each node in the same layer and the partitioning of the data set based on the evaluation results (i.e., the classification of the records constituting the data set), thereby learning the secret decision tree. The secret decision tree learning unit 102 includes an initialization unit 111, a partitioning unit 112, a grouping unit 113, and a node extraction unit 114.
[0123] When learning a secret decision tree, the initialization unit 111 initializes various data, such as the group information vector. The partitioning unit 112 collectively evaluates (tests) the partitioning conditions for each node on the same layer and partitions the data set based on the evaluation results (i.e., classifies the records that make up the data set). The grouping unit 113 uses the classification results of the records from the partitioning unit 112 to calculate the training data set, group information vector, and other data used for evaluating the partitioning conditions for each node on the next layer and partitioning the data set based on the evaluation results. The node extraction unit 114 extracts information about each node that makes up the final output secret decision tree.
[0124] The output unit 103 outputs the secret decision tree learned (trained) by the secret decision tree learning unit 102. It should be noted that the output unit 103 only needs to output the secret decision tree (more accurately, the data representing the information of each node constituting the secret decision tree) to any predetermined output destination (e.g., the storage unit 104).
[0125] <Hardware Configuration>
[0126] Next, see Figure 2 The hardware configuration of the secret decision tree learning device 10 according to this embodiment will be described. Figure 2 This is a schematic diagram of an example of the hardware configuration of the secret decision tree learning device 10 according to this embodiment.
[0127] like Figure 2 As shown, the secret decision tree learning device 10 of this embodiment is implemented by hardware of a general computer or computer system, and includes an input device 201, a display device 202, an external I / F 203, a communication I / F 204, a processor 205, and a storage device 206. Each of these hardware components is connected via a bus 207 in a communicative manner.
[0128] The input device 201 is, for example, a keyboard, a mouse, a touch screen, etc. The display device 202 is, for example, a monitor, etc. It should be noted that the secret decision tree learning device 10 may not have at least one of the input device 201 and the display device 202.
[0129] The external I / F 203 is an interface with external devices such as the storage medium 203a. The secret decision tree learning device 10 can read from and write to the storage medium 203a via the external I / F 203. The storage medium 203a may store, for example, one or more programs for implementing the various functional units of the secret decision tree learning device 10 (the input unit 101, the secret decision tree learning unit 102, and the output unit 103).
[0130] It should be noted that the storage medium 203a includes, for example, a CD (Compact Disc), a DVD (Digital Versatile Disk), an SD memory card (Secure Digital memory card), a USB (Universal Serial Bus) memory card, and the like.
[0131] The communication I / F 204 is an interface for connecting the secret decision tree learning device 10 to a communication network. It should be noted that one or more programs for implementing the various functional units of the secret decision tree learning device 10 can also be obtained (downloaded) from a predetermined server device or the like via the communication I / F 204.
[0132] The processor 205 is, for example, a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), or other computing devices. Each functional unit of the secret decision tree learning device 10 can be implemented by executing processing on the processor 205 according to one or more programs stored in the storage device 206 or the like.
[0133] The storage device 206 is, for example, a hard disk drive (HDD), a solid state drive (SSD), a random access memory (RAM), a read-only memory (ROM), or a flash memory. The storage unit 104 of the secret decision tree learning device 10 can be implemented, for example, using the storage device 206. It should be noted that the storage unit 104 can also be implemented, for example, using a storage device connected to the secret decision tree learning device 10 via a communication network.
[0134] The secret decision tree learning device 10 of this embodiment has Figure 2 The hardware configuration shown can realize various processing. Figure 2 The hardware configuration shown is merely an example, and the secret decision tree learning device 10 may also have other hardware configurations. For example, the secret decision tree learning device 10 may include multiple processors 205 and multiple storage devices 206 .
[0135] <Secret Decision Tree Learning Process>
[0136] Next, see Figure 3 A secret decision tree learning process for learning a secret decision tree based on a given set of training data will be described. Figure 3 This is a flowchart showing an example of the flow of secret decision tree learning processing in this embodiment. It should be noted that, in the following, learning of a d-ary tree with a height of h or less is performed.
[0137] First, the input unit 101 inputs a learning data set for learning the secret decision tree (step S101). Hereinafter, as an example, it is assumed that the learning data set Q is data represented by an n-row m-column matrix with the number of records being n and the total number of explanatory variables being m - 1, and [T1]: = [Q].
[0138] Next, the initialization unit 111 of the secret decision tree learning unit 102 initializes the group information vector [g1] and the inheritance parameter [q1] (note: the original Japanese text is "引継ぎパラメータ") to the following formula (step S102).
[0139] [g1]: = (0, 0,..., 1) T
[0140] [q1]: = (0,..., 0) T
[0141] It should be noted that the group information vector and the inheritance parameter are vectors with the number of elements being n. In addition, T is a notation representing transpose.
[0142] Here, the group information vector is a vector indicating which group each record of the learning data set is classified into. In the case where a certain continuous record group is classified into the same group, it is a vector that makes the element at the position corresponding to the last record of the record group be 1 and makes other elements be 0. For example, the above group information vector [g1] indicates that all records of the learning data set [T1] are classified into the same group. This means that all records are classified into the same group at the root node.
[0143] In addition, the inheritance parameter is a vector with the numbers of the nodes to which each record is classified in each layer as elements. For i = 1,..., h, the nth element of the inheritance parameter [q i represents the number of the node to which the nth record of the learning data set [T i is classified. For example, the above inheritance parameter [q1] indicates that all records of the learning data set [T1] are classified into the node numbered "0" (i.e., the root node).
[0144] The following steps S103 to step S105 are repeatedly executed for each layer i = 1,..., h. Hereinafter, steps S103 to step S105 for a certain layer i will be described.
[0145] The partitioning unit 112 of the secret decision tree learning unit 102 calculates the partitioning parameter [p i based on the learning data set [T i and the group information vector [g i] (Step S103). The process of step S103 is to evaluate (test) the division conditions of each node in the layer i. Through this process, the division conditions are set for each node in the layer i (except for leaf nodes). It should be noted that the details of this process will be described later.
[0146] Here, the partition parameter [p i ] means, including the classification results of each node in order to calculate the secret decision tree ([f i ]) The data of the hidden value of the information required, for example, includes the hidden value of the information (a) to (d) below for each node of layer i.
[0147] (a) Determine which explanatory variable to use for the partitioning condition;
[0148] (b) determining which type of partitioning condition (e.g., a partitioning condition indicating a comparison with a threshold value, a partitioning condition indicating whether the variable belongs to a certain set, etc.) is to be applied to the explanatory variable;
[0149] (c) the threshold or set used in the partitioning condition; and
[0150] (d) The label value set when the node becomes a leaf node.
[0151] That is, the partition parameter [p i ] contains information about the division conditions (or label values if the node is a leaf node) set for each node in layer i.
[0152] Next, the division unit 112 of the secret decision tree learning unit 102 divides the decision tree into two groups based on the training data set [T i ] and the partition parameter [p i ]Calculate the classification results[f i ](Step S104). Here, the classification result [f i ] represents the division of the learning data set [T i ] is divided (i.e., the data set [T i ]) is a vector whose elements are numbers (0 or more and d-1 or less) indicating the classification destination of each record. For example, when d=2, the segmentation unit 112 only needs to select the training data set [T i ], take out the attribute values of the explanatory variables shown in (a) above, and then determine whether each attribute value meets the conditions determined by (b) and (c) above. If the attribute value of the jth (1≤j≤n) record meets the condition, make the jth element 1, otherwise make it 0, and thus calculate the classification result [fi ] is enough.
[0153] Next, the grouping unit 113 of the secret decision tree learning unit 102 performs the grouping based on the training data set [T i ]、Inherited parameters[q i ], group information vector [g i ], and classification results [f i ] to calculate the learning data set for the next layer i+1 [T i+1 ]、Inherited parameters[q i+1 ], and group information vector [g i+1 ](Step S105). At this time, the grouping unit 113 presses [g i ] and [f i ]To [T i ] and [q i ]×d+[f i ]The linked data set ([T i ],[q i ]×d+[f i ]) to sort, and calculate the result of the sorting ([T i+1 ],[q i+1 ]) and [T i+1 ] into which group each record is classified [g i+1 It should be noted that [q i ]×d+[f i ] is equivalent to [q i+1 ]. This means that, due to [f i ] takes a value greater than 0 and less than d-1, so [q i ] are renumbered and assigned to [f i ], thereby numbering each node of the i+1 layer.
[0154] The processing of step S105 is based on the classification result obtained in step S104. i ] will learn the data set [T i ] is a process of grouping each record into a finer group, by which the learning data set [T i+1 ]、Inherited parameters[q i+1 ], and group information vector [g i+1 ]. It should be noted that the details of this processing will be described later.
[0155] Next, when the above steps S103 to S105 are executed for i=1, ..., h, the node extraction unit 114 of the secret decision tree learning unit 102 extracts the inherited parameters [qi ] and each partition parameter [p i ] Extract the information of each node (step S106). Here, as mentioned above, [q i ] is stored in [T i ] is the number of the node to which each record is classified. On the other hand, [p i ] also stores the information shown in (a) to (d) above for each node. For this purpose, the node extraction unit 114 only needs to follow [q i ] for each different value of each element to extract the information (a) to (d) of the node corresponding to the value.
[0156] Thereafter, the output unit 103 outputs the information extracted in the above-mentioned step S106 (ie, information of each node constituting the secret decision tree) (step S107).
[0157] <Secret Decision Tree Test Process (Part 1)>
[0158] Next, see Figure 4 An example of the detailed processing of the above-mentioned step S103 will be described. Figure 4 This is a flowchart (part 1) showing an example of the process of secret decision tree test processing of this embodiment. It should be noted that, as an example, the following describes a case where a certain numerical attribute is used as an object and the evaluation (test) of the partitioning condition is performed on each node constituting layer i. In addition, the learning data set [T i The vector in which the numerical attribute values of each record in ] are arranged in the order of records is called a numerical attribute value vector. Similarly, the vector in which the label values are arranged in the order of records is called a label value vector. In addition, let the set of possible values for the label be {1, 2, 3}.
[0159] First, the division unit 112 inputs the numerical attribute value vector, the label value vector, and the group information vector (step S201).
[0160] [g]=[g i ]=(0,0,1,1,0,0,0,1,0,1) T
[0161] Indicates. The above [g] indicates that the learning data set [T i ] The first to third records in ] belong to the first group, the fourth record belongs to the second group, the fifth to eighth records belong to the third group, and the ninth to tenth records belong to the fourth group.
[0162] Next, the division unit 112 sorts the elements of the numerical attribute value vectors and label value vectors in the same group in ascending order according to each group (step S202). That is, the division unit 112 sorts the elements of the numerical attribute value vectors and label value vectors in each group from the first group to the fourth group in ascending order. In the following, as an example, it is assumed that the numerical attribute value vector after sorting is
[0163] [c]=(1,2,5,2,3,4,5,7,2,4) T
[0164] In addition, let the sorted label value vector be represented by
[0165] [y]=(3,2,1,3,2,1,1,3,1,2) T
[0166] In the following text, the numerical attribute value vector and label value vector refer to the sorted numerical attribute value vector and label value vector.
[0167] Next, the division unit 112 calculates a bit vector indicating the position of an element in the label value vector [y] that matches the label value for each possible value of the label (step S203 ).
[0168] If the bit vectors corresponding to the possible values of the label "1", "2" and "3" are [f1], [f2] and [f3] respectively, these bit vectors are as follows.
[0169] [f1]=(0,0,1,0,0,1,1,0,1,0) T
[0170] [f2]=(0,1,0,0,1,0,0,0,0,1) T
[0171] [f3]=(1,0,0,1,0,0,0,1,0,0) T
[0172] That is, a bit vector corresponding to a certain label value refers to a vector in which, among the elements of the label value vector, only the elements located at the same position as the element corresponding to the label value are 1, and the other elements are 0.
[0173] Next, the division unit 112 performs an aggregate function cumulative sum operation on each bit vector according to the grouping based on the group information vector [g], thereby calculating the first decision vector (step S204). Here, the aggregate function cumulative sum operation is an operation that inputs a set of elements within the same group and outputs the cumulative sum of the values of these elements. In other words, the aggregate function cumulative sum operation is an operation that calculates the cumulative sum of each element in the same group starting from the beginning.
[0174] For example, the division unit 112 calculates the cumulative sum of the 1st to 3rd elements of each bit vector in sequence. Similarly, it calculates the cumulative sum of the 4th element, calculates the cumulative sum from the 5th to the 8th element in sequence, and calculates the cumulative sum from the 9th to the 10th element in sequence.
[0175] Based on this, we can obtain
[0176] [s 0,1 ]=(0,0,1,0,0,1,2,2,1,1) T
[0177] Represents the first decision vector corresponding to the bit vector [f1].
[0178] Similarly, we can obtain
[0179] [s 0,2 ]=(0,1,1,0,1,1,1,1,0,1) T
[0180] Represents the first decision vector corresponding to the bit vector [f2].
[0181] Similarly, we can obtain
[0182] [s 0,3 ]=(1,1,1,1,0,0,0,1,0,0) T
[0183] Represents the first decision vector corresponding to the bit vector [f3].
[0184] When a threshold is set immediately after each numerical attribute value in each group (i.e., between the numerical attribute value and the next largest numerical attribute value), the first decision vector indicates the number (frequency) of label values corresponding to the numerical attribute values below the threshold. For example, the first decision vector [s 0,1 ], if a threshold is set immediately after the first element of the first group of the numerical attribute value vector [c], it means that the number of numerical attribute values below the threshold and the label value is 1 is 0. Similarly, for example, if a threshold is set immediately after the third element of the first group, it means that the number of numerical attribute values below the threshold and the label value is 1 is 1.
[0185] Therefore, the above-mentioned first judgment vector can be used to calculate the frequency of records with label value k in a data set (a set of numerical attribute values) that satisfies the division condition after the data set is divided (grouped) according to the division condition expressed in the form of x≤C (here, C is a threshold).
[0186] Next, the partitioning unit 112 performs an aggregate function sum operation on each bit vector according to the grouping based on the group information vector [g], thereby calculating an aggregate sum vector (step S205). Here, the aggregate function sum operation is an operation that takes a set of elements in the same group as input and outputs the sum of the values of these elements.
[0187] For example, the partitioning unit 112 calculates the sum of the first to third elements of each bit vector. Similarly, the partitioning unit 112 calculates the sum of the fourth element, the fifth to eighth elements, and the ninth to tenth elements. The partitioning unit 112 then generates an aggregate sum vector by assigning each sum to the element at the same position as the element used to calculate the sum.
[0188] Based on this, we can obtain
[0189] [s *,1 ]=(1,1,1,0,2,2,2,2,1,1) T
[0190] Represents the aggregate sum vector corresponding to the bit vector [f1].
[0191] Similarly, we can obtain
[0192] [s *,2 ]=(1,1,1,0,1,1,1,1,1,1) T
[0193] Represents the aggregate sum vector corresponding to the bit vector [f2].
[0194] Similarly, we can obtain
[0195] [s *,3 ]=(1,1,1,1,1,1,1,1,0,0) T
[0196] Represents the aggregate sum vector corresponding to the bit vector [f3].
[0197] Next, the partitioning unit 112 uses the first decision vector and the aggregate sum vector corresponding to the same label value to calculate a second decision vector corresponding to the label value (step S206). The partitioning unit 112 uses the first decision vector and the aggregate sum vector corresponding to the same label value to calculate the second decision vector by subtracting the first decision vector from the aggregate sum vector.
[0198] Based on this, we can obtain
[0199] [s 1,1 ]=[s *,1 ]-[s 0,1]=(1,1,0,0,2,1,0,0,0,0) T
[0200] Represents the second decision vector corresponding to the label value "1".
[0201] Similarly, we can obtain
[0202] [s 1,2 ]=[s *,2 ]-[s 0,2 ]=(1,0,0,0,0,0,0,0,1,0) T
[0203] Represents the second decision vector corresponding to the label value "2".
[0204] Similarly, we can obtain
[0205] [s 1,3 ]=[s *,3 ]-[s 0,3 ]=(0,0,0,0,1,1,1,0,0,0) T
[0206] Represents the second decision vector corresponding to the label value "3".
[0207] When a threshold is set immediately after each numerical attribute value in each group (i.e., between the numerical attribute value and the next larger numerical attribute value), the second decision vector indicates the number (frequency) of label values corresponding to numerical attribute values greater than the threshold. For example, the second decision vector [s 1,1 ], if the threshold is set immediately after the first element of the first group of the numerical attribute value vector [c], it means that the number of numerical attribute values greater than the threshold and the label value is 1 is 1. Similarly, for example, if the threshold is set immediately after the third element of the first group, it means that the number of numerical attribute values greater than the threshold and the label value is 1 is 0.
[0208] Therefore, the above-mentioned second judgment vector can be used to calculate the frequency of records with label value k in the data set (set of numerical attribute values) that does not meet the division condition after the data set (set) is divided (grouped) according to the division condition expressed in the form of x≤C (here, C is the threshold).
[0209] Next, the division unit 112 calculates the frequencies for each group and for each division condition (step S207).
[0210] The number of elements in each group of the numerical attribute value vector [c] (i.e., |Q| shown in (1) above);
[0211] The number of elements of the label value k in each group of the numerical attribute value vector [c] (i.e., the number of elements of the label value k in the above (2) k |);
[0212] The number of elements in each group after the numerical attribute value vector [c] is divided into groups according to the division condition θ (i.e., |Q(θ, i)| shown in (3) above); and
[0213] The number of elements of the label value k in each group after the numerical attribute value vector [c] is divided into groups based on the division condition θ (that is, |Q(θ, i) shown in (4) above) k |)
[0214] These 4 frequencies.
[0215] The first of these four frequencies can be obtained by calculating the number of elements in each group using the numerical attribute value vector [c] and the group information vector [g]. In addition, the second frequency can be obtained by calculating the number of elements in each group and each label value using the numerical attribute value vector [c], the label value vector [y], and the group information vector [g]. In addition, the third frequency can be obtained by calculating the number of elements in each set within the group that is divided based on the division condition θ (i.e., the set that satisfies the division condition θ and the set that does not satisfy the division condition θ) when the threshold of the division condition θ is set to the group using the numerical attribute value vector [c] and the group information vector [g].
[0216] On the other hand, the fourth frequency can be obtained by calculating the number of elements with label value k in each set divided based on the division condition θ when the threshold of the division condition θ is set to the group using the numerical attribute value vector [c], the group information vector [g], the first decision vector, and the second decision vector. This means that, as described above, the number of elements with label value k in the set that satisfies the division condition θ in each divided set can be calculated using the first decision vector corresponding to the label value k, and the number of elements with label value k in the set that does not satisfy the division condition θ can be calculated using the second decision vector corresponding to the label value k.
[0217] Next, the segmentation unit 112 calculates the evaluation value of the segmentation condition for each group and each segmentation condition using the frequencies calculated in step S207 (step S208 ).
[0218] Next, the partitioning unit 112 selects the partitioning condition with the highest evaluation value in each group and outputs the selected partitioning condition as the partitioning condition set for the node corresponding to the group (step SS209). It should be noted that when selecting the partitioning condition with the highest evaluation value in each group, for example, it is sufficient to perform an aggregate function maximum operation. The aggregate function maximum operation inputs the elements (evaluation values) within the same group and outputs the maximum value of these elements.
[0219] Based on this, information (a) to (c) related to each node other than the leaf node of layer i can be obtained. On the other hand, as a result of inputting the numerical attribute value vector, label value vector, and group information vector in step S201 above, if the label values within a group are all the same, the node corresponding to that group becomes a leaf node, and information (a) and (d) are obtained.
[0220] <Secret Decision Tree Test Process (Part 2)>
[0221] Next, see Figure 5 An example of the detailed processing of the above-mentioned step S103 will be described. Figure 5 This is a flowchart (part 2) showing an example of the process of secret decision tree test processing in this embodiment. It should be noted that, as an example, the following describes a case where a certain category attribute is used as an object and the evaluation (test) of the partitioning condition is performed on each node constituting layer i. In addition, the learning data set [T i The vector that arranges the category attribute values of each record in the order of the records is called the category attribute value vector. Similarly, the vector that arranges the label values in the order of the records is called the label value vector. In addition, let the set of possible values for the category attribute be {5, 6, 7, 8}, and let the set of possible values for the label be {1, 2, 3}.
[0222] First, the dividing unit 112 inputs the category attribute value vector, the label value vector, and the group information vector (step S301).
[0223] [g]=[g i ]=(0,0,1,1,0,0,0,1,0,1) T
[0224] express.
[0225] In addition, let the category attribute value vector be
[0226] [c]=(5,5,6,8,5,8,5,7,6,5) T
[0227] Represented by , and let the label value vector be represented by
[0228] [y]=(3,2,1,3,2,1,1,3,1,2) T
[0229] express.
[0230] Next, the division unit 112 calculates, for each combination of possible values of the classification attribute and possible values of the label, a bit vector indicating the position of an element that matches the combination of the classification attribute value and the label value (step S302 ).
[0231] For example, if the bit vector corresponding to the combination of the possible value "5" for the category attribute and the possible value "1" for the label is [f 5,1 ], then the bit vector [f 5,1 ]as follows.
[0232] [f 5,1 ]=(0,0,0,0,0,0,1,0,0,0) T
[0233] Similarly, for example, if the bit vector corresponding to the combination of the possible value "5" for the category attribute and the possible value "2" for the label is [f 5,2 ], then the bit vector [f 5,2 ]as follows.
[0234] [f 5,2 ]=(0,1,0,0,1,0,0,0,0,1) T
[0235] Similarly, for example, if the bit vector corresponding to the combination of the possible value "5" for the category attribute and the possible value "3" for the label is [f 5,3 ], then the bit vector [f 5,3 ]as follows.
[0236] [f 5,3 ]=(1,0,0,0,0,0,0,0,0,0) T
[0237] Similarly, the bit vectors corresponding to other combinations can also be calculated [f 6,1 ]~[f 6,3 ]、[f 7,1 ]~[f 7,3 ]、[f 8,1 ]~[f 8,3 ].
[0238] That is, the bit vector corresponding to a combination of a certain category attribute value and label value refers to a vector in which, among the combinations of elements located at the same position in the category attribute value vector and the label value vector, only the elements located at the positions of the combination consistent with the combination of the category attribute value and the label value are 1, while the other elements are 0.
[0239] Next, the division unit 112 performs an aggregation function sum operation on each bit vector according to the grouping based on the group information vector [g], and calculates a decision vector based on the sum (step S303).
[0240] For example, the division unit 112 calculates the sum of the first to third elements of each bit vector. Similarly, the division unit 112 calculates the sum of the fourth element, the fifth to eighth elements, and the ninth to tenth elements. The division unit 112 then generates a decision vector by assigning each sum to the element at the same position as the element used to calculate the sum.
[0241] Based on this, we can obtain
[0242] [c 5,1 ]=(0,0,0,0,1,1,1,1,0,0) T
[0243] Represented by the bit vector [f 5,1 ] corresponding decision vector.
[0244] Similarly, we can obtain
[0245] [c 5,2 ]=(1,1,1,0,1,1,1,1,1,1) T
[0246] Represented by the bit vector [f 5,2 ] corresponding decision vector.
[0247] Similarly, we can obtain
[0248] [c 5,3 ]=(1,1,1,0,0,0,0,0,0,0) T
[0249] Represented by the bit vector [f 5,3 ] corresponding decision vector.
[0250] Similarly, we can also calculate the other bit vectors [f 6,1 ]~[f 6,3 ]、[f 7,1 ]~[f 7,3 ]、[f 8,1 ]~[f 8,3 ] corresponding decision vector.
[0251] The above decision vector represents the number of times the combination of the category attribute value and the label value corresponding to the bit vector appears in each group. For example, the combination of (category attribute value, label value) = (5, 1) indicates that it appears 0 times in the first group, 0 times in the second group, 1 time in the third group, and 0 times in the fourth group. Similarly, for example, the combination of (category attribute value, label value) = (5, 2) indicates that it appears 1 time in the first group, 0 times in the second group, 1 time in the third group, and 1 time in the fourth group.
[0252] Therefore, through the above-mentioned judgment vector, the frequency of records with label value k in the data set (set of category attribute values) obtained by dividing (grouping) according to the division condition expressed in the form of x∈X (here, X is a subset of the set of values that the category attribute can take) that satisfies the division condition can be calculated.
[0253] Next, the division unit 112 calculates the frequencies for each group and for each division condition (step S304).
[0254] The number of elements in each group of the category attribute value vector [c] (i.e., |Q| shown in (1) above);
[0255] The number of elements of the label value k in each group of the category attribute value vector [c] (that is, the number of elements of the label value k in the above (2) k |);
[0256] The number of elements in each group after the category attribute value vector [c] is divided into groups according to the division condition θ (i.e., |Q(θ, i)| shown in (3) above); and
[0257] The number of elements of the label value k in each group after the classification attribute value vector [c] is divided into each group based on the division condition θ (that is, |Q(θ, i) shown in (4) above) k |)
[0258] These 4 frequencies.
[0259] The first of these four frequencies can be obtained by calculating the number of elements in each group using the category attribute value vector [c] and the group information vector [g]. In addition, the second frequency can be obtained by calculating the number of elements in each group and each label value using the category attribute value vector [c], the label value vector [y], and the group information vector [g]. In addition, the third frequency can be obtained by calculating the number of elements in each set (i.e., the set that satisfies the partition condition θ and the set that does not satisfy the partition condition θ) when the group is partitioned according to the partition condition θ using the category attribute value vector [c] and the group information vector [g].
[0260] On the other hand, the fourth frequency can be obtained by using the category attribute value vector [c], the group information vector [g], and the decision vector to calculate the number of elements with label value k in each set divided based on the division condition θ when the group is divided according to the division condition θ. This can be obtained by simply calculating the number of times the combination of each element (category attribute value) and label value k contained in the divided set appears in the group using the decision vector. Specifically, for example, when the division condition θ is x∈{5, 8}, the third group of the category attribute value vector [c] is divided into {5, 8, 5} and {7}. For this reason, for example, with respect to the number of elements with label value k in {5, 8, 5}, as described above, it can be obtained by calculating the number of elements with label value k in {5, 8, 5} according to the decision vector [f 5,k ] and [f 8,k ] is obtained by calculating the sum of the number of times the combination of (5, k) appears in the third group and the number of times the combination of (8, k) appears in the third group. Similarly, for example, as for the number of elements with label value k in {7}, it can be obtained by calculating the number of elements with label value k according to the decision vector [f 7,k ] is obtained by calculating the number of times the combination of (7, k) appears in the third group.
[0261] Next, the division unit 112 calculates the evaluation value of the division condition for each group and each division condition using the frequencies calculated in step S304 according to equation 10 (step S305 ).
[0262] Thereafter, the division unit 112 selects a division condition having the largest evaluation value in each group, and outputs the selected division condition as a division condition to be set to the node corresponding to the group (step S306 ).
[0263] Based on this, information (a) to (c) related to each node other than the leaf node of layer i can be obtained. On the other hand, as a result of inputting the numerical attribute value vector, label value vector, and group information vector in step S301 above, if the label values within a group are all the same, the node corresponding to that group becomes a leaf node, and information (a) and (d) are obtained.
[0264] <Secret Packet Processing>
[0265] Next, see Figure 6 An example of the detailed processing of the above-mentioned step S105 will be described. Figure 6 This is a flow chart showing an example of the process of secret group processing of this embodiment. i ],[q i ]×d+[f i ]) is a vector of the record numbers of each record as a data vector, and the data set ([T i ],[q i ]×d+[f i ]) is explained below.
[0266] First, the grouping unit 113 inputs the data vector and the group information vector (step S401).
[0267] [v]=(3,0,4,5,1,6,7,2) T
[0268] In addition, let the group information vector be represented by
[0269] [g]=[g i ]=(0,1,1,0,0,1,0,1) T
[0270] express.
[0271] Next, the grouping unit 113 inputs the classification result as a classification destination vector (step S402).
[0272] [f]=[f i ]=(0,1,0,1,1,0,1,1) T
[0273] express.
[0274] Next, the grouping unit 113 calculates a detection vector obtained by detecting the elements of each data vector that are the endpoints of each classification destination in each group (step S403). This detection vector can be calculated through the following steps 1 and 2.
[0275] Step 1: For each possible classification destination value, calculate a classification destination unit detection vector by detecting the elements in the same group that are the endpoints of the classification destination. A classification destination unit detection vector is a vector in which the elements in the data vector that are in the same position as the elements in the same group that are the endpoints of the classification destination are 1, and all other elements are 0.
[0276] For example, when the value that can be taken as the classification destination is "1", first, the grouping unit 113 calculates [e1]←EQ([f], 1), thereby obtaining the following [e1].
[0277] [e1]=(0,1,0,1,1,0,1,1) T
[0278] Next, the grouping unit 113 calculates the cumulative sum from the lowest bit in the group represented by the group information vector [g], and thereby obtains the following [x1].
[0279] [x1]=(1,1,0,2,1,0,2,1) T
[0280] Note that calculating the cumulative sum from the lowest position in a group means calculating the cumulative sum in order from the lowest element (the next element) toward the highest element (the previous element) in the group.
[0281] Next, the grouping unit 113 obtains the following [k1] by [e1]×[x1].
[0282] [k1]=(0,1,0,2,1,0,2,1) T
[0283] Thereafter, the grouping unit 113 calculates [t1]←EQ([k1], 1), thereby obtaining the following [t1].
[0284] [t1]=(0,1,0,0,1,0,0,1) T
[0285] This [t1] is a classification destination unit detection vector corresponding to the classification destination "1". This classification destination unit detection vector [t1] is a vector obtained by detecting the endpoint (i.e., the last element) of the elements classified as the classification destination "1" in each group among the elements of the data vector. That is, the above-mentioned classification destination unit detection vector [t1] indicates that the second element of the data vector [v] is the last element (i.e., the endpoint) of the elements classified as the classification destination "1" in the first group. Similarly, it indicates that the fifth element of the data vector [v] is the last element of the elements classified as the classification destination "1" in the third group. Similarly, it indicates that the eighth element of the data vector [v] is the last element of the elements classified as the classification destination "1" in the fourth group.
[0286] Similarly, for example, when the value that can be taken as the classification destination is "0", first, the grouping unit 113 calculates [e0]←EQ([f], 0), thereby obtaining the following [e0].
[0287] [e0]=(1,0,1,0,0,1,0,0) T
[0288] Next, the grouping unit 113 calculates the cumulative sum from the lowest bit within the group represented by the group information vector [g], thereby obtaining the following [x0].
[0289] [x0]=(1,0,1,1,1,1,0,0) T
[0290] Next, the grouping unit 113 obtains the following [k0] by [e0]×[x0].
[0291] [k0]=(1,0,1,0,0,1,0,0) T
[0292] Thereafter, the grouping unit 113 calculates [t0]←EQ([k0], 1), thereby obtaining the following [t0].
[0293] [t0]=(1,0,1,0,0,1,0,0) T
[0294] This [t0] is a classification destination unit detection vector corresponding to the classification destination "0". The classification destination unit detection vector [t0] is a vector obtained by detecting the endpoint (i.e., the last element) of the elements in each group that are classified as the classification destination "0" among the elements of the data vector. That is, the above-mentioned classification destination unit detection vector [t0] indicates that the first element of the data vector [v] is the last element (i.e., the endpoint) of the elements classified as the classification destination "0" in the first group. Similarly, it indicates that the third element of the data vector [v] is the last element of the elements classified as the classification destination "0" in the second group. Similarly, it indicates that the sixth element of the data vector [v] is the last element of the elements classified as the classification destination "0" in the third group.
[0295] Step 2: Calculate the sum of all classification destination unit detection vectors as the detection vector.
[0296] That is, for example, when the above-described classification destination unit detection vectors [t0] and [t1] are obtained, the grouping section 113 obtains the following detection vector [t] by [t]=[t0]+[t1].
[0297] [t]=(1,1,1,0,1,1,0,1) T
[0298] This detection vector [t] is a vector obtained by detecting the elements at the endpoints of "0" and "1" of each classification destination in each group among the elements of the data vector.
[0299] Next, the grouping unit 113 performs stable sorting on the data vector and the detection vector respectively by the classification destination vector, thereby obtaining the classified data vector and the group information vector (step S404 ).
[0300] That is, for example, the grouping section 113 stably sorts the data vector [v] in ascending order of the elements of the sorting destination vector [f], thereby obtaining the following [v′].
[0301] [v']=(3, 4, 6, 0, 5, 1, 7, 2) T
[0302] The [v'] is the classified data vector.
[0303] Likewise, for example, the grouping section 113 stably sorts the detection vectors [t] in ascending order of the elements of the classification destination vector [f], thereby obtaining the following [g′].
[0304] [g']=(1,1,1,1,0,1,0,1) T
[0305] [g'] is the group information vector after classification.
[0306] Thereafter, the grouping unit 113 outputs the classified data vector and the classified group information vector (step S405 ).
[0307] Based on this, we can obtain the i ],[q i ]×d+[f i ]) after the record numbers are sorted by [v'] ([T i+1 ],[q i+1 ]) and group information vector [g i+1 ]=[g'].
[0308] Summary
[0309] As described above, when a secret decision tree is learned based on a given hidden value data set, the secret decision tree learning device 10 of this embodiment can exponentially reduce the number of references to the entire data set by partitioning the data set at all nodes on the same level. Specifically, for example, when the decision tree is a binary tree with a height of less than h, the conventional technology requires Θ(2 h ) times, however, in the secret decision tree learning device 10 of this embodiment, it can be O(h) times.
[0310] The present invention is not limited to the above-mentioned specific disclosed embodiments, and various modifications, changes, and combinations with existing technologies are possible without departing from the scope of the claims.
[0311] [Explanation of Reference Numerals]
[0312] 10 Secret Decision Tree Learning Devices
[0313] 101 Input Unit
[0314] 102 Secret Decision Tree Learning Department
[0315] 103 output unit
[0316] 104 Storage Department
[0317] 111 Initialization Department
[0318] 112 Division
[0319] 113 Group Department
[0320] 114 Node Extraction Department
[0321] 201 Input device
[0322] 202 display device
[0323] 203 External I / F
[0324] 203a Recording media
[0325] 204 communication I / F
[0326] 205 processor
[0327] 206 storage device
[0328] 207 bus.
Claims
1. A secret decision tree learning device for learning a decision tree through secret computing, the secret decision tree learning device comprising: An input unit that inputs a data set consisting of a plurality of records, wherein the plurality of records include attribute values of one or more explanatory variables and attribute values of a target variable; and A learning unit, for each level of the decision tree, uses a data set divided into one or more groups in the previous level and a group information vector indicating the group to which each record contained in the data set belongs, to collectively divide the data set into finer groups at all nodes contained in the level, thereby learning the decision tree, wherein: The data set consists of consecutive records belonging to the same group, The group information vector is a vector in which the element corresponding to the last record of the records belonging to the same group among the records constituting the data set is 1 and the elements other than the element corresponding to the last record are 0. Let the level be i, where i=1, ..., h, and h is the height of the decision tree. The learning unit is configured to repeatedly execute the following for each level i: Using a data set that has been divided into more than one group in the previous level [T i ] and represents the data set [T i ] contains the group information vector [g i ], calculate the parameters [p i ]; Using the data set [T i ] and the parameter [p i ], the data set [T i ] to nodes at level i+1; and Using the data set [T i ]、the parameters [p i ], the classification result, and the data set [T i ] contains the information of the nodes into which each record is classified, and calculates the data set [T i+1 ] and group information vector [g i+1 ].
2. A secret decision tree learning system that learns a decision tree through secret computing, the secret decision tree learning system having: An input unit that inputs a data set consisting of a plurality of records, wherein the plurality of records include attribute values of one or more explanatory variables and attribute values of a target variable; and A learning unit, for each level of the decision tree, uses a data set divided into one or more groups in the previous level and a group information vector indicating the group to which each record contained in the data set belongs, to collectively divide the data set into finer groups at all nodes contained in the level, thereby learning the decision tree, wherein: The data set consists of consecutive records belonging to the same group, The group information vector is a vector in which the element corresponding to the last record of the records belonging to the same group among the records constituting the data set is 1 and the elements other than the element corresponding to the last record are 0. Let the level be i, where i=1, ..., h, and h is the height of the decision tree. The learning unit is configured to repeatedly execute the following for each level i: Using a data set that has been divided into more than one group in the previous level [T i ] and represents the data set [T i ] contains the group information vector [g i ], calculate the parameters [p i ]; Using the data set [T i ] and the parameter [p i ], the data set [T i ] to nodes at level i+1; and Using the data set [T i ]、the parameters [p i ], the classification result, and the data set [T i ] contains the information of the nodes into which each record is classified, and calculates the data set [T i+1 ] and group information vector [g i+1 ].
3. A secret decision tree learning method, wherein a decision tree is learned through secret computing, the secret decision tree learning method being executed by a computer and comprising: An input step of inputting a data set consisting of a plurality of records, wherein the plurality of records include attribute values of one or more explanatory variables and attribute values of a target variable; and A learning step, according to each level of the decision tree, using a data set divided into one or more groups in the previous level and a group information vector indicating the group to which each record contained in the data set belongs, centrally dividing the data set into finer groups at all nodes contained in the level, thereby causing the decision tree to learn, wherein, The data set consists of consecutive records belonging to the same group, The group information vector is a vector in which the element corresponding to the last record of the records belonging to the same group among the records constituting the data set is 1 and the elements other than the element corresponding to the last record are 0. Let the level be i, where i=1, ..., h, and h is the height of the decision tree. In the learning step, the following is repeatedly performed for each level i: Using a data set that has been divided into more than one group in the previous level [T i ] and represents the data set [T i ] contains the group information vector [g i ], calculate the parameters [p i ]; Using the data set [T i ] and the parameter [p i ], the data set [T i ] to nodes at level i+1; and Using the data set [T i ]、the parameters [p i ], the classification result, and the data set [T i ] contains the information of the nodes into which each record is classified, and calculates the data set [T i+1 ] and group information vector [g i+1 ].
4. A computer program product that causes a computer to function as the secret decision tree learning device according to claim 1.