CGCE: Classifier-Guided Concept Erasure in Generative Models

· Source: cs.CV updates on arXiv.org · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Cybersecurity & Data Privacy · Depth: Expert, extended

Summary

Classifier-Guided Concept Erasure (CGCE), a plug-and-play framework, provides robust concept erasure in generative models, addressing vulnerabilities to adversarial attacks and utility degradation. CGCE employs a lightweight classifier, trained on synthetic prompt pairs (e.g., 1000 for nudity), to detect and refine unsafe text embeddings at inference time. This approach modifies only harmful embeddings, preserving the original model's quality for benign prompts. Experiments demonstrate CGCE achieves leading robustness against red-teaming attacks like P4D, RAB, and MMAD, ranking first on four of six benchmarks for nudity removal on SD-v1.4. It also maintains high generative utility, with FID and CLIP scores nearly identical to the original model. CGCE is versatile, extending to T2I models like SD-v3, FLUX, Switti-AR, Infinity-2B, and T2V models such as CogVideoX-2B, CogVideoX-5B, and HunyuanVideo, supporting multi-concept erasure. Classifier training takes 440 seconds, significantly faster than fine-tuning methods.

Key takeaway

For AI Security Engineers or ML Engineers deploying generative models, if you are concerned about unsafe content generation and utility degradation, you should consider implementing Classifier-Guided Concept Erasure (CGCE). This plug-and-play framework offers leading robustness against red-teaming attacks for T2I and T2V models, while preserving original generative quality. You can efficiently remove multiple concepts by aggregating lightweight classifiers, avoiding costly model fine-tuning.

Key insights

CGCE robustly erases undesirable concepts from generative models by refining text embeddings at inference, preserving utility.

Principles

Method

CGCE trains a lightweight classifier on LLM-generated safe/unsafe prompt pairs. At inference, it detects unsafe text embeddings and iteratively refines them using weighted gradient descent to steer away from harmful concepts.

In practice

Topics

Code references

Best for: Research Scientist, CTO, VP of Engineering/Data, AI Scientist, Machine Learning Engineer, AI Security Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.CV updates on arXiv.org.