CN-122003688-A - Data processing method and related device
Abstract
The application provides a data processing method and a related device. The method comprises the steps that a first device determines personalized category data of the first device, the first device determines forgetting learning completion degree of a first global model on the personalized category data, the first global model is a global model at the moment when the first device applies or executes forgetting learning judgment, and the first device determines whether federal forgetting learning is conducted on the personalized category data according to the forgetting learning completion degree. Therefore, whether federal forgetting learning is needed or not can be effectively judged. And the unnecessary expenditure brought by federal forgetting learning and model performance recovery respectively is avoided. Thereby better realizing federal forgetfulness learning.
Inventors
- LI MENGYUAN
- WANG JIAN
- LI RONG
Assignees
- 华为技术有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20231024
Claims (20)
- A method of data processing, the method comprising: a first device determining personalised category data for the first device; The first device determines the forgetting learning completion degree of a first global model on the personalized category data, wherein the first global model is a global model at the moment when the first device applies for or executes forgetting learning judgment; the first device determines whether federal forgetting learning is performed on the personalized category data according to the forgetting learning completion degree.
- The method of claim 1, wherein the first device determining whether to perform federal forgetting learning for the personalized category data based on the forgetting completion level comprises: If the forgetfulness completion is less than a first threshold, the first device determines to perform federal forgetfulness learning for the personalized category data, or If the forgetfulness completion is greater than or equal to the first threshold, the first device determines that federal forgetfulness learning is not performed for the personalized category data.
- The method according to claim 1 or 2, wherein if the first device determines federal forgetting learning for the personalized category data, the method further comprises: The first device sends a forgetting learning request to the second device, the forgetting learning request being used to request that federal forgetting learning be turned on for the personalized category data.
- The method of claim 1 or 2, wherein if the first device determines that federal forgetting learning is not to be performed for the personalized category data, the method further comprises: the first device sends a first exit indication to the second device, the first exit indication being used to inform the second device that the first device exits the federal learning process.
- The method of any of claims 1 to 4, wherein the degree of completion of forgetting learning by the first global model on the personalized category data is determined based on a first accuracy characterizing a classification accuracy of the first global model on the personalized category data and a second accuracy characterizing a classification accuracy of a second global model on the personalized category data, the second global model being a global model of a moment when the first device joins a federal learning process, the moment when the first device applies for or performs a forgetting learning decision being after the moment when the first device joins a federal learning process.
- The method of any of claims 1-5, wherein the first device determining personalization category data for the first device comprises: the first device tracks the improvement condition of classification accuracy corresponding to various types of data of the first device in the federal learning process; And the first device takes the category data with the maximum classification accuracy rate improvement as the personalized category data according to the improvement condition.
- The method according to any one of claims 1 to 5, further comprising: The first device sends an auxiliary judging request to a second device, wherein the auxiliary judging request is used for requesting 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, wherein the third global model is obtained by carrying out weighted fusion on global models respectively obtained by gradient descent on the first global model by other devices except the first device; the first device determining personalization category data for the first device, comprising: The first device determines the classification accuracy of the third global model on the various types of data of the first device as compared with the change condition of the classification accuracy of the first global model on the various types of data of the first device; The first device takes the category data with reduced classification accuracy as the personalized category data according to the change condition.
- The method of any of claims 1-7, wherein prior to the first device determining the personalized category data for the first device, the method further comprises: The first device sends a forgetting learning judgment request to the second device, wherein the forgetting learning judgment request is used for requesting judgment whether federal forgetting learning is carried out or not; The first device receives a training contribution from a second device, the training contribution characterizing a degree of contribution of the first device to model training; the first device judges whether federal forgetting learning is carried out according to the training contribution degree; And if so, triggering the first device to execute the step of determining the personalized category data of the first device.
- The method of any of claims 1-8, wherein if the first device determines federal forgetting learning for the personalized category data, the method further comprises: The first device receives a start instruction from the second device, wherein the start instruction is used for instructing the first device to start federal forgetting learning aiming at the personalized category data; The first device carries out 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 larger than a first threshold value; The first device sends the fourth global model to the second device.
- The method of claim 9, wherein the degree of forgetting to learn completion of the fourth global model on the personalized category data is determined based on a second accuracy rate that characterizes a classification accuracy rate of a second global model on the personalized category data and a third accuracy rate that characterizes a classification accuracy rate of the fourth global model on the personalized category data, the second global model being a global model at a time when the first device joins a federal learning process.
- The method according to claim 9 or 10, characterized in that the method further comprises: The first device receives a first permit exit indication from the second device, the first permit exit indication indicating that the first device is permitted to exit the federal learning process.
- The method according to claim 9 or 10, characterized in that the method further comprises: The first device receiving a first performance restoration instruction from the second device, the first performance restoration instruction being for instructing the first device to perform performance restoration on the fourth global model; The first device performs gradient descent on the fourth global model through 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.
- The method according to claim 12, wherein the method further comprises: The first device receives a second permit exit indication from the second device, the second permit exit indication indicating that the first device is permitted to exit the federal learning process.
- The method according to claim 9 or 10, characterized in that the method further comprises: The first device receives a sixth global model from the second device and a first verification instruction, wherein the sixth global model is obtained by adopting a first group of weighted values to carry out weighted fusion on the fourth global model and global models obtained by gradient descent on the first global model by other devices except the first device, and the first verification instruction is used for instructing the first device to carry out forgetting learning performance verification on the sixth global model; The first device performs forgetting learning performance verification on the sixth global model to obtain a first verification result; The first device sends the first verification result to the second device.
- The method of claim 14, wherein if the first validation result characterizes validation as passing, the method further comprises: The first device sends a second exit indication to the second device, the second exit indication informing the second device that the first device exits the federal learning process.
- The method of claim 14, wherein if the first validation result characterizes validation as passing, the method further comprises: The first device receives a third permitted exit indication from the second device, the third permitted exit indication indicating that the first device is permitted to exit the federal learning process.
- The method of claim 14, wherein if the first validation result characterizes validation as passing, the method further comprises: The first device receiving a second performance restoration instruction from the second device, the second performance restoration instruction being used to instruct the first device to perform performance restoration on the sixth global model; the first device performs gradient descent on the sixth global model through 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.
- The method of claim 17, wherein the method further comprises: The first device receives a fourth permit exit indication from the second device, the fourth permit exit indication indicating that the first device is permitted to exit the federal learning process.
- The method of claim 14, wherein if the first verification result characterizes the verification as not passing, the method further comprises: The first device receives an eighth global model from the second device and a second verification instruction, wherein the eighth global model is obtained by adopting a second group of weighted values to carry out weighted fusion on the fourth global model and global models respectively obtained by gradient descent on the first global model by other devices except the first device, and the second verification instruction is used for instructing the first device to carry out 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.
- A method of data processing, the method comprising: The method comprises the steps that a first device receives a first device, a second device receives a forgetting learning request from the first device, wherein the forgetting learning request is used for requesting to start federal forgetting learning for personalized category data of the first device, the forgetting learning completion degree of a first global model on the personalized category data is smaller than a first threshold value, and the first global model is a global model at the moment when the first device applies for or executes forgetting learning judgment.
Description
Data processing method and related device Technical Field The present application relates to the field of communications technologies, and in particular, to a data processing method and a related device. Background Federal learning (FEDERATED LEARNING, FL) is a distributed learning method. Specifically, the distributed node trains according to the local data to obtain a local model, and sends the local model to the central node. And the central node fuses the local models reported by the distributed nodes to obtain a global model. However, for a global model, if a local node requires to exit federal learning and requires to delete its contribution to the training of the global model, federal forgetting learning based on the global model is required. Therefore, the contribution of the local node to the training of the global model is deleted, and federal forgetting learning is realized in a federal learning scene. However, how to better implement federal forgetfulness learning is a considerable problem. Disclosure of Invention The application provides a data processing method and a related device, which are used for a first device to determine the forgetting learning completion degree of a first global model on personalized category data and determine whether federal forgetting learning is carried out for the personalized category data according to the forgetting learning completion degree. Therefore, whether federal forgetting learning is needed or not can be effectively judged. And the unnecessary expenditure brought by federal forgetting learning and model performance recovery respectively is avoided. Thereby better realizing federal forgetfulness learning. The first aspect of the present application provides a data processing method, which may be performed by a first apparatus, where the first apparatus may be a terminal device or a network device, or a component (e.g. a processor, a chip, or a chip system) in the terminal device or the network device, or a logic module or software capable of implementing all or part of the functions of the terminal device, or a logic module or software capable of implementing all or part of the functions of the network device. The method comprises the following steps: The method comprises the steps of determining personalized category data of a first device by a first device, determining forgetting learning completion degree of a first global model on the personalized category data by the first device, wherein the first global model is a global model at the moment when the first device applies for or executes forgetting learning judgment, and determining whether federal forgetting learning is carried out on the personalized category data according to the forgetting learning completion degree by the first device. Optionally, the degree of forgetting learning completion of the first global model on the personalized category data characterizes the degree of forgetting learning of the first global model on the personalized category data. Therefore, whether federal forgetting learning is needed or not can be effectively judged. And the unnecessary expenditure brought by federal forgetting learning and model performance recovery respectively is avoided. Thereby better realizing federal forgetfulness learning. Based on the first aspect, in one possible implementation manner, the first device determines whether federal forgetting learning is performed on personalized category data according to the forgetting learning completion degree, including that the first device determines that federal forgetting learning is performed on personalized category data if the forgetting learning completion degree is smaller than a first threshold value, or determines that federal forgetting learning is not performed on personalized category data if the forgetting learning completion degree is greater than or equal to the first threshold value. It can be seen that if the completion degree of forgetting learning is smaller than the first threshold value, it indicates that the personalized category data is not completed with forgetting learning, and therefore federal forgetting learning is required for the personalized category data. If the forgetting learning completion degree is greater than or equal to the first threshold value, the personalized category data is completely forgetting to learn, so that federal forgetting learning is not required for the personalized category data. The first device can effectively judge whether federal forgetting learning is needed or not through forgetting learning completion degree, and unnecessary federal forgetting learning is avoided. Based on the first aspect, in one possible implementation manner, if the forgetting learning completion degree is smaller than or equal to a first threshold value, the first device determines that federal forgetting learning is performed for the personalized category data, or if the forgetting learning completion degree is grea