SHIFT: Steering Hidden Intermediates in Flow Transformers

Nina Konovalova, Andrey Kuznetsov, Aibek AlanovarXiv 2026

TL;DR

SHIFT is a lightweight, training-free framework that removes or modifies visual concepts in large Diffusion Transformers (DiTs) like FLUX by directly manipulating intermediate activations at inference time. By leveraging temporally invariant steering vectors and dynamic classifier-based regularization, it achieves highly effective concept erasure, style shifting, and object addition without expensive model fine-tuning.

What Problem Does This Paper Address?

As text-to-image diffusion models scale up, so does their risk of generating harmful, copyrighted, or inappropriate content. Traditional Concept Erasure (CE) methods typically rely on gradient-based fine-tuning (e.g., ESD, Erase-and-Preserve) to suppress these unwanted concepts.

However, as the field transitions from traditional U-Net architectures to massive Diffusion Transformers (DiTs) like the 12-billion-parameter FLUX, fine-tuning becomes prohibitively expensive. Furthermore, many modern models are guidance-distilled (e.g., Flux.1[schnell]) to operate at a fixed guidance scale, which breaks existing erasure techniques that depend on negative guidance during optimization. SHIFT addresses this gap by providing an efficient, inference-time intervention that requires zero modifications to the model's weights.

Methods

Inspired by activation steering in Large Language Models (LLMs), SHIFT alters the model's generative behavior by injecting linear directions into the latent representation space during inference.

The framework targets two key locations where text semantics are integrated:

  1. The text encoder's pooled embedding.
  2. The text tokens inside the DiT's double-stream blocks after the shared attention layer.
Fig. 1: Double-stream block.

The SHIFT pipeline operates in three main stages:

  • Dataset Creation: The user collects a small paired dataset of contrastive prompts (typically just 20 to 135 pairs), such as "a cat" vs. "a cat in cyberpunk style".
  • Steering Vector Calculation: The model is run on these prompts to extract internal activations. The steering vector is computed either as the raw mean difference between the activations or by training a linear Support Vector Machine (SVM) to find the normal vector of the separating hyperplane.
  • Inference-Time Steering: During image generation, the steering vector is added to the target activations. Crucially, SHIFT uses the trained SVM classifier to dynamically scale the steering strength at each timestep—amplifying the intervention if the unwanted concept is strongly present and reducing it once the concept has been successfully suppressed.
Fig. 2: Steering pipeline overview with three stages: (1) dataset construction from contrastive prompt pairs, (2) steering vector computation based on mean difference and separation plane, and (3) application of the vector during inference, (4) steering inside diffusion transformer.

Datasets

The authors evaluated SHIFT using several established benchmarks and custom datasets:

  • I2P (Inappropriate Image Prompts) Benchmark: Consists of 4,703 prompts used to evaluate abstract concept erasure (specifically nudity removal, detected via NudeNet).
  • MS-COCO: A subset of 5,000 captions used to measure the impact of steering on general image quality and prompt alignment via FID and CLIP scores.
  • Custom Contrastive Pairs: Small datasets including 135 prompt pairs for nudity descriptors, and 20 prompt pairs each for concrete objects (e.g., Snoopy) and artistic styles (e.g., Van Gogh).

Key Insights and Ideas

  • Temporal Invariance in DiTs: A major finding is that DiT activation spaces exhibit remarkable temporal consistency. Instead of needing complex, step-specific interventions, a single, time-independent steering vector can be applied effectively across all diffusion timesteps.
  • Cross-Distillation Transferability: Steering vectors are highly transferable across distillation boundaries. Vectors calculated using activations from the distilled Flux.1[schnell] model can successfully steer the non-distilled Flux.1[dev] model.
  • Early Intervention is Critical: Ablation studies revealed that steering is most effective during the early stages of the diffusion trajectory and within the initial blocks of the DiT backbone. Applying interventions only in the latter half of the generation process yields insufficient concept control.

Key Results

  • Superior Abstract Erasure: On the I2P benchmark for Flux.1[schnell], SHIFT reduced total detected nudity instances from 612 down to 97 (at a steering strength of 500). This significantly outperformed optimization-free baselines like UCE (364) and fine-tuning baselines like CA (342).
  • Preserved Image Quality: When tested on MS-COCO, SHIFT demonstrated a highly favorable trade-off between aggressive concept removal and image quality, showing only minor degradation in FID (34.5 vs. the baseline 31.63) while keeping CLIP prompt alignment scores virtually intact.
  • Multi-Task Versatility: Beyond simple concept removal, the same mechanism successfully performs style domain shifting (e.g., erasing or applying Van Gogh's style) and object-level modifications (e.g., adding hats, glasses, or switching "dog $\rightarrow$ cat") entirely at inference time.

Limitations and Future Work

The authors note that SHIFT is designed as a global generation control framework rather than a precise local image-editing tool. Because it redirects the model's global generative manifold, maintaining strict spatial layouts or background consistency during significant domain shifts remains a challenge.

Future work will focus on refining the geometric alignment of steering vectors to better decouple target concepts from the global image structure.

Summary updated

BibTeX
@misc{konovalova2026shift,
  author = {Nina Konovalova and Andrey Kuznetsov and Aibek Alanov},
  title = {{SHIFT: Steering Hidden Intermediates in Flow Transformers}},
  year = {2026},
  eprint = {2604.09213},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.09213},
}
Figure