A model early warning method and system for a multi-party joint online modeling platform
By filtering and replacing model parameters in the federated learning platform, identifying and warning of abnormal nodes, the problem of the impact of malicious nodes in federated learning is solved, data privacy and security are improved, and the stability and efficiency of model training are ensured.
Patent Information
- Application Number
- CN202410905142.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-07-08
AI Technical Summary
During the federated learning process, how to effectively warn and identify abnormal situations to prevent the adverse impact of malicious nodes on model training, especially in scenarios where data privacy and security requirements are high.
In the multi-party joint online modeling platform, based on the reference model and reference sample data set, the target node is determined from multiple nodes, the initial model training and parameter collection are carried out, and the trusted nodes are selected based on the confidence threshold to trigger an early warning. And replace the model parameters to ensure the safety of subsequent training.
It realizes early warning of suspicious situations in the federated learning process, reduces the risk of malicious nodes training on model, improves data privacy and security, and ensures the stability and efficiency of model training.
Smart Images

Figure CN118445707B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a model early warning method and system for a multi-party joint online modeling platform. Background Art
[0002] As a strategic and basic resource today, data is an important driving force for technological innovation, demand mining, and efficiency improvement in the digital economy. However, some data can only be stored and used within a certain domain because it involves personal privacy or industry secrets, so the data cannot be fully mined and utilized.
[0003] Federated learning plays a very important role in breaking through data silos. Each data provider models and trains data through federated learning, fully tapping the potential value of data while effectively preventing the catastrophic consequences of data leakage.
[0004] How to provide early warning for abnormal situations in the federated learning process is a hot topic of research. Summary of the invention
[0005] The embodiment of the present application provides a model early warning method and system for a multi-party joint online modeling platform, which can warn of abnormal situations in the federated learning process. The technical solution is as follows:
[0006] On the one hand, a model early warning method for a multi-party joint online modeling platform is provided, the method comprising:
[0007] Based on the reference model and the reference sample data set, determining a plurality of target nodes from a plurality of nodes, wherein the target nodes are nodes that meet preset conditions;
[0008] Sending the initial model to be trained to the multiple target nodes, so that each of the target nodes deploys the initial model and performs a first round of training on the initial model based on sample data on each target node, wherein the parameter amount of the initial model is greater than that of the reference model, and the trained initial model is used to predict the object risk value corresponding to the object information based on the input object information;
[0009] Obtaining a first model parameter and a first model hyperparameter returned by each of the target nodes, wherein the first model parameter is a model parameter of the initial model after the corresponding target node completes a first round of training on the initial model, and the first model hyperparameter is a model hyperparameter used when the corresponding target node performs a first round of training on the initial model;
[0010] Based on the initial model, the first model parameters and the first model hyperparameters returned by each of the target nodes, determining a plurality of trusted nodes from the plurality of target nodes, the trusted nodes being target nodes whose trustworthiness is higher than a trustworthiness threshold;
[0011] Trigger early warning information for suspicious nodes and determine target model parameters after a first round of training based on the first model parameters returned by the multiple trusted nodes, and send the target model parameters to the multiple target nodes so that each of the target nodes adopts the target model parameters to replace the model parameters of the initial model after the first round of training. The suspicious nodes are target nodes among the multiple target nodes other than the multiple trusted nodes.
[0012] In a possible implementation manner, the determining of multiple target nodes from multiple nodes based on the reference model and the reference sample data set includes:
[0013] Sending the reference model and the reference sample data set to multiple nodes, and each of the nodes training the reference model for a preset number of rounds based on the reference sample data set to obtain a trained reference model;
[0014] Obtain reference model parameters, reference model hyperparameters, and reference training duration returned by each of the nodes, wherein the reference model parameters are model parameters of the reference model after training of the corresponding node, the reference model hyperparameters are model hyperparameters used when the corresponding node trains the reference model, and the reference training duration is the duration consumed by the corresponding node to train the reference model;
[0015] Based on the initial reference model parameters of the reference model, the reference model parameters returned by each of the nodes, the reference model hyperparameters and the reference training duration, the multiple target nodes are determined from the multiple nodes.
[0016] In a possible implementation, determining the multiple target nodes from the multiple nodes based on the initial reference model parameters of the reference model, the reference model parameters returned by each of the nodes, the reference model hyperparameters, and the reference training duration includes:
[0017] Determine the training effect parameters of each of the nodes based on the initial reference model parameters of the reference model, the reference model parameters returned by each of the nodes, and the reference model hyperparameters;
[0018] Determining a training efficiency parameter of each of the nodes based on an initial reference model parameter of the reference model, a reference model parameter returned by each of the nodes, and a reference training duration;
[0019] Based on the training effect parameters and the training efficiency parameters of each of the nodes, the plurality of target nodes are determined from the plurality of nodes.
[0020] In a possible implementation, determining the multiple target nodes from the multiple nodes based on the training effect parameter and the training efficiency parameter of each of the nodes includes:
[0021] The training effect parameters and the training efficiency parameters of each of the nodes are integrated to obtain a node evaluation score of each of the nodes;
[0022] N nodes with the highest node evaluation scores among the multiple nodes are determined as the multiple target nodes, where N is a positive integer.
[0023] In a possible implementation, determining a plurality of trusted nodes from the plurality of target nodes based on the initial model, the first model parameters and the first model hyperparameters returned by each of the target nodes includes:
[0024] Determine a first credible parameter of each of the target nodes based on the initial model and the first model parameter returned by each of the target nodes;
[0025] Determine a second credible parameter of each of the target nodes based on the initial model parameters of the initial model, the first model parameters returned by each of the target nodes, and the first model hyperparameters;
[0026] Based on the first trusted parameter and the second trusted parameter of each of the target nodes, a plurality of trusted nodes are determined from the plurality of target nodes.
[0027] In a possible implementation, determining the first credible parameter of each target node based on the initial model and the first model parameter returned by each target node includes:
[0028] Inputting the evaluation object data into the initial model, and having the initial model make predictions based on the evaluation object data to output a first prediction object risk value;
[0029] For any target node among the multiple target nodes, the initial model is updated using the first model parameter returned by the target node to obtain an evaluation model corresponding to the target node;
[0030] Inputting the evaluation object data into the evaluation model, and the evaluation model performs prediction based on the evaluation object data to output a second prediction object risk value;
[0031] A first credible parameter of the target node is determined based on the labeled object risk value of the assessment object data, the first predicted object risk value, and the second predicted object risk value.
[0032] In a possible implementation, determining the second trusted parameter of each of the target nodes based on the initial model parameters of the initial model, the first model parameters returned by each of the target nodes, and the first model hyperparameters includes:
[0033] For any target node among the multiple target nodes, concatenate the initial model parameters of the initial model, the first model parameters returned by the target node, and the first model hyperparameters into credible evaluation parameters;
[0034] The trusted evaluation parameter is input into a trusted evaluation model, and the trusted evaluation model performs multiple convolutions and multiple deconvolutions on the trusted evaluation parameter to obtain a second trusted parameter of the target node.
[0035] In a possible implementation, determining a plurality of trusted nodes from the plurality of target nodes based on the first trusted parameter and the second trusted parameter of each of the target nodes includes:
[0036] The first trusted parameter and the second trusted parameter of each target node are integrated to obtain the trustworthiness of each target node;
[0037] The target nodes whose credibility is higher than the credibility threshold among the multiple target nodes are determined as trusted nodes to obtain the multiple trusted nodes.
[0038] In a possible implementation, after triggering the warning information for the suspicious node and determining the target model parameters after the first round of training based on the first model parameters returned by the multiple trusted nodes, the method further includes:
[0039] When the number of times that any target node triggers warning information reaches a preset number, the target node is eliminated and another target node is determined from the multiple nodes to participate in the training of the initial model.
[0040] On the one hand, a model early warning device for a multi-party joint online modeling platform is provided, the device comprising:
[0041] A target node determination module, used to determine a plurality of target nodes from a plurality of nodes based on a reference model and a reference sample data set, wherein the target nodes are nodes that meet preset conditions;
[0042] A sending module, used for sending the initial model to be trained to the multiple target nodes, so that each of the target nodes deploys the initial model and performs a first round of training on the initial model based on sample data on each target node, the parameter amount of the initial model is greater than that of the reference model, and the trained initial model is used to predict the object risk value corresponding to the object information based on the input object information;
[0043] An acquisition module, used to acquire first model parameters and first model hyperparameters returned by each of the target nodes, wherein the first model parameters are model parameters of the initial model after the corresponding target node completes the first round of training of the initial model, and the first model hyperparameters are model hyperparameters used when the corresponding target node performs the first round of training on the initial model;
[0044] A trusted node determination module, configured to determine a plurality of trusted nodes from the plurality of target nodes based on the initial model, the first model parameters and the first model hyperparameters returned by each of the target nodes, wherein the trusted nodes are target nodes whose trustworthiness is higher than a trustworthiness threshold;
[0045] A trigger module is used to trigger early warning information for suspicious nodes and determine the target model parameters after the first round of training based on the first model parameters returned by the multiple trusted nodes, and send the target model parameters to the multiple target nodes so that each of the target nodes adopts the target model parameters to replace the model parameters of the initial model after the first round of training. The suspicious node is a target node among the multiple target nodes except the multiple trusted nodes.
[0046] In a possible implementation, the target node determination module is used to send the reference model and the reference sample data set to multiple nodes, and each of the nodes trains the reference model for a preset number of rounds based on the reference sample data set to obtain a trained reference model; obtain reference model parameters, reference model hyperparameters, and reference training duration returned by each of the nodes, the reference model parameters being model parameters of the reference model after training of the corresponding node, the reference model hyperparameters being model hyperparameters used when the corresponding node trains the reference model, and the reference training duration being the duration spent by the corresponding node to train the reference model; determine the multiple target nodes from the multiple nodes based on the initial reference model parameters of the reference model, the reference model parameters, reference model hyperparameters, and reference training duration returned by each of the nodes.
[0047] In one possible implementation, the target node determination module is used to determine the training effect parameters of each of the nodes based on the initial reference model parameters of the reference model, the reference model parameters returned by each of the nodes, and the reference model hyperparameters; determine the training efficiency parameters of each of the nodes based on the initial reference model parameters of the reference model, the reference model parameters returned by each of the nodes, and the reference training duration; and determine the multiple target nodes from the multiple nodes based on the training effect parameters and the training efficiency parameters of each of the nodes.
[0048] In a possible implementation, the target node determination module is used to fuse the training effect parameters and the training efficiency parameters of each of the nodes to obtain a node evaluation score of each of the nodes; and determine the N nodes with the highest node evaluation scores among the multiple nodes as the multiple target nodes, where N is a positive integer.
[0049] In one possible implementation, the trusted node determination module is used to determine the first trusted parameter of each target node based on the initial model and the first model parameter returned by each target node; determine the second trusted parameter of each target node based on the initial model parameters of the initial model, the first model parameter returned by each target node and the first model hyperparameter; and determine multiple trusted nodes from the multiple target nodes based on the first trusted parameter and the second trusted parameter of each target node.
[0050] In one possible implementation, the trusted node determination module is used to input the evaluation object data into the initial model, and the initial model predicts based on the evaluation object data to output a first predicted object risk value; for any target node among the multiple target nodes, the initial model is updated using the first model parameter returned by the target node to obtain the evaluation model corresponding to the target node; the evaluation object data is input into the evaluation model, and the evaluation model predicts based on the evaluation object data to output a second predicted object risk value; based on the labeled object risk value of the evaluation object data, the first predicted object risk value and the second predicted object risk value, the first trusted parameter of the target node is determined.
[0051] In a possible implementation, the trusted node determination module is used to, for any target node among the multiple target nodes, concatenate the initial model parameters of the initial model, the first model parameters returned by the target node, and the first model hyperparameters into trusted evaluation parameters; input the trusted evaluation parameters into a trusted evaluation model, and the trusted evaluation model performs multiple convolutions and multiple deconvolutions on the trusted evaluation parameters to obtain second trusted parameters of the target node.
[0052] In a possible implementation, the trusted node determination module is used to fuse the first trusted parameter and the second trusted parameter of each of the target nodes to obtain the credibility of each of the target nodes; and determine the target nodes among the multiple target nodes whose credibility is higher than the credibility threshold as trusted nodes to obtain the multiple trusted nodes.
[0053] In a possible implementation, the device also includes a node replacement module, which is used to eliminate the target node and determine another target node from the multiple nodes to participate in the training of the initial model when the number of times any target node triggers warning information reaches a preset number of times.
[0054] In one aspect, a model early warning system for a multi-party joint online modeling platform is provided, the system comprising: a server and a plurality of nodes;
[0055] The server is used to determine a plurality of target nodes from the plurality of nodes based on a reference model and a reference sample data set, wherein the target nodes are nodes that meet preset conditions;
[0056] The server is further used to send the initial model to be trained to the multiple target nodes, so that each of the target nodes deploys the initial model and performs a first round of training on the initial model based on sample data on each target node, the parameter amount of the initial model is greater than that of the reference model, and the trained initial model is used to predict the object risk value corresponding to the object information based on the input object information;
[0057] The server is further used to obtain the first model parameters and the first model hyperparameters returned by each of the target nodes, wherein the first model parameters are the model parameters of the initial model after the corresponding target node completes the first round of training on the initial model, and the first model hyperparameters are the model hyperparameters used when the corresponding target node performs the first round of training on the initial model;
[0058] The server is further configured to determine a plurality of trusted nodes from the plurality of target nodes based on the initial model, the first model parameters and the first model hyperparameters returned by each of the target nodes, wherein the trusted nodes are target nodes whose trustworthiness is higher than a trustworthiness threshold;
[0059] The server is also used to trigger early warning information for suspicious nodes and determine the target model parameters after the first round of training based on the first model parameters returned by the multiple trusted nodes, and send the target model parameters to the multiple target nodes so that each of the target nodes adopts the target model parameters to replace the model parameters of the initial model after the first round of training. The suspicious node is a target node among the multiple target nodes other than the multiple trusted nodes.
[0060] On the one hand, a computer device is provided, which includes one or more processors and one or more memories, wherein at least one computer program is stored in the one or more memories, and the computer program is loaded and executed by the one or more processors to implement the model warning method for the multi-party joint online modeling platform.
[0061] On the one hand, a computer-readable storage medium is provided, in which at least one computer program is stored, and the computer program is loaded and executed by a processor to implement the model early warning method for a multi-party joint online modeling platform.
[0062] On the one hand, a computer program product or a computer program is provided, which includes a program code, and the program code is stored in a computer-readable storage medium. A processor of a computer device reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the computer device executes the above-mentioned model warning method for a multi-party joint online modeling platform.
[0063] Through the technical solution provided by the embodiment of the present application, multiple target nodes are determined from multiple nodes based on a reference model and a reference sample data set. The initial model to be trained is sent to multiple target nodes, and the sample data on the multiple target nodes is used to train the initial model, and the first model parameters and first model hyperparameters returned by each target node are obtained. Using the initial model, the first model parameters and the first model hyperparameters returned by each target node, multiple trusted nodes are determined from multiple target nodes, and the first model parameters of the multiple trusted nodes are used to determine the target model parameters of this round of learning, and the target model parameters are sent to multiple target nodes so that multiple target nodes can perform subsequent rounds of training, thereby achieving early warning of suspicious situations in the federated learning process, while reducing the risk of the federated learning process being affected by malicious nodes. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0065] Figure 1 It is a schematic diagram of an implementation environment of a model early warning method for a multi-party joint online modeling platform provided in an embodiment of the present application;
[0066] Figure 2It is a flow chart of a model early warning method for a multi-party joint online modeling platform provided in an embodiment of the present application;
[0067] Figure 3 It is another flow chart of a model early warning method for a multi-party joint online modeling platform provided in an embodiment of the present application;
[0068] Figure 4 It is a structural schematic diagram of a model early warning device for a multi-party joint online modeling platform provided in an embodiment of the present application;
[0069] Figure 5 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0071] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with basically the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on quantity and execution order.
[0072] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain better results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.
[0073] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0074] Machine Learning (ML) is a multi-disciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge sub-models to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.
[0075] Privacy computing: Privacy computing is a computing theory and method for protecting privacy information throughout its life cycle. It mainly includes describing, measuring, evaluating and integrating the privacy information involved when processing various forms of data (such as video, audio, images, graphics, text, numerical values, network behavior information flow, etc.). In the embodiment of this application, the main means of privacy computing is federated learning.
[0076] Federated Machine Learning: It is a distributed machine learning technology that mainly solves the problem of achieving common model training while protecting data privacy between multiple data sources (usually mobile phones, hospitals, enterprises, etc.). Its core idea is to train the model locally on the client (such as a smartphone) and then send the model update to a central server for aggregation, rather than sharing the data itself, thereby protecting the privacy of users.
[0077] Normalization: Mapping sequences with different value ranges to the interval (0, 1) makes data processing easier. In some cases, the normalized values can be directly implemented as probabilities.
[0078] Embedded Coding: Embedded coding mathematically represents a correspondence, that is, mapping data in X space to Y space through a function F, where the function F is an injective function, and the mapping result is structural preservation. The injective function indicates that the data after mapping is uniquely corresponding to the data before mapping, and structural preservation indicates that the size relationship of the data before mapping is the same as the size relationship of the data after mapping. For example, there are data X1 and X2 before mapping, and after mapping, Y1 corresponding to X1 and Y2 corresponding to X2 are obtained. If the data X1 before mapping is greater than X2, then correspondingly, the data Y1 after mapping is greater than Y2. For words, it means mapping the words to another space to facilitate subsequent machine learning and processing.
[0079] Attention weight: It can indicate the importance of a certain data in the training or prediction process. Importance indicates the influence of input data on output data. Data with high importance has a higher corresponding attention weight value, and data with low importance has a lower corresponding attention weight value. In different scenarios, the importance of data is different. The process of training the attention weight of the model is also the process of determining the importance of data.
[0080] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0081] Figure 1 This is a schematic diagram of the implementation environment of a model early warning method for a multi-party joint online modeling platform provided in an embodiment of the present application, see Figure 1 , the implementation environment may include a node 110 and a server 140 .
[0082] The node 110 is connected to the server 140 via a wireless network or a wired network. Optionally, the node 110 is a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. The node 110 is installed and runs an application that supports model early warning for the multi-party joint online modeling platform.
[0083] Server 140 is 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, distribution networks (Content Delivery Network, CDN) and big data and artificial intelligence platforms. Server 140 can provide background services for applications running on node 110. In the embodiment of the present application, the server is also referred to as an online modeling platform.
[0084] The following is a description of the model early warning method for a multi-party joint online modeling platform provided in an embodiment of the present application. Figure 2 is a flow chart of a model early warning method for a multi-party joint online modeling platform provided in an embodiment of the present application, see Figure 2 Taking the execution subject as a server as an example, the method includes the following steps.
[0085] 201. The server determines a plurality of target nodes from a plurality of nodes based on a reference model and a reference sample data set, where the target nodes are nodes meeting a preset condition.
[0086] Wherein, the reference model and the reference sample data set are both used to screen the target node, the model structure of the reference model and the initial model to be trained belong to the same model architecture, and the model parameters of the reference model are initialized by the server, and the embodiment of the present application does not limit this. The reference sample data set contains a preset number of reference sample data, and the preset number is designed by the technical staff according to the actual situation, and the embodiment of the present application does not limit this. A plurality of nodes are nodes that can participate in the technical solution provided in the embodiment of the present application, and the target node is a node that meets the preset conditions, that is, a node that is screened by the preset conditions, and the preset conditions are set by the technical staff according to the actual situation, or generated by the server, and the embodiment of the present application does not limit this. In the embodiment of the present application, the server is also referred to as an online modeling platform.
[0087] 202. The server sends the initial model to be trained to the multiple target nodes, so that each target node deploys the initial model and performs a first round of training on the initial model based on the sample data on each target node. The parameter amount of the initial model is greater than that of the reference model. The trained initial model is used to predict the object risk value corresponding to the object information based on the input object information.
[0088] Among them, the initial model is also the model to be federated learning. The initial model is a prediction model. After the initial model is trained, the trained initial model can be used to predict the object risk value based on the input object information. In some embodiments, the object refers to the user, and the object information is obtained after the user's permission. The sample data on the target node is the sample data stored locally on the target node. The sample data usually has a certain degree of privacy. In order to avoid the leakage of sample data, the sample data on the target node will not leave the target node during the training of the initial model. The number of parameters of the initial model is greater than that of the reference model, which means that the complexity of the initial model is higher than that of the reference model.
[0089] 203. The server obtains the first model parameters and the first model hyperparameters returned by each target node, where the first model parameters are the model parameters of the initial model after the corresponding target node completes the first round of training for the initial model, and the first model hyperparameters are the model hyperparameters used when the corresponding target node performs the first round of training for the initial model.
[0090] Among them, a target node will return a set of first model parameters and first model hyperparameters. The first model parameters can be regarded as the result of the first round of training of the initial model by the target node. The first model hyperparameters are the model hyperparameters used by the target node when the initial model is trained for the first round, which can reflect the model training strategy of the target node. It should be noted that the target node completes the first round of training for the initial model, which means that the target node uses a batch of sample data to train the initial model. The first round here includes multiple small rounds, and one sample data is used in each small round.
[0091] 204. The server determines a plurality of trusted nodes from the plurality of target nodes based on the initial model, the first model parameters and the first model hyperparameters returned by each target node, wherein the trusted nodes are target nodes whose trustworthiness is higher than a trustworthiness threshold.
[0092] Among them, a trusted node is an electronic device with data processing capabilities, and the trustworthiness of a trusted node is determined based on the historical behavior of the trusted node. In the embodiment of the present application, the historical behavior refers to the last round of training of the initial model. The trustworthiness threshold is set by the technician according to the actual situation, and the embodiment of the present application does not limit this.
[0093] 205. The server triggers early warning information for suspicious nodes and determines the target model parameters after the first round of training based on the first model parameters returned by the multiple trusted nodes, and sends the target model parameters to the multiple target nodes so that each target node adopts the target model parameters to replace the model parameters of the initial model after the first round of training. The suspicious node is a target node among the multiple target nodes other than the multiple trusted nodes.
[0094] Among them, suspicious nodes are nodes that may have malicious intent. Since this application uses federated learning to train the initial model, the presence of malicious nodes may have an adverse effect on the training of the initial model. Therefore, suspicious nodes will be identified in the embodiments of this application. The early warning information for suspicious nodes is to warn technicians and remind them that there may be malicious nodes in the process of training the initial model. The target model parameters can be regarded as the results of the first round of federated learning. After the target model parameters are sent to multiple target nodes, the multiple target nodes can use the target model parameters to update the model parameters of the initial model, so as to carry out the next round of training.
[0095] Through the technical solution provided by the embodiment of the present application, multiple target nodes are determined from multiple nodes based on a reference model and a reference sample data set. The initial model to be trained is sent to multiple target nodes, and the sample data on the multiple target nodes is used to train the initial model, and the first model parameters and first model hyperparameters returned by each target node are obtained. Using the initial model, the first model parameters and the first model hyperparameters returned by each target node, multiple trusted nodes are determined from multiple target nodes, and the first model parameters of the multiple trusted nodes are used to determine the target model parameters of this round of learning, and the target model parameters are sent to multiple target nodes so that multiple target nodes can perform subsequent rounds of training, thereby achieving early warning of suspicious situations in the federated learning process, while reducing the risk of the federated learning process being affected by malicious nodes.
[0096] The above steps 201-205 are a brief introduction to the model early warning method for the multi-party joint online modeling platform provided in the embodiment of the present application. The model early warning method for the multi-party joint online modeling platform provided in the embodiment of the present application will be more clearly explained in combination with some examples. Figure 3 Taking the execution subject as a server as an example, the method includes the following steps.
[0097] 301. The server determines a plurality of target nodes from a plurality of nodes based on a reference model and a reference sample data set, where the target nodes are nodes that meet preset conditions.
[0098] Wherein, the reference model and the reference sample data set are both used to screen the target node, the model structure of the reference model and the initial model to be trained belong to the same model architecture, and the model parameters of the reference model are initialized by the server, and the embodiment of the present application does not limit this. The reference sample data set contains a preset number of reference sample data, and the preset number is designed by the technical staff according to the actual situation, and the embodiment of the present application does not limit this. Multiple nodes are nodes that can participate in the technical solution provided by the embodiment of the present application, and the target node is a node that meets the preset conditions, that is, a node that is screened by the preset conditions, and the preset conditions are set by the technical staff according to the actual situation, or generated by the server, and the embodiment of the present application does not limit this.
[0099] In a possible implementation, the server sends the reference model and the reference sample data set to multiple nodes, and each node performs a preset number of rounds of training on the reference model based on the reference sample data set to obtain a trained reference model. The server obtains the reference model parameters, reference model hyperparameters, and reference training duration returned by each node, wherein the reference model parameters are model parameters of the reference model after training of the corresponding node, the reference model hyperparameters are model hyperparameters used when the corresponding node trains the reference model, and the reference training duration is the duration spent by the corresponding node training the reference model. The server determines the multiple target nodes from the multiple nodes based on the initial reference model parameters of the reference model, the reference model parameters, reference model hyperparameters, and reference training duration returned by each node.
[0100] The preset number of rounds is set by the technician according to the actual situation, and the embodiments of the present application do not limit this. The reference model parameters are the model parameters of the reference model after the node trains the reference model for the preset number of rounds. In some embodiments, the reference model hyperparameters include learning rate, batch size, regularization coefficient, activation function, etc.
[0101] In this implementation, multiple target nodes can be screened out from multiple nodes through the reference model and reference sample data, thereby filtering out nodes that do not meet preset conditions among the multiple nodes, thereby improving the efficiency and effect of training the initial model.
[0102] In order to explain the above implementation more clearly, the above implementation will be explained in several parts below.
[0103] In the first part, the server sends the reference model and the reference sample data set to multiple nodes, and each node trains the reference model for a preset number of rounds based on the reference sample data set to obtain a trained reference model.
[0104] The reference sample data set includes a preset number of reference sample data, and each reference sample data includes a set of training sample data and corresponding annotation data.
[0105] In a possible implementation, the server sends the reference model and the reference sample data set to multiple nodes, and each node deploys the reference model locally. Each node uses the reference sample data set to train the reference model for a preset number of rounds to obtain a trained reference model.
[0106] For example, the server sends the reference model and the reference sample data set to multiple nodes, and each node deploys the reference model locally. For any node among the multiple nodes, in any round of training, the node obtains reference sample data from the reference sample data set, inputs the training sample data of the reference sample data into the reference model, and the reference model performs prediction based on the training sample data to obtain the prediction data corresponding to the training sample data. The node trains the reference model based on the difference information between the prediction data and the labeled data corresponding to the training sample data, that is, adjusts the model parameters of the reference model. After a preset number of rounds of training, a trained reference model is obtained.
[0107] In the second part, the server obtains the reference model parameters, reference model hyperparameters, and reference training time returned by each node.
[0108] In a possible implementation, the server obtains the first encrypted data returned by each node, and decrypts the first encrypted data to obtain the reference model parameters, reference model hyperparameters, and reference training duration corresponding to each node.
[0109] For example, the first encrypted data is obtained by encrypting the reference model parameters, reference model hyperparameters and reference training time with the server's public key. The server uses the private key to decrypt the first encrypted data to obtain the reference model parameters, reference model hyperparameters and reference training time corresponding to each node.
[0110] In the third part, the server determines the multiple target nodes from the multiple nodes based on the initial reference model parameters of the reference model, the reference model parameters returned by each node, the reference model hyperparameters and the reference training duration.
[0111] In a possible implementation, the server determines the training effect parameters of each node based on the initial reference model parameters of the reference model, the reference model parameters returned by each node, and the reference model hyperparameters. The server determines the training efficiency parameters of each node based on the initial reference model parameters of the reference model, the reference model parameters returned by each node, and the reference training duration. The server determines the multiple target nodes from the multiple nodes based on the training effect parameters and the training efficiency parameters of each node.
[0112] In order to explain the above implementation more clearly, the above implementation will be further explained in several parts below.
[0113] A. The server determines the training effect parameters of each node based on the initial reference model parameters of the reference model, the reference model parameters returned by each node, and the reference model hyperparameters.
[0114] In a possible implementation, for any node among the multiple nodes, the server determines a first parameter change gradient between a reference model parameter returned by the node and the initial reference model parameter. The server inputs the first parameter change gradient and the reference model hyperparameter into a training effect parameter prediction model, processes the first parameter change gradient and the reference model hyperparameter through the training effect parameter prediction model, and outputs the training effect parameter of the node.
[0115] The training effect parameter prediction model is obtained by supervised training based on a plurality of first sample data and labeled training effect parameters corresponding to each first sample data, and the first sample data includes sample reference model parameters and sample initial reference model parameters.
[0116] For example, for any node among the multiple nodes, the server divides the difference between the reference model parameter returned by the node and the initial reference model parameter by the initial reference model parameter to obtain the first parameter change gradient. The server inputs the first parameter change gradient and the reference model hyperparameter into the training effect parameter prediction model, and extracts features of the first parameter change gradient and the reference model hyperparameter through the training effect parameter prediction model to obtain training effect features. The server fully connects and normalizes the training effect features through the training effect parameter prediction model to obtain the training effect parameters of the node.
[0117] It should be noted that the above is explained by taking determining the training effect parameters of a node as an example. The method of determining the training effect parameters of other nodes among the multiple nodes belongs to the same inventive concept as the above method, and the implementation process will not be repeated.
[0118] B. The server determines the training efficiency parameters of each node based on the initial reference model parameters of the reference model, the reference model parameters returned by each node, and the reference training duration.
[0119] In a possible implementation, for any node among the multiple nodes, the server determines a second parameter change gradient between the reference model parameter returned by the node and the initial reference model parameter. The server determines a training efficiency parameter of the node based on the second parameter change gradient and a reference training duration of the node.
[0120] For example, for any node among the multiple nodes, the server divides the reference model parameter returned by the node by the initial reference model parameter to obtain the second parameter change gradient. The server fully connects and normalizes the second parameter change gradient to obtain a gradient change value corresponding to the second parameter change gradient. The server divides the gradient change value by the reference training duration to obtain the training efficiency parameter of the node.
[0121] C. The server determines the multiple target nodes from the multiple nodes based on the training effect parameters and the training efficiency parameters of each node.
[0122] In a possible implementation, the server merges the training effect parameters and the training efficiency parameters of each node to obtain a node evaluation score of each node. The server determines N nodes with the highest node evaluation scores among the multiple nodes as the multiple target nodes, where N is a positive integer.
[0123] 302. The server sends the initial model to be trained to the multiple target nodes, so that each target node deploys the initial model and performs a first round of training on the initial model based on the sample data on each target node. The parameter amount of the initial model is greater than that of the reference model. The trained initial model is used to predict the object risk value corresponding to the object information based on the input object information.
[0124] Among them, the initial model is also the model to be federated learning. The initial model is a prediction model. After the initial model is trained, the trained initial model can be used to predict the object risk value based on the input object information. In some embodiments, the object refers to the user, and the object information is obtained after the user's permission. The sample data on the target node is the sample data stored locally on the target node. The sample data usually has a certain degree of privacy. In order to avoid the leakage of sample data, the sample data on the target node will not leave the target node during the training of the initial model. The number of parameters of the initial model is greater than that of the reference model, which means that the complexity of the initial model is higher than that of the reference model.
[0125] It should be noted that the target node completing the first round of training for the initial model means that the target node uses a batch of sample data to train the initial model. The first round here includes multiple small rounds, and one sample data is used in each small round.
[0126] In a possible implementation, the server sends the initial model to multiple target nodes, and each target node deploys the initial model locally. Each target node uses local sample data to perform a first round of training on the initial model to obtain an initial model after the first round of training.
[0127] For example, the server sends the initial model to multiple target nodes, and each target node deploys the initial model locally. For any target node among the multiple target nodes, in any round of training, the target node obtains sample data from the local sample data set, inputs the training sample data of the sample data into the initial model, and the initial model makes predictions based on the training sample data to obtain prediction data corresponding to the training sample data. The target node trains the initial model based on the difference information between the prediction data and the labeled data corresponding to the training sample data, that is, adjusts the model parameters of the initial model. After multiple small rounds of training, the initial model after the first round of training is obtained.
[0128] 303. The server obtains the first model parameters and the first model hyperparameters returned by each target node, where the first model parameters are the model parameters of the initial model after the corresponding target node completes the first round of training for the initial model, and the first model hyperparameters are the model hyperparameters used when the corresponding target node performs the first round of training for the initial model.
[0129] Among them, a target node will return a set of first model parameters and first model hyperparameters. The first model parameters can be regarded as the result of the first round of training of the initial model by the target node. The first model hyperparameters are the model hyperparameters used by the target node when performing the first round of training on the initial model, which can reflect the model training strategy of the target node.
[0130] In a possible implementation, the server obtains the second encrypted data returned by each target node, and decrypts the second encrypted data to obtain the first model parameters and first model hyperparameters corresponding to each target node.
[0131] For example, the second encrypted data is obtained by encrypting the first model parameters and the first model hyperparameters using the public key of the server, and the server uses the private key to decrypt the second encrypted data to obtain the first model parameters and the first model hyperparameters corresponding to each target node.
[0132] 304. The server determines a plurality of trusted nodes from the plurality of target nodes based on the initial model, the first model parameters and the first model hyperparameters returned by each target node, where the trusted nodes are target nodes whose trustworthiness is higher than a trustworthiness threshold.
[0133] Among them, a trusted node is an electronic device with data processing capabilities, and the trustworthiness of a trusted node is determined based on the historical behavior of the trusted node. In the embodiment of the present application, the historical behavior refers to the last round of training of the initial model. The trustworthiness threshold is set by the technician according to the actual situation, and the embodiment of the present application does not limit this.
[0134] In a possible implementation, the server determines a first trusted parameter of each target node based on the initial model and the first model parameter returned by each target node. The server determines a second trusted parameter of each target node based on the initial model parameter of the initial model, the first model parameter returned by each target node, and the first model hyperparameter. The server determines a plurality of trusted nodes from the plurality of target nodes based on the first trusted parameter and the second trusted parameter of each target node.
[0135] In order to explain the above implementation more clearly, the above implementation will be explained in several parts below.
[0136] In the first part, the server determines a first credible parameter of each target node based on the initial model and a first model parameter returned by each target node.
[0137] In a possible implementation, the server inputs the evaluation object data into the initial model, and the initial model predicts based on the evaluation object data and outputs a first predicted object risk value. For any target node among the multiple target nodes, the server updates the initial model using the first model parameter returned by the target node to obtain the evaluation model corresponding to the target node. The server inputs the evaluation object data into the evaluation model, and the evaluation model predicts based on the evaluation object data and outputs a second predicted object risk value. The server determines the first credible parameter of the target node based on the labeled object risk value of the evaluation object data, the first predicted object risk value, and the second predicted object risk value.
[0138] The assessment object data is sample data stored on the server for risk assessment, and the assessment object data corresponds to the risk value of the labeled object.
[0139] In order to explain the above implementation more clearly, the above implementation will be further described in several parts below.
[0140] A. The server inputs the evaluation object data into the initial model, and the initial model makes a prediction based on the evaluation object data and outputs a first predicted object risk value.
[0141] In a possible implementation, the server inputs the evaluation object data into the initial model, and the initial model extracts features from the evaluation object data to obtain a first evaluation object feature. The server uses the initial model to fully connect and normalize the first evaluation object feature to obtain the first predicted object risk value.
[0142] B. For any target node among the multiple target nodes, the server uses the first model parameter returned by the target node to update the initial model to obtain an evaluation model corresponding to the target node.
[0143] In a possible implementation, for any target node among the multiple target nodes, the server replaces the model parameters of the initial model with the first model parameters returned by the target node to obtain an evaluation model corresponding to the target node.
[0144] C. The server inputs the evaluation object data into the evaluation model, and the evaluation model makes a prediction based on the evaluation object data and outputs a second predicted object risk value.
[0145] In a possible implementation, the server inputs the evaluation object data into the evaluation model, and the evaluation model extracts features from the evaluation object data to obtain second evaluation object features. The server uses the evaluation model to fully connect and normalize the second evaluation object features to obtain the second predicted object risk value.
[0146] D. The server determines the first trusted parameter of the target node based on the labeled object risk value of the assessment object data, the first predicted object risk value, and the second predicted object risk value.
[0147] In one possible implementation, the server determines the first trusted parameter of the target node based on first difference information between the labeled object risk value of the assessment object data and the first predicted object risk value, and second difference information between the labeled object risk value of the assessment object data and the second predicted object risk value.
[0148] For example, the server determines the ratio between the second difference information and the first difference information as the first trusted parameter of the target node.
[0149] In the second part, the server determines the second trusted parameters of each target node based on the initial model parameters of the initial model, the first model parameters returned by each target node, and the first model hyperparameters.
[0150] In a possible implementation, for any target node among the multiple target nodes, the server concatenates the initial model parameters of the initial model, the first model parameters returned by the target node, and the first model hyperparameters into a trusted evaluation parameter. The server inputs the trusted evaluation parameter into a trusted evaluation model, and the trusted evaluation model performs multiple convolutions and multiple deconvolutions on the trusted evaluation parameter to obtain a second trusted parameter of the target node.
[0151] In the third part, the server determines a plurality of trusted nodes from the plurality of target nodes based on the first trusted parameter and the second trusted parameter of each target node.
[0152] In a possible implementation, the server merges the first trust parameter and the second trust parameter of each target node to obtain the trustworthiness of each target node. The server determines the target node whose trustworthiness is higher than the trustworthiness threshold among the multiple target nodes as a trustworthy node to obtain the multiple trustworthy nodes.
[0153] Among them, the credibility threshold is set by technical personnel according to actual conditions, and the embodiments of the present application do not limit this.
[0154] 305. The server triggers early warning information for suspicious nodes and determines the target model parameters after the first round of training based on the first model parameters returned by the multiple trusted nodes, and sends the target model parameters to the multiple target nodes so that each target node adopts the target model parameters to replace the model parameters of the initial model after the first round of training. The suspicious node is a target node among the multiple target nodes other than the multiple trusted nodes.
[0155] Among them, suspicious nodes are nodes that may be malicious. Since this application uses federated learning to train the initial model, the presence of malicious nodes may have an adverse effect on the training of the initial model. Therefore, suspicious nodes will be identified in the embodiments of this application. The identification of suspicious nodes is also the identification of suspicious situations, thereby realizing early warning of suspicious situations in the federated learning process. The early warning information for suspicious nodes is to warn technicians and remind them that there may be malicious nodes in the process of training the initial model. The target model parameters can be regarded as the results of the first round of federated learning. After the target model parameters are sent to multiple target nodes, the multiple target nodes can use the target model parameters to update the model parameters of the initial model, so as to carry out the next round of training.
[0156] In a possible implementation, the server sends warning information for suspicious nodes to the management terminal and increases the number of triggering warning information of the suspicious nodes by one. The server determines the average model parameter of the first model parameter returned by the multiple trusted nodes, and determines the average model parameter as the target model parameter after the first round of training. The server sends the target model parameter to the multiple target nodes so that each target node adopts the target model parameter to replace the model parameter of the initial model after the first round of training.
[0157] The management terminal is a terminal with management authority. Each target node uses the target model parameters to replace the model parameters of the initial model after the first round of training. Each target node can use local sample data for the second round of training. The second round of training and the first round of training belong to the same inventive concept, and the implementation process will not be repeated. Of course, the subsequent training process is the same.
[0158] Optionally, after step 305 , the server can also execute the following step 306 .
[0159] 306. When the number of times that any target node triggers warning information reaches a preset number, the server removes the target node and determines another target node from the multiple nodes to participate in the training of the initial model.
[0160] Among them, eliminating the target node means that the target node no longer participates in subsequent rounds of training.
[0161] In a possible implementation, when the number of times any target node triggers warning information reaches a preset number, the server removes the target node from the multiple nodes. The server determines the node with the shortest reference training time returned from the multiple nodes other than the multiple target nodes as a new target node, and the new target node replaces the removed target node to continue parameter training of the initial model.
[0162] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0163] Through the technical solution provided by the embodiment of the present application, multiple target nodes are determined from multiple nodes based on a reference model and a reference sample data set. The initial model to be trained is sent to multiple target nodes, and the sample data on the multiple target nodes is used to train the initial model, and the first model parameters and first model hyperparameters returned by each target node are obtained. Using the initial model, the first model parameters and the first model hyperparameters returned by each target node, multiple trusted nodes are determined from multiple target nodes, and the first model parameters of the multiple trusted nodes are used to determine the target model parameters of this round of learning, and the target model parameters are sent to multiple target nodes so that multiple target nodes can perform subsequent rounds of training, thereby achieving early warning of suspicious situations in the federated learning process, while reducing the risk of the federated learning process being affected by malicious nodes.
[0164] The embodiment of the present application also provides a model early warning system for a multi-party joint online modeling platform, the system comprising: a server and multiple nodes.
[0165] The server is used to determine a plurality of target nodes from the plurality of nodes based on a reference model and a reference sample data set, where the target nodes are nodes that meet preset conditions.
[0166] The server is also used to send the initial model to be trained to the multiple target nodes, so that each target node deploys the initial model and performs a first round of training on the initial model based on the sample data on each target node. The parameter amount of the initial model is greater than that of the reference model. The trained initial model is used to predict the object risk value corresponding to the object information based on the input object information.
[0167] The server is also used to obtain the first model parameters and first model hyperparameters returned by each target node, wherein the first model parameters are the model parameters of the initial model after the corresponding target node completes the first round of training of the initial model, and the first model hyperparameters are the model hyperparameters used when the corresponding target node performs the first round of training on the initial model.
[0168] The server is also used to determine multiple trusted nodes from the multiple target nodes based on the initial model, the first model parameters and the first model hyperparameters returned by each target node, and the trusted nodes are target nodes whose credibility is higher than a credibility threshold.
[0169] The server is also used to trigger early warning information for suspicious nodes and determine the target model parameters after the first round of training based on the first model parameters returned by the multiple trusted nodes, and send the target model parameters to the multiple target nodes so that each target node adopts the target model parameters to replace the model parameters of the initial model after the first round of training. The suspicious node is a target node among the multiple target nodes other than the multiple trusted nodes.
[0170] The system and the above method embodiment belong to the same inventive concept. For the implementation process, please refer to the relevant description of the above method embodiment, which will not be repeated here.
[0171] Figure 4 This is a structural diagram of a model early warning device for a multi-party joint online modeling platform provided in an embodiment of the present application, see Figure 4 The device includes: a target node determination module 401, a sending module 402, an acquisition module 403, a trusted node determination module 404 and a triggering module 405.
[0172] The target node determination module 401 is used to determine a plurality of target nodes from a plurality of nodes based on a reference model and a reference sample data set, where the target nodes are nodes that meet preset conditions.
[0173] The sending module 402 is used to send the initial model to be trained to the multiple target nodes, so that each target node deploys the initial model and performs a first round of training on the initial model based on the sample data on each target node. The parameter amount of the initial model is greater than that of the reference model. The trained initial model is used to predict the object risk value corresponding to the object information based on the input object information.
[0174] Acquisition module 403 is used to obtain the first model parameters and first model hyperparameters returned by each target node, wherein the first model parameters are the model parameters of the initial model after the corresponding target node completes the first round of training on the initial model, and the first model hyperparameters are the model hyperparameters used when the corresponding target node performs the first round of training on the initial model.
[0175] The trusted node determination module 404 is used to determine multiple trusted nodes from the multiple target nodes based on the initial model, the first model parameters and the first model hyperparameters returned by each target node, and the trusted nodes are target nodes whose credibility is higher than the credibility threshold.
[0176] The trigger module 405 is used to trigger the early warning information for the suspicious node and determine the target model parameters after the first round of training based on the first model parameters returned by the multiple trusted nodes, and send the target model parameters to the multiple target nodes so that each target node adopts the target model parameters to replace the model parameters of the initial model after the first round of training. The suspicious node is a target node among the multiple target nodes other than the multiple trusted nodes.
[0177] In a possible implementation, the target node determination module 401 is used to send the reference model and the reference sample data set to multiple nodes, and each node performs a preset number of rounds of training on the reference model based on the reference sample data set to obtain a trained reference model. The reference model parameters, reference model hyperparameters, and reference training duration returned by each node are obtained, where the reference model parameters are the model parameters of the reference model after training of the corresponding node, the reference model hyperparameters are the model hyperparameters used when the corresponding node trains the reference model, and the reference training duration is the duration spent by the corresponding node training the reference model. Based on the initial reference model parameters of the reference model, the reference model parameters, reference model hyperparameters, and reference training duration returned by each node, the multiple target nodes are determined from the multiple nodes.
[0178] In a possible implementation, the target node determination module 401 is used to determine the training effect parameters of each node based on the initial reference model parameters of the reference model, the reference model parameters returned by each node, and the reference model hyperparameters. Based on the initial reference model parameters of the reference model, the reference model parameters returned by each node, and the reference training duration, the training efficiency parameters of each node are determined. Based on the training effect parameters and training efficiency parameters of each node, the multiple target nodes are determined from the multiple nodes.
[0179] In a possible implementation, the target node determination module 401 is used to merge the training effect parameters and the training efficiency parameters of each node to obtain a node evaluation score of each node. The N nodes with the highest node evaluation scores among the multiple nodes are determined as the multiple target nodes, where N is a positive integer.
[0180] In a possible implementation, the trusted node determination module 404 is used to determine the first trusted parameter of each target node based on the initial model and the first model parameter returned by each target node. Determine the second trusted parameter of each target node based on the initial model parameter of the initial model, the first model parameter returned by each target node, and the first model hyperparameter. Determine multiple trusted nodes from the multiple target nodes based on the first trusted parameter and the second trusted parameter of each target node.
[0181] In a possible implementation, the trusted node determination module 404 is used to input the evaluation object data into the initial model, and the initial model predicts based on the evaluation object data and outputs a first predicted object risk value. For any target node among the multiple target nodes, the initial model is updated using the first model parameter returned by the target node to obtain the evaluation model corresponding to the target node. The evaluation object data is input into the evaluation model, and the evaluation model predicts based on the evaluation object data and outputs a second predicted object risk value. Based on the labeled object risk value of the evaluation object data, the first predicted object risk value and the second predicted object risk value, the first trusted parameter of the target node is determined.
[0182] In a possible implementation, the trusted node determination module 404 is used to, for any target node among the multiple target nodes, concatenate the initial model parameters of the initial model, the first model parameters returned by the target node, and the first model hyperparameters into a trusted evaluation parameter, input the trusted evaluation parameter into a trusted evaluation model, and perform multiple convolutions and multiple deconvolutions on the trusted evaluation parameter by the trusted evaluation model to obtain a second trusted parameter of the target node.
[0183] In a possible implementation, the trusted node determination module 404 is used to merge the first trusted parameter and the second trusted parameter of each target node to obtain the trustworthiness of each target node. The target node whose trustworthiness is higher than the trustworthiness threshold among the multiple target nodes is determined as a trusted node to obtain the multiple trusted nodes.
[0184] In a possible implementation, the device further includes a node replacement module for removing a target node and determining another target node from the multiple nodes to participate in the training of the initial model when the number of times any target node triggers warning information reaches a preset number.
[0185] It should be noted that: the model early warning device for a multi-party joint online modeling platform provided in the above embodiment only uses the division of the above functional modules as an example when performing model early warning. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the model early warning device for a multi-party joint online modeling platform provided in the above embodiment and the model early warning method embodiment for a multi-party joint online modeling platform belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0186] Through the technical solution provided by the embodiment of the present application, multiple target nodes are determined from multiple nodes based on a reference model and a reference sample data set. The initial model to be trained is sent to multiple target nodes, and the sample data on the multiple target nodes is used to train the initial model, and the first model parameters and first model hyperparameters returned by each target node are obtained. Using the initial model, the first model parameters and the first model hyperparameters returned by each target node, multiple trusted nodes are determined from multiple target nodes, and the first model parameters of the multiple trusted nodes are used to determine the target model parameters of this round of learning, and the target model parameters are sent to multiple target nodes so that multiple target nodes can perform subsequent rounds of training, thereby achieving early warning of suspicious situations in the federated learning process, while reducing the risk of the federated learning process being affected by malicious nodes.
[0187] Figure 5 This is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 500 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 501 and one or more memories 502, wherein at least one computer program is stored in the one or more memories 502, and the at least one computer program is loaded and executed by the one or more processors 501 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server 500 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server 500 may also include other components for implementing device functions, which will not be described in detail here.
[0188] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including a computer program, and the computer program can be executed by a processor to complete the model early warning method for a multi-party joint online modeling platform in the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0189] In an exemplary embodiment, a computer program product or a computer program is also provided, which includes a program code, and the program code is stored in a computer-readable storage medium. A processor of a computer device reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the computer device executes the above-mentioned model warning method for a multi-party joint online modeling platform.
[0190] In some embodiments, the computer program involved in the embodiments of the present application may be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain system.
[0191] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0192] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A model early warning method for a multi-party joint online modeling platform, characterized in that: The method comprises: Based on the reference model and the reference sample data set, a plurality of target nodes are determined from the plurality of original nodes, wherein the target nodes are original nodes that meet preset conditions, and the plurality of target nodes are N original nodes with the highest node evaluation scores among the plurality of original nodes, where N is a positive integer; Sending the initial model to be trained to the multiple target nodes, so that each of the target nodes deploys the initial model and performs a first round of training on the initial model based on sample data on each target node, wherein the parameter amount of the initial model is greater than that of the reference model, and the trained initial model is used to predict the object risk value corresponding to the object information based on the input object information, and the model structure of the reference model and the initial model to be trained belong to the same model architecture; Obtaining first model parameters and first model hyperparameters returned by each of the target nodes, wherein the first model parameters are model parameters of the initial model after the corresponding target node completes the first round of training of the initial model, and the first model hyperparameters are model hyperparameters used when the corresponding target node performs the first round of training on the initial model; Based on the initial model, the first model parameters and the first model hyperparameters returned by each of the target nodes, determining a plurality of trusted nodes from the plurality of target nodes, wherein the trusted nodes are target nodes whose trustworthiness is higher than a trustworthiness threshold, and the trusted nodes are electronic devices with data processing capabilities; The determining a plurality of trusted nodes from the plurality of target nodes based on the initial model, the first model parameters and the first model hyperparameters returned by each of the target nodes comprises: Based on the initial model and the first model parameters returned by each of the target nodes, determine the first trusted parameter of each of the target nodes; based on the initial model parameters of the initial model, the first model parameters returned by each of the target nodes and the first model hyperparameters, determine the second trusted parameter of each of the target nodes; based on the first trusted parameter and the second trusted parameter of each of the target nodes, determine a plurality of trusted nodes from the plurality of target nodes; The determining, based on the initial model and the first model parameters returned by each of the target nodes, the first credible parameters of each of the target nodes comprises: Input the evaluation object data into the initial model, and the initial model predicts based on the evaluation object data and outputs a first predicted object risk value; for any target node among the multiple target nodes, the initial model is updated using the first model parameter returned by the target node to obtain the evaluation model corresponding to the target node; input the evaluation object data into the evaluation model, and the evaluation model predicts based on the evaluation object data and outputs a second predicted object risk value; determine the first credible parameter of the target node based on the labeled object risk value of the evaluation object data, the first predicted object risk value and the second predicted object risk value; The determining the first credible parameter of the target node based on the labeled object risk value of the assessment object data, the first predicted object risk value, and the second predicted object risk value includes: Determining a first credible parameter of the target node based on first difference information between the labeled object risk value of the assessment object data and the first predicted object risk value, and second difference information between the labeled object risk value of the assessment object data and the second predicted object risk value; The determining the second credible parameter of each of the target nodes based on the initial model parameters of the initial model, the first model parameters returned by each of the target nodes, and the first model hyperparameters includes: For any target node among the multiple target nodes, concatenate the initial model parameters of the initial model, the first model parameters returned by the target node, and the first model hyperparameters into a trusted evaluation parameter; input the trusted evaluation parameter into a trusted evaluation model, and perform multiple convolutions and multiple deconvolutions on the trusted evaluation parameter by the trusted evaluation model to obtain a second trusted parameter of the target node; The determining a plurality of trusted nodes from the plurality of target nodes based on the first trusted parameter and the second trusted parameter of each of the target nodes comprises: The first trusted parameter and the second trusted parameter of each of the target nodes are merged to obtain the credibility of each of the target nodes; the target nodes whose credibility is higher than the credibility threshold among the multiple target nodes are determined as trusted nodes to obtain the multiple trusted nodes; Trigger early warning information for suspicious nodes and determine target model parameters after a first round of training based on the first model parameters returned by the multiple trusted nodes, and send the target model parameters to the multiple target nodes so that each of the target nodes adopts the target model parameters to replace the model parameters of the initial model after the first round of training. The suspicious nodes are target nodes among the multiple target nodes other than the multiple trusted nodes.
2. The method according to claim 1, characterized in that The step of determining a plurality of target nodes from a plurality of original nodes based on a reference model and a reference sample data set includes: Sending the reference model and the reference sample data set to a plurality of original nodes, and having each of the original nodes perform a preset number of rounds of training on the reference model based on the reference sample data set to obtain a trained reference model; Obtain reference model parameters, reference model hyperparameters, and reference training duration returned by each of the original nodes, wherein the reference model parameters are model parameters of the reference model after training of the corresponding original node, the reference model hyperparameters are model hyperparameters used when the corresponding original node trains the reference model, and the reference training duration is the duration consumed by the corresponding original node to train the reference model; Based on the initial reference model parameters of the reference model, the reference model parameters returned by each of the original nodes, the reference model hyperparameters and the reference training duration, the multiple target nodes are determined from the multiple original nodes.
3. The method according to claim 2, characterized in that The determining the plurality of target nodes from the plurality of original nodes based on the initial reference model parameters of the reference model, the reference model parameters returned by each of the original nodes, the reference model hyperparameters, and the reference training duration comprises: Determine the training effect parameters of each of the original nodes based on the initial reference model parameters of the reference model, the reference model parameters returned by each of the original nodes, and the reference model hyperparameters; Determining a training efficiency parameter of each of the original nodes based on an initial reference model parameter of the reference model, a reference model parameter returned by each of the original nodes, and a reference training duration; Based on the training effect parameter and the training efficiency parameter of each of the original nodes, the plurality of target nodes are determined from the plurality of original nodes.
4. The method according to claim 3, characterized in that: The method for determining the node evaluation score of each of the original nodes includes: The training effect parameters and training efficiency parameters of each of the original nodes are integrated to obtain a node evaluation score of each of the original nodes.
5. The method according to claim 1, characterized in that: After triggering the warning information for the suspicious node and determining the target model parameters after the first round of training based on the first model parameters returned by the multiple trusted nodes, the method further includes: When the number of times that any target node triggers warning information reaches a preset number, the target node is eliminated and another target node is determined from the multiple original nodes to participate in the training of the initial model.
6. A model early warning system for a multi-party joint online modeling platform, characterized in that: The system comprises: a server and a plurality of original nodes; The server is used to determine a plurality of target nodes from the plurality of original nodes based on a reference model and a reference sample data set, wherein the target nodes are original nodes that meet preset conditions, and the plurality of target nodes are N original nodes with the highest node evaluation scores among the plurality of original nodes, where N is a positive integer; The server is further used to send the initial model to be trained to the multiple target nodes, so that each of the target nodes deploys the initial model and performs a first round of training on the initial model based on sample data on each target node, the parameter amount of the initial model is greater than that of the reference model, the trained initial model is used to predict the object risk value corresponding to the object information based on the input object information, and the model structure of the reference model and the initial model to be trained belong to the same model architecture; The server is further used to obtain the first model parameters and the first model hyperparameters returned by each of the target nodes, wherein the first model parameters are the model parameters of the initial model after the corresponding target node completes the first round of training on the initial model, and the first model hyperparameters are the model hyperparameters used when the corresponding target node performs the first round of training on the initial model; The server is further used to determine a plurality of trusted nodes from the plurality of target nodes based on the initial model, the first model parameters and the first model hyperparameters returned by each of the target nodes, wherein the trusted nodes are target nodes whose trustworthiness is higher than a trustworthiness threshold, and the trusted nodes are electronic devices with data processing capabilities; The determining a plurality of trusted nodes from the plurality of target nodes based on the initial model, the first model parameters and the first model hyperparameters returned by each of the target nodes comprises: Based on the initial model and the first model parameters returned by each of the target nodes, determine the first trusted parameter of each of the target nodes; based on the initial model parameters of the initial model, the first model parameters returned by each of the target nodes and the first model hyperparameters, determine the second trusted parameter of each of the target nodes; based on the first trusted parameter and the second trusted parameter of each of the target nodes, determine a plurality of trusted nodes from the plurality of target nodes; The determining, based on the initial model and the first model parameters returned by each of the target nodes, the first credible parameters of each of the target nodes comprises: Input the evaluation object data into the initial model, and the initial model predicts based on the evaluation object data and outputs a first predicted object risk value; for any target node among the multiple target nodes, the initial model is updated using the first model parameter returned by the target node to obtain the evaluation model corresponding to the target node; input the evaluation object data into the evaluation model, and the evaluation model predicts based on the evaluation object data and outputs a second predicted object risk value; determine the first credible parameter of the target node based on the labeled object risk value of the evaluation object data, the first predicted object risk value and the second predicted object risk value; The determining the first credible parameter of the target node based on the labeled object risk value of the assessment object data, the first predicted object risk value, and the second predicted object risk value includes: Determining a first credible parameter of the target node based on first difference information between the labeled object risk value of the assessment object data and the first predicted object risk value, and second difference information between the labeled object risk value of the assessment object data and the second predicted object risk value; The determining the second credible parameter of each of the target nodes based on the initial model parameters of the initial model, the first model parameters returned by each of the target nodes, and the first model hyperparameters includes: For any target node among the multiple target nodes, concatenate the initial model parameters of the initial model, the first model parameters returned by the target node, and the first model hyperparameters into a trusted evaluation parameter; input the trusted evaluation parameter into a trusted evaluation model, and perform multiple convolutions and multiple deconvolutions on the trusted evaluation parameter by the trusted evaluation model to obtain a second trusted parameter of the target node; The determining a plurality of trusted nodes from the plurality of target nodes based on the first trusted parameter and the second trusted parameter of each of the target nodes comprises: The first trusted parameter and the second trusted parameter of each of the target nodes are merged to obtain the credibility of each of the target nodes; the target nodes whose credibility is higher than the credibility threshold among the multiple target nodes are determined as trusted nodes to obtain the multiple trusted nodes; The server is also used to trigger early warning information for suspicious nodes and determine the target model parameters after the first round of training based on the first model parameters returned by the multiple trusted nodes, and send the target model parameters to the multiple target nodes so that each of the target nodes adopts the target model parameters to replace the model parameters of the initial model after the first round of training. The suspicious node is a target node among the multiple target nodes other than the multiple trusted nodes.
Citation Information
Patent Citations
Fair and trusted federal learning method based on block chain
CN115640305A
Method and device for recruiting trusted nodes to complete calculation task
CN115865642A
Financial alliance joint risk control modeling method, device, equipment and medium
CN116452342A
Federal learning processing method based on block chain and related equipment
CN117332871A
Federal modeling method and device based on node behavior analysis, equipment and medium
CN117829272A
