GDR-GMA: Machine Unlearning via Direction-Rectified and Magnitude-Adjusted Gradients

Authors: shen  lin
xiaoyu  zhang
willy  susilo
xiaofeng  chen
jun 2024 liu
Venue: acmmm_org_ACMMM_2024_Conference
Published: 2024-04-03 07:53:28

Abstract: As concerns over privacy protection grow and relevant laws come into effect, machine unlearning (MU) has emerged as a pivotal research area. Due to the complexity of the forgetting data distribution, the sample-wise MU is still open challenges. Gradient ascent, as the inverse of gradient descent, is naturally applied to machine unlearning, which is also the inverse process of machine learning. However, the straightforward gradient ascent MU method suffers from the trade-off between effectiveness, fidelity, and efficiency. In this work, we analyze the gradient ascent MU process from a multi-task learning (MTL) view. This perspective reveals two problems that cause the trade-off, i.e., the gradient direction problem and the gradient dominant problem. To address these problems, we propose a novel MU method, namely GDR-GMA, consisting of Gradient Direction Rectification (GDR) and Gradient Magnitude Adjustment (GMA). For the gradient direction problem, GDR rectifies the direction between the conflicting gradients by projecting a gradient onto the orthonormal plane of the conflicting gradient. For the gradient dominant problem, GMA dynamically adjusts the magnitude of the update gradients by assigning the dynamic magnitude weight parameter to the update gradients. Furthermore, we evaluate GDR-GMA against several baseline methods in three sample-wise MU scenarios: random data forgetting, sub-class forgetting, and class forgetting. Extensive experimental results demonstrate the superior performance of GDR-GMA in effectiveness, fidelity, and efficiency. Code is available at https://github.com/RUIYUN-ML/GDR-GMA.

Main paper: 
 introduction: 
 With the widespread use of artificial intelligence (AI) techniques [2, 12, 13, 16, 29, 37, 40] , concerns about privacy protection have escalated. To address these concerns, an increasing number of regulations and laws have been introduced on privacy protection, such as the European Union's GDPR (General Data Protection Regulation) [34] . The GDPR has been promulgated to give people the right-to-be-forgotten, which requires information service providers to delete personal data on request from the data owner. Furthermore, this regulation stipulates that providers must also erase the corresponding influence of the requested data. Numerous studies [15, 18, 19, 28, 30, 31, 38, 39] have demonstrated that machine learning models possess the ability to memorize data samples. For example, membership inference attacks [15, 30, 31] can infer whether a data sample is in the training set or not. Consequently, AI service providers must remove the requested data samples and their associated memorized knowledge from the models. However, the naive approach of Retraining the model from Scratch after removing the forgetting data samples from the training set is prohibitively expensive in practice. Therefore, a new research direction for privacy protection emerged to efficiently remove the knowledge of requested data samples, called machine unlearning (MU).The sample-wise unlearning methods focus on unlearning a subset of data samples in the training set, which can be random data samples, a sub-class of data samples, and a class of data samples. Therefore, it is challenging for the sample-wise MU methods to handle the complex distribution of forgetting data samples. Many works [1, 3, 5, 9-11, 14, 17, 22, 23, 32, 35] attempted to address the sample-wise MU challenges. For example, Bourtoule et al. [1] proposed an exact unlearning method, SISA, to unlearn data samples by retraining the sub-models. However, SISA needs to retrain plenty of sub-models when the requested target data samples are widely distributed across the different shards. To further improve efficiency, many approximate unlearning methods [1, 5, 7, 9-11, 14, 22, 24, 33] were proposed. They estimate the contribution of the forgetting data samples and unlearn them by updating model parameters. Specially, gradient plays an important role in these cutting-edge works. For example, Graves et al. [10] updated the model with the relevant stored gradients. Fan et al. [7] used the ascent gradient to generate the weight salience map.As one of the basic methods, the straightforward gradient ascent MU method still inspires state-of-the-art works [10, 14, 22, 30, 33] , namely the negative gradient (NegGrad). It can be seen as a multitask learning process: unlearning the forgetting dataset and maintaining the remaining dataset. For image classification, it calculates the ascent gradient of the forgetting data samples and the descent gradient of the remaining data samples to perform a joint model update. Although NegGrad can misclassify forgetting data samples with few epochs, it will also misclassify most of the remaining samples, leading to a sharp decline in the classification performance (low fidelity). In contrast, the forgetting samples are barely unlearned if NegGrad maintains the classification performance, resulting in MU's low effectiveness and efficiency. Therefore, it suffers from the trade-off between effectiveness, fidelity, and efficiency.In this work, we identify two key factors for this trade-off problem, i.e., gradient direction problem and gradient domination problem, as shown in Sec. 3.3 and Sec. 3.4. For the gradient direction problem, we identify two pairs of direction conflicts: 1) the ascent gradient of the forgetting data samples and the descent gradient of the remaining data samples; 2) the descent gradient of the remaining data samples and the ascent gradient of the other forgetting data samples (from the difference set of the current forgetting samples and the forgetting set). For the gradient domination problem, we find that a single gradient always dominates the update process, so the MU process solely tends to one task.To address the above problems and to better apply the gradient ascent to the sample-wise machine unlearning task, we propose a novel unlearning method consisting of Gradient Direction Rectification (GDR) and Gradient Magnitude Adjustment (GMA), dubbed GDR-GMA. For the gradient direction problem, GDR rectifies the direction of gradients to be orthogonal to the conflict gradients. For the gradient domination problem, GMA dynamically adjusts the magnitude of update gradients to maintain a balance state of two tasks in model updating. We summarize our contributions to this paper as follows:• We analyze the problems in the straightforward gradient ascent MU method that causes the trade-off among effectiveness, fidelity, and efficiency from a multi-task learning view. This perspective reveals two problems: the gradient direction problem and the gradient domination problem. • We propose the GDR-GMA unlearning method to address these two problems. For the gradient direction problem, GDR-GMA rectifies the direction between the conflicting gradients by projecting a gradient onto the orthonormal plane of the conflicting gradient. For the gradient domination problem, GDR-GMA dynamically adjusts the magnitude of the update gradients by the dynamic magnitude weight parameters.  
related work: 
 Multi-task learning. Multi-task learning (MTL) aims to help improve the model performance by leveraging the commonalities and differences across multiple tasks. Instead of training on a single task, the model is trained simultaneously on multiple related tasks.In MTL, reducing the direction conflict and domination by a single task is an important topic. For example, Chen et al. [4] normalized the gradient to adaptive balance the loss among tasks. Yu et al. [36] pointed out that the gradient direction conflict and single task domination may damage the model performance. Liu et al. [25] proposed a Multi-Task Attention Network to improve performance. Although MU is not a traditional MTL task, we can utilize the philosophy behind MTL to mitigate the gradient direction and dominant problems in MU.Class-wise machine unlearning. As a particular case of the sample-wise MU, the class-wise machine unlearning only focuses on forgetting the entire class of data samples. For example, Lin et al. [23] added an entanglement-reduced structure into the model and then transferred the knowledge of the remaining data classes to the unlearned model. Chen et al. [3] shifted the decision boundary of the trained model to forget specific classes. Sample-wise machine unlearning. The existing sample-wise MU works can be divided into two groups, i.e., exact machine unlearning and approximate unlearning. Bourtoule et al. [1] proposed SISA to unlearn a subset of the forgetting data samples by retraining the sub-models. Even though SISA improves efficiency compared to Retrain, plenty of sub-models still need to be retrained if the forgetting data samples are scattered. To improve the efficiency of exact MU methods, many state-of-the-art works [5, 9, 10, 22, 26, 27, 35] focus on approximate machine unlearning methods. For example, Golatkar et al. [9] and Mehta et al. [27] used the Fisher Information [26] to estimate the contributions. Foster et al. [8] used the Fisher information matrix to select and dampen the important parameter for the forgetting set. Moreover, Chundawat et al. [5] constructed a teacher-student model for MU. Graves et al. [10] stored the gradients related to the target unlearning data during the training process and then subtracted the gradients to update the model's parameters. Liu et al. [24] demonstrated that model sparsity can improve unlearning performance. Fan et al. [7] used the ascent gradients to construct a weight salience map to update only the specific weights rather than the entire model.Different from the existing methods, we first analyze the specific conflict gradient pairs in the straightforward gradient ascent MU method and identify two key reasons: gradient direction and gradient domination. Furthermore, we propose the GDR method to mitigate the gradient direction problem. Specially, we propose a novel approximation method based on the gradient bank to simplify the large amount of gradient calculations. We also propose the GMA method to assign a dynamic weight parameter for gradients to handle the gradient dominant problem. Finally, we combine the GDR and GMA methods as GDR-GMA. By simultaneously handling both two problems, GDR-GMA achieves an effective, fidelity, and efficient MU method. 
preliminaries & problem analysis: 
 In this section, we will first give a formulation of the sample-wise machine unlearning in Sec. 3.1 and describe the negative gradient method in Sec. 3.2. Then, we will analyze the gradient direction and gradient domination problems in Sec. 3.3 and Sec. 3.4, respectively.We first assume a sample space X ⊆ R 𝑑 , the corresponding ground truth labels Y = {1, 2, . . . , 𝐶} (𝐶 is the number of data classes), and a training set D = {(𝒙, 𝒚)}, in which 𝒙 ⊆ X and 𝒚 ⊆ Y. We further define a forgetting dataset D 𝑓 ⊆ D, a remaining dataset D 𝑟 = D\D 𝑓 , and an original model with trainable parameters 𝝎 0 , which trained on D. Definition 1. We define a machine learning algorithm, A : D → 𝝎 0 and a machine unlearning method, U : 𝝎 0 ×D 𝑟 ×D 𝑓 → 𝝎 𝑢 . We denote the model that performed the unlearning operation as 𝝎 𝑢 and the model trained with the remaining set D 𝑟 as 𝝎 𝑟 . The goal of MU is to attain an unlearned model 𝝎 𝑢 , wherein the knowledge of the forgetting data samples D 𝑓 equals that of the retrained model 𝝎 𝑟 . We can formulate it as:EQUATIONin which K (•) is the knowledge measuring function. Note that in the sample-wise machine unlearning task, the forgetting dataset can be a random subset of the training set, a subclass of data samples in a super-class, or a class of data samples.Here, we will introduce the straightforward gradient ascent MU method, namely NegGrad. First, we perform forward propagation with a forgetting data sample (𝒙 𝑓 , 𝒚 𝑓 ) ⊆ D 𝑓 , resulting in a prediction vector ỹ. We calculate the cross entropy (CE) loss between the prediction vector ỹ𝑓 and the ground truth label 𝒚 𝑓 . Then, we perform a backward propagation to calculate the gradient 𝒈 𝑓 = ▽ 𝝎 L CE (𝝎; 𝒙 𝑓 , 𝒚 𝑓 ). Again, we can obtain the gradient 𝒈 𝑟 of a remaining data sample (𝒙 𝑟 , 𝒚 𝑟 ) ⊆ D 𝑟 . Finally, NegGrad updates the original model parameters as follows:EQUATIONin which 𝜂 is the learning rate. This process can be seen as multi-task learning. NegGrad has two main tasks: unlearning the forgetting dataset D 𝑓 and maintaining the remaining dataset D 𝑟 . Specifically, the ascending gradient 𝒈 𝑓 is for the unlearning task, and the descent gradient 𝒈 𝑟 is for the maintaining task.Here, we will analyze the gradient direction problem. First, we introduce an additional ascent gradient 𝒈 𝐹 = ▽ 𝝎 L CE (𝝎; 𝒙 𝐹 , 𝒚 𝐹 ) of the other forgetting data samples 𝒙 𝐹 ⊆ D 𝑓 \𝒙 𝑓 . Then, we define the gradient direction conflict as follows: Definition 2. Given 𝜑 𝑖 𝑗 is the angle of two gradients 𝒈 𝑖 and 𝒈 𝑗 . The two gradients have direction conflicts if cos 𝜑 𝑖 𝑗 < 0.During the NegGrad unlearning process, we have three pairs of gradients as follows:• 𝒈 𝑓 -𝒈 𝑟 : the ascent gradient 𝒈 𝑓 of the forgetting samples and the descent gradient 𝒈 𝑟 of the remaining samples; • 𝒈 𝑟 -𝒈 𝐹 : the descent gradient 𝒈 𝑟 of the remaining samples and the ascent gradient 𝒈 𝐹 of the other forgetting samples. • 𝒈 𝑓 -𝒈 𝐹 : the ascent gradient 𝒈 𝑓 of the forgetting samples and the ascent gradient 𝒈 𝐹 of the other forgetting samples. It should be noted that 𝒈 𝐹 is not actually involved in the model update process. Moreover, there is a single pair 𝒈 𝑓 -𝒈 𝑟 and a set ofpairs {𝒈 𝑟 -𝒈 𝐹 𝑘 } | D 𝐹 | 𝑘=1 and {𝒈 𝑓 -𝒈 𝐹 𝑘 } | D 𝐹 |𝑘=1 in an update step because we need to consider the gradient of each sample in D 𝐹 . When these direction conflicts occur, we will explain the negative impact on performance with two specific illustrations.Direction conflict of 𝒈 𝑓 -𝒈 𝑟 . As shown in Fig. 2 (a), direction of the gradient component 𝒈 𝛼 𝑓 is opposite to 𝒈 𝑟 . As a result, updating the model with 𝒈 𝑓 will maximize L CE (𝝎; 𝒙 𝑟 , 𝒚 𝑟 ) so that the model tends to unlearn the remaining sample (𝒙 𝑟 , 𝒚 𝑟 ). Similarly, updating the model with 𝒈 𝑟 tends to maintain the forgetting data sample (𝒙 𝑓 , 𝒚 𝑓 ). These direction conflicts will also cause conflicts between the unlearning task and the maintaining task to decline the performance. Direction conflict of 𝒈 𝑟 -𝒈 𝐹 . As shown in Fig. 2 (b), 𝒈 𝑟 and 𝒈 𝐹 have direction conflict so that updating the model with 𝒈 𝑟 will also minimize L CE (𝝎; 𝒙 𝐹 , 𝒚 𝐹 ), i.e., the model tends to maintain the forgetting data sample (𝒙 𝐹 , 𝒚 𝐹 ) rather than unlearn it.The MU process can be seen as multi-task learning, and there are two tasks in the MU process: the forgetting task and the maintaining task. The forgetting task aims to forget the forgetting set, while the maintaining task aims to maintain the remaining set. Ideally, the related gradients of each task jointly update the model to learn the specific knowledge of each task. However, the gradient domination problem is a common challenge that the model's updates during training are biased towards optimizing for one task over others, i.e., a single gradient dominates the model update. We empirically evaluate this problem through the values of the loss function. As shown in Fig. 3 (a) , increasing the remaining loss will decrease the model classification performance. In contrast, the barely changed forgetting loss will lead to invalid forgetting, as shown in Fig. 3 (b) . Inspired by the previous work, Yu et al. [36] pointed out that the magnitude of gradients will affect the gradient domination in MTL. Therefore, we try to evaluate the effect of magnitude on this dominant problem by assigning a constant magnitude parameter to the gradients. As shown in Table 1 , the results show that the gradient dominant problem always occurs during the NegGrad unlearning process, resulting in unchanged or increased loss values. 
proposed method: 
 In Sec. 4 .1, we propose the Gradient Direction Rectification (GDR) method for the gradient direction problem. In Sec. 4.2, we propose the Gradient Magnitude Adjustment (GMA) method for the domination problem. Finally, we will describe the combined GDR-GMA for the sample-wise MU task in Sec. 4.3.In Sec. 3.3, we define three gradients that affect the NegGrad MU process, i.e., 𝒈 𝑓 , 𝒈 𝑟 , and 𝒈 𝐹 . However, it is very time-consuming to calculate the set of gradients{𝒈 𝐹 𝑘 } | D 𝐹 | 𝑘=1 .To address this problem, we empirically measure the cosine similarity between gradients of the same sample in adjacent epochs. As shown in Fig. 4 , this observation indicates that the gradients of the same sample in the adjacent epoch are highly similar during the MU process. Based on this observation, we use a gradient bank to replace the repeated calculation process with storing the gradients in the previous epoch. We formulate this replacement process as:EQUATIONwhere 𝑒 denotes the current epoch, 𝑒 -1 denotes the previous epoch, and |𝐵𝑎𝑛𝑘 | is the size of gradient bank, which equals to |D 𝐹 |.We propose the Gradient Direction Rectification (GDR) method to alleviate these direction conflicts by rectifying the direction between the two conflicting gradients 𝒈 𝑖 and 𝒈 𝑗 if cos 𝜑 𝑖 𝑗 < 0. After rectification of the direction, the gradient 𝑖 is projected onto the orthonormal plane of the conflicting gradient 𝑗 to remove destructive conflicts, as shown in Fig. 6 . Formally, GDR projects the gradient 𝑖 Figure 5 : An overview of our proposed GDR-GMA unlearning method. First, we calculate gradients 𝒈 𝑓 and 𝒈 𝑟 and get the joint gradient 𝒈 𝑗𝑜𝑖𝑛𝑡 from the gradient bank. Then, GDR rectifies the gradient directions of the conflicting gradients and get the rectified gradients ĝ𝑓 and ĝ𝑟 . GMA calculates the dynamic weight parameter 𝜆 using the loss deviation Δℓ to adjust the magnitude of the update gradients. Finally, we update the model using the combined gradients ĝ𝑓 -(1 -𝜆 𝑡 ) ĝ𝑟 .onto the orthonormal plane of the gradient 𝑗 as:EQUATIONwhere ||𝒈|| denotes the L2-norm of the gradient 𝒈. As described in Sec. 3.3, we analyze the direction conflict problem only exists between the pairs of 𝒈 𝑓 -𝒈 𝑟 and 𝒈 𝑓 -𝒈 𝐹 . However, multiple projections will be needed to alleviate direction conflicts. To avoid the excessive direction deviation caused by the multiple projections, we define the joint conflict gradients in the gradient bank as:EQUATIONwhere 1(𝒈 𝑖 < 0) is an indicator function which yields a value of 1 if 𝒈 𝑖 < 0 and 0 otherwise. Then, GDR can once project 𝒈 𝑟 onto the plane of the joint gradient instead of the multiple projections.We present the GDR method in Algorithm 1. The proposed algorithm utilize three types of gradients 𝒈 𝑓 , 𝒈 𝑟 , and 𝒈 𝐹 . We use an approximate joint gradient 𝒈 𝑗𝑜𝑖𝑛𝑡 from the gradient bank to reduce computational overhead and avoid multiple projections. If conflicts are detected, we project the gradient based on Eq. 4 to alleviate direction conflicts.1 for e in epochs do 2 In Sec. 3.4, we empirically observe that the magnitude will affect the gradient domination. However, simply adjusting the magnitude cannot balance the two gradients and instead results in domination by a single gradient, as shown in Table 1 . Therefore, we propose a Gradient Magnitude Adjustment (GMA) method to dynamically adjust the magnitude. Specifically, GMA can dynamically adjust the magnitude of update gradients according to the three states of the MU process as follows:𝒈 𝑓 ← ▽ 𝝎 𝒕 L CE (𝝎 𝑡 ; 𝒙 𝑓 , 𝒚 𝑓 ) 3 𝒈 𝑟 ← ▽ 𝝎 𝒕 L CE (𝝎 𝑡 ; 𝒙 𝑟 , 𝒚 𝑟 ) 4 𝒈 𝑗𝑜𝑖𝑛𝑡 ← |𝐵𝑎𝑛𝑘 | 𝑘=1 1(cos 𝜑 (𝒈 𝑟 ,𝒈 𝑒 𝐵 𝑘 ) <0) •𝒈 𝑡 𝐵 𝑘 |𝐵𝑎𝑛𝑘 | 𝑘=1 1(cos 𝜑 (𝒈 𝑟 ,𝒈 𝑒 𝐵 𝑘 ) <0) 5 if cos 𝜑 (𝒈 𝑓 , 𝒈 𝑟 ) < 0 then 6 ĝ𝑓 ← 𝒈 𝑓 - 𝒈 𝑓 •𝒈 𝑟 | |𝒈 𝑟 | | 2 𝒈 𝑟 7 ĝ𝑟 ← 𝒈 𝑟 - 𝒈 𝑟 •𝒈 𝑓 | |𝒈 𝑓 | | 2 𝒈 𝑓• State I (Maintaining Dominance): In this state, the remaining loss value maintains nearly the same as that in the original model, which shows that the remaining gradient 𝒈 𝑟 dominates the MU process. Hence, GMA will assign a large magnitude to the forgetting gradient 𝒈 𝑓 to balance the forgetting and maintaining tasks. • State II (Balance): In this state, none of the dominance occurs. Hence, GMA needs to flexibly adjust the magnitude of the update gradients to maintain this balance.• State III (Forgetting Dominance): When the remaining loss dramatically deviates from the original loss value, GMA will assign a large magnitude to the remaining gradient 𝒈 𝑟 to force the model to maintain the remaining samples.Formally, we define the dynamic magnitude weight (DMW) as:EQUATION)where 𝑡 denotes the 𝑡-th unlearning step, 𝜖 is a constant small value, 𝛾 denotes the steepness parameter, and the loss deviation Δℓ 𝑡 = |L 𝐶𝐸 (𝝎 𝑡 𝑢 ; 𝒙 𝑡 𝑟 ) -L 𝐶𝐸 (𝝎 0 ; D 𝑟 )| denotes the difference between the loss values of the remaining samples in the 𝑡-th step and the remaining dataset in the original model. The steepness parameter 𝛾 controls how sharply the weight parameter transitions from its minimum to maximum value. A large 𝜖 will tolerate a larger increase in the loss values of the remaining samples. With the DMW parameter 𝜆 𝑡 , GMA assigns it to gradients in the 𝑡-th update step as:EQUATIONFurthermore, we will describe why the above proposed DMW parameter can suit these three states. As shown in Fig. 7 , we illustrate the relationship between the DMW parameter 𝜆 𝑡 and the loss deviation Δℓ 𝑡 in the three states. In State I, GMA adjusts 𝜆 𝑡 to be close to 1 so that the forgetting loss will rapidly ascend to the balance state. A low decay rate is used in this state to make 𝜆 𝑡 insensitive to the loss deviation and close to 1. In State II, when the loss deviation Δℓ 𝑡 is around the small value 𝜖, GMA flexibly adjusts the magnitude of 𝒈 𝑓 and 𝒈 𝑟 with a high change rate of 𝜆 𝑡 to keep the balance between forgetting and maintaining tasks. In State III, when the loss deviation Δℓ 𝑡 is greater than the small value 𝜖, GMA adjusts the magnitude of 𝒈 𝑟 to close to 1 with a low change rate of 𝜆 𝑡 . With a large magnitude of 𝒈 𝑟 , GMA can make the model tend to maintain the remaining samples and get back to the balance state as soon as possible. In Sec. 4.1, we propose the GDR method to rectify the direction of two pairs of conflicting gradients. Despite alleviating the direction conflicts, GDR cannot address the gradient dominant problem. Therefore, in Sec. 4.2, we propose the GMA method to dynamically adjust the magnitude of the update gradients to balance the forgetting task and the remaining task.We present the combined GDR-GMA method in Algorithm 2. First, GDR-GMA rectifies the direction of the conflicting gradients by the GDR method. Then, GDR-GMA calculates the dynamic weight parameter using the GMA method. Finally, GDR-GMA updates the model with the rectified gradients and dynamic magnitude weight parameters. 
experiments: 
 In this Section, we conduct extensive experiments to empirically evaluate the proposed GDR-GMA method. We compare its performance with several baseline MU methods in three MU scenarios: random data forgetting, subclass forgetting, and class forgetting. Furthermore, we also conduct ablation experiments to prove the effectiveness of GDR-GMA.Datasets and models. In this paper, we evaluate GDR-GMA on three datasets, CIFAR-10, CIFAR-20 [20] , and Tiny-ImageNet [21] , using two model architectures, ResNet-18 [13] and Vision Transformer (ViT) [6] . Baseline methods. In random data forgetting and subclass forgetting, we compare GDR-GMA with the following baselines: Retrain, Fine-tune, Random Labels [9] , NegGrad, Fisher [9] , Unrolling [33] , BadT [5] , 𝐿 1 -Sparse [24] , SalUn [7] , SSD [32] . Furthermore, we add two new baselines in class forgetting, i.e., ERM-KTP [23] and Boundary [3] . Metrics. Following previous works [5, 7, 32] , we use 𝐴𝑐𝑐 D 𝑓 , 𝐴𝑐𝑐 D 𝑟 , and 𝐴𝑐𝑐 𝑣𝑎𝑙 to represent the classification accuracy on the forgetting set, the remaining set, and the validation set, respectively. Besides, Table 2 : Performance comparison with several baselines in 20% random data forgetting and 50% random data forgetting. The performance gap against Retrain is provided in (Δ). The optimal Avg. Gap is marked in red.Approach Random Data Forgetting (20%) Random Data Forgetting (50%)𝐴𝑐𝑐 D𝑓 (Δ ↓) 𝐴𝑐𝑐 D𝑟 (Δ ↓) 𝐴𝑐𝑐 𝑣𝑎𝑙 (Δ ↓) MIA (Δ ↓) Avg. Gap ↓ RTE ↓ 𝐴𝑐𝑐 D𝑓 (Δ ↓) 𝐴𝑐𝑐 D𝑟 (Δ ↓) 𝐴𝑐𝑐 𝑣𝑎𝑙 (Δ ↓) MIA (Δ ↓) Avg. Gap ↓ RTE ↓we leverage the membership inference attack (MIA) on the forgetting set to measure whether the forgetting data samples are in the training set. We use RTE to measure the time overhead in minutes of the unlearning process. We use 𝐴𝑐𝑐 D 𝑓 and MIA to measure the effectiveness of MU methods, 𝐴𝑐𝑐 D 𝑟 and 𝐴𝑐𝑐 𝑣𝑎𝑙 to evaluate fidelity, and RTE to measure efficiency. To present a summary performance gap against the ideal baseline Retrain, we introduce the Avg. Gap by calculating the average performance gaps in 𝐴𝑐𝑐 D 𝑓 , 𝐴𝑐𝑐 D 𝑟 , 𝐴𝑐𝑐 𝑣𝑎𝑙 and MIA. Note that the better performance of an MU method corresponds to the smaller performance gap with Retrain. The results are given by a format 𝑎 ±𝑏 with mean 𝑎 and standard deviation 𝑏 over ten independent experiments. Hyper-parameters. The original models are trained for 200 epochs using the SGD optimizer with a momentum of 0.9, weight decay of 5e-4, and an initial learning rate of 0.1, divided by 10 after 100 and 150 epochs, respectively. For our proposed GDR-GMA, we set the steepness parameter 𝛾 to 100 and the constant small value 𝜖 to 0.02.Comparison experiments in random data forgetting. We conduct extensive comparison experiments with several baselines. First, we evaluate the performance of forgetting a random subset of data samples. Following previous works [5, 7, 32] , we consider two unlearning scenarios, i.e., 20% random data forgetting and 50% random data forgetting. Based on the results presented in Table 2 , we draw the following three key observations: First, following the previous work [7] , Avg. Gap is a more comprehensive metric to evaluate the performance of the MU methods. Some methods may be the strongest when considering only a single metric, but this comes at the cost of sacrificing the other metrics. However, GDR-GMA still achieves the smallest average performance gap against Retrain on these two (data-model) setups in both scenarios, demonstrating its superior effectiveness and fidelity.Second, GDR-GMA inherits the efficiency of the gradient ascent methods while maintaining the model classification performance. GDR-GMA significantly improves the performance of NegGrad with negligible additional computation overhead. Furthermore, GDR-GMA has a competitive computation efficiency with these baselines, as evidenced by the RTE metric.Third, randomly forgetting 50% data samples is a more complex scenario, resulting in a higher average performance gap than that in 20% random data forgetting scenario. Besides, the MU methods on Tiny-ImageNet using ViT are more demanding due to the larger scale of data samples and model parameters. Nevertheless, GDR-GMA still has the smallest average performance gap and achieves superior performance on both effectiveness and fidelity. Comparison experiments in subclass forgetting. We then explore the performance of forgetting a subclass of data samples, following previous works [5, 8] . Sub-class forgetting is a simpler MU scenario than random data forgetting because sub-class samples are more similar. This simple data distribution makes the model more easily unlearn the forgetting data samples while maintaining the remaining data samples. As shown in Table 3 , GDR-GMA achieves a superior performance in sub-class forgetting than random data forgetting. Moreover, GDR-GMA has the smallest performance gap and significantly outperforms the state-of-the-art works regarding time overhead. Comparison experiments in class forgetting. We also conduct experiments in class forgetting, following the previous works [3, 23, 32] . Except for the baseline methods in random data forgetting and sub-class forgetting, we add two class-wise MU methods as baselines, ERM-KTP [23] and Boundary [3] . As shown in Table 4 , GDR-GMA still has the smallest average performance gap and has less time overhead than the SOTA works. The experimental results in these three scenarios demonstrate the superior effectiveness, fidelity, and efficiency of GDR-GMA. Furthermore, the simple implementation and adaptability across scenarios also show the scalability of GDR-GMA. Effectiveness of GDR. We evaluate the effectiveness of the GDR method in handling the problem of direction conflict. As shown in Fig. 8 , GDR can significantly alleviate the direction conflict problem. However, Fig. 8(b) shows that the rate of conflict samples is not 0% in the first few epochs due to the approximation error using the gradient bank. Specifically, the approximation error is caused because the cosine similarity between adjacent epochs is around 0.6-0.8, as shown in Fig. 4 . Nevertheless, the rate reaches 0% after a few epochs because the error will be negligible when the cosine similarity increases during the unlearning process. After GDR rectifies the direction of the conflicting gradients, the rate of conflicting samples is decreased to 0%. Effectiveness of GMA. Then, we evaluate the effectiveness of the GDR method in handling the gradient dominant problem. As shown in Fig. 9 , these two tasks can achieve a balance where each gradient fulfills its duty instead of solely tending to one of them after the GMA method dynamically adjusts the magnitude of the update gradients. Furthermore, it demonstrates that GMA can achieve a balance between the updated gradients. After GMA adjusts the magnitude of the update gradients, the forgetting loss value increases with maintaining the remaining loss.In this section, we conduct ablation experiments to further analyze the effectiveness of GDR-GMA. Impact of the gradient bank. In Sec. 4.1, we propose the gradient bank to approximate the set of gradients {𝒈 𝐹 𝑘 } | D 𝐹 | 𝑘=1 with 𝒈 𝑗𝑜𝑖𝑛𝑡 . Fig. 8 (b) demonstrates the effectiveness of this approximation using the gradient bank to alleviate the direction conflict. Furthermore, the gradient bank can significantly reduce time overhead without sacrificing performance, as shown in Table 5 . Impact of 𝛾 and 𝜖. We propose the dynamic magnitude weight parameter in Eq. 6 to adjust the magnitude of the update gradients, resulting in a balance between the forgetting and remaining tasks. Specifically, we use the steepness parameter 𝛾 to control how sharply the weight parameter transitions from its minimum value to its maximum value and the constant small value 𝜖 to control the deviation of the loss value of the remaining dataset. As shown in Fig. 8 , the results show that the value of 𝛾 does not affect the average performance gap but affects the time overhead. The higher value of 𝜖 will reduce the time overhead with an increasing average performance gap.  
conclusion: 
 In this paper, we first analyze the problems of the basic gradient ascent MU method in a multi-task learning view and identify two key problems: the gradient direction problem and the gradient dominant problem. To address these problems, we propose the GDR-GMA MU method. For the gradient direction problem, GDR-GMA rectifies the direction of the conflicting gradients. For the gradient dominant problem, GDR-GMA dynamically adjusts the magnitude of the update gradients. Then, we conducted extensive experiments to demonstrate the effectiveness, fidelity, and efficiency of GDR-GMA. 
 
 Appendix:  


Decision: The reviewers agreed that the motivation is clear and the results are convincing. They also requested that many improvements need to be done.

Reviews: review: paper_summary: paper_summary: The paper presents an approach for machine unlearning, addressing challenges for effective methods to remove data from AI models without extensive retraining. The authors propose the GDR-GMA method, which includes two key components: Gradient Direction Rectification (GDR) and Gradient Magnitude Adjustment (GMA). GDR solves gradient direction problem by projecting conflicting gradients onto an orthonormal plane, reducing destructive interference, while GMA dynamically adjusts the magnitude of update gradients to balance tasks of forgetting dataset and maintaining the remaining dataset.
strength_weakness: strength_weakness: - The introduction of GDR and GMA methods addresses key aspects of machine unlearning problem. GDR addresses gradient direction conflicts by projecting conflicting gradients onto an orthonormal plane, GMA adjusts magnitude of gradient updates to balance unlearning and maintaining tasks.
- Comprehensive experiments are done across three MU scenarios: random data forgetting, sub-class forgetting, and class forgetting. With comparisons with baseline methods to demonstrate improvements in classification performance, computational efficiency, and the ability to maintain model accuracy.
limitations: limitations: - Experiments are conducted on CIFAR-10, CIFAR-20, and Tiny-ImageNet, which are standard benchmarks in CV. Evaluating the method on a broader range of datasets would provide a more comprehensive understanding of its effectiveness and limitations, e.g. unlearning documents of a NLP dataset with an LLM would be a quite interesting setup.
paper_summary: paper_summary: This paper introduces a novel machine unlearning method. The authors reveal the gradient direction and gradient domination problem which hinder the machine unlearning algorithm from achieving a good trade-off among effectiveness, fidelity, and efficiency from a multi-task learning view. Therefore, this work proposes the GDR-GMA unlearning method, which rectifies the directions between the conflicting gradients and dynamically adjusts the magnitude of gradients for effectively forgetting data while preserving model utility.
Extensive experiments are conducted on CIFAR-10, CIFAR-20, and Tiny-ImageNet across ResNet-18 and ViTs, and results demonstrate the effectiveness of the proposed unlearning method.
strength_weakness: strength_weakness: - The motivation is clear and the paper is well-written.
- Solving gradient conflicts in machine unlearning from a multi-task learning view is intriguing.
- Experimental results show the proposed method is effective.
limitations: limitations: - Lack of details. For example, it is unclear which classes are chosen to be forgotten in the forgetting scenario (e.g., subclass and class forgetting).
- The setting for baselines seems incorrect. For example, the SalUn method is reported to be trained with a learning rate of 0.1, but the SalUn paper specifies learning rates between 5e-4 and 5e-2. Also, what is the saliency sparsity used for SalUn? I believe it is very important to verify that the baselines are not intentionally set to underperform.
- Additionally, for the proposed method, I am curious why the authors try to compute the gradient per sample, why not just compute the gradient for the mini-batch?
paper_summary: paper_summary: The paper identifies the gradient direction and gradient dominant problem of the basic gradient ascent Machine Unlearning method in a multi-task learning view. And the GDR-GMA are proposed to address above two problems by rectifying the direction of the conflicting gradients and adjusting the magnitude of the update gradients.
strength_weakness: strength_weakness: 1. The paper is well written and easy to follow. 
2. The authors provide the code.
3. This paper focuses on an important and practical question on sample-wise machine unlearning task : the trade-off between effectiveness, fidelity, and efficiency.
4. The numerical experiments are well executed and show promising performance achieved by the proposed methods.
limitations: limitations: 1. The technical contributions of the proposed method are not particularly clear. It seems that the paper directly applies the existing multi-task learning method in machine unlearning scenario. The core techniques of GDR is similar to PCGrad [1] and I believe that other methods tailored for multi-task learning [2, 3, 4, 5] could also be adopted here to address gradient direction and gradient dominant problem.
2. More datasets, especially in different modalities, should be used.

[1] Yu, Tianhe, et al. "Gradient surgery for multi-task learning."\
[2] Wang, Zirui, et al. "Gradient vaccine: Investigating and improving multi-task optimization in massively multilingual models."\
[3] Liu, Bo, et al. "Conflict-averse gradient descent for multi-task learning."\
[4] Liu, Shikun, Edward Johns, and Andrew J. Davison. "End-to-end multi-task learning with attention."\
[5] Guo, Michelle, et al. "Dynamic task prioritization for multitask learning."