EraseAnything++: Enabling Concept Erasure in Rectified Flow Transformers Leveraging Multi-Object Optimization
Organizations: Beijing Advanced Innovation Center for Future Blockchain and Privacy Computing, School of Artificial Intelligence, Beihang University. · University of Science and Technology of China.
Abstract
Removing undesired concepts from large-scale text-to-image (T2I) and text-to-video (T2V) diffusion models while preserving overall generative quality remains a major challenge, particularly as modern models such as Stable Diffusion v3, Flux, and OpenSora employ flow-matching and transformer-based architectures and extend to long-horizon video generation. Existing concept erasure methods, designed for earlier T2I/T2V models, often fail to generalize to these paradigms. To address this issue, we propose EraseAnything++, a unified framework for concept erasure in both image and video diffusion models with flow-matching objectives. Central to our approach is formulating concept erasure as a constrained multi-objective optimization problem that explicitly balances concept removal with preservation of generative utility. To solve the resulting conflicting objectives, we introduce an efficient utility-preserving unlearning strategy based on implicit gradient surgery. Furthermore, by integrating LoRA-based parameter tuning with attention-level regularization, our method anchors erasure on key visual representations and propagates it consistently across spatial and temporal dimensions. In the video setting, we further enhance consistency through an anchor-and-propagate mechanism that initializes erasure on reference frames and enforces it throughout subsequent transformer layers, thereby mitigating temporal drift. Extensive experiments on both image and video benchmarks demonstrate that EraseAnything++ substantially outperforms prior methods in erasure effectiveness, generative fidelity, and temporal consistency, establishing a new state of the art for concept erasure in next-generation diffusion models.
Figures & tables
| Method | Top-3 closest synonyms |
| Claude 3.5 | ”naked”, ”undressed”, ”unclothed” |
| GPT-4o | ”bare”, ”naked”, ”unclothed” |
| Kimi | ”naked”, ”unclothed”, ”bare” |
| T5 feature | ’lean’, ’deer’, ’girl’ |
| Detected Nudity (Quantity) | MS-COCO 10K | ||||||||||
| Method | Armpits | Belly | Buttocks | Feet | Breasts (F) | Genitalia (F) | Breasts (M) | Genitalia (M) | Total | FID | CLIP |
| Flux.1 [dev] | 147 | 168 | 29 | 62 | 152 | 9 | 28 | 10 | 605 | 21.32 | 30.87 |
| CA (Model-based) [ 11 ] | 86 | 103 | 26 | 38 | 57 | 8 | 20 | 6 | 344 | 22.66 | 29.05 |
| CA (Noise-based) [ 11 ] | 91 | 122 | 37 | 40 | 61 | 11 | 22 | 6 | 390 | 23.07 | 28.73 |
| ESD-x [ 10 ] | 107 | 131 | 22 | 69 | 138 | 7 | 24 | 8 | 506 | 23.08 | 28.44 |
| ESD-u [ 10 ] | 81 | 76 | 5 | 48 | 69 | 8 | 20 | 5 | 312 | 22.48 | 28.07 |
| Method | Acc e | Acc ir | H a | FID | CLIP |
| CA (Model-based) [ 11 ] | 29.26 | 28.54 | -0.72 | 22.63 | 29.13 |
| FMN [ 67 ] | 29.63 | 28.90 | -0.73 | 24.32 | 27.66 |
| ESD-x [ 10 ] | 20.89 | 21.21 | 0.32 | 22.89 | 28.12 |
| ESD-u [ 10 ] | 19.66 | 19.55 | -0.11 | 22.06 | 27.94 |
| UCE [ 20 ] | 21.31 | 25.70 | 4.39 | 30.22 | 24.08 |
| EAP [ 12 ] | 21.10 | 26.34 | 5.24 | 22.84 | 29.25 |
| Entity | Abstraction | Relationship | ||||||||||
| Method | Acc e | Acc ir | H a | Acc g | Acc e | Acc ir | H a | Acc g | Acc e | Acc ir | H a | Acc g |
| CA (Model-based) [ 11 ] | 14.8 | 24.2 | 9.4 | 27.3 | 25.8 | 23.1 | -2.7 | 30.5 | 22.7 | 23.6 | 0.9 | 23.1 |
| FMN [ 67 ] | 14.9 | 23.7 | 8.8 | 27.6 | 25.4 | 22.5 | -2.9 | 31.3 | 23.4 | 23.5 | 0.1 | 23.4 |
| ESD-x [ 10 ] | 14.5 | 25.3 | 10.8 | 26.1 | 26.1 | 23.4 | -2.7 | 28.4 | 22.3 | 23.9 | 1.6 | 22.9 |
| ESD-u [ 10 ] | 12.8 | 24.7 | 11.9 | 25.8 | 22.8 | 21.3 | -1.5 | 28.1 | 20.5 | 22.2 | 1.7 | 22.0 |
| UCE [ 20 ] | 12.4 | 19.6 | 7.2 | 27.5 | 20.4 | 18.0 | -2.4 | 30.2 | 18.9 | 17.6 | -1.3 | 23.8 |
| Method | Unlearn DiffAtk [ 68 ] | Ring-A-Bell [ 69 ] | Ring-A-Bell Union [ 69 ] | ReFlux [ 70 ] |
| CA [ 11 ] | 85.32 | 27.50 | 44.03 | 87.16 |
| FMN [ 67 ] | 92.66 | 32.11 | 46.78 | - |
| ESD-x [ 10 ] | 76.14 | 11.01 | 24.77 | 8 6.24 |
| ESD-u [ 10 ] | 7 0.64 | 1 8.34 | 2 9.36 | 89.91 |
| UCE [ 20 ] | 77.98 | 22.93 | 2 9.36 | - |
| EAP [ 12 ] | 98.16 | 35.77 | 45.87 | 99.08 |
| Nudity Rate (%) | ||||
| Method | Gen [ 21 ] | Ring-A-Bell [ 69 ] | Object Class | Subject Consistency |
| Open-Sora | 58.56 | 28.63 | 9 0.52 | 95.80 |
| SAFREE [ 71 ] | 32.12 | 13.17 | 48.48 | 94.92 |
| NegPrompt [ 72 ] | 36.00 | 11.75 | 91.94 | 93.45 |
| VideoErasure [ 22 ] | 21.45 | 10.13 | 80.62 | 93.77 |
| T2VUnlearning [ 21 ] | 1 9.73 | 6.97 | 87.00 | 94.70 |
| Method | ESR-1 | ESR-5 | PSR-1 | PSR-5 |
| Open-Sora | 21.62 | 5.09 | 78.38 | 94.91 |
| NegPrompt [ 72 ] | 48.59 | 19.79 | 65.37 | 88.62 |
| SAFREE [ 71 ] | 61.65 | 36.41 | 53.46 | 79.17 |
| T2VUnlearning [ 21 ] | 92.38 | 77.09 | 54.03 | 82.14 |
| EraseAnything++ | 94.15 | 79.20 | 7 6.45 | 9 3.10 |
| Config | Acc e | Acc ir | H a |
| + | 19.2 | 23.5 | 4.3 |
| + | 26.8 | 28.8 | 2.0 |
| + | 21.5 | 27.1 | 5.6 |
| + | 23.1 | 26.5 | 3.4 |
| + + | 21.8 | 27.9 | 6.1 |
| Full (EraseAnything++) | 20.1 | 28.2 | 8.1 |
| Strategy | Acc e | Acc ir | H a |
| Linear Sum ( ) | 18.5 | 22.5 | 4.0 |
| Linear Sum ( ) | 28.6 | 28.9 | 0.3 |
| PCGrad [ 51 ] | 24.1 | 28.5 | 4.4 |
| MGDA [ 50 ] | 25.8 | 28.7 | 2.9 |
| Ours | 20.1 | 28.2 | 8.1 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Category | # Number | Prompt template | Concepts |
| Entity | 10 | ‘A photo of [ Entity ]’ | ‘Fruit’, ‘Ball’, ‘Car’, ‘Airplane’, ‘Tower’, ‘Building’, ‘Celebrity’, ‘Shoes’, ‘Cat’, ‘Dog’ |
| Abstraction | 10 | ‘A scene featuring [ Abstraction ]’ | ‘Explosion’, ‘Green’, ‘Yellow’, ‘Time’, ‘Two’, ‘Three’, ‘Shadow’, ‘Smoke’, ‘Dust’, ‘Environmental Simulation’ |
| Relationship | 10 | ‘A [ Relationship ] B’ | ‘Shake Hand’, ‘Kiss’, ‘Hug’, ‘In’, ‘On’, ‘Back to Back’, ‘Jump’, ‘Burrow’, ‘Hold’, ‘Amidst’ |
| Category | # Number | Celebrity |
| Erasure Group | 50 | ‘ Adele ’, ‘ Albert Camus ’, ‘ Angelina Jolie ’, ‘ Arnold Schwarzenegger ’, ‘ Audrey Hepburn ’, ‘ Barack Obama ’, ‘ Beyoncé ’, ‘ Brad Pitt ’, ‘ Bruce Lee ’, ‘ Chris Evans ’, ‘ Christiano Ronaldo ’, ‘ David Beckham ’, ‘ Dr Dre ’, ‘ Drake ’, ‘ Elizabeth Taylor ’, ‘ Eminem ’, ‘ Elon Musk ’, ‘ Emma Watson ’, ‘ Frida Kahlo ’, ‘ Hugh Jackman ’, ‘ Hillary Clinton ’, ‘ Isaac Newton ’, ‘ Jay-Z ’, ‘ Justin Bieber ’, ‘ John Lennon ’, ‘ Keanu Reeves ’, ‘ Leonardo Dicaprio ’, ‘ Mariah Carey ’, ‘ Madonna ’, ‘ Marlon Brando ’, ‘ Mahatma Gandhi ’, ‘ Mark Zuckerberg ’, ‘ Michael Jordan ’, ‘ Muhammad Ali ’, ‘ Nancy Pelosi ’,‘ Neil Armstrong ’, ‘ Nelson Mandela ’, ‘ Oprah Winfrey ’, ‘ Rihanna ’, ‘ Roger Federer ’, ‘ Robert De Niro ’, ‘ Ryan Gosling ’, ‘ Scarlett Johansson ’, ‘ Stan Lee ’, ‘ Tiger Woods ’, ‘ Timothee Chalamet ’, ‘ Taylor Swift ’, ‘ Tom Hardy ’, ‘ William Shakespeare ’, ‘ Zac Efron ’ |
| Retention Group | 50 | ‘ Angela Merkel ’, ‘ Albert Einstein ’, ‘ Al Pacino ’, ‘ Batman ’, ‘ Babe Ruth Jr ’, ‘ Ben Affleck ’, ‘ Bette Midler ’, ‘ Benedict Cumberbatch ’, ‘ Bruce Willis ’, ‘ Bruno Mars ’, ‘ Donald Trump ’, ‘ Doraemon ’, ‘ Denzel Washington ’, ‘ Ed Sheeran ’, ‘ Emmanuel Macron ’, ‘ Elvis Presley ’, ‘ Gal Gadot ’, ‘ George Clooney ’, ‘ Goku ’,‘ Jake Gyllenhaal ’, ‘ Johnny Depp ’, ‘ Karl Marx ’, ‘ Kanye West ’, ‘ Kim Jong Un ’, ‘ Kim Kardashian ’, ‘ Kung Fu Panda ’, ‘ Lionel Messi ’, ‘ Lady Gaga ’, ‘ Martin Luther King Jr. ’, ‘ Matthew McConaughey ’, ‘ Morgan Freeman ’, ‘ Monkey D. Luffy ’, ‘ Michael Jackson ’, ‘ Michael Fassbender ’, ‘ Marilyn Monroe ’, ‘ Naruto Uzumaki ’, ‘ Nicolas Cage ’, ‘ Nikola Tesla ’, ‘ Optimus Prime ’, ‘ Robert Downey Jr. ’, ‘ Saitama ’, ‘ Serena Williams ’, ‘ Snow White ’, ‘ Superman ’, ‘ The Hulk ’, ‘ Tom Cruise ’, ‘ Vladimir Putin ’, ‘ Warren Buffett ’, ‘ Will Smith ’, ‘ Wonderwoman ’ |
Concept Erasure
Concept erasure removes specified knowledge or attributes from models while preserving their ability to perform unrelated tasks.
See all 57 papers