Selective Amnesia: A Continual Learning Approach to Forgetting in Deep Generative Models

The recent proliferation of large-scale text-to-image models has led to growing concerns that such models may be misused to generate harmful, misleading, and inappropriate content. Motivated by this issue, we derive a technique inspired by continual learning to selectively forget concepts in pretrained deep generative models. Our method, dubbed Selective Amnesia, enables controllable forgetting where a user can specify how a concept should be forgotten. Selective Amnesia can be applied to conditional variational likelihood models, which encompass a variety of popular deep generative frameworks, including variational autoencoders and large-scale text-to-image diffusion models. Experiments across different models demonstrate that our approach induces forgetting on a variety of concepts, from entire classes in standard datasets to celebrity and nudity prompts in text-to-image models. Our code is publicly available at https://github.com/clear-nus/selective-amnesia.

Paper

Similar papers

Peer review

Reviewer ehLH6/10 · confidence 4/52023-06-11

Summary

This paper draws inspirations from continual learning and proposes a Selective Amnesia method to selectively forget concepts in pre-trained generative models. The proposed method is implemented in a widely-used framework of Bayesian continual learning, together with generative replay to optimize the objective. Experiments on several datasets demonstrate the effectiveness of the proposed method.

Strengths

1. The paper is well-organized and easy to follow. 2. The reverse application of the continual learning process to forget certain concepts is an interesting idea. 3. The experimental results, especially for the case study on Stable Diffusion, seem to be remarkable. This may contribute to realistic applications in erasing harmful concepts and protecting privacy.

Weaknesses

1. The idea of selective or graceful forgetting has been explored in continual learning. In particular, AFEC [1] also considers a similar Bayesian-based framework and controls a forgetting rate to incorporates a non-informative prior $p(\theta)$. Interestingly, I find Eq.(2) also derive the prior $p(\theta)$. Therefore, a comparison of the proposed Selective Amnesia and AFEC is necessary. 2. The experiments only compare Selective Amnesia and Original. Although the results of selective forgetting seem to be remarkable, is it possible to compare with representative baselines of continual learning and/or machine unlearning? 3. A primary motivation of this work is to avoid the computational overhead of retraining all old data. However, the proposed method relies on strong generative replay, which potentially deviates from the motivation. I encourage the authors to compare the computational overhead of generative replay, and also consider it when comparing with other baselines. [1] AFEC: Active Forgetting of Negative Transfer in Continual Learning. NeurIPS 2021.

Questions

My major concerns include the comparison of AFEC, more advanced baselines and computational cost of generative replay. Please refer to the weakness.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

The authors have discussed the limitations and potential negative impact.

Reviewer VhMr6/10 · confidence 3/52023-07-01

Summary

The paper aims to forget selected concepts from deep generative models trained with variational inference with a focus on the trustworthiness such as malicious prompts. The paper introduces a continue learning approach that combines EWC and GR to maximize the likelihood (or ELBO) on the remembered set. Experimentally, the paper evaluates forgetting qualities for simple models on standard datasets and for large scale stable diffusion on real world datasets.

Strengths

The forgetting task is very meaningful and important as we are now facing such trustworthy challenges in the large model era. The continual learning approach that combines EWC and GR is a good idea and solves several practical difficulties as discussed in the methodology section. There is theory that could guarantee improved likelihood after using the surrogate loss. The framework applies to several types of models trained with likelihood or ELBO. The results on forgetting identity and malicious contents from stable diffusion are interesting and potentially useful.

Weaknesses

The selection of $q$ is not well studied in experiments and seems arbitrary. There should be more detailed explanation on the selection of $q$. The paper lacks analysis on the computational resources needed for the continual learning approach. The experimental results for simple models on standard datasets are not compared to baseline methods. There are a few methods for similar goals in the wild including data redaction, feature unlearning, model rewriting, model taming, etc. The experimental results for stable diffusion do not seem to be better than baseline methods, especially the "erasing concepts from diffusion models". Some minor points: I recommend the authors to discuss more related research (mentioned above) in the related work section so that readers can have a better sense of the literature. Please check typos and unbalanced parentheses in the math equations.

Questions

What is the criteria of selecting $q$? Why does the selection of $q$ leads to mapping of concepts (line 262)? How much computational resource (memory and time) do you need to continual-learn stable diffusion? Do you fine-tune a subset of layers or train all layers? What is the advantage of the proposed method compared to baseline methods for stable diffusion?

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

2 fair

Presentation

3 good

Contribution

3 good

Limitations

The paper addressed limitations in the last section.

Reviewer n35v7/10 · confidence 4/52023-07-05

Summary

In this work, authors introduce Selective Amnesia - a new method for selective forgetting of particular concepts in generative modeling without access to the training data. Authors propose to use Continual Learning methods - namely, Elastic Weights Consolidation and Generative Replay to retrain the base model with carefully selected additional data that promote forgetting of examples conditioned on particular conditional values without affecting the other ones. In particular, to enforce forgetting, authors introduce a surrogate objective that, instead of just minimizing the probability of generating examples from a distribution that needs to be forgotten, substitutes it with a different one e.g., random noise.

Strengths

- This submission tackles an important problem crucial for the reliable use of recent ML applications. - The main contribution is clear, seems to be well thought and is well presented both in terms of intuition and details. - The proposed evaluation is extensive, convincing, and well-structured. The experiment results conducted on several datasets with multiple methods are impressive. Simple experiments were implemented with Variational Autoencoders, while the more extensive ones with high-quality datasets employed diffusion models. - The work is well-written and easy to follow. - Additionally to the main contribution, this work introduces an interesting reformulation of the EWC method.

Weaknesses

The proposed method does not really enforce forgetting the particular concept but rather promotes replacing it with a different one. This might lead to fake associations between conditional values and generated outputs. For example, as presented in this work, forgetting “Brad Pitt” generations by learning to generate a “male clown” instead might also affect other generations with prompts similar to “Brad Pitt” - e.g. other actors. This problem should be more evident when trying to forget more general concepts by replacing them with different ones. To make the method more general, it would be interesting to find a technique that automatically finds the suitable surrogate dataset. Small: - Small detail: "most prior work on continual learning for generative models are applied to GANs [19, 20], while our work is primarily concerned with variational models." - This is not true, see, for example (1,2,3,4,5). Those methods tackle the problem of continual learning of variational models, so the fact that they already exist does not affect the novelty of this work. However, I think it would be beneficial to mention at least [1], that first introduced EWC for Variational Autoencoders. I don’t believe the rest should be cited, but I just wanted to point those to authors as potentially interesting for any future works. 1. Nguyen, Cuong V., et al. "Variational Continual Learning." International Conference on Learning Representations. 2. Egorov, Evgenii, Anna Kuzina, and Evgeny Burnaev. "BooVAE: Boosting approach for continual learning of VAE." Advances in Neural Information Processing Systems 34 (2021): 17889-17901. 3. Achille, Alessandro, et al. "Life-long disentangled representation learning with cross-domain latent homologies." Advances in Neural Information Processing Systems 31 (2018). 4. Mundt, M., Pliushch, I., Majumder, S., Hong, Y., & Ramesh, V. (2022). Unified probabilistic deep continual learning through generative replay and open set recognition. Journal of Imaging, 8(4), 93. 5. Deja, Kamil, et al. "Multiband VAE: Latent Space Alignment for Knowledge Consolidation in Continual Learning." IJCAI 2022Limitation - how precise is the forgetting presented in this method? What happens if the concept we want to forget is highly correlated with another one? E.g. if we take CelebA dataset, I think it might be very hard to forget the “wearing lipstick” class without forgetting “heavy makeup” one. From a more precise point of view, I believe this question relates to the problem of how adequate is the approximation of p(x|c)p_f(c) with generations with concepts that we want to forgot/remember? What would happen if we simply skip the EWC regularisation term and continue model retraining with only two ELBOs with generative replay?

Questions

- How precise is the forgetting presented in this method? What happens if the concept we want to forget is highly correlated with another one? E.g. if we take CelebA dataset, I think it might be very hard to forget the “wearing lipstick” class without forgetting “heavy makeup” one. From a more precise point of view, I believe this question relates to the problem of how adequate is the approximation of p(x|c)p_f(c) with generations with concepts that we want to forgot/remember? - What would happen if we simply skip the EWC regularisation term and continue model retraining with only two ELBOs with generative replay?

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

4 excellent

Contribution

3 good

Limitations

Authors address the main limitations of the work except from the one described in weaknesses/questions

Reviewer bzv76/10 · confidence 3/52023-07-06

Summary

This paper presents a technique called Selective Amnesia, which enables controllable forgetting of concepts in pretrained deep generative models. The authors show that this technique can be applied to a variety of models, including text-to-image and VAEs, and can be framed from the perspective of continual learning. The paper discusses two popular approaches used in their work: Elastic Weight Consolidation and Generative Replay. The authors argue that this technique can be used to prevent the generation of harmful, misleading, and inappropriate content by deep generative models.

Strengths

1. The manuscript ventures to address a vital and emergent challenge — ensuring content safety within the ambit of generative artificial intelligence. This issue is of critical importance, given the increasing prevalence and capabilities of generative models, coupled with the potential risks and implications associated with their misuse. The authors' focus on such a topical concern is commendable and lends significant relevance and timeliness to their work. 2. The authors introduce a model inspired by continual learning — a concept that, while established in the broader field of machine learning, presents a novel approach in the specific context of generative model safety. This inventive application of continual learning principles adds a fresh dimension to the discourse on generative model safety, thereby enhancing the manuscript's contribution to this field of study. 3. The selection of datasets for the empirical evaluation is impressively diverse. The authors have conducted experiments on a broad spectrum of datasets, ranging from simpler, well-established ones such as MNIST to more complex, real-life image datasets. This range serves to validate the robustness and versatility of their model across different levels of complexity and in varied contexts, adding significant credibility to their findings. Furthermore, this choice reflects a meticulous approach to experimental design, allowing the model's performance to be tested and evaluated under a wide array of conditions. 4. The quality of exposition is commendable. The paper presents a clear narrative, beginning with the intuitive premise, followed by a comprehensive description of the model, including a highly useful algorithmic representation. The logical sequencing of these sections facilitates reader comprehension. The authors have succeeded in presenting a complex topic in an accessible and cogent manner.

Weaknesses

The manuscript is of high quality and is presented competently, with no major flaws readily apparent. However, my primary concern pertains predominantly to the scope and rigor of the quantitative evaluation. 1. The current quantitative evaluation is exclusively conducted on relatively simple datasets. While this serves as a valid starting point, extending the quantitative evaluation to more challenging datasets would provide a more comprehensive perspective on the model's performance. Although this might present additional difficulties, I would encourage the authors to devise some form of quantitative measure, even if it requires human assessment for accuracy. Such a quantitative comparison would help to mitigate potential selection bias and lend greater credence to the results. 2. A more thorough discussion on the chosen baseline models and the current state-of-the-art models would be greatly beneficial. By elucidating how these models relate to the proposed model, and where they diverge, the authors could provide a clearer context for their work. Such discourse would enhance the readers' understanding of the field's landscape and allow them to appreciate the distinctiveness and the value of the authors' contribution more deeply. 3. The comparative analysis currently conducted is primarily qualitative in nature. However, this leaves a gap in the evaluation, as quantitative comparisons can provide unique insights that are not always captured by qualitative analysis. Quantitative comparisons can offer more objective, replicable, and measurable findings, which are highly valuable in establishing the proposed model's superiority over existing models. Addressing these concerns would add depth to the study, providing a more rigorous and holistic evaluation of the proposed model. Such improvements would be of significant value, helping to fortify the authors' claims and making a more compelling case for the paper's contributions to the field.

Questions

Please refer to the above sections for detailed discussion.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

Yes, there is a section at the end of the paper discussing limitations and future research opportunities.

Reviewer n35v2023-08-14

Rebuttal comment

Thank you for addressing all of my comments and questions and for pointing out the discussion on the concept leakage in the appendix. I agree that this might be a double-edged sword, although this is a significant limitation of this work if someone wants to apply it in practice. Maybe the careful selection of the surrogate distribution could help in preventing changes in the correlated concepts? I am satisfied with the reply, and I am strongly convinced that this work should be accepted for NeurIPS.

Authorsrebuttal2023-08-15

Thank you for your positive remarks! Regarding the selection of $q$ to further prevent concept leakage, this may be possible in conjunction with other schemes, e.g., training only the cross-attention in Stable Diffusion. Another approach might be to automatically remap highly-correlated concepts to related $q$'s, but this remains future work.

Reviewer ehLH2023-08-15

Reviewer response

Thank you for replying to my comments and questions. This rebuttal has addressed my concerns. I appreciate the idea of introducing graceful forgetting in generative models, which is importance for realistic applications. The use of ChatGPT for generative replay is also an innovative idea for this technical route (especially for Diffusion Models). I increase my score and prefer to accept this paper.

Reviewer VhMr2023-08-18

Reply

Thanks the authors for the reply. The response addressed some of my questions. Regarding baseline models, please include the discussion in the related work section. I like the idea of more "semantic relevance" of the proposed model. Table 2 is good. However, I still feel there lack a systematic evaluation if you are trying to show this is a general phenomenon that does not restrict to faces or some specific examples. I'm increasing my score to 6.

Authorsrebuttal2023-08-21

We thank the reviewer for raising their score and for providing additional feedback. We agree with the reviewer that a systematic evaluation of forgetting a variety of concept types is desirable. However, this would require a general framework (vis-a-vis our classifier-based approach), such as evaluation of the model’s likelihoods, and benchmark datasets which is an interesting an avenue for future research. Within the context of this paper, we have conducted additional experiments on forgetting artist styles (for e.g., forgetting “van gogh style” by setting $q$ to images of “pop art style”) and obtained positive results. We will include these in the revised appendix. Taken together with the main quantitative and qualitative results, we believe this shows that Selective Amnesia works on a variety of concepts.

Reviewer bzv72023-08-21

Thanks for the rebuttal. It has addressed most of my conners. With everything considered, I'd raise my rating to 6.

Authorsrebuttal2023-08-21

We thank the reviewer for their positive feedback and for raising their score!

Program Chairsdecision2023-09-21

Decision

Accept (spotlight)

© 2026 NYSGPT2525 LLC