Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ CRCE Public

The code and dataset for the paper `Coreference-Retention Concept Erasure in Text-to-Image Diffusion Models`, accepted by BMVC 2025.

License

Notifications You must be signed in to change notification settings

vios-s/CRCE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRCE: Coreference Retention Concept Erasure in Text-to-Image Diffusion Models

Paper BMVC

CRCE is a novel concept erasure framework for text-to-image diffusion models that handles coreferential concepts (synonyms, related terms) to prevent bypass attacks while preserving model utility.

Table of Contents

Method

CRCE uses a multi-objective loss function:

L_total = L_anchor + α·L_coref + β·L_retain
  • L_anchor: Erases target concept
  • L_coref: Erases related concepts (synonyms, variations)
  • L_retain: Preserves unrelated concepts

Installation

git clone https://github.com/vios-s/CRCE-Coreference-Retention-Concept-Erasure-in-Text-to-Image-Diffusion-Models
cd CRCE
pip install -r requirements.txt

Usage

from srcs.ours_tools import execute_ours_unlearn

# Erase "airplane" and related concepts while preserving other flying objects
result = execute_ours_unlearn(
    erase_concept="airplane",
    coref_concept="aeroplane,plane,jet plane,passenger plane",
    retain_concept="hot air balloon,blimp,rocket,drone",
    iterations=500,
    train_method='xattn-strict'
)

Multi-Agent Framework

For automated experiments with LLM-guided concept identification:

python srcs/main.py  # Requires llmconfig.json with API keys

CorefConcept Dataset

Pre-curated concept sets for reproducible experiments:

  • CorefConcept/object.json - CIFAR-10 based objects
  • CorefConcept/celebrity.json - Public figures
  • CorefConcept/ip.json - Intellectual property

Results

CRCE achieves 95%+ target concept removal while maintaining 85%+ retention quality, with 2-5x faster training compared to full model fine-tuning.

Citation

@inproceedings{xue2025crce,
  title={CRCE: Coreference Retention Concept Erasure in Text-to-Image Diffusion Models},
  author={Xue, Yuyang and Moroshko, Edward and Chen, Feng and Sun, Jingyu and McDonagh, Steven and Tsaftaris, Sotirios A},
  booktitle={British Machine Vision Conference (BMVC)},
  year={2025}
}

License

MIT License - see LICENSE file for details.

About

The code and dataset for the paper `Coreference-Retention Concept Erasure in Text-to-Image Diffusion Models`, accepted by BMVC 2025.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages