A federated random forest approach based on localized differential privacy
By allocating privacy budgets and adding noise in the CART decision tree, combined with the ideas of Gini index and bagging integration, the privacy protection and model accuracy problems of the existing random forest algorithm are solved, and more efficient user privacy protection and model optimization are achieved.
Patent Information
- Application Number
- CN202211531993.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-01
- Publication Date
- 2024-09-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing cryptographic random forest privacy protection methods cannot resist reconstruction attacks and inference attacks, and the localized differential privacy mechanism brings large noise during the model construction process, resulting in poor model accuracy. The federated random forest algorithm only performs one step. Round communication results in poor model classification.
A localized differential privacy mechanism is used to allocate a privacy budget to each child node in the CART decision tree and add Laplace noise. The Gini index is used to select split points and split features. The idea of Bagging integration is combined to reduce the amount of noise, and multiple rounds of server-client communication are used. Optimizing Random Forest Models.
Effectively prevent reconstruction attacks and inference attacks, improve privacy protection, reduce noise, and improve model classification accuracy.
Smart Images

Figure CN116151388B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of differential privacy and machine learning, and in particular relates to a federated random forest method based on localized differential privacy. Background Art
[0002] Currently, technologies such as big data and artificial intelligence are experiencing explosive growth. Machine learning is a key technology in artificial intelligence. While people are enjoying the convenience brought by machine learning technology, they are also concerned about data security and privacy issues.
[0003] Random forest is a representative machine learning algorithm that contains multiple decision tree classifiers, and its output category is determined by the mode of the category output by individual trees. It is widely used in classification and regression tasks. The traditional random forest algorithm requires the service provider to collect user data and then train it centrally. However, user data is closely related to individual users and may directly contain sensitive information, such as personal age, race, and disease information; it may also indirectly carry implicit sensitive information, such as personal web browsing history and user political inclinations implied by content preferences. If these sensitive information are leaked or used by service providers during the collection process, it will directly threaten the user's personal safety, personal reputation and property safety. In addition, with the increasingly strict supervision and use of data in my country, as well as the protection of various data such as personal information data, scientific data, and medical data, the emergence of data islands has been aggravated, resulting in higher requirements for the security and rationality of data sharing in the process of data cooperation and exchange between entities. In contrast, the random forest algorithm relies on a large amount of data collection and fusion. If it cannot obtain complete and rich information to train models and develop technologies, its application will be severely limited.
[0004] Faced with the challenges of data silos and data privacy and security, Liu Yang et al. designed a federated random forest model that conforms to the federated machine learning paradigm. By redesigning the tree building algorithm, applying encryption methods, and establishing a third-party trusted server, they avoid directly sharing the original training data for random forest training. The client encrypts the user's original data to train the CART decision tree. The server aggregates the tree model uploaded by the client, and only one round of communication is required to build the entire forest. Xue et al. proposed a training algorithm for a naive Bayes classifier based on local differential privacy. They used the localized differential privacy mechanism to add noise to most of the features in the data set, and then calculated the conditional probability in the Bayesian classification. However, when there are many feature attribute data in the data set, the algorithm will bring large classification errors.
[0005] In summary, the problems of the existing technology are: 1) After the trained model is released, the existing privacy protection method based on cryptography random forest cannot resist the reconstruction attack that can be launched by the central server and other potential attackers based on the collected local model, so as to recover the original data of the target terminal, or launch an attribute inference attack to infer whether the data of the target terminal contains certain sensitive attributes; 2) The existing privacy protection method based on the localized differential privacy mechanism requires a large privacy budget in the model construction process, which brings a lot of noise and leads to poor model accuracy; 3) The existing federated random forest algorithm only performs one round of communication between the client and the server to establish the random forest model, lacks the model optimization process, and may lead to poor final model classification effect. Summary of the invention
[0006] In view of the above-mentioned defects of the prior art, an object of the present invention is to provide a federated random forest method based on localized differential privacy.
[0007] The present invention uses a localized differential privacy mechanism to protect the client's original data. When the client establishes a CART decision tree, a privacy budget is allocated to each child node in the CART decision tree, and Laplace noise is added for perturbation according to the privacy budget. Compared with the encryption method, the localized differential privacy mechanism can prevent reconstruction attacks and inference attacks launched by the server or other potential attackers, thereby improving the privacy protection effect.
[0008] In order to solve the problem that the differential privacy mechanism brings large noise in the process of building a decision tree, the present invention adopts the Gini index to select split points and split features for the decision tree. At the same time, the idea of Bagging integration is used to randomly select feature points during the training process of the decision tree to reduce the amount of noise added by the child nodes.
[0009] In view of the problem that the existing federated random forest algorithm only performs one round of communication between the client and the server to establish a random forest model, the present invention designs a server-client multi-round communication optimization random forest model to improve the model classification accuracy.
[0010] The client builds a CART decision tree using the Gini threshold, privacy budget and other data sent by the server, and then uploads the decision tree to the server to form a random forest model. The server adjusts the Gini threshold based on the model effect and sends it to the client. The client re-builds the decision tree based on the Gini threshold and uploads it. Repeat this process until the random forest model achieves the effect of improving the model classification accuracy.
[0011] A federated random forest model framework based on localized differential privacy. The basic process of building a CART decision tree on the client is as follows:
[0012] In the first step, the client receives the number of CART decision trees T and the Gini threshold sent by the server, and customizes the privacy budget ε;
[0013] In the second step, let the client's training data set be D, and calculate the Gini index of the existing feature pair D. For each feature A, for each possible value a, divide D into two parts, D1 and D2, according to whether A(x) = a. Calculate the Gini index when A(x) = a. The calculation formula is as follows:
[0014]
[0015]
[0016] Among them, C k represents the sample subset in D that belongs to the kth class, where K is the number of classes;
[0017] The third step is to select the feature with the smallest Gini index and its corresponding split point from all possible features A and all possible split points a as the best split feature and the best split point, respectively. The training data set is allocated to the child nodes according to the best split feature and the best split point;
[0018] Step 4: recursively execute the above steps 2 to 3 for the established child nodes until the Gini index of the sample data set is less than the threshold, then stop;
[0019] Step 5: Allocate privacy budget ε to each child node p , the calculation formula is as follows:
[0020]
[0021] Among them, ε t The privacy budget allocated to each tree, ε p The privacy budget allocated to each child node, T is the number of decision trees, and N is the number of child nodes;
[0022] Step 6: According to the privacy budget ε allocated to each child node p Add Laplace noise and build a noisy CART decision tree;
[0023] Step 7: Upload the noisy CART decision tree to the server;
[0024] A model framework of federated random forest based on localized differential privacy. The basic process of establishing random forest through client-server multi-round communication optimization is as follows:
[0025] In the first step, the server announces the number of CART decision trees T and the Gini threshold;
[0026] In the second step, the server randomly selects T clients to build a CART decision tree;
[0027] In the third step, the client customizes the privacy budget ε, builds a noisy CART decision tree based on the algorithm and the Gini threshold sent by the server, and uploads it to the server;
[0028] In the fourth step, the server aggregates the CART decision trees uploaded by T clients into a random forest;
[0029] Step 5: The server adjusts the Gini threshold according to the classification effect of the random forest model, and sends the adjusted Gini threshold to the client;
[0030] Step 6: The client re-establishes the decision tree based on the Gini threshold and uploads it to the server;
[0031] Step 7: Repeat steps 3 to 6 until the random forest model aggregated by the servers reaches the expected effect.
[0032] In the eighth step, the server uses the random forest model to perform classification tasks.
[0033] In summary, the present invention designs a CART decision tree construction scheme that protects privacy on the client. By adding noise to the process of establishing the CART decision tree on the client through the localized differential privacy mechanism, it can effectively prevent reconstruction attacks and inference attacks launched by the server or other potential attackers, thereby improving the user privacy protection effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a schematic diagram of the overall scheme of the federated random forest scheme based on localized differential privacy of the present invention;
[0035] Figure 2 It is a schematic diagram of the complete process of the federated random forest solution based on localized differential privacy of the present invention. DETAILED DESCRIPTION
[0036] The specific embodiments of the present invention are further described in detail below in conjunction with the implementation examples, and the following implementation examples are only used to illustrate the present invention, but do not limit the scope of the present invention. Ordinary technicians in the relevant technical field can also make various changes and modifications without departing from the spirit and scope of the present invention, so all equivalent technical solutions also belong to the scope of the present invention.
[0037] The intended purpose of the present invention is:
[0038] The Gini index is used to select split points and split features for the decision tree. At the same time, the idea of Bagging integration is used to randomly select feature points during the training process of the decision tree to reduce the amount of noise added by the child nodes.
[0039] The present invention adopts the Gini index to select split points and split features for the decision tree, and uses the idea of Bagging integration to randomly select feature points during the training process of the decision tree, thereby reducing the number of feature points, allocating a larger privacy budget to each child node, reducing the amount of noise allocated to the child node, and improving the model accuracy.
[0040] Optimize the random forest model through multiple rounds of server-client communication to improve the model classification accuracy
[0041] The present invention optimizes the random forest model through multiple rounds of server-client communication to improve the model classification accuracy. The client establishes a CART decision tree through the Gini threshold, privacy budget and other data sent by the server, and then uploads the decision tree to the server to combine into a random forest model. The server adjusts the Gini threshold according to the model effect and sends it to the client. The client re-establishes the decision tree according to the Gini threshold and uploads it. Repeat this process until the random forest model effect reaches the expected effect.
[0042] The present invention designs a method of federated random forest based on localized differential privacy, which uses the localized differential privacy mechanism to add noise to the process of establishing a CART decision tree on the client, thereby preventing reconstruction attacks and inference attacks and improving the privacy protection effect.
[0043] The Gini index is used to select split points and split features for the decision tree. At the same time, the idea of Bagging integration is used to randomly select feature points during the training process of the decision tree to reduce the amount of noise added by the child nodes.
[0044] The random forest model is optimized through multiple rounds of server-client communication to improve the classification accuracy of the model.
[0045] After the trained model is released, the existing privacy protection method based on cryptographic random forest cannot resist the reconstruction attack launched by the central server and other potential attackers based on the collected local model, so as to recover the original data of the target terminal; or launch attribute inference attack to infer whether the data of the target terminal contains certain sensitive attributes.
[0046] In addition, the existing privacy protection method based on localized differential privacy mechanism requires a large privacy budget during the model construction process, which brings greater noise and leads to poor model accuracy.
[0047] Furthermore, the existing federated random forest algorithm only performs one round of communication between the client and the server to establish the random forest model. The lack of a model optimization process may result in poor final model classification results.
[0048] In the scenario of smart healthcare, each hospital database needs to jointly establish a random forest classification model to achieve accurate online disease diagnosis. However, hospitals directly sharing data for modeling will infringe on patients' privacy information. In order to ensure the security of data sharing and the availability of models during data cooperation and joint modeling among hospitals, a safe and efficient federated random forest model construction solution is needed. The specific implementation process is as follows:
[0049] 1. The central aggregator announces the number of decision trees T and the Gini threshold to each hospital.
[0050] 2. The central aggregator randomly selects T hospitals to build the CART decision tree.
[0051] 3. The selected hospital customizes its privacy budget ε, and builds a noisy CART decision tree based on the noisy decision tree construction algorithm and the Gini threshold issued by the central aggregator, and uploads it to the central aggregator.
[0052] 4. The central aggregator aggregates the decision trees uploaded by T hospitals into a random forest.
[0053] 5. The central aggregator adjusts the Gini threshold based on the classification effect of the random forest model and then sends it to the hospital.
[0054] 6. The hospital re-establishes the decision tree based on the Gini threshold and uploads it to the central aggregator.
[0055] 7. Repeat processes 3 to 6 until the random forest model aggregated by the servers achieves the effect of improving the classification accuracy of the model.
[0056] 8. The central aggregator publishes the final random forest model, and individual users can perform online disease diagnosis based on the published model.
[0057] The preferred specific embodiments of the present invention are described in detail above. It should be understood that ordinary technicians in the field can make many modifications and changes based on the concept of the present invention without creative work. Therefore, all technical solutions that can be obtained by technicians in the technical field based on the concept of the present invention through logical analysis, reasoning or limited experiments on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A federated random forest method based on localized differential privacy, characterized in that: The following steps are involved: Step 1: Establishing a CART decision tree on the client, including: using a localized differential privacy mechanism to add noise to the process of establishing the CART decision tree on the client; Step 2: Multiple rounds of client-server communication optimization to establish a random forest, including: the client establishes a CART decision tree using the Gini threshold and privacy budget data sent by the server, and then uploads the CART decision tree to the server to form a random forest model. The server adjusts the Gini threshold according to the classification effect of the random forest model, and sends the adjusted Gini threshold to the client. The client re-establishes the CART decision tree based on the adjusted Gini threshold and uploads it to the server. In step 2, the basic process of establishing a random forest through multiple rounds of client-server communication optimization includes: (1) The server publishes the number of CART decision trees T and the Gini threshold; (2) The server randomly selects T clients to build a CART decision tree; (3) The client customizes the privacy budget ε, builds a noisy CART decision tree based on the algorithm and the Gini threshold sent by the server, and uploads it to the server; (4) The server aggregates the CART decision trees uploaded by T clients into a random forest; (5) The server adjusts the Gini threshold according to the classification effect of the random forest model and sends the adjusted Gini threshold to the client; (6) The client re-establishes the decision tree based on the Gini threshold and uploads it to the server; (7) Repeat processes (3) to (6) until the random forest model aggregated by the servers achieves the effect of improving the classification accuracy of the model; (8) The server uses the random forest model to perform classification tasks.
2. The federated random forest method based on localized differential privacy according to claim 1, characterized in that: In step 1, the basic process of establishing a CART decision tree on the client side includes: (1) The client receives the number of decision trees T and the Gini threshold sent by the server, and customizes the privacy budget ε; (2) Let the client's training data set be D, and calculate the Gini index of the existing feature pair D; (3) Among all possible features A and all possible splitting points a, select the feature with the smallest Gini index and its corresponding splitting point as the best splitting feature and the best splitting point, respectively, and distribute the training data set to the child nodes according to the best splitting feature and the best splitting point; (4) Recursively execute processes (2) and (3) for the established child nodes until the Gini index of the sample data set is less than the threshold, then stop; (5) Allocate a privacy budget ε to each child node p ; (6) According to the privacy budget ε allocated to each child node p Add Laplace noise and build a noisy CART decision tree; (7) Upload the noisy CART decision tree to the server.
3. The process according to claim 2, characterized in that: In (2), the Gini index of the existing features for the data set is calculated, including for each feature A, for each possible value a, dividing D into two parts D1 and D2 according to whether A(x)=a holds, and calculating the Gini index when A(x)=a. The calculation formula is as follows: Among them, Ck represents the sample subset belonging to the kth class in D, and K is the number of classes.
4. The process according to claim 2, characterized in that: In (3), the Gini index is used to select split points and split features for the decision tree, and the idea of Bagging integration is used to randomly select feature points during the training process of the decision tree.
5. The process according to claim 2, characterized in that: In (5), the provided child node allocates a privacy budget ε p The calculation formula is: ε p The privacy budget allocated to each child node, ε is the custom privacy budget, T is the number of decision trees, and N is the number of child nodes.
