                                                              Sparse Autoencoders, Again?



                               SAE                                                   VAE                                             VAEase





          0   1.3   0   -0.7    0    0   0.8   0.5   -0.3   0.4   1.3   0.5   -0.7    -1   0.3    0.8   0.5   -0.3   ≈0   1.3   ≈0   -0.7   ≈0   ≈0   0.8   0.5   -0.3









               red & green cells are easy to                        red & green cells are hard to                          red & green cells are easy to

                  distinguish by decoder                               distinguish by decoder                                 distinguish by decoder





Figure 2: Comparison among methods. On the left SAE active (green) and inactive (red) dimensions are easily identifiable

by the decoder, so accurate reconstructions are not disrupted when the locations of the nonzero elements adaptively shift

from input sample-to-sample. Meanwhile in the middle figure, VAE active and inactive dimensions look similar for any

given sample, which favors the VAE simply learning a fixed sparsity pattern such that the decoder knows which dimensions

are active. And finally, on the right the VAEase-specific reparameterized representation ez mimics the original SAE behavior

(as γ → 0 near global optima), restoring the ability to adapt the sparsity pattern for each input sample. In this way, VAEase

is more flexible in steering away from the fixed-sparsity representations favored by the vanilla VAE.





VAE Advantages: Since γ can be learned along with                                          (Kingma et al., 2021; Luo). Because of this, DMs are not

other parameters as part of the overall probabilistic model,                               capable of directly producing sparse latent representations

in principle sensitive hyperparameter tuning is not necessary.                             as SAEs and VAEs intrinsically do; they are therefore not

Additionally, if fixed sparsity is sufficient, then VAE models                             a direct surrogate for sparse autoencoding tasks in general.

are potentially superior to SAEs because they provably have                                However, it has nonetheless been recently demonstrated

fewer suboptimal local minima in certain settings (Wipf,                                   that using clever post-processing strategies, DMs are in

2023). This is a desirable artifact of the stochastic VAE                                  fact capable of quantifying the dimensionality of data ly-

encoder, which is uniquely capable of selectively smoothing                                ing on low-dimensional manifolds (Horvat & Pfister, 2024;

away bad minima while simultaneously preserving sharp                                      Kamkari et al., 2024; Stanczuk et al., 2024; Tempczyk et al.,

global optimal with maximal sparsity.                                                      2022). So in this sense their ancillary capabilities overlap

                                                                                           with SAEs/VAEs as we will briefly explore in Section 5.3.



VAE Disadvantages: The very stochastic smoothing that

contributes to VAE advantages is also its Achilles heel.                                   3. Sparse Autoencoding with (VA)Ease

Specifically, whenever a given latent dimension j is inactive                              In the previous section we highlighted contrasting strengths

for one or more data samples, this same dimension is more                                  of SAE and VAE models: the former enjoys dynamic, input-

likely to be inactive for all data samples. This is because,                               adaptive sparsity but at the expense of additional hyperpa-

unlike with SAE models, the first VAE decoder layer is                                     rameter and penalty tuning; meanwhile the latter requires no

generally forced to assign a zero-valued weight to incom-                                  hyperparameters but can only reliably produce fixed sparsity

ing inactive dimensions, which are characterized by white                                  patterns in practice. We now take steps towards achieving

noise that would otherwise contribute to high reconstruc-                                  the best of both worlds via a novel, yet deceptively simple

tion errors at the decoder output. Please see Figure 2 for                                 SAE/VAE hybrid loss formulation.

an illustrative example. And once a zero-valued weight is

assigned during training, this dimension will remain perma-                                Our motivation comes from the fact that certain forms of

nently blocked across all input samples. Hence a de facto                                  conditional VAE models have in fact been shown to pro-

fixed sparsity paradigm is implicitly enforced (see Figure 1),                             duce adaptive sparsity patterns (Zheng et al., 2022). CVAE

in contradistinction to the more flexible adaptive/dynamic                                 models augment the decoder (and possibly the encoder and

sparsity enjoyed by SAE models as discussed previously.                                    prior as well) to condition on some additional observable

This limitation is especially problematic in real-world data                               y leading to the revised distribution pθ (x|z, y). From here,

comprised of complex manifold structure.                                                   specially-designed decoder self-attention mechanisms can

                                                                                           exploit y to selectively turn on and off latent dimensions

2.3. Diffusion Models                                                                      following an input-specific manner, at least to the extent that

                                                                                           y varies in accordance with x.2

We conclude Section 2 by briefly mentioning less direct con-

                                                                                           But how to proceed more generally in normal circumstances

nections between SAEs and diffusion models (DMs) (Ho

et al., 2020; Sohl-Dickstein et al., 2015). As powerful gen-                               2

                                                                                               While it may be possible to achieve something similar without

erative architectures, DMs can be viewed as a hierarchical                                     conditioning variables, the learning process is considerably more

VAE, but with a parameter-free encoder that assumes κ = d                                      challenging. Please see further discussion in Appendix B.1.



                                                                                      4

