WO2021036014A1 - 联邦学习信用管理方法、装置、设备及可读存储介质 - Google Patents

联邦学习信用管理方法、装置、设备及可读存储介质 Download PDF

Info

Publication number
WO2021036014A1
WO2021036014A1 PCT/CN2019/119235 CN2019119235W WO2021036014A1 WO 2021036014 A1 WO2021036014 A1 WO 2021036014A1 CN 2019119235 W CN2019119235 W CN 2019119235W WO 2021036014 A1 WO2021036014 A1 WO 2021036014A1
Authority
WO
WIPO (PCT)
Prior art keywords
credit
participating
score
abnormal
weight value
Prior art date
Application number
PCT/CN2019/119235
Other languages
English (en)
French (fr)
Inventor
程勇
李苏毅
刘洋
陈天健
Original Assignee
深圳前海微众银行股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2021036014A1 publication Critical patent/WO2021036014A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0609Buyer or seller confidence or verification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance

Definitions

  • This application relates to the field of system security technology, and in particular to a method, device, device, and readable storage medium for federal learning credit management.
  • federated learning has also been applied to more and more fields.
  • a federated learning system may include many participants. For example, when multiple mobile terminals are combined for lateral federated learning, tens of thousands of mobile terminals may be involved. Since the data of the participants cannot be viewed directly (for example, considering the data privacy and security of the participants), and the honesty of each participant cannot be confirmed (for example, the participants are randomly selected mobile terminals), the actual horizontal federated learning system Participants may have some malicious attackers or saboteurs.
  • the main purpose of this application is to provide a federated learning credit management method, device, equipment and readable storage medium, aiming to solve the problem that malicious attackers may affect the federated learning training process in the current horizontal federated learning.
  • the federal learning credit management method includes the following steps:
  • the credit check result is a credit score or an abnormal score of each of the participating devices
  • the step of performing credit management on each of the participating devices according to the credit check result includes:
  • the joint model parameters are sent to each of the participating devices, so that each of the participating devices can perform local model training according to the joint model parameters, so as to perform credit management on each of the participating devices.
  • the step of correspondingly determining the weight value of each participating device according to the credit score or the abnormal score includes:
  • the step of sending the joint model parameters to each of the participating devices includes:
  • the method before the step of correspondingly determining the weight value of each participating device according to the credit score or the abnormal score, the method further includes:
  • the target participating device When it is determined that the target participating device is an abnormal device, delete the target participating device from the list of participating devices in the federated learning or add the target participating device to the blacklist;
  • the step of correspondingly determining the weight value of each participating device according to the credit score or the abnormal score includes:
  • the step of determining whether each of the participating devices is an abnormal device according to the credit score or the abnormal score includes:
  • the participating device with the number of abnormalities greater than the preset number is determined as an abnormal device.
  • the method before the step of performing a weighted average on the model parameter update of each participating device according to the weight value of each participating device to obtain the joint model parameters, the method further includes:
  • the step of performing a weighted average on the model parameter update of each participating device according to the weight value of each participating device to obtain joint model parameters includes:
  • the model parameter update of each participating device is weighted and averaged to obtain joint model parameters.
  • the step of detecting each of the model parameter updates according to a preset credit detection algorithm, and obtaining the credit detection result of each of the participating devices includes:
  • the update of each of the low-dimensional model parameters is detected according to the preset credit detection algorithm, and the credit detection result of each of the participating devices is obtained.
  • this application also provides a federal learning credit management device, the federal learning credit management device includes:
  • the receiving module is set to receive model parameter updates sent by each participating device participating in the federated learning
  • the detection module is configured to detect the update of each model parameter according to a preset credit detection algorithm, and obtain the credit detection result of each of the participating devices;
  • the management module is configured to perform credit management on each of the participating devices according to the credit detection result.
  • the federated learning credit management device includes a memory, a processor, and a federated learning credit stored in the memory and running on the processor.
  • a management program when the federated learning credit management program is executed by the processor, the steps of the above-mentioned federated learning credit management method are realized.
  • this application also proposes a computer-readable storage medium with a federated learning credit management program stored on the computer-readable storage medium, and when the federated learning credit management program is executed by a processor, the above The steps of the federated learning credit management method are described.
  • the model parameter update when the model is updated, after receiving the model parameter update sent by each participating device, the model parameter update is first detected according to the preset credit detection algorithm, and each participating device is performed according to the credit detection result obtained by the detection.
  • Credit management realizes the active credit detection of participating devices during the federated learning process to identify malicious attackers or abnormal behaviors in the federated learning process; and the detection is performed before the fusion operation of model parameter updates is performed. Find malicious attackers in time to avoid malicious attackers stealing the results of federated learning.
  • FIG. 1 is a schematic structural diagram of a hardware operating environment involved in a solution of an embodiment of the present application
  • Figure 2 is a schematic flowchart of the first embodiment of the credit management method for applying for federated learning
  • Fig. 3 is a functional schematic block diagram of a preferred embodiment of a federal learning credit management device according to this application.
  • FIG. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
  • federal learning credit management device in the embodiment of the present application may be a smart phone, a personal computer, a server, and other devices, which are not specifically limited here.
  • the federated learning credit management device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection and communication between these components.
  • the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory.
  • the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
  • FIG. 1 does not constitute a limitation on the federal learning credit management device, and may include more or less components than shown in the figure, or a combination of certain components, or different components Layout.
  • a memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a federated learning credit management program.
  • the operating system is a program that manages and controls equipment hardware and software resources, and supports the operation of federal learning credit management programs and other software or programs.
  • the user interface 1003 is mainly used to communicate with the client;
  • the network interface 1004 is mainly used to establish a communication connection with each participating device; and the processor 1001 can be used to call the federation stored in the memory 1005 Learn credit management procedures and perform the following operations:
  • the credit check result is a credit score or an abnormal score of each of the participating devices
  • the step of performing credit management on each of the participating devices according to the credit check result includes:
  • the joint model parameters are sent to each of the participating devices, so that each of the participating devices can perform local model training according to the joint model parameters, so as to perform credit management on each of the participating devices.
  • the step of correspondingly determining the weight value of each participating device according to the credit score or the abnormal score includes:
  • the step of sending the joint model parameters to each of the participating devices includes:
  • the processor 1001 may be used to call the federated learning credit management program stored in the memory 1005, and also execute the following operating:
  • the target participating device When it is determined that the target participating device is an abnormal device, delete the target participating device from the list of participating devices in the federated learning or add the target participating device to the blacklist;
  • the step of correspondingly determining the weight value of each participating device according to the credit score or the abnormal score includes:
  • the step of determining whether each participating device is an abnormal device according to the credit score or the abnormal score includes:
  • the participating device with the number of abnormalities greater than the preset number is determined as an abnormal device.
  • the processor 1001 may be used to call the storage in the memory 1005
  • the federal study credit management program also performs the following operations:
  • the step of performing a weighted average on the model parameter update of each participating device according to the weight value of each participating device to obtain joint model parameters includes:
  • the model parameter update of each participating device is weighted and averaged to obtain a joint model parameter.
  • the step of detecting each of the model parameter updates according to a preset credit detection algorithm to obtain the credit detection result of each of the participating devices includes:
  • the update of each of the low-dimensional model parameters is detected according to the preset credit detection algorithm, and the credit detection result of each of the participating devices is obtained.
  • FIG. 2 is a schematic flowchart of the first embodiment of the federal learning credit management method of the application.
  • the embodiment of the application provides an embodiment of the method of federated learning credit management. It should be noted that although the logical sequence is shown in the flowchart, in some cases, the sequence shown here can be executed in a different order. Or the steps described.
  • the execution body of each embodiment of the federal learning credit management method of the present application may be the coordination device in the federation learning. In the following embodiments, the coordination device is used as the execution body for illustration, and the coordination device is in communication connection with multiple participating devices.
  • the federal learning credit management method includes:
  • Step S10 receiving model parameter updates sent by each participating device participating in the federated learning
  • malicious attackers or saboteurs may appear in each participant of federated learning, which affects the model training of federated learning, such as affecting model training time or causing model training to not converge.
  • defensive technology can be used to reduce the impact of attackers, but the defensive technology cannot identify which participants are the attackers, then the attackers will still steal the results of the federated learning model training, and even still get rewards or incentives.
  • the scope of application of this authentication method is very limited. For example, it cannot be used. On a large number of mobile terminals, it is impossible to determine the reliability and honesty of each mobile terminal participating in horizontal federated learning.
  • a federated learning credit management method is proposed. During the federated learning process, each participating device is actively tested for credit, and the credit management of each participating device is performed based on the detection result, so as to avoid the federated learning process.
  • the emergence of malicious attackers has an impact on federated learning.
  • the coordinating device sends the joint model parameters of this model update to each participating device; each participating device uses the joint model parameters this time and their respective local data to perform local training on the federated learning model to obtain the model parameter update And return to the coordination device; the coordination device receives the model parameter updates sent by each participating device, and performs fusion processing on the model parameter updates to obtain the new joint model parameters, and when the next model update, the new joint model is sent to each Participating equipment.
  • the joint model parameter can be the parameter of the federated learning model, for example, the weight parameter of the connection between the nodes of the neural network, or the gradient information of the federated learning model, for example, the gradient information and the gradient information in the gradient descent algorithm of the neural network It can be a gradient value or a compressed gradient value.
  • the model parameter update may be an update of the joint model parameters, such as the weight parameters of the updated neural network.
  • the coordination device receives model parameter updates sent by each participating device participating in the federated learning every time the model is updated.
  • Step S20 detecting each of the model parameter updates according to a preset credit detection algorithm, and obtaining a credit detection result of each of the participating devices;
  • the coordinating device After receiving the model parameter update sent by each participating device, the coordinating device first detects the update of each model parameter according to the preset credit detection algorithm, and obtains the credit detection result of each participating device.
  • the preset credit detection algorithm may be a pre-configured algorithm for detecting each model parameter update, and its principle may be anomaly detection, novelty detection, or outlier detection.
  • each participating device since each participating device is in a model update process, under normal circumstances, that is, in the absence of malicious attackers or abnormal behaviors (participating devices that cause abnormal behaviors due to equipment failures), each participating device training obtains
  • the model parameter update should be similar. For example, each model parameter update is mapped in the space coordinate, and the position of each model parameter update in the space coordinate should be relatively concentrated.
  • the model parameter update sent by it should have low similarity with other normal model parameter updates, for example, it is far away in space from other normal model parameter updates.
  • the preset credit detection algorithm can use commonly used anomaly detection algorithms, such as One Class SVM, Isolation Forest, Local Outlier Factor, clustering algorithm and statistical model, etc. The purpose is to send a model to malicious attackers or abnormal behaviors.
  • Parameter updates are distinguished from normal model parameter updates, and the coordination device can also use a pre-trained auto-encoder to detect the received model parameter updates. It should be noted that, in this embodiment, there is no specific restriction on the preset credit detection algorithm used by the coordination device.
  • the credit check result obtained by the coordination device can be whether each participating device is an abnormal device. Specifically, it can be realized by configuring the output of the preset credit detection algorithm to 0 and 1. If the corresponding result of the updated model parameter of the participating device is 1, then It means that the participating device is an honest device. If the corresponding result is 0, it means that the participating device is an abnormal device, that is, an attacker.
  • the credit check result can also be the abnormal score or credit score of each participating device. The higher the abnormal score or the lower the credit score, it means that the participating device is more likely to be a malicious attacker. Specifically, you can set the preset credit detection algorithm The output configuration of is realized by abnormal value or credit value.
  • each model parameter update For example, by clustering analysis on each model parameter update, multiple groups are obtained, and the abnormal value or credit value is calculated for each group according to the number of model parameter updates contained in each group. The more the number of model parameter updates in the group, the lower the corresponding outlier value or the higher the credit value.
  • Step S30 Perform credit management on each of the participating devices according to the credit check result.
  • the coordination device performs credit management on each participating device after obtaining the credit test result of each participating device.
  • the credit management process of the coordinated device can be: determine whether there is an abnormal device in this model update according to the credit check result; if there is an abnormal device, it can be Perform exception processing on the abnormal device; if there is no abnormal device, it means that there is no malicious attacker, and all participating devices are honest and trustworthy.
  • the coordination device can perform fusion processing on the model parameter update of each participating device. Get the joint model parameter update.
  • exception handling can include three handling methods with different severity of punishment, and the coordination device can choose one of them.
  • the first is that in this model update, the contribution of the abnormal device is not considered, that is, when the coordination device performs the fusion processing of the model parameter update, the model parameter update of the abnormal device is not counted, and only other normal participants are involved.
  • the model parameters of the device are updated for fusion processing, and the obtained joint model parameters are not sent to the abnormal device;
  • the coordination device deletes the abnormal device from the list of participating devices in the federated learning, so that the abnormal device cannot participate in the device. Subsequent model updates of the federated learning will not receive corresponding rewards or incentives;
  • the third is to coordinate the device to block the abnormal device from the list of participating devices in the federated learning, that is, to add the abnormal device to the blacklist, and to be included in this federation. During the learning process and the subsequent federal learning process, blocked devices are not allowed to participate in the federal learning.
  • the credit management process of the coordination device may be: selecting the above three abnormal processing results according to the abnormal score or the credit score.
  • the coordination device sets three abnormal thresholds, a ⁇ b ⁇ c, when the coordination device detects that the abnormal score of the participating device is not greater than a
  • the coordination device sets three abnormal thresholds, a ⁇ b ⁇ c, when the coordination device detects that the abnormal score of the participating device is not greater than a
  • the coordination equipment detects whether the abnormal score of the participating equipment is greater than b. If it is not greater than b, the first method with lower punishment severity can be selected; if it is greater than b, then detect whether the abnormal score is greater than c, If it is not greater than c, the second method with higher punishment severity can be selected; if it is greater than c, the third method with highest punishment severity can be selected.
  • the coordinating device can perform credit checking every time the model is updated, or it can perform credit checking every few times, that is, the frequency of credit checking by the coordinating device can be set in advance as needed to adjust the coordinating device The level of trust in the entire federal learning system.
  • the model parameter update when the model is updated, after receiving the model parameter update sent by each participating device, the model parameter update is first detected according to the preset credit detection algorithm, and each participant is evaluated according to the credit detection result obtained by the detection.
  • the equipment performs credit management, which realizes the active credit detection of each participating device in the federated learning process to identify malicious attackers or abnormal behaviors in the federated learning process; and the detection is performed before the fusion operation of the model parameter update , To realize timely detection of malicious attackers to avoid malicious attackers from stealing the results of federated learning; in addition, by coordinating devices to actively perform credit checks, eliminating the cumbersome task of sending authentication information for authentication by participating devices every time the model is updated operating.
  • the credit check result is the credit score of each participating device Or abnormal score
  • the step S30 includes:
  • Step S301 correspondingly determining the weight value of each participating device according to the credit score or the abnormal score;
  • the credit management method of the coordinating device for each participating device may also be:
  • the coordination device When the coordination device detects the update of each model parameter, and the obtained credit detection result is the credit score or abnormal score of each participating device, the coordination device can determine the weight value of each participating device corresponding to the credit score or abnormal score.
  • the principle for the coordination device to determine the weight value of each participating device based on the credit score or anomaly score is: the smaller the credit score of the participating device or the larger the abnormal score, it means that the participating device is more likely to be an attacker. The less trustworthy it is.
  • the coordinating device should not adopt or use the contribution made by the participating device in this model update less.
  • the participating device can be assigned a smaller weight value; when the credit of the participating device The larger the score or the smaller the abnormal score, it means that the participating device is less likely to be an attacker and the credit is higher. At this time, the coordinating device should use more contributions made by the participating device in this model update. Therefore, , You can assign a larger weight value to the participating device.
  • the coordinating device can calculate the credit score or anomaly score according to a certain algorithm to obtain the weight value of each participating device, so that the larger the anomaly score or the smaller the credit score, the smaller the weight value corresponding to the participating device and the greater the abnormal score
  • the calculated weight value corresponding to the participating device is larger, that is, the abnormal score is inversely proportional to the weight value, or the credit score is proportional to the weight value.
  • the coordinated device detects the abnormal scores ⁇ a 1 (t), a 2 (t),..., a k (t) ⁇ corresponding to the K participating devices, where t is the serial number of the model update, which represents the t-th model Update, according to the abnormal score to determine the weight value of each participating device ⁇ p 1 (t), p 2 (t),..., p k (t) ⁇ , the coordinating device can use the softmax function:
  • the coordination device can also pre-set multiple score segments and the corresponding weight value of each score segment, such as dividing the abnormal score into multiple score segments, the weight value corresponding to the score segment with the higher score value is set to be lower, and the weight value corresponding to the score segment with the lower score value is set to be lower.
  • the weight value corresponding to the score segment is set higher.
  • the coordination device determines which score segment the abnormal score of each participating device falls into, thereby determining the weight value of each participating device.
  • Step S302 Perform a weighted average on the model parameter update of each participating device according to the weight value of each participating device to obtain a joint model parameter;
  • the coordinating device After determining the weight value of each participating device, the coordinating device performs a weighted average update on the model parameter of each participating device according to the determined weight value to obtain the joint model parameter. Specifically, the coordination device may first multiply the model parameter update corresponding to each participating device by the weight value to obtain the updated weighted result of each participating device model parameter, and then add the updated weighted results of each participating device model parameter to obtain The result is the new joint model parameter obtained from this model update.
  • Step S303 Send the joint model parameters to each of the participating devices, so that each of the participating devices can perform local model training according to the joint model parameters, so as to perform credit management on each of the participating devices.
  • the coordination device sends the joint model parameters obtained by the weighted average to each participating device to start a new round of model update.
  • each participating device receives the joint model parameters sent by the coordination device, they perform local model training on the federated learning model according to the joint model parameters and its local data, and obtain a new round of model parameter updates for the model update, where the local data is The data locally owned by the participating device used to train the federated learning model.
  • Each participating device sends the new round of model parameter updates to the coordinating device, and the coordinating device continues to perform credit checking according to the new round of model parameter updates.
  • the cycle will be finalized after the coordinating device detects that the federated learning model has converged.
  • the parameters of the federated learning model are sent to each participating device, and the federated learning is completed.
  • the weight value of each participating device is determined according to the credit score or abnormal score, and the weight value of each participating device is determined according to the weight value.
  • the model parameter update is weighted and averaged to obtain the joint model parameters, and the joint model parameters are sent to each participating device, so that when the credit score of the participating device is lower or the abnormal score is higher, the model parameter update of the participating device is less utilized , Thereby reducing the influence of the participating equipment as a malicious attacker or the participating equipment that may be a malicious attacker on the federated learning, thereby effectively improving the learning quality of the federated learning.
  • the weight value assigned by the coordinating device to each participating device is dynamically changed, and changes with the result of the credit check, which can prevent the wrong way of assigning an honest based on only one credit check result.
  • the participating device is judged to be an attacker.
  • step S301 includes:
  • Step S3011 when the credit score is less than the preset credit score, or the abnormal score is greater than the preset abnormal score, set the weight value of the credit score or the abnormal score corresponding to the participating device to zero;
  • the coordination device After the coordination device detects the credit score or abnormal score of each participating device, it can detect whether the credit score of each participating device is less than the preset credit score, or detect whether the abnormal score of each participating device is greater than the preset abnormal score.
  • the preset credit score and the preset abnormal score can be set as needed, and the preset credit score can be set to be smaller, so that when the credit score of the participating device is less than the preset credit score, it indicates the model parameter of the participating device Updating anomalies is most likely a malicious attacker.
  • the preset anomaly score can be set to a larger value.
  • the weight value of the participating device is set to zero, that is, when the coordinating device can determine that the current model update
  • the participating device may be an attacker, the weight value of the participating device can be set to zero, so that the model parameter update of the participating device is not used in this model update, and the contribution of the participating device is not considered, thereby avoiding It may be the influence of the attacker's participating equipment on federated learning.
  • the coordination device can use the above method to determine the weight value through the algorithm or the score segment to determine the other participating devices The weight value of, so that when the credit score of the participating device is lower or the abnormal score is higher, the model parameter update of the participating device is less used, thereby reducing the participation of the malicious attacker or the malicious attacker.
  • the step S303 includes:
  • Step S3031 Send the joint model parameters to the participating devices whose weight value is not zero in each of the participating devices.
  • the coordinating device can send the joint model parameters to the participating devices whose weight value is not zero in each participating device, that is, not to the participating devices whose weight value is zero. Because in this model update, the coordinating device did not update the model parameters of the participating device, so the calculated joint model parameters are not sent to the participating device, so as to prevent the participating device from being stolen by a malicious attacker.
  • the results of federated learning thereby ensuring the fairness of federated learning.
  • the method includes:
  • Step S304 Determine whether each participating device is an abnormal device according to the credit score or the abnormal score
  • the coordination device may first determine whether each participating device is an abnormal device based on the credit score or anomaly score of each participating device obtained this time. Specifically, the coordination device can detect whether the credit score of the participating device is less than the preset credit score, or whether the abnormal score of the participating device is greater than the preset credit score, so that when the credit score of the participating device is less than the preset credit score, or abnormal When the score is less than the preset abnormal score, it can be determined that the participating device is a malicious attacker. It should be noted that the preset credit scores and the preset abnormal scores in step S304 may be the same as those in step S3011.
  • the coordination device chooses to implement step S304 and step S3011; they may also be different.
  • the preset credit score in S304 is greater than the preset credit score in step S3011, or the preset anomaly score in step S304 is less than the preset anomaly score in step S3011.
  • the coordination device may first perform the judgment in step S304, and then Perform S3011 judgment, so as to realize the selection of management methods with different severity according to different scores of abnormal scores or credit scores.
  • Step S305 When it is determined that the target participating device is an abnormal device, delete the target participating device from the list of participating devices in the federated learning or add the target participating device to the blacklist;
  • the coordination device determines that the target participating device is an abnormal device, the target participating device is deleted from the list of participating devices in the federated learning or the target participating device is added to the blacklist. Among them, the participating device is added to the blacklist of federated learning, and the participating device is no longer in the current list of participating devices of federated learning.
  • the coordination device can determine the weight value of other participating devices by using the above method of determining the weight value through the algorithm or the score segment, so that the lower the credit score of the participating device Or when the abnormality score is higher, the model parameter update of the participating device is less utilized, thereby reducing the influence of the participating device as a malicious attacker or the participating device that may be a malicious attacker on the federated learning.
  • the step S301 includes:
  • Step S3012 correspondingly determining the weight value of each participating device in the current federal learning participating device list according to the credit score or the abnormal score.
  • the coordination device correspondingly determines the weight value of each participating device in the current federal learning participating device list according to the credit score or the abnormal score.
  • the difference between this step and step S301 is that in this step, the coordinating device only determines the weight value of each participating device in the current list of participating devices in the federated learning.
  • the federated learning is In the subsequent model update of this federated learning, the model parameter update of the participating device is no longer used, and the weight value is no longer assigned to the participating device.
  • coordinate the device's future federated learning The participating device is no longer allowed to participate in federated learning.
  • the participating device when it is clear that the participating device is an abnormal device, that is, an attacker, severe management measures such as delisting or blocking the participating device are taken, so that the participating device cannot affect the federated learning and cannot be stolen.
  • severe management measures such as delisting or blocking the participating device are taken, so that the participating device cannot affect the federated learning and cannot be stolen.
  • the training results of federated learning have improved the fairness of federated learning and the enthusiasm for honest participation in equipment.
  • step S304 includes:
  • Step S3041 Record the participating devices whose credit score is less than the preset credit score or the abnormal score is greater than the preset abnormal score in each model update, and obtain the number of abnormalities of each participating device;
  • the coordination device can determine the abnormal device by the following method: the coordination device can obtain the credit of each participating device every time the model is updated. In the case of scores or abnormal scores, the participating devices whose credit scores are less than the preset credit scores or the abnormal scores greater than the preset abnormal scores are recorded, and the number of abnormalities of each participating device is calculated. For example, the coordination device has detected that the credit score of participating device 1 is less than the preset credit score in the 4th and 5th times in the 5 times that it has undergone model updates.
  • the coordination device After the credit score of each participating device is detected, it is detected that the credit score of participating device 1 is less than the preset credit score, then the coordinated device records the participating device 1, and the number of abnormalities of participating device 1 is 3; for 6 model updates For participating devices whose middle credit score is not less than the preset credit score, the coordinated device counts and obtains that the number of abnormalities of the participating device is 0. That is, the coordination device updates the number of abnormalities of each participating device after each model update detects the abnormal score or credit score of each participating device.
  • the preset credit score and the preset abnormal score in step S3041 may be the same as or different from the preset credit score and the preset abnormal score in step S3011, and there is no limitation here.
  • Step S3042 detecting whether the number of abnormalities of each participating device is greater than a preset number
  • the coordinating device After obtaining the number of abnormalities of each participating device, the coordinating device detects whether the number of abnormalities of each participating device is greater than the preset number.
  • the preset number can be set as needed. In order to avoid a misjudgment, the preset number should be set Must be greater than or equal to 1.
  • Step S3043 Determine the participating device with the number of abnormalities greater than the preset number as an abnormal device.
  • the coordination device detects that the number of abnormalities of the participating device is greater than the preset number of times, the participating device is determined to be an abnormal device. That is, when the model parameter updates sent by the participating device in multiple model updates are abnormal, it is certain that the participating device is abnormal, and it is almost certain that the participating device is an attacker.
  • the model when the model is updated, the number of abnormalities of each participating device is counted, and when the number of abnormalities is greater than the preset number, the participating device is judged as an abnormal device, and the abnormal device is removed or blocked.
  • Abnormal handling avoids determining that the participating device is an abnormal device based on an abnormal result of a credit check of the participating device, thereby improving the accuracy of determining the attacker.
  • the step S302 includes:
  • Step S306 correspondingly sending the credit score, the abnormal score or the weight value to each of the participating devices;
  • the coordination device can determine the weight value of each participating device according to the abnormal score or credit score, and send the credit score, abnormal score or weight value to the corresponding participant before updating the model parameters of each participating device according to the weight value. equipment.
  • the coordinating device may also send the credit score or the abnormal score to the corresponding participating device before determining the weight value of the participating device.
  • Step S307 Receive the authentication information sent by the target participant device, where the target participant device detects that the credit score is less than the preset credit score, or the abnormality score is greater than the preset abnormality score, or the weight value is less than the preset credit score. Sending the authentication information when setting the weight value;
  • each participating device After receiving the credit score, anomaly score or weight value sent by the coordination device, each participating device can detect whether the credit score is less than the preset credit score, or whether the abnormal score is greater than the preset anomaly score, or whether the weight value is less than the preset
  • the weight value when the participating device detects that the credit score is less than the preset credit score, or detects that the abnormal score is greater than the preset abnormal score, or detects that the weight value is less than the preset weight value, send authentication information to the coordination device.
  • the authentication information may carry an authentication password or other authentication data negotiated with the coordination device in advance.
  • the coordination device receives the authentication information sent by the target participating device.
  • the preset credit score and the preset abnormal score in step S307 may be the same or different from the preset credit score and the preset abnormal score in the foregoing embodiment, and there is no specific limitation.
  • Step S308 Perform identity authentication on the target participating device according to the authentication information to obtain an identity authentication result
  • the coordination device performs identity authentication on the target participating device according to the received authentication information, and obtains the identity authentication result. Specifically, the coordination device can extract the authentication password or other authentication data in the authentication information, compare the extracted authentication password with a pre-stored authentication password, or compare the extracted authentication data with or pre-stored authentication data If they are consistent, the identity verification result is that the participating device is an honest participating device, not an attacker. If they are not consistent, the identity verification result is that the participating device is a malicious attacker.
  • the step S302 includes:
  • Step S3021 According to the identity authentication result and the weight value of each of the participating devices, weighted average is performed on the update of the model parameters of each of the participating devices to obtain joint model parameters.
  • step S302 the coordinating device can determine whether to adjust the weight value, credit score, or abnormal score of each participating device according to the identity authentication result. Specifically, when the identity authentication result of the participating device is this When the participating device is not an attacker, the coordinating device can increase the corresponding lower weight value of the participating device, or adjust the credit score of the participating device to full marks, or adjust the abnormal score of the participating device to zero; or When the coordinating device has blocked or deleted the participating device from the list of participating devices during this model update, the coordinating device can re-add the participating device to the list of participating devices and assign a higher weight to the participating device Value; or when the coordinating device has increased the number of abnormalities of the participating device by one when the model is updated, the coordinating device can clear the number of abnormalities of the participating device to zero.
  • the credit score, abnormal score or weight value of each participating device is sent to each participating device, so that when the participating device is suspected (that is, the abnormal score is very high, or the credit score is very low, or the weight value is very high) Low time), the authentication information can be sent to the coordinating device to make an appeal, thereby further avoiding the honest participant device from being misjudged as an attacker.
  • it also effectively prevents the participating device from carrying authentication information every time it sends model parameter updates to the coordinating device, and only sending the authentication information to the coordinating device when the participating device is suspected, which can effectively save communication bandwidth and reduce the amount of calculation. .
  • step S20 includes:
  • Step S201 Perform dimensionality reduction processing on each of the model parameter updates to obtain a low-dimensional model parameter update
  • the coordination device performs dimensionality reduction processing on each model parameter update to obtain a low-dimensional model parameter update. Since the model parameter update sent by the participating device may be a very high-dimensional vector, especially when the federated learning model is a deep learning model, the dimensionality of the model parameter update may be as high as 1 million dimensions, or even 10 million dimensions. Therefore, the coordination device can perform dimensionality reduction processing on model parameter updates. Specifically, the coordination device may use a random sampling method to perform dimensionality reduction processing, for example, randomly extract 100 dimensions from a 1 million-dimensional model parameter update as a low-dimensional model parameter update.
  • the coordination device may also perform dimensionality reduction processing in a feature engineering manner, for example, extracting a dimension from the model parameter update that has changed a lot compared with the previous model parameter update of the participating device.
  • the coordination device can also select the parameters of the last layer of the neural network as a low-dimensional model parameter update.
  • the dimensionality reduction method of the coordination device is not specifically limited, and it is preferable that the dimensionality reduction method of the low-dimensional model parameter update after the dimensionality reduction can reflect the characteristics of the original model parameter update.
  • Step S202 Detect each of the low-dimensional model parameter updates according to a preset credit detection algorithm, and obtain a credit detection result of each of the participating devices.
  • the coordination device detects each low-dimensional model parameter update according to the preset credit detection algorithm, and obtains the credit detection result of each participating device.
  • the credit detection algorithm in this step is the same as the credit detection algorithm in step S20, and will not be described in detail.
  • step S20 the coordination device detects the low-dimensional model parameter update , Reducing the computational complexity, thereby saving the detection time of the coordination device, and accelerating the training speed of the federated learning model.
  • an embodiment of the present application also proposes a federal learning credit management device.
  • the federal learning credit management device includes:
  • the receiving module 10 is configured to receive model parameter updates sent by each participating device participating in the federated learning
  • the detection module 20 is configured to detect each of the model parameter updates according to a preset credit detection algorithm, and obtain the credit detection result of each of the participating devices;
  • the management module 30 is configured to perform credit management on each of the participating devices according to the credit detection result.
  • the management module 30 includes:
  • a determining unit configured to correspondingly determine the weight value of each participating device according to the credit score or the abnormal score
  • a calculation unit configured to perform a weighted average on the model parameter update of each participating device according to the weight value of each participating device to obtain a joint model parameter
  • the sending unit is configured to send the joint model parameters to each of the participating devices, so that each of the participating devices can perform local model training according to the joint model parameters, so as to perform credit management on each of the participating devices.
  • the determining unit includes:
  • a setting subunit configured to set the credit score or the weight value of the abnormal score corresponding to the participating device to zero when the credit score is less than the preset credit score or the abnormal score is greater than the preset abnormal score;
  • the sending unit is further configured to send the joint model parameters to the participating devices whose weight value is not zero in each of the participating devices.
  • the determining unit is further configured to determine whether each participating device is based on the credit score or the abnormal score before determining the weight value of each participating device according to the credit score or the abnormal score. Is an abnormal device;
  • the management module 30 also includes:
  • An exception processing unit configured to delete the target participating device from the list of participating devices in the federated learning or add the target participating device to the blacklist when it is determined that the target participating device is an abnormal device;
  • the determining unit is further configured to correspondingly determine the weight value of each participating device in the current federal learning participating device list according to the credit score or the abnormal score.
  • the determining unit further includes:
  • the recording subunit is configured to record the participating devices whose credit score is less than the preset credit score or the abnormal score is greater than the preset abnormal score in each model update, and obtain the number of abnormalities of each participating device;
  • the detection subunit is configured to detect whether the number of abnormalities of each of the participating devices is greater than a preset number
  • the determining sub-unit is configured to determine the participating device with the number of abnormalities greater than the preset number as an abnormal device.
  • the sending unit is further configured to perform a weighted average on the model parameter update of each participating device according to the weight value of each participating device to obtain the joint model parameters, and then combine the credit score and the total value.
  • the abnormal score or the weight value is correspondingly sent to each of the participating devices;
  • the management module 30 also includes:
  • the receiving unit is configured to receive authentication information sent by a target participant device, wherein the target participant device detects that the credit score is less than a preset credit score, or that the abnormality score is greater than the preset abnormality score, or the weight value Sending the authentication information when it is less than the preset weight value;
  • An authentication unit configured to perform identity authentication on the target participating device according to the authentication information to obtain an identity authentication result
  • the calculation unit is further configured to perform a weighted average on the update of the model parameters of each participating device according to the identity authentication result and the weight value of each participating device to obtain a joint model parameter.
  • the detection module 20 includes:
  • the dimensionality reduction processing unit is configured to perform dimensionality reduction processing on each of the model parameter updates to obtain low-dimensional model parameter updates;
  • the detection unit is configured to detect the update of each of the low-dimensional model parameters according to a preset credit detection algorithm, and obtain the credit detection result of each of the participating devices.
  • an embodiment of the present application also proposes a computer-readable storage medium with a federal learning credit management program stored on the storage medium.
  • the federal learning credit management program is executed by a processor, the following federal learning credit management is implemented Method steps.
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the method described in each embodiment of the present application.
  • a terminal device which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Abstract

一种联邦学习信用管理方法、装置、设备及可读存储介质,该方法包括:接收参与联邦学习的各参与设备发送的模型参数更新(S10);按照预设信用检测算法对各所述模型参数更新进行检测,得到各所述参与设备的信用检测结果(S20);根据所述信用检测结果对各所述参与设备进行信用管理(S30)。实现了在联邦学习过程中主动地对各参与设备进行信用检测,以识别联邦学习过程中出现的恶意攻击者或者行为异常者;并在进行模型参数更新的融合操作之前进行检测,实现及时地发现恶意攻击者,以避免恶意攻击者窃取联邦学习的成果。

Description

联邦学习信用管理方法、装置、设备及可读存储介质
本申请要求于2019年8月28日提交中国专利局、申请号为201910802526.4、发明名称为“联邦学习信用管理方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及系统安全技术领域,尤其涉及一种联邦学习信用管理方法、装置、设备及可读存储介质。
背景技术
随着联邦学习技术的发展,联邦学习也被应用到越来越多的领域。在现实场景中应用横向联邦学习技术时,一个联邦学习系统可能包括很多个参与者,例如,当联合多个移动终端进行横向联邦学习时,就可能涉及数以万计的移动终端。由于不能直接查看参与者的数据(例如,考虑参与者的数据隐私和安全),也不能确认每个参与者的诚实性(例如,参与者是随机选择的移动终端),实际横向联邦学习系统的参与者就可能会出现一些恶意攻击者或者破坏者。
这些恶意攻击者和破坏者可能会影响联邦学习模型的训练,例如,影响模型训练时间或导致模型训练不收敛。而由于不知道哪些参与者是攻击者或者破坏者,横向联邦学习的成果也会被这些攻击者和破坏者窃取,甚至系统在不知情的情况下还会给这些攻击者或者破坏者分配奖励/激励。这样就严重影响了联邦学习系统的公平性,会影响诚实参与者的积极性,影响联邦学习系统的实际应用。
发明内容
本申请的主要目的在于提供一种联邦学习信用管理方法、装置、设备及可读存储介质,旨在解决目前横向联邦学习中可能会出现恶意攻击者影响联邦学习训练过程的问题。
为实现上述目的,本申请提供一种联邦学习信用管理方法,所述联邦学习信用管理方法包括以下步骤:
接收参与联邦学习的各参与设备发送的模型参数更新;
按照预设信用检测算法对各所述模型参数更新进行检测,得到各所述参与设备的信用检测结果;
根据所述信用检测结果对各所述参与设备进行信用管理。
可选地,所述信用检测结果为各所述参与设备的信用分数或异常分数,所述根据所述信用检测结果对各所述参与设备进行信用管理的步骤包括:
根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值;
根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数;
将所述联合模型参数发送给各所述参与设备,以供各所述参与设备根据所述联合模型参数进行本地模型训练,以对各所述参与设备进行信用管理。
可选地,所述根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值的步骤包括:
当所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数时,将所述信用分数或所述异常分数对应参与设备的权重值设置为零;
所述将所述联合模型参数发送给各所述参与设备的步骤包括:
将所述联合模型参数发送给各所述参与设备中所述权重值不为零的参与设备。
可选地,所述根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值的步骤之前,还包括:
根据所述信用分数或所述异常分数确定各所述参与设备是否为异常设备;
当确定目标参与设备为异常设备时,在联邦学习的参与设备名单中删除所述目标参与设备或将所述目标参与设备加入黑名单;
所述根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值的步骤包括:
根据所述信用分数或所述异常分数对应确定当前联邦学习参与设备名单中各参与设备的权重值。
可选地,所述根据所述信用分数或所述异常分数确定各所述参与设备是否为异常设备的步骤包括:
对每次模型更新中所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数的参与设备进行记录,得到各所述参与设备的异常次数;
检测各所述参与设备的异常次数是否大于预设次数;
将所述异常次数大于所述预设次数的参与设备确定为异常设备。
可选地,所述根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数的步骤之前,还包括:
将所述信用分数、所述异常分数或所述权重值对应发送给各所述参与设备;
接收目标参与设备发送的认证信息,其中,所述目标参与设备在检测到所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数,或所述权重值小于预设权重值时发送所述认证信息;
根据所述认证信息对所述目标参与设备进行身份认证,得到身份认证结果;
所述根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数的步骤包括:
根据所述身份认证结果和各所述参与设备的权重值,对各所述参与设备 的所述模型参数更新进行加权平均,得到联合模型参数。
可选地,所述按照预设信用检测算法对各所述模型参数更新进行检测,得到各所述参与设备的信用检测结果的步骤包括:
将各所述模型参数更新分别进行降维处理,得到低维度的模型参数更新;
按照预设信用检测算法对各所述低维度的模型参数更新进行检测,得到各所述参与设备的信用检测结果。
为实现上述目的,本申请还提供一种联邦学习信用管理装置,所述联邦学习信用管理装置包括:
接收模块,设置为接收参与联邦学习的各参与设备发送的模型参数更新;
检测模块,设置为按照预设信用检测算法对各所述模型参数更新进行检测,得到各所述参与设备的信用检测结果;
管理模块,设置为根据所述信用检测结果对各所述参与设备进行信用管理。
为实现上述目的,本申请还提供一种联邦学习信用管理设备,所述联邦学习信用管理设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的联邦学习信用管理程序,所述联邦学习信用管理程序被所述处理器执行时实现如上所述的联邦学习信用管理方法的步骤。
此外,为实现上述目的,本申请还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有联邦学习信用管理程序,所述联邦学习信用管理程序被处理器执行时实现如上所述的联邦学习信用管理方法的步骤。
本申请中,通过在模型更新时,接收到各参与设备发送的模型参数更新后,先按照预设信用检测算法对模型参数更新进行检测,并根据检测得到的信用检测结果来对各参与设备进行信用管理,实现了在联邦学习过程中主动地对各参与设备进行信用检测,以识别联邦学习过程中出现的恶意攻击者或者行为异常者;并在进行模型参数更新的融合操作之前进行检测,实现及时地发现恶意攻击者,以避免恶意攻击者窃取联邦学习的成果。
附图说明
图1是本申请实施例方案涉及的硬件运行环境的结构示意图;
图2为本申请联邦学习信用管理方法第一实施例的流程示意图;
图3为本申请联邦学习信用管理装置较佳实施例的功能示意图模块图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
如图1所示,图1是本申请实施例方案涉及的硬件运行环境的设备结构示意图。
需要说明的是,本申请实施例联邦学习信用管理设备可以是智能手机、个人计算机和服务器等设备,在此不做具体限制。
如图1所示,该联邦学习信用管理设备可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。
本领域技术人员可以理解,图1中示出的设备结构并不构成对联邦学习信用管理设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及联邦学习信用管理程序。其中,操作系统是管理和控制设备硬件和软件资源的程序,支持联邦学习信用管理程序以及其它软件或程序的运行。
在图1所示的设备中,用户接口1003主要用于与客户端进行数据通信;网络接口1004主要用于与各参与设备建立通信连接;而处理器1001可以用于调用存储器1005中存储的联邦学习信用管理程序,并执行以下操作:
接收参与联邦学习的各参与设备发送的模型参数更新;
按照预设信用检测算法对各所述模型参数更新进行检测,得到各所述参与设备的信用检测结果;
根据所述信用检测结果对各所述参与设备进行信用管理。
进一步地,所述信用检测结果为各所述参与设备的信用分数或异常分数,所述根据所述信用检测结果对各所述参与设备进行信用管理的步骤包括:
根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值;
根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数;
将所述联合模型参数发送给各所述参与设备,以供各所述参与设备根据所述联合模型参数进行本地模型训练,以对各所述参与设备进行信用管理。
进一步地,所述根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值的步骤包括:
当所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数时,将所述信用分数或所述异常分数对应参与设备的权重值设置为零;
所述将所述联合模型参数发送给各所述参与设备的步骤包括:
将所述联合模型参数发送给各所述参与设备中所述权重值不为零的参与设备。
进一步地,所述根据所述信用分数或所述异常分数对应确定各所述参与 设备的权重值的步骤之前,处理器1001可以用于调用存储器1005中存储的联邦学习信用管理程序,还执行以下操作:
根据所述信用分数或所述异常分数确定各所述参与设备是否为异常设备;
当确定目标参与设备为异常设备时,在联邦学习的参与设备名单中删除所述目标参与设备或将所述目标参与设备加入黑名单;
所述根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值的步骤包括:
根据所述信用分数或所述异常分数对应确定当前联邦学习参与设备名单中各参与设备的权重值。
进一步地,所述根据所述信用分数或所述异常分数确定各所述参与设备是否为异常设备的步骤包括:
对每次模型更新中所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数的参与设备进行记录,得到各所述参与设备的异常次数;
检测各所述参与设备的异常次数是否大于预设次数;
将所述异常次数大于所述预设次数的参与设备确定为异常设备。
进一步地,所述根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数的步骤之前,处理器1001可以用于调用存储器1005中存储的联邦学习信用管理程序,还执行以下操作:
将所述信用分数、所述异常分数或所述权重值对应发送给各所述参与设备;
接收目标参与设备发送的认证信息,其中,所述目标参与设备在检测到所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数,或所述权重值小于预设权重值时发送所述认证信息;
根据所述认证信息对所述目标参与设备进行身份认证,得到身份认证结果;
所述根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数的步骤包括:
根据所述身份认证结果和各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数。
进一步地,所述按照预设信用检测算法对各所述模型参数更新进行检测,得到各所述参与设备的信用检测结果的步骤包括:
将各所述模型参数更新分别进行降维处理,得到低维度的模型参数更新;
按照预设信用检测算法对各所述低维度的模型参数更新进行检测,得到各所述参与设备的信用检测结果。
基于上述的结构,提出联邦学习信用管理方法的各个实施例。
参照图2,图2为本申请联邦学习信用管理方法第一实施例的流程示意图。
本申请实施例提供了联邦学习信用管理方法的实施例,需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。本申请联邦学习信用管理方法的各个实施例 的执行主体可以是联邦学习中的协调设备,以下各实施例中以协调设备为执行主体进行阐述,所述协调设备与多个参与设备通信连接。在本实施例中,联邦学习信用管理方法包括:
步骤S10,接收参与联邦学习的各参与设备发送的模型参数更新;
目前,联邦学习的各个参与者中可能会出现恶意的攻击者或破坏者,影响联邦学习的模型训练,如影响模型训练时间或导致模型训练不收敛。目前可通过防守技术来降低攻击者对所造成影响,但是通过防守技术不能识别哪些参与者是攻击者,那么攻击者仍然会窃取联邦学习模型训练的成果,甚至仍然会获得奖励或激励。还有通过商业手段的方法,例如,逐个认证每个参与者的可靠性,来保证联邦学习系统里不出现恶意攻击者或者破坏者,但这种认证方法的适用范围很有限,例如,不能用在大量的移动终端上,因此无法确定每个参与横向联邦学习的移动终端的可靠性和诚实性。
在本实施例中,提出一种联邦学习信用管理方法,实现在联邦学习过程中,对各个参与设备主动地进行信用检测,并根据检测结果对各个参与设备进行信用管理,以避免联邦学习过程中出现的恶意攻击者对联邦学习造成影响。
具体地,在联邦学习过程中,经过多次模型更新,完成对联邦学习模型的训练。在一次模型更新中,协调设备向各个参与设备发送本次模型更新的联合模型参数;各个参与设备利用本次的联合模型参数和各自的本地数据分别对联邦学习模型进行本地训练,得到模型参数更新并返回给协调设备;协调设备接收各个参与设备发送的模型参数更新,并对模型参数更新进行融合处理,得到新的联合模型参数,并在下次模型更新时,将新的联合模型再次发送给各个参与设备。其中,联合模型参数可以是联邦学习模型的参数,例如,神经网络的节点之间连接的权重参数,也可以是联邦学习模型的梯度信息,例如,神经网络梯度下降算法中的梯度信息,梯度信息可以是梯度值或压缩后的梯度值。模型参数更新可以是对联合模型参数的更新,如更新后的神经网络的权重参数。
在上述联邦学习模型的训练过程中,协调设备在每次模型更新时,接收参与联邦学习的各个参与设备发送的模型参数更新。
步骤S20,按照预设信用检测算法对各所述模型参数更新进行检测,得到各所述参与设备的信用检测结果;
协调设备在接收到各个参与设备发送的模型参数更新后,先按照预设信用检测算法对各模型参数更新进行检测,得到各参与设备的信用检测结果。其中,预设信用检测算法可以是预先配置的用于对各模型参数更新进行检测的算法,其原理可以是异常检测、新奇检测或者离群点检测。具体地,由于各个参与设备在一次模型更新过程中,在正常情况下,也即在没有恶意攻击者或行为异常者(因设备故障引起异常行为的参与设备)的情况下,各参与设备训练得到的模型参数更新应该是相似的,例如将各个模型参数更新映射在空间坐标中,各个模型参数更新在空间坐标中的位置应该是比较集中的, 而作为恶意攻击者或行为异常者的参与设备,其发送的模型参数更新应该与其他正常的模型参数更新相似性较低,例如与其他正常的模型参数更新在空间上的距离较远。基于上述原理,预设信用检测算法可以采用常用的异常检测算法,如One Class SVM、Isolation Forest、Local Outlier Factor、聚类算法和统计模型等,目的是将恶意攻击者或行为异常者发送的模型参数更新从各正常的模型参数更新中区分出来,协调设备还可以采用预先训练的自编码器(auto-encoder)对收到的模型参数更新进行检测。需要说明的是,在本实施例中,对协调设备所采用的预设信用检测算法不作具体限制。
协调设备得到的信用检测结果可以是各个参与设备是否为异常设备,具体可以通过将预设信用检测算法的输出配置为0和1来实现,若参与设备的模型参数更新对应的结果是1,则表示该参与设备是诚实的设备,若对应的结果为0,则表示该参与设备是异常设备,也即攻击者。信用检测结果也可以是各个参与设备的异常分数或信用分数,其中,异常分数越高或信用分数越低,表示该参与设备越可能是恶意攻击者,具体地,可以通过将预设信用检测算法的输出配置为异常值或信用值来实现,如通过对各个模型参数更新进行聚类分析,得到多个分组,按照各个组所包含的模型参数更新的数量给各个组计算异常值或信用值,组内模型参数更新的数量越多,对应的异常值越低或信用值越高。
步骤S30,根据所述信用检测结果对各所述参与设备进行信用管理。
协调设备在得到各个参与设备的信用检测结果后,对各个参与设备进行信用管理。具体地,当信用检测结果是各个参与设备是否为异常设备的结果时,协调设备的信用管理过程可以是:根据信用检测结果确定本次模型更新中是否存在异常设备;若存在异常设备,则可以对该异常设备进行异常处理;若不存在异常设备,则说明不存在恶意攻击者,各参与设备均是诚实可信的,此时,协调设备可对各个参与设备的模型参数更新进行融合处理,得到联合模型参数更新。其中,异常处理可包括三种不同处罚严厉度的处理方式,协调设备可以选择其中一种。第一种是在本次模型更新中,不考虑该异常设备的贡献,即协调设备在进行模型参数更新的融合处理时,将该异常设备的模型参数更新不计算在内,只对其他正常参与设备的模型参数更新进行融合处理,并且得到的联合模型参数也不发送给该异常设备;第二种是协调设备将该异常设备从联邦学习参与设备名单中删除,使得该异常设备不能够参与本次联邦学习的后续模型更新,也不能得到对应的奖励或激励;第三种是协调设备在联邦学习参与设备名单中拉黑该异常设备,也即将该异常设备加入黑名单,并在本次联邦学习和以后的联邦学习过程中,均不允许被拉黑的设备参与联邦学习。
当信用检测结果是各个参与设备的异常分数或信用分数时,协调设备的信用管理过程可以是:根据异常分数或信用分数选择上述三种异常处理结果。具体地,以信用检测结果为异常分数的情况进行举例说明(信用分数的场景类似),协调设备设置三个异常阈值,a<b<c,当协调设备检测到参与设备的异 常分数不大于a时,可确定参与设备不是异常设备,在本次模型更新中是可信的,对该参与设备的模型参数更新进行正常的融合操作;当检测到异常分数大于a时,可以确定该参与设备为异常设备,此时,协调设备检测该参与设备的异常分数是否大于b,若不大于b,则可选择处罚严厉度较低的第一种方式;若大于b,则检测异常分数是否大于c,若不大于c,则可选择处罚严厉度较高的第二种方式;若大于c,则可选择处罚严厉度最高的第三种方式。
需要说明的是,协调设备可以在每次模型更新时都进行信用检测,也可以是每隔几次进行一次信用检测,也即可以预先根据需要设置协调设备进行信用检测的频率,以调整协调设备对整个联邦学习系统的信任程度。
在本实施例中,通过在模型更新时,接收到各参与设备发送的模型参数更新后,先按照预设信用检测算法对模型参数更新进行检测,并根据检测得到的信用检测结果来对各参与设备进行信用管理,实现了在联邦学习过程中主动地对各参与设备进行信用检测,以识别联邦学习过程中出现的恶意攻击者或者行为异常者;并在进行模型参数更新的融合操作之前进行检测,实现及时地发现恶意攻击者,以避免恶意攻击者窃取联邦学习的成果;此外,通过协调设备主动地进行信用检测,免去了各参与设备每次模型更新时都发送认证信息进行认证的繁琐操作。
进一步地,基于上述第一实施例,提出本申请联邦学习信用管理方法第二实施例,在本申请联邦学习信用管理方法第二实施例中,所信用检测结果为各所述参与设备的信用分数或异常分数,所述步骤S30包括:
步骤S301,根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值;
在本实施例中,当信用检测结果为各个参与设备的信用分数或异常分数时,协调设备对各参与设备的信用管理方式还可以是:
当协调设备对各模型参数更新进行检测后,得到的信用检测结果为各个参与设备的信用分数或异常分数时,协调设备可根据信用分数或异常分数对应确定各个参与设备的权重值。具体地,协调设备根据信用分数或异常分数确定各个参与设备的权重值的原理是:参与设备的信用分数越小或异常分数越大时,说明该参与设备是攻击者的可能性越大,从而就越不可信,此时,协调设备应该不采用或者较少地采用该参与设备在本次模型更新中作出的贡献,因此,可以给该参与设备分配较小的权重值;当参与设备的信用分数越大或异常分数越小时,说明该参与设备是攻击者的可能性越小,信用度越高,此时,协调设备应该较多地采用该参与设备在本次模型更新中作出的贡献,因此,可以给该参与设备分配较大的权重值。
协调设备可以根据一定的算法对信用分数或异常分数进行计算得到各个参与设备的权重值,以使得异常分数越大或信用分数越小时,计算得到的参与设备对应的权重值越小,异常分数越小或信用分数越大时,计算得到的参与设备对应的权重值越大,也即使得异常分数与权重值呈反比,或信用分数与权重值呈正比。如,协调设备检测得到K个参与设备对应的异常分数{a 1(t), a 2(t),…,a k(t)},其中,t是模型更新的序号,表示第t次模型更新,根据异常分数确定各参与设备的权重值{p 1(t),p 2(t),…,p k(t)},协调设备可使用softmax函数:
Figure PCTCN2019119235-appb-000001
协调设备还可以是预先设置多个分数段以及各个分数段对应的权重值,如将异常分数划分为多个分数段,分数值高的分数段对应的权重值设置得较低,分数值低的分数段对应的权重值设置得较高。协调设备确定各个参与设备的异常分数落入哪个分数段,从而确定各个参与设备的权重值。
步骤S302,根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数;
协调设备在确定各个参与设备的权重值后,根据确定的各个权重值对各个参与设备的模型参数更新进行加权平均,得到联合模型参数。具体地,协调设备可先将每个参与设备对应的模型参数更新与权重值相乘,得到各个参与设备模型参数更新加权的结果,然后将各个参与设备模型参数更新加权的结果相加,得到的结果即作为本次模型更新得到的新的联合模型参数。
步骤S303,将所述联合模型参数发送给各所述参与设备,以供各所述参与设备根据所述联合模型参数进行本地模型训练,以对各所述参与设备进行信用管理。
协调设备将加权平均得到的联合模型参数发送给各个参与设备,以开始新一轮的模型更新。各个参与设备在接收到协调设备发送的联合模型参数后,各自根据联合模型参数和其本地数据,对联邦学习模型进行本地模型训练,得到新一轮模型更新的模型参数更新,其中,本地数据是参与设备本地拥有的用于对联邦学习模型进行训练的数据。各参与设备将得到的新一轮的模型参数更新发送给协调设备,协调设备根据新一轮的模型参数更新,继续进行信用检测,循环直到协调设备检测到联邦学习模型收敛后,将最终确定的联邦学习模型的参数发送给各个参与设备,即完成了本次联邦学习。
在本实施例中,通过当对各模型参数更新进行检测,得到各个参与设备的信用分数或异常分数后,根据信用分数或异常分数确定各个参与设备的权重值,根据权重值对各个参与设备的模型参数更新进行加权平均,得到联合模型参数,将联合模型参数发送给各个参与设备,使得当参与设备的信用分数越低或异常分数越高时,对该参与设备的模型参数更新的利用越少,从而减少作为恶意攻击者的参与设备或可能是恶意攻击者的参与设备对联邦学习的影响,从而有效地提高了联邦学习的学习质量。并且,随着联邦学习模型训练的进行,协调设备给每个参与设备分配的权重值是动态变化的,随着信用检测结果而变,可以防止只根据一次信用检测结果就错误的把一个诚实的参与设备判定为攻击者。
进一步地,步骤S301包括:
步骤S3011,当所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数时,将所述信用分数或所述异常分数对应参与设备的权重值设置为零;
当协调设备检测得到各参与设备的信用分数或异常分数后,可检测各参与设备的信用分数是否小于预设信用分数,或检测各参与设备的异常分数是否大于预设异常分数。其中,预设信用分数和预设异常分数可根据需要进行设置,可将预设信用分数设置得较小,以使得参与设备的信用分数小于该预设信用分数时,表示该参与设备的模型参数更新异常,极可能是恶意攻击者,同样,可将预设异常分数设置得较大。
当协调设备检测到参与设备的信用分数小于预设信用分数,或异常分数大于预设异常分数时,将该参与设备的权重值设置为零,也即,当协调设备可以确定在本次模型更新中参与设备可能是攻击者时,可通过将该参与设备的权重值设置为零,以实现在本次模型更新中不采用该参与设备的模型参数更新,不考虑该参与设备的贡献,从而避免可能是攻击者的该参与设备对联邦学习的影响。
需要说明的时,对于信用分数不小于预设信用分数,或异常分数不大于预设异常分数的其他参与设备,协调设备可采用上述通过算法或分数段确定权重值的方式,来确定其他参与设备的权重值,以使得当参与设备的信用分数越低或异常分数越高时,对该参与设备的模型参数更新的利用越少,从而减少作为恶意攻击者的参与设备或可能是恶意攻击者的参与设备对联邦学习的影响。
所述步骤S303包括:
步骤S3031,将所述联合模型参数发送给各所述参与设备中所述权重值不为零的参与设备。
当协调设备将联合模型参数发送给各个参与设备时,协调设备可以将联合模型参数发送给各个参与设备中权重值不为零的参与设备,也即,不发送给权重值为零的参与设备,因为在本次模型更新中,协调设备并未采用该参与设备的模型参数更新,因此,也不将计算得到的联合模型参数发送给该参与设备,从而避免可能是恶意攻击者的该参与设备窃取联邦学习的成果,从而保证联邦学习的公平性。
进一步地,基于上述第二实施例,提出本申请联邦学习信用管理方法第三实施例,在本申请联邦学习信用管理方法第三实施例中,所述步骤S301之前,包括:
步骤S304,根据所述信用分数或所述异常分数确定各所述参与设备是否为异常设备;
协调设备在每次模型更新确定各个参与设备的权重值之前,可以先根据本次检测得到的各参与设备的信用分数或异常分数,确定各参与设备是否是异常设备。具体地,协调设备可检测参与设备的信用分数是否小于预设信用 分数,或者检测参与设备的异常分数是否大于预设信用分数,以使得当参与设备的信用分数小于该预设信用分数,或异常分数小于该预设异常分数时,可判定该参与设备是恶意攻击者。需要说明的是,步骤S304中的预设信用分数、预设异常分数,与步骤S3011中的可以相同,此时协调设备择一实施步骤S304和步骤S3011;也可以不相同,通过预先设置使得步骤S304中的预设信用分数大于步骤S3011中的预设信用分数,或步骤S304中的预设异常分数小于步骤S3011中的预设异常分数,此时,协调设备可先进行步骤S304的判断,再进行S3011的判断,从而实现根据异常分数或信用分数的不同分数段,选择不同严厉度的管理方式。
步骤S305,当确定目标参与设备为异常设备时,在联邦学习的参与设备名单中删除所述目标参与设备或将所述目标参与设备加入黑名单;
当协调设备确定目标参与设备为异常设备时,在联邦学习的参与设备名单中删除该目标参与设备或者将该目标参与设备加入黑名单。其中,将该参与设备加入联邦学习的黑名单中,当前联邦学习的参与设备名单中也不再有该参与设备。
需要说明的是,对于异常设备以外的其他正常参与设备,协调设备可采用上述通过算法或分数段确定权重值的方式,来确定其他参与设备的权重值,以使得当参与设备的信用分数越低或异常分数越高时,对该参与设备的模型参数更新的利用越少,从而减少作为恶意攻击者的参与设备或可能是恶意攻击者的参与设备对联邦学习的影响。
所述步骤S301包括:
步骤S3012,根据所述信用分数或所述异常分数对应确定当前联邦学习参与设备名单中各参与设备的权重值。
协调设备根据信用分数或异常分数对应确定当前联邦学习参与设备名单中各参与设备的权重值。此步骤与步骤S301的区别是,此步骤中,协调设备仅确定当前联邦学习参与设备名单中各参与设备的权重值,对于不在名单内,也即被删除或拉黑的参与设备,联邦学习在本次联邦学习后续的模型更新中不再采用该参与设备的模型参数更新,也就不再给该参与设备分配权重值,进一步地,对于被拉黑的参与设备,协调设备在以后的联邦学习中,也不再允许该参与设备参与联邦学习。
在本实施例中,通过当明确参与设备是异常设备,即攻击者时,对该参与设备采取除名或拉黑的严厉管理措施,以使得该参与设备不能够对联邦学习造成影响,也不能窃取联邦学习的训练成果,从而提高了联邦学习的公平性,提高了诚实参与设备的积极性。
进一步地,所述步骤S304包括:
步骤S3041,对每次模型更新中所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数的参与设备进行记录,得到各所述参与设备的异常次数;
为避免只根据一次信用检测结果就错误的把一个诚实的参与设备判定为 异常设备、攻击者,协调设备确定异常设备的方式可以是:协调设备可在每次模型更新检测得到各参与设备的信用分数或异常分数时,对信用分数小于预设信用分数,或异常分数大于预设异常分数的参与设备进行记录,统计得到各参与设备的异常次数。如协调设备在已经经历的5次模型更新中,第4次和第5次时都检测到参与设备1的信用分数小于预设信用分数,在本次,即第6次模型更新时,协调设备检测得到各个参与设备的信用分数后,检测到参与设备1的信用分数小于预设信用分数,则协调设备对参与设备1进行记录,得到参与设备1的异常次数为3次;对于6次模型更新中信用分数均不小于预设信用分数的参与设备,协调设备统计得到该参与设备的异常次数为0。也即,协调设备在每次模型更新检测得到各参与设备的异常分数或信用分数后,更新各个参与设备的异常次数。
需要说明的是,步骤S3041中的预设信用分数、预设异常分数与步骤S3011中的预设信用分数、预设异常分数可以相同,也可以不相同,在此不作限制。
步骤S3042,检测各所述参与设备的异常次数是否大于预设次数;
协调设备在得到各个参与设备的异常次数后,检测各个参与设备的异常次数是否大于预设次数,其中,预设次数可根据需要进行设置,为实现避免一次误判的效果,预设次数应当设置得大于或等于1。
步骤S3043,将所述异常次数大于所述预设次数的参与设备确定为异常设备。
当协调设备检测参与设备的异常次数大于预设次数时,将该参与设备确定为异常设备。也即,当参与设备在多次模型更新中发送的模型参数更新都异常时,可肯定该参与设备出现异常,几乎可以肯定该参与设备是攻击者。
在本实施例中,通过在模型更新时,统计各个参与设备的异常次数,并当异常次数大于预设次数时,就将该参与设备判定为异常设备,对该异常设备进行除名或拉黑的异常处理,避免了根据参与设备的一次信用检测结果异常就判定该参与设备是异常设备,从而提高了判定攻击者的准确性。
进一步地,基于上述第二或第三实施例,提出本申请联邦学习信用管理方法第四实施例,在本申请联邦学习信用管理方法第四实施例中,所述步骤S302之前,包括:
步骤S306,将所述信用分数、所述异常分数或所述权重值对应发送给各所述参与设备;
协调设备可以根据异常分数或信用分数确定各个参与设备的权重值之后,在根据权重值对各个参与设备的模型参数更新进行融合处理之前,将信用分数、异常分数或者是权重值发送给对应的参与设备。协调设备也可以是在确定参与设备的权重值之前,将信用分数或异常分数发送给对应的参与设备。
步骤S307,接收目标参与设备发送的认证信息,其中,所述目标参与设备在检测到所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数,或所述权重值小于预设权重值时发送所述认证信息;
各参与设备在接收到协调设备发送的信用分数、异常分数或权重值后,可检测信用分数是否小于预设信用分数,或者检测异常分数是否大于预设异常分数,或者检测权重值是否小于预设权重值,当参与设备检测到信用分数小于预设信用分数,或检测到异常分数大于预设异常分数,或检测到权重值小于预设权重值时,发送认证信息给协调设备。其中,认证信息中可携带预先与协调设备商定的认证密码或其他认证数据。
协调设备接收目标参与设备发送的认证信息。
需要说明的是,步骤S307中的预设信用分数、预设异常分数与上述实施例中的预设信用分数、预设异常分数可以相同也可以不相同,不作具体限制。
步骤S308,根据所述认证信息对所述目标参与设备进行身份认证,得到身份认证结果;
协调设备根据接收到的认证信息对目标参与设备进行身份认证,得到身份认证结果。具体地,协调设备可提取认证信息中的认证密码或其他认证数据,将提取到的认证密码与预先存储的认证密码进行比对,或将提取到的认证数据与或预先存储认证数据进行比对,若是一致的,则身份认证结果是该参与设备是诚实的参与设备,不是攻击者,若不是一致的,则身份认证结果是该参与设备是恶意攻击者。
所述步骤S302包括:
步骤S3021,根据所述身份认证结果和各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数。
此步骤与步骤S302的区别在于,此步骤中,协调设备可根据身份认证结果确定是否对各个参与设备的权重值、信用分数或异常分数进行调整,具体地,当参与设备的身份认证结果是该参与设备不是攻击者时,协调设备可将该参与设备对应较低的权重值调高,或者将该参与设备的信用分数调为满分,或将该参与设备的异常分数调为零分;或者是当协调设备在本次模型更新时已经将该参与设备拉黑或从参与设备名单中删除时,协调设备可将该参与设备重新添加至参与设备名单中,并为该参与设备分配较高的权重值;或者是协调设备在本次模型更新时已将该参与设备的异常次数加一时,协调设备可将该参与设备的异常次数清零。
在本实施例中,通过将各个参与设备的信用分数、异常分数或权重值发送给各个参与设备,使得参与设备在被怀疑时(即异常分数很高、或信用分数很低、或权重值很低时),可以向协调设备发送认证信息进行申述,从而进一步地避免了诚实的参与设备被误判为攻击者。此外,也有效避免了参与设备每次向协调设备发送模型参数更新时都要携带认证信息,而只有当该参与设备被怀疑时才向协调设备发送认证信息,可以有效节省通信带宽和减低计算量。
进一步地,为减少协调设备的计算量,步骤S20包括:
步骤S201,将各所述模型参数更新分别进行降维处理,得到低维度的模型参数更新;
协调设备对各个模型参数更新进行降维处理,得到低维度的模型参数更新。由于参与设备发送的模型参数更新可能是一个很高维度的向量,特别是当联邦学习模型是深度学习模型时,模型参数更新的维度可能高达100万维,甚至1千万维。因此,协调设备可对模型参数更新进行降维处理。具体地,协调设备可以采用随机采样的方法进行降维处理,例如从100万维的模型参数更新中随机抽取100维,作为低维度的模型参数更新。协调设备还可以采用特征工程的方式进行降维度处理,例如从模型参数更新中抽取与该参与设备的前次模型参数更新相比变化较大的维度。当联邦学习模型是神经网络时,协调设备还可以选取神经网络的最后一层的参数作为低维度的模型参数更新。需要说明的是,在本实施例中,对协调设备的降维方式不作具体限定,优选是使得降维后的低维度模型参数更新任能够反映原模型参数更新的特征的降维方式。
步骤S202,按照预设信用检测算法对各所述低维度的模型参数更新进行检测,得到各所述参与设备的信用检测结果。
协调设备按照预设信用检测算法对各个低维度的模型参数更新进行检测,得到各个参与设备的信用检测结果。需要说明的是,此步骤中的信用检测算法与步骤S20中的信用检测算法相同,不再详细赘述,此步骤与步骤S20的区别在于,此步骤中协调设备对低维度的模型参数更新进行检测,降低了计算复杂度,从而节省了协调设备的检测时间,加快了联邦学习模型的训练速度。
此外,此外本申请实施例还提出一种联邦学习信用管理装置,参照图3,所述联邦学习信用管理装置包括:
接收模块10,设置为接收参与联邦学习的各参与设备发送的模型参数更新;
检测模块20,设置为按照预设信用检测算法对各所述模型参数更新进行检测,得到各所述参与设备的信用检测结果;
管理模块30,设置为根据所述信用检测结果对各所述参与设备进行信用管理。
进一步地,所述信用检测结果为各所述参与设备的信用分数或异常分数,所述管理模块30包括:
确定单元,设置为根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值;
计算单元,设置为根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数;
发送单元,设置为将所述联合模型参数发送给各所述参与设备,以供各所述参与设备根据所述联合模型参数进行本地模型训练,以对各所述参与设备进行信用管理。
进一步地,所述确定单元包括:
设置子单元,设置为当所述信用分数小于预设信用分数,或所述异常分 数大于预设异常分数时,将所述信用分数或所述异常分数对应参与设备的权重值设置为零;
所述发送单元还设置为将所述联合模型参数发送给各所述参与设备中所述权重值不为零的参与设备。
进一步地,所述确定单元还设置为在根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值之前,根据所述信用分数或所述异常分数确定各所述参与设备是否为异常设备;
所述管理模块30还包括:
异常处理单元,设置为当确定目标参与设备为异常设备时,在联邦学习的参与设备名单中删除所述目标参与设备或将所述目标参与设备加入黑名单;
所述确定单元还设置为根据所述信用分数或所述异常分数对应确定当前联邦学习参与设备名单中各参与设备的权重值。
进一步地,所述确定单元还包括:
记录子单元,设置为对每次模型更新中所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数的参与设备进行记录,得到各所述参与设备的异常次数;
检测子单元,设置为检测各所述参与设备的异常次数是否大于预设次数;
确定子单元,设置为将所述异常次数大于所述预设次数的参与设备确定为异常设备。
进一步地,所述发送单元还设置为在根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数之前,将所述信用分数、所述异常分数或所述权重值对应发送给各所述参与设备;
所述管理模块30还包括:
接收单元,设置为接收目标参与设备发送的认证信息,其中,所述目标参与设备在检测到所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数,或所述权重值小于预设权重值时发送所述认证信息;
认证单元,设置为根据所述认证信息对所述目标参与设备进行身份认证,得到身份认证结果;
所述计算单元还设置为根据所述身份认证结果和各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数。
进一步地,所述检测模块20包括:
降维处理单元,设置为将各所述模型参数更新分别进行降维处理,得到低维度的模型参数更新;
检测单元,设置为按照预设信用检测算法对各所述低维度的模型参数更新进行检测,得到各所述参与设备的信用检测结果。
本申请联邦学习信用管理装置的具体实施方式的拓展内容与上述联邦学习信用管理方法各实施例基本相同,在此不做赘述。
此外,本申请实施例还提出一种计算机可读存储介质,所述存储介质上 存储有联邦学习信用管理程序,所述联邦学习信用管理程序被处理器执行时实现如下所述的联邦学习信用管理方法的步骤。
本申请联邦学习信用管理设备和计算机可读存储介质的各实施例,均可参照本申请联邦学习信用管理方法各个实施例,此处不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种联邦学习信用管理方法,其中,所述联邦学习信用管理方法包括以下步骤:
    接收参与联邦学习的各参与设备发送的模型参数更新;
    按照预设信用检测算法对各所述模型参数更新进行检测,得到各所述参与设备的信用检测结果;以及,
    根据所述信用检测结果对各所述参与设备进行信用管理。
  2. 如权利要求1所述的联邦学习信用管理方法,其中,所述信用检测结果为各所述参与设备的信用分数或异常分数,所述根据所述信用检测结果对各所述参与设备进行信用管理的步骤包括:
    根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值;
    根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数;
    将所述联合模型参数发送给各所述参与设备,以供各所述参与设备根据所述联合模型参数进行本地模型训练。
  3. 如权利要求2所述的联邦学习信用管理方法,其中,所述根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值的步骤包括:
    当所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数时,将所述信用分数或所述异常分数对应参与设备的权重值设置为零;
    所述将所述联合模型参数发送给各所述参与设备的步骤包括:
    将所述联合模型参数发送给各所述参与设备中所述权重值不为零的参与设备。
  4. 如权利要求2所述的联邦学习信用管理方法,其中,所述根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值的步骤之前,还包括:
    根据所述信用分数或所述异常分数确定各所述参与设备是否为异常设备;
    当确定目标参与设备为异常设备时,在联邦学习的参与设备名单中删除所述目标参与设备或将所述目标参与设备加入黑名单;
    所述根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值的步骤包括:
    根据所述信用分数或所述异常分数对应确定当前联邦学习参与设备名单中各参与设备的权重值。
  5. 如权利要求4所述的联邦学习信用管理方法,其中,所述根据所述信用分数或所述异常分数确定各所述参与设备是否为异常设备的步骤包括:
    对每次模型更新中所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数的参与设备进行记录,得到各所述参与设备的异常次数;
    检测各所述参与设备的异常次数是否大于预设次数;
    将所述异常次数大于所述预设次数的参与设备确定为异常设备。
  6. 如权利要求2所述的联邦学习信用管理方法,其中,所述根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数的步骤之前,还包括:
    将所述信用分数、所述异常分数或所述权重值对应发送给各所述参与设备;
    接收目标参与设备发送的认证信息,其中,所述目标参与设备在检测到所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数,或所述权重值小于预设权重值时发送所述认证信息;
    根据所述认证信息对所述目标参与设备进行身份认证,得到身份认证结果;
    所述根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数的步骤包括:
    根据所述身份认证结果和各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数。
  7. 如权利要求1所述的联邦学习信用管理方法,其中,所述按照预设信用检测算法对各所述模型参数更新进行检测,得到各所述参与设备的信用检测结果的步骤包括:
    将各所述模型参数更新分别进行降维处理,得到低维度的模型参数更新;
    按照预设信用检测算法对各所述低维度的模型参数更新进行检测,得到各所述参与设备的信用检测结果。
  8. 一种联邦学习信用管理装置,其中,所述联邦学习信用管理装置包括:
    接收模块,设置为接收参与联邦学习的各参与设备发送的模型参数更新;
    检测模块,设置为按照预设信用检测算法对各所述模型参数更新进行检测,得到各所述参与设备的信用检测结果;以及,
    管理模块,设置为根据所述信用检测结果对各所述参与设备进行信用管理。
  9. 如权利要求8所述的联邦学习信用管理装置,其中,所述信用检测结果为各所述参与设备的信用分数或异常分数,所述管理模块包括:
    确定单元,设置为根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值;
    计算单元,设置为根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数;
    发送单元,设置为将所述联合模型参数发送给各所述参与设备,以供各所述参与设备根据所述联合模型参数进行本地模型训练,以对各所述参与设备进行信用管理。
  10. 如权利要求9所述的联邦学习信用管理装置,其中,所述确定单元包括:
    设置子单元,设置为当所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数时,将所述信用分数或所述异常分数对应参与设备的权 重值设置为零;
    所述发送单元还设置为将所述联合模型参数发送给各所述参与设备中所述权重值不为零的参与设备。
  11. 如权利要求9所述的联邦学习信用管理装置,其中,所述确定单元还设置为在根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值之前,根据所述信用分数或所述异常分数确定各所述参与设备是否为异常设备;
    所述管理模块还包括:
    异常处理单元,设置为当确定目标参与设备为异常设备时,在联邦学习的参与设备名单中删除所述目标参与设备或将所述目标参与设备加入黑名单;
    所述确定单元还设置为根据所述信用分数或所述异常分数对应确定当前联邦学习参与设备名单中各参与设备的权重值。
  12. 一种联邦学习信用管理设备,其中,所述联邦学习信用管理设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的联邦学习信用管理程序,所述联邦学习信用管理程序被所述处理器执行时实现如下步骤:
    接收参与联邦学习的各参与设备发送的模型参数更新;
    按照预设信用检测算法对各所述模型参数更新进行检测,得到各所述参与设备的信用检测结果;以及,
    根据所述信用检测结果对各所述参与设备进行信用管理。
  13. 如权利要求12所述的联邦学习信用管理设备,其中,所述信用检测结果为各所述参与设备的信用分数或异常分数,所述根据所述信用检测结果对各所述参与设备进行信用管理的步骤包括:
    根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值;
    根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数;
    将所述联合模型参数发送给各所述参与设备,以供各所述参与设备根据所述联合模型参数进行本地模型训练。
  14. 如权利要求13所述的联邦学习信用管理设备,其中,所述根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值的步骤包括:
    当所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数时,将所述信用分数或所述异常分数对应参与设备的权重值设置为零;
    所述将所述联合模型参数发送给各所述参与设备的步骤包括:
    将所述联合模型参数发送给各所述参与设备中所述权重值不为零的参与设备。
  15. 如权利要求13所述的联邦学习信用管理设备,其中,所述根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值的步骤之前,还包括:
    根据所述信用分数或所述异常分数确定各所述参与设备是否为异常设备;
    当确定目标参与设备为异常设备时,在联邦学习的参与设备名单中删除所述目标参与设备或将所述目标参与设备加入黑名单;
    所述根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值的步骤包括:
    根据所述信用分数或所述异常分数对应确定当前联邦学习参与设备名单中各参与设备的权重值。
  16. 如权利要求15所述的联邦学习信用管理设备,其中,所述根据所述信用分数或所述异常分数确定各所述参与设备是否为异常设备的步骤包括:
    对每次模型更新中所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数的参与设备进行记录,得到各所述参与设备的异常次数;
    检测各所述参与设备的异常次数是否大于预设次数;
    将所述异常次数大于所述预设次数的参与设备确定为异常设备。
  17. 如权利要求13所述的联邦学习信用管理设备,其中,所述根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数的步骤之前,还包括:
    将所述信用分数、所述异常分数或所述权重值对应发送给各所述参与设备;
    接收目标参与设备发送的认证信息,其中,所述目标参与设备在检测到所述信用分数小于预设信用分数,或所述异常分数大于预设异常分数,或所述权重值小于预设权重值时发送所述认证信息;
    根据所述认证信息对所述目标参与设备进行身份认证,得到身份认证结果;
    所述根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数的步骤包括:
    根据所述身份认证结果和各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数。
  18. 如权利要求12所述的联邦学习信用管理设备,其中,所述按照预设信用检测算法对各所述模型参数更新进行检测,得到各所述参与设备的信用检测结果的步骤包括:
    将各所述模型参数更新分别进行降维处理,得到低维度的模型参数更新;
    按照预设信用检测算法对各所述低维度的模型参数更新进行检测,得到各所述参与设备的信用检测结果。
  19. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有联邦学习信用管理程序,所述联邦学习信用管理程序被处理器执行时实现如下步骤:
    接收参与联邦学习的各参与设备发送的模型参数更新;
    按照预设信用检测算法对各所述模型参数更新进行检测,得到各所述参与设备的信用检测结果;以及,
    根据所述信用检测结果对各所述参与设备进行信用管理。
  20. 如权利要求19所述的计算机可读存储介质,其中,所述信用检测结果为各所述参与设备的信用分数或异常分数,所述根据所述信用检测结果对各所述参与设备进行信用管理的步骤包括:
    根据所述信用分数或所述异常分数对应确定各所述参与设备的权重值;
    根据各所述参与设备的权重值,对各所述参与设备的所述模型参数更新进行加权平均,得到联合模型参数;
    将所述联合模型参数发送给各所述参与设备,以供各所述参与设备根据所述联合模型参数进行本地模型训练。
PCT/CN2019/119235 2019-08-28 2019-11-18 联邦学习信用管理方法、装置、设备及可读存储介质 WO2021036014A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910802526.4 2019-08-28
CN201910802526.4A CN110503207A (zh) 2019-08-28 2019-08-28 联邦学习信用管理方法、装置、设备及可读存储介质

Publications (1)

Publication Number Publication Date
WO2021036014A1 true WO2021036014A1 (zh) 2021-03-04

Family

ID=68588718

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/119235 WO2021036014A1 (zh) 2019-08-28 2019-11-18 联邦学习信用管理方法、装置、设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN110503207A (zh)
WO (1) WO2021036014A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220060235A1 (en) * 2020-08-18 2022-02-24 Qualcomm Incorporated Federated learning for client-specific neural network parameter generation for wireless communication

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110874647A (zh) * 2020-01-16 2020-03-10 支付宝(杭州)信息技术有限公司 联盟学习中的私有数据评估、联盟学习方法、装置及系统
CN111445031B (zh) * 2020-03-31 2021-07-27 深圳前海微众银行股份有限公司 一种应对攻击的方法及联邦学习装置
CN111598254B (zh) * 2020-05-22 2021-10-08 深圳前海微众银行股份有限公司 联邦学习建模方法、设备及可读存储介质
CN112214342A (zh) * 2020-09-14 2021-01-12 德清阿尔法创新研究院 一种联邦学习场景中高效的错误数据检测方法
CN112132277A (zh) * 2020-09-21 2020-12-25 平安科技(深圳)有限公司 联邦学习模型训练方法、装置、终端设备及存储介质
CN112257063B (zh) * 2020-10-19 2022-09-02 上海交通大学 一种基于合作博弈论的联邦学习中后门攻击的检测方法
CN112418434A (zh) * 2020-11-06 2021-02-26 中国石油大学(华东) 一种基于强化学习的联邦学习模型融合策略
CN112446025A (zh) * 2020-11-23 2021-03-05 平安科技(深圳)有限公司 联邦学习防御方法、装置、电子设备及存储介质
CN112465626B (zh) * 2020-11-24 2023-08-29 平安科技(深圳)有限公司 基于客户端分类聚合的联合风险评估方法及相关设备
CN114650288B (zh) * 2020-12-02 2024-03-08 中国科学院深圳先进技术研究院 分布式训练方法及系统、终端设备、计算机可读存储介质
CN112966233A (zh) * 2021-02-23 2021-06-15 杭州安恒信息技术股份有限公司 用户风险操作的检测方法、装置和计算机设备
WO2023011728A1 (en) * 2021-08-06 2023-02-09 Nokia Technologies Oy Trustworthy federated learning
CN114285556B (zh) * 2021-12-15 2023-12-01 西藏北纬科技有限公司 一种基于联邦学习的隐私保护特征工程方法
CN114363082A (zh) * 2022-01-12 2022-04-15 平安普惠企业管理有限公司 网络攻击检测方法、装置、设备及计算机可读存储介质
CN115907003A (zh) * 2022-12-07 2023-04-04 中国人民解放军国防科技大学 基于度量学习的联邦学习恶意模型更新的检测方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107871160A (zh) * 2016-09-26 2018-04-03 谷歌公司 通信高效联合学习
CN109165515A (zh) * 2018-08-10 2019-01-08 深圳前海微众银行股份有限公司 基于联邦学习的模型参数获取方法、系统及可读存储介质
US20190205745A1 (en) * 2017-12-29 2019-07-04 Intel Corporation Communication optimizations for distributed machine learning
CN110008980A (zh) * 2019-01-02 2019-07-12 阿里巴巴集团控股有限公司 识别模型生成方法、识别方法、装置、设备及存储介质
CN110008696A (zh) * 2019-03-29 2019-07-12 武汉大学 一种面向深度联邦学习的用户数据重建攻击方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106886915B (zh) * 2017-01-17 2020-07-28 华南理工大学 一种基于时间衰减采样的广告点击预估方法
CN109685536B (zh) * 2017-10-18 2021-01-26 北京京东尚科信息技术有限公司 用于输出信息的方法和装置
CN109871702A (zh) * 2019-02-18 2019-06-11 深圳前海微众银行股份有限公司 联邦模型训练方法、系统、设备及计算机可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107871160A (zh) * 2016-09-26 2018-04-03 谷歌公司 通信高效联合学习
US20190205745A1 (en) * 2017-12-29 2019-07-04 Intel Corporation Communication optimizations for distributed machine learning
CN109165515A (zh) * 2018-08-10 2019-01-08 深圳前海微众银行股份有限公司 基于联邦学习的模型参数获取方法、系统及可读存储介质
CN110008980A (zh) * 2019-01-02 2019-07-12 阿里巴巴集团控股有限公司 识别模型生成方法、识别方法、装置、设备及存储介质
CN110008696A (zh) * 2019-03-29 2019-07-12 武汉大学 一种面向深度联邦学习的用户数据重建攻击方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220060235A1 (en) * 2020-08-18 2022-02-24 Qualcomm Incorporated Federated learning for client-specific neural network parameter generation for wireless communication
US11909482B2 (en) * 2020-08-18 2024-02-20 Qualcomm Incorporated Federated learning for client-specific neural network parameter generation for wireless communication

Also Published As

Publication number Publication date
CN110503207A (zh) 2019-11-26

Similar Documents

Publication Publication Date Title
WO2021036014A1 (zh) 联邦学习信用管理方法、装置、设备及可读存储介质
US11005839B1 (en) System and method to identify abnormalities to continuously measure transaction risk
US10579784B2 (en) System, device, and method of secure utilization of fingerprints for user authentication
US20210139127A1 (en) Methods and systems for identifying and authorizing a user based on a mini-game login
US10360367B1 (en) Multi-factor authentication devices
EP3256976B1 (en) Toggling biometric authentication
EP2933981B1 (en) Method and system of user authentication
US8910251B2 (en) Using social information for authenticating a user session
Ceccarelli et al. Continuous and transparent user identity verification for secure internet services
CN104767713B (zh) 账号绑定的方法、服务器及系统
CN108347444A (zh) 基于区块链的身份认证方法、装置及计算机可读存储介质
US11676118B2 (en) Methods and systems for conducting multi-user interactions on a device using biometric authentication
US11438342B2 (en) Location-based identity authentication (LIA) system
CN110120928A (zh) 一种身份认证的方法、装置、服务器及计算机可读介质
US20230074342A1 (en) Method to detect and counteract suspicious activity in an application environment
CN107533596B (zh) 指纹识别方法及移动终端
US20240007476A1 (en) Multi-factor authentication using confidant verification of user identity
CN109246178B (zh) 一种在线题目发放方法、装置、服务器及存储介质
US9639677B1 (en) Skill-based authentication
CN109862035A (zh) 游戏app账号验证方法及设备
CN107045613B (zh) 一种信息监控的控制方法及装置
EP3819797B1 (en) Methods and systems for identifying and authorizing a user based on a mini-game login
KR20180017784A (ko) 부정 통제 장치 및 방법
CN108512815A (zh) 防盗链检测方法、防盗链检测装置和服务器
CN112765588A (zh) 一种身份识别方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19942966

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19942966

Country of ref document: EP

Kind code of ref document: A1