Supervised sparse auto-encoders as unconstrained feature models for semantic composition Ouns El Harzli, Hugo Wallner, Yoonsoo Nam, Haixuan Xavier Tao Abstract Sparse auto-encoders (SAEs) have re-emerged as a prominent method for mechanistic interpretability, yet they face two significant challenges: the non-smoothness of the L 1 L_{1} penalty, which hinders reconstruction and scalability, and a lack of alignment between learned features and human semantics. In this paper, we address these limitations by adapting unconstrained feature models—a mathematical framework from neural collapse theory- and by supervising the task. We supervise (decoder-only) SAEs to reconstruct feature vectors by jointly learning sparse concept embeddings and decoder weights. Validated on Stable Diffusion 3.5, our approach demonstrates compositional generalization, successfully reconstructing images with concept combinations unseen during training, and enabling feature-level intervention for semantic image editing without prompt modification. † † affiliationnotice: Equal contribution 1 Introduction The advent of large foundation models in language, vision, and multimodal domains has renewed interest in methods for gaining interpretability and control over learned representations. In particular, recent work on sparse autoencoders (SAEs) has demonstrated their ability to identify selective and localized features within large-scale models ( 2 ; 18 ; 28 ; 29 ) . These sparse representations are promising tools for mechanistic interpretability, especially for discovering features in internal activations or embeddings that are causally relevant to model behavior. Despite this promise, SAEs trained in an unsupervised fashion suffer from key limitations: they often learn features that are entangled, noisy, or uninterpretable, i.e. misaligned with human-understandable semantic concepts ( 25 ) . Moreover, imposing sparsity in an unsupervised setting is achieved by training with L_{1} regularization, which introduces optimization challenges that grow with dimensionality ( 23 ) , leading to instability and poor reconstruction fidelity ( 11 ) . These challenges limit the scalability and the applicability of SAEs to interpretability in large models ( 25 ) . In an orthogonal (theoretical) research thread, the unconstrained feature model has been introduced as a proxy to neural networks, sharing their training dynamics and provably reproducing the neural collapse phenomenon ( 26 ) . In this theoretical framework, features are treated as free parameters, i.e. there are not tied to any input data ( 6 ; 30 ) , and are only trained with respect to the outputs. This last property has limited the practicality of unconstrained feature model, since it cannot learn from the input data, and up until now, unconstrained feature models have been confined to theoretical study of the dynamics of gradient-based training. Our first insight was to notice that (sparse) auto-encoding is well suited for applying this framework, since the input and the ouput data are intended to coincide, hence we are not missing any information by ignoring the inputs, and training solely with respect to the outputs is sound. Based on the unconstrained feature model, we propose in this work a supervised sparse auto-encoder (SSAE) framework that resolves by design several of the challenges faced by unsupervised SAEs. Instead of discovering sparse features as part of the training of the SAE , we define them upfront through sparse feature design : our method constructs a sparse latent space aligned with a known concept dictionary, and the non-zero coefficients play the role of the free features of an unconstrained feature model. This allows us to learn a decoder-only model to reconstruct the actual feature space from these sparse vectors, where the sparse structure readily defines which concepts appear in which feature vector. This framework removes the need for a trained encoder 1 1 1 Our framework does not exclude the use of an encoder: it can be incorporated as explained in Paragraph 3 , but it is not needed. , avoids L_{1} penalties entirely, and guarantees interpretability through structure. In our SSAE framework, each concept in the dictionary is associated with a sub-vector in the sparse latent space. This framework thus supports compositional generalisation , i.e. combining concepts that were never seen together in the training set (by imputing the learned values to the corresponding sub-vectors), and reconstructing a new feature vector which contains the semantics of both concepts. Using theoretical arguments from the unconstrained feature model literature, we argue that our framework actually encourages compositional generalisation, by promoting decorrelation between concept subspaces. To verify the soundness of our framework, we apply our methodology to the prompt embedding space of Stable Diffusion 3.5. We construct sparse concept codes corresponding to interpretable attributes (e.g., blond hair , gun , standing ), and to demonstrate compositional generalisation, we show that our SSAE model is able to reconstruct images containing concepts that were not seen together in its training set. We present preliminary experimental results showcasing that this methodlogy can be used to edit prompt embeddings in a modular fashion—removing, adding, or replacing individual attributes—without modifying the original prompt text. The result is image-level editing through direct semantic manipulation of feature space. Our method is simple, task- and model-agnostic: while we empirically explored only the application to prompt embeddings for Stable Diffusion 3.5, the same framework could be applied to hidden activations in transformers, U-Net layers, or other hidden representations in foundation models. We view this as a step toward interpretable, structured interfaces to large models, where sparse supervision replaces unsupervised discovery, and we hope this work will motivate many applications of our methodology. Contributions. Our main contributions are: • We introduce a (decoder-only) supervised SAE framework using predefined sparse concept structure and supporting decoder-only training, addressing by design two of the main limitations of unsupersived SAEs (namely, L_{1} penalty and semantic alignment). • We showcase that our methodology supports compositional generalisation on prompt embeddings in Stable Diffusion 3.5. • We explore a first application of our methodology to modular editing via feature-level intervention. Figure 1 : Editing workflow: We train weights of a decoder-only SSAE \mathbf{W}_{2} and the dictionary of concepts (i.e. trainable parameters of \mathbf{Y} ) to reconstruct prompt embeddings for image generation. We use the trained dictionary (sparse latent space) and \mathbf{W}_{2} to add/modify/remove to guarantee safer image generation at inference time. 2 Preliminaries Sparse auto-encoders. An auto-encoder is a neural network designed to learn a compressed representation of input data in an unsupervised manner. Given input \mathbf{x}\in\mathbb{R}^{d} , the network consists of two components: an encoder function f_{\theta}:\mathbb{R}^{d}\to\mathbb{R}^{m} that maps the input to a latent representation \mathbf{h}=f_{\theta}(\mathbf{x}) , and a decoder function g_{\phi}:\mathbb{R}^{m}\to\mathbb{R}^{d} that reconstructs the input as \hat{\mathbf{x}}=g_{\phi}(\mathbf{h}) . A sparse auto-encoder encourages the hidden representation \mathbf{h} to be sparse, i.e., most of its components are close to zero. This is typically achieved by adding a regularization term to the loss function that penalizes non-sparse activations. One common approach is to use an L_{1} penalty on the hidden units, yielding the following objective: \mathcal{L}=\frac{1}{n}\sum_{i=1}^{n}\left\|\mathbf{x}^{(i)}-g_{\phi}(f_{\theta}(\mathbf{x}^{(i)}))\right\|_{2}^{2}+\lambda\left\|f_{\theta}(\mathbf{x}^{(i)})\right\|_{1} (1) where \lambda>0 is a sparsity regularization coefficient, and n is the number of training examples. This formulation encourages each hidden representation \mathbf{h}^{(i)} to be sparse, thus promoting feature selectivity and interpretability in the learned representations. Unconstrained feature model. The unconstrained feature model is a theoretical framework used to analyze learning with free features ( 30 ; 6 ) . Given input-label pairs (x_{i},y_{i}) , instead of assuming that the features \phi(\mathbf{x}_{i}) are outputs of a known neural network, the unconstrained feature model treats them as free parameters \mathbf{z}_{i}\in\mathbb{R}^{d} to be optimized. The model minimizes a supervised loss over both feature vectors \{\mathbf{z}_{i}\}_{i=1}^{n} and a final linear map \mathbf{w}\in\mathbb{R}^{d} : \min_{\{\mathbf{z}_{i}\},\mathbf{w}}\quad\sum_{i=1}^{n}\ell(y_{i},\mathbf{w}^{\top}\sigma(\mathbf{z}_{i}))+\lambda R(\{\mathbf{z}_{i}\}), (2) where \ell is a loss function (e.g., cross-entropy), \sigma is an activation function (e.g. ReLU) and R is a regularizer (often \ell_{2} norm or a centroid constraint). The unconstrained feature model allows one to analyze generalization and feature structure in isolation from data and architectural assumptions. Compositional generalization. Compositional generalization refers to a model’s ability to generalize to novel combinations of known elements ( 19 ) . Formally, suppose we define a concept space \mathcal{C} , where each concept c_{k}\in\mathcal{C} is associated with a latent vector v_{k}\in\mathbb{R}^{d} . A compositional representation treats inputs as structured combinations of such concepts. For instance, a composite latent can be formed by summing active components: z=\sum_{k\in S}v_{k},\quad S\subseteq\{1,\dots,K\}, (3) where S is the set of active concepts in an example. A model exhibits compositional generalization if it can correctly process or generate outputs for unseen combinations S^{\prime} not present in training. 3 Methodology Training set. Consider \mathcal{C}=\{c_{1},...,c_{K}\} a set of concepts that we want to isolate in a particular feature map or a prompt embedding \phi(\cdot) . For example, for a text-to-image generation task: \displaystyle\mathcal{C}= \displaystyle\{\texttt{blue eyes},\texttt{blond hair},\texttt{brune hair}, \displaystyle\texttt{black eyes},\texttt{being seated}, \displaystyle\texttt{standing in the street}, \displaystyle\texttt{being on horseback},...\}~. Construct n realisations that contain different subsets of these concepts: we note S_{i}\subset\mathcal{C} for i\in\{1,...,n\} these subsets. For text-to-image generation, we start from n prompts that contains the concepts and we propagate to the feature map or to the prompt embedding of interest. We obtain a training data matrix \mathbf{X}^{N\times n} , where N is the dimensionality of the feature map or prompt embedding \phi(\cdot) . \mathbf{X} is the matrix we are trying to reconstruct with our SSAE. Sparse feature design. The sparse feature matrix is defined as follows: \displaystyle\mathbf{Y}\in\mathbb{R}^{(d\cdot K)\times n} where d is an hyperparameter that corresponds to the dimensionality of the subspace needed to encode each concept, and verifies for each i\in\{1,...,n\} , j\in\{1,...,d\} , and k\in\{1,...,K\} , \mathbf{Y}_{j\cdot k,i}=0 if c_{k}\notin S_{i} , and \mathbf{Y}_{j\cdot k,i}=y_{j,k} is a trainable parameter if c_{k}\in S_{i} . This design ensures that for each i\in\{1,...,n\} , the sub-vectors associated to a concept c_{k} which is not in S_{i} are set to zero, whereas the components associated to a concept c_{k} which is in S_{i} are learnable. Importantly, the learnable parameters y_{j,k} are set to not depend on i , i.e. the SSAE will learn a single representation for each concept c_{k} across all realisations i\in\{1,...,n\} : the sub-vector (y_{j,k})_{j\in\{1,...,d\}} . Decoder-only SSAE training. Training a decoder-only supervised sparse auto-encoder (SSAE) to reconstruct \mathbf{X} consists in minimizing the loss: \displaystyle\mathcal{L}=\mathbin{\|}\mathbf{X}-\mathbf{W}_{2}\sigma(\mathbf{Y})\mathbin{\|}_{2} where \sigma is an activation function (e.g. ReLU) and \mathbf{W}_{2}\in\mathbb{R}^{N\times(d\cdot K)} is the decoder matrix. This formulation is exactly an unconstrained feature model, and is fully differentiable with respect to \mathbf{W}_{2} and \mathbf{Y} . Unlike unsupervised SAEs, there is no L_{1} penalty on \mathbf{Y} , and no encoder f_{\theta} is learned: sparsity is predefined to align with semantic concepts. Training can be batched with respect to the number of inputs n , thus allowing for efficient gradient-based training. Gradient updates scale linearly with the number of concepts K and the concept subspace dimension d . Assessing compositional generalization. In this paragraph, we detail how our decoder-only SSAE readily supports compositional generalization. We use semantic composition to verify that the concepts have correctly been isolated and generalize in terms of semantics. Consider two concepts c_{k_{1}},c_{k_{2}} that do not appear together in the training set, i.e. there is no i\in\{1,...,n\} such that c_{k_{1}}\in S_{i} and c_{k_{2}}\in S_{i} . Starting from any column of the trained \mathbf{Y} , we can construct a new sparse feature vector \mathbf{y} in the same sparse latent space as \mathbf{Y} , by assigning the learned values (y_{j,{k_{1}}})_{j\in\{1,...,d\}} and (y_{j,{k_{2}}})_{j\in\{1,...,d\}} to the corresponding components (essentially, concatenating sub-vectors). Applying the trained decoder, we obtain \mathbf{W}_{2}\sigma(\mathbf{y})\in\mathbb{R}^{N} which is a new representation at the feature map or prompt embedding level (i.e. in the feature space that we are trying to reconstruct). One can then propagate this new representation in the rest of the architecture; for example applying Stable Diffusion on a new reconstructed prompt embedding, or propagating the rest of a U-net or Transformer architecture on a new reconstructed feature map; and inspect whether the final output does contain concepts c_{1} and c_{2} , and whether they interfere with other concepts. Compositional generalisation is a property that enables interpretability: one can explore which concepts are entangled with one another, and the causal relation of different concepts on the outputs. As a direct consequence of decoder-only SSAE being an unconstrained constrained model, we expect implicit bias and decorrelation of concept subspace to emerge from gradient-based training. Indeed, recent theoretical work on unconstrained feature models has shown that gradient-based training exhibits strong implicit bias toward geometrically structured solutions, including simplex and orthogonal feature configurations, closely related to the neural collapse phenomenon observed in deep networks ( 6 ; 30 ; 27 ) . In particular, when multiple feature vectors are jointly optimized through a shared linear decoder, gradient descent tends to decorrelate these features and distribute them evenly in representation space. In our setting, each concept is represented by a shared latent sub-vector reused across all samples in which the concept appears, inducing a strong coupling between samples that share semantic structure. As a result, the implicit bias of the unconstrained feature model suggests that different concept subspaces are encouraged to become approximately decorrelated \langle(y_{j,{k_{1}}})_{j\in\{1,...,d\}},(y_{j,{k_{1}}})_{j\in\{1,...,d\}}\rangle\approx 0 when k_{1}\neq k_{2} , supporting stable semantic composition and reducing interference between concepts. This perspective offers a theoretical explanation for the fact that our framework encourages compositional generalization and aligns our framework with known neural collapse and geometry results in unconstrained feature models. Feature-level modular editing. Another potential application is editing via feature-level intervention, i.e. without modifying the prompt text. Indeed, if the concepts have been correctly disentangled, we can edit outputs by manipulating features in the sparse latent space: removing, swapping and inserting concepts could in principle be achieved by zeroing out or assigning learned values y_{j,k} to the relevant sub-vectors. We have provided a detailed diagram of an editing workflow based on our decoder-only SSAE in Figure 1 . Encoders for SSAE. Our SSAE framework also supports the use of an encoder. Indeed, we can view our sparse feature design as a procedure to construct a mask \mathbf{M} which is a matrix of zeros and ones with the same dimensions as \mathbf{Y} , where coefficients are equal to 1 exactly at the indices where \mathbf{Y} is trainable. We can then consider an encoder: f_{\theta_{1}}:\mathbb{R}^{N}\mapsto\mathbb{R}^{d\cdot K} with any architecture, and train an encoder-decoder SSAE to reconstruct \mathbf{X} by minimizing the loss: \displaystyle\mathcal{L}=\mathbin{\|}\mathbf{X}-\mathbf{W}_{2}[f_{\theta_{1}}(\mathbf{X})\odot\mathbf{M}]\mathbin{\|}_{2} where \odot is the element-wise matrix multiplication. The objective is also fully differentiable with respect to \mathbf{W}_{2} and \theta_{1} . This offers additional capabilities compared to the decoder-only version. Indeed, to construct a new sparse latent representation \mathbf{y} , one does not need to start from an existing column of \mathbf{Y} , one can start from any \mathbf{x} in the feature map or prompt embedding space, and apply the transformation f_{\theta_{1}}(\mathbf{x})\odot\mathbf{M} to arrive in the sparse latent space. Figure 2 : Initial prompt: ”A brune girl with blue eyes on horseback across a plain, wearing a red t-shirt and a hat, holding a gun, looking in front of her.”; then we perform the swap between ”brune” and ”blond” via our transformation in the sparse latent space learnt by our decoder-only SSAE. Figure 3 : Initial prompt: ”A brune girl with blue eyes on a boat, wearing a red t-shirt and a cap, holding a gun, looking in front of her.”; then we perform the swap between ”brune” and ”blond” via our transformation in the sparse latent space learnt by our decoder-only SSAE. 4 Experiments. Compute and implementation details. All experiments were conducted on a single NVIDIA A10G GPU with 24 GB of memory. We used Stable Diffusion 3.5 Large Turbo ( 8 ) for image generation, accessed through the HuggingFace diffusers library, and employed it strictly for inference without fine-tuning or modifying the diffusion model parameters. Stable Diffusion 3.5 uses a T5-based text encoder for prompt conditioning, for which prompt embeddings have dimensionality \sim 1.3M; all prompt embeddings used in our experiments were extracted from this frozen encoder ( 24 ) . The diffusion model was loaded using 4-bit quantization with NF4 weights via bitsandbytes , using bfloat16 for computation. The supervised sparse auto-encoder was trained in the decoder-only configuration (linear decoder and sparse concept matrix) on approximately 1500 prompt embeddings, and we set the concept subspace dimension to d=10 . Training completed in approximately 12 minutes on a single GPU. All image edits were performed at inference time by directly modifying prompt embeddings, with no gradient-based optimization during generation. Experiments were run using PyTorch with CUDA 12.4. The code to reproduce the experiments can be found at https://github.com/ouns972/decoder-only-ssae . Training set. We constructed a concept dictionary of visual attributes, including physical features ( blond hair , brune hair , blue eyes , black eyes ), poses ( seated , on horseback , standing ), object presence ( gun , coffee cup , coca-cola ), and environment ( car , boat , bar , street ). We generated a dataset of 1500 prompts with varied concept combinations and extracted the corresponding Stable Diffusion 3.5 prompt embeddings via the T5 text encoder. To showcase compositional generalization, we specifically designed a training dataset where some concepts are never seen together. Sparse feature design. We applied our sparse feature design procedure by assigning to each concept a dedicated block in the sparse latent space: concept sub-vectors are trainable only for prompts containing that concept, and zero otherwise. We then trained a decoder-only SSAE to reconstruct the prompt embeddings. Compositional generalisation. After training, we performed three types of operations on the trained sparse feature matrix: • Swap between concepts c_{k_{1}}\to c_{k_{2}} : setting to zero all components with indices (j,k_{1}) and setting all components with indices (j,k_{2}) to learned values y_{j,k_{2}} for j\in\{1,...,d\} ; • Removal of concept c_{k} : setting to zero all components with indices (j,k) for j\in\{1,...,d\} ; • Insertion of concept c_{k^{\prime}} setting all components with indices (j,k^{\prime}) to learned values y_{j,k^{\prime}} for j\in\{1,...,d\} . We performed semantic composition by starting from columns in \mathbf{Y} and applying such transformations successively, as illustrated Figures 4 and 5 . This procedure thus produced new sparse latent representations \mathbf{y} that did not appear in our training set. By computing \mathbf{W_{2}}\sigma(\mathbf{y}) , we obtained new reconstructed prompt embeddings \hat{\mathbf{x}} , that corresponds to prompts never written in the training set. We then used the prompt embeddings to perform inferences with Stable Diffusion 3.5, and inspect the output images. For example, as illustrated Figures 2 and 3 , we picked prompts with ”brune hair, blue eyes” characters, in configurations for which our training set did not contain any ”blond hair, blue eyes” characters. Inspecting the output images, we observed, as expected, characters depicted in the same original configuration but with blond hair and blue eyes. This qualitative evaluation showcases that the decoder-only SSAE has correctly isolated the concept of ”brune hair” and ”blond hair” since a character with blond hair and blue eyes was never seen in these situations in the training data. To stress-test the statistical significance of these results, on this specific task of changing hair color, we visually inspected > 50 images and found that it correctly changes the hair color 100% of the time. We note however that this may be an ”easy” task, i.e. where the concepts are easily linearly accessible in the prompt embedding space. Additional experimental results can be found in the Appendix. Another limitation worth mentioning is that the transformations are not always neutral w.r.t. the rest of the image (they do not only visually modify the targeted concept), but the coarse-grained behavior showcases that our method demonstrate compositional generalisation in terms of (high-level) semantics. We argue that the success of our method on this task with only 1500 prompts, and a low concept subspace dimension d=10 suggests that our method has huge potential in terms of scalability. We didn’t push the experimental exploration to its full potential due to computational constraints but we indeed think that an avenue to obtain fine-grained disentanglement of concepts would be to increase the concept subspace dimension d , and the number of prompts n in which the concepts are seen in different combinations. As mentioned above, training can be batched with respect to the number of prompts and gradient updates for a decoder-only SSAE scale linearly with d , which offers a lot of potential. Feature-level modular editing. Although we do not claim that the current experimental results are on par with state-of-the-art editing methods for image diffusion models, we argue that our method yields a feature-level modular editing workflow (see Figure 1 ). Scaling up the experiments, i.e. training on many more prompts and increasing the dimensionality of each concept sub-vector is a clear avenue for benchmarking this new method against existing editing workflows. Our preliminary experimental results do indicate that concept-aligned sparse vectors can reliably induce semantically targeted edits. The model generalizes to unseen combinations, supporting compositional modular edits. 5 Related Works Mechanistic interpretability. Mechanistic interpretability research has increasingly turned to sparse autoencoders (SAEs) to extract human-understandable features from complex models. In large language models (LLMs), unsupervised SAEs have been used to address superposition by identifying latent directions that are more monosemantic than raw neurons or PCA components ( 4 ) . These features often correspond to meaningful behaviors and enable fine-grained causal analysis. Indeed, for Transformer activations in large language models, unsupervised SAEs trained on residual stream or attention outputs help improve interpretability and enabling controllable interventions ( ( 2 ; 18 ; 22 ; 11 ) ). In diffusion models, training SAEs on U-Net activations has yielded latent units associated with high-level generative factors such as image layout, lighting, and object presence, and has found that spatially localized, semantic features—such as color, composition, and detail—that can be causally intervened upon 28 . On prompt embeddings, 29 used SAEs on CLIP embeddings to identify semantically coherent latent components, enabling precise prompt editing and conditional generation control. Critically, interventions along these sparse directions produce predictable changes in the model output, revealing their functional role ( 16 ) . As a result, SAEs are increasingly used to move from post hoc probing to active steering of model behavior. Figure 4 : Initial prompt: ”A blong girl with brown eyes sitting at a bar, wearing a blue t-shirt and a baseball cap, holding a gun, looking in front of her.” (top-left), then we applied our transformation in the sparse latent space learnt by our decoder-only SSAE to successively: remove the concept of ”holding a gun” (top-right), insert the concept of ”holding a coffee” (bottom-left), swap it with ”holding a coca-cola” (bottom-right), showcasing compositional generalisation. Tangentially, linear probing is a supervised method that is widely-used for evaluating the information encoded in learned representations. It measures whether a target attribute (e.g., object class, sentiment, or part-of-speech tag) can be predicted from a frozen embedding using a simple linear classifier ( 1 ; 14 ) . High probe accuracy indicates that the attribute is linearly accessible, suggesting it is explicitly represented in the embedding. However, both unsupervised SAEs and linear probes come with important limitations. Linear probes can detect whether a concept is encoded, but do not isolate it causally. SAEs, while more powerful, may still entangle multiple concepts in a single neuron or split one concept across several ( 20 ) . Additionally, reconstruction loss may bias SAEs toward frequent patterns, missing semantically rare but meaningful features ( 5 ) . Finally, large SAEs often yield unstable decompositions with no canonical alignment between neurons and concepts ( 20 ) . Our SSAE framework sits at the intersection of SAEs and linear probing, borrowing supervision from linear probing and sparsity from SAEs. SSAEs aim to resolve the challenges with both techniques by incorporating concept-level guidance. Instead of discovering structure post hoc, SSAEs define interpretable features a priori , assigning each concept to its own sparse subspace. Recent and concurrent works like SAEmnesia ( 3 ) , AlignSAE ( 31 ) and CASL ( 12 ) also show that the supervised approach improves alignment, reduces concept splitting, and enables modular editing. For instance, SAEmnesia was able to erase specific features from a diffusion model by zeroing a single unit, while AlignSAE fine-tuned sparse features to match human-interpretable ontologies and CASL combined unsupervised SAEs and supervised concept alignment to enable modular editing. These methods, similarly to ours, allow edits to be compositional and localized in latent space—a capability that traditional SAEs and probes lack. Our work builds on this direction, proposing a decoder-only SSAE based in the theory of unconstrained feature models (an angle that none of these works take), opening the way to scalable, structured, and semantically grounded intervention in large models. Dictionary learning and block-sparse representations. Dictionary learning aims to represent data as sparse linear combinations of learned atoms, typically by optimizing a reconstruction objective with sparsity-inducing regularization such as an \ell_{1} penalty or greedy pursuit algorithms ( 7 ; 21 ) . Extensions to structured and block-sparse settings introduce group-level sparsity patterns to capture correlations among features ( 15 ) . In these approaches, sparse codes are generally inferred independently for each data point, and the learned structure reflects statistical regularities in the data rather than explicit semantic supervision. By contrast, the SSAE framework studied in this work defines the sparsity pattern a priori at the level of human-interpretable concepts and learns shared latent sub-vectors across all samples in which a concept appears, enabling explicit semantic alignment and compositional feature-level interventions. Figure 5 : Initial prompt: ”A blond girl with blue eyes in a car, wearing a red t-shirt and a cap, holding a gun, looking in front of her.” (left), then we applied our transformation in the sparse latent space learnt by our decoder-only SSAE to successively: remove the concept of ”holding a gun” (middle), swap the concepts of ”blond hair” and ”brune hair”(right), showcasing compositional generalisation. Editing in text-to-image diffusion models. Text-to-image diffusion models support a range of editing techniques operating at different levels of the generation pipeline. Prompt-to-prompt editing modifies cross-attention layers during generation to steer outputs based on textual edits ( 13 ) . Textual inversion learns pseudo-word embeddings to capture new visual concepts from few-shot image examples ( 9 ) , while concept erasure techniques like ESD fine-tune model weights to eliminate specific content ( 10 ) . Latent-based strategies such as Imagic optimize prompt embeddings to better align with target edits while preserving image identity ( 17 ) . In contrast to these methods, our approach edits the prompt embedding space directly via decoded sparse features. By aligning sparse latent blocks with semantic concepts, our model supports compositional interventions (e.g., removing “gun” and adding “blond hair”) without modifying the model or relying on gradient-based optimization at inference. Unlike prompt-to-prompt and textual inversion, which treat prompt embeddings as atomic vectors, our method introduces an interpretable, structured basis over the prompt space, enabling modular edits grounded in human-understandable features. 6 Conclusion and Limitations We presented a supervised sparse auto-encoder framework for aligning interpretable concept vectors with internal representations, applicable to foundational models, and we verified the soundness of our methodology on prompt embeddings for Stable Diffusion 3.5. By directly supervising a sparse latent space with human-defined concept structure, and training a decoder-only architecture, our method avoids many of the challenges of unsupervised SAEs: it requires no L1 regularization, no encoder, and yields concept-aligned directions by design. In its simplest form, our methodology readily supports compositional generalisation which provides a new lens into interpretability. The methodology can be further enriched by incorporating an encoder, which allows to inspect any instance at test time and intervene at feature-level by manipulating the sparse latent space. Our preliminary experimental results showcase the potential of this approach to enable intrepretability through semantic composition and feature-level modular editing. This opens the door to efficient and interpretable editing pipelines grounded in feature-level control. Limitations and Future Work While promising, our method also comes with limitations: • Predefined concept scope. The model can only edit concepts that were included in the supervised dictionary. It does not support discovery of new, emergent features. • Manual concept encoding. Building high-quality concept dictionaries requires human input and may not scale easily to thousands of attributes. We note however that this could be automated by large (vision) language models. • Limited experimental set-up. Due to computational constraints, we have not performed large-scale experiments that would enable to reach the full potential of the methodology, especially in terms of editing, and compare againsts state-of-the-art methods. Our experimental results in their current state are merely evidence of soundness of the methodology. For the same reason, we have not trained an encoder for our SSAE: this would be beneficial to assess the performance of the method on inputs unrelated to any training examples. • Limited evaluation domain. We only tested the method on prompt embeddings from Stable Diffusion 3.5. Future work should apply the same architecture to U-Net feature maps or transformer hidden states to assess generality, across application domains (text generation, image generation, video generation etc). Despite these limitations, our method offers a scalable approach for interpretable control in large foundation models. We believe this structured, concept-supervised approach can serve as a useful alternative to unsupervised SAEs in applications where feature-level modularity, editability, and semantic alignment are desired. Appendix A Additional experimental results Figure 6 : Initial prompt: ”A blond girl with brown eyes standing in the street, wearing a red t-shirt and a cap, holding a gun, looking in front of her.” (top-left), then we applied our transformation in the sparse latent space learnt by our decoder-only SSAE to successively: remove the concept of ”holding a gun” (top-right), swap the concepts of ”blond hair” and ”brune hair” (bottom-left), insert the concept of ”holding a coffee” (bottom-right), showcasing compositional generalisation. Figure 7 : Initial prompt: ”A brunette girl with blue eyes on a boat, wearing a blue t-shirt and a cap, holding a gun, looking in front of her.” (top left), then we applied our transformation in the sparse latent space learnt by our decoder-only SSAE to successively: swap the concept of ”holding a gun” with ”holding a coca-cola” (from top-left to top-right), swap the concepts of ”brune hair” with ”blond hair” (from top-left to bottom-left), remove the concept of ”holding a gun” (bottom-left to bottom-right), showcasing compositional generalisation.