Skip to content

SharedSAE: A Unified Sparse Dictionary Across U-Net Modules and Denoising Time for Diffusion Models

SharedSAE: a unified sparse dictionary across u-net blocks and denoising time for diffusion models

arXiv: Interpretability· arXiv:2610.13997· Longhao Lei, Lan YaoHunan UniversityIndexed by this site · 2026-10-14· Originally publishedAlignment

Quick read

Interpretability

Based on the paper PDF (AI-generated); refer to the original

SharedSAE shares a dictionary across four SDXL blocks and 50 steps; the authors report that the I2P positive subset dropped from 139 cases to 1.

Questions
In diffusion models, concept representations drift with network depth and denoising time; per-block or single-block temporal SAEs lack a unified dictionary, making it hard to localize and intervene across the entire generation trajectory.
Methods
SharedSAE shares a TopK dictionary across SDXL 1.0's four attention blocks and 50 steps; block low-rank adapters align residuals, time conditioning absorbs non-stationarity, then suppresses target features by comparing positive and negative prompts.
Experiments and results
SharedSAE four-block average FVU 0.400 (500 held-out), SAE-Turbo one-step CFG=0 is 0.492. After intervention on 139 I2P detector-positive cases, NudeNet positive is 1. The authors claim features shift from early downsampling blocks to middle and later stages.
Limitations and future work
The paper does not have a dedicated limitations or future work section. Experiments were conducted on four isomorphic attention blocks of SDXL 1.0 and 50-step Euler for training and intervention; nudity counting used NudeNet with a threshold of 0.6. The number of seeds for localization averaging was not reported, nor were quantitative metrics for preservation of unrelated content.
Experimental setupSDXL 1.0、SharedSAE · COCO-30k、I2P et al. · FVU、effective rank et al.
Evaluated models
SDXL 1.0SharedSAE
Benchmarks
COCO-30kI2PI2P-142
Metrics
FVUeffective rankTotalRatioJaccard overlap
AI summaryThe paper proposes SharedSAE, which shares a single sparse dictionary across four U-Net attention blocks and all 50 denoising steps of SDXL 1.0 for concept localization and intervention in diffusion models. The method adds block-specific low-rank input adapters before the shared encoder to align residual distributions across blocks, and uses a time-conditioning module with a shared time-step branch and a block-time-step correction branch to absorb temporal non-stationarity. Local feature suppression based on this dictionary reduces the number of generated images judged positive by NudeNet in the I2P detection-positive subset from 139 to 1. Tracing sparse features along the denoising trajectory also shows that concept representations shift from the earliest downsampling blocks to middle and later blocks during generation.

The paper proposes SharedSAE, which shares a single sparse dictionary across four U-Net attention blocks and all 50 denoising steps of SDXL 1.0 for concept localization and intervention in diffusion models. The method adds block-specific low-rank input adapters before the shared encoder to align residual distributions across blocks, and uses a time-conditioning module with a shared time-step branch and a block-time-step correction branch to absorb temporal non-stationarity. Local feature suppression based on this dictionary reduces the number of generated images judged positive by NudeNet in the I2P detection-positive subset from 139 to 1. Tracing sparse features along the denoising trajectory also shows that concept representations shift from the earliest downsampling blocks to middle and later blocks during generation.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Existing block-wise or step-wise SAEs misalign drifting concept representations; SharedSAE uses a single dictionary covering four blocks and 50 steps.

    Concept representations drift along U-Net depth and denoising time; existing SAEs lack a shared dictionary that can be compared and intervened across positions.

    • Scenario: Diffusion models generate images through iterative denoising, internal representations change along both network depth and denoising time. The authors believe objects or attributes may not be fixed to a single block or stage, analyzing the full trajectory requires a feature space that remains comparable across positions.
    • Existing shortcomings: Training a separate SAE per block splits concepts into incompatible dictionaries and increases training, storage, and maintenance costs; SDXL-Turbo's one-step setting does not include temporal evolution. The authors claim putting activations from different blocks and timesteps directly into a static SAE still retains cross-block heterogeneity and temporal distribution shift noted by Huang et al. (2026); existing recipes handle only block structure or only temporal variation within a single block.
    • Scale issue: The authors write residuals more directly characterize the update each block introduces, but residual scales can differ greatly across blocks; directly sharing a dictionary biases toward blocks with larger norms.
    • Our approach: SharedSAE on frozen SDXL 1.0 learns the same encoder and decoder for down.2.1, mid.0, up.0.0, up.0.1 and all 50 denoising steps. Block low-rank adapters align block residuals, time conditioning module absorbs temporal non-stationarity; the same dictionary is used for reconstruction, localization, and suppressing objects, nudity, and style concepts.
  2. What related research exists?

    The paper juxtaposes block-level SAE, single-block temporal SAE, and concept erasure, and uses one dictionary to cover both axes.

    Section 2 of the paper divides related work into diffusion SAEs and concept erasure, and positions the shared dictionary accordingly.

    • Position-wise or time-wise diffusion SAEs: One-Step is Enough (Surkov et al., 2025) trains a separate SAE on the residuals of several attention blocks of SDXL-Turbo; Emergence (Tinaz et al., 2025) trains SAEs separately for different block and timestep combinations. SAeUron (Cywiński & Deja, 2025) collects activations from all denoising steps of one block into a single SAE, with timestep not an explicit condition; TIDE (Huang et al., 2026) adds time-varying scale and shift to inputs. The paper states that block-level dictionaries can fit local activations but lose cross-position feature identity; single-block time dictionaries preserve time identity but do not address cross-block heterogeneity.
    • Concept features at fixed sites: SAEmnesia (Cassano et al., 2026) adds concept supervision to the reconstruction objective; PEAK (Jiang et al., 2026) trains a k-SAE on denoiser activations and uses target vs non-target prompt comparison to localize features. The paper states that these works show sparse features can support concept localization and intervention, but they remain at fixed representation sites.
    • Concept erasure: Parameter editing includes ESD (Gandikota et al., 2023), UCE (Gandikota et al., 2024), MACE (Lu et al., 2024), and SPACE (Novello & Tonello, 2026). The paper states that they require no extra control at generation time, but adding new targets usually requires updating the model again. Inference-time methods include SLD (Schramowski et al., 2023), AdaVD (Wang et al., 2025), CASteer (Gaintseva et al., 2026), and GLoCE (Lee et al., 2025). The paper states that they can change targets without modifying the diffusion model, but the control units are mostly dense directions or transformations, making semantic composition difficult to inspect.
    • Baselines and data: The representation quality comparison is SAE-Turbo, i.e., the published per-block independent SAE. Nudity erasure comparisons are SPEED, UCE, RECE, SAFREE, SPACE, with values taken from Novello & Tonello (2026). Training prompts come from COCO-30k; nudity evaluation uses I2P and I2P-142.

    The paper positions SharedSAE at the intersection of two axes: a single dictionary covering multiple blocks and the full denoising trajectory, with localization results for each block falling into the same vocabulary, facilitating comparison and reuse.

  3. How does the paper address this problem?

    Block adapters align residual distributions, time conditioning absorbs non-stationarity, and then concepts are localized and erased on a shared TopK dictionary.

    SharedSAE uses one encoder and decoder to cover four attention blocks and all denoising steps, then localizes and suppresses concepts on this dictionary.

    Problem Setting and Residuals

    Frozen SDXL 1.0, generation at 1024×1024, 50-step Euler. For block b, timestep t, and spatial token i, residual is defined as x = hout − hin, i.e., the increment this block contributes to the current denoising trajectory. Default blocks are down.2.1, mid.0, up.0.0, up.0.1, residual dimension d=1280. Per-block estimated token norm mean μb, scale σb = max(μb, ε)/√d, residual divided by σb before entering shared space. The paper does not give ε's value.

    Shared Dictionary and Conditioning Modules

    Decoder columns form the shared dictionary. Expansion factor 8×, m=8d=10240. Before encoder there is a block adapter, rank r=16, scale αA=16, adding a low-rank branch to the original input to align block distributions. Time module has two branches: shared timestep branch projects sinusoidal time embedding into a feature bias common to all blocks; block-timestep correction branch uses block embedding and time embedding for smaller block-specific correction. Both branches zero-initialized, correction branch regularized so shared time component dominates. Activations go through ReLU then TopK, K=20, then decode to reconstruct normalized residual; dictionary atoms maintain unit norm.

    Training Objective

    Training set is 10k prompts from COCO-30k. Optimizer Adam, β1=0.9, β2=0.999; shared and time branches learning rate 10−4, block adapter 2×10−4. Total loss is reconstruction MSE plus AuxK, inter-block alignment Lalign, and correction branch norm Lb,t. Weights λalign=0.1, λb,t=3×10−4, λaux=0.03125. AuxK pushes currently inactive atoms to participate in reconstructing residual error. Lalign acts on TopK sparse codes, pulling other blocks' average codes toward mid block.

    Localization, Erasure, and Velocity Field Interpretation

    Positive and negative prompts differ only in target concept. Use SAeUron importance scores per block: over selected timestep set T, compare the feature's normalized average activation on positive vs negative sets. Before selecting top-kloc, discard directions with activation frequency above 0.9 on 3000 held-out prompts for that block. kloc=10. Erasure synthesizes the localized features of the current block into direction rc(b,t) in normalized space, then maps back to output. Intervention is hout ← hout − λerase σb rc(b, t). Higher-ranked features get larger weights, time weights are renormalized to mean 1 over trajectory. General concepts λerase=10, I2P nudity λerase=5; per-step average absolute perturbation upper bound δmax=0.2. Appendix A pushes dictionary directions through downstream Jacobian to local velocity directions and gives first-order accumulation of trajectory displacement. The authors claim what is shared is feature coordinates, not the same context-independent velocity vector.

  4. What experiments did the paper conduct?

    The authors state that NudeNet positives in the I2P positive subset dropped from 139 cases to 1; the average FVU across four blocks is 0.400.

    Experimental Setup

    • Models and trajectories: Frozen SDXL 1.0, 1024×1024, 50-step Euler. Blocks for intervention and analysis are down.2.1, mid.0, up.0.0, up.0.1.
    • Training and dictionary: 10k prompts from COCO-30k; dictionary width 10240; TopK K=20.
    • Reconstruction comparison: FVU computed on normalized residuals of 500 held-out prompts. SAE-Turbo is a published per-block independent SAE, run in its native setting: one-step denoising, CFG=0, same four blocks, same dictionary width.
    • Nudity protocol: I2P-142, and 139 detector-positive cases on full I2P. NudeNet threshold 0.6. Total is number of generated images with at least one class above threshold, Ratio is Total divided by number of generated images. SPEED, UCE, RECE, SAFREE, SPACE values taken from Novello & Tonello (2026).
    • Localization stability: On eight object concepts, compare Jaccard of top-kloc sets; kloc=10. Blacklist is activation frequency above 0.9 for that block, estimated on 3000 held-out prompts. The authors claim averaging over multiple seeds, the paper does not state the number of seeds.
    • Erase coefficients: general concepts λerase=10, I2P nudity λerase=5; δmax=0.2. Styles are cyberpunk, Monet, ukiyo-e, Van Gogh, watercolor.

    Main Results

    The table below is from Table 1, detection threshold 0.6. Baselines are published values, not rerun here.

    Swipe horizontally to read the table

    MethodBreast FFeetTotalRatio
    SDXL (original output)2185941.55%
    SPEED1645135.92%
    UCE1363726.06%
    RECE1052316.20%
    SAFREE512215.49%
    SPACE321611.27%
    SharedSAE (I2P-142)0110.70%
    SharedSAE (139 cases)0110.72%
    • The authors claim the evaluation setting aligns with SPACE. In the two SharedSAE rows, the table does not list Genitalia F/M, Breast M, Buttocks, Belly, Armpits detection counts, all are 0 (Table 1).
    • The two SharedSAE rows come from different subsets: I2P-142, and the detector-positive subset of full I2P. The authors claim under the latter protocol only one positive case remains after intervention.
    • The authors attribute this residual to the foot still visible after erasure in I2P case 29 (Figure 5(b)). Figure 4's caption says relevant activations concentrate in exposed regions, centered lower in down.2.1 and higher in up blocks; the main text does not give coordinate readings.

    Representation Quality, Overhead, and Localization Stability

    • Reconstruction: On 500 held-out prompts, SharedSAE four-block average FVU is 0.400, SAE-Turbo 0.492; effective rank 433, comparison four-block average 171 (Table 2). The authors claim the shared dictionary explains more residual variance when covering four blocks and full trajectory, and claim about 60%. This comparison is one-step, CFG=0, not the 50-step protocol.
    • Overhead: With dictionary width 10240, SAE-Turbo has 4 SAEs, 104.9M parameters, SharedSAE has 1 SAE, 28.1M; the authors claim parameter reduction 73.3% (Table 4, Section 4.2).
    • Stability: Eight-concept average Jaccard, prompt split 0.811 vs 0.803, cross-seed 0.525 vs 0.737, time-window 0.735, SAE-Turbo has no row (Table 3). The authors believe SharedSAE is more sensitive to random seeds, likely because the 50-step trajectory accumulates seed-related random variation, while SAE-Turbo has only one step.

    Spatiotemporal Handoff of Concept Features

    • In Figure 8(b), down.2.1's top-5 average overlap with initial timestep drops from 0.746 to 0.485, all four blocks show decline; thick line is mean, shading is 95% interval over 340 cases. The paper does not explain how these 340 cases are composed. The main text writes that down.2.1's target feature activation decays from early to late timesteps.
    • The authors claim in Figure 8(a) down.2.1 remains the main contributor for most concepts, relative share generally declines over time, mid.0 and up.0.1 contributions rise. Specific per-concept share readings are not listed in the main text.
    • Figure 6(b) annotated handoff times are train t=781 (r=−0.95), bench t=281 (r=−1.00), horse t=541 (r=−0.99), airplane t=461 (r=−0.97). The authors claim down.2.1 features activate early then decay, up.0.1 features appear later, and the two trajectories cross during denoising.

    Style, Feature Sharing, and Erasure Side Effects

    • Figure 2 shows 16 concepts, the authors claim the same intervention suppresses the target for most. Five styles are generally weakened when per-block feature count kloc increases from 10 to 50, but not completely removed, nor stably becoming neutral photo look. The authors claim cyberpunk's high-activation features are spatially dispersed and easily filtered by the 0.9 blacklist (Figure 7).
    • When using localization prompts directly, the authors claim all five styles are weakened: cyberpunk and Monet become neutral appearance, watercolor washes mostly disappear, ukiyo-e flat colors and thick outlines weaken, Van Gogh's visual patterns mostly absent (Figure 7(c)). The authors believe styles can be erased, the main difficulty is localizing a compact feature set.
    • mid.0's feature 6223 enters top-kloc for cat, dog, horse, and its average activation for other concepts is one to two orders of magnitude lower (Figure 5(a)). The authors claim suppressing horse or motorcycle-related features may push representation toward neighboring directions, e.g., person, and replacement often inherits early-formed coarse spatial structure; erasing green truck removes the truck but leaks green into background.

    Other Ablations and Analyses

    • Without block adapter: effective rank 187, full model 433 (Table 5).
    • Without time conditioning: time-window Jaccard 0.720, full model 0.735 (Table 5).
    • Figure 6(a): without block adapter horse still recognizable; without time conditioning residual artifacts appear; train example all three variants suppress the target.
    • Per-block FVU, SharedSAE/SAE-Turbo: 0.403/0.557, 0.455/0.533, 0.364/0.458, 0.379/0.420 (Table 2).
    • SAE-Turbo per-block effective rank: 109, 251, 183, 141 (Table 2).
  5. What are some points that can be further explored?

    The paper does not have a dedicated limitations or future work section; the conclusion only discusses the shared dictionary as a reference for evolving representations.

    Limitations and Future Directions Noted by the Authors

    The paper does not specifically discuss limitations. Neither the Conclusion nor appendices write any result as a shortcoming, nor list future work.

    Experimental Coverage

    • The generation model under test is SDXL 1.0, resolution 1024×1024, sampling 50-step Euler; shared dictionary covers down.2.1, mid.0, up.0.0, up.0.1 (Section 3.1).
    • Training prompts are 10k from COCO-30k; FVU uses 500 held-out prompts; activation frequency blacklist uses 3000 held-out prompts (Sections 3.3, 3.4, 4.1).
    • Nudity counts cover I2P-142 and 139 detector-positive cases, detector NudeNet, threshold 0.6; SPEED, UCE, RECE, SAFREE, SPACE values in Table 1 taken from Novello & Tonello (2026) (Section 4.5).
    • SAE-Turbo comparison runs in its native one-step, CFG=0; Table 2 note states this setting differs from SharedSAE's full trajectory (Table 2).
    • The paper does not report the number of seeds averaged for localization statistics, nor quantitative metrics for whether unrelated content is preserved after erasure.
  6. Summarize the main content of the paper

    A shared sparse dictionary covers four SDXL blocks and 50 steps, and is used for concept localization, erasure, and trajectory analysis.

    SharedSAE learns a single sparse dictionary for four attention blocks of SDXL 1.0 and the 50-step denoising trajectory, allowing concepts to be localized and suppressed in the same vocabulary.

    SAEs that are separated by block or that share time only within a single block cannot simultaneously preserve cross-position identity and handle cross-block distribution differences. This paper first normalizes residuals by block, then uses low-rank adapters and time conditioning to align inputs, reconstructing with TopK codes; after selecting features via positive/negative prompt comparison, the corresponding directions are subtracted from block outputs.

    • On 500 held-out prompts, the average FVU across four blocks is 0.400; SAE-Turbo is 0.492 at one step and CFG=0. Parameter counts are 28.1M vs 104.9M (Table 2, Table 4).
    • At a NudeNet threshold of 0.6, on I2P-142, SharedSAE has Total=1 and Ratio=0.70%, while original SDXL has 59 and 41.55%; after intervention on 139 detector-positive cases, Total is 1 (Table 1).
    • The average cross-seed Jaccard across eight concepts is 0.525, while SAE-Turbo is 0.737; prompt split is 0.811 vs 0.803 (Table 3). The authors believe seed differences likely come from random accumulation over the 50-step trajectory.
    • The top-5 overlap mean for down.2.1 drops from 0.746 to 0.485 (Figure 8). The authors state that concept-related activations are redistributed from early downsampling blocks to middle and later blocks; related concepts share features, and concept replacement or attribute leakage may occur during erasure.
    • The authors believe this shared vocabulary can provide a fixed reference for representations that vary with depth and time, and enable concept analysis and erasure across the covered blocks and denoising steps. Style is still not fully removed when kloc increases to 50.

Related papers

Show 3 more papers
Read originalarxiv.org