                           DSDA: Source-free Unlearning via Data Synthesis and Multitask Learning

stage second-order Runge-Kutta method, which improves                 Algorithm 1 Data synthesis with EGDS/AEGDS
accuracy by incorporating intermediate gradient evaluations,          Input: Target class y, score function sθ , sequence of time
reducing the errors of first-order approximations. Specif-                steps {ti }N                      N
                                                                                      i=0 , step size {αti }i=0 , momentum decay
ically, the synthetic data at each time step ti is updated                factor γ
following:                                                                               y
                                                                       1: Initialize: x̂0 ∼ N (0, I), v0 = 0
                                                                       2: for i = 0 to N − 1 do
           x′ = x̂yti + η∆ti di + 2αti ϵti ,
                                  p
                                                                   3:    if adopt EGDS then
         y         y                  1          1 ′                   4:       Sample ϵi ∼ N (0, I)
       x̂ti+1 = x̂ti + αti ∆ti 1 −          di + di      (5)                                                                   √
                                     2η         2η                     5:       Update data: x̂yi+1 ← x̂yi + αi sθ (x̂yi , y) + 2αi ϵi
                p
              + 2αti ϵti ,                                             6:    else if adopt AEDGS then
                                                                       7:       Sample ϵti ∼ N (0, I)
 where di = sθ (x̂yti , y) (black arrow in Figure 1)), d′i =           8:       di ← sθ (x̂yti , y)    √
sθ (x′ , y) (grey arrow in Figure 1)), ∆ti = ti+1 − ti and η is        9:       x′ ← x̂yti + ∆ti di + 2αti ∆ti ϵti
                                                                                  ′          ′
a weight parameter. We set η = 1, corresponding to Heun’s             10:       di ← sθ (x , y)
second-order method (Ascher & Petzold, 1998).                         11:       v̂i+1 ← 21 di + 12 d′i
                                                                      12:       Update momentum: vi+1 ← γvi + αti v̂i+1
To further accelerate the sampling process, we incorporate            13:       Update data: x̂yti+1 ← x̂yti + ∆ti vi+1 +
Nesterov’s momentum (Nesterov, 1983) which can improve                          √
                                                                                    2αti ∆ti ϵti
convergence rates in gradient-based optimization. The mo-             14:    end if
mentum vi+1 at each time step is updated as:                          15: end for
                                                                      Output: Generated sample x̂yN (EDGS) or x̂ytN (AEDGS)
                   vi+1 = γvi + αti v̂i+1 ,                 (6)

where v̂i+1 = 12 di + 12 d′i (blue arrow in Figure 1)), vi is
the previous momentum (yellow arrow in Figure 1)) and                 the forget classes. This objective is expressed through a
γ is a momentum decay factor. The momentum term ef-                   forget loss function LF (D̂f ; θ) = −LCE (M (x̂f ; θ), yf ),
fectively leverages past gradients to accelerate convergence          where x̂f and yf represent the synthetic forget data and their
and smooth the updates. We formulate the overall algo-                class labels. The overall unlearning objective is then for-
rithm for AEGDS in Algorithm 1. We leverage the AEGDS                 mulated as a weighted combination of these two objectives:
mechanism to perform class-wise sampling with parallel                LT (D̂r ; D̂f ; θ) = λ1 LR (D̂r ; θ) + λ2 LF (D̂f ; θ) , where λ1
computing, generating synthetic data for each class in Cr             and λ2 are hyper-parameters.
and Cf to form D̂r and Dˆf .
                                                                      Discriminative Feature Alignment Objective However,
3.3. Discrimination-Aware Multitask Optimization                      the above objectives exhibit notable limitations when di-
                                                                      rectly optimized. Specifically, we fine-tune the original
After Section 3.2, we have obtained synthetic retain and
                                                                      model using LT to achieve unlearning. By comparing
forget datasets D̂r and Dˆf Then in this section, we propose
                                                                      the feature distributions of fine-tuned ResNet18 model on
the DAMO method to fulfill the unlearning task . To begin
                                                                      CIFAR-10 (shown in Figure 2 (c)) with those of the original
with, we observe from visualization of future space that the
                                                                      and retrained ResNet18 models (shown in Figure 2 (a) and
separability and compactness of the retain classes are dis-
                                                                      (b)), we draw two key observations: (1) In the retrained
rupted during unlearning, which motivates the introduction
                                                                      model, samples from the forgot classes are scattered near
of the discriminative feature alignment objective. To further
                                                                      the boundary of retain classes. Moreover, compared to the
resolve gradient conflicts among multiple objectives, we
                                                                      original model, the retained class samples form compact
develop a multitask optimization strategy for more balanced
                                                                      clusters with clearer separations between classes in the re-
and effective unlearning.
                                                                      trained model. (2) Conversely, in the unlearned model, the
                                                                      forget class samples are more widely dispersed across mul-
Dual unlearning objectives Following existing studies
                                                                      tiple retained classes, which weakens both the inter-class
(Golatkar et al., 2020), We decompose the unlearning pro-
                                                                      separability and the intra-class compactness of the retain
cess into two distinct objectives, formalized as follows: The
                                                                      classes. As a result, the model’s performance declines due
retain objective ensures the model maintains performance
                                                                      to the disruption in feature distributions.
on the retain classes. This is expressed by the retain loss
function LR (D̂r ; θ) = LCE (M (x̂r ; θ), yr ), where x̂r rep-        In light of the above observations and existing studies (Wang
resents the synthetic data samples in D̂r and yr represents           et al., 2025), we propose the discriminative feature align-
the corresponding retain class labels. In contrast, the for-          ment objective to improve unlearning performance. This
get objective aims to degrade the model’s performance on              objective is designed to simultaneously improve intra-class

                                                                  5
