Data processing method and related device
By evaluating the degree of forget learning completion of the first global model on personalized category data, the problem of inaccurate judgment of federal forget learning in the prior art is solved, and more efficient federated forget learning is achieved.
Patent Information
- Application Number
- PCT/CN2023/126287
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-10-24
- Publication Date
- 2025-05-01
AI Technical Summary
The prior art is difficult to effectively realize federal forget learning, especially when judging whether federal forget learning is needed, there are overhead problems caused by unnecessary forget learning and model performance recovery.
By determining the degree of forget learning completion of the first global model on personalized category data, it is determined whether federated forget learning is needed, thereby avoiding unnecessary forget learning and model performance recovery.
A more accurate judgment is achieved on whether federal forgetting learning is needed, which avoids unnecessary overhead and improves the efficiency and effectiveness of federal forgetting learning.
Smart Images

Figure CN2023126287_01052025_PF_FP_ABST
Abstract
Description
Data processing method and related device Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data processing method and related devices. Background Art
[0002] Federated learning (FL) is a distributed learning method. Specifically, distributed nodes train local models based on local data and send them to a central node. The central node then fuses the local models reported by each distributed node to form a global model. However, if a local node requests to exit federated learning and delete its contribution to the training of the global model, federated forgetting learning based on the global model is performed. This removes the local node's contribution to the training of the global model, achieving federated forgetting learning in a federated learning scenario.
[0003] However, how to better implement federated forgetting learning is a question worth considering.
[0004] Summary of the Invention
[0005] This application provides a data processing method and related apparatus, which are used by a first device to determine the degree of forgetting learning completion of a first global model on personalized category data, and based on the degree of forgetting learning completion, determine whether to perform federated forgetting learning on the personalized category data. This method effectively determines whether federated forgetting learning is necessary, avoiding the overhead associated with unnecessary federated forgetting learning and model performance recovery, thereby better implementing federated forgetting learning.
[0006] In a first aspect, the present application provides a data processing method, which can be performed by a first device. The first device can be a terminal device or a network device, or a component in the terminal device or network device (for example, a processor, a chip, or a chip system, etc.), or a logic module or software that can implement all or part of the functions of the terminal device, or a logic module or software that can implement all or part of the functions of the network device. The method includes:
[0007] The first device determines the personalized category data of the first device; the first device determines the degree of forgetting learning completion of the first global model on the personalized category data, where the first global model is the global model at the moment the first device applies for or executes forgetting learning judgment; and the first device determines whether to perform federated forgetting learning on the personalized category data based on the degree of forgetting learning completion. Optionally, the degree of forgetting learning completion of the first global model on the personalized category data represents the extent to which the first global model has forgotten the personalized category data. This effectively determines whether federated forgetting learning is necessary, avoiding the overhead associated with unnecessary federated forgetting learning and model performance recovery, thereby better implementing federated forgetting learning.
[0008] Based on the first aspect, in a possible implementation method, the first device determines whether to perform federated forget learning on the personalized category data based on the degree of forget learning completion, including: if the degree of forget learning completion is less than the first threshold, the first device determines to perform federated forget learning on the personalized category data; or, if the degree of forget learning completion is greater than or equal to the first threshold, the first device determines not to perform federated forget learning on the personalized category data. It can be seen that if the degree of forget learning completion is less than the first threshold, it means that the personalized category data has not been completed by forget learning, and therefore, federated forget learning is required for the personalized category data. If the degree of forget learning completion is greater than or equal to the first threshold, it means that the personalized category data has been completely forgotten, and therefore, there is no need to perform federated forget learning on the personalized category data. The first device can effectively determine whether federated forget learning is needed based on the degree of forget learning completion, thereby avoiding unnecessary federated forget learning.
[0009] Based on the first aspect, in one possible implementation, if the degree of forgetting learning completion is less than or equal to a first threshold, the first device determines to perform federated forgetting learning on the personalized category data; alternatively, if the degree of forgetting learning completion is greater than the first threshold, the first device determines not to perform federated forgetting learning on the personalized category data. It can be seen that if the degree of forgetting learning completion is less than or equal to the first threshold, it means that the personalized category data has not been completely forgotten, and therefore, federated forgetting learning is required for the personalized category data. If the degree of forgetting learning completion is greater than the first threshold, it means that the personalized category data has been completely forgotten, and therefore, there is no need to perform federated forgetting learning on the personalized category data. The first device can effectively determine whether federated forgetting learning is necessary based on the degree of forgetting learning completion, thereby avoiding unnecessary federated forgetting learning.
[0010] Based on the first aspect, in one possible implementation, if the first device determines to perform federated forget learning on the personalized category data, the method further includes: the first device sending a forget learning request to the second device, where the forget learning request is used to request to initiate federated forget learning on the personalized category data. This facilitates the first device performing federated forget learning on the personalized category data.
[0011] Based on the first aspect, in one possible implementation, if the first device determines not to perform federated forgetting learning for the personalized category data, the method further includes: the first device sending a first exit instruction to the second device, where the first exit instruction is used to notify the second device to exit the federated learning process. This allows the first device to exit the federated learning process. Optionally, the first exit instruction may also be referred to as a first exit notification, a first notification, etc., which is not specifically limited in this application.
[0012] Based on the first aspect, in one possible implementation, the degree of forgetting learning completion of the first global model on personalized category data is determined based on a first accuracy rate and a second accuracy rate, wherein the first accuracy rate represents the classification accuracy of the first global model on the personalized category data, and the second accuracy rate represents the classification accuracy of the second global model on the personalized category data. The second global model is the global model at the moment the first device joins the federated learning process, and the moment the first device applies for or executes the forgetting learning judgment is after the moment the first device joins the federated learning process. This implementation illustrates a method for determining the degree of forgetting learning completion of the first global model on personalized category data, which facilitates the implementation of the solution. Optionally, the degree of forgetting learning completion of the first global model on personalized category data is equal to the second accuracy rate / the first accuracy rate, thereby representing the degree of forgetting learning of the first global model on the personalized category data.
[0013] Based on the first aspect, in one possible implementation, the first device determines personalized category data for the first device, including: the first device tracks the improvement in classification accuracy corresponding to various category data of the first device during the federated learning process; the first device uses the category data with the largest improvement in classification accuracy as the personalized category data, or the first device uses the category data with a classification accuracy above a preset threshold as the personalized category data. This implementation illustrates a possible way for the first device to determine personalized category data, by tracking the improvement in classification accuracy corresponding to various category data, thereby facilitating the first device to accurately determine the personalized category data for the first device. This facilitates improving the effectiveness of forgetting learning.
[0014] Based on the first aspect, in one possible implementation, the method further includes: the first device sending an auxiliary judgment request to the second device, the auxiliary judgment request being used to request the second device to assist the first device in determining personalized category data; the first device receiving a third global model from the second device, the third global model being a weighted fusion of global models obtained by gradient descent of the first global model by devices other than the first device; and the first device determining the personalized category data of the first device, including: the first device determining a change in the classification accuracy of the third global model on various category data of the first device compared to the classification accuracy of the first global model on various category data of the first device; the first device selecting category data with a decreased classification accuracy as personalized category data, selecting category data with the greatest decreased classification accuracy as personalized category data, or selecting category data with a decreased classification accuracy greater than a preset threshold as personalized category data. This implementation illustrates another possible method for the first device to determine personalized category data. The first device uses the second device to assist the first device in determining personalized category data, thereby enabling the first device to accurately determine the personalized category data of the first device. This is conducive to improving the effect of forgetting learning.
[0015] Based on the first aspect, in one possible implementation, before the first device determines the personalized category data of the first device, the method further includes: the first device sends a forgetting learning judgment request to the second device, the forgetting learning judgment request is used to request whether to perform federated forgetting learning; the first device receives the training contribution from the second device, the training contribution represents the contribution of the first device to the model training; the first device determines whether to perform federated forgetting learning based on the training contribution; if so, the first device is triggered to execute the step of determining the personalized category data of the first device. In this way, the first device can make a preliminary judgment on whether to perform federated forgetting learning based on the training contribution, and then further judge whether to perform federated forgetting learning for the personalized category data based on the forgetting learning completion of the first global model on the personalized category data. It can be seen that the necessity of federated forgetting learning can be more effectively determined through the dual judgment process. Avoid unnecessary forgetting learning.
[0016] It should be noted that this implementation can be an independent aspect and is not dependent on the aforementioned first aspect and its various implementations. Specifically, the solution provided by this independent aspect may include: the first device receives the training contribution from the second device, the training contribution representing the contribution of the first device to the model training; the first device determines whether to perform federated forgetting learning based on the training contribution, and if so, the first device determines to perform federated forgetting learning; if not, the first device determines not to perform federated forgetting learning. Optionally, before the first device receives the training contribution from the second device, the method also includes: the first device sends a forgetting learning judgment request to the second device, the forgetting learning judgment request being used to request a judgment on whether to perform federated forgetting learning. Optionally, after the first device determines to perform federated forgetting learning, the method also includes: the first device determines the personalized category data of the first device; the first device determines the forgetting learning completion of the first global model on the personalized category data, the first global model being the global model at the moment when the first device applies for or executes the forgetting learning judgment; the first device determines whether to perform federated forgetting learning for the personalized category data based on the forgetting learning completion. Optionally, after the first device determines not to perform federated forgetting learning, the method further includes: the first device sending a third exit instruction to the second device, the third exit instruction being used to instruct the first device to exit the federated learning process, thereby enabling the first device to exit the federated learning process.
[0017] Based on the first aspect, in one possible implementation, if the first device determines to perform federated forget learning on the personalized category data, the method further includes: the first device receiving an activation instruction from the second device, the activation instruction instructing the first device to initiate federated forget learning on the personalized category data; the first device performing gradient ascent on the first global model based on the personalized category data to obtain a fourth global model, wherein the fourth global model has a forget learning completion degree on the personalized category data greater than a first threshold, or the forget learning completion degree of the fourth global model on the personalized category data is greater than or equal to the first threshold; and the first device sending the fourth global model to the second device. This ensures forget learning effectiveness, avoids incomplete forget learning or excessive forget learning, and avoids the overhead of unnecessary forget learning.
[0018] It should be noted that this implementation can be an independent aspect and is not dependent on the aforementioned first aspect and its various implementations. Specifically, the solution provided by this independent aspect may include: the first device receives a startup instruction from the second device, the startup instruction is used to instruct the first device to start federated forgetting learning for personalized category data; the first device performs gradient ascent on the first global model based on the personalized category data to obtain a fourth global model, the fourth global model's forgetting learning completion on the personalized category data is greater than a first threshold, or the fourth global model's forgetting learning completion on the personalized category data is greater than or equal to the first threshold; the first device sends the fourth global model to the second device.
[0019] Based on the first aspect, in one possible implementation, the degree of forgetting learning completion of the fourth global model on the personalized category data is determined based on a second accuracy rate and a third accuracy rate. The second accuracy rate represents the classification accuracy of the second global model on the personalized category data, and the third accuracy rate represents the classification accuracy of the fourth global model on the personalized category data. The second global model is the global model at the moment the first device joins the federated learning process. This implementation illustrates a method for determining the degree of forgetting learning completion of the fourth global model on the personalized category data, facilitating implementation of the solution. Optionally, the degree of forgetting learning completion of the fourth global model on the personalized category data is equal to the second accuracy rate / the third accuracy rate. This thereby represents the degree of forgetting learning of the fourth global model on the personalized category data. This helps ensure the effectiveness of forgetting learning and avoids problems such as incomplete or excessive forgetting learning.
[0020] Based on the first aspect, in a possible implementation, the method further includes: the first device receives a first permission to exit indication from the second device, the first permission to exit indication being used to indicate that the first device is allowed to exit the federated learning process. In this implementation, after the second device receives the fourth global model, the second device may directly allow the first device to exit the federated learning process. Alternatively, after the second device determines that the fourth global model does not require performance recovery, the second device may directly allow the first device to exit the federated learning process. Optionally, before the first device receives the first permission to exit indication from the second device, the method further includes: the first device sends a first exit request to the second device, the first exit request being used by the first device to request to exit the federated learning process.
[0021] Based on the first aspect, in one possible implementation, the method further includes: the first device receives a first performance recovery indication from the second device, the first performance recovery indication being used to instruct the first device to perform performance recovery on the fourth global model; the first device performs gradient descent on the fourth global model using the public category data of the first device to obtain a fifth global model; and the first device sends the fifth global model to the second device. In this implementation, if the fourth global model requires performance recovery, the first device can receive the first performance recovery indication and perform gradient descent on the fourth global model, thereby achieving performance recovery on the fourth global model. This avoids excessive forgetting of the fourth global model, improves the forgetting learning effect, and ensures the practicality of the solution.
[0022] Based on the first aspect, in one possible implementation, the method further includes: the first device receiving a second exit-permit indication from the second device, the second exit-permit indication being used to indicate that the first device is permitted to exit the federated learning process. In this implementation, if the fifth global model does not require performance recovery, the second device directly allows the first device to exit the federated learning process. The first device receives the second exit-permit indication and exits the federated learning process. Optionally, after the first device receives the second exit-permit indication from the second device, the method further includes: the first device sending a second exit request to the second device, the second exit request being used by the first device to request exit from the federated learning process.
[0023] Based on the first aspect, in one possible implementation, the method further includes: the first device receiving a sixth global model and a first verification instruction from the second device, the sixth global model being obtained by weighted fusion of the fourth global model and a global model obtained by gradient descent of the first global model by devices other than the first device using a first set of weighted values, the first verification instruction being used to instruct the first device to perform forgetting learning performance verification on the sixth global model; the first device performing forgetting learning performance verification on the sixth global model to obtain a first verification result; and the first device sending the first verification result to the second device. In this implementation, forgetting learning of personalized category data is achieved through weighted fusion, which not only ensures forgetting learning performance but also reduces the overhead of model performance recovery by utilizing common category data learned by other devices.
[0024] It should be noted that this implementation can be an independent aspect and is not dependent on the aforementioned first aspect and its corresponding implementation. Specifically, the solution provided by this independent aspect may include: a first device receiving a startup instruction from a second device, the startup instruction being used to instruct the first device to enable federated forgetting learning for personalized category data; the first device performing gradient ascent on the first global model based on the personalized category data to obtain a fourth global model, wherein the forgetting learning completion degree of the fourth global model on the personalized category data is greater than a first threshold, or the forgetting learning completion degree of the fourth global model on the personalized category data is greater than or equal to the first threshold; the first device sending the fourth global model to the second device; the first device receiving a sixth global model and a first verification instruction from the second device, the sixth global model being obtained by weighted fusion of the fourth global model using a first set of weighted values and a global model obtained by gradient descent on the first global model by devices other than the first device, the first verification instruction being used to instruct the first device to perform forgetting learning performance verification on the sixth global model; the first device performing forgetting learning performance verification on the sixth global model to obtain a first verification result; and the first device sending the first verification result to the second device.
[0025] Based on the first aspect, in one possible implementation, if the first verification result indicates a successful verification, the method further includes: the first device sending a second exit instruction to the second device, where the second exit instruction is used to notify the second device of the first device's exit from the federated learning process. If the first verification result indicates a successful verification, the first device may directly exit the federated learning process. Optionally, the second exit instruction may also be referred to as a second exit notification or a second notification, which is not specifically limited in this application.
[0026] Based on the first aspect, in one possible implementation, if the first verification result indicates that the verification has passed, the method further includes: the first device receiving a third permission to exit indication from the second device, where the third permission to exit indication is used to indicate that the first device is allowed to exit the federated learning process. In the case where the first verification result indicates that the verification has passed, upon receiving the third permission to exit indication, the first device may directly exit the federated learning process. Optionally, before the first device receives the third permission to exit indication from the second device, the method further includes: the first device sending a third exit request to the second device, where the third exit request is used by the first device to request to exit the federated learning process.
[0027] Based on the first aspect, in one possible implementation, if the first verification result indicates that the verification has passed, the method further includes: the first device receiving a second performance recovery instruction from the second device, the second performance recovery instruction being used to instruct the first device to perform performance recovery on the sixth global model; the first device performing gradient descent on the sixth global model using the public category data of the first device to obtain a seventh global model; and the first device sending the seventh global model to the second device. In this implementation, if the first verification result indicates that the verification has passed, but the sixth global model requires performance recovery, the first device may receive the second performance recovery instruction and perform performance recovery on the sixth global model. This avoids performance degradation of the global model.
[0028] Based on the first aspect, in one possible implementation, the method further includes: the first device receives a fourth exit-permit indication from the second device, where the fourth exit-permit indication is used to indicate that the first device is allowed to exit the federated learning process. In this implementation, in the case where the seventh global model does not require performance recovery, the first device may receive the fourth exit-permit indication. Then, the first device may exit the federated learning process. This ensures the performance of the global model. Optionally, before the first device receives the fourth exit-permit indication from the second device, the method further includes: the first device sends a fourth exit request to the second device, where the fourth exit request is used by the first device to request to exit the federated learning process.
[0029] Based on the first aspect, in one possible implementation, if the first verification result indicates that the verification failed, the method further includes: the first device receives an eighth global model and a second verification instruction from the second device, the eighth global model being obtained by weighted fusion of the fourth global model and the global model obtained by gradient descent of the first global model by devices other than the first device using a second set of weighted values, and the second verification instruction is used to instruct the first device to perform forgetting learning performance verification on the eighth global model; the first device performs forgetting learning performance verification on the eighth global model to obtain a second verification result; and the first device sends the second verification result to the second device. In the case where the first verification result indicates that the verification failed, the second device performs weighted fusion using another set of weighted values to obtain the eighth global model and sends it to the first device. This ensures forgetting learning performance while reducing the overhead of model performance recovery by utilizing common category data learned by other devices.
[0030] The second aspect of the present application provides a data processing method, which can be performed by a second device, which can be a terminal device, a network device, or a cloud server, or a component in the terminal device, network device, or cloud server (for example, a processor, a chip, or a chip system, etc.), or a logic module or software that can implement all or part of the terminal device functions, or a logic module or software that can implement all or part of the network device functions, or a logic module or software that can implement all or part of the cloud server functions. The method includes:
[0031] The second device receives a forget learning request from the first device. The forget learning request is used to request the initiation of federated forget learning for the personalized category data of the first device. The forget learning completion degree of the first global model on the personalized category data is less than a first threshold, or the forget learning completion degree of the first global model on the personalized category data is less than or equal to the first threshold. The first global model is the global model at the moment when the first device applies for or executes the forget learning judgment. This facilitates the first device to perform federated forget learning on the personalized category data, avoiding the overhead of unnecessary federated forget learning and model performance recovery, thereby better implementing federated forget learning.
[0032] The third aspect of the present application provides a data processing method, which can be performed by a second device, which can be a terminal device, a network device, or a cloud server, or a component in the terminal device, network device, or cloud server (for example, a processor, a chip, or a chip system, etc.), or a logic module or software that can implement all or part of the terminal device functions, or a logic module or software that can implement all or part of the network device functions, or a logic module or software that can implement all or part of the cloud server functions. The method includes:
[0033] The second device receives a first exit instruction from the first device, wherein the first exit instruction is used to notify the second device that the first device exits the federated learning process, the first global model's forgetting learning completion degree on the personalized category data is greater than the first threshold, or the first global model's forgetting learning completion degree on the personalized category data is greater than or equal to the first threshold, and the first global model is the global model at the moment when the first device applies for or executes forgetting learning judgment. This avoids unnecessary forgetting learning. Reduce or avoid the overhead caused by forgetting learning. Optionally, the first exit instruction can also be referred to as the first exit notification or the first notification, which is not specifically limited in this application.
[0034] Based on the second or third aspect, in one possible implementation, the degree of forgetting learning completion of the first global model on personalized category data is determined based on a first accuracy rate and a second accuracy rate, wherein the first accuracy rate represents the classification accuracy of the first global model on the personalized category data, and the second accuracy rate represents the classification accuracy of the second global model on the personalized category data. The second global model is the global model at the moment the first device joins the federated learning process, and the moment the first device applies for or executes the forgetting learning judgment is after the moment the first device joins the federated learning process. This implementation illustrates a method for determining the degree of forgetting learning completion of the first global model on personalized category data, which facilitates the implementation of the solution. Optionally, the degree of forgetting learning completion of the first global model on personalized category data is equal to the second accuracy rate / the first accuracy rate, thereby representing the degree of forgetting learning of the first global model on the personalized category data.
[0035] Based on the second aspect or the third aspect, in one possible implementation, before the second device receives a forgetting learning request from the first device, or before the second device receives a first exit instruction from the first device, the method further includes: the second device receives an auxiliary judgment request from the first device, the auxiliary judgment request is used to request the second device to assist the first device in determining personalized category data; the second device sends a third global model to the first device, the third global model is a weighted fusion of global models obtained by gradient descent of the first global model by devices other than the first device, and the third global model is used by the first device to determine personalized category data. In this implementation, the specific process of the second device assisting the first device in determining personalized category data is shown, thereby facilitating the first device to accurately determine the personalized category data of the first device. This is conducive to improving the effect of forgetting learning.
[0036] Based on the second aspect or the third aspect, in a possible implementation, before the second device receives a forgetting learning request from the first device, or before the second device receives a first exit instruction from the first device, the method further includes: the second device receives a forgetting learning judgment request from the first device, the forgetting learning judgment request is used to request whether to perform federated forgetting learning; the second device sends a training contribution to the first device, and the training contribution represents the contribution of the first device to the model training. In this implementation, the second device can send a training contribution to the first device, so that the first device can make a preliminary judgment on whether to perform federated forgetting learning based on the training contribution, and then further judge whether to perform federated forgetting learning for the personalized category data based on the forgetting learning completion of the first global model on the personalized category data. It can be seen that the necessity of federated forgetting learning can be more effectively determined through a dual judgment process. Avoid unnecessary forgetting learning.
[0037] It should be noted that this implementation method can be used as an independent aspect and is not dependent on the aforementioned second aspect or third aspect and the corresponding implementation method. The solution provided by this independent aspect may include: the second device sends a training contribution to the first device, and the training contribution characterizes the contribution degree of the first device to the model training. Optionally, before the second device sends the training contribution to the first device, the method also includes: the second device receives a forgetting learning judgment request from the first device, and the forgetting learning judgment request is used to request whether to perform federated forgetting learning. Optionally, when the first device determines not to perform federated forgetting learning based on the training contribution, the method also includes: the second device receives a third exit instruction from the first device, and the third exit instruction is used to instruct the first device to exit the federated learning process.
[0038] Based on the second or third aspect, in one possible implementation, after the second device receives a forget learning request from the first device, the method further includes: the second device sends a start instruction to the first device, the start instruction being used to instruct the first device to initiate federated forget learning for personalized category data; the second device receives a fourth global model from the first device, the fourth global model being obtained by the first device performing gradient ascent on the first global model based on the personalized category data, the forget learning completion degree of the fourth global model on the personalized category data being greater than a first threshold, or the forget learning completion degree of the fourth global model on the personalized category data being greater than or equal to the first threshold. This ensures the effectiveness of forget learning, avoids incomplete forget learning or excessive forget learning, and avoids the overhead caused by unnecessary forget learning. It should be noted that this implementation can be an independent aspect and is independent of the aforementioned second or third aspect and the corresponding implementation.
[0039] Based on the second or third aspects, in one possible implementation, the degree of forgetting learning completion of the fourth global model on the personalized category data is determined based on a second accuracy rate and a third accuracy rate, where the second accuracy rate represents the classification accuracy of the second global model on the personalized category data, and the third accuracy rate represents the classification accuracy of the fourth global model on the personalized category data. The second global model is the global model at the moment the first device joins the federated learning process. This implementation illustrates a method for determining the degree of forgetting learning completion of the fourth global model on the personalized category data, facilitating implementation of the solution. Optionally, the degree of forgetting learning completion of the fourth global model on the personalized category data is equal to the second accuracy rate / the third accuracy rate. This thereby represents the degree of forgetting learning of the fourth global model on the personalized category data. This helps ensure the effectiveness of forgetting learning and avoids problems such as incomplete forgetting learning or excessive forgetting learning.
[0040] Based on the second or third aspect, in one possible implementation, the method further includes: a second device sending a first test request to a device other than the first device, the first test request being used to instruct the device other than the first device to perform an accuracy test on a fourth global model; the second device receiving first local accuracy rates respectively sent from the device other than the first device; the second device determining a first global accuracy rate based on the first local accuracy rates respectively sent from the device other than the first device; and the second device determining whether the fourth global model requires performance recovery based on the first global accuracy rate. In this implementation, the second device can evaluate the performance of the fourth global model, thereby avoiding performance degradation of the model due to forgetting learning and ensuring the performance of the global model.
[0041] Based on the second aspect or the third aspect, in a possible implementation, the method further includes: the second device sends a first permission to exit indication to the first device, and the first permission to exit indication is used to indicate that the first device is allowed to exit the federated learning process. In this implementation, after the second device receives the fourth global model, the second device can directly allow the first device to exit the federated learning process. Alternatively, the second device evaluates the performance of the fourth global model, and if the fourth global model does not require performance recovery, the second device can also directly allow the first device to exit the federated learning process. This ensures the performance of the global model. Optionally, before the second device sends the first permission to exit indication to the first device, the method further includes: the second device receives a first exit request from the first device, and the first exit request is used by the first device to request to exit the federated learning process.
[0042] Based on the second or third aspect, in one possible implementation, the method further includes: the second device sending a fourth global model to devices other than the first device, where the fourth global model is used by the devices other than the first device to continue the federated learning process. This allows the devices other than the first device to continue the federated learning process based on the fourth global model. The devices other than the first device do not need to record historical data, but instead continue training based on the fourth global model, thereby avoiding the problem of high storage overhead.
[0043] Based on the second or third aspect, in one possible implementation, if the fourth global model requires performance recovery, the method further includes: the second device sending a first performance recovery instruction to the first device, the first performance recovery instruction being used to instruct the first device to perform performance recovery on the fourth global model; and the second device receiving a fifth global model from the first device, the fifth global model being obtained by performing gradient descent on the fourth global model using the public category data of the first device. This avoids excessive forgetting of the fourth global model, improves the forgetting learning effect, and ensures the practicality of the solution.
[0044] Based on the second aspect or the third aspect, in one possible implementation, if the fifth global model does not require performance recovery, the method further includes: the second device sends a second permission to exit indication to the first device, where the second permission to exit indication is used to indicate that the first device is allowed to exit the federated learning process. In this implementation, if the fifth global model does not require performance recovery, the second device directly allows the first device to exit the federated learning process. The first device receives the second permission to exit indication and exits the federated learning process. Optionally, before the second device sends the second permission to exit indication to the first device, the method further includes: the second device receives a second exit request from the first device, where the second exit request is used by the first device to request to exit the federated learning process.
[0045] Based on the second or third aspect, in one possible implementation, if the fifth global model does not require performance recovery, the method further includes: the second device transmitting the fifth global model to devices other than the first device, and the fifth global model being used by the devices other than the first device to continue the federated learning process. This allows the devices other than the first device to continue the federated learning process based on the fifth global model. The devices other than the first device do not need to record historical data, but instead continue training based on the fifth global model, thereby avoiding the problem of high storage overhead.
[0046] Based on the second or third aspect, in one possible implementation, the method further includes: the second device sending a sixth global model and a first verification instruction to the first device, the sixth global model being obtained by weighted fusion of the fourth global model and a global model obtained by gradient descent of the first global model by devices other than the first device using a first set of weighted values, and the first verification instruction being used to instruct the first device to verify the forgetting learning performance of the sixth global model; and the second device receiving a first verification result from the first device, the first verification result being obtained by verifying the forgetting learning performance of the sixth global model. In this implementation, forgetting learning of personalized category data is achieved through weighted fusion, which can both ensure forgetting learning performance and reduce the overhead of model performance recovery by utilizing common category data learned by other devices.
[0047] It should be noted that this implementation method can be used as an independent aspect and is not dependent on the aforementioned second aspect, third aspect and their corresponding implementation methods. The solution provided by this independent aspect may include: the second device sends a startup instruction to the first device, the startup instruction is used to instruct the first device to start federated forgetting learning for personalized category data; the second device receives a fourth global model from the first device, the fourth global model is obtained by the first device performing gradient ascent on the first global model based on the personalized category data, and the forgetting learning completion degree of the fourth global model on the personalized category data is greater than a first threshold; the second device sends a sixth global model and a first verification instruction to the first device, the sixth global model is obtained by weighted fusion of the fourth global model and the global model obtained by gradient descent of the first global model by other devices other than the first device using a first set of weighted values, and the first verification instruction is used to instruct the first device to perform forgetting learning performance verification on the sixth global model; the second device receives a first verification result from the first device, and the first verification result is obtained by verifying the forgetting learning performance of the sixth global model.
[0048] Based on the second aspect or the third aspect, in one possible implementation, the method further includes: if the first verification result indicates a successful verification, the method further includes: the second device receiving a second exit instruction from the first device, the second exit instruction being used to notify the second device that the first device has exited the federated learning process. If the first verification result indicates a successful verification, the first device may directly exit the federated learning process. Optionally, the second exit instruction may also be referred to as a second exit notification or a second notification, which is not specifically limited in this application.
[0049] Based on the second aspect or the third aspect, in a possible implementation, if the first verification result indicates that the verification is passed, the method further includes: the second device sends a third exit permission indication to the first device, and the third exit permission indication is used to indicate that the first device is allowed to exit the federated learning process. In the case where the first verification result indicates that the verification is passed, the second device receives an exit request from the first device and sends a third exit permission indication to the first device. This indicates that the first device is allowed to exit the federated learning process. Optionally, before the second device sends the third exit permission indication to the first device, the method further includes: the second device receives a third exit request from the first device, and the third exit request is used by the first device to request to exit the federated learning process.
[0050] Based on the second aspect or the third aspect, in one possible implementation, if the first verification result indicates that the verification has passed, the method further includes: the second device sending a second test request to devices other than the first device, the second test request being used to instruct the devices other than the first device to perform an accuracy test on the sixth global model; the second device receiving second local accuracy rates sent respectively from devices other than the first device; the second device determining a second global accuracy rate based on the second local accuracy rates sent respectively from devices other than the first device; and the second device determining whether the sixth global model requires performance recovery based on the second global accuracy rate. If the first verification result indicates that the verification has passed, the second device may further evaluate the performance of the sixth global model to ensure the performance of the sixth global model.
[0051] Based on the second aspect or the third aspect, in one possible implementation, if the performance of the sixth global model needs to be restored, the method further includes: the second device sends a second performance recovery instruction to the first device, the second performance recovery instruction is used to instruct the first device to perform performance recovery on the sixth global model; the second device receives the seventh global model from the first device, and the seventh global model is a gradient descent of the sixth global model using the public category data of the first device. In this implementation, the first verification result indicates that the verification has passed, but the performance of the sixth global model needs to be restored. The second device sends a second performance recovery instruction to the first device, so that the first device performs performance recovery on the sixth global model to obtain the seventh global model, and sends the seventh global model to the second device. This avoids performance degradation of the global model.
[0052] Based on the second or third aspect, in one possible implementation, the method further includes: a second device sending a third test request to a device other than the first device, the third test request being used to instruct the device other than the first device to perform an accuracy test on the seventh global model; the second device receiving third local accuracy rates respectively sent by the device other than the first device; the second device determining a third global accuracy rate based on the third local accuracy rates respectively sent by the device other than the first device; the second device determining whether the seventh global model requires performance recovery based on the third global accuracy rate; and if the seventh global model does not require performance recovery, the second device sending a fourth exit permission indication to the first device, the fourth exit permission indication being used to instruct the first device to exit the federated learning process. In this implementation, the second device may evaluate the performance of the seventh global model, and if the seventh global model does not require performance recovery, the second device may instruct the first device to exit the federated learning process, thereby ensuring the performance of the seventh global model. Optionally, before the second device sends the fourth exit permission indication to the first device, the method further includes: the second device receiving a fourth exit request from the first device, the fourth exit request being used by the first device to request the first device to exit the federated learning process.
[0053] Based on the second aspect or the third aspect, in a possible implementation, if the first verification result indicates that the verification has failed, the method further includes: the second device sends an eighth global model and a second verification instruction to the first device, the eighth global model being obtained by weighted fusion of the fourth global model and the global model obtained by gradient descent of the first global model by devices other than the first device using a second set of weighted values, and the second verification instruction is used to instruct the first device to verify the forgetting learning performance of the eighth global model; the second device receives the second verification result from the first device, and the second verification result is obtained by verifying the forgetting learning performance of the eighth global model. In the case where the first verification result indicates that the verification has failed, the second device performs weighted fusion using another set of weighted values to obtain the eighth global model and sends it to the first device. This ensures the forgetting learning performance while reducing the overhead of model performance recovery by utilizing the common category data learned by other devices.
[0054] A fourth aspect of the present application provides a first device, including:
[0055] A processing module is used to determine the personalized category data of the first device; determine the forgetting learning completion of the first global model on the personalized category data, the first global model is the global model at the moment when the first device applies for or executes the forgetting learning judgment; and determine whether to perform federated forgetting learning on the personalized category data based on the forgetting learning completion.
[0056] Based on the fourth aspect, in one possible implementation method, the processing module is specifically used to: if the degree of forgetting learning completion is less than a first threshold, determine to perform federated forgetting learning on the personalized category data; or, if the degree of forgetting learning completion is greater than or equal to the first threshold, determine not to perform federated forgetting learning on the personalized category data.
[0057] Based on the fourth aspect, in one possible implementation method, the processing module is specifically used to: if the degree of forgetting learning completion is less than or equal to a first threshold, determine to perform federated forgetting learning on the personalized category data; or, if the degree of forgetting learning completion is greater than the first threshold, determine not to perform federated forgetting learning on the personalized category data.
[0058] Based on the fourth aspect, in a possible implementation, the first device further includes a transceiver module; the transceiver module is used to send a forgetting learning request to the second device, and the forgetting learning request is used to request to enable federated forgetting learning for personalized category data.
[0059] Based on the fourth aspect, in a possible implementation, the first device further includes a transceiver module; the transceiver module is used to send a first exit instruction to the second device, and the first exit instruction is used to notify the second device that the first device exits the federated learning process.
[0060] Based on the fourth aspect, in a possible implementation method, the degree of forgetting learning completion of the first global model on the personalized category data is determined based on a first accuracy rate and a second accuracy rate, the first accuracy rate representing the classification accuracy of the first global model on the personalized category data, the second accuracy rate representing the classification accuracy of the second global model on the personalized category data, the second global model is the global model at the moment when the first device joins the federated learning process, and the moment when the first device applies for or executes forgetting learning judgment is after the moment when the first device joins the federated learning process.
[0061] Based on the fourth aspect, in a possible implementation method, the processing module is specifically used to: track the improvement of the classification accuracy corresponding to various category data of the first device during the federated learning process; and use the category data with the largest improvement in classification accuracy as personalized category data according to the improvement, or use the category data with a corresponding classification accuracy higher than a preset threshold as personalized category data.
[0062] Based on the fourth aspect, in a possible implementation method, the first device also includes a transceiver module; the transceiver module is used to send an auxiliary judgment request to the second device, the auxiliary judgment request is used to request the second device to assist the first device in determining personalized category data; receive a third global model from the second device, the third global model is a weighted fusion of global models obtained by gradient descent of the first global model by other devices other than the first device; the processing module is specifically used to: determine the change in the classification accuracy of the third global model on various category data of the first device compared with the classification accuracy of the first global model on various category data of the first device; according to the change, the category data with a decreased classification accuracy is used as personalized category data, or according to the change, the category data with the largest decrease in classification accuracy is used as personalized category data, or according to the change, the category data with a decrease in classification accuracy greater than a preset threshold value is used as personalized category data.
[0063] Based on the fourth aspect, in a possible implementation method, the first device also includes a transceiver module; the transceiver module is used to send a forgetting learning judgment request to the second device, and the forgetting learning judgment request is used to request whether to perform federated forgetting learning; receive the training contribution from the second device, and the training contribution represents the contribution degree of the first device to the model training; the processing module is also used to: determine whether to perform federated forgetting learning based on the training contribution; if so, trigger the execution of the step of determining the personalized category data of the first device.
[0064] Based on the fourth aspect, in a possible implementation method, the first device also includes a transceiver module; the transceiver module is used to receive a start indication from the second device if the first device determines to perform federated forgetting learning on the personalized category data, and the start indication is used to instruct the first device to start federated forgetting learning on the personalized category data; the processing module is also used to: perform gradient ascent on the first global model according to the personalized category data to obtain a fourth global model, and the forgetting learning completion degree of the fourth global model on the personalized category data is greater than the first threshold, or the forgetting learning completion degree of the fourth global model on the personalized category data is greater than or equal to the first threshold; the transceiver module is also used to: send the fourth global model to the second device.
[0065] Based on the fourth aspect, in a possible implementation method, the degree of forgetting learning completion of the fourth global model on the personalized category data is determined based on the second accuracy and the third accuracy, the second accuracy represents the classification accuracy of the second global model on the personalized category data, the third accuracy represents the classification accuracy of the fourth global model on the personalized category data, and the second global model is the global model at the moment when the first device joins the federated learning process.
[0066] Based on the fourth aspect, in one possible implementation, the first device further includes a transceiver module configured to receive a first exit permission indication from the second device, the first exit permission indication indicating permission for the first device to exit the federated learning process. Optionally, the transceiver module is further configured to send a first exit request to the second device, the first exit request being used by the first device to request exit from the federated learning process.
[0067] Based on the fourth aspect, in a possible implementation method, the first device also includes a transceiver module; the transceiver module is used to receive a first performance recovery indication from the second device, and the first performance recovery indication is used to instruct the first device to perform performance recovery on the fourth global model; the processing module is also used to: perform gradient descent on the fourth global model through the public category data of the first device to obtain a fifth global model; the transceiver module is also used to: send the fifth global model to the second device.
[0068] Based on the fourth aspect, in one possible implementation, the first device further includes a transceiver module, the transceiver module configured to receive a second exit permission indication from the second device, the second exit permission indication being used to indicate permission for the first device to exit the federated learning process. Optionally, the transceiver module is further configured to send a second exit request to the second device, the first exit request being used by the first device to request exit from the federated learning process.
[0069] Based on the fourth aspect, in a possible implementation method, the first device also includes a transceiver module, which is used to receive a sixth global model and a first verification indication from the second device. The sixth global model is obtained by weighted fusion of the fourth global model and the global model obtained by gradient descent of the first global model by other devices other than the first device using a first set of weighted values. The first verification indication is used to instruct the first device to verify the forgetting learning performance of the sixth global model; the processing module is also used to: verify the forgetting learning performance of the sixth global model to obtain a first verification result; the transceiver module is also used to: send the first verification result to the second device.
[0070] Based on the fourth aspect, in a possible implementation, the first device also includes a transceiver module, which is used to send a second exit indication to the second device if the first verification result indicates that the verification is passed, and the second exit indication is used to notify the second device that the first device exits the federated learning process.
[0071] Based on the fourth aspect, in one possible implementation, the first device further includes a transceiver module, the transceiver module being configured to receive a third exit permission indication from the second device if the first verification result indicates a successful verification, the third exit permission indication being configured to indicate that the first device is permitted to exit the federated learning process. Optionally, the transceiver module is further configured to send a third exit request to the second device, the third exit request being configured to request the first device to exit the federated learning process.
[0072] Based on the fourth aspect, in a possible implementation method, the first device also includes a transceiver module, which is used to receive a second performance recovery indication from the second device if the first verification result indicates that the verification is passed, and the second performance recovery indication is used to instruct the first device to perform performance recovery on the sixth global model; the processing module is also used to: perform gradient descent on the sixth global model through the public category data of the first device to obtain a seventh global model; the transceiver module is also used to: send the seventh global model to the second device.
[0073] Based on the fourth aspect, in one possible implementation, the first device further includes a transceiver module, configured to receive a fourth exit permission indication from the second device, the fourth exit permission indication indicating permission for the first device to exit the federated learning process. Optionally, the transceiver module is further configured to send a fourth exit request to the second device, the fourth exit request being used by the first device to request the federated learning process.
[0074] Based on the fourth aspect, in a possible implementation method, the first device also includes a transceiver module, which is used to receive an eighth global model and a second verification instruction from the second device if the first verification result indicates that the verification fails. The eighth global model is obtained by weighted fusion of the fourth global model and the global models obtained by gradient descent of the first global model by other devices other than the first device using a second set of weighted values. The second verification instruction is used to instruct the first device to perform forgetting learning performance verification on the eighth global model; the processing module is also used to: perform forgetting learning performance verification on the eighth global model to obtain a second verification result; the transceiver module is also used to: send the second verification result to the second device.
[0075] A fifth aspect of the present application provides a second device, including:
[0076] A transceiver module is used to receive a forgetting learning request from a first device; wherein the forgetting learning request is used to request to enable federated forgetting learning for the personalized category data of the first device, the forgetting learning completion degree of the first global model on the personalized category data is less than a first threshold, or the forgetting learning completion degree of the first global model on the personalized category data is less than or equal to the first threshold, and the first global model is the global model at the moment when the first device applies for or executes forgetting learning judgment.
[0077] A sixth aspect of the present application provides a second device, including:
[0078] A transceiver module is used to receive a first exit instruction from a first device, wherein the first exit instruction is used to notify a second device that the first device exits a federated learning process, the forgetting learning completion degree of the first global model on the personalized category data is greater than a first threshold, or the forgetting learning completion degree of the first global model on the personalized category data is greater than or equal to the first threshold, and the first global model is a global model at the moment when the first device applies for or executes forgetting learning judgment.
[0079] Based on the fifth aspect or the sixth aspect, in a possible implementation method, the degree of forgetting learning completion of the first global model on the personalized category data is determined based on a first accuracy rate and a second accuracy rate, the first accuracy rate represents the classification accuracy of the first global model on the personalized category data, the second accuracy rate represents the classification accuracy of the second global model on the personalized category data, the second global model is the global model at the moment when the first device joins the federated learning process, and the moment when the first device applies for or executes forgetting learning judgment is after the moment when the first device joins the federated learning process.
[0080] Based on the fifth aspect or the sixth aspect, in a possible implementation method, the transceiver module is also used to: receive an auxiliary judgment request from the first device, the auxiliary judgment request is used to request the second device to assist the first device in determining personalized category data; send a third global model to the first device, the third global model is a weighted fusion of global models obtained by performing gradient descent on the first global model by devices other than the first device, and the third global model is used by the first device to determine personalized category data.
[0081] Based on the fifth aspect or the sixth aspect, in a possible implementation method, the transceiver module is also used to: receive a forgetting learning judgment request from the first device, the forgetting learning judgment request is used to request whether to perform federated forgetting learning; send a training contribution to the first device, the training contribution represents the contribution degree of the first device to the model training.
[0082] Based on the fifth aspect or the sixth aspect, in a possible implementation method, the transceiver module is also used to: send a startup indication to the first device, the startup indication is used to instruct the first device to start federated forgetting learning for personalized category data; receive a fourth global model from the first device, the fourth global model is obtained by the first device performing gradient ascent on the first global model based on the personalized category data, and the forgetting learning completion degree of the fourth global model on the personalized category data is greater than the first threshold.
[0083] Based on the fifth aspect or the sixth aspect, in a possible implementation method, the degree of forgetting learning completion of the fourth global model on the personalized category data is determined based on the second accuracy and the third accuracy, the second accuracy represents the classification accuracy of the second global model on the personalized category data, the third accuracy represents the classification accuracy of the fourth global model on the personalized category data, and the second global model is the global model at the moment when the first device joins the federated learning process.
[0084] Based on the fifth aspect or the sixth aspect, in a possible implementation method, the transceiver module is also used to: send a first test request to other devices other than the first device, the first test request is used to instruct other devices other than the first device to perform an accuracy test on the fourth global model; receive first local accuracy rates sent respectively from other devices other than the first device; the second device also includes a processing module; the processing module is used to determine the first global accuracy rate based on the first local accuracy rates sent respectively from other devices other than the first device; and determine whether the fourth global model needs performance recovery based on the first global accuracy rate.
[0085] Based on the fifth or sixth aspect, in one possible implementation, the transceiver module is further configured to: send a first exit permission indication to the first device, where the first exit permission indication is used to indicate that the first device is allowed to exit the federated learning process. Optionally, the transceiver module is further configured to: receive a first exit request from the first device, where the first exit request is used by the first device to request to exit the federated learning process.
[0086] Based on the fifth aspect or the sixth aspect, in a possible implementation, the transceiver module is also used to: send a fourth global model to other devices except the first device, and the fourth global model is used for the other devices except the first device to continue to execute the federated learning process.
[0087] Based on the fifth aspect or the sixth aspect, in a possible implementation method, if the fourth global model requires performance recovery, the transceiver module is also used to: send a first performance recovery indication to the first device, the first performance recovery indication is used to instruct the first device to perform performance recovery on the fourth global model; receive a fifth global model from the first device, the fifth global model is obtained by performing gradient descent on the fourth global model through the public category data of the first device.
[0088] Based on the fifth or sixth aspect, in one possible implementation, if the fifth global model does not require performance recovery, the transceiver module is further configured to: send a second exit permission indication to the first device, where the second exit permission indication is used to indicate that the first device is allowed to exit the federated learning process. Optionally, the transceiver module is further configured to: receive a second exit request from the first device, where the second exit request is used by the first device to request to exit the federated learning process.
[0089] Based on the fifth aspect or the sixth aspect, in a possible implementation method, if the fifth global model does not require performance recovery, the transceiver module is also used to: send the fifth global model to other devices other than the first device, and the fifth global model is used for other devices other than the first device to continue to execute the federated learning process.
[0090] Based on the fifth aspect or the sixth aspect, in a possible implementation method, the transceiver module is also used to: send a sixth global model and a first verification indication to the first device, the sixth global model is obtained by weighted fusion of the fourth global model and the global model obtained by gradient descent of the first global model by other devices other than the first device using a first set of weighted values, and the first verification indication is used to instruct the first device to verify the forgetting learning performance of the sixth global model; receive a first verification result from the first device, and the first verification result is obtained by verifying the forgetting learning performance of the sixth global model.
[0091] Based on the fifth aspect or the sixth aspect, in a possible implementation, the transceiver module is further used to: if the first verification result indicates that the verification is passed, receive a second exit instruction from the first device, and the second exit instruction is used to notify the second device that the first device exits the federated learning process.
[0092] Based on the fifth or sixth aspect, in one possible implementation, the transceiver module is further configured to: if the first verification result indicates verification is passed, send a third exit permission indication to the first device, where the third exit permission indication is used to indicate that the first device is allowed to exit the federated learning process. Optionally, the transceiver module is further configured to: receive a third exit request from the first device, where the third exit request is used by the first device to request exit from the federated learning process.
[0093] Based on the fifth aspect or the sixth aspect, in a possible implementation method, the transceiver module is also used to: if the first verification result indicates that the verification is passed, send a second test request to other devices other than the first device, and the second test request is used to instruct other devices other than the first device to perform an accuracy test on the sixth global model; receive second local accuracy rates sent respectively from other devices other than the first device; the second device also includes a processing module, and the processing module is used to determine a second global accuracy rate based on the second local accuracy rates sent respectively from other devices other than the first device; and determine whether the sixth global model needs performance recovery based on the second global accuracy rate.
[0094] Based on the fifth aspect or the sixth aspect, in a possible implementation method, the transceiver module is also used to: if the sixth global model needs to perform performance recovery, send a second performance recovery indication to the first device, and the second performance recovery indication is used to instruct the first device to perform performance recovery on the sixth global model; receive the seventh global model from the first device, and the seventh global model is to perform gradient descent on the sixth global model through the public category data of the first device.
[0095] Based on the fifth aspect or the sixth aspect, in a possible implementation, the transceiver module is further used to: send a third test request to other devices other than the first device, the third test request is used to instruct other devices other than the first device to perform an accuracy test on the seventh global model; receive third local accuracy rates sent respectively from other devices other than the first device; the second device also includes a processing module, the processing module is used to determine a third global accuracy rate based on the third local accuracy rates sent respectively from other devices other than the first device; determine whether the seventh global model needs performance recovery based on the third global accuracy rate; the transceiver module is further used to: if the seventh global model does not need performance recovery, send a fourth exit permission indication to the first device, the fourth exit permission indication is used to indicate that the first device is allowed to exit the federated learning process. Optionally, the transceiver module is further used to: receive a fourth exit request from the first device, the fourth exit request is used for the first device to request to exit the federated learning process.
[0096] Based on the fifth aspect or the sixth aspect, in a possible implementation method, the transceiver module is also used to: if the first verification result indicates that the verification fails, send an eighth global model and a second verification instruction to the first device, the eighth global model is obtained by weighted fusion of the fourth global model and the global models obtained by gradient descent of the first global model by other devices other than the first device using a second set of weighted values, and the second verification instruction is used to instruct the first device to verify the forgetting learning performance of the eighth global model; receive the second verification result from the first device, and the second verification result is obtained by verifying the forgetting learning performance of the eighth global model.
[0097] In a seventh aspect, the present application provides a first apparatus, comprising: a processor and a memory. The memory stores a computer program or computer instructions, and the processor is configured to call and execute the computer program or computer instructions stored in the memory, so that the processor implements any one of the implementations of the first aspect.
[0098] Optionally, the first device further includes a transceiver, and the processor is used to control the transceiver to transmit and receive signals.
[0099] In an eighth aspect, the present application provides a second apparatus, comprising: a processor and a memory. The memory stores a computer program or computer instructions, and the processor is configured to call and execute the computer program or computer instructions stored in the memory, so that the processor implements any one of the implementations of the second or third aspects.
[0100] Optionally, the second device further includes a transceiver, and the processor is used to control the transceiver to transmit and receive signals.
[0101] In a ninth aspect, the present application provides a first device, comprising a processor and an interface circuit, wherein the processor is configured to communicate with other devices via the interface circuit and execute the method described in the first aspect. The processor comprises one or more processors.
[0102] In a tenth aspect, the present application provides a second device, comprising a processor and an interface circuit, wherein the processor is configured to communicate with other devices via the interface circuit and execute the method described in the second or third aspect. The processor comprises one or more processors.
[0103] In an eleventh aspect of the present application, a first device is provided, comprising a processor, configured to be connected to a memory and configured to call a program stored in the memory to execute the method described in the first aspect. The memory may be located within or outside the first device. The processor may include one or more processors.
[0104] In a twelfth aspect, the present application provides a second device, comprising a processor, connected to a memory, configured to invoke a program stored in the memory to execute the method described in the second or third aspect. The memory may be located within or outside the second device. The processor may include one or more processors.
[0105] In one implementation, the first device of the first aspect, fourth aspect, seventh aspect, ninth aspect, and eleventh aspect may be a chip or a chip system.
[0106] In one implementation, the second device of the second, third, fifth, sixth, eighth, tenth, and twelfth aspects may be a chip or a chip system.
[0107] A thirteenth aspect of the present application provides a computer program product comprising computer instructions, characterized in that when the computer program product is run on a computer, the computer is enabled to execute any one of the implementation methods of any one of the first to third aspects.
[0108] In a fourteenth aspect, the present application provides a computer-readable storage medium comprising computer instructions, which, when executed on a computer, enable the computer to execute any one of the implementation methods in any one of the first to third aspects.
[0109] In a fifteenth aspect, the present application provides a chip device comprising a processor for calling a computer program or computer instruction in a memory so that the processor executes any one of the implementation methods of any one of the first to third aspects above.
[0110] Optionally, the processor is coupled to the memory via an interface.
[0111] In the sixteenth aspect, the present application provides a communication system, which includes a first device and a second device; the first device is used to execute the method shown in the first aspect, and the second device is used to execute the method shown in the second aspect or the third aspect.
[0112] As can be seen from the above technical solution, the first device determines the personalized category data of the first device. Then, the first device determines the degree of forgetting learning completion of the first global model on the personalized category data. The first global model is the global model at the moment the first device applies for or executes forgetting learning judgment. Based on the degree of forgetting learning completion, the first device determines whether to perform federated forgetting learning on the personalized category data. This effectively determines whether federated forgetting learning is necessary, avoiding the overhead associated with unnecessary federated forgetting learning and model performance recovery. This improves the implementation of federated forgetting learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0113] FIG1 is a schematic diagram of a communication system according to an embodiment of the present application;
[0114] FIG2A is another schematic diagram of a communication system according to an embodiment of the present application;
[0115] FIG2B is another schematic diagram of a communication system according to an embodiment of the present application;
[0116] FIG2C is another schematic diagram of a communication system according to an embodiment of the present application;
[0117] FIG3 is a schematic diagram of an embodiment of a data processing method according to an embodiment of the present application;
[0118] FIG4 is a schematic diagram of another embodiment of the data processing method according to an embodiment of the present application;
[0119] FIG5 is a schematic diagram of another embodiment of the data processing method according to an embodiment of the present application;
[0120] FIG6 is a schematic diagram of another embodiment of the data processing method according to the embodiment of the present application;
[0121] FIG7 is a schematic structural diagram of the first device according to an embodiment of the present application;
[0122] FIG8 is a schematic structural diagram of a second device according to an embodiment of the present application;
[0123] FIG9 is a schematic structural diagram of a device according to an embodiment of the present application;
[0124] FIG10 is another schematic structural diagram of the device according to an embodiment of the present application;
[0125] FIG11 is another structural diagram of the device according to an embodiment of the present application. DETAILED DESCRIPTION
[0126] Embodiments of the present application provide a data processing method and related apparatus, wherein a first device determines the degree of forgetting learning completion of a first global model on personalized category data, and determines whether to perform federated forgetting learning on the personalized category data based on the degree of forgetting learning completion. This effectively determines whether federated forgetting learning is necessary, avoiding the overhead associated with unnecessary federated forgetting learning and model performance recovery, thereby better implementing federated forgetting learning.
[0127] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.
[0128] References to "one embodiment" or "some embodiments" in this application mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0129] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "plurality" means two or more. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c; a and b; a and c; b and c; or a, b, and c. Among them, a, b, and c can be single or multiple.
[0130] It is understood that in this application, "indication" can include direct indication, indirect indication, explicit indication, and implicit indication. When describing that a certain indication information is used to indicate A, it can be understood that the indication information carries A, directly indicates A, or indirectly indicates A.
[0131] The technical solution of the present application can be applied to cellular communication systems related to the 3rd Generation Partnership Project (3GPP). For example, the 4th generation (4G) communication system, the 5th generation (5G) communication system, and the communication system after the 5th generation communication system. For example, the 6th generation communication system. For example, the 4th generation communication system may include the long term evolution (LTE) communication system. The 5th generation communication system may include the new radio (NR) communication system. The technical solution of the present application can also be applied to wireless fidelity (WiFi) systems, communication systems that support the integration of multiple wireless technologies, device-to-device (D2D) systems, vehicle to everything (V2X) communication systems, or satellite communication systems, etc. The wireless communication systems involved in the present application also include but are not limited to: narrowband Internet of Things (NB-IoT) systems.
[0132] The communication system to which the technical solution of the present application applies includes a first device and a second device. Optionally, the communication system further includes other devices in addition to the first device, wherein the first device and the other devices participate in federated learning and report local models obtained by local training of each device to the second device through federated learning. The second device fuses the local models reported by each device to obtain a global model.
[0133] In a possible implementation, the first device is a terminal device, and the second device is a network device. Optionally, the other device is a terminal device.
[0134] In another possible implementation, the first device is a terminal device, and the second device is a cloud server. Optionally, the other device is a terminal device.
[0135] In another possible implementation, the first device is a first terminal device, and the second device is also a first terminal device. Optionally, the other device is a third terminal device.
[0136] The above shows two possible implementations of the first device and the second device. This application is still applicable to other implementations, and the above examples do not limit this application.
[0137] Figure 1 is a schematic diagram of a communication system according to an embodiment of the present application. As shown in Figure 1, the first device is a mobile phone 101, and the second device is a base station 102. More devices include a car 103 and a notebook 104. The following describes the process of federated learning by the first device, the second device, and more devices. Step 1: The mobile phone 101, the car 103, and the notebook 104 can respectively perform local training using local data to obtain local models. Step 2: The mobile phone 101, the car 103, and the notebook 104 respectively send corresponding local models to the base station 102. Step 3: The base station 102 can collect multiple local models and fuse the multiple local models to obtain a global model. Step 4: The base station 102 sends the global model to the mobile phone 101, the car 103, and the notebook 104 respectively. The above steps 1 to 4 can be repeated until the global model converges or the number of training rounds reaches the upper limit.
[0138] This application can be applied to scenarios involving federated learning in wireless environments. Specifically, consider a network with a certain number of wireless devices. For example, as shown in Figure 1, mobile phone 101 and base station 102, etc. These devices can communicate wirelessly. As shown in Figure 1, the corresponding devices on the user side and the network side perform federated learning training to obtain a classification model. That is, the global model is a classification model, which is used to classify data. The target user (for example, mobile phone 101 shown in Figure 1) has personalized category data. This personalized category data refers to category data that the target user independently possesses, distinct from other users. For example, the target user's local dataset includes public category data and personalized category data. Public category data can be understood as category data also possessed by other users participating in federated learning. Personalized category data, on the other hand, is category data unique to the target user. The target user initiates a forget learning request. It should be noted that the target user's initiation of a forget learning request presupposes that the target user has personalized category data. The communication system needs to maximize the classification accuracy of the public category data while completely forgetting the personalized category data, and reduce the overhead of federated forget learning and model performance recovery. Therefore, how to better implement federated forget learning is a question worth considering. For example, how to avoid the overhead of unnecessary federated forgetting and model performance recovery. This application provides a corresponding technical solution to verify the necessity of federated forgetting and avoid the overhead of unnecessary federated forgetting and model performance recovery. For details, please refer to the relevant description of the embodiments below.
[0139] Many recent laws have mandated that users participating in model training have the right to request data deletion and have the model forget their data. These include the European Union's General Data Protection Regulation, California's U.S. Consumer Privacy Act, and Canada's privacy legislation. Consequently, forgetting learning has begun to gain attention in both academia and industry. This research addresses methods for inducing selective amnesia in models, aiming to remove all traces of a specific user's data without impacting performance. However, forgetting learning often comes with implementation overhead and reduced model performance, primarily due to the stochastic and incremental nature of the training process. In addition to the two aforementioned challenges, forgetting learning also faces the challenges of inaccessible training data and information coupling caused by iterative training. Consequently, many forgetting learning methods for centralized artificial intelligence (AI) systems cannot be applied in distributed federated learning scenarios. Therefore, implementing federated forgetting learning in federated learning scenarios requires addressing the following issues: 1. How to reduce the overhead of federated forgetting learning and model performance recovery while forgetting the personalized category data of the target user; and 2. How to verify the extent of forgetting in a distributed manner. This application provides a corresponding technical solution to achieve federated forgetting learning of personalized category data while avoiding the unnecessary overhead of federated forgetting learning and model performance recovery caused by excessive forgetting learning. For details, please refer to the relevant description of the embodiments below.
[0140] In the following embodiments, the embodiment shown in FIG3 mainly illustrates a solution for verifying the necessity of federated forgetting learning. This effectively avoids unnecessary federated forgetting learning scenarios and the overhead incurred by federated forgetting learning and model performance recovery. This allows for better federated forgetting learning. FIG5 and FIG6 respectively illustrate two possible federated forgetting learning solutions provided by this application. This allows for efficient federated forgetting learning.
[0141] The following introduces the terminal equipment and network equipment involved in this application.
[0142] Terminal equipment, also known as user equipment (UE), mobile station (MS), mobile terminal (MT), or customer premise equipment (CPE), is a device that includes wireless communication capabilities (providing voice and data connectivity to users). Examples include handheld devices, in-vehicle devices, and machine-type communication (MTC) terminals with wireless connectivity. Currently, terminal equipment can include: mobile phones, tablets, laptops, PDAs, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals used in industrial control, self-driving vehicles, remote medical surgery, smart grids, transportation safety, smart cities, and smart homes. For example, wireless terminals in unmanned driving can be drones, helicopters, or airplanes. For example, wireless terminals in the Internet of Vehicles can be onboard equipment, complete vehicle equipment, onboard modules, vehicles, or ships. Wireless terminals in industrial control can be cameras, robots, or robotic arms. Wireless terminals in smart homes can be televisions, air conditioners, vacuum cleaners, speakers, or set-top boxes.
[0143] It should be noted that the terminal device can be a device or apparatus with a chip, or a device or apparatus with integrated circuits, or a chip, module or control unit in the device or apparatus shown above, and this application does not limit this specifically.
[0144] A network device is a device deployed in a radio access network (RAN) to provide wireless communication capabilities for terminal devices. A network device can also be called an access network (RAN) entity, access node, network node, or communication device.
[0145] Specifically, the network device may be an access network device of a cellular system related to the 3rd Generation Partnership Project (3GPP). For example, a fourth-generation (4G) mobile communication system or a 5G mobile communication system. The network device may also be an access network device in an open access network (O-RAN or ORAN) or a cloud radio access network (CRAN). Alternatively, the network device may be an access network device in a communication system obtained by integrating two or more of the above communication systems.
[0146] The network equipment includes, but is not limited to, evolved Node B (eNB), radio network controller (RNC), Node B (NB), base station controller (BSC), base transceiver station (BTS), home base station (e.g., home evolved NodeB, or home Node B, HNB), baseband unit (BBU), access point (AP) in wireless fidelity (WIFI) system, macro base station, micro base station, wireless relay node, donor node, wireless controller in CRAN scenario, wireless backhaul node, transmission point (TP) or transmission and receiving point (TRP). The network equipment can also be an access network equipment in a 5G mobile communication system. For example, a next generation NodeB (gNB) in a new radio (NR) system, a TRP, a TP, or one or a group of antenna panels (including multiple antenna panels) of a base station in a 5G mobile communication system. Alternatively, the network device may also be a network node constituting a gNB or a transmission point. For example, a centralized unit (CU), a distributed unit (DU), a CU-control plane (CP), a CU-user plane (UP), or a radio unit (RU). The CU and DU may be configured separately or included in the same network element. For example, a BBU. The RU may be included in a radio frequency device or radio frequency unit. For example, in a remote radio unit (RRU), an active antenna unit (AAU), or a remote radio head (RRH). Alternatively, the network device may also be a server, a wearable device, a vehicle, or an on-board device. For example, in V2X technology, the network device may be a road side unit (RSU).
[0147] It should be noted that in different systems, CU (or CU-CP and CU-UP), DU or RU may have different names, but those skilled in the art can understand their meanings. For example, in an open radio access network (ORAN) system, CU may also be called an open centralized unit (O-CU) or an open CU, DU may also be called an open distributed unit (O-DU), a centralized unit control plane (CU-CP) may also be called an open centralized unit control plane (O-CU-CP) or an open CU-CP, a centralized unit user plane (CU-UP) may also be called an open centralized unit user plane (O-CU-UP) or an open CU-UP, and RU may also be called an open radio unit (O-RU). This application does not limit this. Any of the CU, CU-CP, CU-UP, DU and RU in this application may be implemented by a software module, a hardware module, or a combination of a software module and a hardware module.
[0148] Optionally, for network elements in the ORAN system, each network element may implement the protocol layer functions shown in Table 1 below.
[0149] Table 1
[0150] It should be noted that the network device can be one or more network elements shown in Table 1 above, and this application does not make any specific limitations.
[0151] It should be noted that Table 1 above is merely an example. In actual applications, the protocol layer functions supported by each network element are not limited. For example, each network element may support more protocol layer functions, or the protocol layer functions supported by each network element may be specifically configured based on actual conditions. This application does not impose any specific limitations.
[0152] The following describes the architecture of the CU and DU of an access network device. The access network device includes at least one CU and at least one DU. Optionally, the access network device also includes at least one RU.
[0153] The following is an introduction using the example of an access network device including a CU and a DU. The CU has some functions of the core network, and the CU may include a CU-CP and a CU-UP. The CU and the DU may be configured according to the protocol layer functions of the wireless network they implement. For example, the CU is configured to implement the functions of the packet data convergence protocol (PDCP) layer and the protocol layers above it (for example, the RRC layer and / or the SDAP layer). The DU is configured to implement the functions of the protocol layers below the PDCP layer (for example, the RLC layer, the MAC layer, and / or the physical (PHY) layer). For another example, the CU is configured to implement the functions of the protocol layers above the PDCP layer (such as the RRC layer and / or the SDAP layer), and the DU is configured to implement the functions of the PDCP layer and the protocol layers below it (for example, the RLC layer, the MAC layer, and / or the PHY layer, etc.).
[0154] When a CU includes a CU-CP and a CU-UP, the CU-CP is used to implement the control plane functions of the CU, and the CU-UP is used to implement the user plane functions of the CU. For example, when the CU is configured to implement the functions of the PDCP layer, RRC layer, and SDAP layer, the CU-CP is used to implement the RRC layer functions and the control plane functions of the PDCP layer, and the CU-UP is used to implement the SDAP layer functions and the user plane functions of the PDCP layer.
[0155] The CU-CP can interact with the network elements in the core network for implementing control plane functions. The network elements in the core network for implementing control plane functions may be access and mobility function network elements, such as the access and mobility management function (AMF) in the 5G mobile communication system. The access and mobility function network element is responsible for mobility management in the mobile network, such as location update of the terminal device, registration network of the terminal device, switching of the terminal device, etc. The CU-UP can interact with the network elements in the core network for implementing user plane functions. The network elements in the core network for implementing user plane functions, such as the user plane function (UPF) in the 5G mobile communication system, are responsible for forwarding and receiving data in the terminal device.
[0156] The above configuration of CU and DU is only an example, and the functions of CU and DU can also be configured as needed. For example, the CU or DU can be configured to have the functions of more protocol layers, or the CU or DU can be configured to have partial processing functions of the protocol layer. For example, some functions of the RLC layer and the functions of the protocol layers above the RLC layer are set in the CU, and the remaining functions of the RLC layer and the functions of the protocol layers below the RLC layer are set in the DU. For another example, the functions of the CU or DU can be divided according to the service type or other system requirements. For example, according to the delay, the functions whose processing time needs to meet the smaller delay requirement are set in the DU, and the functions that do not need to meet the delay requirement are set in the CU.
[0157] The DU and RU can work together to implement the functions of the PHY layer. A DU can be connected to one or more RUs. The functions of the DU and RU can be configured in various ways according to the design. For example, the DU is configured to implement the baseband function, and the RU is configured to implement the mid-RF function. For another example, the DU is configured to implement the high-layer functions in the PHY layer, and the RU is configured to implement the low-layer functions in the PHY layer or to implement the low-layer functions and the RF functions. The high-layer functions in the physical layer may include a part of the functions of the physical layer, which is closer to the MAC layer, and the low-layer functions in the physical layer may include another part of the functions of the physical layer, which is closer to the mid-RF side.
[0158] Optionally, the network device may also be a core network device. The core network device is responsible for access control, registration management, service management, mobility management, etc. for terminal devices accessing the network. For example, the core network device is an AMF.
[0159] It should be noted that the network device can be the device or apparatus shown above, or it can be a component (for example, a chip), module, or unit in the device or apparatus shown above, and this application does not limit it specifically.
[0160] The communication system provided in the present application may introduce artificial intelligence (AI) network elements to implement some or all AI-related operations. The AI network element may also be referred to as an AI node, AI device, AI entity, AI module, AI model, or AI unit, etc. The AI network element may be a network element built into the communication system. For example, the AI network element may be an AI module built into: an access network device, a core network device, a cloud server, or a network management (OAM) to implement AI-related functions. The OAM may be a network management device serving as a core network device and / or a network management device serving as an access network device. Alternatively, the AI network element may also be an independently configured network element in the communication system. Optionally, the terminal device or the chip built into the terminal device may also include an AI entity to implement AI-related functions. Another communication system provided in an embodiment of the present application is described below in conjunction with FIG. 2A .
[0161] Figure 2A is another schematic diagram of a communication system according to an embodiment of the present application. As shown in Figure 2A, network elements in the communication system are connected through interfaces (for example, NG interfaces, or Xn interfaces) or air interfaces. One or more AI modules are provided in these network element nodes (for example, core network equipment, access network nodes (RAN nodes), terminals, or one or more devices in OAM) (for the sake of clarity, only one is shown in Figure 2A). The access network node can be a separate RAN node, or it can include multiple RAN nodes, for example, including CU and DU. One or more AI modules can also be provided in the CU and / or DU. Optionally, the CU can also be split into CU-CP and CU-UP. One or more AI models are provided in the CU-CP and / or CU-UP.
[0162] The AI module is used to implement the corresponding AI function. The AI modules deployed in different network elements can be the same or different. The model of the AI module can implement different functions according to different parameter configurations. The model of the AI module can be configured based on one or more of the following parameters: structural parameters (such as the number of neural network layers, the width of the neural network, the connection relationship between layers, the weight of the neuron, the activation function of the neuron, or at least one of the bias in the activation function), input parameters (such as the type of input parameters and / or the dimension of the input parameters), or output parameters (such as the type of output parameters and / or the dimension of the output parameters). Among them, the bias in the activation function can also be called the bias of the neural network.
[0163] An AI module can have one or more models. A model can infer an output, which includes one or more parameters. The learning, training, or inference processes of different models can be deployed on different nodes or devices, or on the same node or device.
[0164] It should be noted that the access network node shown in Figure 2A can be used as a whole, or the access network node shown in Figure 2A can adopt a CU and DU separated architecture. Figure 2B shows a schematic diagram of a communication system in which the access network node is used as a whole and the access network node is connected to a terminal device. Figure 2C shows a schematic diagram of a communication system in which the access network node adopts a CU and DU separated architecture.
[0165] The technical solution of this application is introduced below in conjunction with specific embodiments.
[0166] FIG3 is a schematic diagram of an embodiment of a data processing method according to an embodiment of the present application. Referring to FIG3 , the method includes:
[0167] 301. A first device determines personalized category data of the first device.
[0168] The personalized category data of the first device is the category data that is different from the category data of other devices participating in federated learning, that is, the category data unique to the first device. Typically, the first device includes public category data and personalized category data. Public category data can be category data shared by the first device and other devices participating in federated learning, while personalized category data is category data unique to the first device. The first device and other devices participating in federated learning jointly perform federated learning to train a global model. For example, the global model can be a classification model, which is used to classify data.
[0169] The following describes two possible implementations of the first device determining the personalized category data of the first device. This application is still applicable to other implementations, and this application does not limit them specifically.
[0170] Implementation method 1: Optionally, the above step 301 specifically includes step a and step b.
[0171] Step a: The first device tracks the improvement of the classification accuracy corresponding to various categories of data of the first device during the federated learning process.
[0172] The classification accuracy corresponding to various categories of data in the first device includes the classification accuracy of the global model obtained by the first device during each training round during the federated learning process on the various categories of data. For example, the first device performs ten training rounds during the federated learning process, obtaining global models 1 to 10, respectively. In a connected vehicle scenario, the first device includes three categories of data: forward data, left-turn data, and right-turn data. The first device records the classification accuracy of global model 1 on the forward data, left-turn data, and right-turn data, respectively. For example, the forward data includes ten samples, and the first device identifies the categories of these ten samples using global model 1. The first device determines the ratio between the number of samples with correct category identification among the ten samples and the total number of samples included in the forward data. This ratio can be understood as the classification accuracy of global model 1 on the forward data. The classification accuracy of global model 1 on other categories of data is calculated in a similar manner and is not described here. The first device records the classification accuracy of global model 2 on the forward data, left-turn data, and right-turn data, respectively. Similarly, the first device records the classification accuracy of global model 10 on the forward data, left-turn data, and right-turn data, respectively. The improvement may include the improvement in the classification accuracy corresponding to each category of data. For example, as the number of training rounds increases, the first device determines that the improvement in the classification accuracy corresponding to the forward data is the largest.
[0173] Step b: The first device determines the category data with the largest improvement in the corresponding classification accuracy as the personalized category data.
[0174] For example, as the number of training rounds increases, the first device determines that the classification accuracy corresponding to the forward data is improved the most. The first device determines the forward data as the personalized category data.
[0175] Optionally, step b above is merely an example. In actual applications, the first device determines the category data whose corresponding classification accuracy is greater than a preset threshold as the personalized category data. Alternatively, the first device determines the category data whose corresponding classification accuracy is greater than or equal to a preset threshold as the personalized category data. For example, the first device includes three categories of data, namely forward data, left turn data, and right turn data. As the number of training rounds increases, the classification accuracy corresponding to the forward data and the classification accuracy corresponding to the left turn data are both greater than the preset threshold, and the first device determines the forward data and the left turn data as the personalized category data.
[0176] Implementation method 2: Optionally, the above step 301 specifically includes: step 1 and step 2.
[0177] Step 1: The first device determines how the classification accuracy of the third global model on various types of data of the first device changes compared to the classification accuracy of the first global model on various types of data of the first device.
[0178] The third global model is obtained by weighted fusion of the global models obtained by performing gradient descent on the first global model by other devices other than the first device. That is, the second device can instruct the other devices to continue federated learning, collect the global models reported by the other devices, and then fuse the global models reported by the other devices to obtain the third global model. Then, the second device sends the third global model to the first device. The first global model is the global model at the moment when the first device applies for or executes the forgetting learning judgment. For example, the first global model is the global model obtained by the first device and other devices other than the first device through federated learning. For example, the global model is a classification model, and the classification model is used to classify data.
[0179] For example, the first device includes two types of category data, namely category data 1 and category data 2. The first device determines the classification accuracy of the third global model on category data 1 and the classification accuracy of the third global model on category data 2. The first device determines the classification accuracy of the first global model on category data 1 and the classification accuracy of the first global model on category data 2. The change may include a change in the classification accuracy of the third global model on category data 1 compared to the classification accuracy of the first global model on category data 1, and a change in the classification accuracy of the third global model on category data 2 compared to the classification accuracy of the first global model on category data 2.
[0180] Optionally, the first device obtains the third global model. A possible implementation of the first device obtaining the first global model is described below in conjunction with the embodiment shown in FIG4 .
[0181] 401. A first device sends an auxiliary determination request to a second device. Correspondingly, the second device receives the auxiliary determination request from the first device.
[0182] The auxiliary determination request is used to request the second device to assist the first device in determining personalized category data.
[0183] 402. The second device sends the third global model to the first device. Correspondingly, the first device receives the third global model from the second device.
[0184] For details about the third global model, please refer to the relevant introduction in step 1 above, which will not be repeated here.
[0185] The following describes a possible implementation method for the second device to obtain the third global model in conjunction with steps 401a to 401c. Optionally, the embodiment shown in FIG4 further includes steps 401a to 401c. Steps 401a to 401c can be performed before step 402.
[0186] 401a: The second device sends first indication information to other devices except the first device. Correspondingly, the other devices except the first device receive the first indication information from the second device.
[0187] The first indication information is used to instruct the other device to continue the federated learning.
[0188] 401b. The other device except the first device sends a global model obtained by performing gradient descent on the first global model by the other device except the first device to the second device. Correspondingly, the second device receives the global model obtained by performing gradient descent on the first global model by the other device except the first device from the other device except the first device.
[0189] For example, the other devices except the first device perform M rounds of gradient descent on the first global model, where M is an integer greater than or equal to 1.
[0190] 401c. The second device fuses the global models obtained by performing gradient descent on the first global model by devices other than the first device to obtain a third global model.
[0191] Step 2: The first device uses the category data with reduced classification accuracy as personalized category data.
[0192] For example, the first device includes two types of category data, namely category data 1 and category data 2. The change includes a change in the classification accuracy of the third global model on category data 1 compared to the classification accuracy of the first global model on category data 1, and a change in the classification accuracy of the third global model on category data 2 compared to the classification accuracy of the first global model on category data 2. The first device determines from the change that the classification accuracy of the third global model on category data 1 is lower than the classification accuracy of the first global model on category data 1, and that the classification accuracy of the third global model on category data 2 is higher than the classification accuracy of the first global model on category data 2. Therefore, the first device can determine that category data 1 is the personalized category data.
[0193] Optionally, step 2 above is merely one method for the first device to select personalized category data. In practical applications, the first device may also select personalized category data in other ways. For example, the first device determines the category data with the largest decrease in classification accuracy as the personalized category data. Alternatively, the first device determines the category data with a decrease in classification accuracy greater than a preset threshold as the personalized category data.
[0194] Optionally, the embodiment shown in FIG3 further includes steps 301a to 301d.
[0195] 301a: The first device sends a forgetting learning determination request to the second device. Correspondingly, the second device receives the forgetting learning determination request from the first device.
[0196] The forget learning judgment request is used to request whether to perform federated forget learning.
[0197] 301b: The second device sends the training contribution to the first device. Correspondingly, the first device receives the training contribution from the second device.
[0198] The training contribution indicates the contribution of the first device to model training, specifically, the contribution of the first device's raw data to improving global model performance. For example, if the first device and other devices perform federated learning to train a classification model, which can be understood as the global model, the contribution of the first device's raw data to improving the classification model's classification performance is shown.
[0199] In one possible implementation, the training contribution can be represented by the change in the global accuracy of the first global model and the global accuracy of the second global model. For example, the training contribution includes: (global accuracy of the first global model - global accuracy of the second global model) / global accuracy of the second global model, or the training contribution includes: the difference between the global accuracy of the first global model and the global accuracy of the second global model.
[0200] The global accuracy of the first global model refers to the accuracy with which the first global model identifies the categories of some or all of the categorical data of the second device. The first global model is the global model at the moment the first device applies for or executes forget learning judgment. The global accuracy of the second global model refers to the accuracy with which the second global model identifies the categories of some or all of the categorical data of the second device. The second global model is the global model at the moment the first device joins the federated learning process.
[0201] Optionally, two possible implementations of the global accuracy of the first global model are shown below.
[0202] Implementation method 1: The second device determines the global accuracy of the first global model through a verification data set of the second device. The verification data set of the second device includes part of the category data or all of the category data of the second device. For example, the second device inputs the verification data set of the second device into the first global model to obtain the category of the verification data set output by the first global model. The verification data set includes multiple data, and the second device determines the ratio between the number of data in the multiple data that the first global model correctly identifies the category of to the number of data included in the verification data set. This ratio can be understood as the global accuracy of the first global model.
[0203] Implementation method 2: Each of the first device and the other devices inputs the verification data set of the device into the first global model to obtain the category of the verification data set output by the first global model. The verification data set includes multiple data, and the device determines the ratio between the number of data whose categories in the multiple data are correctly identified by the first global model and the number of data included in the verification data set. This ratio can be understood as the local accuracy of the first global model obtained by the device. Each of the first device and the other devices reports the local accuracy of the first global model to the second device. That is to say, the local accuracy reported by each of the first device and the other devices is determined based on the verification data set and the first global model of the device. The second device collects the local accuracy of the first global model reported respectively by the first device and the other devices. The second device fuses the local accuracy of the first global model reported respectively by the first device and the other devices to obtain the global accuracy of the first global model.
[0204] The process of determining the global accuracy of the second global model is similar to the process of determining the global accuracy of the aforementioned first global model. For details, please refer to the relevant introduction to the global accuracy of the aforementioned first global model, which will not be repeated here.
[0205] In another possible implementation, the training contribution includes an average ratio value, which is the average ratio of the gradient size reported by the first device in each round of federated learning to the sum of the gradient sizes reported by all devices in each round of federated learning, between the time of joining the federated learning process and the time of applying for or executing the forget learning judgment. For a round of federated learning, this ratio is equal to the gradient size reported by the first device in that round of federated learning * the weight of the first device / the weighted sum of the gradient sizes reported by all devices in that round of federated learning.
[0206] 301c. The first device determines whether to perform federated forgetting learning based on the training contribution; if yes, execute step 301; if not, execute step 301d.
[0207] Specifically, if the training contribution is greater than the second threshold, the first device determines to perform federated forgetting learning, and step 301 may be executed; if the training contribution is less than or equal to the second threshold, the first device determines not to perform federated forgetting learning, and step 301d may be executed. Alternatively, if the training contribution is greater than or equal to the second threshold, the first device determines to perform federated forgetting learning, and step 301 may be executed; if the training contribution is less than the second threshold, the first device determines not to perform federated forgetting learning, and step 301d may be executed.
[0208] For example, if the training contribution is represented by the change in global accuracy, the second threshold can be set at 5% or 10%. If the training contribution is represented by the proportion of gradient magnitude, the second threshold can be determined based on the number of devices participating in federated learning and / or the weight of the devices participating in federated learning. For example, the greater the number of devices participating in federated learning, the smaller the second threshold.
[0209] It should be noted that steps 301b to 301c can be used as independent embodiments and do not depend on other steps in the embodiment shown in Figure 3. The solution provided by this independent aspect includes: the first device receives the training contribution from the second device, and the first device determines whether to perform federated forgetting learning based on the training contribution. For example, if the training contribution is greater than the second threshold, the second device determines to perform federated forgetting learning. Optionally, the first device executes step 301. If the training contribution is less than or equal to the second threshold, the second device determines not to perform federated forgetting learning. Optionally, the first device executes step 301d. Therefore, the above steps 301b to 301c provide a judgment scheme for whether to perform federated forgetting learning. Optionally, before the first device receives the training contribution from the second device, the method also includes: the first device sends a forgetting learning judgment request to the second device, that is, the above step 301a.
[0210] 301d: The first device sends a third exit instruction to the second device. Correspondingly, the second device receives the third exit instruction from the first device.
[0211] The third exit instruction is used to notify the second device that the first device exits the federated learning process.
[0212] 302. The first device determines a degree of forgetting learning completion of the first global model on the personalized category data.
[0213] The first global model is a global model at the moment when the first device applies for or executes forgetting learning judgment. For example, the first global model is a global model obtained by the first device and other devices other than the first device through federated learning.
[0214] The forgetting learning completion of the first global model on the personalized category data represents the degree of forgetting learning of the first global model on the personalized category data.
[0215] Optionally, the degree of forgetting learning completion of the first global model on the personalized category data is determined based on a first accuracy rate and a second accuracy rate. The first accuracy rate represents the classification accuracy of the first global model on the personalized category data. For example, the personalized category data includes 20 samples. The first device inputs these 20 samples into the first global model and obtains the categories corresponding to the 20 samples as output by the first global model. The first device determines the ratio between the number of samples with correct category identification and the total number of samples included in the personalized category data. This ratio may be the first accuracy rate. The second accuracy rate represents the classification accuracy of the second global model on the personalized category data. The calculation method for the second accuracy rate is similar to that for the first accuracy rate and will not be further described here. The second global model is the global model at the time the first device joins the federated learning process. The time when the first device applies for or executes forgetting learning determination is after the time when the first device joins the federated learning process. For example, starting from the time when the first device joins the federated learning process, the first global model is obtained after T rounds of model training. For example, the degree of forgetting learning completion of the first global model on the personalized category data is equal to the second accuracy rate / the first accuracy rate.
[0216] 303. The first device determines whether to perform federated forgetting learning on the personalized category data according to the forgetting learning completion degree of the first global model on the personalized category data.
[0217] Optionally, if the first global model's forgetting learning completion on the personalized category data is less than a first threshold, the first device determines to perform federated forgetting learning on the personalized category data. That is, if the first global model's forgetting learning completion on the personalized category data is less than the first threshold, it indicates that the personalized category data has not been completely forgotten. If the first global model's forgetting learning completion on the personalized category data is greater than or equal to the first threshold, the first device determines not to perform federated forgetting learning on the personalized category data. That is, if the first global model's forgetting learning completion on the personalized category data is greater than or equal to the first threshold, it indicates that the personalized category data has been completely forgotten. Alternatively, if the first global model's forgetting learning completion on the personalized category data is less than or equal to the first threshold, the first device determines to perform federated forgetting learning on the personalized category data; if the first global model's forgetting learning completion on the personalized category data is greater than the first threshold, the first device determines not to perform federated forgetting learning on the personalized category data.
[0218] Optionally, the first threshold may be determined in combination with the requirements of the first device and / or the sensitivity of the first device to the personalized category data. For example, the first threshold is 1, which means that the first device requires the first global model to completely forget the personalized category data.
[0219] Optionally, the embodiment shown in FIG3 further includes step 304 or step 305. Step 304 or step 305 may be performed after step 303. That is, the first device determines whether to perform federated forgetting learning on the personalized category data based on the forgetting learning completion degree of the first global model on the personalized category data. If yes, step 304 is performed; if not, step 305 is performed.
[0220] 304. The first device sends a forgetting learning request to the second device. Correspondingly, the second device receives the forgetting learning request from the first device.
[0221] Among them, the forget learning request is used to request to enable federated forget learning for personalized category data.
[0222] Optionally, after the first device sends a forget learning request to the second device, the second device may instruct the first device to initiate federated forget learning. The first device may perform federated forget learning. The process of the first device performing federated forget learning can be described in detail in the embodiments shown in FIG. 5 or FIG. 6 below, and will not be further described here.
[0223] Optionally, after the first device sends a forgetting learning request to the second device, the second device may also reject the forgetting learning request of the first device, that is, the second device may feedback a rejection response to the first device, and the rejection response is used to reject the forgetting learning request of the first device.
[0224] 305. The first device sends a first exit instruction to the second device. Correspondingly, the second device receives the first exit instruction from the first device.
[0225] The first exit instruction is used to notify the second device that the first device exits the federated learning process.
[0226] Specifically, if the forgetting learning completion degree of the first global model on the personalized category data is greater than or equal to the first threshold, the first device determines not to perform federated forgetting learning on the personalized category data. The first device can directly exit the federated learning process.
[0227] In an embodiment of the present application, the first device determines the personalized category data of the first device. Then, the first device determines the degree of completion of forgetting learning of the first global model on the personalized category data, and the first global model is the global model at the moment when the first device applies for or executes forgetting learning judgment. The first device determines whether to perform federated forgetting learning on the personalized category data based on the degree of completion of forgetting learning. It can be seen that the first device determines the degree of completion of forgetting learning of the first global model on the personalized category data, and determines whether to perform federated forgetting learning on the personalized category data based on the degree of completion of forgetting learning. Thereby, it is possible to effectively judge whether federated forgetting learning is needed. The overhead generated by unnecessary federated forgetting learning and model performance recovery is avoided or reduced. Thereby, federated forgetting learning is better achieved.
[0228] FIG5 is a schematic diagram of an embodiment of a data processing method according to an embodiment of the present application. Referring to FIG5 , the method includes:
[0229] 501. A second device sends an activation instruction to a first device. Correspondingly, the first device receives the activation instruction from the second device.
[0230] The start instruction is used to instruct the first device to start federated forgetting learning for personalized category data.
[0231] 502. The first device performs gradient ascent on the first global model according to the personalized category data to obtain a fourth global model.
[0232] For example, the first device performs N rounds of gradient ascent on the first global model according to the personalized category data to obtain a fourth global model, where N is an integer greater than or equal to 1.
[0233] The fourth global model's degree of forgetting learning on the personalized category data is greater than a first threshold. Alternatively, the fourth global model's degree of forgetting learning on the personalized category data is greater than or equal to the first threshold. For details about the first threshold, please refer to the description of the embodiment shown in FIG3 . This ensures forgetting learning effectiveness for the personalized category data and avoids unnecessary forgetting learning and model performance recovery overhead caused by excessive forgetting learning.
[0234] It should be noted that when the first device performs gradient ascent on the first global model based on the personalized category data, if the degree of forgetting learning of the global model obtained by gradient ascent on the personalized category data is less than a first threshold, the first device continues the gradient ascent process. When the degree of forgetting learning of the global model obtained by gradient ascent on the personalized category data is greater than or equal to the first threshold, the first device stops the gradient ascent process. The value of N represents the number of rounds of gradient ascent performed by the first device on the first global model at the time of stopping the gradient ascent. This achieves complete forgetting learning of the personalized category data while also avoiding excessive forgetting learning.
[0235] Optionally, the degree of forgetting learning completion of the fourth global model on the personalized category data is determined based on the second accuracy and the third accuracy. The second accuracy represents the classification accuracy of the second global model on the personalized category data. The third accuracy represents the classification accuracy of the fourth global model on the personalized category data. The calculation method of the third accuracy is similar to the calculation method of the aforementioned first accuracy. For details, please refer to the relevant introduction of the calculation method of the aforementioned first accuracy, which will not be repeated here. The second global model is the global model at the moment when the first device joins the federated learning process. For example, the degree of forgetting learning completion of the fourth global model on the personalized category data is equal to the second accuracy / third accuracy.
[0236] 503. The first device sends the fourth global model to the second device. Correspondingly, the second device receives the fourth global model from the first device.
[0237] In one possible implementation, the second device may directly allow the first device to exit the federated learning process. In this implementation, optionally, the embodiment shown in FIG5 further includes step 504. Step 504 may be performed after step 503.
[0238] 504. The second device sends a first exit permission instruction to the first device. Correspondingly, the first device receives the first exit permission instruction from the second device.
[0239] The first exit permission indication is used to indicate that the first device is permitted to exit the federated learning process. Therefore, after receiving the first exit permission indication, the first device may exit the federated learning process. Optionally, after step 503 and before step 504, the first device may request the second device to exit the federated learning process.
[0240] Optionally, the embodiment shown in FIG5 further includes step 505. Step 505 may be performed after step 503.
[0241] 505. The second device sends the fourth global model to other devices except the first device. Correspondingly, the other devices except the first device receive the fourth global model from the second device.
[0242] The fourth global model is used by other devices except the first device to continue to perform federated learning. That is, the other devices except the first device continue to perform federated learning based on the fourth global model.
[0243] It should be noted that there is no fixed order for executing step 504 and step 505. Step 504 may be executed first, then step 505; or step 505 may be executed first, then step 504; or, depending on the circumstances, step 504 and step 505 may be executed simultaneously, which is not limited in this application.
[0244] In another possible implementation, the second device can perform a performance recovery evaluation on the fourth global model before deciding whether to allow the first device to exit federated learning. In this implementation, the embodiment shown in FIG5 optionally further includes steps 506 to 515. Steps 506 to 515 can be performed after step 503.
[0245] 506. The second device sends a first test request to other devices except the first device. Correspondingly, the other devices except the first device receive the first test request from the second device.
[0246] The first test request is used to instruct other devices except the first device to perform an accuracy test on the fourth global model.
[0247] 507. The other devices except the first device send the first local accuracy rate to the second device. Correspondingly, the second device receives the first local accuracy rate sent from the other devices except the first device.
[0248] Specifically, a local validation dataset of the device includes multiple samples. Each device other than the first device inputs the local validation dataset of the device into a fourth global model to obtain a category for each sample in the multiple data output by the fourth global model. The device determines a ratio between the number of samples for which the data category was correctly identified and the total number of samples included in the local validation dataset of the device, and the ratio is the first local accuracy rate of the device.
[0249] 508. The second device determines a first global accuracy rate based on the first local accuracy rates respectively sent by other devices except the first device.
[0250] Specifically, the second device performs weighted fusion on the first local accuracy rates respectively sent by devices other than the first device to obtain a first global accuracy rate.
[0251] 509. The second device determines whether the fourth global model needs performance recovery based on the first global accuracy rate. If so, execute step 510; if not, execute step 512.
[0252] For example, if the first global accuracy is greater than or equal to the third threshold, the second device determines that the fourth global model does not require performance recovery and may execute step 510; if the first global accuracy is less than the third threshold, the second device determines that the fourth global model requires performance recovery and may execute step 512. Alternatively, if the first global accuracy is greater than the third threshold, the second device determines that the fourth global model does not require performance recovery and may execute step 510; if the first global accuracy is less than or equal to the third threshold, the second device determines that the fourth global model requires performance recovery and may execute step 512. Optionally, the third threshold may be 80% of the global accuracy of the first global model.
[0253] 510. The second device sends a first exit permission instruction to the first device. Correspondingly, the first device receives the first exit permission instruction from the second device.
[0254] The first exit permission indication is used to indicate that the first device is allowed to exit the federated learning process. Therefore, after the first device receives the first exit permission indication, the first device can exit the federated learning process. Optionally, before step 510, the first device can request the second device to exit the federated learning process.
[0255] Specifically, if the second device determines that the fourth global model does not require performance recovery, the second device may send a first exit permission indication to the first device.
[0256] Optionally, the embodiment shown in FIG5 further includes step 511. Step 511 may be performed after step 509.
[0257] 511. The second device sends a fourth global model to other devices except the first device. Correspondingly, the other devices except the first device receive the fourth global model from the second device.
[0258] The fourth global model is used by other devices except the first device to continue to perform federated learning. That is, the other devices except the first device continue to perform federated learning based on the fourth global model.
[0259] It should be noted that there is no fixed order for executing step 510 and step 511. Step 510 may be executed first, then step 511; or step 511 may be executed first, then step 510; or, depending on the circumstances, step 510 and step 511 may be executed simultaneously, which is not limited in this application.
[0260] 512. The second device sends a first performance recovery indication to the first device. Correspondingly, the first device receives the first performance recovery indication from the second device.
[0261] The first performance recovery instruction is used to instruct the first device to perform performance recovery on the fourth global model.
[0262] Specifically, if the second device determines that the fourth global model requires performance recovery, the second device may send a first performance recovery indication to the first device.
[0263] 513. The first device performs gradient descent on the fourth global model according to the public category data of the first device to obtain a fifth global model.
[0264] For the public category data of the first device, please refer to the relevant introduction in the embodiment shown in FIG3 , which will not be repeated here.
[0265] For example, the first device may perform M rounds of gradient descent on the fourth global model based on the first device's public category data to obtain a fifth global model. This restores the classification accuracy of the fourth global model on category data other than the personalized category data. Optionally, M is preconfigured, sent by the second device to the first device, or specified by a communication protocol, and this application does not limit this.
[0266] 514. The first device sends the fifth global model to the second device. Correspondingly, the second device receives the fifth global model from the first device.
[0267] 515. If the fifth global model does not need to perform performance recovery, the second device sends a second exit permission instruction to the first device. Correspondingly, the first device receives the second exit permission instruction from the second device.
[0268] The second exit permission indication is used to indicate that the first device is allowed to exit the federated learning process.
[0269] Specifically, the second device may determine whether the fifth global model requires performance recovery in a manner similar to steps 506 to 509 above. If not, the second device may send a second exit permission instruction to the first device. It should be noted that if the fifth global model requires performance recovery, the second device may instruct the first device to perform gradient descent on the fifth global model until the resulting global model does not require performance recovery, or until the number of gradient descent rounds for the global model reaches a preset upper limit.
[0270] It can be seen that the technical solution of the embodiment shown in Figure 5 realizes forgetting learning of personalized category data through the gradient ascent algorithm. Other devices except the first device can receive the fourth global model and continue to perform federated learning based on the fourth global model. There is no need to store historical data in previous training rounds, avoiding excessive storage overhead. The first device performs gradient ascent on the first global model based on the personalized category data to obtain the fourth global model. Among them, the forgetting learning completion degree of the fourth global model on the personalized category data is greater than the first threshold. Or, the forgetting learning completion degree of the fourth global model on the personalized category data is greater than or equal to the first threshold. That is, the forgetting learning completion degree is used as the stopping criterion of the gradient ascent operation, which, on the one hand, ensures the forgetting learning effect of the personalized category data, and on the other hand, avoids the unnecessary forgetting learning caused by excessive forgetting learning and the overhead caused by model performance recovery.
[0271] FIG6 is a schematic diagram of another embodiment of the data processing method of the present application. Referring to FIG6 , the method includes:
[0272] 601. The second device sends an activation instruction to the first device. Correspondingly, the first device receives the activation instruction from the second device.
[0273] 602. The first device performs gradient ascent on the first global model according to the personalized category data to obtain a fourth global model.
[0274] 603. The first device sends the fourth global model to the second device. Correspondingly, the second device receives the fourth global model from the first device.
[0275] Steps 601 to 603 are similar to steps 501 to 503 in the embodiment shown in FIG. 5 . For details, please refer to the relevant introduction of steps 501 to 503 in the embodiment shown in FIG. 5 , which will not be repeated here.
[0276] 604. The second device receives a global model obtained by performing gradient descent on the first global model, which is sent from a device other than the first device.
[0277] Specifically, another device other than the first device may perform gradient descent on the first global model to obtain a global model, and report the global model to the second device. For example, another device other than the first device may perform M rounds of gradient descent on the first global model to obtain a global model, and report the global model to the second device.
[0278] 605. The second device performs weighted fusion on the fourth global model and the global model obtained by performing gradient descent on the first global model by devices other than the first device using the first set of weighted values to obtain a sixth global model.
[0279] The first group of weighted values includes weighted values corresponding to the fourth global model and global models obtained by performing gradient descent on the first global model by devices other than the first device.
[0280] This shows that the second device can fully utilize the common category data learned by other devices through weighted fusion, which can reduce the overhead caused by model performance recovery. For more information about common category data, please refer to the relevant introduction above.
[0281] 606. The second device sends the sixth global model and the first verification instruction to the first device. Correspondingly, the first device receives the sixth global model and the first verification instruction from the second device.
[0282] The first verification instruction is used to instruct the first device to perform forgetting learning performance verification on the sixth global model.
[0283] 607. The first device verifies the forgetting learning performance of the sixth global model to obtain a first verification result.
[0284] Optionally, the first verification result includes the forgetting learning completion of the sixth global model on the personalized category data.
[0285] Optionally, the degree of forgetting learning completion of the sixth global model on the personalized category data is determined based on the second accuracy and the fourth accuracy. The second accuracy is the classification accuracy of the second global model on the personalized category data. The second global model is the global model at the moment the first device joins the federated learning process. The fourth accuracy is the classification accuracy of the sixth global model on the personalized category data. The calculation method for the fourth accuracy is similar to the calculation method for the first accuracy described above. For details, please refer to the relevant description of the calculation method for the first accuracy described above. For example, the degree of forgetting learning completion of the sixth global model on the personalized category data is equal to the second accuracy / the fourth accuracy.
[0286] 608. The first device sends the first verification result to the second device. Correspondingly, the first device receives the first verification result from the second device.
[0287] Optionally, the first verification result includes the sixth global model's degree of completion of forgetting learning for the personalized category data. If the sixth global model's degree of completion of forgetting learning for the personalized category data is less than a first threshold, the first verification result indicates that the verification failed. That is, if the sixth global model's degree of completion of forgetting learning for the personalized category data is less than the first threshold, it indicates that the personalized category data has not been completely forgotten. If the sixth global model's degree of completion of forgetting learning for the personalized category data is greater than or equal to the first threshold, the first verification result indicates that the verification passed. That is, if the sixth global model's degree of completion of forgetting learning for the personalized category data is greater than the first threshold, it indicates that the personalized category data has been completely forgotten or excessively forgotten. Alternatively, if the sixth global model's degree of completion of forgetting learning for the personalized category data is less than or equal to the first threshold, the first verification result indicates that the verification failed; if the sixth global model's degree of completion of forgetting learning for the personalized category data is greater than the first threshold, the first verification result indicates that the verification passed. For details about the first threshold, please refer to the relevant description of the embodiment shown in FIG. 3 , which will not be repeated here.
[0288] Several possible implementations are described below in conjunction with the verification situation represented by the first verification result.
[0289] If the first verification result indicates that the verification has passed, in one possible implementation, the second device may allow the first device to exit the federated learning process. This application provides two possible implementations for this implementation. This application also applies to other implementations, which are not specifically limited in this application.
[0290] Implementation 1: Optionally, the embodiment shown in FIG6 further includes step 609. Step 609 may be performed after step 608.
[0291] 609. The second device sends a second exit instruction to the first device. Correspondingly, the first device receives the second exit instruction from the second device.
[0292] The second exit instruction is used to instruct the first device to exit the federated learning process.
[0293] Implementation 2: Optionally, the embodiment shown in FIG6 further includes step 610 and step 611. Step 610 and step 611 may be performed after step 608.
[0294] 610. The first device sends a logout request to the second device. Correspondingly, the second device receives the logout request from the first device.
[0295] The exit request is used by the first device to request to exit the federated learning process.
[0296] 611. The second device sends a third exit-allowed instruction to the first device. Correspondingly, the first device receives the third exit-allowed instruction from the second device.
[0297] The third exit permission indication is used to indicate that the first device is allowed to exit the federated learning process. Optionally, step 610 may be an optional step, that is, the second device may directly indicate that the first device is allowed to exit the federated learning process through the third exit permission indication.
[0298] Optionally, the embodiment shown in FIG6 further includes step 612 .
[0299] 612. The second device sends the sixth global model to other devices except the first device. Correspondingly, the other devices except the first device receive the sixth global model from the second device.
[0300] The sixth global model is used for other devices except the first device to continue federated learning.
[0301] It should be noted that, for the above-mentioned implementation method 1, there is no fixed execution order between step 609 and step 612. Step 612 may be executed first, and then step 609; or, step 609 may be executed first, and then step 612; or, step 612 and step 609 may be executed simultaneously depending on the circumstances, and this application does not limit this. For the above-mentioned implementation method 2, there is no fixed execution order between steps 610 to 611 and step 612. Step 612 may be executed first, and then step 610 to 611; or, step 610 to 611 may be executed first, and then step 612; or, step 612 may be executed first, and then step 610 to 611; and this application does not limit this.
[0302] If the first verification result indicates that the verification has passed, in another possible implementation, the second device determines whether the sixth global model needs to be restored in performance, and then decides whether to allow the first device to exit the federated learning process. This implementation is described below in conjunction with steps 613 to 627.
[0303] Optionally, the embodiment shown in FIG6 further includes steps 613 to 627. Steps 613 to 627 may be performed after step 608.
[0304] 613. The second device sends a second test request to other devices except the first device. Correspondingly, the other devices except the first device receive the second test request from the second device.
[0305] The second test request is used to instruct other devices except the first device to perform an accuracy test on the sixth global model.
[0306] 614. The other device except the first device sends the second local accuracy rate to the second device. Correspondingly, the second device receives the second local accuracy rate from the other device except the first device.
[0307] 615. The second device determines a second global accuracy rate based on second local accuracy rates sent by other devices except the first device.
[0308] 616. The second device determines whether the sixth global model needs performance recovery based on the second global accuracy; if so, execute step 617; if not, execute step 619.
[0309] 617. The second device sends a fifth exit-allowed instruction to the first device. Correspondingly, the first device receives the fifth exit-allowed instruction from the second device.
[0310] The fifth exit permission indication is used to indicate that the first device is allowed to exit the federated learning process. Optionally, before step 617, the first device may request the second device to exit the federated learning process.
[0311] Steps 613 to 617 are similar to steps 506 to 510 in the embodiment shown in FIG. 5 . For details, please refer to the relevant introduction of steps 506 to 510 in the embodiment shown in FIG. 5 , which will not be repeated here.
[0312] Optionally, the embodiment shown in FIG6 further includes step 618 .
[0313] 618. The second device sends the sixth global model to other devices except the first device. Correspondingly, the other devices except the first device receive the sixth global model from the second device.
[0314] The sixth global model is used by other devices except the first device to continue to perform federated learning. That is, other devices except the first device continue to perform federated learning based on the sixth global model.
[0315] It should be noted that there is no fixed order for executing step 617 and step 618. Step 617 may be executed first, then step 618; or step 618 may be executed first, then step 617; or, depending on the circumstances, step 617 and step 618 may be executed simultaneously, which is not limited in this application.
[0316] 619. The second device sends a second performance recovery indication to the first device. Correspondingly, the first device receives the second performance recovery indication from the second device.
[0317] If the sixth global model needs to perform performance recovery, the second device sends a second performance recovery instruction to the first device. The second performance recovery instruction is used to instruct the first device to perform performance recovery on the sixth global model.
[0318] 620. The first device performs gradient descent on the sixth global model according to the public category data of the first device to obtain a seventh global model.
[0319] Step 620 is similar to step 513 in the embodiment shown in FIG. 5 . For details, please refer to the relevant introduction of step 513 in the embodiment shown in FIG. 5 .
[0320] 621. The first device sends the seventh global model to the second device. Correspondingly, the second device receives the seventh global model from the first device.
[0321] 622. The second device sends a third test request to other devices except the first device. Correspondingly, the other devices except the first device receive the third test request from the second device.
[0322] 623. The other device except the first device sends the third local accuracy rate to the second device. Correspondingly, the second device receives the third local accuracy rate from the other device except the first device.
[0323] 624. The second device determines a third global accuracy rate based on the third local accuracy rates respectively sent by other devices except the first device.
[0324] Steps 621 to 624 are similar to steps 506 to 508 in the embodiment shown in FIG. 5 . For details, please refer to the relevant introduction of steps 506 to 508 in the embodiment shown in FIG. 5 , which will not be repeated here.
[0325] 625. The second device determines whether the seventh global model needs performance recovery based on the third global accuracy rate. If so, execute step 626.
[0326] It should be noted that if the seventh global model does not require performance recovery, step 626 is executed. If the seventh global model requires performance recovery, the second device may request the first device to perform gradient descent on the seventh global model in a manner similar to steps 619 to 620 above, and then determine whether the global model obtained by gradient descent requires performance recovery. This will not be repeated here.
[0327] 626. The second device sends a fourth exit-allowed instruction to the first device. Correspondingly, the first device receives the fourth exit-allowed instruction from the second device.
[0328] The fourth exit permission indication is used to indicate that the first device is allowed to exit the federated learning process. Optionally, before step 626, the first device may request the second device to exit the federated learning process.
[0329] Optionally, the embodiment shown in FIG6 further includes step 627 .
[0330] 627. The second device sends the seventh global model to other devices except the first device. Correspondingly, the other devices except the first device receive the seventh global model from the second device.
[0331] Optionally, there is no fixed order for executing step 626 and step 627. Step 626 may be executed first, then step 627; or step 627 may be executed first, then step 626; or, depending on the circumstances, step 626 and step 627 may be executed simultaneously, which is not limited in this application.
[0332] If the first verification result indicates that the verification fails, the second device may optionally perform model fusion using a new set of weighted values and then send the model fusion to the first device.
[0333] Optionally, the embodiment shown in FIG6 further includes steps 628 to 631. Steps 628 to 631 may be performed after step 608.
[0334] 628. The second device performs weighted fusion on the fourth global model and the global model obtained by performing gradient descent on the first global model by devices other than the first device using the second set of weighted values to obtain an eighth global model.
[0335] The second set of weighted values includes weighted values corresponding to the fourth global model and the global models obtained by performing gradient descent on the first global model by other devices except the first device. The second set of weighted values is different from the first set of weighted values.
[0336] 629. The second device sends the eighth global model and the second verification instruction to the first device. Correspondingly, the first device receives the eighth global model and the second verification instruction from the second device.
[0337] The second verification instruction is used to instruct the first device to perform forgetting learning performance verification on the eighth global model.
[0338] 630. The first device verifies the forgetting learning performance of the eighth global model to obtain a second verification result.
[0339] 631. The first device sends a second verification result to the second device. Correspondingly, the second device receives the second verification result from the first device.
[0340] Steps 629 to 631 are similar to the aforementioned steps 606 to 608. For details, please refer to the relevant introduction of the aforementioned steps 606 to 608, which will not be repeated here.
[0341] It should be noted that if the second verification result indicates that the verification is successful, in one possible implementation, the second device may allow the first device to exit the federated learning process. The execution process of this implementation is similar to the aforementioned steps 609 to 612. For details, please refer to the relevant introduction of the aforementioned steps 609 to 612, which will not be repeated here. If the second verification result indicates that the verification is successful, in another possible implementation, the second device determines whether the eighth global model needs to be restored in performance, and then decides whether to allow the first device to exit the federated learning process. The execution process of this implementation is similar to the aforementioned steps 613 to 627. For details, please refer to the relevant introduction of the aforementioned steps 613 to 627, which will not be repeated here. If the second verification result indicates that the verification is unsuccessful, the second device may perform model fusion using a new set of weighted values, and then send the fused global model to the first device. The specific implementation process is similar to the aforementioned steps 628 to 631, and will not be repeated here.
[0342] It can be seen from this that the technical solution of the embodiment shown in Figure 6 realizes forgetting learning of personalized category data through weighted fusion, which can not only ensure the forgetting learning performance, but also reduce the overhead of model performance recovery by utilizing public category data learned by other devices.
[0343] The following is a schematic diagram of the structure of the first device in the embodiment of the present application. Please refer to Figure 7. The first device can be used to execute the process executed by the first device in the embodiments shown in Figures 3 to 6. For details, please refer to the relevant introduction in the above method embodiments.
[0344] The first device 700 includes a processing module 701. Optionally, the first device 700 also includes a transceiver module 702.
[0345] The processing module 701 is used to process data. The transceiver module 702 can implement corresponding communication functions. The transceiver module 702 can also be called a communication interface or a communication module.
[0346] Optionally, the first device 700 may further include a storage module, which may be used to store instructions and / or data. The processing module 701 may read the instructions and / or data in the storage module so that the first device implements the aforementioned method embodiment.
[0347] The first device 700 can be configured to perform the actions performed by the first device in the above method embodiments. The first device 700 can be a first device or a component configurable in the first device. The processing module 701 is configured to perform the processing-related operations on the first device side in the above method embodiments. The transceiver module 702 is configured to perform the reception-related operations on the first device side in the above method embodiments.
[0348] Optionally, the transceiver module 702 may include a sending module and a receiving module. The sending module is used to perform the sending operation in the above method embodiment. The receiving module is used to perform the receiving operation in the above method embodiment.
[0349] It should be noted that the first device 700 may include a sending module but not a receiving module. Alternatively, the first device 700 may include a receiving module but not a sending module. The specific details may depend on whether the above solution executed by the first device 700 includes a sending action and a receiving action.
[0350] Optionally, the first device 700 is used to perform the actions performed by the first device in the embodiments shown in Figures 3 to 6. For details, please refer to the relevant introductions in the embodiments shown in Figures 3 to 6, which will not be expanded in detail here.
[0351] For example, the first device 700 is configured to execute the following solution:
[0352] The processing module 701 is used to determine the personalized category data of the first device 700; determine the forgetting learning completion of the first global model on the personalized category data, the first global model is the global model at the moment when the first device 700 applies for or executes the forgetting learning judgment; and determine whether to perform federated forgetting learning on the personalized category data based on the forgetting learning completion.
[0353] In one possible implementation, the processing module 701 is specifically used to: if the forgetting learning completion degree is less than a first threshold, determine to perform federated forgetting learning for the personalized category data; or, if the forgetting learning completion degree is greater than or equal to the first threshold, determine not to perform federated forgetting learning for the personalized category data.
[0354] In another possible implementation, the processing module 701 is specifically used to: if the forgetting learning completion degree is less than or equal to the first threshold, determine to perform federated forgetting learning for the personalized category data; or, if the forgetting learning completion degree is greater than the first threshold, determine not to perform federated forgetting learning for the personalized category data.
[0355] In another possible implementation, the transceiver module 702 is configured to send a forgetting learning request to the second device, where the forgetting learning request is used to request to enable federated forgetting learning for personalized category data.
[0356] In another possible implementation, the transceiver module 702 is configured to send a first exit instruction to the second device, where the first exit instruction is used to notify the second device that the first device 700 exits the federated learning process.
[0357] In another possible implementation, the degree of forgetting learning completion of the first global model on the personalized category data is determined based on a first accuracy rate and a second accuracy rate, wherein the first accuracy rate represents the classification accuracy of the first global model on the personalized category data, and the second accuracy rate represents the classification accuracy of the second global model on the personalized category data. The second global model is the global model at the moment when the first device 700 joins the federated learning process, and the moment when the first device 700 applies for or executes forgetting learning judgment is after the moment when the first device 700 joins the federated learning process.
[0358] In another possible implementation, the processing module 701 is specifically used to: track the improvement of the classification accuracy corresponding to various category data of the first device 700 during the federated learning process; use the category data with the largest improvement in the corresponding classification accuracy as personalized category data, or use the category data with a corresponding classification accuracy higher than a preset threshold as personalized category data.
[0359] In another possible implementation, the transceiver module 702 is used to send an auxiliary judgment request to the second device, where the auxiliary judgment request is used to request the second device to assist the first device 700 in determining personalized category data; receive a third global model from the second device, where the third global model is obtained by weighted fusion of global models obtained by gradient descent of the first global model by devices other than the first device 700; the processing module 701 is specifically used to: determine the change in the classification accuracy of the third global model on various category data of the first device 700 compared with the classification accuracy of the first global model on various category data of the first device 700; judge the category data with a decreased classification accuracy as personalized category data, or judge the category data with the most decreased classification accuracy as personalized category data, or judge the category data with a decrease in classification accuracy greater than a preset threshold value as personalized category data.
[0360] In another possible implementation, the transceiver module 702 is used to send a forgetting learning judgment request to the second device, where the forgetting learning judgment request is used to request whether to perform federated forgetting learning; receive the training contribution from the second device, where the training contribution represents the contribution of the first device 700 to the model training; the processing module 701 is also used to: determine whether to perform federated forgetting learning based on the training contribution; if so, trigger the execution of the step of determining the personalized category data of the first device 700.
[0361] In another possible implementation, the transceiver module 702 is used to receive a start indication from the second device if the first device 700 determines to perform federated forgetting learning on the personalized category data, and the start indication is used to instruct the first device 700 to start federated forgetting learning on the personalized category data; the processing module 701 is also used to: perform gradient ascent on the first global model according to the personalized category data to obtain a fourth global model, and the forgetting learning completion degree of the fourth global model on the personalized category data is greater than the first threshold; the transceiver module 702 is also used to: send the fourth global model to the second device.
[0362] In another possible implementation, the degree of forgetting learning completion of the fourth global model on personalized category data is determined based on the second accuracy and the third accuracy, the second accuracy represents the classification accuracy of the second global model on personalized category data, the third accuracy represents the classification accuracy of the fourth global model on personalized category data, and the second global model is the global model at the moment when the first device 700 joins the federated learning process.
[0363] In another possible implementation, the transceiver module 702 is configured to receive a first exit permission indication from the second apparatus, where the first exit permission indication is used to indicate that the first apparatus 700 is allowed to exit the federated learning process.
[0364] In another possible implementation, the transceiver module 702 is used to receive a first performance recovery indication from the second device, where the first performance recovery indication is used to instruct the first device 700 to perform performance recovery on the fourth global model; the processing module 701 is also used to perform gradient descent on the fourth global model through the public category data of the first device 700 to obtain a fifth global model; the transceiver module 702 is also used to send the fifth global model to the second device.
[0365] In another possible implementation, the transceiver module 702 is configured to receive a second exit permission indication from the second device, where the second exit permission indication is used to indicate that the first device 700 is allowed to exit the federated learning process.
[0366] In another possible implementation, the transceiver module 702 is used to receive a sixth global model and a first verification indication from the second device, where the sixth global model is obtained by weighted fusion of the fourth global model and a global model obtained by gradient descent of the first global model by devices other than the first device 700 using a first set of weighted values, and the first verification indication is used to instruct the first device 700 to perform forgetting learning performance verification on the sixth global model; the processing module 701 is also used to: perform forgetting learning performance verification on the sixth global model to obtain a first verification result; the transceiver module 702 is also used to: send the first verification result to the second device.
[0367] In another possible implementation, the transceiver module 702 is configured to send a second exit instruction to the second device if the first verification result indicates that the verification is passed, and the second exit instruction is used to notify the second device that the first device 700 exits the federated learning process.
[0368] In another possible implementation, the transceiver module 702 is configured to receive a third exit permission indication from the second device if the first verification result indicates that the verification is passed, where the third exit permission indication is used to indicate that the first device 700 is allowed to exit the federated learning process.
[0369] In another possible implementation, the transceiver module 702 is used to receive a second performance recovery indication from the second device if the first verification result indicates that the verification is passed, and the second performance recovery indication is used to instruct the first device 700 to perform performance recovery on the sixth global model; the processing module 701 is also used to: perform gradient descent on the sixth global model through the public category data of the first device 700 to obtain the seventh global model; the transceiver module 702 is also used to: send the seventh global model to the second device.
[0370] In another possible implementation, the transceiver module 702 is configured to receive a fourth exit-allowed indication from the second apparatus, where the fourth exit-allowed indication is used to indicate that the first apparatus 700 is allowed to exit the federated learning process.
[0371] In another possible implementation, the transceiver module 702 is used to receive an eighth global model and a second verification indication from the second device if the first verification result indicates that the verification fails. The eighth global model is obtained by weighted fusion of the fourth global model and the global models obtained by gradient descent of the first global model by devices other than the first device 700 using a second set of weighted values. The second verification indication is used to instruct the first device 700 to perform forgetting learning performance verification on the eighth global model; the processing module 701 is also used to: perform forgetting learning performance verification on the eighth global model to obtain a second verification result; the transceiver module 702 is also used to: send the second verification result to the second device.
[0372] It should be understood that the specific process of each module executing the above corresponding process has been described in detail in the above method embodiment, and for the sake of brevity, it will not be repeated here.
[0373] The processing module 701 in the above embodiment can be implemented by at least one processor or processor-related circuits. The transceiver module 702 can be implemented by a transceiver or transceiver-related circuits. The transceiver module 702 can also be called a communication module or communication interface. The storage module can be implemented by at least one memory.
[0374] FIG8 is a schematic diagram of the structure of the second device according to an embodiment of the present application. Referring to FIG8 , the second device 800 can be used to execute the process executed by the second device in the embodiments shown in FIG3 to FIG6 . For details, please refer to the relevant description of the above method embodiments.
[0375] The second device 800 includes a transceiver module 801. Optionally, the second device 800 further includes a processing module 802.
[0376] The processing module 802 is used to perform data processing. The transceiver module 801 can implement corresponding communication functions. The transceiver module 801 can also be called a communication interface or a communication module.
[0377] Optionally, the second device 800 may further include a storage module, which may be used to store instructions and / or data. The processing module 802 may read the instructions and / or data in the storage module so that the second device implements the aforementioned method embodiment.
[0378] The second device 800 can be used to perform the actions performed by the second device in the above method embodiments. The second device 800 can be a second device or a component that can be configured in the second device. The processing module 802 is used to perform the processing-related operations on the second device side in the above method embodiments. The transceiver module 801 is used to perform the reception-related operations on the second device side in the above method embodiments.
[0379] Optionally, the transceiver module 801 may include a sending module and a receiving module. The sending module is used to perform the sending operation in the above method embodiment. The receiving module is used to perform the receiving operation in the above method embodiment.
[0380] It should be noted that the second device 800 may include a sending module but not a receiving module. Alternatively, the second device 800 may include a receiving module but not a sending module. The specific implementation depends on whether the above solution executed by the second device 800 includes a sending action and a receiving action.
[0381] Optionally, the second device 800 is used to perform the actions performed by the second device in the embodiments shown in Figures 3 to 8. For details, please refer to the relevant introductions in the embodiments shown in Figures 3 to 8, which will not be expanded in detail here.
[0382] For example, the second device 800 is configured to execute the following solution:
[0383] The transceiver module 801 is used to receive a forgetting learning request from the first device; wherein the forgetting learning request is used to request to enable federated forgetting learning for the personalized category data of the first device, the forgetting learning completion degree of the first global model on the personalized category data is less than a first threshold, or the forgetting learning completion degree of the first global model on the personalized category data is less than or equal to the first threshold, and the first global model is the global model at the moment when the first device applies for or executes forgetting learning judgment.
[0384] For another example, the second device 800 is configured to execute the following solution:
[0385] The transceiver module 801 is used to receive a first exit instruction from the first device, wherein the first exit instruction is used to notify the second device 800 that the first device exits the federated learning process, the forgetting learning completion degree of the first global model on the personalized category data is greater than or equal to the first threshold, or the forgetting learning completion degree of the first global model on the personalized category data is greater than the first threshold, and the first global model is the global model at the moment when the first device applies for or executes the forgetting learning judgment.
[0386] In one possible implementation, the degree of forgetting learning completion of the first global model on personalized category data is determined based on a first accuracy rate and a second accuracy rate, the first accuracy rate representing the classification accuracy of the first global model on personalized category data, the second accuracy rate representing the classification accuracy of the second global model on personalized category data, the second global model being the global model at the moment when the first device joins the federated learning process, and the moment when the first device applies for or executes forgetting learning judgment is after the moment when the first device joins the federated learning process.
[0387] In another possible implementation, the transceiver module 801 is also used to: receive an auxiliary judgment request from the first device, the auxiliary judgment request is used to request the second device 800 to assist the first device in determining personalized category data; send a third global model to the first device, the third global model is obtained by weighted fusion of global models obtained by gradient descent of the first global model by devices other than the first device, and the third global model is used by the first device to determine personalized category data.
[0388] In another possible implementation, the transceiver module 801 is also used to: receive a forgetting learning judgment request from the first device, the forgetting learning judgment request is used to request whether to perform federated forgetting learning; and send a training contribution to the first device, the training contribution represents the contribution of the first device to the model training.
[0389] In another possible implementation, the transceiver module 801 is also used to: send a start indication to the first device, the start indication is used to instruct the first device to start federated forgetting learning for personalized category data; receive a fourth global model from the first device, the fourth global model is obtained by the first device performing gradient ascent on the first global model based on the personalized category data, and the forgetting learning completion degree of the fourth global model on the personalized category data is greater than the first threshold, or the forgetting learning completion degree of the fourth global model on the personalized category data is greater than or equal to the first threshold.
[0390] In another possible implementation, the degree of forgetting learning completion of the fourth global model on personalized category data is determined based on the second accuracy and the third accuracy, the second accuracy represents the classification accuracy of the second global model on personalized category data, the third accuracy represents the classification accuracy of the fourth global model on personalized category data, and the second global model is the global model at the moment when the first device joins the federated learning process.
[0391] In another possible implementation, the transceiver module 801 is also used to: send a first test request to other devices except the first device, the first test request is used to instruct other devices except the first device to perform an accuracy test on the fourth global model; receive first local accuracy rates sent respectively from other devices except the first device; the processing module 802 is used to determine the first global accuracy rate based on the first local accuracy rates sent respectively from other devices except the first device; and determine whether the fourth global model needs performance recovery based on the first global accuracy rate.
[0392] In another possible implementation, the transceiver module 801 is further configured to: send a first exit-allowed indication to the first apparatus, where the first exit-allowed indication is used to indicate that the first apparatus is allowed to exit the federated learning process.
[0393] In another possible implementation, the transceiver module 801 is further used to: send a fourth global model to other devices except the first device, and the fourth global model is used by the other devices except the first device to continue to perform the federated learning process.
[0394] In another possible implementation, if the fourth global model requires performance recovery, the transceiver module 801 is also used to: send a first performance recovery indication to the first device, the first performance recovery indication is used to instruct the first device to perform performance recovery on the fourth global model; receive a fifth global model from the first device, the fifth global model is obtained by performing gradient descent on the fourth global model through the public category data of the first device.
[0395] In another possible implementation, if the fifth global model does not require performance recovery, the transceiver module 801 is further used to: send a second exit permission indication to the first device, where the second exit permission indication is used to indicate that the first device is allowed to exit the federated learning process.
[0396] In another possible implementation, if the fifth global model does not require performance recovery, the transceiver module 801 is also used to: send the fifth global model to other devices except the first device, and the fifth global model is used by other devices except the first device to continue to execute the federated learning process.
[0397] In another possible implementation, the transceiver module 801 is also used to: send a sixth global model and a first verification indication to the first device, where the sixth global model is obtained by weighted fusion of the fourth global model and the global model obtained by gradient descent of the first global model by devices other than the first device using a first set of weighted values, and the first verification indication is used to instruct the first device to verify the forgetting learning performance of the sixth global model; receive a first verification result from the first device, where the first verification result is obtained by verifying the forgetting learning performance of the sixth global model.
[0398] In another possible implementation, the transceiver module 801 is further configured to: if the first verification result indicates that the verification is passed, receive a second exit instruction from the first device, where the second exit instruction is configured to notify the second device 800 that the first device exits the federated learning process.
[0399] In another possible implementation, the transceiver module 801 is further configured to: if the first verification result indicates that the verification is passed, send a third exit permission indication to the first device, where the third exit permission indication is used to indicate that the first device is allowed to exit the federated learning process.
[0400] In another possible implementation, the transceiver module 801 is also used to: if the first verification result indicates that the verification is passed, send a second test request to other devices other than the first device, and the second test request is used to instruct other devices other than the first device to perform an accuracy test on the sixth global model; receive a second local accuracy rate sent respectively from other devices other than the first device; the second device 800 also includes a processing module, the processing module 802, which is used to determine a second global accuracy rate based on the second local accuracy rates sent respectively from other devices other than the first device; and determine whether the sixth global model needs performance recovery based on the second global accuracy rate.
[0401] In another possible implementation, the transceiver module 801 is also used to: if the sixth global model needs to perform performance recovery, send a second performance recovery indication to the first device, and the second performance recovery indication is used to instruct the first device to perform performance recovery on the sixth global model; receive the seventh global model from the first device, and the seventh global model is to perform gradient descent on the sixth global model through the public category data of the first device.
[0402] In another possible implementation, the transceiver module 801 is also used to: send a third test request to other devices except the first device, the third test request is used to instruct other devices except the first device to perform an accuracy test on the seventh global model; receive third local accuracy rates sent respectively from other devices except the first device; the processing module 802 is also used to: determine a third global accuracy rate based on the third local accuracy rates sent respectively from other devices except the first device; determine whether the seventh global model needs performance recovery based on the third global accuracy rate; the transceiver module 801 is also used to: if the seventh global model does not need performance recovery, send a fourth exit permission indication to the first device, the fourth exit permission indication is used to indicate that the first device is allowed to exit the federated learning process.
[0403] In another possible implementation, the transceiver module 801 is also used to: if the first verification result indicates that the verification has failed, send an eighth global model and a second verification indication to the first device, the eighth global model being obtained by weighted fusion of the fourth global model and the global models obtained by gradient descent of the first global model by devices other than the first device using a second set of weighted values, and the second verification indication being used to instruct the first device to perform forgetting learning performance verification on the eighth global model; receive a second verification result from the first device, the second verification result being obtained by performing forgetting learning performance verification on the eighth global model.
[0404] It should be understood that the specific process of each module executing the above corresponding process has been described in detail in the above method embodiment, and for the sake of brevity, it will not be repeated here.
[0405] The processing module 802 in the above embodiment can be implemented by at least one processor or processor-related circuits. The transceiver module 801 can be implemented by a transceiver or transceiver-related circuits. The transceiver module 801 can also be referred to as a communication module or communication interface. The storage module can be implemented by at least one memory.
[0406] Figure 9 is a structural diagram of the device provided in an embodiment of the present application. It can be understood that the device 910 includes, for example, modules, units, elements, circuits, or interfaces, which are appropriately configured together to implement the technical solution of the present application. The device 910 can be a network device or a terminal device, or a component (for example, a chip) in these devices, for implementing the method described in the above method embodiment. The device 910 includes one or more processors 911. The processor 911 can be a general-purpose processor or a dedicated processor, etc. For example, the processor can be a baseband processor or a central processing unit. The baseband processor can be used to process communication protocols and communication data, and the central processing unit can be used to control the device 910 to execute software programs and process data of software programs.
[0407] Optionally, in one possible design, the processor 911 may include a program 913 (also referred to as code or instructions), which may be executed on the processor 911 to cause the apparatus 910 to perform the method provided in the above method embodiment. In another possible design, the apparatus 910 includes a circuit (not shown in FIG. 9 ), which is used to implement the federated forgetting learning function in the above method embodiment.
[0408] Optionally, the device 910 may include one or more memories 912 on which a program 914 (also referred to as code or instruction) is stored. The program 914 may be run on the processor 9111 so that the device 910 executes the method provided by the above method embodiment.
[0409] Optionally, the processor 911 may include an AI module 917, and / or the memory 912 may include an AI module 918. The AI module is used to implement AI-related functions. The AI module may be implemented through software, hardware, or a combination of software and hardware. For example, the AI module includes an access network intelligent controller (RIC) module. For example, the AI module may be a near real-time RIC or a non-real-time RIC.
[0410] Optionally, data may also be stored in the processor 911 and / or the memory 912. The processor and the memory may be provided separately or integrated together.
[0411] Optionally, the communication device 910 may further include a transceiver 915 and / or an antenna 916. The processor 911 may also be referred to as a processing unit, and controls the device 910 (e.g., a network device or a terminal device). The transceiver 915 may also be referred to as a transceiver unit, a transceiver, a transceiver circuit, or a transceiver, and is configured to implement the transceiver functions of the device 910 via the antenna 916.
[0412] The present application further provides an apparatus 1000, which may be a terminal device, a processor in the terminal device, or a chip. The apparatus 1000 may be used to execute the operations performed by the first apparatus or the second apparatus in the above method embodiment.
[0413] When apparatus 1000 is a terminal device, FIG10 shows a simplified schematic diagram of the terminal device structure. As shown in FIG10 , the terminal device includes a processor, a memory, and a transceiver. The memory can store computer program code, and the transceiver includes a transmitter 1031, a receiver 1032, a radio frequency circuit (not shown), an antenna 1033, and input / output devices (not shown).
[0414] The processor is mainly used to process communication protocols and communication data; control terminal devices, execute software programs and process software program data, etc.
[0415] Memory is mainly used to store software programs and data.
[0416] Radio frequency circuits are mainly used for conversion between baseband signals and radio frequency signals and for processing radio frequency signals.
[0417] Antennas are mainly used to send and receive radio frequency signals in the form of electromagnetic waves.
[0418] The input and output device may include a touch screen, a display screen, or a keyboard. The input and output device is mainly used to receive data input by the user and output data to the user. It should be noted that some types of terminal devices may not have input and output devices.
[0419] When data needs to be sent, the processor performs baseband processing on the data to be sent and outputs the baseband signal to the RF circuit. The RF circuit then performs RF processing on the baseband signal and transmits the RF signal to the outside in the form of electromagnetic waves through the antenna. When data is sent to the terminal device, the RF circuit receives the RF signal through the antenna. The RF circuit converts the RF signal into a baseband signal and outputs the baseband signal to the processor. The processor converts the baseband signal into data and processes the data. For ease of explanation, Figure 10 shows only one memory, processor, and transceiver. In actual terminal device products, there may be one or more processors and one or more memories. The memory may also be referred to as a storage medium or a storage device, etc. The memory may be set independently of the processor or integrated with the processor, and this embodiment of the application does not limit this.
[0420] In the embodiment of the present application, the antenna and radio frequency circuit with transceiver functions can be regarded as the transceiver module of the terminal device, and the processor with processing function can be regarded as the processing module of the terminal device.
[0421] As shown in FIG10 , the terminal device includes a processor 1010, a memory 1020, and a transceiver 1030. The processor 1010 may also be referred to as a processing unit, a processing board, a processing module, or a processing device. The transceiver 1030 may also be referred to as a transceiver unit, a transceiver, or a transceiver device.
[0422] Optionally, the device in transceiver 1030 that implements the receiving function is considered a receiving module, and the device in transceiver 1030 that implements the transmitting function is considered a transmitting module. That is, transceiver 1030 includes a receiver and a transmitter. A transceiver may also be sometimes referred to as a transceiver, a transceiver module, or a transceiver circuit. A receiver may also be sometimes referred to as a receiver, a receiving module, or a receiving circuit. A transmitter may also be sometimes referred to as a transmitter, a transmitting module, or a transmitting circuit.
[0423] The processor 1010 is used to execute the processing actions of the first device or the second device in the embodiments shown in Figures 3 to 6. The transceiver 1030 is used to execute the transceiver actions of the first device or the second device in the embodiments shown in Figures 3 to 6.
[0424] It should be understood that FIG10 is merely an example and not a limitation, and the terminal device including the transceiver module and the processing module may not rely on the structures shown in FIG7, FIG9 or FIG10.
[0425] When the device 1000 is a chip, the chip includes a processor, a memory, and a transceiver. The transceiver may be an input / output circuit or a communication interface. The processor may be a processing module, a microprocessor, or an integrated circuit integrated on the chip. The sending operation of the first or second device in the above method embodiment may be understood as an output of the chip, and the receiving operation of the first or second device in the above method embodiment may be understood as an input of the chip.
[0426] The present application further provides an apparatus 1100, which can be a network device or a chip. The apparatus 1100 can be used to perform the operations performed by the first apparatus or the second apparatus in the embodiments shown in FIG. 3 to FIG. 6 .
[0427] When the apparatus 1100 is a network device, for example, a base station, FIG11 shows a simplified schematic diagram of a base station structure. The base station includes parts 1110, 1120, and 1130.
[0428] Part 1110 is mainly used for baseband processing, base station control, etc.; Part 1110 is usually the control center of the base station, which can usually be called a processor, used to control the base station to execute the processing operations on the first device or second device side in the above method embodiment.
[0429] Part 1120 is mainly used to store computer program code and data.
[0430] Part 1130 is primarily used for receiving and transmitting RF signals and converting RF signals to baseband signals. Part 1130 can generally be referred to as a transceiver module, transceiver, transceiver circuit, or transceiver. The transceiver module in part 1130, which can also be referred to as a transceiver or transceiver, includes an antenna 1133 and a RF circuit (not shown in the figure), where the RF circuit is primarily used for RF processing. Optionally, the device used to implement the receiving function in part 1130 can be considered a receiver, and the device used to implement the transmitting function can be considered a transmitter, that is, part 1130 includes a receiver 1132 and a transmitter 1131. A receiver can also be referred to as a receiving module, a receiver, or a receiving circuit, and a transmitter can be referred to as a transmitting module, a transmitter, or a transmitting circuit.
[0431] Sections 1110 and 1120 may include one or more boards, each of which may include one or more processors and one or more memories. The processor is used to read and execute programs in the memory to implement baseband processing functions and control the base station. If multiple boards are present, the boards may be interconnected to enhance processing capabilities. As an optional implementation, multiple boards may share one or more processors, multiple boards may share one or more memories, or multiple boards may simultaneously share one or more processors.
[0432] For example, in one implementation, the transceiver module in section 1130 is configured to execute the transceiver-related processes performed by the first device or the second device in the embodiments shown in Figures 3 to 6. The processor in section 1110 is configured to execute the processing-related processes performed by the first device or the second device in the embodiments shown in Figures 3 to 6.
[0433] It should be understood that FIG11 is merely an example and not a limitation, and the network device including the processor, memory, and transceiver may not rely on the structures shown in FIG8 , FIG9 , or FIG11 .
[0434] When device 1100 is a chip, the chip includes a transceiver, a memory, and a processor. The transceiver may be an input / output circuit or a communication interface; the processor may be a processor, microprocessor, or integrated circuit integrated on the chip. In the above method embodiments, the sending operation of the first or second device may be understood as an output of the chip, and the receiving operation of the first or second device may be understood as an input of the chip.
[0435] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions for implementing the method executed by the first device or the second device in the above method embodiment.
[0436] For example, when the computer program is executed by a computer, the computer can implement the method performed by the first device or the second device in the above method embodiment.
[0437] An embodiment of the present application further provides a computer program product comprising instructions, which, when executed by a computer, enables the computer to implement the method performed by the first device or the second device in the above method embodiment.
[0438] The present application also provides a communication system including the first device described in the above embodiment and the second device described in the above embodiment. The first device is configured to perform some or all of the operations performed by the first device described in the above method embodiment, and the second device is configured to perform some or all of the operations performed by the second device described in the above method embodiment.
[0439] An embodiment of the present application further provides a chip device, including a processor, configured to call a computer program or computer instruction stored in the memory so that the processor executes the method provided in the embodiments shown in FIG. 3 to FIG. 6 .
[0440] In one possible implementation, the input of the chip device corresponds to the receiving operation in any one of the embodiments shown in Figures 3 to 6 above, and the output of the chip device corresponds to the sending operation in any one of the embodiments shown in Figures 3 to 6 above.
[0441] Optionally, the processor is coupled to the memory via an interface.
[0442] Optionally, the chip device further includes a memory, in which computer programs or computer instructions are stored.
[0443] The processor mentioned in any of the above may be a general-purpose central processing unit, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the method provided in any of the embodiments shown in Figures 3 to 6. The memory mentioned in any of the above may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM), etc.
[0444] Those skilled in the art can clearly understand that, for the sake of convenience and brevity of description, the explanation of the relevant contents and beneficial effects of any of the above-mentioned devices can refer to the corresponding method embodiments provided above, and will not be repeated here.
[0445] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0446] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0447] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0448] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the part that essentially contributes to the technical solution of the present application or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
[0449] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A data processing method, characterized in that: The method comprises: A first device determines personalized category data of the first device; The first device determines the degree of forgetting learning completion of a first global model on the personalized category data, the first global model being a global model at the moment when the first device applies for or performs forgetting learning judgment; The first device determines whether to perform federated forgetting learning on the personalized category data according to the forgetting learning completion degree.
2. The method according to claim 1, characterized in that The first device determines whether to perform federated forgetting learning on the personalized category data according to the forgetting learning completion degree, including: If the forgetting learning completion degree is less than a first threshold, the first device determines to perform federated forgetting learning on the personalized category data; or, If the forgetting learning completion degree is greater than or equal to the first threshold, the first device determines not to perform federated forgetting learning on the personalized category data.
3. The method according to claim 1 or 2, characterized in that: If the first device determines to perform federated forgetting learning on the personalized category data, the method further includes: The first device sends a forgetting learning request to the second device, where the forgetting learning request is used to request to enable federated forgetting learning for the personalized category data.
4. The method according to claim 1 or 2, characterized in that: If the first device determines not to perform federated forgetting learning on the personalized category data, the method further includes: The first device sends a first exit instruction to the second device, where the first exit instruction is used to notify the second device that the first device exits the federated learning process.
5. The method according to any one of claims 1 to 4, characterized in that The degree of forgetting learning completion of the first global model on the personalized category data is determined based on a first accuracy rate and a second accuracy rate, wherein the first accuracy rate represents the classification accuracy of the first global model on the personalized category data, and the second accuracy rate represents the classification accuracy of the second global model on the personalized category data. The second global model is the global model at the moment when the first device joins the federated learning process, and the moment when the first device applies for or executes forgetting learning judgment is after the moment when the first device joins the federated learning process.
6. The method according to any one of claims 1 to 5, characterized in that The first device determines personalized category data of the first device, including: The first device tracks the improvement of classification accuracy corresponding to various categories of data of the first device during the federated learning process; The first device uses the category data with the greatest improvement in classification accuracy as the personalized category data according to the improvement.
7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: The first device sends an auxiliary determination request to the second device, wherein the auxiliary determination request is used to request the second device to assist the first device in determining the personalized category data; The first device receives a third global model from the second device, where the third global model is obtained by weighted fusion of global models respectively obtained by other devices other than the first device performing gradient descent on the first global model; The first device determines personalized category data of the first device, including: The first device determines a change in the classification accuracy of the third global model on various categories of data of the first device compared to the classification accuracy of the first global model on various categories of data of the first device; The first device uses the category data with reduced classification accuracy as the personalized category data according to the change situation.
8. The method according to any one of claims 1 to 7, characterized in that Before the first device determines the personalized category data of the first device, the method further includes: The first device sends a forget learning judgment request to the second device, where the forget learning judgment request is used to request whether to perform federated forget learning; The first device receives a training contribution from a second device, where the training contribution represents a contribution of the first device to model training; The first device determines whether to perform federated forgetting learning according to the training contribution; If yes, the first device is triggered to perform a step of determining personalized category data of the first device.
9. The method according to any one of claims 1 to 8, characterized in that If the first device determines to perform federated forgetting learning on the personalized category data, the method further includes: The first device receives a start instruction from the second device, where the start instruction is used to instruct the first device to start federated forgetting learning for the personalized category data; The first device performs gradient ascent on the first global model according to the personalized category data to obtain a fourth global model, wherein a degree of forgetting learning completion of the fourth global model on the personalized category data is greater than a first threshold; The first device sends the fourth global model to the second device.
10. The method according to claim 9, characterized in that The degree of forgetting learning completion of the fourth global model on the personalized category data is determined based on a second accuracy rate and a third accuracy rate, wherein the second accuracy rate represents the classification accuracy of the second global model on the personalized category data, and the third accuracy rate represents the classification accuracy of the fourth global model on the personalized category data, and the second global model is the global model at the moment when the first device joins the federated learning process.
11. The method according to claim 9 or 10, characterized in that: The method further comprises: The first device receives a first exit-allowance indication from the second device, where the first exit-allowance indication is used to indicate that the first device is allowed to exit the federated learning process.
12. The method according to claim 9 or 10, characterized in that: The method further comprises: The first device receives a first performance recovery instruction from the second device, where the first performance recovery instruction is used to instruct the first device to perform performance recovery on the fourth global model; The first device performs gradient descent on the fourth global model using the public category data of the first device to obtain a fifth global model; The first device sends the fifth global model to the second device.
13. The method according to claim 12, characterized in that The method further comprises: The first device receives a second exit-allowance indication from the second device, where the second exit-allowance indication is used to indicate that the first device is allowed to exit the federated learning process.
14. The method according to claim 9 or 10, characterized in that The method further comprises: The first device receives a sixth global model and a first verification instruction from the second device, the sixth global model being obtained by weighted fusion of the fourth global model and a global model obtained by performing gradient descent on the first global model by other devices other than the first device using a first set of weighted values, and the first verification instruction is used to instruct the first device to perform forgetting learning performance verification on the sixth global model; The first device verifies the forgetting learning performance of the sixth global model to obtain a first verification result; The first device sends the first verification result to the second device.
15. The method according to claim 14, characterized in that If the first verification result indicates that the verification is passed, the method further includes: The first device sends a second exit instruction to the second device, and the second exit instruction notifies the second device that the first device exits the federated learning process.
16. The method according to claim 14, characterized in that If the first verification result indicates that the verification is passed, the method further includes: The first device receives a third exit-allowance indication from the second device, where the third exit-allowance indication is used to indicate that the first device is allowed to exit the federated learning process.
17. The method according to claim 14, characterized in that If the first verification result indicates that the verification is passed, the method further includes: The first device receives a second performance recovery instruction from the second device, where the second performance recovery instruction is used to instruct the first device to perform performance recovery on the sixth global model; The first device performs gradient descent on the sixth global model using the public category data of the first device to obtain a seventh global model; The first device sends the seventh global model to the second device.
18. The method according to claim 17, characterized in that The method further comprises: The first device receives a fourth exit-allowance indication from the second device, where the fourth exit-allowance indication is used to indicate that the first device is allowed to exit the federated learning process.
19. The method according to claim 14, characterized in that If the first verification result indicates that the verification fails, the method further includes: The first device receives an eighth global model and a second verification instruction from the second device, the eighth global model being obtained by weighted fusion of the fourth global model and global models obtained by performing gradient descent on the first global model by other devices other than the first device using a second set of weighted values, and the second verification instruction is used to instruct the first device to perform forgetting learning performance verification on the eighth global model; The first device performs forgetting learning performance verification on the eighth global model to obtain a second verification result; The first device sends the second verification result to the second device.
20. A data processing method, characterized in that: The method comprises: The second device receives a forgetting learning request from the first device; wherein the forgetting learning request is used to request the start of federated forgetting learning for the personalized category data of the first device, the forgetting learning completion degree of the first global model on the personalized category data is less than a first threshold, and the first global model is the global model at the moment when the first device applies for or executes forgetting learning judgment.
21. A data processing method, characterized in that: The method comprises: The second device receives a first exit instruction from the first device, wherein the first exit instruction is used to notify the second device that the first device exits the federated learning process, the forgetting learning completion degree of the first global model on the personalized category data is greater than or equal to a first threshold, and the first global model is the global model at the moment when the first device applies for or executes forgetting learning judgment.
22. The method according to claim 20 or 21, characterized in that The degree of completion of forgetting learning is determined based on a first accuracy rate and a second accuracy rate, wherein the first accuracy rate represents the classification accuracy of the first global model on the personalized category data, and the second accuracy rate represents the classification accuracy of the second global model on the personalized category data. The second global model is the global model at the moment when the first device joins the federated learning process, and the moment when the first device applies for or executes forgetting learning judgment is after the moment when the first device joins the federated learning process.
23. The method according to any one of claims 20 to 22, characterized in that Before the second device receives the forgetting learning request from the first device, or before the second device receives the first exit instruction from the first device, the method further includes: The second device receives an auxiliary determination request from the first device, wherein the auxiliary determination request is used to request the second device to assist the first device in determining the personalized category data; The second device sends a third global model to the first device. The third global model is obtained by weighted fusion of global models obtained by other devices except the first device by performing gradient descent on the first global model. The third global model is used by the first device to determine the personalized category data.
24. The method according to any one of claims 20 to 23, characterized in that Before the second device receives the forgetting learning request from the first device, or before the second device receives the first exit instruction from the first device, the method further includes: The second device receives a forget learning judgment request from the first device, where the forget learning judgment request is used to request whether to perform federated forget learning; The second device sends a training contribution to the first device, where the training contribution represents a contribution degree of the first device to the model training.
25. The method according to any one of claims 20, 22 to 24, characterized in that After the second device receives the forgetting learning request from the first device, the method further includes: The second device sends a start instruction to the first device, where the start instruction is used to instruct the first device to start federated forgetting learning for the personalized category data; The second device receives a fourth global model from the first device, where the fourth global model is obtained by the first device performing gradient ascent on the first global model according to the personalized category data, and a degree of forgetting learning completion of the fourth global model on the personalized category data is greater than the first threshold.
26. The method according to claim 25, characterized in that The degree of forgetting learning completion of the fourth global model on the personalized category data is determined based on a second accuracy rate and a third accuracy rate, wherein the second accuracy rate represents the classification accuracy of the second global model on the personalized category data, and the third accuracy rate represents the classification accuracy of the fourth global model on the personalized category data, and the second global model is the global model at the moment when the first device joins the federated learning process.
27. The method according to claim 25 or 26, characterized in that After the second device receives the fourth global model from the first device, the method further includes: The second device sends a first test request to other devices except the first device, where the first test request is used to instruct the other devices except the first device to perform an accuracy test on the fourth global model; The second device receives first local accuracy rates respectively sent from other devices except the first device; The second device determines a first global accuracy rate according to first local accuracy rates respectively sent by other devices except the first device; The second device determines whether the fourth global model needs performance recovery according to the first global accuracy.
28. The method according to any one of claims 25 to 27, characterized in that The method further comprises: The second device sends a first exit-allowance indication to the first device, where the first exit-allowance indication is used to indicate that the first device is allowed to exit the federated learning process.
29. The method according to any one of claims 25 to 28, characterized in that The method further comprises: The second device sends the fourth global model to other devices except the first device, and the fourth global model is used for the other devices except the first device to continue to perform the federated learning process.
30. The method according to claim 27, characterized in that If the fourth global model requires performance recovery, the method further comprises: The second device sends a first performance recovery instruction to the first device, where the first performance recovery instruction is used to instruct the first device to perform performance recovery on the fourth global model; The second device receives a fifth global model from the first device, where the fifth global model is obtained by performing gradient descent on the fourth global model through the public category data of the first device.
31. The method according to claim 30, characterized in that If the fifth global model does not require performance recovery, the method further includes: The second device sends a second exit-allowance indication to the first device, where the second exit-allowance indication is used to indicate that the first device is allowed to exit the federated learning process.
32. The method according to claim 30 or 31, characterized in that If the fifth global model does not require performance recovery, the method further includes: The second device sends the fifth global model to other devices except the first device, and the fifth global model is used for the other devices except the first device to continue to perform the federated learning process.
33. The method according to claim 25 or 26, characterized in that The method further comprises: The second device sends a sixth global model and a first verification instruction to the first device, wherein the sixth global model is obtained by weighted fusion of the fourth global model and a global model obtained by performing gradient descent on the first global model by other devices other than the first device using a first set of weighted values, and the first verification instruction is used to instruct the first device to perform forgetting learning performance verification on the sixth global model; The second device receives a first verification result from the first device, where the first verification result is obtained by verifying the forgetting learning performance of the sixth global model.
34. The method according to claim 33, characterized in that If the first verification result indicates that the verification is passed, the method further includes: The second device receives a second exit instruction from the first device, where the second exit instruction is used to notify the second device that the first device exits the federated learning process.
35. The method according to claim 33, characterized in that If the first verification result indicates that the verification is passed, the method further includes: The first device receives a third exit-allowance indication from the second device, where the third exit-allowance indication is used to indicate that the first device is allowed to exit the federated learning process.
36. The method according to claim 33, characterized in that If the first verification result indicates that the verification is passed, the method further includes: The second device sends a second test request to other devices except the first device, where the second test request is used to instruct the other devices except the first device to perform an accuracy test on the sixth global model; The second device receives second local accuracy rates respectively sent from other devices except the first device; The second device determines a second global accuracy rate according to second local accuracy rates respectively sent by other devices except the first device; The second device determines whether the sixth global model needs performance recovery according to the second global accuracy.
37. The method according to claim 36, characterized in that If the sixth global model needs to perform performance recovery, the method further includes: The second device receives a second performance recovery instruction from the first device, where the second performance recovery instruction is used to instruct the first device to perform performance recovery on the sixth global model; The second device receives a seventh global model from the first device, where the seventh global model is obtained by performing gradient descent on the sixth global model through the public category data of the first device.
38. The method according to claim 37, characterized in that The method further comprises: The second device sends a third test request to other devices except the first device, where the third test request is used to instruct the other devices except the first device to perform an accuracy test on the seventh global model; The second device receives third local accuracy rates respectively sent from other devices except the first device; The second device determines a third global accuracy rate according to third local accuracy rates respectively sent by other devices except the first device; The second device determines whether the seventh global model needs to perform performance recovery according to the third global accuracy rate; If the seventh global model does not need to perform performance recovery, the second device sends a fourth exit permission indication to the first device, where the fourth exit permission indication is used to indicate that the first device is allowed to exit the federated learning process.
39. The method according to claim 33, characterized in that If the first verification result indicates that the verification fails, the method further includes: The second device sends an eighth global model and a second verification instruction to the first device, the eighth global model being obtained by weighted fusion of the fourth global model and global models obtained by performing gradient descent on the first global model by other devices other than the first device using a second set of weighted values, and the second verification instruction is used to instruct the first device to perform forgetting learning performance verification on the eighth global model; The second device receives a second verification result from the first device, where the second verification result is obtained by verifying the forgetting learning performance of the eighth global model.
40. A first device, characterized in that: The first device comprises a processing module, and the processing module is used to perform the processing operation of the method according to any one of claims 1 to 19.
41. The first device according to claim 40, characterized in that The first device also includes a transceiver module, and the transceiver module is used to perform the transceiver operation of the method as claimed in any one of claims 1 to 19.
42. A second device, characterized in that: The second device includes a transceiver module, and the transceiver module is used to perform the transceiver operation of the method as claimed in any one of claims 20 to 39.
43. The second device according to claim 42, characterized in that The second device further comprises a processing module, which is used to perform the processing operation of the method according to any one of claims 20 to 39.
44. A communication device, characterized in that: The communication device comprises a processor configured to execute a computer program or computer instructions in a memory to perform the method according to any one of claims 1 to 39.
45. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a communication device, the communication device executes the method according to any one of claims 1 to 39.
46. A communication system, characterized in that: The communication system comprises a first device and a second device; the first device is used to execute the method according to any one of claims 1 to 19, and the second device is used to execute the method according to any one of claims 20 to 39.
Citation Information
Patent Citations
Platform for forgetting and verifying data in federal learning
CN113887743A
Medical data sharing system and method based on federated learning
CN115985439A
Forgetting data samples from pretrained neural network models
US20220300822A1
Federated learning method and related apparatus
WO2023072049A1
Cited By
Longitudinal federal model forgetting method and device for lightweight adaptive optimizer scheduling
CN121936627A