SAEdit: Token-level control for continuous image editing via Sparse AutoEncoder

Ronen Kamenetsky, Sara Dorfman, Daniel Garibi, Roni Paiss, Or Patashnik, Daniel Cohen-Or · DOI

Abstract

SAEdit is a novel, model-agnostic framework that enables continuous and disentangled image editing by manipulating text embeddings through a Sparse Autoencoder (SAE). By mapping dense text embeddings into a high-dimensional sparse latent space, SAEdit isolates specific semantic attributes, allowing for precise, token-level adjustments of features like expression intensity or age without compromising subject identity or background stability.

Introduction

While large-scale text-to-image (T2I) diffusion models are powerful, they often lack fine-grained control. Modifying a prompt to change a single attribute frequently leads to "entanglement," where the model unintentionally alters the entire scene—changing the subject's identity, clothing, or the background. Furthermore, text prompts are discrete, making it difficult to achieve continuous adjustments like a "volume knob." SAEdit addresses these challenges by isolating semantic levers in a sparse latent space, providing a training-free method for precise image steering.

Methodology

The core of SAEdit is the manipulation of text embeddings (specifically from the T5 encoder) before they reach the image generator. This approach leaves the diffusion model untouched and acts as a plug-and-play module.

Overview of the SAEdit framework showing SAE-based direction finding and token-level manipulation for continuous control.

The process involves four key components:

  1. SAE Latent Mapping: An SAE is trained on millions of text prompts to map dense embeddings into a sparse space where semantic concepts naturally disentangle.
  2. Direction Finding: Edit directions (e.g., "laughing") are identified by comparing sparse activations of source and target prompts. Singular Value Decomposition (SVD) on multiple prompt pairs ensures the direction is robust and generalizable.
  3. Token-Level Steering: The edit vector is applied strictly to the target token's embedding (e.g., "man" or "kid"), preventing semantic "bleed" into the rest of the prompt.
  4. Exponential Injection Schedule: To maintain global structure, the edit is applied weakly during early diffusion steps (preserving layout and identity) and increases exponentially in later steps to successfully apply fine-grained semantic changes.

Evaluation and Results

SAEdit was evaluated using a custom benchmark of 63 source images and over 1,200 unique edits. It demonstrated superior performance in both identity preservation and prompt alignment compared to state-of-the-art baselines.

Comparison of continuous "terrified" expression editing between a baseline and SAEdit, demonstrating superior identity preservation and smooth intensity scaling.

Key results include:

  • Quantitative Superiority: SAEdit achieved a better Pareto frontier for Image Preservation (LPIPS) versus Prompt Adherence (VQA) than methods like ConceptSliders and FluxSpace.
  • User Preference: In a pairwise study of 390 responses, SAEdit outperformed competitors with a 70% to 93% win rate across quality and alignment metrics.
  • Model Agnosticism: The framework was successfully demonstrated on both Flux and Stable Diffusion 3.5 without any model-specific tweaking.

Discussion and Limitations

SAEdit proves that Sparse Autoencoders, typically used for LLM interpretability, can be actively weaponized to steer generative models. By targeting specific tokens and using a timed injection schedule, it avoids the global shifts common in prompt-based editing.

However, the method is ultimately bounded by the underlying model's biases; for example, adding a "beard" to a "woman" may still trigger a gender shift if the base model's training data lacks such examples. Future work will focus on further automating the refinement of complex edit directions to handle these edge cases.

Summary updated

BibTeX
@misc{kamenetsky2025saedit,
  author = {Ronen Kamenetsky and Sara Dorfman and Daniel Garibi and Roni Paiss and Or Patashnik and Daniel Cohen-Or},
  title = {{SAEdit: Token-level control for continuous image editing via Sparse AutoEncoder}},
  year = {2025},
  eprint = {2510.05081},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.05081},
}
Figure