A neural network selective forgetting learning method based on neuron importance

By evaluating the importance of neurons in a convolutional neural network model and generating parameter masks, combined with random label forgetting and dataset fine-tuning, efficient selective forgetting at the neuron granularity is achieved. This solves the problems of high computational resource consumption and neglect of correlation in existing methods, and improves forgetting efficiency and model performance recovery.

CN120012871BActive Publication Date: 2025-11-18ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510496214.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-11-18
Estimated Expiration
2045-04-21

AI Technical Summary

Technical Problem

Existing selective forgetting learning methods have insufficient research at the neuron granularity, neglect the correlation and synergistic effect between parameters, and consume too much computational resources, making it difficult to efficiently achieve selective forgetting of the model.

Method used

By evaluating the importance of neurons in a convolutional neural network model, generating parameter masks and performing a random label forgetting process, and combining this with fine-tuning using a retained dataset, significant neurons are selected and their parameters are updated, thus achieving selective forgetting.

Benefits of technology

While ensuring the forgetting effect, the parameter update scale is significantly reduced, the forgetting efficiency is improved, and the classification performance of the model on the original task is restored, ensuring that the impact of the forgetting process on the overall performance of the model is minimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120012871B_ABST
    Figure CN120012871B_ABST
Patent Text Reader

Abstract

The application discloses a kind of neural network selective forgetting learning method based on neuron importance, the method includes neuron importance evaluation, the generation of parameter mask, random label forgetting process and model fine-tuning, specifically: the memory value of model to forgetting sample is distributed to neuron, to evaluate the importance of neuron to forgetting dataset;And the neuron mask of memory value greater than a certain threshold is set to 1, otherwise mask is set to 0;Randomly set the label of sample in forgetting dataset, update the neuron parameter of mask 1 using stochastic gradient descent method;Finally, using the global fine-tuning of model parameter with reservation dataset, obtain the final forgetting model.The application proposes a kind of neuron granularity selective forgetting learning method for image classification task, by realizing feature hierarchical forgetting in convolutional neural network, ensure forgetting effect and original task performance, while reducing the gap between approximate forgetting and precise forgetting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of deep learning image classification and forgetting learning, and in particular to a neural network selective forgetting learning method based on the importance of neurons. Background Technology

[0002] With the rapid development of big data and artificial intelligence technologies, the amount of data used in model training is growing exponentially, highlighting data privacy and security issues. In many practical applications, according to privacy regulations such as the General Data Protection Regulation (GDPR), users have the right to request the deletion of their data and the revocation of authorization to use it. However, simply deleting target samples from the dataset is insufficient to achieve true data forgetting, because the model parameters may have already memorized the sensitive information of the samples (Feldman, V. (2019). Does learning require memorization? ashort tale about a long tail. Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing.). This memory effect is particularly pronounced in deep neural networks; even if training data is deleted, attackers may still recover the original data through model reverse engineering (Yang, Z., Chang, E., & Liang, Z. (2019). Adversarial Neural Network Inversion via Auxiliary Knowledge Alignment. ArXiv, abs / 1902.08552.). How to efficiently and effectively "forget" specific data from a model without affecting its performance has become an urgent problem to be solved, leading to the emergence of research on machine-unlearning.

[0003] Existing forgetting learning methods can be divided into two categories: exact forgetting and approximate forgetting. Exact forgetting, or retraining, involves removing the user-requested data samples from the original training dataset and then training a re-initialized model from scratch using the remaining dataset. However, exact learning methods based on retraining require significant computational resources, especially challenging for large-scale models (such as diffusion-based generative models). Approximate forgetting aims to update the model parameters to remove the influence of the forgotten dataset, making the updated forgotten model statistically indistinguishable from the untrained model. Common approximate forgetting methods include: fine-tuning the model using the remaining dataset (Warnecke, A., Pirch, L., Wressnegger, C., & Rieck, K. (2021). Machine Unlearning of Features and Labels. ArXiv, abs / 2108.11577.). Compared to retraining, fine-tuning requires only a few training epochs to achieve the desired effect, significantly reducing computational overhead; randomly perturbing the sample labels in the forgotten dataset and then fine-tuning the model using that dataset (Golatkar, A., Achille, A., & Soatto, S. (2019). Eternal Sunshine of the Spotless Net: Selective Forgetting in Deep Networks. 2020 IEEE / CVF Conferenceon Computer Vision and Pattern Recognition (CVPR), 9301-9309.); and methods based on influence functions (Koh, P., & Liang, P. (2017). Understanding Black-box Predictions via Influence Functions. International Conference on...). Machine Learning removes the influence of specific data points from the model parameters by calculating the contribution of data points to the model parameters and adjusting the parameters in reverse (Guo, C., Goldstein, T., Hannun, AY, & Maaten, LV (2019). Certified Data Removal from Machine Learning Models. International Conference on Machine Learning). It also adds normally distributed noise to the overall model parameters (Golatkar, A., Achille, A).Chen, M., Gao, W., Liu, G., Peng, K., & Wang, C. (2023). This approach weakens the model's dependence on specific data by randomly perturbing parameters; it also makes the model's predictions on forgotten datasets more random by adjusting the decision boundary of the classification model (Chen, M., Gao, W., Liu, G., Peng, K., & Wang, C. (2023). Boundary Unlearning: Rapid Forgetting of Deep Networks via Shifting the Decision Boundary. 2023 IEEE / CVF Conference on Computer Vision and Pattern Recognition (CVPR), 7766-7775.); and it maximizes the model's loss based on gradient ascent on forgotten datasets, thereby weakening the model's memory of forgotten datasets (Thudi, A., Deza, G., Chandrasekaran, V., & Papernot, N. (2021). Unrolling SGD: Understanding Factors Influencing Machine Unlearning. 2022 IEEE 7th European Symposium on Security and Privacy (EuroS&P), 303-319. The forgetting learning methods described above require updating all parameters of the model. Calculating the Hessian matrix and its inverse, as well as the Fisher information matrix, for all parameters consumes significant computational and storage resources.

[0004] The "pruning before forgetting" forgetting method (Jia, J., Liu, J., Ram, P., Yao, Y., Liu, G., Liu, Y., Sharma, P., & Liu, S. (2023). Model Sparsity Can Simplify MachineUnlearning. Neural Information Processing Systems.) points out that model sparsity helps with forgetting and incorporates model sparsity as a regularization term in the loss function into the forgetting process, but pruning can destroy the model structure. "Pruning before forgetting" provides a framework for selective forgetting, which involves selectively updating parameters that are significant to samples in the forgotten dataset. The key is selecting these significant parameters. Common methods for evaluating the significance of parameters on forgotten datasets include: calculating the Fisher information matrix and the retained dataset separately on the forgotten and retained datasets, selecting parameters that are sensitive to change in one dataset and insensitive to change in the other (Liu, Y., Sun, C., Wu, Y., & Zhou, A. (2023). Unlearning with Fisher Masking. ArXiv, abs / 2310.05331.); generating a saliency map of parameters based on the gradient of model parameters for a specific loss function on the forgotten dataset (Fan, C., Liu, J., Zhang, Y., Wei, D., Wong, E., & Liu, S. (2023). SalUn: Empowering Machine Unlearning via Gradient-based Weight Saliency in Both Image Classification and Generation. ArXiv, abs / 2310.12508.), and updating the significant parameters therein; and using connection sensitivity analysis to evaluate the importance of a parameter by setting the change in the loss function to 0 on the forgotten dataset (Wu, J., & Harandi, M. (2024). Scissorhands: Scrub Data Influence via Connection Sensitivity in Networks. European Conference on Computer Vision. The above method for selecting saliency parameters only considers a single parameter and does not consider the correlation between parameters.Therefore, existing selective forgetting learning methods based on parameter saliency have the following limitations: they mainly focus on the saliency of a single parameter on forgotten data, neglecting the correlation and synergistic effect between parameters; they lack in-depth analysis of the relationship between neuronal hierarchical feature responses and forgotten data; and they are insufficient in terms of interpretability. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the present invention aims to fill the gaps in research on selective forgetting learning at the neuron granularity level, and to provide a neural network selective forgetting learning method based on neuron importance, which screens important neurons and updates significant parameters to meet the requirements of forgetting learning.

[0006] The objective of this invention is achieved through the following technical solution:

[0007] The first aspect of the present invention: a neural network selective forgetting learning method based on neuron importance, comprising the following steps:

[0008] (1) Determine the forgotten dataset: In the random forgetting scenario, a portion of the training data is randomly selected as the forgotten dataset; in the categorical forgetting scenario, a certain category of data is randomly selected as the forgotten dataset; the remaining data is used as the retained dataset.

[0009] (2) Assess the importance of neurons: Assign the memory values ​​of samples to neurons in the convolutional neural network (CNN) model to assess the importance of neurons to the dataset; the samples are forgotten samples, and the dataset is a forgotten dataset, wherein the forgotten dataset consists of a certain number of forgotten samples;

[0010] (3) Generate parameter mask: Set the mask of neurons with memory values ​​greater than a certain threshold to 1, and the mask of neurons with memory values ​​less than a certain threshold to 0;

[0011] (4) Random label forgetting process: Randomly set the labels of the samples in the forgetting dataset, and use the stochastic gradient descent method to update the parameters with a mask of 1;

[0012] (5) Fine-tuning the CNN model: Fine-tuning the entire model using the retained dataset to obtain the final forgetting model;

[0013] (6) Evaluate the forgetting effect: Test the accuracy of the model after forgetting on the forgotten dataset and the accuracy of member inference attack to evaluate the effect of the forgetting method; test the accuracy of the model after forgetting on the retained dataset and the test dataset to evaluate the performance and generalization of the model after forgetting on the original task.

[0014] Furthermore, step (1) includes the following two forgetting scenarios:

[0015] (1.1) Random forgetting scenario: complete training dataset ,include There are 10 data sample points, among which For image, Labels; In the random forgetting scenario, a subset of data samples is randomly selected from the complete dataset based on the user's actual forgetting request to serve as the forgetting dataset. The remaining part is the reserved dataset. ;

[0016] (1.2) Category forgetting scenario: The complete training dataset includes Images of each category, i.e. In the category forgetting scenario, all categories in the training dataset will be assigned to the user as the category to be forgotten. The data samples are divided into forgetting datasets. The remaining categories of data are classified as reserved datasets. .

[0017] Furthermore, the specific computational steps for assessing the importance of neurons are as follows:

[0018] (2.1) Calculate the memory value of the entire CNN model for all samples in the forgotten dataset, and take the average as the memory value of the entire model for the forgotten dataset. The specific calculation formula is as follows:

[0019]

[0020] in: This is an indicator function that takes the value 1 when the condition within the parentheses is true, and 0 otherwise. This indicates the algorithm used to train the model. Indicates using dataset The trained model, Indicates using dataset The trained model;

[0021] (2.2) For each neuron in the model Ablation occurs one by one, and the ablation of a specific neuron is calculated. The memory value of the forgotten dataset in the post-incomplete model structure is calculated using the following formula:

[0022]

[0023] in: Representation Model Ablation of a neuron The incomplete model afterwards Representation Model Ablation of a neuron The incomplete model afterwards;

[0024] (2.3) Subtract the calculation result of step (2.1) from the calculation result of step (2.2) to obtain the neuron. Forgotten dataset The memory value, i.e., the neuron importance score. for:

[0025]

[0026] Among them, due to the calculation formulas in steps (2.1) and (2.2), the model and incomplete models Forgotten dataset The memory values ​​are approximately equal, and the difference between the two is close to 0, so the corresponding two terms can be omitted.

[0027] Furthermore, the specific process of generating the parameter mask in step (3) is as follows: [The text abruptly ends here, so the translation stops.] one neuron By importance score Sort in descending order; based on actual needs, Location-based neuron importance score as a threshold The importance score is less than The neuron mask value is set to 0, and the mask values ​​of the other neurons are set to 1, i.e., neuron mask. for:

[0028]

[0029] in For binary vectors, dimension With the number of neurons Consistent.

[0030] Furthermore, step (4) includes the following sub-steps:

[0031] (4.1) Randomized labels: Assuming a forgotten dataset , for one of them Random labels are generated for each sample. Construct a new dataset :

[0032]

[0033] in The number of categories in the dataset;

[0034] (4.2) Update some parameters: in the dataset after randomization of labels Above, combined with the mask vector Update model parameters using stochastic gradient descent algorithm Specifically, only the parameters corresponding to neurons with a mask value of 1 are updated, and the updated model parameters... Represented as:

[0035]

[0036] in This represents element-wise multiplication of vectors. This represents the parameter update amount; the optimization objective during the parameter update process is to minimize the loss function. :

[0037]

[0038] To enhance the forgetting effect, a feature targeting the original forgotten data is introduced into the loss function. The regular term.

[0039] Furthermore, step (5) specifically involves: using the reserved dataset. The model updated in step (4) Perform a global update to obtain the final forgetting model parameters. By optimizing the loss function The model parameters are updated using the stochastic gradient descent algorithm, thereby ensuring that the model retains the dataset. Performance remains unaffected, while also enabling the processing of forgotten datasets. Effective forgetting.

[0040] Furthermore, step (6) includes the following sub-steps:

[0041] (6.1) Accuracy test: The model parameters updated in step (5) are tested. In the forgotten dataset Preserve dataset and test dataset Accuracy tests were conducted to evaluate the model's forgetting effect, performance on the original task, and generalization ability; among which the model In the dataset The accuracy rate is:

[0042]

[0043] Use according to actual needs , , replace That's all; among them It is a model pair The prediction results;

[0044] (6.2) Membership Inference Attack Test: Train a binary classification membership inference attack model Used to distinguish data samples Does it belong to the target model? The training dataset; from the test dataset Select quantity The samples are used as the non-member test set , computational attack model exist and Attack success rate (ASR):

[0045]

[0046] The first summation represents the prediction. The sum of the second term represents the number of members, and the summation represents the prediction. For non-members, ASR is close to 50% effective in reducing forgetting.

[0047] A second aspect of the present invention: a neural network selective forgetting learning device based on neuron importance, comprising the following modules:

[0048] The module for determining the forgotten dataset: In the case of random forgetting, a portion of the training data is randomly selected as the forgotten dataset; in the case of categorical forgetting, a certain category of data is randomly selected as the forgotten dataset; the remaining data is used as the retained dataset.

[0049] The module for evaluating neuron importance assigns the memory values ​​of forgotten samples to neurons in the convolutional neural network model to assess the importance of neurons to the forgotten dataset; the module for generating parameter masks sets the mask of neurons with memory values ​​greater than a certain threshold to 1, and the mask of neurons with memory values ​​less than a certain threshold to 0.

[0050] Random Label Forgetting Module: Randomly assigns labels to samples in the forgetting dataset and updates the parameters with a mask of 1 using the stochastic gradient descent method;

[0051] Fine-tuning the CNN model module: Fine-tuning the entire model using the retained dataset to obtain the final forgetting model;

[0052] Evaluation of Forgetting Effect Module: Test the accuracy of the model after forgetting on the forgotten dataset and the accuracy of member inference attack to evaluate the effectiveness of the forgetting method; test the accuracy of the model after forgetting on the retained dataset and the test dataset to evaluate the performance and generalization of the model after forgetting on the original task.

[0053] The beneficial effects of this invention are as follows: In image classification tasks, by comparing the effects of convolutional neural network models on forgotten datasets before and after the ablation of a single neuron, The method effectively identifies neurons that significantly contribute to the forgetting process by analyzing changes in classification accuracy, thereby enabling precise updates of key parameters. This approach significantly reduces the scale of parameter updates and improves forgetting efficiency while maintaining the effectiveness of the forgetting process. Furthermore, by preserving the dataset... Fine-tuning with a small number of epochs can effectively restore the model's classification performance on the original task, ensuring that the impact of the forgetting process on the overall performance of the model is minimized. Attached Figure Description

[0054] Figure 1 This is a schematic diagram illustrating the application of a neural network selective forgetting learning method based on neuron importance provided by the present invention;

[0055] Figure 2 This is a flowchart illustrating a neural network selective forgetting learning method based on neuron importance provided by the present invention. Detailed Implementation

[0056] The present invention will now be further described with reference to the accompanying drawings.

[0057] The core technology of this invention is to allocate the memory value of forgotten data samples in the convolutional neural network model to neurons. By comparing the change in the accuracy of the model in predicting samples in the forgotten dataset before and after the ablation of a single neuron, the importance of the neuron to the forgotten dataset is evaluated, thereby achieving selective forgetting at the neuron granularity.

[0058] like Figure 1 As shown, this invention presents an application of the neural network selective forgetting learning method based on neuron importance in deep learning image classification tasks, particularly for Convolutional Neural Networks (CNNs). The framework mainly includes the following parts: dividing the data requested for deletion by the user into a forgetting dataset. and from the original training dataset Remove from The remaining data constitutes the reserved dataset. A random-labeled forgetting dataset is constructed by randomly perturbing the labels of samples in the forgetting dataset. Based on the ablation analysis of individual neurons, the original model was... Forgotten dataset The memory values ​​are allocated to neurons and ranked according to importance scores. (i.e., memory value) Neurons are sorted, and neurons with significant memory values ​​are masked with 1, while the masks of the remaining neurons are set to 0; in the dataset Fine-tuning the significance parameter while introducing it into the forgetting dataset The loss function regularization term is applied to enhance forgetting; further, in the retained dataset... The model is then globally fine-tuned to restore its performance on the original task; finally, the model is optimized by preserving the dataset. Test dataset Forgotten datasets Accuracy testing on, and for Member reasoning attack tests were conducted to evaluate the forgetting effect of the proposed method and the performance of the model after forgetting.

[0059] More specifically, such as Figure 2 As shown, the neural network selective forgetting learning method based on neuron importance proposed in this invention includes the following steps:

[0060] (1) Determine the forgetting dataset: In the case of random forgetting, a portion of the training data is randomly selected as the forgetting dataset; in the case of categorical forgetting, a certain category of data is randomly selected as the forgetting dataset; the remaining data is used as the retention dataset; specifically, the following sub-steps are included:

[0061] (1.1) Random forgetting scenario: Assuming a complete training dataset include There are 10 data sample points, among which For image data, For the corresponding labels. In random forgetting scenarios, based on the user's actual forgetting request, from the complete dataset A forgotten dataset is constructed by randomly selecting a portion of the data samples. The remaining data sample points constitute the retained dataset. Forgotten dataset and preserve datasets The division reflects users' specific needs for data deletion, while retaining the dataset. This will be used for subsequent fine-tuning of the model to restore the performance of the forgotten model on the original task.

[0062] (1.2) Category forgetting scenario: Assume the complete training dataset includes Image data of each category, i.e. In the category-based forgetting scenario, the user specifies the category to be forgotten. All labels in the training dataset are The data samples are divided into forgetting datasets. The remaining data samples are classified as reserved datasets. Taking facial recognition as an example, the training dataset contains photos of multiple users, each corresponding to an independent category. When a user requests to delete all photos associated with them, these photos belong to the same category.

[0063] (2) Assess neuron importance: Assign the model's memory values ​​of forgotten samples to neurons to assess the importance of neurons to the forgotten dataset; this includes the following sub-steps:

[0064] (2.1) Calculate the memory value of the entire model for all samples in the forgotten dataset, and take the mean as the memory value of the entire model for the forgotten dataset. The specific calculation formula is as follows:

[0065]

[0066] in This is an indicator function that takes the value 1 when the condition within the parentheses is true, and 0 otherwise. This indicates the algorithm used to train the model. Indicates using dataset The trained model, Indicates using dataset The trained model. The calculation formula refers to the method proposed by Feldman et al. for calculating the memory value of a data sample point by the model (Feldman, V., & Zhang, C. (2020). What neural networks memorize and why: Discovering the long tail via influence estimation. Advances in Neural Information Processing Systems, 33, 2881-2891.), and takes the average of the memory values ​​of the model for all sample points in the forgotten dataset as the model's memory value for the entire forgotten dataset.

[0067] (2.2) For each neuron in the model Ablation occurs one by one, and the ablation of a specific neuron is calculated. The memory value of the forgotten dataset in the post-incomplete model structure is calculated using the following formula:

[0068]

[0069] in Representation Model Ablation of a neuron The incomplete model afterwards Representation Model Ablation of a neuron The incomplete model afterwards.

[0070] Specifically, during model inference, for a specific neuron The ablation operation suppresses the neuron's function by setting the output feature map generated during forward propagation to zero. This operation does not modify the neuron's weight parameters. and bias parameters It also does not involve pruning or adjusting the network structure.

[0071] (2.3) Subtract the calculation result of step (2.1) from the calculation result of step (2.2) to obtain the neuron. Forgotten dataset The memory value, i.e., the importance score. for:

[0072]

[0073] In the forgetting learning scenario, due to the model Compared with using a preserved dataset Retrained model Because they are equivalent, this method simplifies the result of subtracting the calculation formulas in step (2.1) and step (2.2). Specifically, the model in step (2.1) Forgotten dataset The prediction accuracy is related to the incomplete model in step (2.2). right The prediction accuracy of the two is approximately equal, and the difference between the two approaches 0. Based on this approximation, this method omits these two terms when calculating the neuron importance score, thus obtaining a simplified calculation formula.

[0074] (3) Generate parameter mask: Set the mask of neurons with memory values ​​greater than a specific threshold to 1, and the mask of neurons with memory values ​​less than a specific threshold to 0; the specific threshold is a relative threshold. If the top 20% of significant neurons are selected, the neurons are arranged in descending order of memory values, and the memory value at the 20th percentile is taken as the threshold. The specific process of generating parameter mask is as follows: Based on the neurons in the forgotten dataset Memory saliency score In the model one neuron Sort in descending order; select neurons according to the preset ratio. (For example ), will the first The percentile neuron importance score as a threshold For each neuron If its memory saliency score If the value is 1, then set the corresponding mask value to 1; otherwise, set it to 0, i.e., the neuron mask. for:

[0075]

[0076] For binary vectors, dimension With the number of neurons Consistent, where each element corresponds to the mask state of a neuron.

[0077] (4) Random label forgetting process: Randomly set the labels of samples in the forgetting dataset, and update the parameters of the mask with a value of 1 using the stochastic gradient descent method; specifically including the following sub-steps:

[0078] (4.1) Randomized labels: Assuming a forgotten dataset , for one of them Random labels are generated for each sample. Construct a new dataset :

[0079]

[0080] in This represents the number of categories in the dataset. It's important to note that in the category forgetting scenario, for all samples in the target forgotten category, their labels will be randomly reassigned to any of the remaining categories, rather than being uniformly assigned to a specific category.

[0081] (4.2) Update some parameters: in the dataset after randomization of labels Above, combined with the mask vector The model parameters are updated using the Stochastic Gradient Descent (SGD) algorithm. Specifically, only the parameters corresponding to neurons with a mask value of 1 are updated, and the updated model parameters... Represented as:

[0082]

[0083] in This represents element-wise multiplication of vectors. This represents the parameter update amount; the optimization objective during the parameter update process is to minimize the loss function. :

[0084]

[0085] Among them, the dataset based on minimizing random perturbation labels The loss function on the original forgotten dataset is used to maximize the loss function on the original forgotten dataset. The loss function has a consistent basis for the optimization objective. To enhance the forgetting effect, this method introduces a feature into the loss function targeting the original forgotten data. The regular term.

[0086] In image classification tasks, especially multi-class classification problems, the cross-entropy loss function is widely used because it effectively measures the difference between the classification model's output and the true labels. Specifically, this method uses the cross-entropy loss function in the original CNN model. For forgotten datasets Cross-entropy loss function :

[0087]

[0088] in For the number of categories, Represents the first in the dataset The first one-hot encoded vector of the true label of each sample. There are components, where the sample belongs to the category. The value is 1 if it is true, and 0 otherwise. Representation Model For the The predicted number of samples The probability values ​​of each category satisfy the following conditions: and In the dataset after random perturbation labels The calculation form of the cross-entropy loss function remains unchanged; only the forgotten dataset needs to be changed. Replace with That's all.

[0089] (5) Fine-tuning the model: Fine-tune the entire model using the retained dataset to obtain the final forgetting model; the specific process is as follows: use the retained dataset The model updated in step (4) Perform a global update to obtain the final forgetting model parameters. By optimizing the loss function The model parameters are updated using the stochastic gradient descent algorithm, thereby ensuring that the model retains the dataset. Performance remains unaffected, while also enabling the processing of forgotten datasets. Effective forgetting.

[0090] In the fine-tuning phase using the retained dataset, the cross-entropy loss function is still used, but the dataset in the cross-entropy loss function calculation formula is replaced with the retained dataset. That's all.

[0091] (6) Evaluate the forgetting effect: Test the accuracy of the model after forgetting on the forgotten dataset and the accuracy of member inference attack to evaluate the effect of the forgetting method; test the accuracy of the model after forgetting on the retained dataset and the test dataset to evaluate the performance and generalization of the model after forgetting on the original task; specifically including the following sub-steps:

[0092] (6.1) Accuracy test: The model parameters updated in step (5) are tested. In the forgotten dataset Preserve dataset and test dataset Accuracy tests were conducted to evaluate the model's forgetting effect, performance on the original task, and generalization ability; among which the model In the dataset The accuracy rate is:

[0093]

[0094] Use according to actual needs , , replace That's all; among them It is a model pair The prediction results;

[0095] (6.2) Membership Inference Attack Test: Train a binary classification membership inference attack model This model is used to distinguish a given sample. Does it belong to the target model? The training dataset outputs predictions as binary labels. , respectively, indicate whether a given sample belongs to or does not belong to the training dataset; from the test dataset Select quantity The samples are used as the non-member test set , computational attack model exist and Attack success rate (ASR):

[0096]

[0097] The first summation represents the prediction. The sum of the second term represents the number of members, and the summation represents the prediction. For non-members, ASR is close to 50% effective in reducing forgetting.

[0098] This invention also proposes a neural network selective forgetting learning device based on neuron importance, comprising the following modules:

[0099] The module for determining the forgotten dataset: In the case of random forgetting, a portion of the training data is randomly selected as the forgotten dataset; in the case of categorical forgetting, a certain category of data is randomly selected as the forgotten dataset; the remaining data is used as the retained dataset.

[0100] The module for evaluating neuron importance assigns the memory values ​​of forgotten samples to neurons in the convolutional neural network model to assess the importance of neurons to the forgotten dataset.

[0101] Parameter mask generation module: sets the mask of neurons with memory values ​​greater than a specific threshold to 1, and the mask of neurons with memory values ​​less than a specific threshold to 0;

[0102] Random Label Forgetting Module: Randomly assigns labels to samples in the forgetting dataset and updates the parameters with a mask of 1 using the stochastic gradient descent method;

[0103] Fine-tuning the CNN model module: Fine-tuning the entire model using the retained dataset to obtain the final forgetting model;

[0104] Evaluation of Forgetting Effect Module: Test the accuracy of the model after forgetting on the forgotten dataset and the accuracy of member inference attack to evaluate the effectiveness of the forgetting method; test the accuracy of the model after forgetting on the retained dataset and the test dataset to evaluate the performance and generalization of the model after forgetting on the original task.

[0105] In summary, this invention addresses the shortcomings of current research on selective forgetting learning at the neuron granularity level by proposing a neural network selective forgetting learning method based on neuron importance. Furthermore, this invention addresses the selective forgetting requirements of convolutional neural network models in image classification tasks by proposing a significant evaluation method based on the change in prediction accuracy before and after ablation of a single neuron. This is achieved by comparing the effects of convolutional neural network models on forgotten datasets before and after the ablation of a single neuron. The invention analyzes the changes in classification accuracy, quantifies the importance of each neuron to the forgotten data, and then selects neuron parameters with significant memory values ​​to achieve selective forgetting at the neuron level. This invention innovatively constructs a multi-stage, multi-method fusion forgetting learning framework: the first stage employs a collaborative optimization strategy of random label perturbation and regularization constraints to eliminate the influence of samples to be forgotten at the neuron level; the second stage... (The sentence is incomplete and requires further context to translate accurately.) Global fine-tuning is performed on the model, requiring only a few training epochs to restore its performance. This method effectively achieves the forgetting of target samples while maintaining the model's performance on the original classification task, providing a new solution for controllable forgetting in deep neural networks.

[0106] The embodiments described in this specification are merely examples of implementations of the inventive concept. The scope of protection of this invention should not be considered as limited to the specific forms stated in the embodiments. The scope of protection of this invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.

Claims

1. A neural network selective forgetting learning method based on neuron importance, characterized in that, Includes the following steps: (1) Determine the forgotten dataset: In the random forgetting scenario, a portion of the training data is randomly selected as the forgotten dataset; in the categorical forgetting scenario, a certain category of data is randomly selected as the forgotten dataset; the remaining data is used as the retained dataset. Specifically: (1.1) Random forgetting scenario: complete training dataset Includes N data sample points, where x i For the image, y i Labels; In the random forgetting scenario, a subset of data samples is randomly selected from the complete dataset based on the user's actual forgetting request to serve as the forgetting dataset. The remaining part is the reserved dataset D. r =D\D f ; (1.2) Category Forgetting Scenario: The complete training dataset includes images of g categories, i.e., y i ∈{c1,c2,c3,…,c g In the category forgetting scenario, all categories in the training dataset are assigned to the user as the forgotten category c. j The data samples are divided into the forgetting dataset D. f ={(x i ,y i )∈D|y i =c j The remaining categories of data are divided into a reserved dataset D. r ; (2) Assess neuron importance: Assign the memory values ​​of forgotten samples to neurons in the convolutional neural network (CNN) model to assess the importance of neurons to the forgotten dataset; where the forgotten dataset consists of a certain number of forgotten samples. (3) Generate parameter mask: Set the mask of neurons whose memory value is greater than a certain threshold to 1, and otherwise set the mask to 0; (4) Random label forgetting process: Randomly set the labels of the samples in the forgetting dataset, and use the stochastic gradient descent method to update the parameters with a mask of 1; (5) Fine-tuning the CNN model: Fine-tune the entire CNN model using the retained dataset to obtain the final forgetting model; (6) Evaluate the forgetting effect: Test the accuracy of the model after forgetting on the forgotten dataset and the accuracy of member inference attack to evaluate the effect of the forgetting method; test the accuracy of the model after forgetting on the retained dataset and the test dataset to evaluate the performance and generalization of the model after forgetting on the original task.

2. The neural network selective forgetting learning method based on neuron importance according to claim 1, characterized in that, The specific steps to assess the importance of neurons in a forgotten dataset are as follows: (2.1) Calculate the memory value of the entire CNN model for all samples in the forgotten dataset, and take the average value as the memory value of the entire model for the forgotten dataset. The specific calculation formula is as follows: Where: I[·] represents an indicator function, which takes the value 1 when the condition inside the parentheses is true, and takes the value 0 otherwise. The algorithm used to train the model is represented by h, where h represents the model trained on dataset D, and h′ represents the model trained on dataset D\D. f The trained model; (2.2) For each neuron f in the CNN model k Ablation occurs one by one, and the ablation rate f of a given neuron is calculated. k The memory value of the forgotten dataset in the post-incomplete model structure is calculated using the following formula: Where: h\f k The model h represents the ablation of one neuron f. k The incomplete model after h′\f k The model h′ represents the ablation of one neuron f. k The incomplete model afterwards; (2.3) Subtract the result of step (2.1) from the result of step (2.2) to obtain the neuron f. k For the forgotten dataset D f The memory value, i.e., the neuron importance score S(f) k D f )for: Among them, due to the calculation formulas in steps (2.1) and (2.2), the model h′ and the incomplete model h′\f k For the forgotten dataset D f The memory values ​​are equal, and the difference between the two is 0.

3. The neural network selective forgetting learning method based on neuron importance according to claim 1, characterized in that, The specific process of generating the parameter mask in step (3) is as follows: The m neurons {f1, f2, f3, ..., f...} in the model are... m }According to importance score S(f k D f Sort in descending order; based on actual needs, use the neuron importance score at position p% as the threshold t, set the mask value of neurons with importance scores less than t to 0, and set the mask value of the remaining neurons to 1, i.e., neuron mask m. s for: Where m s ∈{0,1} m It is a binary vector, and its dimension m is the same as the number of neurons m.

4. The neural network selective forgetting learning method based on neuron importance according to claim 1, characterized in that, Step (4) includes the following sub-steps: (4.1) Randomized labels: Assuming a forgotten dataset Generate random labels y′ for n samples. i Construct a new dataset D′ f : Where g is the number of categories in the dataset; (4.2) Update some parameters: In the dataset D′ after randomization of labels f Above, combined with the mask vector m s The model parameters θ are updated using the stochastic gradient descent algorithm; specifically, only the parameters corresponding to neurons with a mask value of 1 are updated, and the updated model parameters θ′ are expressed as: θ′=m s ⊙(Δθ+θ)+(1 m -m s )⊙θ Where ⊙ denotes element-wise multiplication of vectors, and Δθ represents the parameter update amount; the optimization objective in the parameter update process is to minimize the loss function. To enhance the forgetting effect, a feature specific to the original forgotten data D is introduced into the loss function. f The regular term.

5. The neural network selective forgetting learning method based on neuron importance according to claim 1, characterized in that, Step (5) specifically involves: using the reserved dataset D r Perform a global update on the model θ′ updated in step (4) to obtain the final forgetting model parameters θ. u By optimizing the loss function The model parameters are updated using the stochastic gradient descent algorithm, thereby ensuring that the model maintains the data D. r Performance on the D dataset remains unaffected, while also enabling performance on the forgotten dataset D. f Effective forgetting.

6. The neural network selective forgetting learning method based on neuron importance according to claim 1, characterized in that, Step (6) includes the following sub-steps: (6.1) Accuracy test: The model parameters θ updated in step (5) are tested. u In the forgotten dataset D f Preserve dataset D r and test dataset D t Accuracy tests were conducted to evaluate the model's forgetting effect, original task performance, and generalization ability. Where model θ u In dataset D z The accuracy rate is: Use D according to actual needs. f D r D t Replace D z That is, f(x) i ;θ u ) is the model for x i The prediction results; (6.2) Membership Inference Attack Test: Train a binary classification membership inference attack model Used to distinguish data samples x i Does it belong to the target model θ? u The training dataset; From test dataset D t Select the quantity as |D f | samples as non-member test set D non_member , computational attack model In D f and D non_member Attack success rate (ASR): The first summation represents the prediction D. f The sum of the second term represents the number of members, and it indicates the prediction of D. non_member For non-members, ASR is close to 50% and has a good forgetting effect.

7. A neural network selective forgetting learning device based on neuron importance, characterized in that, Includes the following modules: The module for determining the forgotten dataset: In the case of random forgetting, a portion of the training data is randomly selected as the forgotten dataset; in the case of categorical forgetting, a certain category of data is randomly selected as the forgotten dataset; the remaining data is used as the retained dataset. Specifically: Random forgetting scenario: complete training dataset Includes N data sample points, where x i For the image, y i Labels; In the random forgetting scenario, a subset of data samples is randomly selected from the complete dataset based on the user's actual forgetting request to serve as the forgetting dataset. The remaining part is the reserved dataset D. r =D\D f ; Category forgetting scenario: The complete training dataset includes images of g categories, i.e., y i ∈{c1,c2,c3,…,c g In the category forgetting scenario, all categories in the training dataset are assigned to the user as the forgotten category c. j The data samples are divided into the forgetting dataset D. f ={(x i ,y i )∈D|y i =c j The remaining categories of data are divided into a reserved dataset D. r ; The module for evaluating neuron importance assigns the memory values ​​of forgotten samples to neurons in the convolutional neural network model to assess the importance of neurons to the forgotten dataset. Parameter mask generation module: sets the mask of neurons with memory values ​​greater than a specific threshold to 1, and the mask of neurons with memory values ​​less than a specific threshold to 0; Random Label Forgetting Module: Randomly assigns labels to samples in the forgetting dataset and updates the parameters with a mask of 1 using the stochastic gradient descent method; Fine-tuning the CNN model module: Fine-tuning the entire CNN model using the retained dataset to obtain the final forgetting model; Evaluation of Forgetting Effect Module: Test the accuracy of the model after forgetting on the forgotten dataset and the accuracy of member inference attack to evaluate the effectiveness of the forgetting method; test the accuracy of the model after forgetting on the retained dataset and the test dataset to evaluate the performance and generalization of the model after forgetting on the original task.

Citation Information

Patent Citations

  • Artificial neural networks having attention-based selective plasticity and methods of training the same

    US11210559B1

  • Neuromorphic memory circuit and method of neurogenesis for an artificial neural network

    WO2022235789A1