Machine Unlearning › The Formal Shape of the Problem

Michael BrenndoerferDecember 1, 20264 min read
Language AI HandbookAll chapters
Part 45 of 67Knowledge, Memory, Editing, and Unlearning
Chapter 350Machine Unlearning › The Formal Shape of the Problem
Reading section 3 of 13 · The Formal Shape of the Problem · 4 minSection 3 of 13 · 4 min

Section 3 of 13 · 4 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

The approximate update in this chapter starts from θ0\theta_0 and minimizes a proxy loss:

J(θ)=−Lf(θ)+Lr(θ)+λ∥θ−θ0∥22.J(\theta)=-L_f(\theta)+L_r(\theta)+\lambda\lVert\theta-\theta_0\rVert_2^2.

The candidate parameters are θ\theta. The terms LfL_f and LrL_r are mean cross-entropy on the forget and retain sets, respectively. The parameter λ≥0\lambda\ge 0 weights the squared parameter displacement. Minimizing JJ pushes forget cross-entropy up, pushes retain cross-entropy down, and penalizes moving far from the original model. The penalty is soft. The update has no term that measures agreement with a fresh retrain.

With learning rate η\eta, one gradient step at parameters θt\theta_t gives:

θt+1=θt+η∇Lf(θt)−η∇Lr(θt)−2ηλ(θt−θ0).\theta_{t+1}=\theta_t+\eta\nabla L_f(\theta_t)-\eta\nabla L_r(\theta_t)-2\eta\lambda(\theta_t-\theta_0).

The first two gradients act on different sets. The factor of two comes from differentiating the squared norm. Because the gradients can point in competing directions, the combined step need not improve each of the three terms on its own.

Another family estimates the effect of a small change in the training objective. Let R(θ)=n−1∑i=1nℓ(zi,θ)R(\theta)=n^{-1}\sum_{i=1}^n\ell(z_i,\theta) be a smooth empirical risk over nn examples, and let θ^\hat\theta be a local minimizer with invertible Hessian H=∇2R(θ^)H=\nabla^2 R(\hat\theta). On a differentiable branch of stationary points θ^ε,z\hat\theta_{\varepsilon,z} for R(θ)+εℓ(z,θ)R(\theta)+\varepsilon\ell(z,\theta), Koh and Liang's upweighting influence is

dθ^ε,zdε∣ε=0=−H−1∇θℓ(z,θ^).\left.\frac{d\hat\theta_{\varepsilon,z}}{d\varepsilon}\right|_{\varepsilon=0} =-H^{-1}\nabla_\theta\ell(z,\hat\theta).

Here ℓ(z,θ)\ell(z,\theta) is the loss for example zz, and ε\varepsilon changes its weight in the empirical objective. Differentiate the stationarity condition to get H dθ^ε,z/dε+∇θℓ(z,θ^)=0H\,d\hat\theta_{\varepsilon,z}/d\varepsilon+\nabla_\theta\ell(z,\hat\theta)=0 at zero. Removing one example's contribution sets ε=−1/n\varepsilon=-1/n, so the first-order displacement is approximately +H−1∇θℓ(z,θ^)/n+H^{-1}\nabla_\theta\ell(z,\hat\theta)/n. For this unregularized risk, dividing the remaining sum by n−1n-1 instead of nn preserves its minimizers. With regularization the relative scaling needs separate treatment. A finite removal can also move training away from the branch on which the derivative was computed.

Training-data exposure can matter differently at the level of language. Carlini et al. report that, in the models and extraction settings they studied, measured memorization increased with model capacity, the number of duplicated examples and the amount of supplied context. That makes it important to state how a text-reproduction probe was constructed. A result averaged over one prompt collection leaves open what would happen with a different prompt.

What Does a Parameter Update Preserve?

In the gradient objective, small displacement means Euclidean proximity in the parameters being updated. For a fixed model and parameter ordering it is a well-defined number. It need not be proportional to change in outputs. In a network with a linear layer followed by an elementwise nonlinearity and another linear layer, permuting the hidden units and permuting the corresponding next-layer columns preserves the same function. The parameter difference can then be large while input-output predictions stay identical. Conversely, an input near a decision boundary can change its predicted label after a small change to the logits.

Both observations are easy to see by looking at the classifier below. Its second layer computes a sum of weighted hidden activations. Relabeling the activations together with the matching outgoing weights merely reorders that sum. For the decision boundary, suppose two competing logits differ by 0.01 on a point. If the initially lower logit rises by 0.02 relative to the higher one, their order flips. The size of that response depends on the starting margin and the input. The squared weight penalty in our example encourages proximity to the original parameters; we use separate prediction measurements to describe output behavior.

The optimizer also acts on two averages, each with its own inputs. For a forget set with nfn_f records and a retain set with nrn_r records, individual examples enter −Lf+Lr-L_f+L_r with coefficients −1/nf-1/n_f and +1/nr+1/n_r, respectively. This groups the losses when selecting the update. Someone reading an unlearning paper needs to know if the experiment weights the average loss from each cohort, averages over a union, samples steps in a particular ratio, or matches logits to a teacher. Those procedures can apply different pressure to the same few records.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy