Model generation method, apparatus, and electronic device
By grouping the training data and aggregating models other than the reference model in the model set, the problem of long learning time in the forgetting process is solved, and efficient model generation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-10
- Publication Date
- 2026-04-14
AI Technical Summary
Existing forgetting learning processes are time-consuming and costly, requiring complete retraining of untrained models to eliminate the influence of specific data.
By grouping the training data and generating multiple first groups, and then aggregating the models in the model set other than the reference model, the target data corresponding to the group is directly located and the affected models are excluded. Model aggregation is then performed to obtain the target model.
It reduces the time required for the forgetting learning process, avoids complete retraining, improves efficiency, and reduces the number of affected models.
Smart Images

Figure CN117035022B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a model generation method, apparatus, and electronic device. Background Technology
[0002] Forgetting learning is a technique used in machine learning to eliminate the influence of data on the model. Machine forgetting learning can guarantee the data owner's "right to be forgotten," protecting user data security and privacy. However, the related forgetting learning process still has the drawback of being time-consuming. Summary of the Invention
[0003] In view of the above problems, this application proposes a model generation method, apparatus, and electronic device to improve the above problems.
[0004] In a first aspect, this application provides a model generation method, the method comprising: obtaining a target group from a plurality of first groups, wherein the target group is a first group corresponding to target data, and the target data is data to be forgotten; and performing model aggregation based on models in a model set other than a reference model to obtain a target model, wherein each model in the model set is pre-trained based on data from the first group corresponding to the plurality of first groups, and the reference model is trained based on data corresponding to the target group.
[0005] Secondly, this application provides a model generation apparatus, the apparatus comprising: a grouping and positioning unit, configured to obtain a target group from a plurality of first groups, wherein the target group is a first group corresponding to target data, and the target data is data to be forgotten; and a model generation unit, configured to perform model aggregation based on models in a model set excluding a reference model to obtain a target model, wherein each model in the model set is pre-trained based on data from the first group corresponding to the plurality of first groups, and the reference model is trained based on data corresponding to the target group.
[0006] Thirdly, this application provides an electronic device, which includes at least a processor and a memory; one or more programs are stored in the memory and configured to be executed by the processor to implement the above-described method.
[0007] Fourthly, this application provides a computer-readable storage medium storing program code, wherein the above-described method is executed when the program code is run by a processor.
[0008] This application provides a model generation method, apparatus, and electronic device. After obtaining target data to be forgotten, it can obtain a target group from multiple first groups based on the target data. Then, it uses the model corresponding to the target group in the model set as a reference model. Based on the models in the model set other than the reference model, it performs model aggregation to obtain the target model. This allows the data used for model training to be grouped into multiple first groups, thereby generating a usable model set through grouped training. In this case, when a request to forget the target data is received, the target group corresponding to the target data can be directly located to exclude the affected model (reference model). Model aggregation is then performed directly using the models other than the affected model to obtain the required target model. This avoids the need for complete retraining to obtain the target model when forgetting the target data, thus reducing the time consumption of the forgetting learning process. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 A schematic diagram illustrating an application scenario of the model generation method in an embodiment of this application is shown;
[0011] Figure 2 A schematic diagram illustrating another application scenario of the model generation method in the embodiments of this application is shown;
[0012] Figure 3 A flowchart of a model generation method according to an embodiment of this application is shown;
[0013] Figure 4 This illustration shows a schematic diagram of dividing multiple groups according to an embodiment of this application;
[0014] Figure 5 A schematic diagram illustrating one method of obtaining a model set is shown in an embodiment of this application;
[0015] Figure 6 A flowchart of a model generation method according to another embodiment of this application is shown;
[0016] Figure 7 This illustration shows another diagram of dividing multiple groups in an embodiment of this application;
[0017] Figure 8 A flowchart of a training process according to an embodiment of this application is shown;
[0018] Figure 9 A schematic diagram of the local aggregation model corresponding to the first group is shown in an embodiment of this application;
[0019] Figure 10 This illustration shows a schematic diagram of exchanging the local aggregation models corresponding to each of the multiple first groups in an embodiment of this application;
[0020] Figure 11 This illustration shows a diagram of the reallocation of users corresponding to multiple first groups in an embodiment of this application;
[0021] Figure 12 This illustration shows a schematic diagram of a second group comprising multiple first groups in an embodiment of this application;
[0022] Figure 13 A flowchart of a model generation method according to another embodiment of this application is shown;
[0023] Figure 14 A schematic diagram of the training states corresponding to the model in the embodiments of this application is shown;
[0024] Figure 15 A schematic diagram illustrating the multiple stages included in the training process in one embodiment of this application is shown;
[0025] Figure 16 A schematic diagram illustrating multiple stages included in model reorganization in one embodiment of this application is shown;
[0026] Figure 17 A structural block diagram of a model generation apparatus according to an embodiment of this application is shown;
[0027] Figure 18 A structural block diagram of another model generation apparatus proposed in an embodiment of this application is shown;
[0028] Figure 19 A structural block diagram of another electronic device for performing the model generation method according to embodiments of this application is shown;
[0029] Figure 20 It is a storage unit in this application embodiment for storing or carrying program code that implements the model generation method according to this application embodiment. Detailed Implementation
[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0031] To give a neural network model specific functionality, it can be trained using training data to obtain a model with that specific function. However, some of the data used for training may involve user privacy concerns, and in some cases, it may be necessary to request the removal of the influence of certain data originally used for training on the model. For example, forgetting methods can be used to eliminate the influence of specific data on the model.
[0032] However, the inventors discovered in their research that the related forgetting learning process suffers from drawbacks such as being time-consuming and costly. For example, they found that in the related forgetting learning process, data that is expected to have no impact on the model (e.g., some users' personal privacy data) is usually deleted from the training data to obtain new training data. Then, the untrained model is retrained using this new training data to obtain the desired model. Because it involves retraining a completely untrained model, the model training process needs to be repeated, resulting in a long time consumption and high cost.
[0033] Therefore, after discovering the above-mentioned problems in their research, the inventors proposed the model generation method, apparatus, and electronic device in this application, which can improve the above-mentioned problems. In the model generation method provided in the embodiments of this application, after obtaining the target data to be forgotten, a target group can be obtained from multiple first groups based on the target data. Then, the model corresponding to the target group in the model set is used as a reference model. Based on the models in the model set other than the reference model, model aggregation is performed to obtain the target model.
[0034] This method allows the data used for model training to be grouped into multiple first groups, thereby enabling the generation of a usable set of models through grouped training. In this case, when a request to forget the target data is received, the target group corresponding to the target data can be directly located to exclude the affected models (reference models), and the models other than the affected models can be directly aggregated to obtain the required target model. This avoids the need to completely retrain to obtain the target model when the target data needs to be forgotten, thus reducing the time consumption of the forgetting learning process.
[0035] Before providing a more detailed description of the embodiments of this application, an application environment related to the embodiments of this application will be introduced.
[0036] The application scenarios involved in the embodiments of this application will be introduced below.
[0037] In this embodiment of the application, the provided model generation method can be executed by an electronic device. In this manner, all steps of the model generation method provided in this embodiment can be performed by the electronic device. For example, as... Figure 1 As shown, in the model generation method provided in this application embodiment, all steps can be executed by an electronic device, and all steps can be executed by the processor of the electronic device 100.
[0038] Furthermore, the model generation method provided in this application embodiment can also be executed by a server. Correspondingly, in this server-executed method, the server can begin executing the steps of the model generation method provided in this application embodiment in response to a triggering instruction. This triggering instruction can be sent by an electronic device used by the user, or it can be triggered locally by the server in response to some automated event.
[0039] Furthermore, the model generation method provided in this application embodiment can also be executed collaboratively by an electronic device and a server. In this collaborative execution method, some steps of the model generation method provided in this application embodiment are executed by the electronic device, while other steps are executed by the server. For example, as shown... Figure 2 As shown, the electronic device 100 can execute the steps in the model generation method regarding generating the current round training model corresponding to each user in multiple first groups, and then upload the current round training model to the server, which will execute the step of obtaining the local aggregation model. After that, the server can redistribute the obtained local aggregation model to the users in multiple first groups for subsequent training steps.
[0040] It should be noted that in this method where electronic devices and servers work together, the steps performed by the electronic devices and servers are not limited to those described in the examples above. In practical applications, the steps performed by the electronic devices and servers can be dynamically adjusted according to the actual situation.
[0041] It should be noted that the electronic equipment 100, in addition to being for Figure 1 and Figure 2In addition to smartphones, the device 200 can also be a tablet, smartwatch, smart voice assistant, or other similar device. Server 200 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud computing, cloud storage, network services, cloud communication, middleware services, CDN (Content Delivery Network), and artificial intelligence platforms.
[0042] The terminology used in the embodiments of this application will be explained below.
[0043] Machine learning is a field that learns and discovers patterns from large amounts of data, providing powerful support for decision-making and prediction. Machine learning learns rules and patterns from data by building and training models, and then applies this learned knowledge to new data to automate task processing and prediction.
[0044] Forgetting learning is a technique used in machine learning to eliminate the influence of data on the model. Machine forgetting learning can guarantee the data owner's "right to be forgotten," protecting user data security and privacy.
[0045] Edge-cloud collaboration: Edge-cloud collaboration is a computing paradigm that provides more efficient, flexible and reliable computing and data processing capabilities by having edge devices and cloud servers work together.
[0046] Exact forgetting: Exact forgetting refers to the process of completely deleting or erasing specific knowledge or data previously learned from a model. This means that after experiencing exact forgetting, the model no longer retains any information related to the forgotten content.
[0047] Approximate forgetting: Approximate forgetting refers to removing or attenuating previously learned knowledge or data from a model in an approximate manner. Unlike exact forgetting, approximate forgetting may retain some traces or effects of the forgotten content in the model.
[0048] Model aggregation: Model aggregation refers to merging or combining multiple independently trained models to obtain more powerful and robust predictive capabilities. Model aggregation is typically used to integrate the parameters or prediction results of multiple models to improve model performance, generalization ability, or stability.
[0049] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0050] Please see Figure 3 This application provides a model generation method, which includes:
[0051] S110: Obtain the target group from multiple first groups, where the target group is the first group corresponding to the target data, and the target data is the data to be forgotten.
[0052] In this embodiment, during the training phase, users participating in model training can be divided into multiple groups to obtain multiple first groups. By using user grouping, the training process of users within each group can be isolated from each other, thereby reducing the number of affected models (reference models).
[0053] During training, models can be trained based on the data corresponding to users in each first group. After training, a model can be output for each first group (e.g., the local aggregation model mentioned later). Then, by aggregating the models output by each first group, the desired target model can be obtained.
[0054] After obtaining the data to be forgotten, it can be determined that the impact of the requested forgotten data on the final generated target model needs to be eliminated. In this case, the first group corresponding to the target data can be obtained first, as the target group. The first group corresponding to the target data can be understood as the first group of users to which the target data belongs when it is used as training data, or it can be understood as the first group of users to which the requested data (target data) is forgotten during the training process.
[0055] For example, such as Figure 4 As shown, after grouping the users in the user set, the resulting grouping can be as follows: Figure 4 As shown in the diagram. Groups G1, G2, and G3 each form a first group. If the request to forget data is sent by user U2, then the target group can be group G1. If the request to forget data is sent by user W3, then the target group can be group G3.
[0056] S120: Based on the models in the model set other than the reference model, perform model aggregation to obtain the target model. Each model in the model set is pre-trained based on the data of the corresponding first group in multiple first groups, and the reference model is trained based on the data corresponding to the target group.
[0057] The model set includes multiple first groups, each with its final output model at the end of training. After determining the target group, the output model corresponding to the target group can be used as a reference model, which can then be excluded during subsequent model aggregation. Model aggregation based on models other than the reference model in the model set can be understood as selecting at least two models from the excluding the reference model for aggregation to obtain the target model.
[0058] For example, such as Figure 5 As shown, group G1 outputs model M1 after training, group G2 outputs model M2, and group G3 outputs model M3. Models M1, M2, and M3 then form a model set. Multiple models from any of these groups can be selected for aggregation to obtain the target model. In cases where data forgetting is required, if the target group determined by the data forgetting request is group G2, then model M2 will be used as the reference model. Consequently, during subsequent model aggregation, model M2 will be excluded; for example, models M1 and M3 will be used for aggregation.
[0059] like Figure 5 As shown, in one scenario, before receiving a request to perform data forgetting, model M1 and model M2 can be used to perform model aggregation to obtain the target model, while model M3, since it was not used in model aggregation, can serve as a backup model. In this case, if a request to perform data forgetting is received, and the determined reference model is model M2, then model M2 will be excluded, and model M1 and the previously unused model M3 will be used for model aggregation to obtain the target model. Optionally, after obtaining the target group, the reference model can also be deleted.
[0060] This embodiment provides a model generation method that, after obtaining the target data to be forgotten, can obtain a target group from multiple first groups based on the target data. Then, the model corresponding to the target group in the model set is used as a reference model. Based on the models in the model set other than the reference model, model aggregation is performed to obtain the target model. This method allows the data used for model training to be grouped into multiple first groups, thereby generating a usable model set through grouped training. In this case, when a request to forget the target data is received, the target group corresponding to the target data can be directly located to exclude the affected model (reference model). Model aggregation is then performed directly using the models other than the affected model to obtain the required target model. This avoids the need for complete retraining to obtain the target model when forgetting the target data, thus reducing the time consumption of the forgetting learning process.
[0061] Please see Figure 6 This application provides a model generation method, which includes:
[0062] S210: Divide the users in the first user set into groups to obtain multiple first groups.
[0063] In the embodiments of this application, there are multiple ways to group users.
[0064] As one approach, as described above, the first user set can be directly grouped, and the resulting multiple groups can then be used as multiple first groups.
[0065] As another approach, the first user set can be grouped multiple times to obtain multiple first groups. Alternatively, the users in the first user set can be grouped to obtain multiple second groups, and then the users in each of the multiple second groups can be further grouped to obtain multiple first groups. In this case, multiple first groups can belong to the same second group. Correspondingly, multiple first groups belonging to the same second group can be understood as subgroups of the second group.
[0066] For example, such as Figure 7 As shown, after the first grouping, the first user set can be divided into group G1, group G2, and group G3. Groups G1, G2, and G3 are all second groups. In this case, each of the resulting second groups can be further subdivided; for example, group G1 can be divided into group G11 and group G12, group G2 into group G21 and group G22, and group G3 into group G31 and group G32. After... Figure 7In the case of multiple groupings shown, the resulting multiple second groups include group G1, group G2 and group G3, and the resulting multiple first groups include group G11, G12, G21, G22, G31 and G32.
[0067] It should be noted that, in this embodiment, the first user set can be a set including all users, or it can be a set composed of a subset of users selected from all users. For example, as one approach, filtering conditions can be preset, and then users who meet the filtering conditions can be selected from all users to form the first user set. For example, the mathematical expression for determining the first user set can be as follows:
[0068] C = C0·p, p∈[0,1]
[0069] Where C represents the first user set, C0 represents the all user set, and p represents the selection ratio.
[0070] In the process of dividing users in the first user set into multiple second groups, the users in the first user set can be divided equally, so that the users in the multiple second groups are the same. Similarly, in the process of dividing a second group into multiple first groups, the users in the first group can also be divided equally, so that the users in the resulting multiple first groups are the same.
[0071] It's important to note that different users will have different characteristics, and the data corresponding to different users will also differ. For example, if users are categorized by age, some may belong to the children category, some to the youth category, and some to the middle-aged and elderly category. Similarly, if users are categorized by spending habits, some may be impulsive consumers, while others may be cautious consumers. In such cases, to mitigate the accuracy loss caused by the non-independent and identically distributed nature of the data in model aggregation, the proportion of users in the same category within each first group can be made similar or consistent. Optionally, dividing users into multiple categories can ensure that the proportion of users in the same category is consistent within each first group.
[0072] For example, please refer to [the document / reference]. Figure 7If users are divided into a first user category and a second user category, based on the principle that the proportion of the same category must be consistent across multiple first groups, then in group G1, there will be two users belonging to the first user category and two users belonging to the second user category. Correspondingly, in group G11, there will be one user belonging to the first user category and another user belonging to the second user category; similarly, in group G12, there will be one user belonging to the first user category and another user belonging to the second user category. The distribution of user categories in other first groups follows the same pattern, thus ensuring that the proportion of the same category across multiple first groups is consistent.
[0073] S220: Train the initial model based on the data in the multiple first groups to obtain the models corresponding to the multiple first groups respectively, and obtain a model set based on the models corresponding to the multiple first groups respectively, wherein the data in the first group includes the data corresponding to multiple users in the first group.
[0074] At the beginning of training, an identical initial model can be configured for each first group, so that each first group has its own initial model. After training begins, the initial model corresponding to the first group can be trained based on the data in the first group. After multiple rounds of training, multiple models corresponding to each first group can be obtained.
[0075] In this context, user-related data can be understood as data related to the user. Furthermore, user-related data can be of various types. For example, it could be the order in which the user uses applications. Or it could be the user's recent browsing history. In this case, the specific data categories used during training can be determined based on the training objective. For instance, if the final target model is used to predict the order in which applications are used, then the user-related data during training could include the order in which the user uses applications. Similarly, if the final target model is used to predict information of interest to the user, then the user-related data during training could include the user's recent browsing history.
[0076] As a way, such as Figure 8 As shown, training the initial model based on data from multiple first groups to obtain models corresponding to each first group can include:
[0077] S221: During the current training round, the training model for the current round is trained using the data corresponding to multiple users in the first group, so as to obtain the current training model corresponding to each user in the first group. The training model corresponding to the first round of training is the initial model.
[0078] It should be noted that the model trained at the beginning of each training round can be understood as the model to be trained in that round. Specifically, in the first training round, the initial model is trained, and this initial model is the model to be trained in that round. The model training process can be represented by the following expression:
[0079]
[0080] Characterize the model to be trained in the current round. It represents the model obtained when the current training round is completed.
[0081] When the current round of training is completed, the model obtained in the current round of training can be used as the current round of training model.
[0082] S222: Aggregate the training models of each user in the first group for the current round to obtain the local aggregated model corresponding to the first group.
[0083] It should be noted that in this embodiment, when there are multiple users in the first group, each user will train the model to be trained in the current round based on the corresponding data. After completing the training for the current round, each user can output a corresponding training model for that round. In this case, by aggregating the training models for the current rounds corresponding to multiple users in the same first group, a local aggregated model corresponding to the first group can be obtained.
[0084] For example, such as Figure 9 As shown, when group G11 includes users U1 and U2, user U1 trains the current training model using its corresponding data, resulting in model M4. User U2 trains the current training model using its corresponding data, resulting in model M5. Models M4 and M5 can then be aggregated to obtain model J1, which is used as the local aggregated model for group G11. Similarly, when group G12 includes users U3 and U4, user U3 trains the current training model using its corresponding data, resulting in model M6. User U4 trains the current training model using its corresponding data, resulting in model M7. Models M6 and M7 can then be aggregated to obtain model J2, which is used as the local aggregated model for group G12. This process continues, resulting in the local aggregated model for each first group.
[0085] The local aggregation model obtained by each first group can be represented by the following formula:
[0086]
[0087] Here, the agg function is the model aggregation function. The local aggregated model obtained by representing model aggregation is specifically... This represents the local aggregation model obtained by the i-th group at the end of the t-th round of training.
[0088] S223: Exchange the local aggregation models corresponding to the multiple first groups.
[0089] Since isolated group training may reduce the utilization of data and randomness of the trained model, thus hindering performance improvement, a more robust model can be trained by increasing the randomness of training. This can be achieved by exchanging the local aggregated models obtained from different first groups. Exchanging local aggregated models can be understood as multiple first groups exchanging the local aggregated models obtained in each round of training.
[0090] As described above, there are multiple ways to obtain the first group in this application embodiment. In this case, different methods of local aggregation model exchange can be adopted for different ways of obtaining the first group.
[0091] In one approach, where multiple first groups are obtained by further subdividing multiple second groups, exchanging the local aggregation models corresponding to each of the multiple first groups can include: exchanging the local aggregation models of multiple first groups that belong to the same second group. In this approach, the exchange of local aggregation models does not occur across second groups, but rather within the same second group.
[0092] For example, such as Figure 10As shown, when groups G11 and G12 are the first group, they belong to the same second group. In this case, after completing the current training round, the local aggregated model obtained by group G11, i.e., model J1, will be exchanged with group G12 as the training model for users in group G12 during the next training round. Correspondingly, the local aggregated model obtained by group G12, i.e., model J2, will be exchanged with group G11 as the training model for users in group G11 during the next training round. Similarly, when groups G21 and G22 are the first group, they belong to the same second group. In this case, after completing the current training round, the local aggregated model obtained by group G21, i.e., model J3, will be exchanged with group G22 as the training model for users in group G22 during the next training round. Correspondingly, the local aggregated model obtained by group G22, i.e., model J4, will be exchanged with group G21 as the training model for users in group G21 during the next training round.
[0093] Alternatively, if multiple first groups are obtained by directly partitioning the user set (e.g., the first user set), the local aggregation models output by randomly partitioning two first groups can be exchanged.
[0094] It should be noted that, in the embodiments of this application, no specific method is limited to the exchange of local aggregation models. Any exchange method that satisfies the requirement that, after the exchange, each group's trainable model in the next training round is the local aggregation model obtained by the other first group in the previous training round can be applied to this application.
[0095] S224: After the exchange, each of the multiple first groups will use the obtained local aggregation model as the model to be trained in the next round and enter the next round of training process until the training ends.
[0096] In this context, "training completion" can be understood as the end of the overall training process, which includes multiple training rounds. In this embodiment, there are several ways to determine whether training has ended. One method is to determine the end of training based on the number of training rounds. It should be noted that the target number of training rounds required for subsequent model training can be pre-configured before training. After completing a round of training, the training round can be further detected. If the training round is determined to be the target round, then training is considered complete, and the local aggregated models obtained by multiple first groups after completing the target round are taken as models in the model set. Another method is to determine training completion if, after completing a round of training, at least a specified number of models among the local aggregated models obtained by multiple first groups can perform a specified function. Here, the specified function can be understood as the set model training objective.
[0097] S230: Obtain the target group from multiple first groups, where the target group is the first group corresponding to the target data, and the target data is the data to be forgotten.
[0098] S240: Based on the models in the model set other than the reference model, perform model aggregation to obtain the target model. Each model in the model set is pre-trained based on the data of the corresponding first group in multiple first groups, and the reference model is trained based on the data corresponding to the target group.
[0099] In one approach, the overall training method in this embodiment can be an end-to-cloud collaborative (client and server collaboration) training method. In this method, during each round of training, each user in the first group can train the model to be trained locally for that round. After completing the training for that round and obtaining the training model, the training model can be uploaded to the server. Upon receiving training models uploaded by multiple users in the same first group, the server can aggregate the training models uploaded by multiple users in the same first group to obtain the local aggregated model corresponding to that first group.
[0100] In this approach, aggregating the current-round training models corresponding to multiple users in the first group to obtain the local aggregated model corresponding to the first group may include: uploading the current-round training models corresponding to multiple users in the first group to the server, and having the server aggregate the received multiple current-round training models to obtain the local aggregated model corresponding to the first group.
[0101] When it is necessary to exchange the local aggregation models of multiple first groups, the server can cross-distribute the local aggregation models corresponding to the multiple first groups to the multiple first groups in order to exchange the local aggregation models corresponding to the multiple first groups.
[0102] Furthermore, in this embodiment, as a method, users in multiple first groups can be reassigned before each round of training. Optionally, after the reassignment of the included users, at least some users in the first groups may change. By reassigning users in multiple first groups, the data used to train the model in each round within the same first group can be varied, thereby improving the performance of the locally aggregated model output by the first group and ultimately improving the performance of the final aggregated target model.
[0103] For example, such as Figure 11 As shown, the grouping situation for the Nth round and the (N+1)th round can be described as follows: Figure 11 As shown, in round N+1, the users in group G11 changed from users U1 and U2 to users U1 and W2. Correspondingly, the users in group G31, where user W2 originally resided, also changed. Similarly, in round N+1, the users in group G21 changed from users V1 and V2 to users W3 and V2. Correspondingly, the users in group G32, where user W3 originally resided, also changed.
[0104] It should be noted that, as mentioned above, in some cases, each user can train the model locally. In this case, the training speed of each user will vary due to the performance of their local device. To avoid the training speed of a single user affecting the overall training progress, one approach is to aggregate the training models of multiple users in the first group for each round, obtaining a locally aggregated model corresponding to the first group. This can include: when the training time limit is met, aggregating the training models of multiple users in the first group who have completed training within the training time limit, obtaining a locally aggregated model corresponding to the first group.
[0105] Among them, users who have not completed training can stop the current round of training when the training time limit is met, and the untrained model of the current round will be discarded, and they will still participate in the next round of model training.
[0106] One approach involves exchanging the local aggregation models corresponding to multiple first groups, including: in response to at least two first groups completing the current training round, exchanging the local aggregation models corresponding to the at least two first groups that have completed the current training round. It should be noted that the training process for each first group can be performed in parallel. When multiple users in a first group have completed training, model aggregation can begin to obtain the corresponding local aggregation model, without waiting for all first groups to complete model training. In this approach, the model training process for users in each first group can be monitored in real time. If at least two first groups are detected to have completed the current training round, their respective local aggregation models can be exchanged. After the exchange, these at least two first groups can be triggered to enter the next round of model training without waiting for other first groups. Subsequently, if at least two more first groups complete the current training round, their local aggregation models can be exchanged.
[0107] For example, such as Figure 12 As shown, in Figure 11 If, among the groups G11, G12, and G13 shown, groups G11 and G13 have already completed the current round of training, while group G12 is still in the training process, then the local aggregation models of groups G11 and G13 can be swapped first. After the swap is completed, groups G11 and G13 can directly enter the next round of training without waiting for group G12 to complete its training.
[0108] It should be noted that because each first group trains at a different speed, the number of training rounds for each first group may differ. For example, some first groups may be in the Nth round of training, while others may be in the N+1th round. However, even if at least two first groups have completed different training rounds, their respective local aggregated models can still be exchanged.
[0109] It should be noted that if the first group has reached the end of training after completing the current round of training, then the first group will not be trained again and will no longer participate in the exchange of local aggregation models.
[0110] This application provides a model generation method that avoids the need for complete retraining to obtain the target model when forgetting the target data, thus reducing the time consumption of the forgetting learning process. Furthermore, in this embodiment, during the grouping of the user set, secondary grouping can be performed to obtain multiple first groups, thereby further reducing the number of affected models in the subsequently generated model set. Moreover, in this embodiment, during the training process, after each round of training, the currently obtained local aggregate models of each first group are exchanged, resulting in better randomness and greater robustness in the final trained local aggregate models. Additionally, setting a training time limit helps prevent slower-training first groups from affecting the overall training progress.
[0111] Please see Figure 13 This application provides a model generation method, which includes:
[0112] S310: Obtain the target group from multiple first groups, where the target group is the first group corresponding to the target data, and the target data is the data to be forgotten.
[0113] S320: Based on the models in the first model set other than the first reference model, obtain the first model to be aggregated. The first model set includes the models previously used for model aggregation, and the first reference model is the model in the first model set that corresponds to the target group.
[0114] It should be noted that after obtaining the local aggregated models corresponding to each of the multiple first groups, the target model can be generated from these local aggregated models. In this case, there may be situations where the target model has already been generated before the request for forgotten data is received. In this case, the original model set can be divided into two parts. One part consists of the models that were used to participate in model aggregation before the request for forgotten data was received (models in the first model set), and the other part consists of the models that were not used to participate in model aggregation before the request for forgotten data was received (models in the second model set).
[0115] In determining the target group, the first reference model related to the target group in the first model set can be excluded, so that the remaining models unrelated to the target group can be used as the first models to be aggregated.
[0116] S330: Based on the models in the second model set other than the second reference model, obtain the second model to be aggregated. The second model set includes models that have not been used for model aggregation before, and the second reference model is the model in the second model set that corresponds to the target group.
[0117] Correspondingly, after determining the target group, the second reference models related to the target group in the second model set can be excluded, so that the remaining models unrelated to the target group can be used as the second models to be aggregated.
[0118] S340: Based on the first and second models to be aggregated, perform model aggregation to obtain the target model.
[0119] In this embodiment, after obtaining the first model to be aggregated and the second model to be aggregated, there are multiple ways to perform model aggregation.
[0120] One approach is to select a subset of models from the second model to be aggregated and perform model aggregation with the first model to obtain the target model. Another approach is to select at least a subset of models from both the first and second models to be aggregated and perform model aggregation to obtain the target model.
[0121] It should be noted that after dividing the data into multiple first groups, the final number of local aggregation models is fixed. In this case, if the proportion of target models selected for aggregation is fixed, the number of local aggregation models selected for aggregation is also fixed.
[0122] Optionally, the number of models used for aggregation into the target model each time can be set as the target number. In this case, in the method of selecting a subset of models from the second model to be aggregated and performing model aggregation with the first model to be aggregated, the sum of the number of the subset of models selected from the second model to be aggregated and the number of the first model to be aggregated is the target number. In the method of selecting at least a subset of models from the first model to be aggregated and the second model to be aggregated, the number of at least a subset of models selected from the first model to be aggregated and the second model to be aggregated is the target number.
[0123] As one approach, if the number of models in the second model set other than the second reference model is greater than or equal to the number of the first reference models, model aggregation is performed based on the first and second models to be aggregated to obtain the target model.
[0124] As one approach, if the number of models in the second model set other than the second reference model is less than the number of the first reference models, the target intermediate state of the model to be processed during the training process is obtained. The model to be processed includes the first reference model and / or the second reference model. The target intermediate state is determined based on the training state of the model to be processed before the model to be processed is first trained based on the target data. The model corresponding to the target intermediate state is further trained to obtain the third model to be aggregated. The model is aggregated based on the model selected from the second model to be aggregated and the third model to be aggregated, as well as the first model to be aggregated, to obtain the target model.
[0125] It should be noted that the model to be processed can be obtained through multiple rounds of training. In this case, the target data may be used to train the model to be processed in only one round of training, or it may be used to train the model to be processed in multiple rounds of training. Here, training the model to be processed can be understood as training it at any state it is in before the training is completed. In this case, by finding the target intermediate state, training can continue based on the model corresponding to the target intermediate state, thereby avoiding retraining the model completely from the initial model. This reduces the deficiency of insufficient remaining data for model aggregation after excluding the first and second reference models, while also avoiding excessive time consumption caused by retraining the model.
[0126] Optionally, each model in the model set is obtained by training multiple times based on the data of the corresponding first group in multiple first groups, and the data used for model training in the same first group are not exactly the same in multiple training rounds. If multiple intermediate states are obtained in the training process of the model to be processed, the intermediate state is the training state of the model to be processed before the first training based on the target data; the intermediate state with the largest number of training rounds among the multiple intermediate states is taken as the target intermediate state.
[0127] The mathematical expression for determining the intermediate state of the target is as follows:
[0128]
[0129] in, For the intermediate states provided for different first groups, m and n represent the training rounds.
[0130] In the embodiments of this application, the training state of the model will change after one round of training.
[0131] For example, such as Figure 14As shown, when Model 1 is in the N-1th training round, it will perform the Nth training round, thus obtaining the training state corresponding to the Nth round. When Model 1 is in the Nth training round, it will perform the N+1th training round, thus obtaining the training state corresponding to the N+1th round. When Model 1 is in the N+1th training round, it will perform the N+2th training round, thus obtaining the training state corresponding to the N+2th round. Figure 11 In the case shown, if model M1 is the reference model and the target data was used to train model 1 during the N+2th training round, then for model M1, the target training state can be the training state corresponding to the N+1th round.
[0132] This application provides a model generation method that avoids the need for complete retraining to obtain the target model when forgetting the target data, thus reducing the time consumption of the forgetting learning process. Furthermore, in this embodiment, after determining the reference model based on the target data, it can first detect whether the remaining models, after excluding the reference model, still meet the requirements for model aggregation. If the requirements are not met, other models (a third model to be aggregated) can be obtained by utilizing the intermediate state of the reference model during training for model aggregation. This achieves both forgetting the target data and ensuring that model aggregation is performed according to predetermined requirements.
[0133] Next, we will proceed... Figure 15 and Figure 16 The model training and model reorganization processes involved in the embodiments of this application will be described below.
[0134] like Figure 15 The training phase shown may include, in the order of execution, initialization, random grouping, local training, random distribution, and aggregation / backup phases.
[0135] During the initialization phase, the internal parameters of the initial model can be initialized, and then the initialized model can be distributed to each first group for training.
[0136] During the random grouping phase, the user set (e.g., the first user set) can be randomly grouped to obtain multiple first groups.
[0137] During the local training phase, each user in the multiple first groups can train the received model locally.
[0138] The local training phase can include multiple rounds of training. After completing one round of training, the local aggregation models corresponding to each of the multiple first groups can be randomly distributed, so that each first group can be trained in the next round of local training based on the local aggregation models obtained by other first groups in the previous round of local training.
[0139] After training is completed, the aggregation / backup phase can begin. In the aggregation / backup phase, some models can be selected from multiple local aggregation models for global model aggregation to obtain the target model, and the models not used for global model aggregation can be used as backup models.
[0140] like Figure 16 The model reorganization stage shown may include stages such as deleting target data, target reorganization training, and aggregation / backup.
[0141] In the target data deletion phase, the user to whom the target data belongs is removed from the user set. If, after removing the reference models (e.g., the first and second reference models) from the model set, the number of remaining models is insufficient, the target re-training phase begins. In the target re-training phase, the models can be retrained based on the intermediate states of the models to be processed, resulting in new models (e.g., the third model to be aggregated mentioned above), and then global model aggregation is performed.
[0142] Please see Figure 17 This application provides a model generation apparatus 400, which includes:
[0143] The group positioning unit 410 is used to obtain a target group from multiple first groups, wherein the target group is the first group corresponding to the target data, and the target data is the data to be forgotten.
[0144] The model generation unit 420 is used to perform model aggregation based on models other than the reference model in the model set to obtain the target model. Each model in the model set is pre-trained based on the data of the first group corresponding to multiple first groups, and the reference model is trained based on the data corresponding to the target group.
[0145] In one approach, the model set includes a first model set and a second model set. In this approach, the model generation unit 420 is specifically used to: obtain a first model to be aggregated based on models in the first model set excluding the first reference model, where the first reference model is the model in the first model set corresponding to the target group; obtain a second model to be aggregated based on models in the second model set excluding the second reference model, where the second reference model is the model in the second model set corresponding to the target group; and perform model aggregation based on the first and second models to be aggregated to obtain the target model.
[0146] Optionally, the model generation unit 420 is specifically used to perform model aggregation based on the first and second models to be aggregated to obtain a target model if the number of models in the second model set other than the second reference model is greater than or equal to the number of the first reference models. If the number of models in the second model set other than the second reference model is less than the number of the first reference models, the unit obtains the target intermediate state of the model to be processed during the training process. The model to be processed includes the first reference model and / or the second reference model. The target intermediate state is determined based on the training state of the model to be processed before the first training based on the target data. The unit continues to train the model corresponding to the target intermediate state to obtain a third model to be aggregated. The unit then performs model aggregation based on the model selected from the second and third models to be aggregated and the first model to be aggregated to obtain the target model.
[0147] Optionally, each model in the model set is obtained by training multiple times based on the data of the corresponding first group in multiple first groups, and the data used for model training in the same first group are not exactly the same in multiple training rounds. The model generation unit 420 is specifically used to select the intermediate state with the largest number of training rounds as the target intermediate state if it is found that there are multiple intermediate states of the model to be processed during the training process, and the intermediate state is the training state of the model to be processed before the first training based on the target data.
[0148] like Figure 18 As shown, the device 400 also includes:
[0149] The model training unit 430 is used to group users in the first user set to obtain multiple first groups; to train the initial model based on the data in the multiple first groups to obtain the models corresponding to the multiple first groups respectively; and to obtain a model set based on the models corresponding to the multiple first groups respectively, wherein the data in the first group includes the data corresponding to multiple users in the first group.
[0150] As one approach, the model training unit 430 is specifically used to train the model to be trained in the current round of training using data corresponding to multiple users in the first group, thereby obtaining the current round training model corresponding to each user in the first group, wherein the model to be trained in the first round of training is the initial model; the current round training models corresponding to each user in the first group are aggregated to obtain the local aggregated model corresponding to the first group; the local aggregated models corresponding to each of the multiple first groups are exchanged; after the exchange, each of the multiple first groups uses the obtained local aggregated model as the model to be trained in the next round and enters the next round of training process until the training ends.
[0151] In one approach, the model training unit 430 is specifically used to group users in the first user set to obtain multiple second groups; and to further group users in the multiple second groups to obtain multiple first groups. Optionally, the model training unit 430 is specifically used to exchange the local aggregation models of multiple first groups that belong to the same second group with each other.
[0152] As one approach, the model training unit 430 is specifically used to upload the current-round training models corresponding to multiple users in the first group to the server. The server then aggregates the received multiple current-round training models to obtain the local aggregated model corresponding to the first group. The local aggregated models corresponding to the multiple first groups are cross-distributed to the multiple first groups to exchange the local aggregated models corresponding to the multiple first groups.
[0153] The model generation device provided in this embodiment avoids the need for complete retraining to obtain the target model when forgetting the target data, thereby reducing the time consumption of the forgetting learning process.
[0154] It should be noted that the device embodiments in this application correspond to the aforementioned method embodiments. The specific principles in the device embodiments can be found in the content of the aforementioned method embodiments, and will not be repeated here.
[0155] The following will combine Figure 19 This application describes an electronic device.
[0156] Please see Figure 19 Based on the aforementioned model generation method and apparatus, this application also provides another electronic device 100 capable of executing the aforementioned model generation method. The electronic device 100 includes one or more (only one shown in the figure) processors 102, a memory 104, and a network module 106 coupled together. The memory 104 stores programs capable of executing the contents of the aforementioned embodiments, and the processors 102 can execute the programs stored in the memory 104.
[0157] The processor 102 may include one or more processing cores. The processor 102 connects to various parts within the electronic device 100 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 104, and by calling data stored in the memory 104. Optionally, the processor 102 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 102 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 102 and may be implemented separately using a communication chip.
[0158] The memory 104 may include random access memory (RAM) or read-only memory (ROM). The memory 104 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 104 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the terminal 100 during use (such as phonebook data, audio and video data, chat log data, etc.).
[0159] The network module 106 is used to receive and transmit electromagnetic waves, realizing the mutual conversion between electromagnetic waves and electrical signals, thereby communicating with communication networks or other devices, such as audio playback devices. The network module 106 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity modules (SIM cards), memory, etc. The network module 106 can communicate with various networks such as the Internet, corporate intranets, and wireless networks, or communicate with other devices through wireless networks. The aforementioned wireless networks may include cellular telephone networks, wireless local area networks (WLANs), or metropolitan area networks (MANs). For example, the network module 106 can interact with base stations.
[0160] Please refer to Figure 20 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 800 stores program code that can be called by a processor to execute the methods described in the above method embodiments.
[0161] The computer-readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has storage space for program code 810 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
[0162] In summary, the model generation method, apparatus, and electronic device provided in this application, after obtaining target data to be forgotten, can obtain a target group from multiple first groups based on the target data. Then, the model corresponding to the target group in the model set is used as a reference model. Based on the models in the model set other than the reference model, model aggregation is performed to obtain the target model. Thus, the data used for model training can be grouped to obtain multiple first groups, thereby generating a usable model set through grouped training. In this case, when a request to forget target data is received, the target group corresponding to the target data can be directly located to exclude the affected model (reference model). Model aggregation is then performed directly using the models other than the affected model to obtain the required target model. This avoids the need for complete retraining to obtain the target model when forgetting the target data, reducing the time consumption and cost of the forgetting learning process.
[0163] The method provided in this application embodiment can achieve fast, universal, and scalable accurate forgetting in any scale of end-to-cloud collaborative scenario.
[0164] The group learning and forgetting / reorganization scheme proposed in this application significantly reduces the computational cost and time overhead of model retraining. On one hand, by using group learning, the impact of data from a particular user group on other user groups' models is reduced, limiting model memory caused by forgetting to the group the user belongs to. On the other hand, the locally aggregated model set obtained in the group learning phase can be fully utilized in the forgetting / reorganization phase. Flexible model reorganization can respond in real-time to users' data forgetting requests, satisfying the needs of data providers who require data to be forgotten.
[0165] The edge-cloud collaborative machine learning framework proposed in this application is independent of specific deep learning model structures and can be extended to any model structure that is parameterized and saved. This framework does not require specific aggregation methods for the models; any aggregation method can be used for computation, including but not limited to model weighted averages and momentum aggregation. It can also support both synchronous and asynchronous aggregation methods to accelerate model computation in real-world scenarios.
[0166] This application's embodiments can handle forgetting and recovery for a large number of user forgetting requests. The computational cost of retraining required for user forgetting increases approximately linearly. Compared to single-data-point forgetting, batch forgetting is more practical in large-scale training scenarios. Therefore, in edge-cloud collaborative scenarios, it supports model training and user forgetting requests of any scale, fully demonstrating the good scalability of this framework.
[0167] The edge-cloud collaborative machine learning framework employed in this application's embodiments ensures accurate forgetting of the target data. Compared to approximate forgetting, accurate forgetting guarantees the complete elimination of the target data's impact on the overall model, preventing potential inadequate forgetting and eliminating possible legal risks. The advantage of accurate forgetting lies in its ability to fully measure the degree of data forgetting. In contrast, approximate forgetting cannot guarantee that the model will produce the expected results after forgetting, while simultaneously not affecting the model's ability to learn from normal data.
[0168] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A model generation method, characterized in that, The method includes: The users in the first user set are grouped to obtain multiple first groups; The initial model is trained based on data from multiple first groups to obtain models corresponding to each first group, and a model set is obtained based on the models corresponding to each first group. The data in each first group includes data corresponding to multiple users within that group, where the user data includes the order in which the user uses applications or the user's recent browsing history. The process of training the initial model based on data from multiple first groups to obtain models corresponding to each first group includes: training the model to be trained in the current round using data corresponding to multiple users in the first group, obtaining the current round training model corresponding to each user in the first group, wherein the model to be trained in the first round of training is the initial model; aggregating the current round training models corresponding to each user in the first group to obtain a local aggregated model corresponding to the first group; exchanging the local aggregated models corresponding to each of the multiple first groups; and after the exchange, each of the multiple first groups uses the obtained local aggregated model as the model to be trained in the next round and enters the next round of training until training ends. Obtain a target group from multiple first groups, wherein the target group is the first group corresponding to the target data, and the target data is the data to be forgotten; Based on the models in the model set other than the reference model, model aggregation is performed to obtain the target model. Each model in the model set is pre-trained based on the data of the first group corresponding to the plurality of first groups, and the reference model is trained based on the data corresponding to the target group.
2. The method according to claim 1, characterized in that, The model set includes a first model set and a second model set. The first model set includes models previously used for model aggregation, and the second model set includes models not previously used for model aggregation. The step of performing model aggregation based on models other than the reference model in the model set to obtain the target model includes: Based on the models in the first model set other than the first reference model, a first model to be aggregated is obtained, wherein the first reference model is the model in the first model set that corresponds to the target group; Based on the models in the second model set other than the second reference model, a second model to be aggregated is obtained, where the second reference model is the model in the second model set that corresponds to the target group. Based on the first model to be aggregated and the second model to be aggregated, model aggregation is performed to obtain the target model.
3. The method according to claim 2, characterized in that, The step of performing model aggregation based on the first model to be aggregated and the second model to be aggregated to obtain the target model includes: If the number of models in the second model set other than the second reference model is greater than or equal to the number of the first reference models, model aggregation is performed based on the first model to be aggregated and the second model to be aggregated to obtain the target model.
4. The method according to claim 2, characterized in that, The step of performing model aggregation based on the first model to be aggregated and the second model to be aggregated to obtain the target model includes: If the number of models in the second model set other than the second reference model is less than the number of the first reference models, the target intermediate state of the model to be processed during the training process is obtained. The model to be processed includes the first reference model and / or the second reference model. The target intermediate state is determined based on the training state of the model to be processed before the model to be processed is first trained based on the target data. The model corresponding to the target intermediate state is further trained to obtain a third model to be aggregated; The target model is obtained by aggregating the model selected from the second and third models to be aggregated, and the first model to be aggregated.
5. The method according to claim 4, characterized in that, Each model in the model set is obtained through multiple rounds of training based on data from the corresponding first group among the multiple first groups, and the data used for model training in the same first group are not entirely the same in multiple rounds of training. The step of obtaining the target intermediate state of the model to be processed during the training process includes: If multiple intermediate states are obtained during the training process of the model to be processed, the intermediate states are the training states of the model to be processed before the first training based on the target data. The intermediate state with the largest number of training rounds among multiple intermediate states is selected as the target intermediate state.
6. The method according to claim 1, characterized in that, The step of grouping users in the first user set to obtain multiple first groups includes: The users in the first user set are grouped to obtain multiple second groups; The users in the multiple second groups are further grouped to obtain multiple first groups.
7. The method according to claim 6, characterized in that, The step of exchanging the local aggregation models corresponding to the multiple first groups includes: The local aggregation models of multiple first groups that belong to the same second group are exchanged with each other.
8. The method according to claim 1, characterized in that, The step of aggregating the current-round training models corresponding to multiple users in the first group to obtain the local aggregated model corresponding to the first group includes: The training models for each user in the first group are uploaded to the server. The server then aggregates the received training models to obtain the local aggregated model corresponding to the first group. The step of exchanging the local aggregation models corresponding to the multiple first groups includes: The server cross-distributes the local aggregation models corresponding to each of the multiple first groups to the multiple first groups in order to exchange the local aggregation models corresponding to each of the multiple first groups.
9. The method according to claim 1, characterized in that, The method further includes: Before each round of training, users from multiple first groups are reassigned.
10. The method according to claim 1, characterized in that, The step of aggregating the current-round training models corresponding to multiple users in the first group to obtain the local aggregated model corresponding to the first group includes: When the training time limit is met, the training models of multiple users in the first group who have completed training within the training time limit are aggregated to obtain the local aggregated model corresponding to the first group.
11. The method according to claim 1, characterized in that, The step of exchanging the local aggregation models corresponding to the multiple first groups includes: In response to at least two first groups completing the current round of training, the local aggregation models corresponding to the at least two first groups that have completed the current round of training are swapped.
12. The method according to claim 5, characterized in that, The percentage of users in the same category is consistent within each first group.
13. A model generation apparatus, characterized in that, The device includes: A model training unit is used to group users in a first user set to obtain multiple first groups; train an initial model based on data from each of the multiple first groups to obtain models corresponding to each of the multiple first groups; and obtain a model set based on the models corresponding to each of the multiple first groups. The data in each first group includes data corresponding to multiple users within the first group, where the user-related data includes the order in which the user uses the application or the user's recent information browsing history. The step of training the initial model based on data from each of the multiple first groups to obtain models corresponding to each of the multiple first groups includes: training the model to be trained in the current round using data corresponding to multiple users in the first group, obtaining a training model for each user in the current round, where the model to be trained in the first round of training is the initial model; aggregating the training models corresponding to each user in the current round in the first group to obtain a local aggregated model corresponding to the first group; exchanging the local aggregated models corresponding to each of the multiple first groups; and after the exchange, each of the multiple first groups uses the obtained local aggregated model as the model to be trained in the next round and enters the next round of training until training ends. A group positioning unit is used to obtain a target group from a plurality of first groups, wherein the target group is the first group corresponding to the target data, and the target data is the data to be forgotten; The model generation unit is used to perform model aggregation based on models other than the reference model in the model set to obtain a target model, wherein each model in the model set is pre-trained based on the data of the first group corresponding to the plurality of first groups, and the reference model is trained based on the data corresponding to the target group.
14. An electronic device, characterized in that, It includes a processor and a memory; one or more programs are stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, wherein the program code, when executed by a processor, performs the method according to any one of claims 1-12.
Citation Information
Patent Citations
Data processing method and device, equipment and medium
CN114780997A
Face recognition model forgetting method and system based on ensemble learning
CN115984946A