Machine forgetting method and device for deep learning model
By acquiring and aligning the representation data, iterating the target model based on the model alignment criterion, solving the problem of insufficient approximate forgetting performance in the prior art, achieving flexible and efficient machine forgetting, which is suitable for a variety of scenarios and reducing computational costs.
Patent Information
- Application Number
- CN202411361610.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-07
AI Technical Summary
In the prior art, it is difficult to maintain optimal forgetting performance, especially when supporting different data access scenarios and data granularity levels, it is difficult to achieve flexible and efficient machine forgetting.
By obtaining the first type of data that represents the data requested to be deleted and the second type of data that characterizes the additional introduced data, based on the criterion of model alignment, iterates the target model to make the performance of the second type of data in the model to be forgotten and the first type of data. Performance differences in the target model are iterated to less than the preset threshold, thereby determining the forgotten model.
It improves the flexibility, practicality and adaptability of machine forgetting tasks, can be applied to different machine forgetting scenarios, significantly reduces computing costs and time consumption, and maintains the model's performance against unrequested data deletion.
Smart Images

Figure CN119272050A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning technology, and in particular to a machine forgetting method and device for a deep learning model. Background Art
[0002] Machine learning models have become an indispensable tool across industries, with organizations and users widely leveraging their powerful capabilities. However, this widespread adoption has also raised significant concerns about user privacy. Some relevant regulations require that users’ explicit consent must be obtained before their data is used, and users have the right to withdraw this consent at any time. Therefore, there is an urgent need for algorithms that can remove specified data from the model, which requires the withdrawal of data previously used to train the model.
[0003] However, due to the black-box nature of machine learning models and the complexity of the relationship between data and model parameters, it is quite challenging to withdraw data that has been learned by the model. To this end, Machine Unlearning (MU) has gradually become a research hotspot, with the goal of removing specific forgotten data while ensuring that the accuracy of the data is retained.
[0004] An intuitive machine forgetting approach is to remove the forgotten data from the training set and retrain the model from scratch, which is often called a "retrained model" or "golden model". However, with the development of machine learning technology and the exponential growth of model size and data volume, this approach brings huge computational costs and is difficult to implement in practical applications.
[0005] At present, the research on machine forgetting is mainly divided into two categories: precise forgetting and approximate forgetting. Precise forgetting is mainly focused on improving the efficiency of retraining from scratch, while approximate forgetting achieves more efficient approximate forgetting through techniques such as influence functions and knowledge transfer. Despite significant progress, machine forgetting still faces challenges in terms of flexibility and effectiveness, especially how to maintain the best forgetting performance while supporting different data access scenarios and data granularity levels. Further research is needed. Summary of the invention
[0006] The present invention provides a machine forgetting method and device for a deep learning model, so as to solve the defect in the prior art that approximate forgetting is difficult to maintain optimal forgetting performance, and realize a machine forgetting method with more flexible application and good forgetting performance.
[0007] The present invention provides a machine forgetting method for a deep learning model, comprising: Acquire first-category data representing the data requested to be deleted and second-category data representing the additionally introduced data; When the performance difference between the performance of the second category of data in the to-be-forgotten model and the performance of the first category of data in the target model iteratively becomes less than a preset threshold, the forgotten model is determined according to the current target model, wherein the target model before iteration is initialized by the to-be-forgotten model.
[0008] According to a machine forgetting method for a deep learning model provided by the present invention, the step of obtaining first-category data representing the data requested to be deleted and second-category data representing the additionally introduced data specifically includes: If the data requested to be deleted is accessible, determining the data requested to be deleted as the first category of data; otherwise, randomly generating a group of data with the same label category as the data requested to be deleted as the first category of data; If the additionally introduced data is accessible, the additionally introduced data is determined as the second category of data; otherwise, a group of data having the same label category as the additionally introduced data is randomly generated as the second category of data; The label category of the additionally introduced data is different from the label category of the data requested to be deleted.
[0009] According to a machine forgetting method for a deep learning model provided by the present invention, when the performance difference between the second type of data in the to-be-forgotten model and the performance difference between the first type of data in the target model is iterated to be less than a preset threshold, before the step of determining a forgotten model according to the current target model, the method further includes: Determine a first distribution difference of the first type of data on the target model and a forgotten data model trained using the first type of data; Determine a second distribution difference of the second type of data between the to-be-forgotten model and the additional data model trained using the second type of data; The performance difference is determined based on the first distribution difference and the second distribution difference.
[0010] According to a machine forgetting method for a deep learning model provided by the present invention, when the performance difference between the second type of data in the to-be-forgotten model and the performance difference between the first type of data in the target model is iterated to be less than a preset threshold, before the step of determining a forgotten model according to the current target model, the method further includes: determining a third distribution difference of a training set in the second category of data on the target model and an additional data model trained using the second category of data; determining a fourth distribution difference of a test set in the second category of data between the target model and an additional data model trained using the second category of data; The preset threshold is determined according to an absolute value of a difference between the third distribution difference and the fourth distribution difference.
[0011] According to a machine forgetting method for a deep learning model provided by the present invention, the first distribution difference and the second distribution difference are determined according to KL divergence.
[0012] According to a machine forgetting method for a deep learning model provided by the present invention, the step of determining a forgotten model according to the current target model specifically includes: The current target model is trained using part of the data that is not requested to be deleted, and the trained model is used as the forgotten model.
[0013] The present invention also provides a machine forgetting device for a deep learning model, comprising: An acquisition module, used to acquire first-category data representing the data requested to be deleted and second-category data representing the additionally introduced data; A forgetting module is used to determine a forgotten model according to the current target model when the performance difference between the performance of the second type of data in the to-be-forgotten model and the performance of the first type of data in the target model is iterated to be less than a preset threshold, wherein the target model before iteration is initialized by the to-be-forgotten model.
[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a machine forgetting method for a deep learning model as described in any one of the above is implemented.
[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a machine forgetting method for a deep learning model as described in any one of the above.
[0016] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the machine forgetting methods for deep learning models described above.
[0017] The machine forgetting method and device for deep learning models provided by the present invention determine the accessibility of the requested deletion data and the additional introduced data, obtain the first category of data used to characterize the requested deletion data and the second category of data used to characterize the additional introduced data, and realize machine forgetting based on the model alignment criterion, thereby improving the flexibility, practicality and adaptability of the machine forgetting task, and can be applicable to different machine forgetting scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is one of the flow charts of the machine forgetting method for the deep learning model provided by the present invention; Figure 2 It is a schematic diagram of data and model division for the machine forgetting method for the deep learning model provided by the present invention; Figure 3 It is a schematic diagram of the model representation alignment process of the machine forgetting method for the deep learning model provided by the present invention; Figure 4 This is the second flow chart of the machine forgetting method for the deep learning model provided by the present invention; Figure 5 It is a structural schematic diagram of a machine forgetting device for a deep learning model provided by the present invention; Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] Combine the following Figures 1 to 4 The present invention introduces the machine forgetting method for deep learning models, such as Figure 1 As shown, including: Step 101, obtaining first-category data representing the data requested to be deleted and second-category data representing the additionally introduced data; Optionally, first-category data representing the data requested to be deleted and second-category data representing the additionally introduced data are acquired according to the accessibility of the data.
[0022] Accessibility refers to requests for deletion of data and whether additionally introduced data can be used for machine forgetting.
[0023] It should be noted that existing machine forgetting rarely considers whether data can be accessed. It is understandable that machine forgetting is required to delete some specified data used in deep learning model training. Therefore, the data requested to be deleted should be clear, so that in current research on machine forgetting, the situation where the data requested to be deleted cannot be obtained is usually not considered.
[0024] However, as the importance of user privacy increases, there are some situations where service providers are required to delete the user's original data immediately, that is, the known data requested to be deleted cannot be used to assist in machine forgetting. In this case, the data requested to be deleted is considered inaccessible.
[0025] In this case, a set of additionally generated first-category data is used to characterize the data requested to be deleted. It can be understood that although the data requested to be deleted cannot be used to assist machine forgetting, the characteristics such as the category of the data are still known, so a set of first-category data similar to the characteristics of the data requested to be deleted can be generated to characterize the data requested to be deleted.
[0026] Similarly, since the additionally introduced data is a set of data additionally obtained to assist in achieving forgetting of the data requested to be deleted, research on machine forgetting generally does not consider whether the additionally introduced data can be accessed.
[0027] However, for some fixed data sets, it may be relatively difficult to find additional data to assist forgetting because the amount of data required is too large or the data is relatively rare. In this case, the additional referenced data is considered inaccessible. Therefore, a similar method can be used to generate a second set of data to characterize the additionally introduced data.
[0028] Step 102, when the performance difference between the performance of the second category of data in the to-be-forgotten model and the performance of the first category of data in the target model iterates to be less than a preset threshold, determine the forgotten model according to the current target model, wherein the target model before iteration is initialized by the to-be-forgotten model.
[0029] In the machine forgetting task, from the perspective of knowledge, the basis for model performance alignment is based on the following criterion: the performance of the additionally introduced data on the to-be-forgotten model should be similar to the performance of the requested deleted data on the after-forgetting model.
[0030] When additional data is input into the model to be forgotten, the model will behave as if it has never seen the additional data because it has not learned the relevant knowledge about the additional data. As for the data requested to be deleted, the goal of machine forgetting is to make the model after forgetting behave similarly to the data that has not been requested to be deleted as if it has never seen the data.
[0031] Based on the above criteria, optionally, the to-be-forgotten model is used as the target model in the initial case, and the parameters of the target model are iterated until the performance difference between the performance of the second type of data in the to-be-forgotten model and the performance of the first type of data in the target model is iterated to be less than a preset threshold.
[0032] At this point, it is considered that the performance of the data requested to be deleted on the target model is aligned with the performance of the additionally introduced data on the to-be-forgotten model, that is, the to-be-forgotten model has realized the forgetting of the data requested to be deleted.
[0033] The present invention determines the accessibility of the data requested to be deleted and the additionally introduced data, obtains the first category of data used to characterize the data requested to be deleted and the second category of data used to characterize the additionally introduced data, and realizes machine forgetting based on the criterion of model alignment, thereby improving the flexibility, practicality and adaptability of the machine forgetting task, and can be applicable to different machine forgetting scenarios.
[0034] In the machine forgetting method for a deep learning model of the present invention, the step of obtaining the first type of data representing the data requested to be deleted and the second type of data representing the additionally introduced data specifically includes: If the data requested to be deleted is accessible, determining the data requested to be deleted as the first category of data; otherwise, randomly generating a group of data with the same label category as the data requested to be deleted as the first category of data; Specifically, before model alignment, it is first determined whether the data requested to be deleted is accessible. If the data requested to be deleted is accessible, the data requested to be deleted is directly used as the first type of data to assist in machine forgetting.
[0035] Otherwise, according to the label category of the data requested to be deleted, a group of data with the same label is randomly generated as the first category of data. Generate the requested deleted data and obtain the data set corresponding to the first type of data In the formula, is randomly generated data, The label of the data being deleted.
[0036] If the additionally introduced data is accessible, the additionally introduced data is determined as the second category of data; otherwise, a group of data having the same label category as the additionally introduced data is randomly generated as the second category of data; The label category of the additionally introduced data is different from the label category of the data requested to be deleted.
[0037] Similarly, it is determined whether the required additional data is accessible. If the additional data is accessible, the additional data is directly used as the second type of data to assist machine forgetting.
[0038] Otherwise, a group of data with the same label is randomly generated as the second type of data based on the label category of the additionally introduced data. It should be noted that the label category of the additionally introduced data needs to be different from the label category of the data requested to be deleted, so that the target model can learn the performance of unseen data during model alignment. That is, construct Generate a data set corresponding to the second type of data , where Label categories for additional data introduction.
[0039] For example, assuming that the original data set corresponding to the to-be-forgotten model is a 10-category data set, the original data set The classification labels are , assuming that the dataset corresponding to the requested data deletion is The label is , the label of the dataset corresponding to the additional introduced data is .
[0040] In the event that the data requested to be deleted is inaccessible, generate In this case, Characterize the first type of data. In the case where the additional introduced data is not accessible, Generate data of the form, at this time, Characterize the second type of data.
[0041] In summary, that is to say, this embodiment constructs randomly generated first-category data and / or second-category data to simulate the corresponding inaccessible data. This is because the model alignment criteria mentioned above are also applicable to the case where the data requested to be deleted and the additionally introduced data are randomly generated.
[0042] Specifically, the model to be forgotten will show randomness when processing randomly generated data. By aligning the performance of the requested deletion data on the target model with the performance of random data on the model to be forgotten, the target model can also show randomness to the requested deletion data. In the case where the requested deletion data is randomly generated, by aligning the performance of the requested deletion data with the additionally introduced data, the target model can show similar behavior to the additionally introduced data for the requested deletion data, causing the target model to lose the ability to process the requested forgotten data. Ultimately, the goal of the target model forgetting the information of the requested deletion data is achieved.
[0043] It should be emphasized that the first and second types of data obtained in the above manner can also be well applied to forgetting tasks of different granularities such as class-level forgetting, sub-class-level forgetting and sample-level forgetting.
[0044] In the machine forgetting method for a deep learning model of the present invention, when the performance difference between the second type of data in the to-be-forgotten model and the performance difference between the first type of data in the target model is iterated to be less than a preset threshold, before the step of determining the forgotten model according to the current target model, the method further includes: Determine a first distribution difference of the first type of data on the target model and a forgotten data model trained using the first type of data; Determine a second distribution difference of the second type of data between the to-be-forgotten model and the additional data model trained using the second type of data; The performance difference is determined based on the first distribution difference and the second distribution difference.
[0045] In this embodiment, if Figure 2 As shown in the figure, in the preparation stage of the machine forgetting task, the first type of data is trained in the same way as the to-be-forgotten model. and the second type of data Train to get the corresponding forgotten data model and additional data models .
[0046] On this basis, the model performance is aligned with the first type of data In the Forgotten Data Model and target model The first distribution difference on the second type of data is aligned In the additional data model and the to-be-forgotten model Upper (i.e. Figure 2 The second distribution difference on the original model in .
[0047] Optionally, the first distribution difference and the second distribution difference are determined by calculating KL divergence.
[0048] In a specific implementation, the KL divergence is calculated as follows: ; In the formula, and are the output distributions of the data input to the model. That is, the first type of data Input to or The output distribution of the second type of data Enter or The output distribution of .
[0049] For example, Input to for , Input to for ,for Similarly, the above method can be used to calculate and The two pairs of KL divergences on are the first distribution difference and the second distribution difference.
[0050] On this basis, by calculating the first distribution difference and the second distribution difference The absolute value of the difference between the two pairs of data sets can be used to compare the performance differences of the model, as follows: ; In the formula, and is the calculated KL divergence.
[0051] In the machine forgetting method for a deep learning model of the present invention, when the performance difference between the second type of data in the to-be-forgotten model and the performance difference between the first type of data in the target model is iterated to be less than a preset threshold, before the step of determining the forgotten model according to the current target model, the method further includes: determining a third distribution difference of a training set in the second category of data on the target model and an additional data model trained using the second category of data; determining a fourth distribution difference of a test set in the second category of data between the target model and an additional data model trained using the second category of data; The preset threshold is determined according to an absolute value of a difference between the third distribution difference and the fourth distribution difference.
[0052] In determining the performance differences Based on this, the target model is continuously adjusted through iteration Parameters such that Minimum, that is, the alignment of the model is achieved, and the target model completes the erasure of the requested data. The specific process is as follows Figure 3 shown.
[0053] In this case, the target model The update method can be expressed as: ; when When the value of is 0, the performance differences of the two pairs of data sets are most similar, but due to differences in data distribution and scale, the target model is optimized to make It is very difficult to set the value of 0. Therefore, in general, it is better to set When the value of is less than the preset threshold, it is considered The value of has been optimized to the minimum, where the preset threshold is usually an empirical value.
[0054] In this implementation, in order to determine a more accurate preset threshold value, thereby making the iteration result of the target model more accurate and obtaining a post-forgetting model with better forgetting effect, the preset threshold value is obtained by additionally introducing data quantization.
[0055] Specifically, determine the additional data to be introduced The training set in and test set , substitute it into the performance difference calculation formula, and calculate the absolute value of the difference between the third distribution difference and the fourth distribution difference in the same way as above : ; In the formula, express exist and The third distribution difference on express exist and The fourth distribution difference on .
[0056] Characterizes the target model For similar but unseen data sets, the performance difference is used to determine the preset threshold. The parameters are iterated to The value is less than and When the product of is, the target model is considered to be iterated to the optimal level. is a hyperparameter of the iterative process.
[0057] In the machine forgetting method for a deep learning model of the present invention, the step of determining a forgotten model according to the current target model specifically includes: The current target model is trained using part of the data that is not requested to be deleted, and the trained model is used as the forgotten model.
[0058] After the model performance is aligned, when the target model erases the information of the data requested to be deleted, it will also affect the information of the data not requested to be deleted in the target model. Therefore, it is necessary to repair the target model to ensure that the performance of the data not requested to be deleted is not affected.
[0059] The step of model repair is to use part of the data that has not been requested to be deleted to train the current target model, so that the target model can recover the processing ability of the data that has not been requested to be deleted. The current target model is the target model that the machine has forgotten after the iteration is completed.
[0060] Through the model repair step, the performance of the target model for data that is not requested to be deleted can be made similar to that of the original to-be-forgotten model, so the target model after performance repair is used as the finalized model after forgetting.
[0061] In a specific implementation, model repair is to use data labels as The current target model that has been iterated is trained with the part of data that has not been requested to be deleted, and finally the repaired target model is obtained.
[0062] On this basis, the complete process from data preparation, model alignment, and model repair to obtain the repaired target model as the forgotten model is as follows Figure 4 shown.
[0063] Furthermore, in order to test the performance of the machine forgetting method for the deep learning model provided by the present invention, a subclass level forgetting experiment was first performed on the CIFAR100 dataset, and the results were compared with the Bad T. baseline model. The comparison results are shown in Table 1 below: Table 1 ; In the table, Our(-,+) represents the second type of data Inaccessible, but first-class data Accessible; Our (-,-) means that both the first and second category data are inaccessible.
[0064] Specifically, the CIFAR100 dataset contains 100 subcategories, which are divided into 20 major categories, each of which consists of 5 subcategories. ResNet18 and ResNet34 models were used for original training to obtain the to-be-forgotten model, and the dataset was introduced. , the dataset contains all subcategories except the forgotten subcategories in the big category. The performance changes of can be used to evaluate the potential impact of the forgetting operation on other subcategories within the same large category.
[0065] When the model is in the dataset When the performance of the model on the training set is similar to that of the retrained model, the forgetting algorithm of the present invention can ensure that the model effectively forgets the specified subclass without affecting the performance of other subclasses in the large class. The experimental results show that the Bad T. method has a significant impact on the forgetting set performance of the model, which may lead to its The performance of the method of the present invention is usually only about 3% lower than that of the retrained model, showing a better effect. In addition, the present invention evaluates the time efficiency of the forgetting algorithm by introducing the time consumption ratio (TCR). TCR refers to the time ratio of the forgetting method proposed by the present invention to the Bad T. method. The experimental results show that the running time of the method of the present invention is about 70% of the time required by the Bad T. method, which significantly improves the efficiency of the forgetting process.
[0066] Furthermore, a class-level forgetting experiment was conducted on the VGGFace-100 dataset, and the results are shown in Table 2 below: Table 2 ; In Table 2, Our(+,+) indicates that both the first and second category data are accessible; Our(+,-) indicates that the second category data Accessible, but first-class data Not accessible.
[0067] VGGFace-100 contains 100 categories of facial data, get additional datasets It is easier, so use a real dataset To evaluate the effect of actual and simulated datasets on forgetting, four experiments were conducted under different accessibility conditions. The original model was obtained based on ResNet18 training. and When all are actual data sets, the performance of the forgetting model is very close to that of the retrained model. Although the forgetting effect is weakened under the other three conditions, the performance is still within an acceptable range. In the experiment of forgetting the second type of data, the accuracy of the retained set is always maintained at about 87%. At the same time, the JS distance is introduced as an auxiliary indicator, and the JS distance value of the forgetting model is maintained at about 0.01. The smaller JS distance indicates that the performance of the target model and the retrained model is close, indicating that the forgetting method of the present invention is effective.
[0068] Furthermore, a sample-level forgetting experiment was conducted on the CIFAR10 dataset, and the results are shown in Table 3 below: Table 3 ; The experimental results shown in Table 3 show that when the forgotten data set is not included in the retraining model, the accuracy of the forgotten class decreases significantly, and the degree of this decrease is related to the number of forgotten samples. The method of the present invention can still maintain the performance of the model on the forgotten class while removing the data. In addition, whether the forgetting operation is based on actual data or simulated data, the overall performance of the model is relatively stable, demonstrating the effectiveness and robustness of the method of the present invention.
[0069] The present invention uses a method of model performance alignment to enable the target model to effectively delete the information of the forgotten data set, ensuring that the model no longer retains knowledge related to the specific data after removing the data; at the same time, by repairing the target model, the present invention can maintain the performance of the model on data that is not requested to be deleted while removing the information of the forgotten data set, thereby avoiding a significant decline in the overall performance of the model; in addition, different types of data sets can be processed, whether structured data or unstructured data, and effective machine forgetting can be achieved under the framework of the method of the present invention; compared with the traditional method of training models from scratch, the present invention achieves a more efficient machine forgetting process through model performance alignment and model repair, saving computing resources and time costs.
[0070] The machine forgetting device for the deep learning model provided by the present invention is described below. The machine forgetting device for the deep learning model described below and the machine forgetting method for the deep learning model described above can refer to each other.
[0071] like Figure 5 As shown, the machine forgetting device for the deep learning model includes an acquisition module 501 and a forgetting module 502: An acquisition module 501 is used to acquire first-category data representing the data requested to be deleted and second-category data representing the additionally introduced data; Optionally, first-category data representing the data requested to be deleted and second-category data representing the additionally introduced data are acquired according to the accessibility of the data.
[0072] Accessibility refers to requests for deletion of data and whether additionally introduced data can be used for machine forgetting.
[0073] It should be noted that existing machine forgetting rarely considers whether data can be accessed. It is understandable that machine forgetting is required to delete some specified data used in deep learning model training. Therefore, the data requested to be deleted should be clear, so that in current research on machine forgetting, the situation where the data requested to be deleted cannot be obtained is usually not considered.
[0074] However, as the importance of user privacy increases, there are some situations where service providers are required to delete the user's original data immediately, that is, the known data requested to be deleted cannot be used to assist in machine forgetting. In this case, the data requested to be deleted is considered inaccessible.
[0075] In this case, a set of additionally generated first-category data is used to characterize the data requested to be deleted. It can be understood that although the data requested to be deleted cannot be used to assist machine forgetting, the characteristics such as the category of the data are still known, so a set of first-category data similar to the characteristics of the data requested to be deleted can be generated to characterize the data requested to be deleted.
[0076] Similarly, since the additionally introduced data is a set of data additionally obtained to assist in achieving forgetting of the data requested to be deleted, research on machine forgetting generally does not consider whether the additionally introduced data can be accessed.
[0077] However, for some fixed data sets, it may be relatively difficult to find additional data to assist forgetting because the amount of data required is too large or the data is relatively rare. In this case, the additional referenced data is considered inaccessible. Therefore, a similar method can be used to generate a second set of data to characterize the additionally introduced data.
[0078] The forgetting module 502 is used to determine the forgotten model according to the current target model when the performance difference between the performance of the second type of data in the to-be-forgotten model and the performance of the first type of data in the target model iteratively becomes less than a preset threshold, wherein the target model before iteration is initialized by the to-be-forgotten model.
[0079] In the machine forgetting task, from the perspective of knowledge, the basis for model performance alignment is based on the following criterion: the performance of the additionally introduced data on the to-be-forgotten model should be similar to the performance of the requested deleted data on the after-forgetting model.
[0080] When additional data is input into the model to be forgotten, the model will behave as if it has never seen the additional data because it has not learned the relevant knowledge about the additional data. As for the data requested to be deleted, the goal of machine forgetting is to make the model after forgetting behave similarly to the data that has not been requested to be deleted as if it has never seen the data.
[0081] Based on the above criteria, optionally, the to-be-forgotten model is used as the target model in the initial case, and the parameters of the target model are iterated until the performance difference between the performance of the second type of data in the to-be-forgotten model and the performance of the first type of data in the target model is iterated to be less than a preset threshold.
[0082] At this point, it is considered that the performance of the data requested to be deleted on the target model is aligned with the performance of the additionally introduced data on the to-be-forgotten model, that is, the to-be-forgotten model has realized the forgetting of the data requested to be deleted.
[0083] The present invention determines the accessibility of the data requested to be deleted and the additionally introduced data, obtains the first category of data used to characterize the data requested to be deleted and the second category of data used to characterize the additionally introduced data, and realizes machine forgetting based on the criterion of model alignment, thereby improving the flexibility, practicality and adaptability of the machine forgetting task, and can be applicable to different machine forgetting scenarios.
[0084] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute a machine forgetting method for a deep learning model, the method comprising: obtaining a first type of data representing the data requested to be deleted and a second type of data representing the additionally introduced data; when the performance difference between the performance of the second type of data in the model to be forgotten and the performance of the first type of data in the target model is iterated to be less than a preset threshold, determining a forgotten model according to the current target model, wherein the target model before iteration is initialized by the model to be forgotten.
[0085] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0086] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the machine forgetting method for the deep learning model provided by the above methods, and the method includes: obtaining a first type of data representing the data requested to be deleted and a second type of data representing the additionally introduced data; when the performance difference between the performance of the second type of data in the model to be forgotten and the performance of the first type of data in the target model is iterated to be less than a preset threshold, determining the forgotten model according to the current target model, wherein the target model before iteration is initialized by the model to be forgotten.
[0087] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the machine forgetting method for a deep learning model provided by the above-mentioned methods, the method comprising: obtaining a first type of data representing data requested to be deleted and a second type of data representing additionally introduced data; when the performance difference between the performance of the second type of data in the model to be forgotten and the performance of the first type of data in the target model is iterated to be less than a preset threshold, determining a model after forgetting according to the current target model, wherein the target model before iteration is initialized by the model to be forgotten.
[0088] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0089] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A machine forgetting method for a deep learning model, characterized in that: include: Acquire first-category data representing the data requested to be deleted and second-category data representing the additionally introduced data; When the performance difference between the performance of the second category of data in the to-be-forgotten model and the performance of the first category of data in the target model iteratively becomes less than a preset threshold, the forgotten model is determined according to the current target model, wherein the target model before iteration is initialized by the to-be-forgotten model.
2. The machine forgetting method for a deep learning model according to claim 1, characterized in that: The step of obtaining the first type of data representing the data requested to be deleted and the second type of data representing the additionally introduced data specifically includes: If the data requested to be deleted is accessible, determining the data requested to be deleted as the first category of data; otherwise, randomly generating a group of data with the same label category as the data requested to be deleted as the first category of data; If the additionally introduced data is accessible, the additionally introduced data is determined as the second category of data; otherwise, a group of data having the same label category as the additionally introduced data is randomly generated as the second category of data; The label category of the additionally introduced data is different from the label category of the data requested to be deleted.
3. The machine forgetting method for a deep learning model according to claim 1 or 2, characterized in that: Before the step of determining the forgotten model according to the current target model when the performance difference between the second type of data in the to-be-forgotten model and the performance difference between the first type of data in the target model is iterated to be less than a preset threshold, the method further includes: Determine a first distribution difference of the first type of data on the target model and a forgotten data model trained using the first type of data; Determine a second distribution difference of the second type of data between the to-be-forgotten model and the additional data model trained using the second type of data; The performance difference is determined based on the first distribution difference and the second distribution difference.
4. The machine forgetting method for a deep learning model according to claim 1 or 2, characterized in that: Before the step of determining the forgotten model according to the current target model when the performance difference between the second type of data in the to-be-forgotten model and the performance difference between the first type of data in the target model is iterated to be less than a preset threshold, the method further includes: determining a third distribution difference of a training set in the second category of data on the target model and an additional data model trained using the second category of data; determining a fourth distribution difference of a test set in the second category of data between the target model and an additional data model trained using the second category of data; The preset threshold is determined according to an absolute value of a difference between the third distribution difference and the fourth distribution difference.
5. The machine forgetting method for a deep learning model according to claim 3, characterized in that: The first distribution difference and the second distribution difference are determined according to KL divergence.
6. The machine forgetting method for a deep learning model according to claim 1 or 2, characterized in that: The step of determining the forgotten model according to the current target model specifically includes: The current target model is trained using part of the data that is not requested to be deleted, and the trained model is used as the forgotten model.
7. A machine forgetting device for a deep learning model, characterized in that: include: An acquisition module, used to acquire first-category data representing the data requested to be deleted and second-category data representing the additionally introduced data; A forgetting module is used to determine a forgotten model according to the current target model when the performance difference between the performance of the second type of data in the to-be-forgotten model and the performance of the first type of data in the target model is iterated to be less than a preset threshold, wherein the target model before iteration is initialized by the to-be-forgotten model.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the machine forgetting method for the deep learning model is implemented as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the machine forgetting method for a deep learning model is implemented as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the machine forgetting method for a deep learning model is implemented as described in any one of claims 1 to 6.
Citation Information
Cited By
Data forgetting method based on graph condensation under continuous learning framework
CN121479026A