Instructing Text-to-Image Diffusion Models via Classifier-Guided Semantic Optimization
Yuanyuan Chang, Yinghua Yao, Tao Qin, Mengmeng Wang, Ivor Tsang, Guang Dai
TL;DR
This work tackles the challenge of editing images generated by text-to-image diffusion models without relying on manual prompts or retraining the diffusion model. It introduces classifier-guided semantic optimization (CASO), which learns a set of semantic embeddings $\{e_a\}$ for target attributes by optimizing an editing loss against a fixed attribute classifier, tying embeddings to attribute class means through neural-collapse theory. The approach enables disentangled, dataset-level edits across diverse domains, with a reconstruction term to preserve non-target details, and demonstrates strong generalization, multi-attribute editing, and reconstruction quality improvements. Practically, CASO provides a lightweight, training-efficient pathway to precise, controllable edits in diffusion-based generation, while highlighting ethical considerations around potential misuse and advocating responsible deployment.
Abstract
Text-to-image diffusion models have emerged as powerful tools for high-quality image generation and editing. Many existing approaches rely on text prompts as editing guidance. However, these methods are constrained by the need for manual prompt crafting, which can be time-consuming, introduce irrelevant details, and significantly limit editing performance. In this work, we propose optimizing semantic embeddings guided by attribute classifiers to steer text-to-image models toward desired edits, without relying on text prompts or requiring any training or fine-tuning of the diffusion model. We utilize classifiers to learn precise semantic embeddings at the dataset level. The learned embeddings are theoretically justified as the optimal representation of attribute semantics, enabling disentangled and accurate edits. Experiments further demonstrate that our method achieves high levels of disentanglement and strong generalization across different domains of data.
