Adapt then Unlearn: Exploring Parameter Space Semantics for Unlearning in Generative Adversarial Networks

Piyush Tiwary, Atri Guha, Subhodip Panda, Prathosh Ap

Introduction

Generative Adversarial Networks (GANs) have achieved remarkable success in producing high-fidelity images. However, their ability to capture complex data distributions also introduces risks, such as the generation of biased, copyrighted, or inappropriate content. Machine unlearning aims to mitigate these risks by enabling models to "forget" specific concepts or classes. In the context of GANs, this task is particularly challenging due to two primary constraints: the lack of access to original training data (data inaccessibility) and the tendency for unlearning to degrade overall image quality or cause unintended forgetting of desirable features (the quality-forgetting trade-off).

Methodology: The Adapt-then-Unlearn Framework

To address these challenges, we propose Adapt-then-Unlearn, a novel two-stage framework that leverages parameter space semantics to achieve effective unlearning without requiring the original training set.

Overview of the Adapt-then-Unlearn framework, illustrating the two-stage process of Negative Adaptation and Unlearning.

Stage 1: Negative Adaptation

In the first stage, the user provides a small set of "negative samples" containing the undesired features. The pre-trained GAN ($G_{\theta_G}$) is adapted using Elastic Weight Consolidation (EWC) to exclusively generate these negative features. This process yields a set of "negative parameters" ($\theta_N$), which serve as a neural signature for the concept to be removed.

Stage 2: Unlearning with Repulsion

The second stage involves training the original model on "positive samples" (images lacking the undesired feature) while incorporating a novel repulsion loss. This loss pushes the model's parameters away from the negative parameters ($\theta_N$). Unlike simple linear extrapolation, which often degrades texture quality, the repulsion loss guides the model to navigate the parameter space more effectively, staying on the manifold of realistic images while discarding the target features.

Parameter Space Semantics

A key insight of this work is that the vector difference between the original weights and the negatively adapted weights corresponds to specific semantic features. By moving in the opposite direction of this vector, the model can effectively "unlearn" the feature while maintaining the underlying distribution's integrity.

Visualizing parameter space semantics. Moving from $\theta_N$ towards $\theta_G$ ($\gamma=1$) and beyond ($\gamma=2$) demonstrates the removal of specific features like bangs or hats.

Experimental Results

The framework was evaluated on MNIST (class-level), AFHQ (class-level), and CelebA-HQ (feature-level). Performance was measured using the Percentage of Un-Learning (PUL), Fréchet Inception Distance (FID) for image quality, and Ret-FID to assess proximity to a model trained from scratch without the target data.

  • High Effectiveness: On the CelebA-HQ dataset, the method achieved a PUL exceeding 90% for features such as "Bangs" and "Hats."
  • Superior Quality: "Adapt-then-Unlearn" maintained significantly lower FID scores compared to baselines like standard fine-tuning or simple extrapolation, indicating higher visual fidelity.
  • Preserving Correlated Features: The method demonstrated a superior ability to preserve correlated features; for instance, it removed "Bangs" without inadvertently altering the gender distribution of the generated faces, a common failure mode in simpler approaches.

Conclusion and Future Work

"Adapt-then-Unlearn" provides a principled approach to GAN unlearning by exploiting the semantic structure of the parameter space. While highly effective, challenges remain in perfectly isolating deeply interconnected features. Future research will explore the extension of these principles to iterative generative models, such as Diffusion models, where parameter space semantics may manifest differently.

Summary updated

BibTeX
@article{tiwary2025adapt,
  author = {Piyush Tiwary and Atri Guha and Subhodip Panda and Prathosh AP},
  title = {{Adapt then Unlearn: Exploring Parameter Space Semantics for Unlearning in Generative Adversarial Networks}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2025},
}
Figure