ESSI: Computationally Efficient Semantic Search for Sparse Autoencoder Concepts

James BakerarXiv 2026

It’s late, your eyes are heavy, and you’ve spent all day debugging code. Let’s talk about something cool: surgically editing the "brain" of an AI image generator without breaking the bank—or your patience.

TL;DR

ESSI (Efficient Semantic Sparse Identification) is a new method to find the specific "features" inside a diffusion model that represent a concept, like "birds" or "sandwiches." By using segmentation masks and clever search tricks, it finds these features up to 9,000 times faster than previous methods, allowing you to precisely add or remove objects from images with minimal computational cost.

What Problem Does This Paper Address?

Large-scale diffusion models like SDXL are essentially high-dimensional black boxes. We know they "understand" concepts, but we don't know where that understanding lives. Researchers use Sparse Autoencoders (SAEs) to decompose the model's messy internal activations into thousands of "interpretable features"—think of these as individual "concept neurons."

The challenge is the concept $\rightarrow$ feature task: if I give you the word "Golden Retriever," how do you find the specific handful of features (out of tens of thousands) that actually represent that dog?

Existing methods are incredibly "heavy." They often require generating thousands of images or running massive grid searches over hyperparameters to see what sticks. If you want to find hundreds of concepts, the compute cost becomes astronomical. This paper aims to make that search fast, cheap, and effective for both removing concepts (unlearning) and adding them (insertion).

Methods

The authors propose ESSI, which stands for Efficient Semantic Sparse Identification. Here is the "recipe":

  1. Activation Collection: They run a concept (e.g., "a horse") through a distilled version of SDXL (SDXL-Turbo) and grab the internal activations.
  2. Segmentation Masking: This is the "secret sauce." They use SAM 3 (Segment Anything Model) to create a mask of the object. This allows them to separate activations belonging to the "horse" from the "background."
  3. Feature Ranking: They rank SAE features based on how much more they fire inside the object mask compared to the rest of the image.
  4. Binary Search for $k$: Instead of guessing how many features they need, they use a binary search to find the smallest set ($k$) that allows a simple linear classifier to identify the concept with 95% accuracy.
  5. Offline Calibration: To figure out how "strong" the edit should be (steering strength), they reuse the classifier. Crucially, they do this offline on cached activations, meaning they don't have to generate a single new image during the search process.

Datasets

The study uses the UnlearnCanvas benchmark, which contains 20 object concepts (like "Architectures," "Dogs," "Statues") across 50 different artistic styles (like "Surrealism" or "Fauvism"). They used SDXL-Turbo as the base model and pretrained TopK SAEs to provide the feature space.

Key Insights and Ideas

  • Segmentation is a Superpower: Previous methods looked at the whole image. By focusing only on the pixels where the object actually exists, ESSI filters out the "noise" of the background, making the feature identification much more precise.
  • The "Dual-Use" Feature: A key finding is that the same set of features used to "unlearn" or remove an object can be inverted to "insert" that object into a new scene.
  • Massive Efficiency: Because ESSI avoids the "generate-and-test" loop of prior work, it is orders of magnitude cheaper. We’re talking about the difference between a task taking seconds versus hours.

Key Results

  • Speed: ESSI requires roughly 9,000x fewer FLOPs (floating-point operations) than SAeUron and 2,000x fewer than CASL.
  • Removal: In concept removal tasks, ESSI performs nearly as well as the most expensive state-of-the-art methods while being significantly cheaper. You can see the visual results of this "surgical removal" in Figure 1.
Figure 1: Concept removal examples at down.2.1. Each panel shows the unedited image (left) and each method’s edit with γauto (top row) and γsearch (bottom row). Top: removing Birds from “A Birds image in Surrealism style.” Bottom: removing Horses from “A Horses image in Fauvism style.”
  • Insertion: For adding concepts, ESSI actually achieved the highest scores across several metrics when using its optimized search strength. Figure 2 shows how it can "hallucinate" a human into a picture of flames or sandwiches into a picture of bears.
Figure 2: Concept insertion examples at down.2.1. Each panel shows the unedited base image (left) and each method’s edit with αauto, αγauto and αγsearch (rows, top to bottom). Top: inserting Human into “a good picture of flame.” Bottom: inserting Sandwiches into “a good picture of bears.”
  • Quantitative Performance: As shown in Table 1 (Figure 3), ESSI maintains high "Retain Accuracy" (IRA/CRA), meaning it removes the target object without accidentally destroying the rest of the image or its style.
Table 1: Concept removal results at down.2.1 (CASL also at mid.0), means over the 20 UnlearnCanvas objects. Best in bold, second best italicized.

Limitations and Future Work

  • Layer Selection: The authors manually chose which layer of the UNet to target (the last downsampling block). They suggest that future work should find a way to automatically decide which layer is best for a specific concept.
  • Model Specificity: The current results are focused on SDXL-Turbo. It remains to be seen how well this generalizes to the very latest models like Flux or different architectures.
  • Polysemanticity: The method assumes that SAE features are the "best" way to represent concepts, but features can still be "polysemantic" (one feature representing multiple unrelated things), which might lead to unintended side effects in more complex edits.

Summary updated

Abstract

Sparse autoencoders (SAEs) decompose diffusion model activations into interpretable features, but steering a model with them requires identifying which features map to a given semantic concept, if any. Existing methods for this concept to feature task are expensive, relying on grid searches or repeated passes through the frozen UNet. We propose Efficient Semantic Sparse Identification (ESSI). Using segmentation masks to label SDXL activations as concept or non-concept, ESSI ranks SAE features and binary-searches for the smallest set on which a linear classifier still separates positive from negative samples while not falling below a performance threshold, then reuses that classifier to calibrate the steering strength. We evaluate the same selected features on both concept insertion and object unlearning. Compared with prior work, ESSI is as cheap or cheaper, and performs well on both insertion and removal.
BibTeX
@misc{baker2026essi,
  author = {James Baker},
  title = {{ESSI: Computationally Efficient Semantic Search for Sparse Autoencoder Concepts}},
  year = {2026},
  eprint = {2611.27921},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.27921},
}
Figure