Improving Unlearning with Model Updates Probably Aligned with Gradients Virgile Dine, Teddy Furon, Charly Faure Abstract We formulate the machine unlearning problem as a general constrained optimization problem. It unifies the first-order methods from the approximate machine unlearning literature. This paper then introduces the concept of feasible updates as the model’s parameter update directions that help with unlearning while not degrading the utility of the initial model. Our design of feasible updates is based on masking, i.e. a careful selection of the model’s parameters worth updating. It also takes into account the estimation noise of the gradients when processing each batch of data to offer a statistical guarantee to derive locally feasible updates. The technique can be plugged in, as an add-on, to any first-order approximate unlearning methods. Experiments with computer vision classifiers validates this approach. 1 Introduction Machine learning models are integrated into many real-world applications. Since these models contain artifacts of potentially sensitive training data, this raises concerns about data confidentiality and user privacy. The ability to remove specific training data from a model has emerged as a key mechanism to enforce, for instance, the ”right to be forgotten” promoted by the European GDPR law [ 17 ] or the ”right to erase” in the Canadian CPPA legislation [ 29 ] . Approximate machine unlearning aims to find efficient mechanisms, avoiding the cost of learning a new model from scratch over the training dataset deprived of the sensitive data. Privacy is not the only application of machine unlearning. It has been proven useful as a defense against backdoor attacks by annihilating the influence of the poisoned training data [ 45 , 38 ] , or to improve fairness by removing data that induce biases in the training set. Another scenario is the derivation of a restricted public model from a powerful private model learned on some sensitive data [ 12 ] . The accuracy of the public model should be on par with or slightly degraded compared to the private model. On the other hand, the model should not leak information about the sensitive training data. The procedure used by an attacker to infer whether a specific data record was included in the training set is known as a Membership Inference Attack (MIA) [ 33 ] . This mechanism inherently provokes tension between the goal of forgetting some training data and the non-desired consequence of unlearning the model’s capabilities. Indeed, the term Machine Unlearning is somewhat misleading: it unlearns some training data, meaning forgets, not its ability to perform a given task (coined as Catastrophic Forgetting in machine unlearning). This work assumes that the unlearner is also the creator of the initial classifier. It means that the unlearner knows the initial model and all its parameters, the dataset to retain, and the dataset to forget. The unlearner aims to find an update of the initial model’s parameters that erases the influence of the forget dataset. Our first contribution formalizes machine unlearning as a constrained optimization problem: forgetting the data while sustaining the model’s utility. This generalizes first-order unlearning methods through a single framework. A second contribution introduces the concept of feasible update as a sound elementary solution to the constrained optimization problem. We propose a general procedure to craft feasible updates based on masks, carefully selecting the parameters to be updated. These are presented as add-ons to be plugged into the existing unlearning methods covered by our framework. A third contribution takes into account the processing per batch of data. A simple statistical model relating the gradient computed over a batch to the gradient computed over the whole dataset gives birth to a statistical guarantee that the mask selects the appropriate parameters. The appendix contains the proofs of our propositions. To summarize, this work provides a theoretical foundation for masking unlearning methods like saliency unlearning [ 8 ] . Our approach is validated over 360 experimental configurations combining several add-ons, unlearning methods, classifiers, datasets, types of unlearning scenarios, and sizes of the portion of data that must be unlearned. 2 Related Work 2.1 Machine Unlearning This work deals with centralized machine unlearning, which starts with a regular neural network classification model and obtains a model sharing the same architecture but with updated parameters. It excludes techniques that prepare the unlearning actually before the learning by resorting to specific data structures and model architectures, like split unlearning techniques [ 11 , 42 , 13 , 10 , 5 , 2 ] . These techniques indeed target exact unlearning, which makes the output of the unlearned model statistically indistinguishable from the output of the model that never saw the forget data during its training [ 41 ] . On the contrary, our proposal pertains to the approximate unlearning strategy and, more specifically, to fast first-order methods that compute one or more gradients to proceed a model’s parameters update. This excludes the more demanding second-order methods that compute Hessian matrices [ 14 ] . Among the first-order method family, one can find the following basic schemes: Fine-Tuning (FT) [ 40 ] where the model is further refined using only the remaining dataset \mathcal{D}_{\mathrm{retain}} , Gradient Ascent (GA) [ 35 ] which attempts to undo learning by applying gradient ascent on the forget dataset \mathcal{D}_{\mathrm{forget}} , and Successive Random Labeling (SRL) [ 12 ] which fine-tunes the model over the whole dataset \mathcal{D}_{\mathrm{train}} but with random labels for data belonging to \mathcal{D}_{\mathrm{forget}} . Slightly more elaborated are bi-objective schemes such as Negative Gradient Plus (NGPlus) [ 24 ] , a mixed version of gradient ascent and fine-tuning that performs a gradient ascent over \mathcal{D}_{\mathrm{forget}} with a descent over \mathcal{D}_{\mathrm{retain}} . It also encompasses methods considering the gradient of functions that are not classification losses. For example sparse-MU [ 19 ] , which integrates the \ell_{1} -norm of the model parameter as a penalty. SCalable Remembering and Unlearning unBound (SCRUB) [ 24 ] , minimizes (resp. maximizes) the Kullback-Leibler divergence between the predicted probabilities of the initial and the unlearned models over \mathcal{D}_{\mathrm{retain}} (resp. \mathcal{D}_{\mathrm{forget}} ). Finally, our work is inspired by the Saliency Unlearning method (SalUn) [ 8 ] , which enforces the sparsity of the parameter update by a binary mask. It amounts to selecting some parameters to be updated and leaving the remaining ones untouched. The selection is driven by the amplitude of the components of the gradient of the classification loss over \mathcal{D}_{\mathrm{forget}} . Our work proposes a theoretical framework for designing more explainable masks. Interested readers may find many more references in the following surveys [ 32 , 41 , 39 ] . 2.2 Membership Inference Attack A Membership Inference Attack (MIA) discloses whether a given piece of data belongs to the training set of a model. In other words, whether the model saw this piece of data during its training. The evaluation of an unlearning technique uses an MIA to verify that the data of \mathcal{D}_{\mathrm{forget}} are no longer deemed as training data. MIAs are usually intensive because they compute shadow models, i.e. a set of models trained with and without this piece of data in order to model how the membership impacts the outputs of a classifier like [ 33 ] or the LiRa attack [ 4 ] . U-LiRa [ 15 ] is an attack more adapted to machine unlearning that distinguishes data unlearned or not in the training set. Lightweight alternative MIAs (dedicated to unlearning or not) refuse the cost of the shadow models’ computation. They take decisions based on simple statistics from the model output [ 18 , 43 , 26 , 1 , 7 , 19 , 24 ] . Even though U-LiRa is more effective, the experiments reported in [ 15 ] reflect that the MIAs lead to similar evaluations: when U-LiRa measures that one unlearning method is better than another, another MIA generally leads to the same conclusion. Our paper proposes versatile add-ons that can be plugged into many unlearning techniques. Our objective is to show the impact due to our add-ons. Therefore, we can resort to simple MIAs to measure a relative improvement w.r.t. the baseline technique. 2.3 Gradient Agreements This article frames unlearning as a constrained optimization problem. Similarly to Multi-Task Learning with two tasks, the issue is to combine two gradients (w.r.t. the model parameters) into a single parameter update vector. Some well-known aggregations are IGA [ 22 ] , or PCGrad [ 44 ] and CAGrad [ 27 ] that modify gradients by projecting one onto another. Some recent proposals induce a sparse aggregation. The \mathrm{AND} masking strategy [ 30 ] verifies whether all gradients point in the same direction and updates a network parameter only if there is full agreement among them. This masking approach is similar to using a logical \mathrm{AND} operation in gradient directions. The idea was improved [ 31 ] to tackle real-world problems where the collected data differs with respect to some environment. Our work rediscovers the \mathrm{AND} formulation but from a different rationale stemming from the KKT conditions (see Prop. 1 ). 3 Problem Statement 3.1 Notations Datasets are noted with a calligraphic font. For a given function F , \mathbb{E}_{s\sim\mathcal{D}}[F(s)] is the expectation of the random variable F(s) when s follows a uniform distribution over the finite set \mathcal{D} . In the same manner, \mathbb{P}_{s\sim\mathcal{D}}[F(s)=y] is the probability that the output of F equals a given y . We denote by u\odot v\doteq(u_{i}v_{i})_{i} the vector corresponding to the term-by-term product of two vectors u=(u_{i})_{i} and v=(v_{i})_{i} . We write u\leq 0 (resp. \geq 0 ) when the vector u verifies \forall i,\,u_{i}\leq 0 (resp. \geq 0 ). This enables us to use inequalities directly on vectors when it makes sense. For the sake of simplicity, we note F\odot G\doteq s\mapsto F(s)\odot G(s) and equations are written function-wise whenever possible, i.e. F=G when \forall s,\,F(s)=G(s) , or M for a model M_{\theta} if there is no ambiguity. 3.2 Exact and Approximate Unlearning Consider a trained classifier M_{\theta_{0}}:\mathcal{X}\to\mathcal{Y} predicting labels in the set \mathcal{Y} from observations in the input space \mathcal{X} . Supervised learning found the model’s parameters \theta_{0} by optimizing a loss function L over a training set \mathcal{D}_{\mathrm{train}}\subset\mathcal{X}\times\mathcal{Y} : \theta_{0}\in\arg\min_{\theta\in\Theta}\mathbb{E}_{(x,y)\sim\mathcal{D}_{\mathrm{train}}}\left[L(M_{\theta}(x),y)\right]. (1) Data forgetting consists in unlearning some portion \mathcal{D}_{\mathrm{forget}}\subset\mathcal{D}_{\mathrm{train}} of the data while conserving performance as if the model had been trained over the set to retain \mathcal{D}_{\mathrm{retain}}=\mathcal{D}_{\mathrm{train}}\setminus\mathcal{D}_{\mathrm{forget}} . Then exact unlearning amounts to finding the parameters \theta^{\star} of a new model as if it was trained from scratch without the problematic data \mathcal{D}_{\mathrm{forget}} as follows: \theta^{\star}\in\arg\min_{\theta\in\Theta}\mathbb{E}_{(x,y)\sim\mathcal{D}_{\mathrm{retain}}}\left[L(M_{\theta}(x),y)\right]. (2) Approximate unlearning methods consist of low-cost modification of the trained parameters \theta_{0} so that the unlearned model is close to the exact one ( 2 ), which has never seen the set \mathcal{D}_{\mathrm{forget}} . 3.3 Usual Evaluation Metrics In real-world unlearning scenarios, the parameters \theta^{\star} of the exact model is unknown, preventing any measure of closeness in the parameter space \Theta . Indeed, it remains to be defined how the unlearned model should mimic the behavior of the exact one, M_{\theta^{\star}} . This is usually measured by common accuracy metrics [ 19 ] such as: \mathbb{P}_{(x,y)\sim\mathcal{D}}\left[M(x)=y\right], (3) with \mathcal{D}=\mathcal{D}_{\mathrm{forget}} for the Unlearning Accuracy (UA); \mathcal{D}=\mathcal{D}_{\mathrm{retain}} for the Retain Accuracy (RA); and \mathcal{D}=\mathcal{D}_{\mathrm{test}} , a test set with empty intersection with \mathcal{D}_{\mathrm{train}} , for the Test Accuracy (TA). Another important criterion is the attack success rate of MIAs. Verifying if the binary decision rule b , trained to output 1 if the piece of data x is deemed as belonging to the training set and 0 otherwise, has a good accuracy over the forget set: \mathrm{MIA}\doteq\mathbb{E}_{(x,y)\sim\mathcal{D}_{\mathrm{forget}}}\left[b(M,x)\right]. (4) The lower, the better. If this score is low, the decision rule considers the forgotten data as test data. If it is high, the decision rule considers the forgotten data as part of the training data. A value near \nicefrac{{1}}{{2}} means that the decision rule cannot assign the whole forgotten data to be part of the training or test data. Last but not least, the Run Time Efficiency (RTE) measures the duration of the unlearning procedure. Our experimental protocol introduces two other metrics (see Sect. 6.2 ) that are rarely used in the literature because they require the computation of the ideal model M_{\theta^{\star}} ( 2 ). 4 General Framework for First-Order Methods This section proposes a framework that encompasses the bi-objective first-order unlearning methods proposed in the literature and that leads to the concept of feasible update. 4.1 Optimization Problem Let M_{\theta_{0}} be the initial model ( 1 ) trained to minimize the loss L over the dataset \mathcal{D}_{\mathrm{train}} , and \mathcal{D}_{\mathrm{forget}}\subset\mathcal{D}_{\mathrm{train}} the dataset to be forgotten. We model the unlearning as a constrained optimization problem: \begin{split}&\min_{\theta\in\Theta}U(\theta)\\ \textit{s. t.}\quad&C(\theta)\leq 0,\end{split} (5) where the functional U drives the unlearning objective while C encodes the preservation of the classification performance. These functions are not always, but typically, defined as: \displaystyle U(\theta) \displaystyle\doteq \displaystyle\mathbb{E}_{(x,y)\sim\mathcal{D}_{U}}\left[L_{U}\left(M_{\theta},x,y\right)\right], (6) \displaystyle C(\theta) \displaystyle\doteq \displaystyle\mathbb{E}_{(x,y)\sim\mathcal{D}_{C}}\left[L_{C}(M_{\theta},x,y)-L_{C}(M_{\theta_{0}},x,y)\right], (7) where \mathcal{D}_{U} and \mathcal{D}_{C} are two datasets, and L_{U} and L_{C} are two losses. The constraint means that the parameter \theta shall not deteriorate the performances of the initial model, at least over the subset \mathcal{D}_{C} . The formulation ( 5 ) is general as it encompasses the first-order methods introduced in Sect. 2.1 : • FT (Fine-tuning): set L_{U}=L with \mathcal{D}_{U}=\mathcal{D}_{\mathrm{retain}} , and C the null function (no constraint), • GA (Gradient Ascent): set L_{U}=-L with \mathcal{D}_{U}=\mathcal{D}_{\mathrm{forget}} , and C the null function (no constraint), • NGPlus (Negative Gradient Plus): set L_{U}=-L with \mathcal{D}_{U}=\mathcal{D}_{\mathrm{forget}} , and L_{C}=L with \mathcal{D}_{C}=\mathcal{D}_{\mathrm{retain}} , • SRL (Successive Random Labeling): set L_{U}=L over a special dataset \mathcal{D}_{U} where y is replaced by a random label when (x,y)\in\mathcal{D}_{\mathrm{forget}} , and L_{C}=L with \mathcal{D}_{C}=\mathcal{D}_{\mathrm{retain}} , • \ell_{1} -sparse MU: set L_{U}=\|\theta\|_{1} with \mathcal{D}_{U}=\mathcal{D}_{\mathrm{retain}} , and L_{C}=L with \mathcal{D}_{C}=\mathcal{D}_{\mathrm{retain}} , • SCRUB: set L_{U}=-\mathrm{KL}(M_{\theta_{0}}\|M_{\theta}) with \mathcal{D}_{U}=\mathcal{D}_{\mathrm{forget}} , and L_{C}=\mathrm{KL}(M_{\theta_{0}}\|M_{\theta})+\gamma\cdot L with \mathcal{D}_{C}=\mathcal{D}_{\mathrm{retain}} . 4.2 KKT Condition at Equilibrium A classical result in constrained optimization allows us to relate the gradients of the unlearning objective and constraint functions. Proposition 1 (Necessary Condition at Equilibrium) . In the optimization problem ( 5 ), the KKT conditions impose the necessary condition at the equilibrium \bar{\theta} : \nabla U\odot\nabla C\left(\bar{\theta}\right)\leq 0. (8) The Prop. 1 is easily interpreted: at a local minimum \bar{\theta} there is no longer a direction in the parameter space to improve U while maintaining performance C . 4.3 Feasible Update This section first gives a desirable property of an update of the model parameter \theta\leftarrow\theta+\eta\Delta , and then proposes a design. Definition 1 . The update direction \Delta\in\Theta is said to be feasible if it is negatively aligned with both gradients \nabla U(\theta) and \nabla C(\theta) : \langle\Delta,\nabla U(\theta)\rangle\leq 0\quad\text{and}\quad\langle\Delta,\nabla C(\theta)\rangle\leq 0. (9) The goal is simple: such an update, up to the first order, minimizes the loss function U while decreasing the constraint C . Proposition 2 (Feasible update’s Guarantee) . Any feasible update ( 9 ) ensures to fulfill the constraint while improving the minimization of the problem ( 5 ). That is, for any feasible \Delta , there exists a sufficiently small learning rate \eta>0 so that starting at \theta_{0} one has U(\theta_{0}+\eta\Delta)\leq U(\theta_{0})\text{ and }C(\theta_{0}+\eta\Delta)\leq 0. (10) Our design for a feasible update is based on two parts: a special weighting of gradients and an aggregation \mathrm{Agg} . Following the necessary condition 1 , we define a selection of the parameters to be updated. This takes the form of a boolean mask: m_{\mathrm{AND}}(\nabla U,\nabla C)_{i}\doteq\begin{cases}1&\text{if}\,\,\nicefrac{{\partial}}{{\partial\theta_{i}}}U\cdot\nicefrac{{\partial}}{{\partial\theta_{i}}}C>0,\\ 0&\text{otherwise}.\end{cases} (11) The interpretation is also simple: the mask indicates the parameters that we can safely update. Up to the first order, a change of one of these parameters modifies both U and C in the same way, whether it is an increase or a decrease. From the construction of the mask, it is easy to design a feasible update by combining both gradients. We define a sign-invariant function \mathrm{Agg}:\mathbb{R}\times\mathbb{R}\to\mathbb{R} . The following construction is feasible as it ensures a negative correlation with the gradients: \Delta_{\mathrm{AND}}\doteq-m_{\mathrm{AND}}\odot\mathrm{Agg}\left(\nabla U,\nabla C\right), (12) with an abuse of notation where the equation is function-wise ( i.e. , \theta is omitted for the sake of simplicity) and where function \mathrm{Agg} is applied component-wise. As for the choice of this sign-invariant function, we propose: \displaystyle\mathrm{Agg}(x,y) \displaystyle=\alpha x+\beta y,\quad(\alpha,\beta)\in\mathbb{R}^{2}_{+}, (13) \displaystyle\mathrm{Agg}(x,y) \displaystyle=\underset{z\in\{x,y\}}{\operatorname{argmin}}\,|z|. (14) The last suggestion is indeed the aggregation choice made in the Mask-Small-Gradients (MSG) method [ 25 ] to compute the random re-initialization before the fine-tuning phase. Figure 1: Masking procedure to ensure agreement between losses with \mathrm{Agg} ( 14 ) in pink and ( 13 ) in blue ( \alpha=0.8 , \beta=0.5 ). Our technique belongs to the first-order methods family that makes a small parameter shift. Additionally, its amplitude can be quantified. Proposition 3 (Vicinity of \theta_{0} ) . Denoting the number of parameters selected by any mask m by \|m(\nabla U,\nabla C)\|_{0} and the update direction \Delta\doteq-m\odot\mathrm{Agg}(\nabla U,\nabla C) . Then the updated parameters \theta=\theta_{0}+\eta\Delta(\theta_{0}) , is close to the original parameter: \forall q\geq 1 \|\theta-\theta_{0}\|_{q}\leq\eta\|m(\nabla U,\nabla C)\left(\theta_{0}\right)\|_{0}^{\nicefrac{{1}}{{q}}}\|\Delta(\theta_{0})\|_{\infty}. (15) Moreover, if the update is based on the absolute min function ( 14 ): \|\theta-\theta_{0}\|_{q}\leq\eta\|m(\nabla U,\nabla C)\left(\theta_{0}\right)\|_{0}^{\nicefrac{{1}}{{q}}}\|\nabla C(\theta_{0})\|_{\infty}. (16) It turns out that if \mathcal{D}_{C}\subset\mathcal{D}_{\mathrm{train}} then \|\nabla C(\theta_{0})\|_{\infty}\simeq 0 because the constraint is usually the classification loss over the data to be retained, i.e. data already seen during the training of M_{\theta_{0}} . Besides, experimentally \|m_{\mathrm{AND}}(\nabla U,\nabla C)\left(\theta_{0}\right)\|_{0} happens to decrease so that the update is at each step a slighter change of the parameters. As models are Lipschitz w.r.t. those parameters [ 37 , 9 ] , the output of the updated model is never drastically different than the output of the initial model. 5 Processing with Batches The previous section explains an add-on technique, assuming that the unlearning procedure has access to functions U and C and their gradients. This section keeps the same optimization problem ( 5 ) but without access to the true gradients \nabla U and \nabla C and we use new notations to clarify this distinction. This illustrates the case where U and C are averages of classification losses over large datasets. Machine learning practitioners typically address this issue by computing gradients over batches. 5.1 Probabilistic Modeling of Gradients We consider a classic statistical model: computed over a random batch, the gradient \hat{g}_{U}(\theta) (resp. \hat{g}_{C}(\theta) ) is a noisy estimation of the true gradient g_{U}(\theta)\doteq\nabla U(\theta) (resp. g_{C}(\theta)\doteq\nabla C(\theta) ): \begin{split}\hat{g}_{U}&=g_{U}+N_{U},\text{with}\quad N_{U}\sim\mathcal{N}(0;\Sigma_{U}),\\ \hat{g}_{C}&=g_{C}+N_{C},\text{with}\quad N_{C}\sim\mathcal{N}(0;\Sigma_{C}),\end{split} (17) where N_{U} and N_{C} are two independent Gaussian random vectors. The estimation noise may induce a modification of some parameters that the true gradients do not recommend (see Fig. 2 ). Our conservative strategy is to make the selection process by the mask ( 11 ) as certain as possible. This amounts to evaluating the probability of a correct selection of the i -th parameter, based on the noisy components \hat{g}_{U,i} and \hat{g}_{C,i} of the gradients observed at a given batch. Figure 2: Masking wrong modification direction caused by noisy gradient, with \mathrm{Agg} ( 13 ) for the updates ( \alpha=0.8 , \beta=0.5 ). Proposition 4 (Gradient’s Probable Alignment) . Given the statistical model ( 17 ) and a batch over which the empirical gradients take the value \hat{g}_{U} and \hat{g}_{C} , the selection of the i -th parameter is a good choice with probability: \mathbb{P}\left[g_{U,i}g_{C,i}>0\,\big|\,\hat{g}_{U},\hat{g}_{C}\right]=\phi_{U,i}\cdot\phi_{C,i}+(1-\phi_{U,i})(1-\phi_{C,i}), (18) where the vector \phi_{U}\doteq\Phi(\nicefrac{{\hat{g}_{U}}}{{\sqrt{\mathrm{diag}(\Sigma_{U})}}}) (idem for \phi_{C} ) and the operators are taken component-wise. \Phi is the cumulative distribution function of a standard Gaussian: \Phi(x)\doteq\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{x}{\exp(-\frac{t^{2}}{2})}\,\mathrm{d}t . Figure 3: Kernel density estimation and frequencies over values. Distribution of the agreeing probabilities \mathbb{P}\left[g_{U,i}g_{C,i}>0\,\big|\,\hat{g}_{U},\hat{g}_{C}\right] for all the parameters of a VGG16 during an unlearning epoch step. Doted vertical line at p=\nicefrac{{1}}{{2}} . Figure 3 shows the empirical distribution of the probability ( 18 ) computed over all the components \theta_{i} for a given batch. Roughly speaking, there is one quarter of the parameters where the signs of the true gradient components likely disagree (small probability), one quarter where they likely agree (large probability), and one half where nothing is certain (probability around \nicefrac{{1}}{{2}} ). This latter case happens typically when at least one of \hat{g}_{U,i} or \hat{g}_{C,i} takes a small value compared to the associated standard deviation, so that \phi_{U,i} or \phi_{C,i} is close to \nicefrac{{1}}{{2}} , and so is the probability ( 18 ). The figure shows that, conditioned on the observation of a batch, those different regimes are evenly represented. An implementation issue is the evaluation of the standard deviation of the estimation noises N_{U,i} and N_{C,i} . A simple solution is to retrieve the standard deviation of the i -th component of the gradient per datum included in the batch. This quantity is indeed computed efficiently as the stacked moving average second-order momentum in the PyTorch implementation of the Adam optimizer [ 21 ] . 5.2 New Masking Strategy In this section, the update is applied on the empirical gradients, but leveraging on Prop. 4 for designing new masks dedicated to batch processing. A first idea is as follows: \displaystyle\Delta_{\mathrm{PROB}} \displaystyle\doteq-m_{\mathrm{PROB}}\odot\mathrm{Agg}\left(\hat{g}_{U},\hat{g}_{C}\right)\quad\text{with} (19) \displaystyle m_{\mathrm{PROB}}(\hat{g}_{U},\hat{g}_{C})_{i} \displaystyle\doteq\begin{cases}1&\text{if}\,\,\mathbb{P}\left[g_{U,i}g_{C,i}>0\,\big|\,\hat{g}_{U},\hat{g}_{C}\right]>p,\\ 0&\text{otherwise}.\end{cases} (20) where p\in(0,1) is a level of certainty. In a nutshell, we modify a parameter if and only if we are certain that the update is locally feasible (see Fig. 2 ). The novelty over saliency masking is threefold. First, SalUn selects parameters where the gradient ascent is confident but implicitly wrongly assumes that all parameter variances are equal. By introducing variance, we can achieve more precision. Second, we replace the arbitrary saliency threshold parameter with an interpretable quantile. Third but not least, SalUn requires the computation of a third gradient to compute the masking while our techniques recycle the already computed gradients. Proposition 5 (Properties of m_{\mathrm{PROB}} ) . The mask m_{\mathrm{PROB}} ( 20 ) equals the mask m_{\text{AND}} ( 11 ) applied on the empirical gradients at a given batch in the following cases: 1. The level of certainty is set to p=\nicefrac{{1}}{{2}} , 2. All variances \Sigma_{U,(i,i)} and \Sigma_{C,(i,i)} tend to 0 and p\in(0,1) . Figure 4: Heatmap of the probability \mathbb{P}\left[g_{U,i}g_{C,i}>0\,\big|\,\hat{g}_{U},\hat{g}_{C}\right] with respect to coordinates (\phi_{U,i},\phi_{C,i})\in(0,1)^{2} . Hatched areas correspond to a probability lower than p , provoking a masking by ( 20 ) - p=0.45 in this example. 5.3 The Focus Vector The level of certainty p is a hyperparameter whose setting is ad hoc. An alternative is a probabilistic mask where each component is randomly sampled according to a Bernoulli distribution \mathcal{B} : \displaystyle\Delta_{\mathrm{BER}} \displaystyle\doteq-m_{\mathrm{BER}}\odot\mathrm{Agg}\left(\hat{g}_{U},\hat{g}_{C}\right)\quad\text{with} (21) \displaystyle m_{\mathrm{BER},i}~ \displaystyle\sim\mathcal{B}(f_{i})\quad\text{where}\,f_{i}\doteq\mathbb{P}\left[g_{U,i}g_{C,i}>0\,\big|\,\hat{g}_{U},\hat{g}_{C}\right]. (22) This probabilistic selection leads, in expectation over (\hat{g}_{U},\hat{g}_{C}) , to a weighting of the update acting as a focus on the parameters more likely to contribute to solving the optimization problem ( 5 ): \begin{split}\mathbb{E}\left[\Delta_{\mathrm{BER}}\,\big|\,\hat{g}_{U},\hat{g}_{C}\right]&=-\mathbb{E}\left[m_{\mathrm{BER}}\odot\mathrm{Agg}\left(\hat{g}_{U},\hat{g}_{C}\right)\,\big|\,\hat{g}_{U},\hat{g}_{C}\right]\\ &=-f\odot\mathrm{Agg}\left(\hat{g}_{U},\hat{g}_{C}\right),\end{split} (23) with f\doteq(f_{i})_{i} the focus vector . Again, by the proof of Prop. 5 Case 2, this tends almost surely, when the variance goes to zero, to the update ( 12 ) applied to the batch gradients. By continuity for low standard deviations, one understands that this update is a good direction for decreasing both U and C . It explains our final design for the update: \Delta_{\mathrm{F}}\doteq-f\odot\mathrm{Agg}\left(\hat{g}_{U},\hat{g}_{C}\right). (24) Algorithm 1 Focus Vector for Unlearning 1: Objective and constraint dataset and loss \mathcal{D}_{U} , \mathcal{D}_{C} and L_{U} , L_{C} ; batch size B ; aggregation function \mathrm{Agg} ; initial parameters \theta_{u}\leftarrow\theta_{0} ; learning rate \eta ; stability term \epsilon ; 2: Updated model parameters \theta_{u} after unlearning 3: for e=1,2,\dots do \triangleright Epoch loop 4: for b=1,2,\dots do \triangleright Batch loop 5: Sample batches 6: (x^{U}_{i},y^{U}_{i})_{i=1}^{B}\sim\mathcal{D}_{U} , (x^{C}_{i},y^{C}_{i})_{i=1}^{B}\sim\mathcal{D}_{C} 7: Compute gradients 8: \hat{g}_{U}\leftarrow\frac{1}{B}\sum_{i=1}^{B}\nabla L_{U}(M_{\theta_{u}}(x^{U}_{i}),y^{U}_{i}) 9: \hat{g}_{C}\leftarrow\frac{1}{B}\sum_{i=1}^{B}\nabla L_{C}(M_{\theta_{u}}(x^{C}_{i}),y^{C}_{i}) 10: Retrieve second-order statistics 11: \Sigma_{U}\leftarrow\texttt{AdamMoments}(L_{U}) 12: \Sigma_{C}\leftarrow\texttt{AdamMoments}(L_{C}) 13: Compute per-parameter focus 14: \phi_{U}\leftarrow\Phi\left(\nicefrac{{\hat{g}_{U}}}{{\sqrt{\mathrm{diag}(\Sigma_{U})+\epsilon}}}\right) 15: \phi_{C}\leftarrow\Phi\left(\nicefrac{{\hat{g}_{C}}}{{\sqrt{\mathrm{diag}(\Sigma_{C})+\epsilon}}}\right) 16: f\leftarrow\phi_{U}\odot\phi_{C}+(1-\phi_{U})\odot(1-\phi_{C}) 17: Compute update direction 18: \Delta_{\mathrm{F}}\leftarrow-f\odot\mathrm{Agg}\left(\hat{g}_{U},\hat{g}_{C}\right) 19: Update parameters 20: \theta_{u}\leftarrow\texttt{Optimize}(\theta_{u},\Delta_{\mathrm{F}},\eta) 21: end for 22: end for 23: return \theta_{u} Knowing that the scalar product of two random vectors concentrates around zero in high-dimensional space [ 6 ] , we state a feasible theoretical guarantee for this last version of the update. Proposition 6 (Focus update’s Theoretical Guarantee) . Let the aggregation \mathrm{Agg} be the linear positive combination ( 13 ) of the gradients with \alpha,\beta>0 . Suppose that the measured gradients \hat{g}_{U} and \hat{g}_{C} are in expectation scalarly independent: \mathbb{E}\left[\langle\hat{g}_{U},\hat{g}_{C}\rangle\right]=0 . Then, the update \Delta_{\mathrm{F}}=-f\odot\left(\alpha\hat{g}_{U}+\beta\hat{g}_{C}\right) is feasible in expectation, and for any sufficiently small learning rate \eta>0 : \displaystyle\mathbb{E} \displaystyle\left[U(\theta_{0}+\eta\Delta_{\mathrm{F}}(\theta_{0}))\right]\leq U(\theta_{0}) (25) \displaystyle\mathbb{E} \displaystyle\left[C(\theta_{0}+\eta\Delta_{\mathrm{F}}(\theta_{0}))\right]\leq 0. (26) We verified experimentally the hypothesis \mathbb{E}\left[\langle\hat{g}_{U},\hat{g}_{C}\rangle\right]=0 . The empirical values of \langle\hat{g}_{U},\hat{g}_{C}\rangle are initially about \pm 10^{-5} and continue decreasing down to \pm 10^{-10} during the unlearning procedure. Proposition 7 (Properties of the Focus Vector f ) . The term-by-term multiplication by the focus vector f corresponds to 1. the mask m_{\text{AND}} ( 11 ) applied on the empirical gradients when the variances \Sigma_{U,(i,i)} and \Sigma_{C,(i,i)} tend to 0 , \forall i , 2. halving the learning rate when the variances \Sigma_{U,(i,i)} and \Sigma_{C,(i,i)} tend to +\infty , \forall i . Prop. 7 shows that the focus vector add-on is a soft trade-off between the \mathrm{AND} mask when the gradient estimation noise is small and a slowdown of the learning rate when the variance is too high. 6 Experiments Table 1: Comparison of mask-based add-ons after 10 epochs of 10% random data forgetting. Upper part: SRL - Cifar10 - VGG16. Bottom part: NGPlus - SVHN - ResNet18. Methods MIA entropy rUA TA RA UA FID SRL 0.89 \pm 0.01 4.62 \pm 0.87 92.77 \pm 0.12 99.24 \pm 0.16 97.78 \pm 0.39 93.21 \pm 0.40 SRL - SalUn 0.89 \pm 0.01 4.70 \pm 0.78 92.80 \pm 0.14 99.25 \pm 0.19 97.85 \pm 0.32 93.36 \pm 0.41 SRL - \mathrm{AND} 0.69 \pm 0.01 2.30 \pm 0.47 92.18 \pm 0.08 98.76 \pm 0.21 95.45 \pm 0.52 91.81 \pm 0.41 SRL - \mathrm{PROB} 0.76 \pm 0.02 0.45 \pm 0.36 91.69 \pm 0.16 98.71 \pm 0.22 93.61 \pm 0.74 90.74 \pm 0.47 SRL - \mathrm{F} 0.77 \pm 0.03 0.41 \pm 0.50 91.71 \pm 0.15 98.75 \pm 0.23 93.57 \pm 0.34 90.60 \pm 0.14 NGPlus 0.94 \pm 0.01 3.13 \pm 0.76 94.75 \pm 0.54 99.74 \pm 0.06 97.98 \pm 0.77 94.24 \pm 0.74 NGPlus - SalUn 0.93 \pm 0.02 2.67 \pm 1.37 94.53 \pm 0.91 99.73 \pm 0.01 97.53 \pm 1.42 93.90 \pm 1.20 NGPlus - \mathrm{AND} 0.54 \pm 0.02 -46.14 \pm 7.45 75.99 \pm 3.39 88.57 \pm 2.96 48.67 \pm 7.72 47.67 \pm 7.91 NGPlus - \mathrm{PROB} 0.88 \pm 0.03 0.43 \pm 1.34 93.18 \pm 1.29 99.53 \pm 0.11 95.24 \pm 1.55 92.24 \pm 1.75 NGPlus - \mathrm{F} 0.89 \pm 0.02 0.14 \pm 0.80 93.42 \pm 0.74 99.56 \pm 0.04 94.99 \pm 0.94 92.25 \pm 1.06 6.1 Experimental Setup All the experiments code is available at https://github.com/owl1996/UnlearningFocusVector and Sect. 6.3 only presents snapshots of this extensive experimental body. Architectures and Datasets. Our experimental protocol focuses on image classification tasks with the datasets CIFAR-10 [ 23 ] and SVHN [ 28 ] , and the deep neural network architectures ResNet18 model [ 16 ] and VGG16 [ 34 ] . Unlearning Scenarios. The protocol considers two scenarios about the dataset \mathcal{D}_{\mathrm{forget}} to be forgotten: • \mathcal{D}_{\mathrm{forget}} is a random fraction of the whole training data, • \mathcal{D}_{\mathrm{forget}} is a random fraction of a specific class. For the first scenario, random forgetting, \mathcal{D}_{\mathrm{forget}} represents 5%, 10%, or 50% of the entire training data. For the second scenario, in class forgetting, \mathcal{D}_{\mathrm{forget}} represents 10%, 40%, or 75% of a class data. Unlearning Methods Saliency techniques and our updating procedures \mathrm{AND} ( 12 ), \mathrm{PROB} ( 19 ), and \mathrm{F} ( 24 ) are coined add-ons because they are generics and they can be applied to different unlearning methods (defined by their losses, constraints, and datasets) introduced in Sect. 4.1 . Our experimental protocol considers SRL, NGPlus, and SCRUB. Benchmark For each method, a baseline is the ideal model trained from scratch in the same way as the initial model but without the forget set \mathcal{D}_{\mathrm{forget}} . We consider the baselines Mask-Small-Gradients (MSG) [ 25 ] and Convolution-Transpose (CT) [ 20 ] , in addition to the following cited in Sect. 2.1 : Fine-Tuning (FT) [ 40 ] , SalUn [ 8 ] and SCRUB [ 24 ] . Of note, MSG and CT participated in the NeurIPS’2023 Machine Unlearning competition [ 36 ] . Moreover, FT, MSG and CT are evaluated as the strongest baselines in [ 3 ] due to their consistent performances across different datasets. In particular, MSG and CT show robustness against powerful per-sample MIAs like U-LiRA. SalUn is similar to our approach as it masks the least salient weights of the gradient ascent over the forget set. It follows the same spirit of our add-ons and is thus a competitor. Hyper Parameters The batch size is 256 for any dataloader, both for training and unlearning. We train the initial and the exact ideal models for 100 epochs with an initial learning rate set to 10^{-1} . For unlearning, the initial learning rate \eta equals 10^{-4} . The linear combination ( 13 ) takes \alpha=0.05 for the gradient of loss L_{U} and \beta=0.95 for the gradient of loss L_{C} . By default, the \mathrm{PROB} add-on sets the quantile parameter p=0.3 . SalUn [ 8 ] uses a median absolute value mask; for SCRUB, we let the additional loss with ponderation \gamma=1 (see Sect. 4.1 ). Multiple Runs For each given setting, the initial model, the unlearning procedure, and the exact ideal model are computed several times with different random seeds to measure means and standard deviations reported in the figures and tables. 6.2 Evaluation Metrics. Our evaluation essentially follows the criteria outlined in [ 19 ] as discussed in Sect. 3.3 : • RTE: Run Time Efficiency (in seconds), • MIA: Membership Inference Attack, • TA: Test Accuracy, • RA: Retain Accuracy, • UA: Unlearning Accuracy. Our protocol train five different support vector classifiers as decision rules b for the MIA ( 4 ), each exploiting different data [ 18 , 43 , 26 , 1 , 7 ] . The different training features used for the MIA are as follows: correctness (binary variable indicating whether the model well classifies the input data), confidence (probability score of the assigned class), logits (the logits output by the model), entropy (the entropy of the output of the model), mix entropy (the mix entropy of the logits). For simplicity, we do not show all five MIA metrics, but report the performance of the ones that achieve the best average score across comparisons: entropy and mix entropy. We introduce two other metrics for the unlearning evaluation. Most works consider that a low the UA is a good indicator but it forces the unlearned model to misclassify the data to be forgotten. The problem is that these data are regular testing data for an ideal model M_{\theta^{\star}} which may still classify them correctly. We define the Relative Unlearning Accuracy (rUA) as: \mathrm{rUA}\doteq\mathbb{P}_{(x,y)\sim\mathcal{D}_{\mathrm{forget}}}\left[M(x)=y\right]-\mathbb{P}_{(x,y)\sim\mathcal{D}_{\mathrm{forget}}}\left[M_{\theta^{\star}}(x)=y\right]. (27) A good forgetting of the data expects rUA to be close to zero. When it is strongly positive, the unlearned model still classifies the data to forget too well, while the ideal model may have a lower accuracy over these data. When it is strongly negative, the procedure is too brutal, provoking catastrophic forgetting of the model. We define the Fidelity score (FID) ( a.k.a. consistency [ 41 ] ): \mathrm{FID}\doteq\mathbb{P}_{(x,y)\sim D_{\mathrm{forget}}}\left[M(x)=M_{\theta^{\star}}(x)\right]. (28) It measures how well the unlearned model mimics the behavior of the ideal model. When the ideal model fails because too much data was forgotten, entailing a loss of the model’s utility, this metric gauges whether the unlearned model makes the same mistakes. These new metrics are applicable only to laboratory experiments, in the sense that they cannot be directly observed in practice, as the ideal model is never fully realized. Yet, they offer a better understanding of what is expected from an unlearning. 6.3 Results According to our study, when keeping the unlearning method and the scenario fixed (class-wise or random), the change of data or model architecture has no impact: the order of the add-ons techniques across all the metrics is conserved. Then, to avoid redundancy and excessive figures, we only report the non-intersecting part of the configurations to exhibit the different regimes of unlearning on which we test our add-ons. 6.3.1 Comparison of Masks Table 1 reports the metrics of mask-based add-ons for two unlearning methods, SRL and NGPlus. It includes no masking (baseline version of SRL and NGPlus), SalUn [ 8 ] , and our variants \mathrm{AND} ( 12 ), \mathrm{PROB} ( 19 ), and \mathrm{F} ( 24 ). Our variants bring better MIA and rUA metrics for a moderate price to pay in terms of TA, RA, and FID. One exception is NGPlus- \mathrm{AND} , which does not perform well. It illustrates the drawback of this add-on when applied to batch processing: an agreement on the sign of the noisy batch gradient components may not lead to such an agreement on the true gradient. Hence, the mask \mathrm{AND} may select parameters incompatible with a locally feasible update. The add-ons \mathrm{PROB} and \mathrm{F} correct this erroneous behavior. Figure 5: Comparison of add-ons (SalUn, \mathrm{AND} , \mathrm{PROB} and \mathrm{F} ) over SRL method. Evolution of the metrics over the number of epochs. Cifar10 – VGG16 – 50% Random forgetting This phenomenon is also visible in Fig. 5 comparing the add-ons over SRL. The simple \mathrm{AND} add-on is more unstable, while \mathrm{F} and \mathrm{PROB} add-ons are a good trade-off between efficiency and efficacy. In each case, the three add-ons we introduce are those that lower the MIA and absolute rUA with few steps of unlearning. As for RTE, our add-on is \approx 22\% slower than the baseline method it is applied to. Of note, SalUn [ 8 ] masks the parameters with the least salient weights of the gradient ascent over the forget set. It requires the computation of a third gradient. This is already available in the NGPlus method, so for this particular trivial method SalUn is as fast as our add-on. Yet, it is not the case in SRL and SCRUB methods, for which SalUn is \approx 55\% slower than the baseline. 6.3.2 Generalization w.r.t. the Unlearning Methods Figure 6: Benefit of the focus vector add-on \mathrm{F} ( 24 ). Evolution of the metrics over the number of epochs for three methods (SRL, NGPlus, and SCRUB). Cifar10 – VGG16 – 10% Class-wise forgetting Fig. 6 shows the main benefit of the focus vector add-on \mathrm{F} ( 24 ): The rUA goes more rapidly down to zero, no matter the method we plug it into (NGPlus, SRL, or SCRUB). As for the MIA, the focus vector add-on is always under the initial method score curve. The price to pay is moderate: a slight loss on the TA and a small increase on the RTE. 6.3.3 Differences between SRL, SCRUB, and NGPlus Figure 7: Comparison of add-ons (SalUn, \mathrm{AND} , \mathrm{PROB} and \mathrm{F} ) over NGPlus method. Evolution of the metrics over the number of epochs. NGPlus – SVHN – ResNet18 – 10% Class-wise forgetting Across the multiple settings of our experimental benchmark, we notice that NGPlus may have a behavior different than SRL and SCRUB. Fig. 7 shows a class-wise forgetting setup where all add-ons lead to similar results. One or two steps of unlearning is sufficient here and indeed recommended to avoid destroying the accuracy of the specific class due to the gradient ascent, which results in stronger MIA. 6.3.4 Benchmark Table 2: Benchmark - Epoch 10 - Cifar10 - VGG16 - 10% Random Forgetting Methods MIA entropy rUA TA RA UA FID Initial 0.91 \pm 0.01 5.82 \pm 0.84 92.66 \pm 0.10 98.63 \pm 0.27 98.73 \pm 0.27 93.00 \pm 0.56 Ideal 0.84 \pm 0.01 0.00 \pm 0.00 92.53 \pm 0.16 99.56 \pm 0.05 92.91 \pm 0.71 100.0 \pm 0.00 FT 0.91 \pm 0.01 5.15 \pm 0.88 92.75 \pm 0.15 99.18 \pm 0.14 98.3 \pm 0.39 93.44 \pm 0.52 MSG 0.76 \pm 0.02 -3.20 \pm 1.13 86.65 \pm 0.56 93.07 \pm 0.84 89.96 \pm 0.66 88.42 \pm 0.69 CT 0.65 \pm 0.08 -16.01 \pm 0.37 76.87 \pm 0.33 80.45 \pm 0.27 77.14 \pm 0.37 77.51 \pm 0.53 SRL 0.89 \pm 0.01 4.62 \pm 0.87 92.77 \pm 0.12 99.24 \pm 0.16 97.78 \pm 0.39 93.21 \pm 0.40 SalUn 0.89 \pm 0.01 4.70 \pm 0.78 92.80 \pm 0.14 99.25 \pm 0.19 97.85 \pm 0.32 93.36 \pm 0.41 NGPlus 0.91 \pm 0.01 3.34 \pm 0.53 92.71 \pm 0.05 99.17 \pm 0.13 96.49 \pm 0.24 92.85 \pm 0.52 SCRUB 0.91 \pm 0.01 5.60 \pm 0.74 92.90 \pm 0.15 99.18 \pm 0.17 98.5 \pm 0.18 93.18 \pm 0.63 SCRUB - SalUn 0.90 \pm 0.01 5.62 \pm 0.74 92.92 \pm 0.04 99.12 \pm 0.18 98.53 \pm 0.2 93.13 \pm 0.66 SCRUB - \mathrm{AND} 1.00 \pm 0.00 4.30 \pm 0.66 92.24 \pm 0.19 98.83 \pm 0.23 97.21 \pm 0.31 92.57 \pm 0.78 SCRUB - \mathrm{F} 0.90 \pm 0.02 5.21 \pm 0.82 92.66 \pm 0.17 99.09 \pm 0.18 98.12 \pm 0.23 93.04 \pm 0.65 SRL - \mathrm{AND} 0.69 \pm 0.01 2.30 \pm 0.47 92.18 \pm 0.08 98.76 \pm 0.21 95.45 \pm 0.52 91.81 \pm 0.41 SRL - \mathrm{PROB} 0.76 \pm 0.02 0.45 \pm 0.36 91.69 \pm 0.16 98.71 \pm 0.22 93.61 \pm 0.74 90.74 \pm 0.47 SRL - \mathrm{F} 0.77 \pm 0.03 0.41 \pm 0.50 91.71 \pm 0.15 98.75 \pm 0.23 93.57 \pm 0.34 90.60 \pm 0.14 Table 2 overall shows that our add-ons are competitive in unlearning efficacy compared to the baselines. The MIA performs poorly over the ideal model, but we are interested in whether the add-on lowers the MIA’s performance. Indeed, our add-ons always lower the initial unlearning method’s score. MSG and CT look resilient to MIA at early epochs because they consist in initially jeopardized a portion of the model parameters. Figure 8: Comparison of baselines with add-on \mathrm{F} over SRL. Evolution of the metrics over the number of epochs. Cifar10 – VGG16 – 10% Random forgetting Figure 9: Comparison of baselines with add-on \mathrm{F} over NGPlus. Evolution of the metrics over the number of epochs. SVHN – ResNet18 – 10% Random forgetting Yet, this initial modification also pulls down the other metrics rUA and TA as shown in Fig. 8 and 9 . Those figures show the evolution of the metrics along the epochs, enabling us to compare the efficacy and efficiency of the methods. The remaining epochs try to recover this parameter randomization in CT and MSG. This slowly improves rUA and TA but also favors the MIA. On the contrary, our solutions converge faster to a lower rUA. Also, the MIA is less efficient. We noticed that MSG needs a more careful setting of the threshold across the different architectures than the 30% proposed by the authors. Our solutions are always faster at decreasing the absolute value of rUA while stabilizing the test accuracy right from the first epochs. To summarize, the relative unlearning accuracy metric quickly reaches zero with our solutions. The competitors need about twice as much time to reach this level of rUA and comparable accuracies. It shows that, in practice, our solutions improve efficiency. 7 Discussion and Limitations Our experimental protocol considers 360 configurations: 5 add-on possibilities (none, salient, \mathrm{AND} , \mathrm{PROB} and focus \mathrm{F} ) over 3 unlearning methods, 2 model architectures, 2 datasets, and 2 types of forgetting scenarios with 3 ratios. In general, our experimental results, not presented here due to a lack of space, confirm our observations over the architectures, the types of forgetting scenarios, and the datasets. The ratio has an impact on the number of epochs. As for the methods, NGPlus is dominated by SRL or SCRUB. NGPlus forces an augmentation of the gradient over the forget set \mathcal{D}_{\mathrm{forget}} , which destroys the model capabilities along the epochs. A big loss on the forget set means that the model has to mostly equivocate on data that must be treated as such as if they belong to the test set. This deludes basic membership inference attacks, showing they are not powerful enough. When the model systematically gives a wrong answer on some data, unlearning is detectable. We recommend using NGPlus during one or two epochs only because the gradient ascent leads to unstable behavior of the resulting model. The saliency masking of SalUn is justified in [ 8 ] by the argument of sparsity but does not take into account the variances while computing the mask. Our paper gives two other justifications: feasible update and the noisy estimation of the gradients when processing by batch. By combining these two arguments, we promote the idea that masking should prevent hazardous update directions. Our focus vector is based on a simple statistical model that enable to derive the probability of a right parameter selection. Finally, we show that the focus vector improves the performance of unlearning algorithms both in efficiency and efficacy. It requires fewer steps to reach an acceptable rUA while conserving the accuracies and lowering the score of population-based MIA. The theoretical analysis assumes that the measured gradients on batches are a noisy representation of a true gradient with a simple Gaussian model. Measured gradients certainly follow a more complex distribution. However, the experiments already show the benefit of this simple assumption. The last limitation of our work concerns the MIA metric. There exist more powerful membership inference attacks specifically in unlearning, such as U-LiRa, but they require an unreasonable amount of computation power. We chose to verify that the unlearned model lowers the performance of some basic MIAs compared to the initial model. We expect that this also holds for U-LiRa knowing that basic attacks generally follow the same tendencies as U-LiRa as shown in [ 15 ] . Appendix: Proofs of the Propositions Proof of Proposition 1 Proof. The first-order Karush-Kuhn-Tucker condition provides a constraint on a candidate solution \bar{\theta} : there exist \mu\geq 0 s. t. \nabla U(\bar{\theta})+\mu\cdot\nabla C(\bar{\theta})=0. Then, by multiplying component-wise by \nabla C(\bar{\theta}) : \nabla U(\bar{\theta})\odot\nabla C(\bar{\theta})+\mu\cdot\nabla C(\bar{\theta})\odot\nabla C(\bar{\theta})=0. We have \left(\nabla C(\bar{\theta})\odot\nabla C(\bar{\theta})\right)_{i}=\left(\nicefrac{{\partial}}{{\partial_{\theta_{i}}}}C(\bar{\theta})\right)^{2}\geq 0, so that \nabla U(\bar{\theta})\odot\nabla C(\bar{\theta})=-\mu\cdot\nabla C(\bar{\theta})\odot\nabla C(\bar{\theta})\leq 0. ∎ Proof of Proposition 2 Proof. Knowing that C(\theta_{0})=0 by definition ( 7 ) and since \langle\Delta,\nabla U(\theta_{0})\rangle<0 and \langle\Delta,\nabla C(\theta_{0})\rangle<0 because the update is feasible, then, up to the first order in \eta , both functions U and C decreases along the direction \Delta . ∎ Proof of Proposition 3 Proof. The norm \|m(\nabla U,\nabla C)\left(\theta_{0}\right)\|_{0} is the number of non-zero components, each of them being lower in absolute value to \|\Delta(\theta_{0})\|_{\infty} : \displaystyle\|\theta-\theta_{0}\|_{q} \displaystyle=\|\eta\Delta(\theta_{0})\|_{q}=\eta\left(\sum_{i}|\Delta(\theta_{0})_{i}|^{q}\right)^{\nicefrac{{1}}{{q}}} \displaystyle\leq\eta\|m(\nabla U,\nabla C)\left(\theta_{0}\right)\|_{0}^{\nicefrac{{1}}{{q}}}\|\Delta(\theta_{0})\|_{\infty}. If \mathrm{Agg}(x,y)=\underset{z\in\{x,y\}}{\operatorname{argmin}}\,|z| , one has both \mathrm{Agg}(x,y)\leq|x| and \mathrm{Agg}(x,y)\leq|y| so that \|\Delta(\theta_{0})\|_{\infty}\leq\|\mathrm{Agg}(\nabla U,\nabla C)\left(\theta_{0}\right)\|_{\infty}\leq\|\nabla C(\theta_{0})\|_{\infty}. ∎ Proof of Proposition 4 Proof. Knowing that the i -th component of the empirical gradient over a given batch equals \hat{g}_{U,i} , we have \phi_{U,i}\doteq\mathbb{P}\left[g_{U,i}>0\,\big|\,\hat{g}_{U,i}\right]=\mathbb{P}\left[N_{U,i}<\hat{g}_{U,i}\,\big|\,\hat{g}_{U,i}\right]=\Phi\left(\frac{\hat{g}_{U,i}}{\sqrt{\Sigma_{U,(i,i)}}}\right). The same holds for \phi_{C,i} . The estimation noises being supposed independent, g_{U,i} and g_{C,i} are both positive with probability \phi_{U,i}\phi_{C,i} . Similarly, they are both negative with probability (1-\phi_{U,i})(1-\phi_{C,i}) . ∎ Proof of Proposition 5 Proof. Case 1: For p=\nicefrac{{1}}{{2}} , we have \displaystyle\quad\phi_{U,i}\phi_{C,i}+(1-\phi_{U,i})(1-\phi_{C,i})>\frac{1}{2} \displaystyle\Leftrightarrow 2\phi_{U,i}\left(\phi_{C,i}-\frac{1}{2}\right)>\phi_{C,i}-\frac{1}{2} \displaystyle\Leftrightarrow\left\{\phi_{U,i}>\frac{1}{2}\cap\phi_{C,i}>\frac{1}{2}\right\}\quad\cup\quad\left\{\phi_{U,i}<\frac{1}{2}\cap\phi_{C,i}<\frac{1}{2}\right\} \displaystyle\Leftrightarrow\left\{\hat{g}_{U,i}>0\cap\hat{g}_{C,i}>0)\right\}\quad\cup\quad\left\{\hat{g}_{U,i}<0\cap\hat{g}_{C,i}<0\right\} \displaystyle\Leftrightarrow\hat{g}_{U,i}\hat{g}_{C,i}>0. Case 2: The function \Phi(x/\sigma) tends to an Heaviside step function when \sigma\to 0 : \Phi(\nicefrac{{x}}{{\sigma}})\underset{\sigma\to 0}{\to}\begin{cases}1&\text{if}\,x>0\\ 0&\text{if}\,x<0\end{cases} Therefore \displaystyle\phi_{U,i}\phi_{C,i} \displaystyle+(1-\phi_{U,i})(1-\phi_{C,i})\underset{\sigma\to 0}{\to} \displaystyle\begin{cases}1\cdot 1+0\cdot 0=1,&\text{if }\hat{g}_{U,i}>0\text{ and }\hat{g}_{C,i}>0\\ 1\cdot 0+0\cdot 1=0,&\text{if }\hat{g}_{U,i}>0\text{ and }\hat{g}_{C,i}<0\\ 0\cdot 1+1\cdot 0=0,&\text{if }\hat{g}_{U,i}<0\text{ and }\hat{g}_{C,i}>0\\ 0\cdot 0+1\cdot 1=1,&\text{if }\hat{g}_{U,i}<0\text{ and }\hat{g}_{C,i}<0.\end{cases} ∎ Proof of Proposition 6 Proof. For any positive \alpha and \beta , we write \displaystyle\mathbb{E}\left[\langle\Delta_{\mathrm{F}},g_{C}\rangle\right] \displaystyle=-\alpha\mathbb{E}\left[\langle f\odot\hat{g}_{U},g_{C}\rangle\right]-\beta\mathbb{E}\left[\langle f\odot\hat{g}_{C},g_{C}\rangle\right] \displaystyle=-\alpha\mathbb{E}\left[\sum_{i}f_{i}\hat{g}_{U,i}g_{C,i}\right]-\beta\mathbb{E}\left[\sum_{i}f_{i}\hat{g}_{C,i}g_{C,i}\right]. For the first term with \alpha , we condition on the observation (\hat{g}_{C},\hat{g}_{U}) . From Prop. 5 Case 1, we know that f_{i}>\frac{1}{2}\Leftrightarrow\hat{g}_{U,i}\hat{g}_{C,i}>0 . We split the sum so that \displaystyle\mathbb{E} \displaystyle\left[\sum_{i}f_{i}\hat{g}_{U,i}g_{C,i}\,\bigg|\,\hat{g}_{U,i},\hat{g}_{C,i}\right]=\sum_{i,f_{i}<\frac{1}{2}}f_{i}\hat{g}_{U,i}\hat{g}_{C,i}+\sum_{i,f_{i}>\frac{1}{2}}f_{i}\hat{g}_{U,i}\hat{g}_{C,i} \displaystyle=-\sum_{i,f_{i}<\frac{1}{2}}f_{i}|\hat{g}_{U,i}\hat{g}_{C,i}|+\sum_{i,f_{i}>\frac{1}{2}}f_{i}\hat{g}_{U,i}\hat{g}_{C,i} \displaystyle\geq-\frac{1}{2}\sum_{i,\hat{g}_{U,i}\hat{g}_{C,i}<0}|\hat{g}_{U,i}\hat{g}_{C,i}|+\frac{1}{2}\sum_{i,\hat{g}_{U,i}\hat{g}_{C,i}>0}\hat{g}_{U,i}\hat{g}_{C,i} \displaystyle=\frac{1}{2}\sum_{i}\hat{g}_{U,i}\hat{g}_{C,i}=\frac{1}{2}\langle\hat{g}_{U},\hat{g}_{C}\rangle Then, in expectation over (\hat{g}_{U},\hat{g}_{C}) : \begin{split}\mathbb{E}\left[\sum_{i}f_{i}\hat{g}_{U,i}g_{C,i}\right]&=\mathbb{E}\left[\mathbb{E}\left[\sum_{i}f_{i}\hat{g}_{U,i}g_{C,i}\,\bigg|\,\hat{g}_{U,i},\hat{g}_{C,i}\right]\right]\\ &\geq\frac{1}{2}\mathbb{E}\left[\langle\hat{g}_{U},\hat{g}_{C}\rangle\right]=0.\end{split} The second term with \beta is trivially positive: \begin{split}\mathbb{E}\left[\sum_{i}f_{i}\hat{g}_{C,i}g_{C,i}\right]&=\mathbb{E}\left[\mathbb{E}\left[\sum_{i}f_{i}\hat{g}_{C,i}g_{C,i}\,\bigg|\,\hat{g}_{C,i}\right]\right]\\ &=\sum_{i}\mathbb{E}\left[f_{i}\hat{g}_{C,i}^{2}\right]\geq 0.\end{split} This concludes that in expectation \mathbb{E}\left[\langle\Delta_{\mathrm{F}},g_{C}\rangle\right]\leq 0. By the same token, interchanging the roles of \alpha and \beta , we obtain \mathbb{E}\left[\langle\Delta_{\mathrm{F}},g_{U}\rangle\right]\leq 0 and the update \Delta_{\mathrm{F}} is feasible in expectation. ∎ Proof of Proposition 7 Proof. Case 1 is a corollary of Prop 5 . For Case 2, we have \Phi(\nicefrac{{x}}{{\sigma}})\underset{\sigma\to\infty}{\to}\nicefrac{{1}}{{2}} , therefore \phi_{U,i}\phi_{C,i}+(1-\phi_{U,i})(1-\phi_{C,i})\underset{\sigma\to\infty}{\to}\nicefrac{{1}}{{2}}\cdot\nicefrac{{1}}{{2}}+(1-\nicefrac{{1}}{{2}})\cdot(1-\nicefrac{{1}}{{2}})=\nicefrac{{1}}{{2}}. ∎