SHIFT: Steering Hidden Intermediates in Flow Transformers
Organizations: FusionBrain Lab · HSE University · AXXX
Abstract
Diffusion models have become leading approaches for high-fidelity image generation. Recent DiT-based diffusion models, in particular, achieve strong prompt adherence while producing high-quality samples. We propose SHIFT, a simple but effective and lightweight framework for concept removal in DiT diffusion models via targeted manipulation of intermediate activations at inference time, inspired by activation steering in large language models. SHIFT learns steering vectors that are dynamically applied to selected layers and timesteps to suppress unwanted visual concepts while preserving the prompt's remaining content and overall image quality. Beyond suppression, the same mechanism can shift generations into a desired style domain or bias samples toward adding or changing target objects. We demonstrate that SHIFT provides effective and flexible control over DiT generation across diverse prompts and targets without time-consuming retraining.
Figures & tables
| Method | Detected Nudity (Quantity) | MS-COCO 5K | ||||
|---|---|---|---|---|---|---|
| Common | Female | Male | Total | FID | CLIP | |
| ESD | 280 | 121 | 25 | 426 | 31.88 | 30.86 |
| EAP | 373 | 175 | 10 | 558 | 32.02 | 31.51 |
| CA | 234 | 98 | 10 | 342 | 31.81 | 31.25 |
| UCE | 232 | 127 | 5 | 364 | 31.65 | 31.55 |
| SHIFT (ours, strength 250) | 87 | 32 | 3 | 122 | 33.9 | 31.22 |
| Method | Detected Nudity (Quantity) | |||
|---|---|---|---|---|
| Common | Female | Male | Total | |
| CA | 253 | 65 | 26 | 344 |
| ESD | 329 | 145 | 32 | 506 |
| UCE | 122 | 39 | 12 | 173 |
| MACE | 173 | 55 | 28 | 256 |
| EAP (Bui et al., 2024) | 287 | 86 | 13 | 386 |
| Snoopy | Mickey | Spongebob | Pikachu | Dog | Legislator | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | CS | FID | CS | FID | CS | FID | CS | FID | CS | FID | CS | FID |
| CA | 22.49 | 168.37 | 24.25 | 129.91 | 28.25 | 131.78 | 27.44 | 129.54 | 22.86 | 96.94 | 21.18 | 83.83 |
| SHIFT (ours) | 18.57 | 136.20 | 26.06 | 55.56 | 27.35 | 63.27 | 26.25 | 74.24 | 24.18 | 56.43 | 21.77 | 47.08 |
| FLUX.1 [schnell] | 28.01 | – | 26.72 | – | 27.94 | – | 27.15 | – | 24.62 | – | 21.89 | – |
| Method | Strength | Detected Nudity (Quantity) | MS-COCO 1K | ||||
|---|---|---|---|---|---|---|---|
| Common | Female | Male | Total | FID | CLIP | ||
| SHIFT (no cls) | 250 | 149 | 65 | 16 | 230 | 71.09 | 31.45 |
| SHIFT (with cls) | 250 | 87 | 32 | 3 | 122 | 68.72 | 31.54 |
| SHIFT (with cls) | 500 | 73 | 23 | 1 | 97 | 69.60 | 31.37 |
| FLUX.1 [schnell] | – | 406 | 161 | 38 | 605 | 66.81 | 31.92 |
| Blocks | Steps | Legislator | Mickey | Pikachu | Spongebob | Dog | Snoopy |
|---|---|---|---|---|---|---|---|
| CLIP FID | CLIP FID | CLIP FID | CLIP FID | CLIP FID | CLIP FID | ||
| 0 | 0 | 22.6 – | 27.4 – | 26.5 – | 28.4 – | 25.1 – | 28.3 – |
| 0–4 | all | 22.3 58.1 | 27.0 105.0 | 26.8 73.2 | 28.6 119.5 | 25.0 53.8 | 16.5 272.0 |
| 0–9 | all | 22.7 60.9 | 26.8 110.7 | 26.9 80.7 | 28.4 124.7 | 25.0 62.8 | 16.4 275.6 |
| 10–19 | all | 22.9 56.1 | 26.8 95.7 | 26.1 86.6 | 27.8 123.8 | 24.9 62.2 | 26.6 136.7 |
| all | 0 | 22.9 68.7 | 26.6 112.1 | 26.3 94.0 | 27.9 143.3 | 24.9 76.8 | 16.0 278.6 |
| Str | Txt Str | Type | Legislator | Mickey | Pikachu | Spongebob | Dog | Snoopy | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CLIP | FID | CLIP | FID | CLIP | FID | CLIP | FID | CLIP | FID | CLIP | FID | |||
| 0 | 0 | – | 22.59 | – | 27.36 | – | 26.49 | – | 28.39 | – | 25.13 | – | 28.29 | – |
| 500 | 6 | diff sep | 22.9 | 68.7 | 26.6 | 112.0 | 26.3 | 93.9 | 27.8 | 143.3 | 24.8 | 76.8 | 15.9 | 278.5 |
| 500 | 6 | diff mean | 22.6 | 59.9 | 26.9 | 99.7 | 26.4 | 90.6 | 28.4 | 126.9 | 25.1 | 70.9 | 22.8 | 191.4 |
| 500 | 6 | normals | 22.5 | 60.4 | 27.0 | 97.3 | 26.1 | 92.1 | 28.4 | 118.4 | 25.1 | 73.6 | 23.9 | 187.4 |
| Str | Txt | Cls | Norm | Cos | Legislator | Mickey | Pikachu | Spongebob | dog | Snoopy |
|---|---|---|---|---|---|---|---|---|---|---|
| Str | CLIP | CLIP | CLIP | CLIP | CLIP | CLIP | ||||
| 0 | 0 | – | – | – | 22.59 | 27.36 | 26.49 | 28.39 | 25.13 | 28.29 |
| 0 | 6 | – | – | – | 22.56 | 27.12 | 26.47 | 28.24 | 25.22 | 26.35 |
| 100 | 6 | ✓ | ✓ | ✓ | 22.81 | 27.14 | 26.37 | 28.45 | 24.88 | 20.05 |
| 500 | 6 | – | ✓ | ✓ | 20.11 | 24.95 | 25.88 | 27.80 | 24.24 | 13.26 |
| 500 | 6 | ✓ | ✓ | ✓ | 22.90 | 26.63 | 26.33 | 27.89 | 24.87 | 15.99 |
| Method | Strength | Detected Nudity (Quantity) | MS-COCO 1K | ||||
| Common | Female | Male | Total | FID | CLIP | ||
| no cls | |||||||
| SHIFT (schnell acts) | 100 | 149 | 65 | 16 | 230 | 71.63 | 30.78 |
| SHIFT (schnell acts) | 250 | 163 | 72 | 16 | 251 | 74.74 | 30.50 |
| SHIFT (schnell acts) | 500 | 134 | 43 | 18 | 195 | 77.71 | 29.53 |
| SHIFT (dev acts) | 100 | 179 | 70 | 19 | 268 | 72.59 | 30.69 |
| Str | Txt Str | Cls | Norm | Cos | Legislator | Mickey | Pikachu | Spongebob | dog | Snoopy |
|---|---|---|---|---|---|---|---|---|---|---|
| FID | FID | FID | FID | FID | FID | |||||
| 0 | 0 | – | – | – | – | – | – | – | – | – |
| 0 | 6 | ✓ | ✓ | ✓ | 13.76 | 55.93 | 26.38 | 39.46 | 15.35 | 144.89 |
| 100 | 6 | ✓ | ✓ | ✓ | 47.08 | 91.09 | 73.63 | 106.95 | 44.21 | 227.29 |
| 500 | 6 | – | ✓ | ✓ | 88.30 | 153.99 | 103.37 | 168.46 | 124.03 | 290.35 |
| 500 | 6 | ✓ | ✓ | ✓ | 68.68 | 112.05 | 93.99 | 143.30 | 76.82 | 278.59 |
| Snoopy | Mickey | Spongebob | Pikachu | Dog | Legislator | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | CS | FID | CS | FID | CS | FID | CS | FID | CS | FID | CS | FID |
| ESD | 26.77 | 15.44 | 26.18 | 6.56 | 27.09 | 9.51 | 26.81 | 7.87 | 24.16 | 8.76 | 20.34 | 8.52 |
| SHIFT, our (dev acts) | 11.98 | 181 | 22.70 | 88.70 | 26.13 | 67.19 | 25.14 | 51.12 | 22.98 | 56.00 | 17.90 | 72.95 |
| FLUX.1 [dev] | 27.43 | – | 26.20 | – | 27.14 | – | 18.81 | – | 24.19 | – | 20.51 | – |
| Method | Strength | Detected Nudity (Quantity) | MS-COCO 5K | ||||
| Common | Female | Male | Total | FID | CLIP | ||
| with cls | |||||||
| SHIFT (schnell acts) | 250 | 106 | 31 | 15 | 152 | 37.90 | 30.69 |
| SHIFT (dev acts) | 250 | 155 | 43 | 17 | 215 | 38.50 | 30.69 |
| SHIFT (schnell acts) | 500 | 98 | 28 | 12 | 138 | 38.06 | 30.40 |
| FLUX.1 [dev] | – | 406 | 161 | 38 | 605 | 35.83 | 30.91 |
| Method | Old artists | Modern artists | ||
|---|---|---|---|---|
| ESD | 20.00% | 63.75% | 68.33% | 67.08% |
| SHIFT [dev] | 30% | 63.75% | 15% | 68.75% |
| SHIFT [schnell] | 20.00% | 67.50 % | 13.33 | 70.41 |
| FLUX.1 [dev] | 68.33% | 79.58% | 88.33% | 81.25% |
| UCE | 23.33% | 75.41% | 61.67 | 64.16 |
Controllable Image Generation
Controllable image generation steers images using spatial, visual, semantic, stylistic, or physical constraints beyond ordinary text prompts.
See all 215 papers