Data processing method, device, equipment and storage medium of federated tree model

By simulating the federated tree model in the federated learning system, and obtaining the pseudo-federated tree model to determine the contribution information of each feature in the sample, the problem in the prior art that the characteristic contribution degree in a single sample cannot be specifically explained, achieving fast and accurate feature contribution analysis.

CN114418120BActive Publication Date: 2025-04-04WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210080616.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-24
Publication Date
2025-04-04
Estimated Expiration
2042-01-24

AI Technical Summary

Technical Problem

The existing federal tree model interpretation scheme cannot specifically explain the contribution degree of each feature in a single sample, and cannot determine the positive and negative nature of the partner's features to the model output results, and the calculation amount is large.

Method used

In the federated learning system, the first node route of the target node and the anonymous features sent by the second participant device and their corresponding second node routes are obtained, and the federated tree model is simulated to obtain the pseudo-federated tree model, and then the contribution information of each feature in the sample is determined.

Benefits of technology

It realizes the rapid and accurate determination of the contribution information of the characteristics provided by each participant in the sample, reduces the number of communications between participant devices and improves the computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114418120B_ABST
    Figure CN114418120B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, device, and equipment of a federated tree model, which is applied to a first participant device; the method includes: obtaining a first node route of a target node in a federated tree model, the target node corresponding to at least two first features provided by the first participant device; receiving at least one anonymous feature sent by a second participant device, and a second node route corresponding to each anonymous feature; simulating the federated tree model based on the first node route and the second node route to obtain a pseudo-federated tree model corresponding to the federated tree model, and predicting a feature subset included in a feature set used as a training sample of the federated tree model through the pseudo-federated tree model to obtain a corresponding prediction value; combining the prediction value and the target prediction result, determining the contribution information of each feature in the feature set corresponding to the target prediction result. Through the present application, the contribution information of each feature provided by each participant in the sample can be quickly and accurately determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to artificial intelligence technology, and in particular to a data processing method, device, electronic device, computer-readable storage medium and computer program product of a federal tree model. Background Art

[0002] As all industries gradually strengthen data privacy protection, federated learning, a technology that can establish machine learning by coordinating data from multiple parties while protecting data privacy, has become one of the keys to cooperation between enterprises / industries. Today, in vertical scenarios, the vertical tree model has been widely used in vertical federation scenarios and has become one of the commonly used and powerful algorithms in the fields of finance and risk control.

[0003] In the fields of finance and risk control, we often want to understand the impact of each feature in a single sample on the output of the federated tree model. For example, for a specific sample (for example, a defaulting customer), we need to understand which feature and which values ​​of the feature have an important impact on determining whether the user is a defaulting user. In addition, we also need to determine the impact of the features provided by the partner on the model output.

[0004] The explanation scheme of the related federated tree model explains the tree model as a whole by obtaining the feature importance, but cannot specifically explain the contribution of each feature in a single sample. In addition, although the feature importance can be used to know how many times the partner's feature is used, the positive or negative impact of the partner's feature on the model output result is unknown, and the model calculation amount is large when determining the feature contribution information. Summary of the invention

[0005] The embodiments of the present application provide a data processing method, device, electronic device, computer-readable storage medium and computer program product of a federal tree model, which can quickly and accurately determine the contribution information of each feature provided by each participant in a sample.

[0006] The technical solution of the embodiment of the present application is implemented as follows:

[0007] The embodiment of the present application provides a data processing method of a federated tree model, based on a federated learning system, wherein the federated learning system includes a first participant device and at least one second participant device, and the method is applied to the first participant device, including:

[0008] Acquire a first node route of a target node in the federated tree model, wherein the target node corresponds to at least two first features provided by the first participant device;

[0009] receiving at least one anonymous feature sent by the second participant device, and a second node route corresponding to each of the anonymous features;

[0010] The anonymous feature corresponds to a second feature used to train the federated tree model, and the second node routing is used to indicate a sub-node path corresponding to the split node when the anonymous feature is used as a split node of the federated tree model;

[0011] Based on the first node route and the second node route, the federated tree model is simulated to obtain a pseudo federated tree model corresponding to the federated tree model, and a feature subset included in a feature set used as a training sample of the federated tree model is predicted by the pseudo federated tree model to obtain a corresponding prediction value;

[0012] The feature set includes: the at least two first features carrying the target prediction result, and the second feature provided by at least one of the second participant devices;

[0013] In combination with the predicted value and the target prediction result, contribution information of each feature in the feature set corresponding to the target prediction result is determined.

[0014] The present application embodiment provides a data processing device of a federated tree model, including:

[0015] an acquisition module, configured to acquire a first node route of a target node in the federated tree model, wherein the target node corresponds to at least two first features provided by the first participant device;

[0016] A receiving module, configured to receive at least one anonymous feature sent by a second participant device, and a second node route corresponding to each of the anonymous features; wherein the anonymous feature corresponds to a second feature used to train the federated tree model, and the second node route is configured to indicate a child node path corresponding to the split node when the anonymous feature is used as a split node of the federated tree model;

[0017] a simulation module, configured to simulate the federated tree model based on the first node routing and the second node routing, obtain a pseudo federated tree model corresponding to the federated tree model, and predict a feature subset included in a feature set used as a training sample of the federated tree model through the pseudo federated tree model to obtain a corresponding prediction value; wherein the feature set includes: the at least two first features carrying a target prediction result, and the second feature provided by at least one of the second participant devices;

[0018] A determination module is used to determine the contribution information of each feature in the feature set corresponding to the target prediction result in combination with the prediction value and the target prediction result.

[0019] In the above solution, the receiving module is further used to send an anonymous feature acquisition request carrying a sample identifier to the second participant device;

[0020] The anonymous feature acquisition request is used for the second participant device to respond to the anonymous feature acquisition request to determine the second feature corresponding to the sample identifier, the anonymous feature corresponding to the second feature, and the second node route corresponding to the anonymous feature;

[0021] The anonymous feature corresponding to the sample identifier and the second node route corresponding to the anonymous feature are received and returned by the second participant device.

[0022] In the above scheme, the receiving module is further used to locally create an anonymous relationship record table, wherein the anonymous relationship record table is used to record the sample identifier of the training sample used to train the federated tree model, the anonymous feature of the second participant device corresponding to the sample identifier, and the second node route corresponding to the anonymous feature;

[0023] The received anonymous feature corresponding to the sample identifier and the second node route corresponding to the anonymous feature are stored in the anonymous relationship record table.

[0024] In the above solution, the determining module is further used to select at least two features from at least two first features provided by the first participant device and at least one second feature provided by the second participant device;

[0025] Constructing a feature interaction group including the at least two features, and determining at least one interaction marginal contribution value corresponding to the feature interaction group;

[0026] Based on the at least one interaction marginal contribution value, interaction contribution information of the feature interaction group corresponding to the target prediction result is determined.

[0027] In the above solution, the determination module is further used to determine a first feature subset of the feature set, wherein the first feature subset includes at least one of the at least two features;

[0028] Determine a second feature subset of the feature set, wherein the second feature subset is in a complementary relationship with the feature interaction group;

[0029] The predicted value corresponding to the first feature subset and the predicted value corresponding to the second feature subset are obtained, and based on the predicted value corresponding to the first feature subset and the predicted value corresponding to the second feature subset, the interactive marginal contribution value corresponding to the feature interaction group is determined.

[0030] In the above scheme, the determination module is also used to sum up the multiple interaction marginal contribution values ​​when there are multiple interaction marginal contribution values, so as to obtain the interaction contribution information of the feature interaction group corresponding to the target prediction result.

[0031] The embodiment of the present application further provides a data processing method of a federated tree model, based on a federated learning system, wherein the federated learning system includes a first participant device and at least one second participant device, and the method is applied to the second participant device, including:

[0032] For each second feature used to train the federated tree model, generate an anonymous feature corresponding to each second feature, and obtain a second node route corresponding to each anonymous feature;

[0033] The second node route is used to indicate a sub-node path corresponding to the split node when the anonymous feature is used as the split node of the federated tree model;

[0034] Sending the anonymous features corresponding to each of the second features and the second node routing corresponding to each of the anonymous features to the first participant device;

[0035] The second node routing is used for the first participant device to obtain a pseudo federated tree model corresponding to the federated tree model based on the second node routing, and to determine contribution information of each feature in the feature set corresponding to the target prediction result through the pseudo federated tree model;

[0036] The feature set is used as a training sample of the federated tree model, including: at least two first features carrying target prediction results provided by the first participant device, and at least one second feature.

[0037] The present application also provides a data processing device for a federated tree model, including:

[0038] A generation module, for generating anonymous features corresponding to each second feature used for training the federated tree model, and obtaining a second node route corresponding to each anonymous feature; the second node route is used to indicate a sub-node path corresponding to the split node when the anonymous feature is used as a split node of the federated tree model;

[0039] A sending module, used for sending anonymous features corresponding to each second feature, and a second node route corresponding to each anonymous feature to the first participant device; wherein the second node route is used for the first participant device to obtain a pseudo-federal tree model corresponding to the federated tree model based on the second node route, and to determine the contribution information of each feature in the feature set corresponding to the target prediction result through the pseudo-federal tree model; wherein the feature set is used as a training sample for the federated tree model, including: at least two first features carrying the target prediction result provided by the first participant device, and at least one of the second features.

[0040] In the above solution, the sending module is further used to receive an anonymous feature acquisition request carrying a sample identifier sent by the first participant device;

[0041] Parsing the anonymous feature acquisition request to obtain the sample identifier;

[0042] Determine the second feature corresponding to the sample identifier, an anonymous feature corresponding to the second feature, and a second node route corresponding to the anonymous feature;

[0043] The anonymity feature and the second node route are sent to the first participant device.

[0044] In the above scheme, the sending module is also used to search the local anonymous relationship record table according to the sample identifier to obtain the second feature corresponding to the sample identifier, the anonymous feature corresponding to the second feature, and the second route corresponding to the anonymous feature; wherein the anonymous relationship record table is used to record the sample identifier of the training sample used to train the federated tree model, the second feature corresponding to the sample identifier, the anonymous feature corresponding to the second feature, and the second node route corresponding to the anonymous feature.

[0045] In the above scheme, the generation module is also used to perform hash processing on each second feature used to train the federated tree model, obtain a hash value corresponding to each second feature, and use the hash value as an anonymous feature corresponding to the second feature.

[0046] An embodiment of the present application provides an electronic device, including:

[0047] A memory for storing executable instructions;

[0048] The processor is used to implement the data processing method of the federated tree model provided in the embodiment of the present application when executing the executable instructions stored in the memory.

[0049] An embodiment of the present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute and implement the data processing method of the federated tree model provided in the embodiment of the present application.

[0050] An embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the data processing method of the federated tree model provided in the embodiment of the present application.

[0051] The embodiments of the present application have the following beneficial effects:

[0052] Compared with the technology in the related federal tree model that interprets the tree model as a whole by obtaining the feature importance, in the embodiment of the present application, the first participant device combines the first feature in the sample, the first node route corresponding to the first feature, the anonymous feature corresponding to the second feature obtained from the second participant device, and the second node route corresponding to the anonymous feature to simulate the federal tree model to obtain a pseudo-federal tree model. In this way, the pseudo-federal tree model can be directly constructed locally on the first participant device to reduce the number of communications between the participant devices; then, the pseudo-federal tree model is used to determine the predicted values ​​of each feature subset included in the feature set of the sample, and finally, the contribution information of each feature in the feature set corresponding to the target prediction result is determined by combining each predicted value and the target prediction result of the sample. In this way, the contribution information corresponding to the features provided by each participant in a single sample can be accurately measured. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is a schematic diagram of the architecture of the data processing system of the federated tree model provided in the embodiment of the present application;

[0054] Figure 2A-2B is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0055] Figure 3 It is a flowchart of a data processing method of a federated tree model provided in an embodiment of the present application;

[0056] Figure 4 It is a flow chart of the anonymous feature and second node route acquisition method provided in the embodiment of the present application;

[0057] Figure 5 It is a schematic diagram of a pseudo-federal tree model provided in an embodiment of the present application;

[0058] Figure 6 It is a flow chart of a method for constructing a pseudo-federal tree model provided in an embodiment of the present application;

[0059] Figure 7 It is a flow chart of a method for constructing a pseudo-federal tree model provided in an embodiment of the present application;

[0060] Figure 8 is an example diagram of information on contribution of features to prediction results provided in an embodiment of the present application;

[0061] Fig. 9 It is a schematic diagram of a tree model in a non-federated learning scenario provided by the example of this application;

[0062] Fig.10 It is a schematic diagram of a method for determining a prediction value using a pseudo-federal tree model provided in an embodiment of the present application;

[0063] Fig.11 It is a schematic diagram of a method for determining a predicted value of a feature subset provided in an embodiment of the present application;

[0064] Fig.12 It is a schematic diagram of a specific method for determining a prediction value using a pseudo-federal tree model provided in an embodiment of the present application;

[0065] Fig.13 is a flow chart of a method for determining interactive contribution information provided by an embodiment of the present application;

[0066] Fig.14 is a flow chart of a method for determining interactive contribution information provided by an embodiment of the present application;

[0067] Fig.15 It is a flowchart of a data processing method of a federated tree model provided in an embodiment of the present application;

[0068] Fig.16 It is a schematic diagram of the anonymous feature sending method provided in an embodiment of the present application;

[0069] Fig.17 It is a schematic diagram of a code fragment of a tree model estimation function provided in an embodiment of the present application;

[0070] Fig.18 is a flow chart of a data processing method of a federated tree model provided in an embodiment of the present application;

[0071] Fig.19 It is a schematic diagram of the pseudo-tree model construction method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0073] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0074] If similar descriptions of "first / second" appear in the application documents, the following instructions are added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0075] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0076] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0077] 1) Decision Tree: It is a machine learning method. It is specifically a tree structure, in which each internal node represents a judgment on an attribute, each branch represents the output of a judgment result, and finally each leaf node represents a classification result.

[0078] 2) Shapley Additive exPlanation (SHAP): A model-independent interpretability analysis method based on collaborative game theory. Each prediction record has a corresponding shap value, and each feature also has a corresponding shap value. When the shap value is greater than 0, it means that the current feature in the current sample pushes the model prediction result in the positive direction, otherwise it pushes it in the negative direction.

[0079] The embodiments of the present application provide a data processing method, device, electronic device, computer-readable storage medium and computer program product of a federated tree model, which can quickly and accurately determine the contribution information of each feature in a sample.

[0080] Based on the above explanations of the nouns and terms involved in the embodiments of the present application, the data processing system of the federated tree model provided in the embodiments of the present application is first described. Figure 1 , Figure 1It is an architectural diagram of a data processing system of a federated tree model provided in an embodiment of the present application. In the data processing system 100 of the federated tree model, a first participant device 400, a second participant device 410 (two second participant devices are shown as examples, respectively denoted as 410-1 and 410-2, for distinction), the first participant device 400 and the second participant device 410 are interconnected through a network 300 and connected to a server device through the network 300. The network 300 may be a wide area network or a local area network, or a combination of the two, and data transmission is achieved using a wireless link.

[0081] In some embodiments, the first participant device 400 and the second participant device 410 are connected to each other via the network 300, and third-party devices (collaborators, servers, etc.) that may be involved in the federated tree model may be connected via the network 300.

[0082] In some embodiments, the first participant device 400 and the second participant device 410 can be a laptop, a tablet computer, a desktop computer, a smart phone, a dedicated messaging device, a portable gaming device, a smart speaker, a smart watch, etc., and can also be a client terminal of a federated learning participant, such as a participant device of each bank or financial institution that stores user feature data, but is not limited to this. The third-party device can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms, etc., to assist each participant device in performing federated learning to obtain a federated learning model. The network 300 can be a wide area network or a local area network, or a combination of the two. The first participant device 400 and the second participant device 410 can be directly or indirectly connected by wired or wireless communication, which is not limited in the embodiments of the present application.

[0083] The first participant device 400 is used to obtain a first node route of a target node in a federated tree model, wherein the target node corresponds to at least two first features provided by the first participant device; then, receive at least one anonymous feature sent by the second participant device, and a second node route corresponding to each anonymous feature; wherein the anonymous feature corresponds to a second feature used to train the federated tree model, and the second node route is used to indicate a sub-node path corresponding to the split node when the anonymous feature is used as a split node of the federated tree model; and based on the first node route and the second node route, simulate the federated tree model to obtain a pseudo-federated tree model corresponding to the federated tree model, and predict the feature subset included in the feature set of the training sample through the pseudo-federated tree model to obtain a corresponding prediction value; finally, based on the prediction value and the target prediction result, determine the contribution information of each feature in the feature set corresponding to the target prediction result.

[0084] The first participant device 400 is also used to send an anonymous feature acquisition request to the second participant device to obtain the anonymous feature corresponding to the sample identifier and the second node route corresponding to the anonymous feature returned by the second participant device based on the anonymous feature acquisition request.

[0085] The second participant device 410 is used to generate anonymous features corresponding to each second feature used to train the federated tree model, and obtain the second node route corresponding to each anonymous feature; send the anonymous features corresponding to each second feature and the second node route corresponding to each anonymous feature to the first participant device.

[0086] See also Figure 2A-2B , Figure 2A-2B is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. In practical applications, the electronic device 500 can be implemented as Figure 1 The first participant device 400 or the second participant device 410 in the embodiment of the present application is used to illustrate an electronic device for implementing the data processing method of the federal tree model. Figure 2A-2B The electronic device 500 shown includes: at least one processor 510, a memory 550, at least one network interface 520 and a user interface 530. The various components in the electronic device 500 are coupled together through a bus system 540. It can be understood that the bus system 540 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 540 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are marked as bus system 540 in FIG.

[0087] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0088] The user interface 530 includes one or more output devices 531 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0089] The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 550 may optionally include one or more storage devices that are physically remote from the processor 510.

[0090] The memory 550 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 550 described in the embodiments of the present application is intended to include any suitable type of memory.

[0091] In some embodiments, the memory 550 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0092] Operating system 551, including system programs for processing various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0093] A network communication module 552, for reaching other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus (USB);

[0094] a presentation module 553 for enabling presentation of information via one or more output devices 531 (e.g., display screen, speaker, etc.) associated with the user interface 530 (e.g., a user interface for operating peripherals and displaying content and information);

[0095] The input processing module 554 is used to detect one or more user inputs or interactions from one of the one or more input devices 532 and translate the detected inputs or interactions.

[0096] In some embodiments, the data processing device of the federated tree model provided in the embodiments of the present application can be implemented in software. Figure 2A The electronic device provided in the embodiment of the present application is a schematic diagram of the structure of the first participant device 400, and the data processing device 555 of the federated tree model stored in the memory 550, which can be software in the form of programs and plug-ins, includes the following software modules: acquisition module 5551, receiving module 5552, simulation module 5553 and determination module 5554, these modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below.

[0097] In some embodiments, Figure 2B As shown, Figure 2B The electronic device provided in the embodiment of the present application is a schematic diagram of the structure of the second participant device 410. The software modules stored in the data processing device 555 of the federated tree model of the memory 550 may include: a generation module 5555 and a sending module 5556. These modules are logical, and therefore can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.

[0098] In other embodiments, the data processing device of the federal tree model provided in the embodiments of the present application can be implemented in hardware. As an example, the data processing device of the federal tree model provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the data processing method of the federal tree model provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs) or other electronic components.

[0099] The data processing method of the federated tree model provided in the embodiment of the present application will be described in combination with the exemplary application and implementation of the first participant device provided in the embodiment of the present application. The data processing method of the federated tree model provided in the embodiment of the present application is based on a federated learning system, wherein the federated learning system includes a first participant device and at least one second participant device. Figure 3 , Figure 3 is a flow chart of the data processing method of the federated tree model provided in the embodiment of the present application, which will be combined with Figure 3 The steps shown are explained.

[0100] In step 101, a first participant device obtains a first node route of a target node in a federated tree model, where the target node corresponds to at least two first features provided by the first participant device.

[0101] In actual implementation, in the scenario of the vertical federated tree model, at least two participants are usually involved, the first participant is the participant holding data and labels (target prediction results) (also called the Guest party or active party), and the second participant is the participant holding data (also called the Host party or passive party). The method provided in the embodiment of the present application can be applied to a vertical federated tree model in which one Guest party and at least one Host party participate.

[0102] Exemplarily, taking a guest and a host co-training a federated tree model as an example, in a single training sample, the guest and the host each hold some features, wherein the guest provides G_1, G_2, G_3, ..., G_n, a total of n first features, n ≥ 1 and n is an integer; the host provides H_1, H_2, H_3, ..., H_m, a total of m second features, m ≥ 1 and m is an integer; if there are k hosts (k ≥ 1 and k is an integer), m_k can be used to represent the number of features included in the kth host. It can be understood that the feature set corresponding to a single training sample of a guest and a host contains a total of n first features and m second features, and the feature set can be expressed as {G_1, G_2, G_3, ..., G_n, H_1, H_2, H_3, ..., H_m}.

[0103] Among them, for the training samples of the federated tree model, at least two first features {G_1, G_2, G_3, ..., G_n} provided by the first participant device are public to the local (first participant device), and the first participant device can directly obtain the target node corresponding to the first feature one by one in the federated tree model, as well as the routing information corresponding to the target node (which can be regarded as the first node routing).

[0104] In step 102, at least one anonymous feature sent by a second participant device and a second node route corresponding to each anonymous feature are received, wherein the anonymous feature corresponds to a second feature used to train the current federated tree model, and the second node route is used to indicate a child node path corresponding to a split node when the anonymous feature is used as a split node of the federated tree model.

[0105] In actual implementation, in order to protect the privacy and security of the data of each participant, for at least one second feature {H_1, H_2, H_3, ..., H_m} provided by the second participant device, the first participant device cannot directly obtain the information related to the second feature. In order to obtain the contribution information of the label carried by the training sample corresponding to each second feature, the anonymous feature corresponding to each second feature and the second node route corresponding to the anonymous feature can be obtained from the second participant device, and the contribution information of each feature in the sample can be determined locally on the first participant device. Anonymous features (anonymousfeature) can be used locally to replace the second feature provided by the host. At this time, the first participant device does not need to know the specific information of the second feature, but only needs to obtain the anonymous feature corresponding to the second feature and the routing information (second node route) corresponding to the anonymous feature. In other words, when the first participant device determines the contribution information of the second feature in the sample to be interpreted, it first needs to receive the anonymous feature corresponding to the second feature and the second node route corresponding to the anonymous feature sent by the second participant device.

[0106] Continuing with the above example, by obtaining the anonymous features corresponding to the m second features of the Host party, the feature set of the first participant device for a single training sample is changed to {G_1, G_2, G_3, …, G_n, a_1_i, a_2_i, a_3_i, …, a_m_i}, where a_m_i can represent the mth anonymous feature of the i-th Host party, and when i=1, it represents the first Host party.

[0107] In some embodiments, see Figure 4 , Figure 4 This is a flowchart of the anonymous feature and the second node routing acquisition method provided by the embodiment of the present application. The first participant device can Figure 4 The steps shown are to obtain the anonymous feature and the second node route corresponding to the anonymous feature, combined with Figure 4 The steps shown are explained.

[0108] Step 1021: The first participant device sends an anonymous feature acquisition request carrying a sample identifier to the second participant device.

[0109] In actual implementation, when the first participant device is interpreting a sample, when traversing to the target node corresponding to the second feature in the federated tree model, an anonymous feature request may be sent to the second participant device, and the anonymous feature request carries a sample identifier. It should be noted that the sample identifiers carried in the anonymous feature request may be one or more. When there are multiple sample identifiers, the first participant device may interpret at least two samples in batches, thereby improving the efficiency of sample interpretation.

[0110] Step 1022: The first participant device receives the anonymous feature corresponding to the sample identifier and the second node route corresponding to the anonymous feature returned by the second participant device.

[0111] In actual implementation, after the first participant device sends an anonymous feature request to the second participant device, the first participant device can receive the anonymous feature corresponding to the sample identifier and the second node route corresponding to the anonymous feature returned by the second participant device.

[0112] In some embodiments, the first participant device may store the received anonymous features and the second node routes corresponding to the anonymous features in the following manner: the first participant device locally creates an anonymous relationship record table, and stores the received anonymous features corresponding to the sample identifiers and the second node routes corresponding to the anonymous features in the anonymous relationship record table. It should be noted that the anonymous relationship record table local to the first participant device is used to record the sample identifiers of the training samples used to train the federated tree model, the anonymous features of the second participant device corresponding to the sample identifiers, and the second node routes corresponding to the anonymous features.

[0113] In actual implementation, the first participant device can create an anonymous relationship record table locally to record the anonymous features corresponding to the sample identifier and the second node route corresponding to the anonymous features. When the sample corresponding to the sample identifier is used again, it can be read directly from the local anonymous relationship record table, thereby reducing the number of communications with the second participant device.

[0114] Exemplarily, the anonymous relationship record table is stored locally in a file format, in which the recorded information may be {"sample identification": ××××, "anonymous feature": ×××, "second node routing": "left"}, and may also include the device identification of the second participant device, such as {"sample identification": ××××, "anonymous feature": ×××, "second node routing": "left", "device identification": host_x}.

[0115] It should be noted that there is no strict execution order between step 101 and step 102 .

[0116] In step 103, based on the first node routing and the second node routing, a federated tree model is simulated to obtain a pseudo federated tree model corresponding to the federated tree model.

[0117] Obtain second node routes of nodes corresponding to at least two first features in the federated tree model.

[0118] In some embodiments, the first participant device obtains the second node route corresponding to each first feature in the sample. Since the first feature is provided by the first participant device, each first node route is known information to the first participant device and can be directly obtained.

[0119] In actual implementation, in the federated tree model scenario, the relevant information of the second feature provided by the second participant device is an unknown item to the first participant device. The first participant device can simulate the federated tree model based on the known first node route and the second node route requested from the second participant, and obtain a tree model in a non-federated learning scenario locally. The simulated tree model can be regarded as a pseudo-federated tree model or pseudo-tree model of the federated tree model. The pseudo-tree model created locally is used to interpret the training sample, that is, to obtain the feature contribution of the anonymous feature corresponding to the first feature provided by the first participant device and the second feature provided by the second participant device in the sample. In other words, the first participant device simulates the federated tree model locally based on the first feature provided locally, the first node route, the anonymous feature corresponding to the second feature obtained from the second participant device, and the second node route corresponding to each anonymous feature, and obtains a new tree model for calculating the contribution information corresponding to each first feature and each anonymous feature.

[0120] For example, see Figure 5 , Figure 5 This is a schematic diagram of a pseudo-federated tree model provided in an embodiment of the present application. It is assumed that the features of the training samples used for the federated tree model include {income, age, height}, where "height" is provided by the second participant device. "a_k_1" shown by number 1 in the figure represents the second feature "height" provided by the second participant device in the original federated tree model. The height feature in the sample is provided by the second participant device and is replaced by the corresponding anonymous feature a_k_1. When traversing the pseudo-tree model shown in the figure, when the current node is the node shown by number 1, the routing information at the node can be determined based on the second node route returned by the second participant.

[0121] The construction process of the pseudo-federal tree model is described. In some embodiments, see Figure 6 , Figure 6 is a flow chart of a method for constructing a pseudo-federal tree model provided in an embodiment of the present application, based on Figure 3 , step 103, can be implemented through steps 1031A to 1034A.

[0122] In step 1031A, the first participant device creates a model copy of the federated tree model, and traverses each node of the model copy starting from the root node.

[0123] In actual implementation, the pseudo-federal tree model constructed locally by the first participant device can be regarded as a variant of the target federal tree model. In order to improve the efficiency of creating the pseudo-tree model, the pseudo-federal tree model for simulating the federal tree model can be obtained by making corresponding modifications in the model copy of the federal tree model.

[0124] Step 1032A, when the feature corresponding to the current node traversed is the second feature, obtain the anonymous feature corresponding to the second feature, and replace the feature corresponding to the current node with the anonymous feature.

[0125] In actual implementation, traversal starts from the root node of the model copy. When the feature corresponding to the current node traversed is the second feature provided by the second participant device, the anonymous feature can be directly used to replace the second feature in the model copy.

[0126] For example, Figure 5 In the example, the anonymous feature "a_k_1" is used to replace the "height" feature provided by the second participant, and the second node route corresponding to the anonymous feature "a_k_1" is obtained. That is, when traversing to the "a_k_1" node, since the specific value of "height" in this sample is provided by the second participant's device, for the sake of data security, at this node, the first participant does not need to obtain the specific value of "height", but only needs to determine which branch to continue to at the "height" node.

[0127] Step 1033A: Determine the sub-nodes included in the current node according to the sub-node path indicated by the second node route.

[0128] In actual implementation, in the model copy, after replacing the second feature provided by the corresponding second participant device with the anonymous feature, the child node of the node corresponding to the anonymous feature is determined through the second node routing.

[0129] Step 1034A, when the feature corresponding to the current traversed node is the first feature, execute traversal for other nodes until the node traversal in the model copy is completed, and use the tree model composed of the first node corresponding to the first feature, the second node corresponding to the anonymous feature, and the child nodes included in the second node in the model copy as a pseudo-federal model.

[0130] By repeatedly executing the above steps 1031A to 1034A, a pseudo federated tree model used to simulate a federated tree model can be obtained.

[0131] Continuing to explain the construction process of the pseudo-federal tree model, in some embodiments, see Figure 7 , Figure 7 is a flowchart of a method for constructing a pseudo-federal tree model provided in an embodiment of the present application, combined with Figure 7 The steps shown illustrate the pseudo-federal tree model construction process.

[0132] Step 1031B: The first participant device creates an initial tree model, the initial tree model has nodes corresponding to the first feature, and the nodes in the initial tree model correspond to the first node route.

[0133] In actual implementation, since the first feature in the sample to be interpreted (training sample) is provided by the first participant device, that is, the information related to the first feature is known information to the first participant device, in order to improve the construction speed of the pseudo-federal tree model, the first participant device can directly construct an initial tree model based on the known first features, and the initial tree model has nodes corresponding to the first features, and the nodes in the initial tree model correspond to the first node routes.

[0134] Step 1032B, obtaining anonymous features that have a one-to-one correspondence with the second features of the second participant device, and second node routes corresponding to each anonymous feature.

[0135] In actual implementation, the first participant device reads the anonymous feature corresponding to the sample identifier of the sample to be interpreted, and the second node route corresponding to the anonymous feature, which is stored in the local anonymous relationship record.

[0136] Step 1033B: Create nodes corresponding to the anonymous features and sub-nodes included in the nodes in the initial tree model according to the second node routing to obtain a pseudo-federated tree model.

[0137] In actual implementation, the first participant device directly creates nodes corresponding to the anonymous features and the sub-nodes included in the nodes in the initial tree model constructed in step 1031B according to the first node routing.

[0138] In step 104, a feature subset included in a feature set used as a training sample of the federated tree model is predicted by using the pseudo federated tree model to obtain a corresponding predicted value;

[0139] The feature set includes: the at least two first features carrying the target prediction result, and the second feature provided by at least one of the second participant devices. In actual implementation, the Guest interprets the single training sample corresponding to the federated tree model, and actually determines the influence of the feature value of each feature in the single sample on the target prediction result, wherein the target prediction result refers to the prediction result obtained by the training sample through the federated tree model, and the Guest can replace the second feature provided by the Host with the corresponding anonymous feature.

[0140] In actual implementation, the meaning of the contribution information of each feature corresponding to the target prediction result is as follows: when the feature is the first feature, the contribution information is used to characterize the contribution value of the feature value corresponding to the first feature to the target prediction result; when the feature is an anonymous feature corresponding to the second participant (host party), the contribution information is used to characterize the contribution value of each second feature in the second participant (host party) to the target prediction result. For example, determining the contribution information of feature A in sample D to the target prediction result R can be understood as determining the contribution information of the value corresponding to feature A in sample D to R.

[0141] In actual implementation, the contribution information of each feature included in the sample feature set used as the machine learning model can be determined based on the Shapley value (Shapley). The implementation process can be: assuming that there is a machine learning model f, the input sample X, the sample X contains features {1, 2, 3, ..., t}, the feature can be replaced by the subscript i, there are t (t ≥ 1 and t is an integer) features in total, N is a subset, S is a feature subset that does not contain i, f x It is an estimation function that returns the average value of the feature subset S output by the model f. The calculation formula is as follows:

[0142]

[0143] As an example, see Figure 8 , Figure 8 This is an example diagram of the contribution information of the features provided in the embodiment of the present application to the prediction results. Assuming that there is a sample x = {age = 20, height = 170, income = 100}, the machine learning model f obtains the prediction result of f for the sample x as 1.2,

[0144] 1) Enumerate all feature subsets included in the feature set of sample x: {age = 20, height = 170, income = 100}, {age = 20, height = 170}, {age = 20, income = 100}, {height = 170, income = 100}, {income = 100}, {age = 20}, {height = 170}, {}.

[0145] 2) Traverse each feature in sample x, add the feature value corresponding to each feature to the feature subset that does not contain itself, calculate the marginal contribution of each feature, and use the preset valuation function f_x to calculate the prediction result (also called estimated value) corresponding to each feature subset. Assume that through f_x, the prediction results of each feature subset are as follows:

[0146] f_x({age=20, height=170, income=100})=1.2;

[0147] f_x({age=20, height=170})=0.9;

[0148] f_x({age=20, income=100})=0.8;

[0149] f_x({height=170, income=100})=0.7;

[0150] f_x({income=100})=0;

[0151] f_x({age=20})=0;

[0152] f_x({height=170})=0;

[0153] f_x({})=0;

[0154] It should be noted that when the feature subset is the full set of features in sample x, the prediction result calculated using the valuation function f_x is consistent with the prediction result using the machine learning model f.

[0155] Continuing with the above example, in order to calculate the contribution of the feature "{age = 20}" to the prediction result "1.2" of sample x, "{age = 20}" can be added to the feature subset that does not contain itself, and the marginal contribution value of "{age = 20}" can be calculated according to the above formula (1). The process is as follows:

[0156] ① Add "{age = 20}" to the feature subset {height = 170, income = 100}, and determine the marginal contribution value as: 2 / 6*{1.2-0.7}=1 / 6;

[0157] ② Add "{age = 20}" to the feature subset {income = 100} and determine the marginal contribution value as: 1 / 6*{0.8-0}=0.8 / 6;

[0158] ③ Add "{age = 20}" to the feature subset {age = 20}, and determine the marginal contribution value as: 1 / 6*{0.9-0}=0.9 / 6;

[0159] ④ Add "{age=20}" to the empty set and determine the marginal contribution value to be: 0;

[0160] Adding the marginal contribution values ​​obtained from ① to ④ above, the total contribution is 2.7 / 6=0.45. Finally, it is obtained that "{age=20}" contributes "+0.45" to the prediction result "1.2". Similarly, it can be obtained that "{income=100}" contributes "+0.35" to the prediction result "1.2", and "{height=170}" contributes "+0.4" to the prediction result "1.2". Among them, the symbol "+" indicates that "{age=20}", "{income=100}", and "{height=170}" have a positive impact on the prediction result "1.2", and if the symbol is "-", it indicates that the feature value corresponding to the feature has a negative impact on the target prediction result.

[0161] From the above description, it can be determined that when determining the feature values ​​of each feature included in the feature set of training samples used to train the federated tree model and the contribution information to the prediction results of the samples based on the Shapley value, the first participant device participating in the training of the federated tree model needs to determine the feature subsets included in the feature set of the sample (sample to be explained), and the valuation function used to calculate the prediction results of each feature subset, wherein the implementation method of the valuation function can be determined by the machine learning model actually used.

[0162] The method of obtaining feature subsets is explained. Feature subsets are obtained by combining the features in the sample feature set. Taking the federated tree model as an example, the feature combination of the sample includes the first feature provided by the Guest (including G_1, G_2, G_3, ..., G_n, a total of n features), and the second feature provided by the Host (including H_1, H_2, H_3, ..., H_m, a total of m features), that is, there are n+m features in a sample data. Combine these n+m features to obtain the corresponding feature subset. The number of features in the feature subset ranges from 0 to n+m. When the number of features is 0, the feature subset is an empty set. When the number of features is n+m, the feature subset is the full set. The number of feature subsets N, the calculation formula of N is as follows:

[0163]

[0164] Among them, n+m is the number of features, Indicates the number of feature subsets containing 0 features (that is, the number of empty sets is 1), represents the number of feature subsets containing 1 feature, Indicates the number of feature subsets containing n+m features (i.e., the number of the full set is 1).

[0165] Exemplarily, in the federated tree model, it is assumed that a guest and a host participate in the calculation. For each sample D containing n+m features, n is the number of first features provided by the guest, and m is the number of second features provided by the host. For sample D, in order to ensure the contribution of obtaining relevant features of the host, while ensuring the data security between the participating parties, the m second features provided by the host are replaced by m corresponding anonymous features. It should be noted that there is a one-to-one correspondence between the anonymous features and the second features. For a sample to be interpreted, there are several anonymous features corresponding to several second features, and each anonymous feature has a unique identifier. The anonymous feature can be recorded as a_m_k, where i is used as the index of the host, and m is used to identify the mth anonymous feature provided by the kth host. In actual applications, there can be multiple hosts. Sample D{G_1, G_2, G_3, ..., G_n, H_1, H_2, H_3, ..., H_m} is changed to sample D'{G_1, G_2, G_3, ..., G_n, a_1_1, a_2_1, a_3_1, ..., a_m_1}. For the n+m features included in sample D', the n+1 features are combined and calculated according to the above formula (2) to obtain the 2 corresponding to sample D' n+m feature subset.

[0166] The valuation function applicable to the tree model is explained. In actual implementation, due to the particularity of its structure, the tree model can estimate the feature subsets included in the feature set of the sample without relying on any other samples. When a feature is missing, the tree model outputs the predicted value (also called the average value) corresponding to each feature subset. The implementation principle of the tree model estimation function provided in the embodiment of the present application is as follows:

[0167] Start {Enter a feature subset S, starting from the root node of the tree model:

[0168] Traverse each node j, j = 0, 1, 2, ...

[0169] Initialize the weight to w=1

[0170] implement:

[0171] If node j is a non-leaf node and the feature d_j is in the subset S,

[0172] w remains unchanged and is passed downward, then the result of the downward traversal is returned upward.

[0173] If the node j is not a leaf, and the feature d_j is not in the subset S, take out r_j, and take out r_(a_j) and r_(b_j)

[0174] Calculate the new weight of the left branch w_l = r_(a_j) / r_j, pass it down from the left branch, calculate the new weight of the right branch w_l = r_(b_j) / r_j, pass it down from the right branch, and return the sum of the results of the left branch traversal and the right branch traversal.

[0175] If the node is a leaf

[0176] Return the value of weight w multiplied by leaf output value t_j upward

[0177] }End. Finally, after the recursion ends, the returned value is obtained as the estimated value of the subset S.

[0178] The above implementation algorithm is explained. In the algorithm shown in the figure, S is a feature subset of the sample X to be explained; assuming that there are n tree nodes in the tree model, the vector contains n elements, is the output value of the leaf node, only the leaf node has a value; is the index vector of the left and right child nodes of a node. Non-leaf nodes can be Find the corresponding child node based on the index information in; is the segmentation threshold corresponding to non-leaf nodes; is the feature index corresponding to the non-leaf node, and the element value corresponding to the leaf node is empty. is the number of samples falling on this node.

[0179] For example, see Fig. 9 , Fig. 9 This is a schematic diagram of a tree model in a non-federated learning scenario provided by an example of this application. Assume that there are 100 samples, a tree model T, and each sample includes 3 features {income, age, height} and a prediction result. The tree model in the figure includes 7 nodes, {0, 1, 2, 3, 4, 5, 6} represents the node index in the tree model, {0.1, 0.2, 0.3, 0.4} is the prediction result corresponding to the tree model, and the value of each vector in the estimation function is: Among them, the element "-1" in each vector means that there is no corresponding value. In the figure, "2000" is the segmentation (segmentation) threshold of "income" (that is, if the income of the sample is ≤2000, it will operate along the left branch of the "income" node; if the income of the sample is >2000, it will operate along the right branch of the "income" node), "20" is the segmentation (segmentation) threshold of "age", and "170cm" is the segmentation (segmentation) threshold of "height".

[0180] Continuing with the above example, in the figure, "income" is used as the splitting node. Among the 100 samples, the corresponding values ​​of "income" in 40 samples meet "income < 2000" (along the left branch of the "income" node), and the remaining 60 samples meet "income ≥ 2000" (along the right branch of the "income" node); that is, "income = 2000" divides the 100 samples into two groups, one group contains 40 samples, and the other group contains 60 samples. Taking "age" as the splitting node, 20 samples meet "age < 18" (go to the left), and 20 samples meet "age ≥ 18"; taking "height" as the splitting (split) point, 15 samples (split subsets) meet "height < 170" (go to the left), and 45 samples meet "height ≥ 170".

[0181] Continuing with the above example, through the above decision tree model T, determine the estimated value (average) corresponding to the feature subset A{age=18, income=900}, that is, calculate the value of f({age=18, income=900}). The missing feature in feature subset A is "height". The implementation process is as follows: predict the index path, 0→1→3, then T({age=18, income=900})=0.1. When the feature "height" is missing in the feature subset, the predicted value of the feature subset is consistent with the target predicted value of sample X.

[0182] Continuing with the above example, the feature subset B {age = 18, height = 160} is determined through the above decision tree model T, and the corresponding prediction value, that is, the value of f({age = 18, height = 160}), is calculated. The missing feature in the feature subset B is "income". Because the "income" feature is the root node, it is impossible to continue to use the index path method to predict the value. According to the above implementation algorithm, in this case, the number of samples that fall into each node training sample can be used for prediction. For 100 samples, when the "income" feature is used for segmentation (cutting), 20 samples are divided into the left branch and 80 samples are divided into the right branch. In the case where the feature "income" is missing in feature subset B, both the left and right branches corresponding to "income" should be referenced: the left branch goes to the "age" feature. Since the feature "age" exists in feature subset B, according to "age = 18", go left here at "age", and the predicted value is 0.1; the right branch goes to the "height" feature. Since "height" exists in feature subset B, according to "height = 160", go right here at "height", and the predicted value is 0.3. Therefore, it can be determined that f({age = 18, height = 160}) = 0.1*(20 / 100)+0.3*(80 / 100) = 0.02+0.24 = 0.26; among which 20 / 100 is the sample proportion of the missing feature "income" (left branch), 0.1 is the predicted value of "age = 18", 80 / 100 is the sample proportion of the missing feature "income" (right branch), and 0.3 is the predicted value of "height = 160".

[0183] In actual implementation, in order to determine the predicted values ​​of each feature subset included in the feature set of the sample in the federated tree model according to the estimation function of the above-mentioned tree model, thereby determining the contribution of each feature in the sample to the target prediction result of the federated tree model. The first participant in the federated tree model can locally determine the contribution information of each first feature in the sample used as the federated tree model to the sample target prediction result, and the contribution information of each anonymous feature to the sample target prediction result through the first feature of the sample provided by itself and each feature subset determined by the anonymous feature used to replace the second feature provided by the second participant. Since the anonymous feature is used to replace the second feature provided by the second participant, the contribution information (or contribution degree) of the anonymous feature to the sample target prediction result can be used to reflect the contribution information of the second feature provided by the second participant to the sample target prediction result.

[0184] In step 105, the predicted value and the target prediction result are combined to determine the contribution information of each feature in the feature set to the target prediction result.

[0185] In actual implementation, the first participant device predicts the feature subsets included in the feature set in the sample to be explained through the pseudo-federated tree model constructed locally, and obtains the prediction value corresponding to each feature subset. It should be noted that the feature set here can be regarded as including the first feature and the anonymous feature corresponding to the second feature.

[0186] Exemplarily, the feature set corresponding to the sample input into the pseudo-federated tree model can be {G_1, G_2, G_3, ..., G_n, a_1_1, a_2_1, ..., a_m_1}, where {a_1_1, a_2_1, ..., a_m_1} are anonymous features corresponding to each second feature.

[0187] In some embodiments, see Fig.10 , Fig.10 is a schematic diagram of a method for determining a prediction value using a pseudo-federal tree model provided in an embodiment of the present application, based on Figure 3 In step 105, for each feature subset included in the feature set, the following steps 1051A to 1053A can be respectively executed through the pseudo-federated tree model to determine the prediction value corresponding to each feature subset in the feature set.

[0188] Step 1051A: the first participant device starts from the root node of the pseudo federal tree model and traverses the nodes of the pseudo federal tree model.

[0189] For example, see Figure 5, assuming that there is a sample X to be explained, the sample identifier is ID1, {income = 1500, age = 17, height = 165cm}. In actual implementation, assuming that height is a feature provided by the second participant device, the feature value of the "height" feature in sample X is unknown information, and unknown information can be represented by "?". In order to determine the prediction value corresponding to the feature subset S {age = 18, income = 900}, the first participant device Figure 7 The root node shown (i.e., the node corresponding to the feature "income") starts to traverse the nodes of the pseudo-federated model.

[0190] Step 1052A, when the current node traversed is a non-leaf node and the feature subset includes the feature corresponding to the current node, obtain the node route corresponding to the current node.

[0191] Continuing with the above example, for the feature subset S {age = 18, income = 900} of sample X, when Figure 7 In the pseudo-federated tree model shown in , when traversing to the "income" node, since the node where "income" is located is a non-leaf node, according to the value "900" of the "income" feature, it can be determined that the node routing of the "income" node is the left branch operation to the "income" node, where the corresponding child node is "age".

[0192] Step 1053A, determine the leaf node corresponding to the current node according to the node routing, and use the feature value corresponding to the leaf node as the predicted value of the feature subset.

[0193] Continuing with the above example, based on the value "18" of the "age" feature in feature subset S, we can determine that the leaf node is the node with a value of "0.1", and we can determine that the predicted value of feature subset S is 0.1.

[0194] In some embodiments, see Fig.11 , Fig.11 is a schematic diagram of a method for determining a predicted value of a feature subset provided in an embodiment of the present application, based on Figure 3 In step 105, for each feature subset included in the feature set, the following steps 1051B to 1055B can be respectively executed through the pseudo-federated model to determine the prediction value corresponding to each feature subset.

[0195] Step 1051B: the first participant device starts from the root node of the pseudo federal tree model and traverses the nodes of the pseudo federal tree model.

[0196] For example, see Figure 5 , continue to take the sample to be explained X, sample ID is ID1, {income = 1500, age = 17, height = 165cm} as an example, in order to determine the prediction value corresponding to the feature subset Z {age = 18, height = ?}, the first participant device Figure 5The root node shown (i.e., the node corresponding to the feature "income") starts to traverse the nodes of the pseudo-federated model.

[0197] Step 1052B, when the traversed current node is a non-leaf node and the feature subset does not include the feature corresponding to the current node, obtain the first number of training samples corresponding to the current node.

[0198] In actual implementation, the first number is the number of samples that fall into the current node by grouping the samples with the parent node of the current node as the splitting node. When the current node is the root node, the first number can be a preset number of samples Number. For the convenience of calculation, Number can be an integer greater than 2. At the same time, Number can also be the total number of samples to be interpreted when the first participant device performs a model interpretation. Usually, in order to improve the efficiency of model interpretation, a model interpretation operation can be performed on multiple samples.

[0199] Continuing with the above example, assume that the number of samples to be explained for model interpretation is 100. For the feature subset Z {age = 18, height = ?} of sample X, when Figure 5 In the pseudo-federated tree model shown in , when traversing to the "income" node, since "income" is a missing feature, the node is a non-leaf node, but it is a root node, and the first number of samples corresponding to the "income" node can be obtained as "100".

[0200] Step 1053B, obtaining the second number of training samples corresponding to each child node of the current node.

[0201] In actual implementation, the second number is the number of samples that fall into each child node of the node by grouping the training samples that fall into the node with the current node as the splitting node.

[0202] Following the above example, see Figure 5 Suppose, among the 100 samples, there are 40 samples of "income < 1000" and 60 samples of "income ≥ 1000"; among the 40 samples, there are 20 samples of "age < 20" and 20 samples of "age ≥ 20"; among the 60 samples, there are 15 samples of "height < 170cm" and 45 samples of "height ≥ 170cm".

[0203] Step 1054B, obtain the prediction value corresponding to each child node.

[0204] Following the above example, see Figure 5 , in the feature subset Z{age=18, height=?}, the prediction value corresponding to "age=18" is "0.1", and the prediction value corresponding to "height=?" is 0.3 (because the "height" value of the host side corresponding to this sample is "165cm").

[0205] Step 1055B, determining the prediction value corresponding to the feature subset according to the first quantity, each second quantity, and the prediction value corresponding to each child node.

[0206] In some embodiments, see Fig.12 , Fig.12 is a schematic diagram of a specific method for determining a prediction value using a pseudo-federal tree model provided in an embodiment of the present application, based on Figure 3 , step 1055B can be implemented through steps 201 to 203.

[0207] In step 201, the first participant device determines the weight corresponding to each sub-node according to the first quantity and each second quantity, and performs weighted processing on the predicted value corresponding to each sub-node based on the weight corresponding to each sub-node to obtain the predicted value corresponding to the current node.

[0208] Step 202: If the current node is a root node, the predicted value corresponding to the current node is used as the predicted value corresponding to the feature subset.

[0209] Step 203, if the current node is not a root node, obtain the weights of each node in the node layer where the current node is located, and the prediction values ​​corresponding to each node in the node layer, perform weighted processing on the prediction values ​​corresponding to each node in the node layer, and obtain the prediction value corresponding to the parent node of the current node. If the parent node is a root node, use the prediction value corresponding to the parent node as the prediction value corresponding to the feature subset. If the parent node is not a root node, iterate the above processing until the prediction value corresponding to the root node is obtained as the prediction value corresponding to the feature subset.

[0210] Following the above example, see Figure 5 , in the feature subset Z{age=18, height=?}, the prediction value corresponding to "age=18" is "0.1", and the prediction value corresponding to "height=?" is 0.3 (because the "height" value of the host side corresponding to this sample is "165cm"). The specific calculation process is: since there is the feature "age" in the feature subset Z, according to "age=18", go left here at "age", and the prediction value is 0.1; right branch to the "height" feature, there is "height" in the feature subset Z, and height is an anonymous feature. Because the route to obtain the anonymous feature, it is determined to go left here at "height", and the prediction value is 0.3. Therefore, it can be determined that the feature subset Z{age=18, height=?}} is 0.1*(20 / 100)+0.3*(80 / 100)=0.02+0.24=0.26; where 20 / 100 is the sample proportion of the missing feature “income” (left branch), 0.1 is the predicted value of “age=18”, 80 / 100 is the sample proportion of the missing feature “income” (right branch), and 0.3 is the predicted value of the anonymous feature.

[0211] In some embodiments, when the first participant determines the contribution information of each feature in the feature set corresponding to the target prediction result, the following operations may be performed for each feature in the feature set: the first participant adds the feature value of the current feature to the feature subset that does not contain the current feature, obtains the corresponding first prediction value, and determines at least one marginal contribution value of the current feature based on the second prediction value of the feature subset that does not contain the current feature, according to the marginal contribution value calculation formula in the above formula (1). When the number of marginal contribution values ​​is one, the marginal contribution value is used as the contribution information of the current feature to the target prediction result; when the number of marginal contribution values ​​is at least two, the cumulative result of each marginal contribution value is used as the contribution information of the current feature to the target prediction result.

[0212] In some embodiments, see Fig.13 , Fig.13 is a flow chart of a method for determining interactive contribution information provided in an embodiment of the present application, based on Figure 3 After executing step 105, the first participant device may execute Fig.13 The steps shown determine the interactive contribution information to the target prediction result when any at least two features interact.

[0213] In step 106, the first participant device selects at least two features from at least two first features provided locally and second features provided by at least one second participant device.

[0214] In actual implementation, the interactive contribution information of at least two features may be determined arbitrarily, and the at least two features may be any at least two features of the at least two first features and the at least two second features.

[0215] In step 107, a feature interaction group including at least two features is constructed, and at least one interaction marginal contribution value corresponding to the feature interaction group is determined.

[0216] In actual implementation, the at least two features determined in step 106 are determined as a feature interaction group, and then all interaction marginal contribution values ​​of the feature interaction group are determined.

[0217] The interactive marginal contribution value of a feature interaction group including two features is determined for illustration. In some embodiments, a feature interaction group <i, j> is determined, that is, the feature interaction group includes two features, feature i and feature j, and the interactive marginal contribution information of the feature interaction group to the target prediction result corresponding to the sample is determined. The principle is as follows:

[0218]

[0219] δ i,j =f x (S∪{i,j})-f x(S∪{i})-f x (S∪{j})+f x (S)

[0220] In the above formula (3), S represents any subset that does not contain i and j, S∪{i, j} represents a feature subset that contains features i and j, S∪{i} represents a feature subset that contains feature i, S∪{j} represents a feature subset that contains feature j, and f x is the estimation function corresponding to the federated tree model, which is used to determine the predicted value of each feature subset, δ i,j is the interaction marginal contribution of the corresponding feature interaction group, and its calculation method can refer to the method of calculating marginal contribution in formula (1). In step 108, based on at least one interaction marginal contribution value, the interaction contribution information of the feature interaction group corresponding to the target prediction result is determined.

[0221] In actual implementation, when the number of interactive marginal contribution values ​​is one, the interactive marginal contribution value is directly used as the interactive contribution information of the feature interaction group corresponding to the target prediction value.

[0222] The method for determining the interactive contribution information of the feature interaction group corresponding to the target prediction result is described. In some embodiments, see Fig.14 , Fig.14 is a flow chart of a method for determining interactive contribution information provided in an embodiment of the present application, based on Fig.13 , Fig.14 Step 108 shown can be implemented by steps 1081 to 1083.

[0223] Step 1081: The first participant device determines a first feature subset of the feature set, wherein the first feature subset includes at least one of the at least two features.

[0224] In actual implementation, when determining the interaction contribution information of the feature interaction group according to the above formula (3), it is necessary to first determine the interaction marginal contribution of the feature interaction group, that is, δ i,j , according to δ i,j The first participant device needs to obtain a first feature subset of the feature set.

[0225] For the first feature subset, based on formula (3), the feature interaction group is<i,j> For example, the first feature subset is, including<i,j> The feature subset of i, the feature subset of j; the feature interaction group is<i,j,v> For example, the first feature subset is, including<i,j,v> The feature subset of , the feature subset including only i and j, the feature subset including only i and v, the feature subset including only j and v, the feature subset including only i, the feature subset including only j, the feature subset including only v, and so on. It can be seen that the more features there are in the feature interaction group, the higher the computing power requirements for the first participant device.

[0226] Step 1082: The first participant device determines a second feature subset of the feature set, wherein the second feature subset and the feature interaction group are in a complementary relationship.

[0227] For the second feature subset, based on formula (3), when calculating the interactive marginal contribution value, the first participant device needs to obtain a feature subset (which can be called the second feature subset) that does not include the features in the feature interaction group.<i,j> For example, the second feature subset is, not including<i,j> The feature subset of<i,j,v> For example, the second feature subset is, not including<i,j,v> feature subset.

[0228] Step 1083, obtain the predicted value corresponding to the first feature subset and the predicted value corresponding to the second feature subset, and determine the interaction marginal contribution value corresponding to the feature interaction group based on the predicted value corresponding to the first feature subset and the predicted value corresponding to the second feature subset.

[0229] In actual implementation, the predicted value corresponding to the first feature subset and the predicted value corresponding to the second feature subset are determined through the pseudo-federal tree model, and the interactive marginal contribution value corresponding to the feature interaction group is determined based on the predicted value corresponding to the first feature subset and the predicted value corresponding to the second feature subset.

[0230] Continuing from the above example, we determine the marginal contribution of the interaction of feature interaction group <i, j> through the pseudo-tree federation model f x Determine the prediction value f corresponding to the first feature subset S∪{i,j}, S∪{i}, S∪{j} x (S∪{i,j}),f x (S∪{i}),f x (S∪{j}), and then according to the above formula (3), determine the interactive marginal contribution value δ corresponding to the feature interaction group i,j .

[0231] In some embodiments, when the number of interactive marginal contribution values ​​is at least two, the interactive contribution information corresponding to the feature interaction group can also be determined in the following manner: the first participant device sums up multiple interactive marginal contribution values ​​to obtain the interactive contribution information of the feature interaction group corresponding to the target prediction result. Continuing with the above example, based on formula (3), when the number of interactive marginal contribution information of the feature interaction group <i, j> is at least two, the accumulated result of at least two interactive marginal contribution information can be used as the interactive contribution information of the feature interaction group to the target prediction result.

[0232] In the embodiment of the present application, the first participant can obtain the corresponding anonymous features of each sample to be interpreted and the node routes corresponding to the anonymous features from each second participant by sending an anonymous feature acquisition request, and construct a pseudo-tree model corresponding to the federated tree model locally on the first participant. The prediction of all feature subsets can be completed locally in parallel without the need for a complex federated learning prediction process, which greatly reduces the amount of communication, making it practical to use tree algorithms to explain multiple samples and measure contribution functions in a federated scenario, and provides an explanation of a single sample, supplementing the deficiencies in the federated scenario; at the same time, it can measure the contribution information of each feature of the Host party. In addition, it can also provide an explanation of the contribution of each feature in the sample to be interpreted while protecting the data privacy of each participant, and can provide the function of interactive analysis of features for modeling personnel.

[0233] Next, the data processing method of the federated tree model provided in the embodiment of the present application will be described in combination with the exemplary application and implementation of the second participant device provided in the embodiment of the present application. Fig.15 , Fig.15 is a flow chart of the data processing method of the federated tree model provided in the embodiment of the present application, which will be combined with Fig.15 The steps shown are explained.

[0234] In step 301, the second participant device generates anonymous features corresponding to each second feature for training the federated tree model, and obtains a second node route corresponding to each anonymous feature.

[0235] It should be noted that the second node routing is used to indicate the child node path corresponding to the split node when the anonymous feature is used as the split node of the federated tree model.

[0236] In step 302, the second participant device sends anonymous features corresponding to each second feature, and the second node corresponding to each anonymous feature is routed to the first participant device.

[0237] It should be noted that the second node routing is used for the first participant device to obtain the pseudo federated tree model corresponding to the federated tree model based on the second node routing, and determine the contribution information of each feature in the feature set corresponding to the target prediction result through the pseudo federated tree model. The feature set here is used as a training sample of the federated tree model, and the feature set includes: at least two first features carrying the target prediction result provided by the first participant device, and at least one second feature.

[0238] In some embodiments, see Fig.16 , Fig.16 is a schematic diagram of an anonymous feature sending method provided in an embodiment of the present application, based on Fig.16 , step 302 can be implemented through steps 3021 to 3024.

[0239] Step 3021: The second participant device receives an anonymous feature acquisition request carrying a sample identifier sent by the first participant device.

[0240] Step 3022, parse the anonymous feature acquisition request to obtain a sample identifier.

[0241] Step 3023: determine the second feature corresponding to the sample identifier, the anonymous feature corresponding to the second feature, and the second node route corresponding to the anonymous feature.

[0242] Step 3024, sending the anonymous feature and the second node route to the first participant device.

[0243] In some embodiments, the second participating mode device can determine the second feature corresponding to the sample identification, the anonymous feature corresponding to the second feature, and the second node route corresponding to the anonymous feature in the following manner: the first participating party device searches the local anonymous relationship record table according to the sample identification to obtain the second feature corresponding to the sample identification, the anonymous feature corresponding to the second feature, and the second route corresponding to the anonymous feature. It should be noted that the anonymous relationship record table is used to record the sample identification of the training sample used to train the federated tree model, the second feature corresponding to the sample identification, the anonymous feature corresponding to the second feature, and the second node route corresponding to the anonymous feature.

[0244] In actual implementation, the second participant device can store the second feature in each sample to be interpreted, the anonymous feature corresponding to the second feature, the routing relationship (second node routing) corresponding to each anonymous feature, and the sample identifier of the sample to be interpreted in a local anonymous relationship record table. The anonymous relationship record table can be a two-dimensional relationship table stored in a database, or a file stored locally (such as a file in json format).

[0245] In some embodiments, the second participant device can generate an anonymous feature corresponding to the second feature in the following manner: the second participant device performs hash processing on each second feature used to train the federated tree model, obtains a hash value corresponding to each second feature, and uses the hash value as the anonymous feature corresponding to the second feature.

[0246] In actual implementation, the second participant device can set the anonymous feature of the second feature provided locally in each sample to be interpreted in a format agreed upon by the participants participating in the training of the federated tree model; the second participant can also generate the anonymous feature corresponding to the second feature by setting a non-repeating random number, which can be recorded as a_j_0, a_j_1, a_j_m, where a_j_m represents the mth feature of the jth host. The second participant can also calculate the hash value corresponding to the second feature through a common hash algorithm, and then record the obtained hash value as the anonymous feature corresponding to the second feature.

[0247] In the embodiment of the present application, the second participant creates an anonymous relationship record table locally, saves the second feature, the anonymous feature corresponding to the second feature, and the second node route corresponding to the anonymous feature, and can directly search the anonymous feature corresponding to the sample identifier and the second node route corresponding to the anonymous feature from the anonymous relationship record table when receiving an anonymous feature acquisition request, thereby improving query efficiency and reducing the number of communications with other participant devices.

[0248] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.

[0249] The feature importance scheme provided by the relevant vertical federated tree model can meet some requirements. Taking a vertical federated tree scenario involving two parties (guest and host) as an example, the feature importance scheme provided by the vertical federated tree model is briefly described as follows:

[0250] (1) The guest initializes a table locally, which contains all the local features of the guest and the anonymous feature numbers sent by the host. The count value of each feature is 0.

[0251] (2) Start building a decision tree. For each split feature used by each decision tree node, add 1 to the corresponding count value in the table, or add the split gain value;

[0252] (3) After the decision tree is built, the feature importance table is output. The feature importance table can be used to explain the model: features with high count values ​​represent features that play a high role in the modeling process.

[0253] However, the feature importance scheme provided by the vertical federated tree model can meet the above requirement (1), but cannot meet the above requirements (2) and (3).

[0254] First, for the above requirement (2), users cannot use feature importance to specifically explain a single sample. For example, there is a sample S {age: 28, marital status: married, income: 10,000, education: undergraduate, work: IT, place of origin: ... and other features}, which is a defaulting customer. The vertical federated learning model is used to predict this sample and the score obtained is 0.1. Business users want to know how much each specific feature value in sample S (such as age = 28) contributes to the final prediction score of 0.1, and whether the feature has a positive or negative impact on the prediction score. In this way, the model can be combined with real-life experience to obtain some business inspiration.

[0255] It is impossible to judge the impact of a specific feature value on the model output and the positive or negative impact based solely on the obtained feature importance. This is because feature importance only reflects the usage of a global feature and cannot be used to analyze a specific sample.

[0256] For requirement (3) above, although feature importance can tell how many times the partner’s feature is used, the positive or negative impact of the partner’s feature on a single sample is unknown. If the partner’s feature can have a large impact on many samples, then it can be used to measure the value of the partner’s feature.

[0257] Since the calculation of the Shapley value (SHAP value) in the federated learning scenario requires enumerating feature subsets, and then under federated conditions, it is predicted that very frequent communications will be generated. Based on this, the embodiment of the present application provides a data processing method for a federated tree model. In a vertical federated learning scenario, the method combines the SHAP value to interpret the prediction results of the federated tree model and measure the total value of the features of the partner, which can realize batch interpretation of multiple samples with only one communication.

[0258] From the description of the knowledge related to the Shapley value in the aforementioned step 104, it can be determined that when interpreting the machine learning model based on the Shapley value, the information that needs to be determined includes at least: the predicted value of the machine learning model corresponding to the sample to be explained, the multiple feature subsets included in the feature set of the sample to be explained, and the estimation function for determining the estimated value of the machine learning model corresponding to each feature subset (that is, when a feature subset is missing, the average value determined based on the machine learning model).

[0259] In actual implementation, each feature subset included in the feature set of the sample to be interpreted can be obtained according to the above formula (2).

[0260] Exemplarily, assuming that the sample to be explained is x = {age = 20, height = 170, income = 100}, enumerate all feature subsets: {age = 20, height = 170, income = 100}, {age = 20, height = 170}, {age = 20, income = 100}, {height = 170, income = 100}, {income = 100}, {age = 20}, {height = 170}, {}.

[0261] Continuing to explain the estimation function f_x, in actual implementation, when evaluating the SHAP value of each feature value in a sample, the corresponding estimation function f_x can be determined according to the actual situation of the machine learning model, and f_x can be used to reflect the predicted value obtained by the machine learning model for the feature subset of the corresponding sample.

[0262] Below, we take the estimation function of the corresponding tree model in the non-federated learning scenario as an example to explain in detail. Due to the special structure of the tree model, it can estimate the feature subsets included in the feature set of the sample without relying on any other samples, and the average value of the tree model output when a feature is missing. Fig.17 , Fig.17 is a code snippet diagram of the tree model estimation function provided in the embodiment of the present application. In the algorithm shown in the figure, S is a feature subset of the sample x to be explained; assuming that there are n tree nodes in total, then the vector contains n elements, is the output value of the leaf node, only the leaf node has a value; is the index vector of the left and right child nodes of a node. Non-leaf nodes can be Find the corresponding child node based on the index information in; is the segmentation threshold corresponding to non-leaf nodes; is the feature index corresponding to the non-leaf node, and the element value corresponding to the leaf node is empty. is the number of samples that fall on this node during training. Based on this, when estimating the average output value of a feature missing from the tree algorithm, the recursive algorithm has the following process:

[0263] Enter a subset S, starting from the root node:

[0264] Start {traverse each node j, j = 0, 1, 2, ...

[0265] Initialize the weight to w=1

[0266] implement:

[0267] If node j is a non-leaf node and the feature d_j is in the subset S,

[0268] w remains unchanged and is passed downward, then the result of the downward traversal is returned upward.

[0269] If the node j is not a leaf, and the feature d_j is not in the subset S

[0270] Take out r_j, and take out r_(a_j), r_(b_j)

[0271] Calculate the new weight of the left branch w_l = r_(a_j) / r_j and pass it down from the left branch

[0272] Calculate the new weight of the right branch w_l = r_(b_j) / r_j, and pass it down from the right branch

[0273] Return the sum of the results of the left branch traversal and the right branch traversal upwards

[0274] If the node is a leaf

[0275] Return the value of weight w multiplied by leaf output value t_j upward

[0276] }End. Finally, after the recursion ends, the returned value is obtained as the estimated value of the subset S.

[0277] For example, see Figure 5 , Assume that there are 100 samples (samples to be explained), each of which includes 3 features {income, age, height} and predicted values. The tree model in the figure includes 7 nodes, {0, 1, 2, 3, 4, 5, 6} represents the node index in the tree model, {0.1, 0.2, 0.3, 0.4} is the predicted value corresponding to the tree model, and the value of each vector in the estimation function is: Among them, the element "-1" in each vector means that there is no corresponding value. In the figure, "2000" is the segmentation (segmentation) threshold of "income", "20" is the segmentation (segmentation) threshold of "age", and "170cm" is the segmentation (segmentation) threshold of "height".

[0278] Continuing with the above example, in the figure, "income" is used as the splitting node. Among the 100 samples, the values ​​corresponding to the characteristic income in 40 samples meet the condition "income < 2000" (go to the left), and the remaining 60 samples meet the condition "income ≥ 2000"; that is, "income = 2000" divides the 100 samples into two groups, one containing 40 samples and the other containing 60 samples. Taking "age" as the splitting node, 20 samples meet the condition "age < 18" (go to the left), and 20 samples meet the condition "age ≥ 18"; taking "height" as the splitting (split) point, 15 samples (split subsets) meet the condition "height < 170" (go to the left), and 45 samples meet the condition "height ≥ 170".

[0279] Continuing with the above example, taking the sample to be explained X{income = 1500, age = 17, height = 165cm} as an example, the node index path corresponding to the sample to be explained X in the above decision tree model f is 0→1→3, that is, f({income = 1500, age = 17, height = 165cm}) = 0.1;

[0280] Continuing with the above example, enumerate all feature subsets corresponding to the feature set in the sample to be explained X{income=1500, age=17, height=165cm}: {age=18, height=160, income=900}, {age=18, height=160}, {age=18, income=900}, {height=160, income=900}, {income=900}, {age=18}, {height=165}, {} (this is an empty set).

[0281] Continuing with the above example, through the above decision tree model f, determine the prediction value corresponding to the feature subset A{age=18, income=900}, that is, calculate the value of f({age=18, income=900}). The missing feature in feature subset A is "height". The implementation process is as follows: predict the index path, 0→1→3, then f({age=18, income=900})=0.1. When the feature "height" is missing, it has no impact;

[0282] Continuing with the above example, through the above decision tree model f, determine the feature subset B {age = 18, height = 160}, the corresponding estimated value (average), that is, calculate the value of f({age = 18, height = 160}). The missing feature in feature subset B is "income". Because the "income" feature is the root node, it is impossible to continue to use the index path method to predict the value. In this case, the sample ratio of the training samples of each node can be used for prediction.

[0283] Continuing with the above example, for 100 samples, when the "income" feature is used for segmentation (cutting), 20 samples are divided into the left branch and 80 samples are divided into the right branch. In the case that the feature "income" is missing in feature subset B, both the left and right branches corresponding to "income" should be referenced: the left branch goes to the "age" feature. Since the feature "age" exists in feature subset B, according to "age = 18", go left at "age", and the predicted value is 0.1; the right branch goes to the "height" feature. Since "height" exists in feature subset B, according to "height = 160", go right at "height", and the predicted value is 0.3. Therefore, it can be determined that f({age=18, height=160})=0.1*(20 / 100)+0.3*(80 / 100)=0.02+0.24=0.26; among them, 20 / 100 is the sample proportion of the missing feature "income" (left branch), 0.1 is the predicted value of "age=18", 80 / 100 is the sample proportion of the missing feature "income" (right branch), and 0.3 is the predicted value of "height=160".

[0284] Continuing with the above example, through the above decision tree model f, determine the predicted value corresponding to the feature subset C {height = 160}, that is, calculate the value of f({height = 160}). The missing features in the feature subset C are "income" and "age". The value of f({height = 160}) is estimated as follows: the feature subset C is missing at the "age" node, and both the left and right branches corresponding to the "age" node should be considered, that is, 0.1*(20 / 40)+0.2*(20 / 40)=0 .15; that is, the value returned by the age branch upward ("income" node) is 0.15; at the "height" node, the normal value is 0.3, that is, the right branch of "height", the value returned by the upward ("income" node) is 0.3; at the "income" node, both the left and right branches must be considered, that is, 0.15*(20 / 100)+0.3*(80 / 100)=0.03+0.24=0.27; therefore, f({height=160})=0.27.

[0285] In combination with the above-mentioned estimation function applicable to the tree model, the estimated value of the feature subset included in the feature set of the sample can be obtained. In order to apply the estimation function of the tree model to the federated tree model scenario, the features contained in the sample corresponding to the federated tree model can be adjusted, and a pseudo-tree model can be constructed through the adjusted features. The aforementioned estimation function applied to the tree model is called to determine the estimated value of each feature subset, thereby determining the contribution of each feature to the prediction result of the sample.

[0286] Next, see Fig.18 , Fig.18 is a flow chart of the data processing method of the federated tree model provided in the embodiment of the present application, combined with Fig.18The data processing method of the federal tree model provided in the embodiment of the present application is described.

[0287] In step 401, the first participant counts the number of first features in the sample to be explained and the number of second participants participating in the modeling of the federated tree model.

[0288] In actual implementation, for the sake of distinction, the features provided by the Guest can be called the first features, and the features provided by the Host can be called the second features. Assume that there are k (k ≥ 1 and k is an integer) Hosts participating in the modeling of the federated tree model. The Guest treats all the features of the Host (H_0…H_m) as anonymous features, that is, the Guest does not know the specific names of the features of the Host. Anonymous (abbreviated as a) can be used to represent the anonymous features corresponding to the features of the Host, such as a_0_0, a_0_1, a_0_2 represent the first feature of Host_0, the first feature of Host_1, and the first feature of Host_2 respectively. The Guest has features G_0, G_1…G_n, a_0_0, a_0_1…a_k_(m_k), a total of n+m_0+m_1+...+m_k features.

[0289] In step 402, the first participant sends an anonymous feature acquisition request to the second participant, so that the second participant returns the anonymous features corresponding to each sample to be interpreted and the routing information corresponding to the anonymous features according to the anonymous feature acquisition request.

[0290] In actual implementation, the first participant sends an anonymous feature acquisition request to each second participant, and receives the anonymous feature returned by the second participant and the routing information corresponding to the anonymous feature.

[0291] In actual implementation, after receiving the anonymous feature acquisition request sent by the first participant, each second participant can obtain the routing information corresponding to each second feature in the sample to be interpreted, which can be recorded as: X0_route = [result_0, result_1, ..., result_k-1], X1_route = [result_0, result_1, ..., result_k-1], X0_route represents the routing information returned by each host party in sample X0. The specific implementation process of the second participant obtaining the routing information is as follows:

[0292] start{

[0293] Input samples X0, X1…Xn on the Host side

[0294] For sample X iin[X0, X1…Xn]

[0295] Initialize the routing result record result = {}, the record table is empty

[0296] Initialize anonymous feature relationship record table anonymous = {}, the record table is empty

[0297] Execution: Traverse each tree in the tree model, the current tree number is t

[0298] Initialize result[t] = {}

[0299] Traverse each node in the tree, the current node is numbered n

[0300] Determine whether the node belongs to the current host.

[0301] If the node belongs to the current host,

[0302] Then continue to judge whether the sample X_i goes left or right at this node

[0303] If it goes left, record result[t][n]=left

[0304] Otherwise, record result[t][n] = right

[0305] Record the anonymous anonymous_ corresponding to the split feature of the node:

[0306] anonymous[t][n]=anonymous_name

[0307] }End, route extraction is completed, each host sends the result to the guest and sends the anonymous feature relationship record table anonymous.

[0308] For example, anonymous[t][n]=anonymous_name, the feature used by this node is H_0, the corresponding anonymity is a_j_0, and anonymous[t][n]=a_j_0.

[0309] In step 403, the first participant constructs a pseudo-tree model corresponding to the sample locally according to the first features included in the sample, the anonymous features provided by the second participants, and the routing information corresponding to the anonymous features.

[0310] In actual implementation, for a single training sample, the known information of the guest includes n first features, k anonymous features, and routing information corresponding to each anonymous feature. The guest can build a pseudo-tree model based on the known information of the above sample, and the pseudo-tree model is used to determine the estimated value of each feature subset included in the feature set of the sample.

[0311] In actual implementation, under the vertical federated tree model, each participant has a complete tree model structure, but the information in the tree node (features, split values) is only available to the owner. Therefore, on the Guest side, the node content of the Host side is empty, and the Guest only has information about its own nodes and leaf nodes. In order to use the estimation function of the aforementioned tree model, the Guest can build a pseudo-tree model for the sample by using the routing information provided by the Host, so that the estimation function of the aforementioned tree model can run smoothly.

[0312] In actual implementation, assume the input sample X_0, the guest original tree model, the host route X0_route = [result_0, result_1, ..., result_k], and the anonymous relationship record table. First, the sample X_0 only has the guest feature, which is the extended feature of X_0. There are m_0+m_1+...+m_k anonymous features here. Anonymous features a_0_0...a_k_(m_k) are added to X_0 according to the anonymous rule, and the feature values ​​of the anonymous features are all 1.

[0313] The pseudo code for the first participant to implement the pseudo tree model is as follows:

[0314] Start {For each tree of Guest,

[0315] Execution: Traverse each node

[0316] If the node belongs to the guest, skip

[0317] If the node belongs to a host_m_k

[0318] Then replace t of the node with a_k_(m_k)

[0319] Query the routing direction corresponding to a_k_(m_k) from the routing table result_i. If the routing direction is left

[0320] Then you can replace the separator value in d with 1.5

[0321] If the routing direction is right,

[0322] Then you can replace the separator value in d with 0.5

[0323] }End, the first participant completes the construction of the pseudo-tree model according to the above implementation process, and returns the expanded sample X_0 and the pseudo-tree model. Here, the expanded sample can be understood as the sample's features including the first feature and various anonymous features.

[0324] For example, Fig.19 is a schematic diagram of a pseudo-tree model construction method provided in an embodiment of the present application, see Fig.19 , for the sample to be explained H{Guest:age=10Host1:height=160Host2:weight=60}, age is a feature provided by the guest, height and weight are features provided by the host. In the figure, the "height" feature provided by host1 is replaced by a_0_0, and the "weight" feature provided by host2 is replaced by a_0_1. The value of the anonymous feature corresponding to each host is set to "1", such as the anonymous feature a_0_0 corresponding to Host1=1. At the same time, the routing information corresponding to the anonymous feature a_0_0 received by the Guest from the first Host is set to result_0[1]={0:left}, that is, the anonymous feature a_0_0 node should go left. In order to go left at the anonymous feature a_0_0 node when traversing the tree model (assuming that the condition for going left is that the value of the anonymous feature a_0_0 is less than the split value at the anonymous feature a_0_0 node), the split value at the anonymous feature a_0_0 can be set to 1.5 (as long as it is greater than 1). Similarly, since the anonymous feature a_0_1 is set to 1, and the routing information corresponding to the anonymous feature a_0_1 received by the Guest from the second Host is result_1[1]={1:right}, that is, the anonymous feature a_0_1 node should go right. In order to go right at the anonymous feature a_0_1=1 (assuming that the condition for setting the right is that the value of the anonymous feature a_0_1 is greater than the split value at the anonymous feature a_0_1 node), the split value at the anonymous feature a_0_0 can be set to 0.5. In this way, when using anonymous features for prediction in the pseudo-tree model, the federated prediction behavior can be simulated.

[0325] In step 404, the first participant combines the first features and anonymous features included in the sample to obtain multiple feature subsets, and determines the prediction value corresponding to each feature subset through the pseudo-tree model corresponding to the sample.

[0326] In actual implementation, the features provided by the Guest in each sample to be interpreted X0, X1...Xn and the anonymous features corresponding to each Host are combined to form an extended sample X0', X1',..., Xn' corresponding to the sample to be interpreted, and all feature subsets of the extended sample are obtained. A pseudo-tree model corresponding to the sample is created through step 403 to determine the prediction value corresponding to each feature subset. The implementation process of obtaining the prediction value of the feature subset through the pseudo-tree model is as follows: receive the features provided by the Guest of a single sample to be interpreted, the pseudo-tree model corresponding to the sample, and all enumerated feature subsets as input, for each feature subset: for each tree in the pseudo-tree model, input the features provided by the Guest, the corresponding tree, and the feature subset S into the tree model estimation function; the pseudo-tree contains the vectors required to run the tree model estimation function The results of each run are summed up to get the score of the feature subset.

[0327] In step 405, the first participant determines the marginal contribution value of each feature in the feature subset that does not include itself, adds up the multiple marginal contribution values ​​corresponding to the feature to obtain the total contribution value of the feature, and uses the total contribution value as the contribution information of the feature to the sample prediction result.

[0328] In actual implementation, for the sample to be explained, after scoring each feature subset in step 404 (i.e. obtaining the estimated value corresponding to each feature subset), according to the above formula (1):

[0329]

[0330] Determine the contribution information of each feature to the prediction result of the sample. When the feature is provided by the Guest, the contribution information obtained is used to represent the contribution information of the feature itself to the sample prediction result; when the feature is an anonymous feature corresponding to the Host, the contribution information obtained is used to represent the contribution information of each anonymous feature to the sample prediction result.

[0331] In actual implementation, the guest obtains the SHAP value of each feature provided by the guest for each sample and the SHAP value corresponding to each anonymous feature of the host through step 405. The host does not obtain any results.

[0332] In step 406, the first participant combines the first feature and each anonymous feature in the sample to be interpreted to obtain a feature interaction group, determines at least one interaction marginal contribution value corresponding to the feature interaction group, and adds each interaction marginal contribution value to obtain the interaction contribution corresponding to the feature interaction group.

[0333] In actual implementation, after the first participant calculates the contribution information of each first feature in the sample to be explained and the contribution information of each anonymous feature through the above steps 401 to 405, the above formula (3) can be used:

[0334]

[0335] δ i,j =f x (S∪{i,j})-f x (S∪{i})-f x (S∪{j})+f x (S)

[0336] Determine the interactive contribution value between any two features in the sample to be explained. Among them, S represents any subset that does not contain i and j, S∪{i, j} represents a feature subset containing features i and j, S∪{i} represents a feature subset containing feature i, S∪{j} represents a feature subset containing feature j, and f x is the estimation function corresponding to the federated tree model, which is used to determine the predicted value of each feature subset.

[0337] In the embodiment of the present application, the Guest obtains the routing information of all samples to be interpreted from the Host through one communication, and constructs a pseudo-tree model corresponding to the federated tree model locally on the Guest. The prediction of all feature subsets can be completed locally in parallel without the need for a complex federated learning prediction process, which greatly reduces the amount of communication. This makes it practical to use a tree algorithm to interpret multiple samples and measure contribution functions in a federated scenario, and provides an explanation of a single sample, supplementing the deficiencies in the federated scenario. At the same time, it can measure the contribution information of each feature of the Host. In addition, it can also provide an explanation of the contribution of each feature in the sample to be interpreted while protecting the data privacy of each participant, and can provide the function of interactive analysis of features for modelers.

[0338] The following is a description of an exemplary structure of a data processing device 555 of a federated tree model provided in an embodiment of the present application implemented as a software module. In some embodiments, Figure 2A As shown, Figure 2A The diagram shows a schematic diagram of the structure of the first participant device 400 provided in an embodiment of the present application. The software modules in the data processing device 555 of the federated tree model stored in the memory 540 may include:

[0339] An acquisition module 5551 is used to acquire a first node route of a target node in the federated tree model, where the target node corresponds to at least two first features provided by the first participant device;

[0340] The receiving module 5552 is used to receive at least one anonymous feature sent by the second participant device, and a second node route corresponding to each of the anonymous features; wherein the anonymous feature corresponds to the second feature used to train the federated tree model, and the second node route is used to indicate a child node path corresponding to the split node when the anonymous feature is used as a split node of the federated tree model;

[0341] The simulation module 5553 is used to simulate the federated tree model based on the first node routing and the second node routing to obtain a pseudo federated tree model corresponding to the federated tree model, and predict a feature subset included in a feature set used as a training sample of the federated tree model through the pseudo federated tree model to obtain a corresponding prediction value; wherein the feature set includes: the at least two first features carrying a target prediction result, and the second feature provided by at least one of the second participant devices;

[0342] The determination module 5554 is used to determine the contribution information of each feature in the feature set corresponding to the target prediction result in combination with the prediction value and the target prediction result.

[0343] In some embodiments, the receiving module is also used to send an anonymous feature acquisition request carrying a sample identifier to the second participant device; wherein the anonymous feature acquisition request is used for the second participant device to respond to the anonymous feature acquisition request, determine the second feature corresponding to the sample identifier, the anonymous feature corresponding to the second feature, and the second node route corresponding to the anonymous feature; and receive the anonymous feature corresponding to the sample identifier and the second node route corresponding to the anonymous feature returned by the second participant device.

[0344] In some embodiments, the receiving module is further used to locally create an anonymous relationship record table, wherein the anonymous relationship record table is used to record the sample identification of the training sample used to train the federated tree model, the anonymous feature of the second participant device corresponding to the sample identification, and the second node route corresponding to the anonymous feature; and the received anonymous feature corresponding to the sample identification and the second node route corresponding to the anonymous feature are stored in the anonymous relationship record table.

[0345] In some embodiments, the determination module is also used to select at least two features from at least two first features provided by the first participant device and at least one second feature provided by the second participant device; construct a feature interaction group including the at least two features, and determine at least one interaction marginal contribution value corresponding to the feature interaction group; based on the at least one interaction marginal contribution value, determine the interaction contribution information of the feature interaction group corresponding to the target prediction result.

[0346] In some embodiments, the determination module is also used to determine a first feature subset of the feature set, the first feature subset including at least one of the at least two features; determine a second feature subset of the feature set, the second feature subset and the feature interaction group being complementary; obtain the predicted value corresponding to the first feature subset and the predicted value corresponding to the second feature subset, and determine the interaction marginal contribution value corresponding to the feature interaction group based on the predicted value corresponding to the first feature subset and the predicted value corresponding to the second feature subset.

[0347] In some embodiments, the determination module is further used to sum up the multiple interaction marginal contribution values ​​when there are multiple interaction marginal contribution values, so as to obtain the interaction contribution information of the feature interaction group corresponding to the target prediction result.

[0348] In some embodiments, Figure 2B As shown, Figure 2B The diagram shows a schematic diagram of the structure of the second participant device 410 provided in an embodiment of the present application. The software modules stored in the data processing device 555 of the federated tree model of the memory 540 may include:

[0349] A generating module 5555 is used to generate anonymous features corresponding to each second feature used for training the federated tree model, and obtain a second node route corresponding to each anonymous feature; the second node route is used to indicate a child node path corresponding to the split node when the anonymous feature is used as a split node of the federated tree model;

[0350] A sending module 5556 is used to send the anonymous features corresponding to each of the second features, and the second node routes corresponding to each of the anonymous features to the first participant device; wherein the second node routes are used for the first participant device to obtain the pseudo-federal tree model corresponding to the federated tree model based on the second node routes, and determine the contribution information of each feature in the feature set corresponding to the target prediction result through the pseudo-federal tree model; wherein the feature set is used as a training sample of the federated tree model, including: at least two first features carrying the target prediction results provided by the first participant device, and at least one of the second features.

[0351] In some embodiments, the sending module is also used to receive an anonymous feature acquisition request carrying a sample identifier sent by the first participant device; parse the anonymous feature acquisition request to obtain the sample identifier; determine the second feature corresponding to the sample identifier, the anonymous feature corresponding to the second feature, and the second node route corresponding to the anonymous feature; and send the anonymous feature and the second node route to the first participant device.

[0352] In some embodiments, the sending module is also used to search the local anonymous relationship record table according to the sample identification to obtain the second feature corresponding to the sample identification, the anonymous feature corresponding to the second feature, and the second route corresponding to the anonymous feature; wherein the anonymous relationship record table is used to record the sample identification of the training sample used to train the federated tree model, the second feature corresponding to the sample identification, the anonymous feature corresponding to the second feature, and the second node route corresponding to the anonymous feature.

[0353] In some embodiments, the generation module is further used to perform hash processing on each second feature used to train the federated tree model, obtain a hash value corresponding to each second feature, and use the hash value as an anonymous feature corresponding to the second feature.

[0354] It should be noted that the description of the device of the embodiment of the present application is similar to the description of the above-mentioned method embodiment, and has similar beneficial effects as the method embodiment, so it will not be repeated.

[0355] An embodiment of the present application provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, the data processing method of the federated tree model provided in the embodiment of the present application is implemented.

[0356] The present application embodiment provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will be caused to execute the method provided by the present application embodiment, for example, Figure 3 The data processing method of the federated tree model is shown.

[0357] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0358] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0359] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0360] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0361] In summary, through the embodiment of the present application, the prediction value corresponding to each feature subset of the sample can be determined through the pseudo-federal tree model constructed by the first participant, thereby determining the contribution information of each feature to the target prediction result. At the same time, the first participant can obtain the node routes of the corresponding anonymous features of all samples to be explained from each host party through a single routing acquisition request, and construct a pseudo-tree model corresponding to the federal tree model locally on the first participant. The prediction of all feature subsets can be completed locally in parallel without the need for a complex federated learning prediction process, which greatly reduces the amount of communication, making the use of tree algorithms in federated scenarios to explain multiple samples and measure contribution functions have practical value, and provides a single sample explanation, supplementing the deficiencies in the federated scenario; at the same time, it can measure the feature contribution information of each host party, and in addition, it can also measure the importance of global features.

[0362] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A data processing method for a federated tree model, characterized in that: Applied to the field of financial risk control, based on a federated learning system, the federated learning system includes a first participant device and at least one second participant device, the participant device is a participant device of each bank or financial institution storing user feature data, the method is applied to the first participant device, the method includes: Acquire a first node route of a target node in the federated tree model, wherein the target node corresponds to at least two first features provided by the first participant device; receiving at least one anonymous feature sent by the second participant device, and a second node route corresponding to each of the anonymous features; The receiving of at least one anonymous feature sent by the second participant device and a second node route corresponding to each of the anonymous features includes: Sending an anonymous feature acquisition request carrying a sample identifier to the second participant device; The anonymous feature acquisition request is used for the second participant device to respond to the anonymous feature acquisition request to determine the second feature corresponding to the sample identifier, the anonymous feature corresponding to the second feature, and the second node route corresponding to the anonymous feature; receiving the anonymous feature corresponding to the sample identifier and the second node route corresponding to the anonymous feature returned by the second participant device; The anonymous feature corresponds to a second feature used to train the federated tree model, and the second node routing is used to indicate a sub-node path corresponding to the split node when the anonymous feature is used as a split node of the federated tree model; Simulating the federated tree model based on the first node route and the second node route to obtain a pseudo federated tree model corresponding to the federated tree model, and predicting a feature subset included in a feature set of training samples used as the federated tree model by using the pseudo federated tree model to obtain a corresponding prediction value, wherein the feature set of the training samples includes income, age, and height; The feature set includes: the at least two first features carrying the target prediction result, and the second feature provided by at least one of the second participant devices; In combination with the predicted value and the target prediction result, contribution information of each feature in the feature set corresponding to the target prediction result is determined.

2. The method according to claim 1, characterized in that The method further comprises: Creating an anonymous relationship record table locally, the anonymous relationship record table being used to record the sample identifier of the training sample used to train the federated tree model, the anonymous feature of the second participant device corresponding to the sample identifier, and the second node route corresponding to the anonymous feature; The received anonymous feature corresponding to the sample identifier and the second node route corresponding to the anonymous feature are stored in the anonymous relationship record table.

3. The method according to claim 1, characterized in that After determining the contribution information of each feature in the feature set corresponding to the target prediction result, the method further includes: Selecting at least two features from at least two first features provided by the first participant device and at least one second feature provided by the second participant device; Constructing a feature interaction group including the at least two features, and determining at least one interaction marginal contribution value corresponding to the feature interaction group; Based on the at least one interaction marginal contribution value, interaction contribution information of the feature interaction group corresponding to the target prediction result is determined.

4. The method according to claim 3, characterized in that The determining the interaction marginal contribution value corresponding to the feature interaction group includes: determining a first feature subset of the feature set, the first feature subset including at least one of the at least two features; Determine a second feature subset of the feature set, wherein the second feature subset is in a complementary relationship with the feature interaction group; The predicted value corresponding to the first feature subset and the predicted value corresponding to the second feature subset are obtained, and based on the predicted value corresponding to the first feature subset and the predicted value corresponding to the second feature subset, the interactive marginal contribution value corresponding to the feature interaction group is determined.

5. The method according to claim 3, characterized in that: The determining, based on the at least one interaction marginal contribution value, interaction contribution information of the feature interaction group corresponding to the target prediction result includes: When there are multiple interaction marginal contribution values, the multiple interaction marginal contribution values ​​are summed to obtain the interaction contribution information of the feature interaction group corresponding to the target prediction result.

6. A data processing method for a federated tree model, characterized in that: Applied to the field of financial risk control, based on a federated learning system, the federated learning system includes a first participant device and at least one second participant device, the participant device is a participant device of each bank or financial institution storing user feature data, the method is applied to the second participant device, the method includes: For each second feature used to train the federated tree model, generate an anonymous feature corresponding to each second feature, and obtain a second node route corresponding to each anonymous feature; The second node route is used to indicate a sub-node path corresponding to the split node when the anonymous feature is used as the split node of the federated tree model; Sending the anonymous features corresponding to each of the second features and the second node routing corresponding to each of the anonymous features to the first participant device; The sending of the anonymous features corresponding to the second features and the second node routing corresponding to the anonymous features to the first participant device includes: Receiving an anonymous feature acquisition request carrying a sample identifier sent by the first participant device; Parsing the anonymous feature acquisition request to obtain the sample identifier; Determine the second feature corresponding to the sample identifier, an anonymous feature corresponding to the second feature, and a second node route corresponding to the anonymous feature; Sending the anonymous feature and the second node route to the first participant device; The second node routing is used for the first participant device to obtain a pseudo federated tree model corresponding to the federated tree model based on the second node routing, and to determine contribution information of each feature in the feature set corresponding to the target prediction result through the pseudo federated tree model; Among them, the feature set is used as a training sample of the federated tree model, including: at least two first features carrying target prediction results provided by the first participant device, and at least one second feature, and the feature set of the training sample includes income, age and height.

7. The method according to claim 6, characterized in that The determining the second feature corresponding to the sample identifier, the anonymous feature corresponding to the second feature, and the second node route corresponding to the anonymous feature includes: According to the sample identifier, searching the local anonymous relationship record table to obtain a second feature corresponding to the sample identifier, an anonymous feature corresponding to the second feature, and a second route corresponding to the anonymous feature; The anonymous relationship record table is used to record the sample identifier of the training sample used to train the federated tree model, the second feature corresponding to the sample identifier, the anonymous feature corresponding to the second feature, and the second node route corresponding to the anonymous feature.

8. The method according to claim 6, characterized in that The step of generating anonymous features corresponding to the second features for training the federated tree model comprises: Hash processing is performed on each second feature used to train the federated tree model to obtain a hash value corresponding to each second feature, and the hash value is used as an anonymous feature corresponding to the second feature.

9. A data processing device for a federated tree model, characterized in that: Applied in the field of financial risk control, including: an acquisition module, configured to acquire a first node route of a target node in the federated tree model, wherein the target node corresponds to at least two first features provided by a first participant device, wherein the participant device is a participant device of each bank or financial institution storing user feature data; A receiving module, used to receive at least one anonymous feature sent by a second participant device, and a second node route corresponding to each of the anonymous features; wherein the anonymous feature corresponds to a second feature used to train the federated tree model, and the second node route is used to indicate a sub-node path corresponding to the split node when the anonymous feature is used as a split node of the federated tree model, and the receiving module is specifically used to send an anonymous feature acquisition request carrying a sample identifier to the second participant device; wherein the anonymous feature acquisition request is used for the second participant device to respond to the anonymous feature acquisition request, determine the second feature corresponding to the sample identifier, the anonymous feature corresponding to the second feature, and the second node route corresponding to the anonymous feature; and receive the anonymous feature corresponding to the sample identifier and the second node route corresponding to the anonymous feature returned by the second participant device; a simulation module, configured to simulate the federated tree model based on the first node routing and the second node routing, obtain a pseudo federated tree model corresponding to the federated tree model, and predict a feature subset included in a feature set used as a training sample of the federated tree model through the pseudo federated tree model to obtain a corresponding prediction value; wherein the feature set includes: the at least two first features carrying a target prediction result, and the second feature provided by at least one of the second participant devices; A determination module is used to determine the contribution information of each feature in the feature set corresponding to the target prediction result in combination with the prediction value and the target prediction result.

10. An electronic device, characterized in that: include: A memory for storing executable instructions; A processor, used to implement the data processing method of the federated tree model described in any one of claims 1 to 8 when executing the executable instructions stored in the memory.

11. A computer-readable storage medium, characterized in that: Executable instructions are stored, which are used to implement the data processing method of the federated tree model described in any one of claims 1 to 8 when executed by a processor.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the data processing method of the federated tree model described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Federation transfer learning data processing method, device and equipment and storage medium

    CN112381236A

  • Federal learning-based model updating method and device and storage medium

    CN113255935A