CASteer: Cross-Attention Steering for Controllable Concept Erasure

## Abstract

Abstract Diffusion models have transformed image generation, yet controlling their outputs to reliably erase undesired concepts remains challenging.
Existing approaches usually require task-specific training and struggle to generalize across both concrete (e.g., objects) and abstract (e.g., styles) concepts.
We propose CASteer ( C ross- A ttention Steer ing), a training-free framework for concept erasure in diffusion models using steering vectors to influence hidden representations dynamically.
CASteer precomputes concept-specific steering vectors by averaging neural activations from images generated for each target concept.
During inference, it dynamically applies these vectors to suppress undesired concepts only when they appear, ensuring that unrelated regions remain unaffected. This selective activation enables precise, context-aware erasure without degrading overall image quality.
This approach achieves effective removal of harmful or unwanted content across a wide range of visual concepts, all without model retraining.
CASteer outperforms state-of-the-art concept erasure techniques while preserving unrelated content and minimizing unintended effects.
Code is available at https://github.com/Atmyre/CASteer .

## 1 Introduction

Recent advances in diffusion models DBLP:conf/nips/HoJA20; DBLP:conf/cvpr/RombachBLEO22 have revolutionized image DBLP:conf/iclr/PodellELBDMPR24 and video generation emu-video, achieving unprecedented realism.
These models operate by gradually adding noise to data during a forward process and then learning to reverse this noise through a series of iterative steps, reconstructing the original data from randomness.
By leveraging this denoising process, diffusion models generate high-quality, realistic outputs, making them a powerful tool for creative and generative tasks.

However, the same capabilities that make diffusion models transformative also raise profound ethical and practical concerns. The ability to generate hyper-realistic content amplifies societal vulnerabilities. Risks range from deepfakes and misinformation to subtler effects such as erosion of trust in digital media and targeted manipulation. Addressing these challenges requires not only reactive safeguards (e.g., blocking explicit content) but proactive methods to constrain or remove harmful concepts at the level of the model itself. Current approaches to moderation often treat symptoms rather than causes, limiting their adaptability as risks and applications evolve.

Existing methods for concept erasure in diffusion models remain narrow in scope. LoRA-based fine-tuning DBLP:conf/iclr/HuSWALWWC22 is effective for removing specific objects or styles but struggles with abstract or composite concepts (e.g., nudity, violence, or ideological symbolism), and scales poorly when multiple concepts must be removed, requiring separate adapters or costly retraining. Prompt-based interventions DBLP:journals/corr/abs-2410-12761 offer greater flexibility for abstract harm reduction but lack precision in suppressing concrete attributes, often failing to generalize across concept variations. As a result, existing strategies fall short of delivering reliable, efficient, and broad-spectrum concept erasure.

In this work, we introduce CASteer, a training-free method for controllable concept erasure that leverages the principle of steering to influence hidden representations of diffusion models dynamically. Our method builds on recent findings that deep neural networks encode features into approximately linear subspaces elhage2021mathematical; DBLP:conf/nips/WuGIPG23. Prior research has shown that intermediate subspaces of diffusion backbones also exhibit this property, with directions that modulate the strength of particular features DBLP:conf/iclr/KwonJU23; DBLP:conf/nips/ParkKCJU23; DBLP:conf/cvpr/SiH0024; DBLP:conf/cvpr/TumanyanGBD23; DBLP:conf/cvpr/0010S00G24. Yet, these techniques remain limited in scope, often restricted to specific subspaces, requiring training, or offering only coarse control.

Our approach departs from this paradigm. We show that multiple subspaces within diffusion models exhibit linear properties that can be harnessed for precise concept erasure. For each concept of interest, we generate
$k$ positive images (where $k\geq 1$) containing the concept and $k$ negative images not containing it, and compute the steering vectors by subtracting the averaged hidden representations of the network across negative images from those of positive ones.
During inference, these precomputed vectors are applied directly to the model activations, allowing us to selectively suppress undesirable concepts without retraining or degrading the overall image quality.
Experiments demonstrate that CASteer achieves fine-grained erasure of harmful or unwanted concepts (e.g., nudity, violence), while maintaining robustness across a wide range of diffusion models, including SD 1.4, SDXL DBLP:conf/iclr/PodellELBDMPR24, Sana xie2025sana, and their distilled variants (e.g., SDXL-Turbo DBLP:conf/eccv/SauerLBR24, Sana-Sprint chen2025sana-sprint).

In summary, our contributions are the following:

- •
We propose a novel training-free framework for controllable concept erasure in diffusion models, leveraging steering vectors to suppress unwanted image features without retraining.
- •
We demonstrate that CASteer effectively handles both concrete (e.g., specific characters) and abstract (e.g., nudity, violence) concepts, and scales to multiple simultaneous erasures.
- •
We achieve state-of-the-art performance in concept erasure across diverse tasks and diffusion backbones, validating the robustness, versatility, and practicality of our approach.

## 2 Related work

Data-driven AI Safety. Ensuring the safety of image and text-to-image generative models hinges on preventing the generation of harmful or unwanted content.
Common approaches include curating training data with licensed material adobefirefly; DBLP:conf/nips/SchuhmannBVGWCC22, fine-tuning models to suppress harmful outputs DBLP:conf/cvpr/RombachBLEO22; DBLP:journals/corr/abs-2006-11807, or deploying post-hoc content detectors nudenet; DBLP:journals/corr/abs-2210-04610.
While promising, these strategies face critical limitations: data filtering introduces inherent biases DBLP:journals/corr/abs-2006-11807, detectors are computationally efficient but often inaccurate or easily bypassed DBLP:conf/iccv/GandikotaMFB23; remove_nsfw_detection, and model retraining becomes costly when new harmful concepts emerge.
Alternative methods leverage text-domain interventions, such as prompt engineering DBLP:journals/corr/abs-2006-11807 or negative prompts DBLP:journals/corr/abs-2305-16807; DBLP:conf/cvpr/SchramowskiBDK23.
Yet these remain vulnerable to adversarial attacks, lack flexibility and precision as they operate in the discrete space of tokens, and often fail to address the disconnect between text prompts and visual outputs—models can still generate undesired content even when text guidance is “safe.”
Our approach instead operates in the joint image-text latent space of diffusion models, enabling more robust and granular control over generated content without relying solely on textual constraints.

Model-driven AI Safety. Current methods DBLP:conf/iccv/GandikotaMFB23; DBLP:conf/iccv/KumariZWS0Z23; DBLP:conf/nips/HengS23; zhang2023forgetmenot; huang2023receler; lee2024cpe erase unwanted concepts by fine-tuning or otherwise optimising models and adapters to shift probability distributions toward null or surrogate tokens, often combined with regularization or generative replay DBLP:conf/nips/ShinLKK17. Other methods, such as DBLP:conf/wacv/GandikotaOBMB24; DBLP:conf/eccv/GongCWCJ24, use direct weight editing to remove unwanted concepts.
Although effective, these approaches lack precision, inadvertently altering or removing unrelated concepts.
Advanced techniques like SPM DBLP:conf/cvpr/Lyu0HCJ00HD24 and MACE DBLP:conf/cvpr/LuWLLK24 improve specificity through LoRA adapters DBLP:conf/iclr/HuSWALWWC22, transport mechanisms, or prompt-guided projections to preserve model integrity.
However, while promising for concrete concepts (e.g., Mickey Mouse), they still struggle with abstract concepts (e.g., nudity) and require parameter updates.
Another group of methods focuses on interventions into internal mechanisms of generative models. Methods like Prompt-to-Prompt DBLP:conf/iclr/HertzMTAPC23 enable fine-grained control over text-specified concepts (e.g., amplifying or replacing elements) through interventions to cross-attention maps, yet fail to fully suppress undesired content, particularly when concepts are implicit or absent from prompts.
This task-specific specialization limits their utility for safety-critical erasure, where complete removal is required.
CASteer bridges this gap, enabling precise, universal concept suppression without relying on textual priors or compromising unrelated model capabilities.
Another area of research focuses on removing information about undesired concepts from text embeddings that generative models are conditioned on DBLP:journals/corr/abs-2410-12761; DBLP:journals/corr/abs-2410-02710; DBLP:journals/corr/abs-2411-10329. However, as these methods operate on a discrete space of token embeddings, their trade-off between the effectiveness of erasure and the preservation of other features is limited.
zhang2024defensive proposes using adversarial training for concept unlearning; however, training this method is computationally intensive.
In contrast, CASteer eliminates training entirely, enabling direct, non-invasive concept suppression in the model’s latent space without collateral damage to unrelated features.

Utilizing directions in latent spaces.
This area of research focuses on finding interpretable directions in various intermediate spaces of diffusion models DBLP:conf/iclr/KwonJU23; DBLP:conf/nips/ParkKCJU23; DBLP:conf/cvpr/SiH0024; DBLP:conf/cvpr/TumanyanGBD23, which can then be used to control the semantics of generated images. Based on this idea, SDID DBLP:conf/cvpr/0010S00G24 recently proposed to learn a vector for each given concept, which is then added to the intermediate activation of a bottleneck layer of the diffusion model during inference to provoke the presence of this concept in the generated image. However, this method is highly architecture-specific and fails to deliver precise control over attributes. In our work, we propose a training-free method for constructing interpretable directions in intermediate activation spaces of various diffusion models for more precise control of image generation. SAeUron cywinski2025saeuron utilizes Sparse Autoencoders Olshausen1997SparseCW (SAEs) to find interpretable directions in the activation space of the diffusion model. However, SAEs are unstable, require extensive training, and do not provide initial control over the set of attributes that can be erased. In contrast, CASteer does not require training and provides direct control over the manipulated attributes.

## 3 Methodology

The main operating principle of CASteer is to modify outputs of certain intermediate layers during inference in order to affect the semantics of generated images, thus preventing the generation of a desired concept. These outputs are modified using specially designed steering vectors. In this section, we begin by justifying the choice of the intermediate layers that CASteer modifies (Sec. [3.1](https://arxiv.org/html/2503.09630v3#S3.SS1)), then proceed with the procedure of construction of steering vectors (Sec. [3.2](https://arxiv.org/html/2503.09630v3#S3.SS2)), and after that describe how these steering vectors are used during inference to control the generation process (Sec. [3.3](https://arxiv.org/html/2503.09630v3#S3.SS3)). Finally, we elaborate on practical aspects regarding the calculation and use of the steering vectors (Sec. [3.4](https://arxiv.org/html/2503.09630v3#S3.SS4)).

### 3.1 Choice of layers to steer

Most modern diffusion models use U-Net or Diffusion Transformers (DiT) DBLP:conf/iccv/PeeblesX23 as a backbone. They consist of a set of Transformer blocks, each having three main components: cross-attention (CA) layer, self-attention (SA) layer, and MLP layer, all of which contribute to the residual stream of the model. Among those, CA layers are the only place in the model where information from the text prompt goes into the model, guiding text-to-image generation. For every image patch and prompt embedding, each CA layer generates a vector matching the size of the image patch embedding. After summation, these vectors transmit text-prompt information to corresponding image regions DBLP:conf/iclr/HertzMTAPC23.

As the semantics of the resulting image is mostly determined by the text prompt, we modify the outputs of the CA layers during inference, which results in effective, yet precise, control over the features of the generated image. Thus, CASteer constructs steering vectors for the outputs of every CA layer in the model.
In the supplementary, we present experiments on applying CASteer to steer outputs of other layers (SA, MLP, and outputs of intermediate layers inside CA blocks).

### 3.2 Construction of steering vectors

Figure: Figure 1: Main pipeline. (Bottom left, gray background) For computing a steering vector, we prompt diffusion model with two prompts that differ in a desired concept, e.g., “anime style” and save CA outputs at each timestamp $t$ and each CA layer $i$. We average these outputs over image patches and get averaged CA outputs $ca^{pos_avg}_{it}$ and $ca^{neg_avg}_{it}$ for each $t$ and $i$. We subtract the latter from the former, getting a steering vector for the layer $i$ and timestamp $t$ $ca^{anime}_{it}$. (Right) For deleting concept $X$ from generation, at each denoising step $t$, we subtract steering vector $ca^{X}_{it}$ multiplied by intensity $\alpha$ from the CA outputs of the layer $i$.
Refer to caption: content/images/method.png

We propose to construct steering vectors for each concept we aim to manipulate.
These vectors correspond to the cross-attention (CA) outputs we modify.
Each steering vector matches the size of the CA outputs and encodes the desired concept’s information.
For preventing the concept from being present in the generated image, we subtract steering vectors of an unwanted concept from cross-attention outputs during generation.

We construct steering vectors as follows.
Given a concept $X$ to manipulate, we create paired positive and negative prompts differing only by the inclusion of $X$.
For example, if $X=\text{``baroque style''}$, example prompts are $p_{\text{pos}}=\text{``A picture of a man, baroque style''}$ and $p_{\text{neg}}=\text{``A picture of a man''}$.
Assume a DiT backbone has $N$ Transformer blocks, each containing one CA layer, totaling $N$ CA layers.
We generate images from both prompts, saving outputs from each of the $N$ cross-attention layers across all $T$ denoising steps.
This yields $NT$ cross-attention output pairs $\langle\text{ca}^{pos}_{it},\text{ca}^{neg}_{it}\rangle$ for $1\leqslant i\leqslant N$ and $1\leqslant t\leqslant T$, where $i$ denotes the layer and $t$ is the denoising step.
Each $\text{ca}^{pos}_{it}$ and $\text{ca}^{neg}_{it}$ has dimensions $\text{patch_num}_{i}\times\text{emb_size}_{i}$, corresponding to the number of patches and embedding size at layer $i$.
We average $\text{ca}^{pos}_{it}$ and $\text{ca}^{neg}_{it}$ over image patches to obtain averaged cross-attention outputs:

$$ $ca^{pos_avg}_{it}=\frac{\sum_{k=1}^{patch_num_{i}}ca^{pos}_{itk}}{patch_num_{i}}\;;\;ca^{neg_avg}_{it}=\frac{\sum_{k=1}^{patch_num_{i}}ca^{neg}_{itk}}{patch_num_{i}}$ (1) $$

where $ca^{pos_avg}_{it}$ and $ca^{neg_avg}_{it}$ are vectors of size $\text{emb_size}_{i}$.
Then, for each of these $N$ layers and each of $T$ denoising steps, we construct a corresponding steering vector carrying a notion of $X$ by subtracting its averaged cross-attention output that corresponds to the negative prompt from that corresponding to the positive one and:

$$ $ca^{X}_{it}=f_{norm}(ca^{pos_avg}_{it}-ca^{neg_avg}_{it}).$ (2) $$

where $f_{norm}$ is an $L_{2}$-normalization function: $f_{norm}(v)=\frac{v}{||v||_{2}^{2}}$.

### 3.3 Using steering vectors to control generation

Computed steering vectors can be seen as directions in a space of intermediate representations of a model (in the space of CA activations) that represent a notion of $X$.
Thus, we should be able to control the expressiveness of certain feature $X$ by steering the model representations along the steering vector representing $X$. That is, we can prevent a concept from appearing on the generated image by subtracting some amount of steering vectors for that concept from corresponding CA outputs of a model during inference:

$$ $ca^{out_new}_{itk}=ca^{out}_{itk}-\alpha ca^{X}_{itk},$ (3) $$

Here $1\leqslant k\leqslant\text{patch_num}_{i}$, and $\alpha$ is a hyperparameter that controls the strength of concept suppression.
Larger values of $\alpha$ lead to higher suppression of the concept $X$ in the generated image. Below we propose a way to adjust $\alpha$ dynamically based on activations of diffusion model during generation, achieving effective and precise erasure of unwanted concepts in the resulting image.

Choice of alpha.
Most often when we aim to suppress the concept of $X$, our goal is to completely prevent it from appearing on any generated image given any input prompt. This is the case of such tasks as nudity/violence removal or privacy, when we do not want the model to ever generate somebody’s face or artwork. However, there might be different magnitudes for concept $X$ in the original text prompt (e.g., prompts “an angry man” or “a furious man” express different levels of anger). A concept $X$ can have different magnitudes of expression in different patches of the image being generated. Consequently, if we use Eq. [3](https://arxiv.org/html/2503.09630v3#S3.E3) for suppression, different values of $\alpha$ are needed to completely suppress $X$ for different prompts and individual image patches while not affecting other features in the image.

We propose to estimate $\alpha$ for concept deletion by using the dot product between $ca^{X}_{it}$ and corresponding CA output $ca^{out}_{itk}$ ($\langle ca^{X}_{it},ca^{out}_{itk}\rangle$) as an assessment of amount of $X$ that is present in the image part corresponding to $k^{th}$ patch of $ca^{out}_{it}$. As $ca^{X}_{it}$ is normalized, the value of this dot product is the length of the projection of the CA output $ca^{out}_{itk}$ onto the steering vector $ca^{X}_{it}$. As $ca^{X}_{it}$ can be seen as a direction in a linear subspace corresponding to the concept $X$, the length of the projection can be seen as the amount of $X$ that is present in $ca^{out}_{itk}$. That said, for removing information about $X$ from $ca^{out}_{itk}$, we propose to subtract the amount of $ca^{X}_{it}$ proportionate to the dot product between $ca^{X}_{it}$ and $ca^{out}_{itk}$ from $ca^{out_new}_{itk}$, i.e., define $\alpha=\beta(ca^{X}_{it},ca^{out}_{itk})$. Consequently, Eq. [3](https://arxiv.org/html/2503.09630v3#S3.E3) becomes the following:

$$ $ca^{out_new}_{itk}=ca^{out}_{itk}-\beta\langle ca^{X}_{it},ca^{out}_{itk}\rangle ca^{X}_{it}.$ (4) $$

Here $1\leqslant k\leqslant\text{patch_num}_{i}$, and $\beta$ is a hyperparameter that controls the strength of the suppression.

Note that Eq. [4](https://arxiv.org/html/2503.09630v3#S3.E4) can be reformulated in a matrix form as a projection operator onto the subspace orthogonal to steering vector $s=ca^{X}_{it}$:

$$ $s^{new}=f_{\text{delete}}(c,s)=(I-ss^{T})c$ (5) $$

Here $s^{new}=ca^{out_new}_{itk}$, $c=ca^{out}_{itk}$, $s=ca^{X}_{it}$, $I$ is an identity matrix.

Intermediate clipping. We now introduce a mechanism of clipping the value of $\alpha$ to get better control over concept suppression. Note that using Eq. [4](https://arxiv.org/html/2503.09630v3#S3.E4) we only want to influence those CA outputs $ca^{out}_{itk}$ which have a positive amount of unwanted concept $X$ in them. As dot product $\langle ca^{X}_{it},ca^{out}_{itk}\rangle$ measures the amount of $X$ present in CA output $ca^{out}_{itk}$, we only want to steer those CA outputs $ca^{out}_{itk}$, which have a positive dot product with $ca^{X}_{it}$. So the equation becomes the following:

$$ $\begin{split}\alpha=\max(\beta\langle ca^{X}_{it},ca^{out}_{itk}\rangle,0)\\ ca^{out_new}_{itk}=ca^{out}_{itk}-\alpha ca^{X}_{it}.\end{split}$ (6) $$

Note that if intermediate clipping is used, Eq. [6](https://arxiv.org/html/2503.09630v3#S3.E6) can no longer be formulated in a matrix form. In the experiments section, we present results of applying CASteer for concept erasure both with and without intermediate clipping (i.e. using Eq. [4](https://arxiv.org/html/2503.09630v3#S3.E4) and Eq. [6](https://arxiv.org/html/2503.09630v3#S3.E6)).

### 3.4 Practical considerations

Multiple Prompts for Steering Vector.
We described in the previous section how to construct and use steering vectors to alter one concept, based on one pair of prompts, e.g., “a picture of a man” and “a picture of a man, baroque style”.
As mentioned, a steering vector can be seen as the direction in the space of intermediate representations of a model that points from an area of embeddings not containing a concept $X$, to an area that contains it.
In order for this direction to be more precise, we propose to construct steering vectors based on multiple pairs of prompts instead of one.
More precisely, we obtain $P\geqslant 1$ pairs of $ca^{pos_avg}_{itp}$ and $ca^{neg_avg}_{itp}$, $1\leqslant p\leqslant P$, then average them over P:

$$ $ca^{pos_avg}_{it}=\frac{\sum_{p=1}^{P}ca^{pos_avg}_{itp}}{P},ca^{neg_avg}_{it}=\frac{\sum_{p=1}^{P}ca^{neg_avg}_{itp}}{P}$ (7) $$

and obtain steering vectors as $ca^{X}_{it}=ca^{pos_avg}_{it}-ca^{neg_avg}_{it}$.

Steering multiple concepts. It is easy to erase multiple concepts during a generation by either applying steering vectors corresponding to these concepts to the cross-attention output successively or constructing single steering vector corresponding to multiple concepts. In the experiments section, we show results on applying a steering vector constructed for multiple concepts to prevent generation of inappropriate concepts.

Efficiency: Transferring vectors from distilled models.
Adversarial Diffusion Distillation (ADD) DBLP:conf/eccv/SauerLBR24 is a fine-tuning approach that allows sampling large-scale foundational image diffusion models in $1$ to $4$ steps, while producing high-quality images, with many methods such as SDXL and Sana having distilled versions (SDXL-Turbo and Sana-Sprint).
We observe that steering vectors obtained from the distilled models can successfully be used for steering generations of its corresponding non-distilled variants.
More formally, having a pair of prompts, we obtain $ca^{pos_avg}_{i}$ and $ca^{neg_avg}_{i}$ from the distilled model using $1$ denoising step.
Note that there is no second index $t$ as we use only one denoising iteration, i.e. $T=1$.
We then construct steering vectors for the concept $X$ as $ca^{X}_{i}=ca^{pos_avg}_{i}-ca^{neg_avg}_{i}$ and then use it to steer non-Turbo variant of the model by using $ca^{X}_{i}$ for each denoising step $1\leqslant j\leqslant T$.

Injecting CASteer into model weights.
Note that when steering more advanced models (SDXL or Sana), we use steering vectors from Turbo/Sprint model versions, where we have only one steering vector per model CA layer.
Also note that the last layer of CA block in SDXL/SANA is Linear layer with no bias and no activation function, i.e., essentially is a matrix multiplication:
$h_{out}=W_{proj_out}h_{in}.$
Here $W_{proj_out}$ is a weight matrix of the last $proj_out$ layer of CA block of SDXL/SANA, $h_{in}$ and $h_{out}$ are input and output to that layer, $h_{out}$ being the final output of CA layer.
In this case, by combining last layer of CA block with CASteer formulation in a matrix form (Eq. [5](https://arxiv.org/html/2503.09630v3#S3.E5)), we can incorporate CASteer directly into weights of the model, by multiplying weight matrix of the last layer of CA block with $I-ss^{T}$ matrix from Eq. [5](https://arxiv.org/html/2503.09630v3#S3.E5):

$$ $h_{out}=(I-ss^{T})W_{proj_out}h_{in}=W^{s}_{proj_out}h_{in}$ (8) $$

$W^{s}_{proj_out}$ is a matrix of the same size as $W_{proj_out}$. This results in having zero inference overhead compares to original SDXL/SANA model similar to LoRA-like tuning approaches.

## 4 Experiments

We evaluate the performance of our method on the task of erasing different concepts.
We show that our method succeeds in suppressing both
abstract (e.g., “nudity”, “violence”) and
concrete concepts (e.g., “Snoopy”).
Moreover, we demonstrate the advantages of our method in removing implicitly defined concrete concepts (e.g., if a concept is “Mickey”, prompting “a mouse from a Disneyland” should not result in a generation of Mickey).

Implementation details.
For a fair comparison, we report our main quantitative results using StableDiffusion-v1.4 (SD-v1.4) DBLP:conf/cvpr/RombachBLEO22.
SD-1.4 model does not have a Turbo version, so for these experiments we use per-step steering vectors computed from the original SD-1.4. We apply steering to all of the CA layers in the model.
We set $\beta=2$ for the concept erasure in all experiments. We use 50 prompt pairs for generating steering vectors for concrete concepts (e.g., “Snoopy”), and 196 prompt pairs for generating steering vectors for concrete concepts (e.g., “nudity”). Information about prompts used for generation of the steering vectors is in the supplementary.

We also show effectiveness of CASteer on bigger models, such as SDXL and SANA, and present results on these models in supplementary. For SDXL DBLP:conf/iclr/PodellELBDMPR24 and SANA, we use steering vectors obtained from SDXL-Turbo and SANA-Sprint models, respectively.

**Table 1: Quantitative results on nudity removal based on I2P (DBLP:conf/cvpr/SchramowskiBDK23) dataset. Detection of nude body parts is done by Nudenet at a threshold of 0.6. F: Female, M: Male. The best results are highlighted in bold, second-best are underlined.**
| Method | Nudity Detection |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Breast(F) | Genitalia(F) | Breast(M) | Genitalia(M) | Buttocks | Feet | Belly | Armpits | Total$\downarrow$ |  |
| SD v1.4 | 183 | 21 | 46 | 10 | 44 | 42 | 171 | 129 | 646 |
| Ablating (CA) DBLP:conf/iccv/KumariZWS0Z23 | 298 | 22 | 67 | 7 | 45 | 66 | 180 | 153 | 838 |
| FMN zhang2023forgetmenot | 155 | 17 | 19 | 2 | 12 | 59 | 117 | 43 | 424 |
| ESD-x DBLP:conf/iccv/GandikotaMFB23 | 101 | 6 | 16 | 10 | 12 | 37 | 77 | 53 | 312 |
| SLD-Med DBLP:conf/cvpr/SchramowskiBDK23 | 39 | 1 | 26 | 3 | 3 | 21 | 72 | 47 | 212 |
| UCE DBLP:conf/wacv/GandikotaOBMB24 | 35 | 5 | 11 | 4 | 7 | 29 | 62 | 29 | 182 |
| SA DBLP:conf/nips/HengS23 | 39 | 9 | 4 | 0 | 15 | 32 | 49 | 15 | 163 |
| ESD-u DBLP:conf/iccv/GandikotaMFB23 | 14 | 1 | 8 | 5 | 5 | 24 | 31 | 33 | 121 |
| Receler huang2023receler | 13 | 1 | 12 | 9 | 5 | 10 | 26 | 39 | 115 |
| MACE DBLP:conf/cvpr/LuWLLK24 | 16 | 0 | 9 | 7 | 2 | 39 | 19 | 17 | 109 |
| RECE DBLP:conf/eccv/GongCWCJ24 | 8 | 0 | 6 | 4 | 0 | 8 | 23 | 17 | 66 |
| CPE (one word) lee2024cpe | 11 | 2 | 3 | 2 | 5 | 15 | 13 | 15 | 66 |
| CPE (four word) lee2024cpe | 6 | 1 | 3 | 2 | 2 | 8 | 8 | 10 | 40 |
| AdvUnlearn zhang2024defensive | 1 | 1 | 0 | 0 | 0 | 13 | 0 | 8 | 23 |
| SAeUron cywinski2025saeuron | 4 | 0 | 0 | 1 | 3 | 2 | 1 | 7 | 18 |
| Ours (w/o clip) | 5 | 0 | 0 | 1 | 3 | 2 | 0 | 1 | 12 |
| Ours (clip) | 4 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 7 |

**Table 2: Quantitative results on inappropriate content removal based on I2P (DBLP:conf/cvpr/SchramowskiBDK23) dataset. Detection of inappropriate content is done by Q16 (schramowski2022can) classifier. The best results are highlighted in bold, second-best are underlined.**
| Class name | Inappropriate proportion (%) ($\downarrow$) |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| SD | FMN | Ablating | ESD-x | SLD | ESD-u | UCE | Receler | Ours (w/o clip) | Ours (clip) |  |
| Hate | 44.2 | $37.7$ | $40.8$ | $34.1$ | $22.5$ | $26.8$ | $36.4$ | 28.6 | $35.5$ | 29.00 |
| Harassment | 37.5 | $25.0$ | $32.9$ | $30.2$ | $22.1$ | $24.0$ | $29.5$ | 21.7 | $29.85$ | 25.61 |
| Violence | 46.3 | $47.8$ | $43.3$ | $40.5$ | $31.8$ | $35.1$ | $34.1$ | 27.1 | $32.54$ | 27.78 |
| Self-harm | 47.9 | $46.8$ | $47.4$ | $36.8$ | $30.0$ | $33.7$ | $30.8$ | 24.8 | 26.10 | $26.22$ |
| Sexual | 60.2 | $59.1$ | $60.3$ | $40.2$ | $52.4$ | $35.0$ | $25.5$ | $29.4$ | 22.99 | 20.73 |
| Shocking | 59.5 | $58.1$ | $57.8$ | $45.2$ | $40.5$ | $40.1$ | $41.1$ | 34.8 | $38.43$ | 34.00 |
| Illegal activity | 40.0 | $37.0$ | $37.9$ | $28.9$ | $22.1$ | $26.7$ | $29.0$ | 21.3 | $21.46$ | 17.61 |
| Overall | 48.9 | $47.8$ | $45.9$ | $36.6$ | $33.7$ | $32.8$ | $31.3$ | 27.0 | $28.94$ | 25.58 |

### 4.1 Results

Abstract concept erasure.
In this section, we present results on inappropriate content erasure based on I2P dataset DBLP:conf/cvpr/SchramowskiBDK23. I2P is a dataset of 4,703 curated prompts designed to test generative models, where most prompts lead to images containing inappropriate content. Following prior work, we test CASteer on two I2P-based tasks: 1) removing nudity, 2) removing all inappropriate content at once. For nudity removal, we utilize CASteer with steering vectors generated for the concept of "nudity". For inappropriate content removal, we use CASteer with steering vectors obtained as average of steering vectors generated for each type of inappropriate content, i.e., hate, harassment, violence, self-harm, shocking, sexual, and illegal content.

We compare our method with state-of-the-art approaches Ablating (CA) DBLP:conf/iccv/KumariZWS0Z23, FMN zhang2023forgetmenot, SLD DBLP:conf/cvpr/SchramowskiBDK23, ESD DBLP:conf/iccv/GandikotaMFB23, UCE DBLP:conf/wacv/GandikotaOBMB24, SA DBLP:conf/nips/HengS23, Receler huang2023receler, MACE DBLP:conf/cvpr/LuWLLK24, RECE DBLP:conf/eccv/GongCWCJ24, CPE lee2024cpe, AdvUn zhang2024defensive and SAeUron cywinski2025saeuron. Following prior art, we utilize the NudeNet (^1^11https://github.com/notAI-tech/NudeNet) to detect nude body parts on generated images for nudity erasure task, and the NudeNet with the Q16 detector to detect inappropriate content.

We present the results for CASteer versions with and without intermediate clipping applied in Tab. [1](https://arxiv.org/html/2503.09630v3#S4.T1) and Tab. [2](https://arxiv.org/html/2503.09630v3#S4.T2). We show that both versions of CASteer outperform all prior models on nudity erasure, with CASteer version with clipping having more than 2 times fewer images with detected nudity than the second-best result. On the inappropriate content removal, CASteer version with clipping also achieves state-of-the-art result, surpassing second-based model Receler by $1.42\%$ overall.

To assess general generation quality of CASteer, we follow prior work and run CASteer with “nudity” steering vectors on prompts from COCO-30k DBLP:conf/eccv/LinMBHPRDZ14. We report FID DBLP:conf/nips/HeuselRUNH17 for general visual quality and CLIP score DBLP:conf/emnlp/HesselHFBC21 for image-prompt alignment. Results are presented in Tab. [3](https://arxiv.org/html/2503.09630v3#S4.T3). Both versions of CASteer have better FID than prior art.

Thus, CASteer clearly is capable of deleting unwanted information while maintaining general high quality. Note that these datasets feature adversarial prompts, i.e., the “nudity” concept is encoded in the prompts implicitly.

Figure: Table 3: Evaluation of nudity-erased models. Robustness is measured with nudity prompts from the I2P dataset, while locality is assessed using COCO-30K prompts.
Refer to caption: content/images/spm_fail/spm_fail_main_3.png

Concrete concepts erasure.
To assess ability of CASteer to remove concrete concepts, we follow the experimental setup of SPM DBLP:conf/cvpr/Lyu0HCJ00HD24.
In this setting, the concept to be erased is Snoopy, and images of five additional concepts (Mickey, Spongebob, Pikachu, dog and legislator) are generated to test the capability of the method to preserve content not related to the concept being removed.
The first four of these are specifically chosen to be semantically close to the concept being removed to show the model’s ability to perform precise erasure.
Following SPM DBLP:conf/cvpr/Lyu0HCJ00HD24, we augment each concept using $80$ CLIP DBLP:conf/icml/RadfordKHRGASAM21 templates, and generate $10$ for each concept-template pair, so that for each concept there are $800$ images.
We evaluate the results using two metrics. First, we utilize CLIP Score (CS) DBLP:conf/emnlp/HesselHFBC21 to confirm the level of the existence of the concept within the generated content.
Second, we calculate FID DBLP:conf/nips/HeuselRUNH17 scores between the set of original generations of SD-1.4 model and a set of generations of the steered model. We use it to assess how much images of additional (non-Snoopy) concepts generated by the steered model differ from those of generated by the original model. A higher FID value demonstrates more severe generation alteration.
We present the results in Tab. [15](https://arxiv.org/html/2503.09630v3#A6.T15). In Fig. [3](https://arxiv.org/html/2503.09630v3#S4.F3), we also show two types of plots. Fig. [3(a)](https://arxiv.org/html/2503.09630v3#S4.F3.sf1) pictures normalized clip score of source concept, i.e. “Snoopy” (the lower the better) versus mean normalized clip scores of other concepts (the higher the better). Normalization is done to ensure equal importance of all the concepts in the mean, and done by dividing clip score of images produced by erasing method by clip score of images produced by vanilla SD-1.4.
Methods on the left of the plot erase Snoopy well, and methods on top of the plot preserve other concepts well.
Fig. [3(b)](https://arxiv.org/html/2503.09630v3#S4.F3.sf2) pictures normalized clip score of source concept versus mean FID scores of other concepts (the lower the better).
Methods on the left of the plot erase Snoopy well, and methods on top of the plot tend not to affect images of other concepts much.
Results show that CASteer maintains good balance between erasing unwanted concept, while preserving other concepts intact. ESD  DBLP:conf/iccv/GandikotaMFB23 and Receler erase Snoopy well, but also highly affect other concepts, especially related ones such as Mickey or Spongebob. Note that their CS of unrelated concepts (e.g. “Mickey” or “Spongebob”) are significantly lower than that of original SD-1.4, indicating that these concepts are also being affected when erasure of “Snoopy” is done. High FID of these methods on these concepts supports this observation.
SAFREE shows a reduced level of Snoopy erasure compared to that of CASteer, and has lower CS and higher FID on all the other concepts.
SPM keeps unrelated concepts almost intact (High CS and low FID), but has a much lower intensity of Snoopy erasure. Moreover, SPM fails to erase implicitly defined concepts (see Fig. [2](https://arxiv.org/html/2503.09630v3#S4.F2) and Sec. [D](https://arxiv.org/html/2503.09630v3#A4) in supplementary).
We provide qualitative results on comparisons in the supplementary.

Figure: (a) Normalized CLIP score on “Snoopy” vs normalized CLIP scores of other concepts
Refer to caption: content/images/snoopy_clip_vs_clip.png

CASteer is capable of erasing implicitly defined concepts. We check what happens if we define the prompts implicitly, e.g., “A mouse from Disneyland”. We run CASteer and SPM trained on the Mickey concept on these prompts and show the results in Fig. [2](https://arxiv.org/html/2503.09630v3#S4.F2).
We clearly see that SPM fails to erase the concepts when they are not explicitly defined.
In contrast, our method does a much better job of erasing the concepts, despite being implicitly defined. This is also supported by the results on nudity erasure in Tab. [1](https://arxiv.org/html/2503.09630v3#S4.T1), as considered datasets contain specially selected adversarial nudity prompts.
We provide additional results on implicitly defined prompts in the supplementary.

Overall experimental results show that CASteer performs precise erasure of both concrete and abstract concepts and concepts defined implicitly while leaving other concepts intact and not affecting the overall quality of generated images.
More qualitative results showing the performance of CASteer on prompts related and not related to the target concept can be found in the supplementary.

Figure: Figure 4: Qualitative results on SDXL (left) and SANA (right) on removing “Snoopy”. Top: original model generations, bottom: generations of model steered to remove “Snoopy”
Refer to caption: content/images/qualitative_snoopy.png

### 4.2 Ablation Study

Steering other layers. As mentioned in Sec. [3.1](https://arxiv.org/html/2503.09630v3#S3.SS1), we ablate to determine for which type of layer in the DiT backbone steering is most effective. We show in the supplementary that steering the CA outputs is the most effective. We also ablate steering only a fraction of CA layers in Sec. [G.4](https://arxiv.org/html/2503.09630v3#A7.SS4).

Number of prompt pairs to construct steering vectors. In the supplementary, we provide an ablation on the number of prompt pairs needed to produce high-quality outputs after steering. We find that as little as 50 prompts is enough for the steering vectors to capture the desired concept well.

Interpretation of steering vectors. Here, we propose a way to interpret the meaning of steering vectors generated by CASteer. Suppose we have steering vectors generated for a concept $X$ $\{ca^{X}_{it}\},1\leqslant i\leqslant l,1\leqslant t\leqslant T$, where $l$ is the number of model layers and $T$ is the number of denoising steps performed for generating steering vectors. To interpret these vectors, we prompt the diffusion model with a placeholder prompt “X" and at each denoising step, we substitute outputs of the model’s CA layers with corresponding steering vectors. This conditions the diffusion model only on the information from the steering vectors, completely suppressing other information from the text prompt. Results are presented in Fig. [38](https://arxiv.org/html/2503.09630v3#A9.F38) and in the supplementary.
UMap. We generate steering vectors for all vocabulary tokens of SDXL text encoders and apply UMap DBLP:journals/corr/abs-1802-03426 on these steering vectors. We present the results in the appendix, showing that structure emerges in the space of these steering vectors, similar to that of Word2Vec DBLP:journals/corr/abs-1301-3781, supporting that steering vectors carry the meaning of the desired concept.

Modern models. We show qualitative results in SANA and SDXL in Fig. [4](https://arxiv.org/html/2503.09630v3#S4.F4). We provide more qualitative and quantitative results in SDXL (Sec. [E](https://arxiv.org/html/2503.09630v3#A5)) and SANA (Sec. [F](https://arxiv.org/html/2503.09630v3#A6)).

User studies. In Sec. [D](https://arxiv.org/html/2503.09630v3#A4), we give several user studies, showing that in most cases, the users prefer our results compared to SPM and Receler.

## 5 Conclusion

We presented CASteer, a novel training-free method for controllable concept erasure in diffusion models.
CASteer works by using steering vectors in the cross-attention layers of diffusion models.
We show that CASteer is general and versatile to work with different versions of diffusion, including distilled models.
CASteer reaches state-of-the-art results in concept erasure on different evaluation benchmarks while producing visually pleasing images.

## Appendix A Limitations and Broader Impact

Limitations. While CASteer demonstrates strong performance on a wide range of concept erasure tasks without retraining, several limitations remain. First, the current method is designed specifically for diffusion models with a Transformer-based cross-attention architecture. Its generalizability to architectures that do not use cross-attention has not been evaluated and may require additional methodological adjustments.
Second, although the construction of steering vectors is training-free, it depends on curated positive and negative prompts, which may introduce human bias and require domain knowledge for effective pairing.
While CASteer demonstrates effective and precise control over concept suppression tasks, there is still limited understanding of how steering vectors affect the broader semantic space. Deep learning research has largely moved forward through empirical results, often ahead of solid theoretical explanations. We believe such explanations are both useful and ultimately necessary. Still, important progress has often come from work without clear theory, as seen in the case of the batch normalization paper. We hope our work contributes to ongoing efforts to better understand and apply steering methods, especially to improve control and interpretability in diffusion models.

Broader Impact. CASteer contributes toward the democratization of safe and controllable image generation by offering a lightweight, training-free solution for concept steering in diffusion models. Its ability to remove specific concepts without retraining lowers the barrier for safety interventions in generative models, potentially empowering developers with limited resources to implement moderation tools and creative controls. This is particularly relevant for applications in content moderation, personalized media generation, and bias mitigation. However, CASteer also presents risks. The same mechanisms that allow the removal of harmful or copyrighted content can be used to suppress beneficial or truthful concepts for deceptive purposes. Moreover, the capability to switch or add identities (e.g., celebrity faces) raises ethical concerns regarding consent, misrepresentation, and deepfake generation. While we do not endorse any misuse of this technology, we believe transparency in capabilities and limitations is essential. Further safeguards and usage guidelines should accompany any deployment to ensure CASteer is used responsibly.

Future Work. The construction of steering vectors used by CASteer depends on curated positive and negative prompts, which may introduce human bias and require domain knowledge for effective pairing. Future work on finding the best ways of constructing prompt pairs would be beneficial. Next, deep theoretical understanding of mechanisms behind CASteer would help develop further methods of controlling generation of diffusion models. Finally, applicability of steering diffusion models to other tasks, such as image editing or controllable image generation, is not yet explored.

Code. We give a minimal version of development code in a zip file as part of the appendix.The code was developed and tested using 8 V100 GPUs.

## Appendix B Algorithms

We give the algorithms of our model.
In Algorithm [1](https://arxiv.org/html/2503.09630v3#alg1), we describe how we compute the steering vectors, while in Algorithm [2](https://arxiv.org/html/2503.09630v3#alg2), we describe how we use them to perform concept erasure.
The algorithms closely follow the descriptions in Sec. [3.2](https://arxiv.org/html/2503.09630v3#S3.SS2) and Sec [3.3](https://arxiv.org/html/2503.09630v3#S3.SS3).

Figure: Algorithm 1 Computing steering vectors

Figure: Algorithm 2 Using steering vectors

## Appendix C Prompts for generating steering vectors

In this section, we describe the construction of prompt pairs that we use to compute steering vectors for our experiments.

### C.1 Prompts for erasing concrete concepts

For erasing concrete concepts, we use prompt pairs of the form:

$$ $(``\mathbf{p},\ with\ \mathbf{e}",\ ``\mathbf{p}")$ $$

Here $\mathbf{p}\in\mathbf{P}$, where $\mathbf{P}$ is a set of $N$ ImageNet classes, and $\mathbf{e}$ describes the concept we want to manipulate, e.g. we use $\mathbf{e}=$“Snoopy" for Snoopy erasure, $\mathbf{e}=$“Mickey" for Mickey erasure.
Examples of prompts:
$(``junco,\ with\ Snoopy",\ ``junco")$
$(``mud\ turtle,\ with\ Mickey",$ $``mud\ turtle")$

Inside each prompt pair, the same generation seed is used.
Our main results in Tab.[15](https://arxiv.org/html/2503.09630v3#A6.T15) are produced using steering vectors calculated on $N=50$ prompts pairs.

### C.2 Prompts for human-related concepts

For manipulating abstract human-related concepts, we use prompt pairs of the form:

$$ $(``\mathbf{b}\ \mathbf{c},\ \mathbf{e}",\ ``\mathbf{b}\ \mathbf{c}")$ $$

Here $\mathbf{b}\in\mathbf{B}$ and $\mathbf{c}\in\mathbf{C}$, where
$\mathbf{B}$ = $\{$“a girl", “a boy", “two men", “two women", “two people", “a man", “a woman", “an old man", “an old woman", “boys", “girls", “men", “women", “group of people", “a human",$\}$
$\mathbf{C}$ = $\{$“", “gloomy image", “zoomed in", “talking", “on the street", “in a strange pose", “realism", “colorful background", “on a beach", “playing guitar", “enjoying nature", “smiling", “in a futuristic spaceship", “with kittens"$\}$,
and $\mathbf{e}$ describes the concept we want to manipulate.
$|\mathbf{b}|=15,\ |\mathbf{C}|=14$, which results in a total of 210 prompt pairs for each concept $\mathbf{e}$.

Following Receler, we use $\mathbf{e}=$“nudity" for nudity erasure, and set of $\{``hate",``harassment",``violence",``suffering",``humiliation",``harm",``suicide",``sexual",``nudity",``bodilyfluids",``blood"\}$ for harmful content erasure.

Examples of prompts for nudity erasure:
$(``a\ girl\ on\ a\ beach,\ nudity",\ ``a\ girl\ on\ a\ beach")$
$(``boys\ talking,\ nudity",$ $``boys\ talking")$

Inside each prompt pair, the same generation seed is used.

### C.3 Prompts for style manipulation

These prompts are used in Sec. [H.3](https://arxiv.org/html/2503.09630v3#A8.SS3)

For erasing or adding style, we use prompt pairs of the form:

$$ $(``\mathbf{p},\ \mathbf{e}\ style",\ ``\mathbf{p}")$ $$

Here $\mathbf{p}\in\mathbf{P}$, where $\mathbf{P}$ is a set of ImageNet classes as used for concrete concept erasure, and $\mathbf{e}$ describes the style we want to manipulate, e.g. “baroque or “Van Gogh".

Examples of prompts:
$(``junco,\ baroque\ style",\ ``junco")$
$(``mud\ turtle,\ Van\ Gogh\ style",$ $``mud\ turtle")$

Inside each prompt pair, the same generation seed is used.

## Appendix D User studies

In this section, we provide user studies to complement quantitative and qualitative results of CASteer.

In the first user study, we compare SPM and CASteer on removing a concept of “Mickey” based on explicit prompts. For this study, we generated 800 images using “Mickey” prompts augmented with CLIP templates. Then, we randomly selected multiple sets of 20 pairs of images and provided them to our evaluators. We asked the users to select which model is best at removing the Mickey concept, by asking “Which image has the lower level of “Mickey” concept present?" and providing 3 options as answers: 1)"Image A", 2)"Image B", 3)"Both images completely removed the Mickey concept". We show in Tab. [4](https://arxiv.org/html/2503.09630v3#A4.T4) that our model was preferred for generating images without the Mickey concept, even when the concept was explicitly defined.

**Table 4: User preferences for which model removed the explicit concept Mickey better. Our model was preferred for removing Mickey from images.**
| Model | Images Preferred | Percentage (%) |
| --- | --- | --- |
| SPM | 9 | 4.86% |
| CASteer | 108 | 58.38% |
| Both | 68 | 36.76 |
| Total | 185 | 100% |

Next, we run another user study, this time testing removal of the concept of “Mickey” based on implicit prompts. For this study, we generated 100 images using prompts “A mouse from Disneyland” and “A Walt Disney’s most popular character”.Then, we randomly selected 20 image pairs and provided them to our evaluators. We asked the users to select which model is best at removing the Mickey concept, by asking “Which image has the lower level of “Mickey” concept present?" and providing 3 options as answers: 1)"Image A", 2)"Image B", 3)"Both images completely removed the Mickey concept". Tab. [5](https://arxiv.org/html/2503.09630v3#A4.T5) shows, CASteer was again preferred for generating images without the “Mickey" concept.

**Table 5: User preferences for which model removed the implicit “Mouse from Disneyland" better. Our model was preferred for removing Mickey from images.**
| Model | Images Preferred | Percentage (%) |
| --- | --- | --- |
| SPM | 4 | 2.17% |
| CASteer | 156 | 84.32% |
| Both | 25 | 13.51 |
| Total | 185 | 100% |

Based on the results above, we can see that users consider that CASteer removes specific concepts from generated images better than SPM. This matches our quantitative results presented in the paper.

Next, we compare CASteer, SPM and Receler models in removing the “Snoopy" concept, while preserving the concept of “Mickey". First, we asses removal of the “Snoopy" concept. We generated 800 images using “Snoopy” prompts augmented with CLIP templates. Then, we randomly selected multiple sets of 20 image pairs and provided them to our evaluators. We asked them to select all the images where the concept of “Snoopy" is removed. Tab. [6](https://arxiv.org/html/2503.09630v3#A4.T6) shows that both CASteer and Receler have high rates of “Snoopy" erasure. .

**Table 6: Percentage of generated images containing Snoopy detected for each model.**
| Model | $\%$ Containing Snoopy $\downarrow$ | $\%$Without Snoopy $\uparrow$ | $\%$ Total |
| --- | --- | --- | --- |
| Receler | 0 | 100 | 100 |
| CASteer | 3.3 | 96.7 | 100 |
| SPM | 44.4 | 55.6 | 100 |

Lastly, we want to see how well SPM, Receeler and CASteer preserve concepts“Mickey" when “Snoopy" is removed. We provide users with 3 images, one for each model, and ask them to rank these images based on how much the “Mickey" concept is preserved in the images. We thus ask them “Rank the images in order from higher level of “Mickey" concept present (1) to lowest level of "Mickey" concept present (3).". We give each user a randomly selected subset of 15 triplets of images. We can observe in Tab. [7](https://arxiv.org/html/2503.09630v3#A4.T7) that SPM preserves the best the concept of Mickey, followed by CASteer. However, from Tab. [6](https://arxiv.org/html/2503.09630v3#A4.T6) we see that SPM has a much higher tendency to preserve concepts, even the ones that should be removed, such as “Snoopy". Our model has been considered by users a more reliable model for both removing some concepts and preserving the rest.

**Table 7: User ranking of generated images by perceived Mickey content (1 = most Mickey, 3 = least Mickey). Lower scores indicate more Mickey content which is what we want to preserve.**
| Model | Total Rank Score $\downarrow$ | Average Rank $\downarrow$ |
| --- | --- | --- |
| Receler | 480 | 2.73 |
| CASteer | 391 | 2.22 |
| SPM | 185 | 1.05 |

## Appendix E Results on SDXL model

Here we provide qualitative and qualitative results on removing concrete and abstract concepts using CASteer with the SDXL model.

### E.1 Experimental setup

In SDXL experiments, we generate images using CASteer with $\beta=2$ on SDXL-base-1.0 model (stabilityai/stable-diffusion-xl-base-1.0) with steering vectors calculated on SDXL-Turbo model (stabilityai/sdxl-turbo).

For calculation of steering vectors, we use fp16-version of SDXL-Turbo model. We generate images using default resolution, with one denoising step, using guidance scale=0.0 and seed=0. All other parameters are left default. To generate images, we use CASteer on SDXL-base-1.0 model with 30 denoising steps. All other parameters are left default.

Generation of steering vector using 1 pair of prompts on SDXL-Turbo takes 8 seconds on V-100 GPU, i.e. generation of steering vectors for concrete concepts (see sec.[C](https://arxiv.org/html/2503.09630v3#A3)) using 50 prompts takes  7 minutes, generation of steering vectors for human-related concepts (see sec.[C](https://arxiv.org/html/2503.09630v3#A3)) using 210 prompts takes 28 minutes.

### E.2 Quantitative results

We use the same experimental setups as for SD-1.4, described in Sec. [4](https://arxiv.org/html/2503.09630v3#S4). Results are shown in Tab.[8](https://arxiv.org/html/2503.09630v3#A5.T8), [9](https://arxiv.org/html/2503.09630v3#A5.T9), [10](https://arxiv.org/html/2503.09630v3#A5.T10),[11](https://arxiv.org/html/2503.09630v3#A5.T11).

**Table 8: Quantitative results on nudity removal based on I2P DBLP:conf/cvpr/SchramowskiBDK23 dataset. Detection of nude body parts is done by Nudenet at a threshold of 0.6. F: Female, M: Male. The best results are highlighted in bold, second-best are underlined.**
| Method | Nudity Detection |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Breast(F) | Genitalia(F) | Breast(M) | Genitalia(M) | Buttocks | Feet | Belly | Armpits | Total$\downarrow$ |  |
| SDXL | 85 | 7 | 3 | 2 | 7 | 28 | 84 | 66 | 282 |
| Ours (w/o clip) | 4 | 0 | 0 | 0 | 0 | 6 | 10 | 7 | 27 |
| Ours (clip) | 5 | 1 | 0 | 1 | 0 | 3 | 9 | 7 | 26 |

**Table 9: Quantitative results on inappropriate content removal based on I2PDBLP:conf/cvpr/SchramowskiBDK23 dataset. Detection of inappropriate content is done by Q16 schramowski2022can.**
| Class name | Inappropriate proportion (%) ($\downarrow$) |  |  |
| --- | --- | --- | --- |
| SDXL | Ours (w/o clip) | Ours (clip) |  |
| Hate | 39.4 | $23.8$ | $20.8$ |
| Harassment | 33.0 | $21.7$ | $21.7$ |
| Violence | 43.7 | $25.9$ | $24.7$ |
| Self-harm | 42.4 | $24.3$ | $24.1$ |
| Sexual | 45.3 | $33.0$ | $32.2$ |
| Shocking | 49.6 | $32.0$ | $30.8$ |
| Illegal activity | 36.0 | $23.5$ | $23.5$ |
| Overall | 41.97 | $27.2$ | $26.6$ |

**Table 10: General quality estimation of images generated by CASteer on SDXL model with nudity erasure. CLIP score and FID are calculated on COCO-30k dataset**
| Method | Locality |  |
| --- | --- | --- |
| CLIP-30K($\uparrow$) | FID-30K($\downarrow$) |  |
| SDXL | 31.53 | 13.29 |
| Ours | 31.51 | 13.56 |
| Ours (clip) | 31.45 | 13.37 |

**Table 11: Quantiative evaluation of concrete object erasure.**
|  | Snoopy | Mickey | Spongebob | Pikachu | Dog | Legislator |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  | CS$\downarrow$ | CS$\uparrow$ | FID$\downarrow$ | CS$\uparrow$ | FID$\downarrow$ | CS$\uparrow$ | FID$\downarrow$ | CS$\uparrow$ | FID$\downarrow$ | CS$\uparrow$ | FID$\downarrow$ |
| SDXL | 74.3 | 73.1 | - | 75.1 | - | 72.7 | - | 66.3 | - | 60.8 |  |
| Ours | 48.7 | 68.5 | 69.0 | 73.7 | 58.4 | 72.7 | 27.8 | 66.4 | 37.9 | 60.8 | 27.4 |
| Ours (clip) | 48.6 | 68.2 | 70.7 | 73.4 | 59.2 | 72.8 | 28.3 | 66.4 | 37.9 | 60.9 | 20.0 |

### E.3 Qualitative results

In this section, we provide qualitative results on CASteer applied on SDXL model.

First, we show results on removing “Snoopy" concept when generating images with four prompt templates: “An origami $X$", “A drawing of the $X$", “A photo of a cool $X$" and “An art of the $X$", where $X\in$ [“Snoopy", “Mickey", “Spongebob", “Pikachu", “dog", “legislator"]. CASteer is applied with removal strength $\beta=2$.

We see that our method removes Snoopy well (see fig. [5](https://arxiv.org/html/2503.09630v3#A5.F5) while preserving other concepts well (see fig.  [6](https://arxiv.org/html/2503.09630v3#A5.F6), [7](https://arxiv.org/html/2503.09630v3#A5.F7), [8](https://arxiv.org/html/2503.09630v3#A5.F8),
[9](https://arxiv.org/html/2503.09630v3#A5.F9),
[10](https://arxiv.org/html/2503.09630v3#A5.F10)). In fact, most of the images of non-related concepts generated with CASteer applied are almost identical to those generated by vanilla SDXL.

Second, we show images generated on COCO-30k prompts with applied CASteer for nudity removal. We see that quality of generated images does not degrade, supporting quantitative results of Tab.[10](https://arxiv.org/html/2503.09630v3#A5.T10)

Figure: Figure 5: Images generated with “Snoopy" prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “Snoopy".
Refer to caption: content/images/sdxl/rem_snoopy_snoopy.png

Figure: Figure 6: Images generated with “Mickey" prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “Snoopy".
Refer to caption: content/images/sdxl/rem_snoopy_mickey.png

Figure: Figure 7: Images generated with “Spongebob" prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “Snoopy".
Refer to caption: content/images/sdxl/rem_snoopy_spongebob.png

Figure: Figure 8: Images generated with “Pikachu" prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “Snoopy".
Refer to caption: content/images/sdxl/rem_snoopy_pikachu.png

Figure: Figure 9: Images generated with “dog" prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “Snoopy".
Refer to caption: content/images/sdxl/rem_snoopy_dog.png

Figure: Figure 10: Images generated with “legislator" prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “Snoopy".
Refer to caption: content/images/sdxl/rem_snoopy_legislator.png

Figure: Figure 11: Images generated with different COCO-30k prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “nudity".
Refer to caption: content/images/sdxl/sdxl_coco_1.png

Figure: Figure 12: Images generated with different COCO-30k prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “nudity".
Refer to caption: content/images/sdxl/sdxl_coco_2.png

Figure: Figure 13: Images generated with different COCO-30k prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “nudity".
Refer to caption: content/images/sdxl/sdxl_coco_3.png

Figure: Figure 14: Images generated with different COCO-30k prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “nudity".
Refer to caption: content/images/sdxl/sdxl_coco_4.png

## Appendix F Results on SANA model

### F.1 Experimental setup

In SANA experiments, we generate images using CASteer with $\beta=2$ on SANA_Sprint_1.6B_1024px_teacher model (Efficient-Large-Model/SANA_Sprint_1.6B_1024px_teacher_diffusers) with steering vectors calculated on Sana_Sprint_1.6B_1024px model (Efficient-Large-Model/Sana_Sprint_1.6B_1024px_diffusers).

For calculation of steering vectors, we use fp16-version of Sana_Sprint_1.6B_1024px_diffusers model. We generate images using default resolution, with one denoising step, using guidance seed=0. All other parameters are left default. To generate images, we use CASteer on SANA_Sprint_1.6B_1024px_teacher model with 20 denoising steps. All other parameters are left default.

Generation of steering vector using 1 pair of prompts on Sana_Sprint_1.6B_1024px takes 5 seconds on V-100 GPU, i.e. generation of steering vectors for concrete concepts (see sec.[C](https://arxiv.org/html/2503.09630v3#A3)) using 50 prompts takes  4.2 minutes, generation of steering vectors for human-related concepts (see sec.[C](https://arxiv.org/html/2503.09630v3#A3)) using 210 prompts takes 18 minutes.

### F.2 Quantitative results

In this section, we present quantitative results on steering SANA model. We use the same experimental setups as for SD-1.4, described in Sec.[4](https://arxiv.org/html/2503.09630v3#S4). Results on SANA model are shown in Tab.[12](https://arxiv.org/html/2503.09630v3#A6.T12),[13](https://arxiv.org/html/2503.09630v3#A6.T13),[14](https://arxiv.org/html/2503.09630v3#A6.T14),[15](https://arxiv.org/html/2503.09630v3#A6.T15).

**Table 12: Quantitative results on nudity removal based on I2P DBLP:conf/cvpr/SchramowskiBDK23 dataset. Detection of nude body parts is done by Nudenet at a threshold of 0.6. F: Female, M: Male. The best results are highlighted in bold, second-best are underlined.**
| Method | Nudity Detection |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Breast(F) | Genitalia(F) | Breast(M) | Genitalia(M) | Buttocks | Feet | Belly | Armpits | Total$\downarrow$ |  |
| SANA | 14 | 0 | 3 | 4 | 0 | 5 | 44 | 21 | 91 |
| Ours (w/o clip) | 6 | 0 | 0 | 1 | 0 | 2 | 0 | 2 | 11 |
| Ours (clip) | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 2 |

**Table 13: Quantitative results on inappropriate content removal based on I2P DBLP:conf/cvpr/SchramowskiBDK23 dataset. Detection of inappropriate content is done by Q16 schramowski2022can.**
| Class name | Inappropriate proportion (%) ($\downarrow$) |  |  |
| --- | --- | --- | --- |
| SANA | Ours (w/o clip) | Ours (clip) |  |
| Hate | 48.1 | $48.5$ | $35.0$ |
| Harassment | 42.8 | $42.5$ | $30.3$ |
| Violence | 49.3 | $40.3$ | $35.6$ |
| Self-harm | 49.4 | $39.5$ | $30.2$ |
| Sexual | 36.6 | $32.6$ | $22.3$ |
| Shocking | 57.9 | $50.1$ | $39.5$ |
| Illegal activity | 42.5 | $36.9$ | $25.7$ |
| Overall | 46.1 | $40.1$ | $30.5$ |

**Table 14: General quality estimation of images generated by CASteer on SDXL model with nudity erasure. CLIP score and FID are calculated on COCO-30k dataset**
| Method | Locality |  |
| --- | --- | --- |
| CLIP-30K($\uparrow$) | FID-30K($\downarrow$) |  |
| SANA | 29.28 | 22.65 |
| Ours | 28.79 | 22.89 |
| Ours (clip) | 29.01 | 23.51 |

**Table 15: Quantiative evaluation of concrete object erasure. The best results are highlighted in bold, second-best are underlined. Results of other methods are taken from SPM DBLP:conf/cvpr/Lyu0HCJ00HD24.**
|  | Snoopy | Mickey | Spongebob | Pikachu | Dog | Legislator |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  | CS$\downarrow$ | CS$\uparrow$ | FID$\downarrow$ | CS$\uparrow$ | FID$\downarrow$ | CS$\uparrow$ | FID$\downarrow$ | CS$\uparrow$ | FID$\downarrow$ | CS$\uparrow$ | FID$\downarrow$ |
| SANA | 79.7 | 76.1 | - | 79.0 | - | 74.0 | - | 68.1 | - | 60.5 |  |
| Ours | 48.2 | 74.9 | 94.3 | 78.1 | 68.0 | 74.0 | 45.2 | 68.0 | 48.6 | 60.3 | 25.0 |
| Ours (clip) | 48.2 | 75.0 | 96.5 | 78.1 | 71.0 | 74.0 | 46.0 | 68.0 | 49.3 | 59.8 | 20.1 |

### F.3 Qualitative results

In this section, we provide qualitative results on CASteer applied on SANA model.

First, we show results on removing “Snoopy" concept when generating images with four prompt templates: “An origami $X$", “A drawing of the $X$", “A photo of a cool $X$" and “An art of the $X$", where $X\in$ [“Snoopy", “Mickey", “Spongebob", “Pikachu", “dog", “legislator"]. CASteer is applied with removal strength $\beta=2$.

We see that our method removes Snoopy well (see Fig. [15](https://arxiv.org/html/2503.09630v3#A6.F15) while preserving other concepts well (see Fig.  [16](https://arxiv.org/html/2503.09630v3#A6.F16), [17](https://arxiv.org/html/2503.09630v3#A6.F17), [18](https://arxiv.org/html/2503.09630v3#A6.F18),
[19](https://arxiv.org/html/2503.09630v3#A6.F19),
[20](https://arxiv.org/html/2503.09630v3#A6.F20)). In fact, most of the images of non-related concepts generated with CASteer applied are almost identical to those generated by vanilla SDXL.

Second, we show images generated on COCO-30k prompts with applied CASteer for nudity removal. We see that quality of generated images does not degrade, supporting quantitative results of Tab.[14](https://arxiv.org/html/2503.09630v3#A6.T14). In some cases, visual quality of image generated with CASteer exceeds that of original SANA (see Fig. [22](https://arxiv.org/html/2503.09630v3#A6.F22), 3rd and 5th images for example).

Figure: Figure 15: Images generated with “Snoopy" prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “Snoopy".
Refer to caption: content/images/sana/rem_snoopy_snoopy.png

Figure: Figure 16: Images generated with “Mickey" prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “Snoopy".
Refer to caption: content/images/sana/rem_snoopy_mickey.png

Figure: Figure 17: Images generated with “Spongebob" prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “Snoopy".
Refer to caption: content/images/sana/rem_snoopy_spongebob.png

Figure: Figure 18: Images generated with “Pikachu" prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “Snoopy".
Refer to caption: content/images/sana/rem_snoopy_pikachu.png

Figure: Figure 19: Images generated with “dog" prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “Snoopy".
Refer to caption: content/images/sana/rem_snoopy_dog.png

Figure: Figure 20: Images generated with “legislator" prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “Snoopy".
Refer to caption: content/images/sana/rem_snoopy_legislator.png

Figure: Figure 21: Images generated with different COCO-30k prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “nudity".
Refer to caption: content/images/sana/sana_coco_1.png

Figure: Figure 22: Images generated with different COCO-30k prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “nudity".
Refer to caption: content/images/sana/sana_coco_2.png

Figure: Figure 23: Images generated with different COCO-30k prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “nudity".
Refer to caption: content/images/sana/sana_coco_3.png

Figure: Figure 24: Images generated with different COCO-30k prompts with different seeds. Top: original SDXL, bottom: CASteer applied for removing the concept of “nudity".
Refer to caption: content/images/sana/sana_coco_4.png

## Appendix G Ablations on hyperparameters

In this section, we provide ablations on such hyperparameters as number of prompt pairs to form a steering vector, a value of $\beta$ and choice of the intermediate layer to steer.

### G.1 Number of steering vectors

First, we compute steering vectors for the concept of “Snoopy" using SD-1.4 model on varying number of prompt pairs. Then we fix $\beta=2$ and apply CASteer on SD-1.4 model using computed steering vectors on prompts containing “Snoopy" and “Mickey" concepts as described in sec. [4](https://arxiv.org/html/2503.09630v3#S4). In particular, we augment each concept using $80$ CLIP DBLP:conf/icml/RadfordKHRGASAM21 templates, and generate $10$ for each concept-template pair, so that for each concept there are $800$ images.
We calculate CLIP Score (CS) DBLP:conf/emnlp/HesselHFBC21 and FID DBLP:conf/nips/HeuselRUNH17 on these generated images as described in sec. [4](https://arxiv.org/html/2503.09630v3#S4). Specifically, we use CS to estimate the level of the existence of the “Snoopy" concept within the generated images. Next, we calculate FID DBLP:conf/nips/HeuselRUNH17 scores between the set of original generations of SD-1.4 model on “Mickey" prompts and a set of generations of the steered model on “Mickey" prompts. We use it to assess how much images of this related concept generated by the steered model differ from those of generated by the original model. Higher FID value demonstrate more severe generation alteration.

For each number of prompt pairs, we compute the steering vector three times using different non-intersecting sets of prompts. Thus, for each number of prompt pairs, we report three metric values.

Figures [25(a)](https://arxiv.org/html/2503.09630v3#A7.F25.sf1) and [25(b)](https://arxiv.org/html/2503.09630v3#A7.F25.sf2) show CS and FID metrcis for different numbers of prompt pairs. We see that using number of pairs 50 and above results in similar performance.

Figure: (a)
Refer to caption: content/images/params_abl/clip_score.png

### G.2 Steering strength

Note that CASteer has a hyperparameter $\beta$, which determines the strength of steering for concept removal. Varying values of $\beta$ can lead to different trade-offs between level of target concept erasure and alteration of generated images not containing target concept. Although we observe that value of $\beta=2$ is optimal for all erasing scenarios and we use $\beta=2$ in all our experiments, $\beta$ still can be tuned for each use case. To show how $\beta$ influences performance, we provide results on “Snoopy" erasure using CASTeer on SD-1.4 with different values of $\beta$

We use CASteer on SD-1.4 to erase concept of “Snoopy" from images generated on “Snoopy" and “Mickey" prompts. We calculate CLIP Score (CS) and FID as described above in sec.[G.1](https://arxiv.org/html/2503.09630v3#A7.SS1). Fig. [26(a)](https://arxiv.org/html/2503.09630v3#A7.F26.sf1),[26(b)](https://arxiv.org/html/2503.09630v3#A7.F26.sf2) shows the results. We see that value of $\beta$ indeed presents trade-off between strength of erasure of a desired concept (“Snoopy") and preservation of another concept (“Mickey"). Hence, different strength $\beta$ might be used depending on the goal of the task.

Figure: (a)
Refer to caption: content/images/params_abl/beta_clip_score.png

### G.3 Steering other layers

Here we provide results on steering other intermediate representations of DiT backbone rather than cross-attention (CA) output.

First, steering any part of DiT not inside CA does not result in the desired behaviour, producing completely out-of-distribution iamges. Next, we try to steer other parts of CA layer, namely, computing steering vectors and steering key and value vectors or steering outputs of individual attention heads. We steer key and value vectors here because they carry information from the input prompt.

We use CASteer on SD-1.4 to erase concept of “Snoopy" from images generated on “Snoopy" and “Mickey" prompts. We calculate CLIP Score (CS) and FID as described above in sec.[G.1](https://arxiv.org/html/2503.09630v3#A7.SS1). Tab.[16](https://arxiv.org/html/2503.09630v3#A7.T16) presents the results. We see that steering key and value vector has less effect on the desired concept, and steering outputs of individual attention heads provides roughly the same results.

**Table 16: Quantiative evaluation of steering other layers.**
|  | Snoopy | Mickey |
| --- | --- | --- |
|  | CS$\downarrow$ | FID$\downarrow$ |
| SDXL | 74.3 | - |
| Key-Value outputs ($\beta=2$) | 62.79 | 43.5 |
| CA Heads outputs ($\beta=2$) | 48.94 | 67.3 |
| CA outputs ($\beta=2$) | 48.7 | 68.5 |

### G.4 Steering only fraction of layers

In all our experiments we apply CASteer to all of the CA layers in the models (SD-1.4, SDXL or SANA)/ In this section, we provide qualitative experiments on steering only a fraction of CA layers.

We ablate on three ways of choosing a subset of CA layers for steering:

- •
Steering only $k$ first CA layers, $0\leqslant k\leqslant n$;
- •
Steering only $k$ last layers, $0\leqslant k\leqslant n$;
- •
Steering only $k^{th}$ CA layer, $0\leqslant k\leqslant n$.

We evaluate CASteer on SDXL with $\beta=2$ under these settings for erasing the concept of angriness(fig. [27](https://arxiv.org/html/2503.09630v3#A7.F27),  [28](https://arxiv.org/html/2503.09630v3#A7.F28),  [29](https://arxiv.org/html/2503.09630v3#A7.F29)). In all the figures we illustrate results for values of $k$ between 0 and 60 with a step of 3 for compactness.

Our empirical findings suggest the following:
1) It is not sufficient to steer only one layer (see fig.  [29](https://arxiv.org/html/2503.09630v3#A7.F29)). It can be seen that he effect of steering any single layer is negligible, not causing the desired effect.
2) There is a trade-off between the level of expression of the desired concept in a resulting image and the alteration of general image layout and features. If we steer most of the layers, the overall layout may change drastically from that of the original image and it may cause in the change of identity or other features in the steered image compared to the original one (see fig. [27](https://arxiv.org/html/2503.09630v3#A7.F27),  [28](https://arxiv.org/html/2503.09630v3#A7.F28)). As fig. [28](https://arxiv.org/html/2503.09630v3#A7.F28) suggests, steering only few last CA layers of the model results in a good trade-off between removing the unwanted concept and keeping other image details intact.

Figure: Figure 27: Results on removing the concept of “angry" using CASteer on the prompt “a realistic colorful portrait of an angry man" with steering only $k$ last CA layers, $60\geqslant k\geqslant 1$. Top left corner: image generated without CASteer, images from top to bottom, left to right: images generated using CASteer with varying $k$
Refer to caption: content/images/sdxl/forward_remove_angry.png

Figure: Figure 28: Results on removing the concept of “angry" using CASteer on the prompt “a realistic colorful portrait of an angry man" with steering only $k$ first CA layers, $1\leqslant k\leqslant 60$. Top left corner: image generated without CASteer, images from top to bottom, left to right: images generated using CASteer with varying $k$
Refer to caption: content/images/sdxl/backward_remove_angry.png

Figure: Figure 29: Results on removing the concept of “angry" using CASteer on the prompt “a realistic colorful portrait of an angry man" with steering only CA layer number $k$, $1\leqslant k\leqslant 60$. Top left corner: image generated without CASteer, images from top to bottom, left to right: images generated using CASteer with varying $k$
Refer to caption: content/images/sdxl/k_remove_angry.png

## Appendix H Other tasks

In this section, we provide evidence that using steering vectors calculated by CASteer, it is possible not only to erase concepts from generated images, but to solve other tasks, such as concept addition, concept flipping and concept interpolation. We provide some quantitative and qualitative results on these tasks. However, we leave comprehensive analysis of CASteer capabilities on these tasks for future work.

### H.1 Concept switch

In this section, we propose a way to modity CASteer to flip one concept on the image being generated into another, i.e. resulting generating concept $Y$ when prompted to generate concept $X$.

#### H.1.1 Method

Recall from Sec. [3](https://arxiv.org/html/2503.09630v3#S3) that the value of the dot product $(ca^{X}_{it}\cdot ca^{out}_{itk})$ can be seen as amount of $X$ that is present in $ca^{out}_{itk}$. Thus we propose the following technique for replacing one concept $X$ for another concept $Y$.
We first construct steering vectors $ca^{XY}_{it}$ from $X$ to $Y$ using the same idea described in Sec. [3](https://arxiv.org/html/2503.09630v3#S3), with the only difference that the positive prompt contains $X$ (“a girl with an apple”) while the negative one contains $Y$ (“a girl with pear”).
Then we use this steering vector to modify cross-attention outputs as:

$$ $ca^{out_new}_{itk}=ca^{out}_{itk}-2\langle ca^{XY}_{it},ca^{out}_{itk}\rangle ca^{XY}_{it},$ (9) $$

where
$1\leqslant k\leqslant\text{patch_num}_{i}$. This operation can be seen as removing all the information about concept $X$ from $ca^{out}_{itk}$ and instead adding the same amount of information about concept $Y$, that is, we reflect $ca^{out}_{itk}$ relatively to the vector orthogonal to $ca^{XY}_{it}$.
Consequently, during generation, if given the prompt “a girl with an apple”, the model will generate an image corresponding to “a girl with a pear”, effectively switching the concept of an apple with that of a pear.

Here we can also add steering strength by introducing parameter $\beta$:

$$ $ca^{out_new}_{itk}=ca^{out}_{itk}-\beta\langle ca^{XY}_{it},ca^{out}_{itk}\rangle ca^{XY}_{it},$ (10) $$

Higher $\beta$ will result in higher expression of concept $Y$ in the resulting image. In our experiments, we observe that $\beta>2$ sometimes is needed to completely switch concept $X$ to $Y$.

Adding Intermediate clipping. Note that using Eq.[9](https://arxiv.org/html/2503.09630v3#A8.E9) we only want to influence those CA outputs $ca^{out}_{itk}$ which have a positive amount of unwanted concept $X$ in them, i.e. we only want to flip $X$ to $Y$, and not on the opposite direction. As dot product $\langle ca^{X}_{it},ca^{out}_{itk}\rangle$ measures the amount of $X$ present in CA output $ca^{out}_{itk}$, we only want to steer those CA outputs $ca^{out}_{itk}$, which have a positive dot product with $ca^{X}_{it}$. So the equation becomes the following:

$$ $\begin{split}\alpha=\max(\beta\langle ca^{XY}_{it},ca^{out}_{itk}\rangle,0)\\ ca^{out_new}_{itk}=ca^{out}_{itk}-\beta\alpha ca^{XY}_{it}\end{split}$ (11) $$

#### H.1.2 Qualitative results

Here, we provide qualitative results results on flipping different concepts. Fig.[30](https://arxiv.org/html/2503.09630v3#A8.F30),[31](https://arxiv.org/html/2503.09630v3#A8.F31),[32](https://arxiv.org/html/2503.09630v3#A8.F32) visualize results of switching concepts of “Snoopy” to “Winnie-the-Pooh”, “cat” to “giraffe” and “caterpillar” to “butterfly”. All the images are generated using SDXL model with steering vectors obtained from SDXL-Turbo model.

Figure: Figure 30: Switching between concepts of “Snoopy" and “Winnie-the-Pooh" using CASteer. Top: images generated by vanilla SDXL, bottom: images with CASteer applied.
Refer to caption: content/images/task_flipping/snoopy-winnie.png

Figure: Figure 31: Switching between concepts of “cat" and “giraffe" using CASteer. Top: images generated by vanilla SDXL, bottom: images with CASteer applied.
Refer to caption: content/images/task_flipping/cat-giraffe.png

Figure: Figure 32: Switching between concepts of “caterpillar" and “butterfly" using CASteer. Top: images generated by vanilla SDXL, bottom: images with CASteer applied.
Refer to caption: content/images/task_flipping/caterpillar-butterfly.png

### H.2 Concept addition

In this section, we propose a way to use CASteer to add desired concepts on the image being generated.

#### H.2.1 Method

Recall eq.[3](https://arxiv.org/html/2503.09630v3#S3.E3), which defined a mechanism of subtracting concept information from CA outputs of diffusion model to prevent generation of some concepts. We can use the same mechanism to instead add concept to the outputs:

$$ $ca^{out_new}_{itk}=ca^{out}_{itk}+\alpha ca^{X}_{itk},$ (12) $$

Here $1\leqslant k\leqslant\text{patch_num}_{i}$, and $\alpha$ is a hyperparameter that controls the strength of concept addition.

#### H.2.2 Qualitative results

Here, we provide qualitative results on adding different concepts.

Fig.[30](https://arxiv.org/html/2503.09630v3#A8.F30),[31](https://arxiv.org/html/2503.09630v3#A8.F31),[32](https://arxiv.org/html/2503.09630v3#A8.F32) visualize results of adding concepts of “apple", “hat", “clothes" and “happiness" using CASteer. Note that for diferent concepts, different values of $\alpha$ are optimal.

Figure: Figure 33: Adding concepts of “apple", “hat", “clothes" and “happiness" using CASteer. Top: images generated by vanilla SDXL, bottom: images with CASteer applied.
Refer to caption: content/images/concept_addition_2.png

### H.3 Style Transfer

In this section, we propose a way to use CASteer to change styles of real images or images being generated.

#### H.3.1 Method

CASteer performs Style Transfer on real images as follows: we apply the reverse diffusion process following DDIM DBLP:conf/iclr/SongME21 for $t$ number of steps, where $1\leqslant t\leqslant T$. Then we denoise image back using CASteer (addition algorithm, see eq.[12](https://arxiv.org/html/2503.09630v3#A8.E12)). $t$ controls the trade-off between loss of image details and intensity of style applied. On fig. [34](https://arxiv.org/html/2503.09630v3#A8.F34), [35](https://arxiv.org/html/2503.09630v3#A8.F35), [36](https://arxiv.org/html/2503.09630v3#A8.F36), [37](https://arxiv.org/html/2503.09630v3#A8.F37) we show results on style transfer to four different styles with varying $t$. Intensity$=0.3$ here means that $t=0.3T$.
With such a process, we often get satisfying results with no major loss of details. However, when $t$ is high, the loss of image content occurs (see bottom lines of figures).
This is due to the fact that the inversion is not sufficiently accurate.

Figure: Figure 34: Examples of Style Transfer of real images into “anime" style. From top to bottom: original image, style transfer applied with intensities from 0.1 to 0.7 with a step of 0.1
Refer to caption: content/images/style_transfer/anime.png

Figure: Figure 35: Examples of Style Transfer of real images into “origami" style. From top to bottom: original image, style transfer applied with intensities from 0.1 to 0.7 with a step of 0.1
Refer to caption: content/images/style_transfer/origami.png

Figure: Figure 36: Examples of Style Transfer of real images into “Gothic Art" style. From top to bottom: original image, style transfer applied with intensities from 0.1 to 0.7 with a step of 0.1
Refer to caption: content/images/style_transfer/Gothic_Art.png

Figure: Figure 37: Examples of Style Transfer of real images into “Retro Art" style. From top to bottom: original image, style transfer applied with intensities from 0.1 to 0.7 with a step of 0.1
Refer to caption: content/images/style_transfer/Retro_Art.png

## Appendix I Interpreting steering vectors

### I.1 Steering vectors visualization

In this section, we propose a way to interpret the meaning of steering vectors generated by CASteer. Suppose we have steering vectors generated for a concept $\mathbf{X}$ $\{ca^{\mathbf{X}}_{it}\},1\leqslant i\leqslant n,1\leqslant t\leqslant T$, where $n$ is the number of model layers and $T$ is a number of denoising steps performed for generating steering vectors. To interpret these vectors, we prompt the diffusion model with a placeholder prompt “X" and at each denoising step, we substitute outputs of the model’s CA layers with corresponding steering vectors. This makes the diffusion model be only conditioned on the information from the steering vectors, completely suppressing other information from the text prompt.

Fig. [38](https://arxiv.org/html/2503.09630v3#A9.F38) shows interpretations for the steering vectors of concepts “hat", “polka dot dress", “Snoopy", “angry", “happy", from top to bottom. Note that vectors for concepts “hat", “polka dot dress" and “Snoopy" were generated using prompt pair templates for concept deletion, i.e. pairs of the form (“fish with Snoopy", “fish"), (“a girl with a hat", “a girl") (see sec.  [C.1](https://arxiv.org/html/2503.09630v3#A3.SS1)), and this is reflected in generated images, as they show these concepts not alone, but in a form of a girl in a hat, a girl in a polka dot dress or a boy with a Snoopy. As for the last two concepts (“angry", “happy"), their steering vectors were generated using prompt pair templates for human-related concepts (see sec.  [C.2](https://arxiv.org/html/2503.09630v3#A3.SS2)), and they illustrate these concepts as is.

We note that images of each concept exhibit common features, e.g. all the images of hats and polka dots feature only female persons, and images corresponding to “angry" and “happy" concepts have certain styles. We believe this reflects how diffusion models perceive different concepts, and that this interpretation technique can be used for unveiling the hidden representations of concepts inside the diffusion model, but we leave it to future work.

Figure: Figure 38: Visualization of generations of the model conditioned only on steering vectors. Images in rows from top to down were generated using steering vectors for the concepts “hat", “polka dot dress", “Snoopy", “angry", “happy"
Refer to caption: content/images/interpreting/interp.png

### I.2 UMap on steering vectors

We generate steering vectors for all vocabulary tokens of SDXL text encoders and apply UMap DBLP:journals/corr/abs-1802-03426 on these steering vectors. Fig. [39](https://arxiv.org/html/2503.09630v3#A9.F39), [41](https://arxiv.org/html/2503.09630v3#A9.F41), [40](https://arxiv.org/html/2503.09630v3#A9.F40), [42](https://arxiv.org/html/2503.09630v3#A9.F42) show that structure emerges in the space of these steering vectors, similar to that of Word2Vec DBLP:journals/corr/abs-1301-3781, supporting the hypothesis that steering vectors carry the meaning of the desired concept. This is observed for all the layers in the model.

Figure: Figure 39: Visualization of UMap applied to the steering vectors from the layer 17 of SDXL-Turbo formed by 3000 SDXL-Turbo vocabulary tokens
Refer to caption: content/images/interpreting/17_hello.png

Figure: Figure 40: Visualization of UMap applied to the steering vectors from the layer 17 of SDXL-Turbo formed by 3000 SDXL-Turbo vocabulary tokens
Refer to caption: content/images/interpreting/17_work.png

Figure: Figure 41: Visualization of UMap applied to the steering vectors from the layer 35 of SDXL-Turbo formed by 3000 SDXL-Turbo vocabulary tokens
Refer to caption: content/images/interpreting/35_hello.png

Figure: Figure 42: Visualization of UMap applied to the steering vectors from the layer 35 of SDXL-Turbo formed by 3000 SDXL-Turbo vocabulary tokens
Refer to caption: content/images/interpreting/35_work.png

## Appendix J SPM vs CASteer on adversarial prompts

In this section, we present more qualitative examples of CASteer outperforming SPM DBLP:conf/cvpr/Lyu0HCJ00HD24 on adversarial prompts, i.e. prompts containing implicitly defined concepts. SD-1.4 is used as a backbone for both methods. We use prompts “A mouse from Disneyland" and “A girl with a mouse from Disneyland" to test erasing of concept of “Mickey" and prompts “A yellow Pokemon" and “A girl with a yellow Pokemon" to test erasing of concept of “Pikachu".

Figure: Figure 43: Examples of 8 generated images from CASteer and SPM when prompted “A mouse from Disneyland". Top: generation of CASteer, Bottom: generations of SPM. We use the same diffusion hyperparameters and seeds when generating corresponding images from CASteer and SPM
Refer to caption: content/images/spm_fail/mouse_disneyland.png

Figure: Figure 44: Examples of 8 generated images from CASteer and SPM when prompted “A girl with a mouse from Disneyland". Top: generation of CASteer, Bottom: generations of SPM. We use the same diffusion hyperparameters and seeds when generating corresponding images from CASteer and SPM
Refer to caption: content/images/spm_fail/girl_mouse.png

Figure: Figure 45: Examples of 8 generated images from CASteer and SPM when prompted “A yellow Pokemon". Top: generation of CASteer, Bottom: generations of SPM. We use the same diffusion hyperparameters and seeds when generating corresponding images from CASteer and SPM
Refer to caption: content/images/spm_fail/yellow_pokemon.png

Figure: Figure 46: Examples of 8 generated images from CASteer and SPM when prompted “A girl with a yellow Pokemon". Top: generation of CASteer, Bottom: generations of SPM. We use the same diffusion hyperparameters and seeds when generating corresponding images from CASteer and SPM.
Refer to caption: content/images/spm_fail/girl_pokemon.png

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 4
presentation: 2
questions: - the hyperparameter $β=2$ is used for all experiments. How does the method's performance and stability vary with this parameter, especially across different concepts or model architectures?
- the paper uses a large number of prompt pairs (50 for concrete, 196 for abstract concepts). How sensitive is the method to the quality and diversity of these prompt pairs? poorly chosen set of prompts could lead to an imprecise steering vector.
- for multi-concept erasure, how do you resolve conflicting steering directions? is orthogonality assumptions still valid?
- the results on using steering vectors for adding concepts (and style transfer) are rather limited, can you discuss why certain applications fails with the proposed method?
soundness: 3
strengths: - a training-free framework using precomputed steering vectors to remove concepts from diffusion models.
- comprehensive empirical evaluations across various concepts and models.
summary: This paper introduces CASteer, a training-free framework for erasing specific concepts from diffusion models. The core idea is to compute steering vectors that represent the direction of an unwanted concept in the model's cross-attention layers. During inference, these vectors are subtracted from the model's activations without requiring any model retraining. The authors did comprehensive empirical experiments to demonstrate the effectiveness of the proposed method across various concepts, prompts, and model architectures.
weaknesses: - limited novelty regarding method, with strong assumptions on steering vectors’ linear compositionality.
- ad-hoc parameter selection - steering vector scaling hyperparameters are fixed empirically.
- no discussion of computational or memory trade-offs when constructing per-layer, per-step steering vectors.
- somewhat limited improvements, for example, CASteer with clipping only surpassing second-based model Receler by 1.42%, which is not significant.
- did not compare with unlearning baselines, such as [1,2]. 

[1] Wu, Yongliang, et al. "Unlearning concepts in diffusion model via concept domain correction and concept preserving gradient.

[2] Alberti, Silas, et al. "Data unlearning in diffusion models." arXiv preprint arXiv:2503.01034

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. How does CASteer perform when erasing multiple unrelated concepts or when steering vectors are different from each others?
2. How critical is cosine-similarity weighting? Could fixed or learned scalars achieve similar results?
soundness: 3
strengths: 1. The works presents a novel *training-free* approach to solve the problem of content erasure which improves over existing baselines both in term of performances and of practicality (no need to run an ad-hoc training). 
2. I find the idea of using steering vectors to *remove* concepts rather than *adding* them very interesting.
3. The paper is well written and easy to follow.
summary: The paper introduces CASteer, a training-free method for concept erasure in text-to-image diffusion models. Given an input prompt and a concept prompt, CASteer guides image generation to follow the input prompt while avoiding visual content associated with the concept prompt. The method computes steering vectors from the difference between cross-attention outputs when prompting the model with and without the concept. These vectors are applied at inference to steer generation in all the cross attention layers of the diffusion transformers. Experiments show that CASteer significantly outperforms prior baselines and is able to remove both abstract (e.g. nudity, inappropriate content) and concrete concepts (e.g. Mickey, Spongebob) and to generalize across models such as Stable Diffusion v1.4, SDXL, and SANA.
weaknesses: I only have some minor concerns:

1. The *extension to multiple concepts* (L272–L276) is not experimentally validated. It would be useful to assess performance as the number of erased concepts increases and/or their individual steering vectors substantially differ from each other.
2. Equation 4 introduces *cosine-similarity weighting* between the text prompt and the erased concept; the paper does not analyze how crucial this weighting is in practice. An ablation could clarify whether simpler weighting performs comparably.
3. Some *figures* could be improved. Figures 2 and 4 could benefit from clearer labeling of rows/columns and spacing can be increased among the sub captions of Figure 3.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: See 'Weaknesses'.
soundness: 3
strengths: * The writing is fluent and logically coherent, exhibiting strong readability.
* The proposed method is highly efficient, requiring no training or fine-tuning while achieving excellent performance.
* The proposed method exhibits strong generalization and is applicable to various text-to-image models that incorporate cross-attention mechanisms.
* Comprehensive qualitative and quantitative experiments demonstrate the effectiveness of the proposed method.
summary: The paper proposed Cross-Attention Steering (CASteer), a training-free framework for concept erasure in diffusion models using steering vectors to influence hidden representations dynamically. Specifically, CASteer cleverly designs an algorithm for constructing steering vectors for new concepts and leverages these steering vectors to suppress unwanted image features without retraining. Extensive experiments demonstrate the effectiveness of the proposed method.
weaknesses: * As shown in Figure 1, CASteer computes a steering vector for the output of every cross-attention layer at every timestep in the generation process and applies a correction. Could this be somewhat excessive? Would it be possible to experimentally analyze whether the number of corrected timesteps and CA layers can be reduced to improve efficiency?
* The reviewer examined the examples provided in the main paper as well as the prompt set in the appendix, and observed that the subjects used when constructing the prompts are relatively simple. This may lead to high variability in the generated outputs, which in turn could make the steering vector estimation unstable. For example, in Figure 1, when using “dog” as the subject, the model generates a brown dog as the positive sample and a white dog as the negative sample; this could cause the steering vector to incorrectly treat other attributes of the dog as part of the target concept. Would using more specific subjects yield a more stable and robust steering vector?
* It would be very helpful to provide some positive visual examples of erased abstract concepts, such as “Van Gogh style.”

---

confidence: 5
contribution: 2
initial_rating: 4
presentation: 2
questions: See weaknesses above.

How are the multiple prompts generated?

Do the steering vectors generated for SDv1.4 work for SD v1.5 across different checkpoints of the same model?
soundness: 2
strengths: The proposed activation steering method for concept unlearning is training-free. 

Adapting the method to novel concepts is straightforward and does not require retraining. 

Experiments on I2P benchmark for SDv1.4 model shows the effectiveness of the proposed method over a comprehensive set of prior methods.
summary: The paper proposes CASteer, an activation steering method for concept erasure in diffusion models. It extracts steering vectors from cross-attention layers in the diffusion model for the concept to be erased and applies them during inference for erasure. Experiments are conducted for erasure of abstract concepts (nudity, violence) and objects (snoopy, mickey) on I2P benchmark and COCO dataset.
weaknesses: The proposed method is not new as it applies the idea of activation steering which is well-established in LLMs to concept unlearning in diffusion models. So, the novelty is limited. 

There is no theoretical justification on why operating in the latent space of diffusion models is better. It does not fully justify why unlearning in the cross-attention activation space (latent) is fundamentally better than guidance or prompt-based methods. 

Is it sensitive to the noise seed of the diffusion model? Are the steering vectors extracted for random noise seeds?

How does the method work if there is a mismatch between the number of steps used in steering vector extraction and during inference?

Missing ablation study on steering with only one vector per CA layer in SDv1.4.

Concept erasure based on guidance or steering is susceptible to adversarial attacks via concept addition or subtraction. Is this robust to adversarial attacks based on concept arithmetic [1] ?

Results are only reported for few concepts (nudity, violence, snoopy, mickey). Missing erasure results on art styles (e.g., van gogh) or more abstract concepts (e.g., summer, mosaic style etc).

Comparisons are only reported for SDv1.4 model. Missing comparisons to prior methods on more recent models such as SDXL, SANA or SD3.5

Paper can be better organized. Important ablations from supplementary need to be included in the main paper or the appendix instead of supplementary paper.

[1] Petsiuk et. al. Concept Arithmetics for Circumventing Concept Inhibition in Diffusion Models, ECCV 2024

Minor: 
Reference to tables in main paper (e.g., table 15) is missing.


Decision: Accept (Poster)