Paper deep dive
SplInterp: Improving our Understanding and Training of Sparse Autoencoders
Jeremy Budd, Javier Ideami, Benjamin Macdowall Rynne, Keith Duggar, Randall Balestriero
Models: Gemma-2-2B
Intelligence
Status: succeeded | Model: google/gemini-3.1-flash-lite-preview | Prompt: intel-v1 | Confidence: 96%
Last extracted: 3/11/2026, 12:37:41 AM
Summary
The paper introduces 'SplInterp', a framework that analyzes Sparse Autoencoders (SAEs) through the lens of spline theory. It demonstrates that SAEs are piecewise affine splines, characterizes their geometry using power diagrams, and proposes a novel training algorithm, PAM-SGD, which improves sample efficiency and sparsity in LLM and MNIST experiments.
Entities (5)
Relation Signals (3)
PAM-SGD ā trains ā Sparse Autoencoders
confidence 100% Ā· we develop a novel proximal alternating method SGD (PAM-SGD) algorithm for training SAEs
Power diagrams ā characterizesgeometryof ā Sparse Autoencoders
confidence 95% Ā· We characterise the underlying geometry of (TopK) SAEs using power diagrams.
Spline theory of deep learning ā explains ā Sparse Autoencoders
confidence 95% Ā· we seek to enhance the theoretical understanding of SAEs, using the spline theory of deep learning.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Sparse autoencoders (SAEs) have received considerable recent attention as tools for mechanistic interpretability, showing success at extracting interpretable features even from very large LLMs. However, this research has been largely empirical, and there have been recent doubts about the true utility of SAEs. In this work, we seek to enhance the theoretical understanding of SAEs, using the spline theory of deep learning. By situating SAEs in this framework: we discover that SAEs generalise ``$k$-means autoencoders'' to be piecewise affine, but sacrifice accuracy for interpretability vs. the optimal ``$k$-means-esque plus local principal component analysis (PCA)'' piecewise affine autoencoder. We characterise the underlying geometry of (TopK) SAEs using power diagrams. And we develop a novel proximal alternating method SGD (PAM-SGD) algorithm for training SAEs, with both solid theoretical foundations and promising empirical results in MNIST and LLM experiments, particularly in sample efficiency and (in the LLM setting) improved sparsity of codes. All code is available at: this https URL
Tags
Links
Trouble viewing inline? Open PDF directly ā
Full Text
205,991 characters extracted from source content.
Expand or collapse full text
./ SplInterp: Improving our Understanding and Training of Sparse Autoencoders Jeremy Budd School of Mathematics University of Birmingham &Javier Ideami Ideami Studios &Benjamin Macdowall Rynne Department of Mathematics and Statistics University of Limerick &Keith Duggar XRAI Inc. &Randall Balestriero Department of Computer Science Brown University Corresponding author: j.m.budd@bham.ac.uk Abstract Sparse autoencoders (SAEs) have received considerable recent attention as tools for mechanistic interpretability, showing success at extracting interpretable features even from very large LLMs. However, this research has been largely empirical, and there have been recent doubts about the true utility of SAEs. In this work, we seek to enhance the theoretical understanding of SAEs, using the spline theory of deep learning. By situating SAEs in this framework: we discover that SAEs generalise āk-means autoencodersā to be piecewise affine, but sacrifice accuracy for interpretability vs. the optimal āk-means-esque plus local principal component analysis (PCA)ā piecewise affine autoencoder. We characterise the underlying geometry of (TopK) SAEs using power diagrams. And we develop a novel proximal alternating method SGD (PAM-SGD) algorithm for training SAEs, with both solid theoretical foundations and promising empirical results in MNIST and LLM experiments, particularly in sample efficiency and (in the LLM setting) improved sparsity of codes. All code is available at: https://github.com/splInterp2025/splInterp 1 Introduction Figure 1: Key ideas in this work. Left: Sparse autoencoders (SAEs) vs. regular autoencoders; in an SAE, the code z can have very high dimension, but most entries are zero (greyed out). Right: The superior sample efficiency (on MNIST and Gemma-2-2B) of our novel proximal alternating method SGD (PAM-SGD) algorithm. One of the fundamental challenges in modern AI is the interpretability of machine learning systems: how can we look inside these increasingly more complicated (and capable) āblack boxesā? The better we understand what makes these systems tick, the better we can diagnose problems with them, direct their behaviour, and ultimately build more effective, reliable, and fair systems. Indeed, for some tasks interpretability may be a legal requirement, for example Article 86 of the European Unionās AI Act describes a āright to explanationā for persons affected by the decisions of certain types of AI system. A mechanistic interpretability technique that has seen considerable recent attention is to use sparse autoencoders (SAEs), see e.g. Bricken et al. (2023); Huben et al. (2024); Gao et al. (2025). A major obstacle in interpreting a neural network is that neurons seem to be polysemantic, responding to mixtures of seemingly unrelated features Olah et al. (2017). One hypothesis is that this is caused by superposition, a phenomenon in which a neural network represents features via (linear) combinations of neurons, to pack in more features. In Elhage et al. (2022), superposition was shown to arise in a toy model in response to sparsity of the underlying features. The key idea of using SAEs was that these might be able to disentangle this superposition and extract monosemantic features. Initial work found some success, e.g. Templeton et al. (2024) used SAEs to extract millions of features from Claude 3 Sonnet, including highly interpretable ones such as a āGolden Gate Bridgeā feature, which could be used to make Claude incessantly talk about the bridge. However, there have been some recent doubts about the utility of SAEs for mechanistic interpretability. In a recent post by the Google DeepMind mechanistic interpretability team Smith et al. (2025), works finding key issues with SAEs were highlighted, e.g. Leask et al. (2025), and SAEs were found to underperform linear probes at a downstream task. The team argued that whilst SAEs are not useless, they will not be a game-changer for interpretability, and speculated that the field is over-invested in them. Furthermore, in what we will dub a ādead salmonā experiment (in honour of Bennett et al. (2009)), Heap et al. (2025) found that SAEs can extract features from randomly weighted Transformers that have very similar auto-interpretability scores to features extracted from a trained networkāsuggesting that SAE āinterpretationsā may not reflect what is actually going on in a model. This empirical uncertainty motivated us to look at SAEs through a more theoretical lens, inspired by the spline theory of deep learning Balestriero & Baraniuk (2018). Using this perspective, we: I. Unify, situating SAEs within the spline theory framework, and showing how SAEs form a bridge between the classical ML techniques of k-means and principal component analysis (PCA) and contemporary deep learning. (Section 2, proofs in Appendix B) I. Interpret, characterising and visualising the spline geometry of (TopK) SAEs in terms of weighted Voronoi diagrams. (Sections 2, A and B) I. Innovate, developing a novel proximal alternating method SGD (PAM-SGD) algorithm for training SAEs, with both solid theoretical foundations and promising empirical results, which is inspired by the spline geometric way of thinking. In particular, we find in both MNIST and LLM experiments that PAM-SGD outperforms SGD in low-training-data settings, addressing an important concern with SAEs. (Sections 3, C and E) 2 The spline geometry of sparse autoencoders (SAEs) 2.1 A primer on SAEs An SAE composes an encoding, which maps an input xāānsuperscriptāx ^nx ā blackboard_Rn to a code zāādsuperscriptāz ^dz ā blackboard_Rd (enginereed to be sparse), with a decoding which maps z to an output x^āān^superscriptā x ^nover start_ARG x end_ARG ā blackboard_Rn (engineered so that x^āx xā xover start_ARG x end_ARG ā x). Unlike a traditional autoencoder, in an SAE one may choose the hidden dimension dā«nmuch-greater-thand nd ā« n, but the sparsity of z will be engineered to be much less than n, see Figure 1(left). The SAE encoding is given by z:=Ļā¢(Wencā¢x+benc),assignsubscriptencsubscriptencz:=Ļ(W_encx+b_enc),z := Ļ ( Wenc x + benc ) , where WencāādĆnsubscriptencsuperscriptāW_enc ^dĆ nWenc ā blackboard_Rd Ć n, bdecāādsubscriptdecsuperscriptāb_dec ^dbdec ā blackboard_Rd, and Ļ is a given activation function. Notable choices for Ļ include ReLU Bricken et al. (2023), JumpReLU Rajamanoharan et al. (2024) where ĻāāĻ Ļ ā blackboard_R is a parameter and Ļā¢(v)i:=vi,if ā¢vi>Ļ,0,otherwise,assignsubscriptcasessubscriptif subscript0otherwiseĻ(v)_i:= casesv_i,&if v_i>Ļ,\\ 0,&otherwise, casesĻ ( v )i := start_ROW start_CELL vitalic_i , end_CELL start_CELL if vitalic_i > Ļ , end_CELL end_ROW start_ROW start_CELL 0 , end_CELL start_CELL otherwise , end_CELL end_ROW and TopK Makhzani & Frey (2014); Gao et al. (2025) where KāāK ā blackboard_N is a parameter and Ļā¢(v)i:=vi,if vi is among the K largest entries of v,0,otherwise.assignsubscriptcasessubscriptif vi is among the K largest entries of v,0otherwiseĻ(v)_i:= casesv_i,&if $v_i$ is among the $K$ largest % entries of $v$,\\ 0,&otherwise. casesĻ ( v )i := start_ROW start_CELL vitalic_i , end_CELL start_CELL if vitalic_i is among the K largest entries of v , end_CELL end_ROW start_ROW start_CELL 0 , end_CELL start_CELL otherwise . end_CELL end_ROW The decoding is then given by x^:=Wdecā¢z+bdec,assign^subscriptdecsubscriptdec x:=W_decz+b_dec,over start_ARG x end_ARG := Wdec z + bdec , where WdecāānĆdsubscriptdecsuperscriptāW_dec ^nĆ dWdec ā blackboard_Rn Ć d and bdecāānsubscriptdecsuperscriptāb_dec ^nbdec ā blackboard_Rn. The columns of WdecsubscriptdecW_decWdec can be understood as dictionary atoms (see Olshausen & Field (1996)) which are sparsely recombined (with bias) to recover x^ xover start_ARG x end_ARG. The full SAE is therefore given by SĻā¢(x)subscript S_Ļ(x)Sitalic_Ļ ( x ) :=Wdecā¢Ļā¢(Wencā¢x+benc)+bdec.assignabsentsubscriptdecsubscriptencsubscriptencsubscriptdec :=W_decĻ(W_encx+b_enc)+b_dec% .:= Wdec Ļ ( Wenc x + benc ) + bdec . Finally, following Rajamanoharan et al. (2024), given training data xrr=1Nāānsuperscriptsubscriptsuperscript1superscriptā\x^r\_r=1^N ^n xitalic_r r = 1N ā blackboard_Rn, we will consider loss functions for training an SAE of the form: ā =ār=1NāSĻā¢(xr)āxrā22+Ī»ā¢āsparsityā¢(Ļā¢(Wencā¢xr+benc)r=1N)+āaux,absentsuperscriptsubscript1superscriptsubscriptnormsubscriptsuperscriptsuperscript22subscriptāsparsitysuperscriptsubscriptsubscriptencsuperscriptsubscriptenc1subscriptāaux = _r=1^N\|S_Ļ(x^r)-x^r\|_2^2+Ī»% L_sparsity (\Ļ(W_encx^r+b_enc)\_r=1^% N )+L_aux,= ār = 1N ā„ Sitalic_Ļ ( xitalic_r ) - xitalic_r ā„22 + Ī» Lsparsity ( Ļ ( Wenc xitalic_r + benc ) r = 1N ) + Laux , where āauxsubscriptāauxL_auxLaux might include regularisation, e.g. weight decay. Some activations, e.g. TopK, always produce a sparse z, so one may set āsparsity=0subscriptāsparsity0L_sparsity=0Lsparsity = 0. Others, e.g. ReLU, do not inherently make z sparse, in which case common choices of āsparsitysubscriptāsparsityL_sparsityLsparsity include the ā1subscriptā1 _1ā1 norm Bricken et al. (2023), the ā0subscriptā0 _0ā0 norm Rajamanoharan et al. (2024), and the KullbackāLeibler divergence to a sparse distribution Ng (2011). 2.2 SAEs are piecewise affine splines We first note a simple fact about our SAEs, also observed in Hindupur et al. (2025) (in different notation). In all three cases of ReLU, JumpReLU, and TopK, for some Sā1,ā¦,d1ā¦S \1,...,d\S ā 1 , ⦠, d we have that Ļā¢(v)=PSā¢v,subscriptĻ(v)=P_Sv,Ļ ( v ) = Pitalic_S v , where PSāādĆdsubscriptsuperscriptāP_S ^dĆ dPitalic_S ā blackboard_Rd Ć d is the projection that zeroes the entries of v which are not in S. In the case of JumpReLU (of which ReLU is a special case) S is the set of indices i such that vi>Ļsubscriptv_i> _i > Ļ, and in the case of TopK S is the set of indices containing the largest K entries. Therefore, let us define Ī©SJumpReLUsuperscriptsubscriptĪ©JumpReLU _S^JumpReLUĪ©italic_Sroman_JumpReLU :=xāān:āiāS,(Wencā¢x+benc)i>Ļ⢠and ā¢ājāS,(Wencā¢x+benc)j<Ļ,assignabsentconditional-setsuperscriptāformulae-sequenceformulae-sequencefor-allsubscriptsubscriptencsubscriptenc and for-allsubscriptsubscriptencsubscriptenc :=\x ^n:ā iā S,(W_encx+b_% enc)_i>Ļ and ā jā S,(W_encx+b_enc)_% j<Ļ\,:= x ā blackboard_Rn : ā i ā S , ( Wenc x + benc )i > Ļ and ā j ā S , ( Wenc x + benc )j < Ļ , Ī©STopKsuperscriptsubscriptĪ©TopK _S^TopKĪ©italic_Sroman_TopK :=xāān:āiāS,jāS,(Wencā¢x+benc)i>(Wencā¢x+benc)j,assignabsentconditional-setsuperscriptāformulae-sequencefor-allformulae-sequencesubscriptsubscriptencsubscriptencsubscriptsubscriptencsubscriptenc :=\x ^n:ā iā S,jā S,\>(W_enc% x+b_enc)_i>(W_encx+b_enc)_j\,:= x ā blackboard_Rn : ā i ā S , j ā S , ( Wenc x + benc )i > ( Wenc x + benc )j , where in the former S can be any subset of 1,ā¦,d1ā¦\1,...,d\ 1 , ⦠, d and in the latter S must be a subset of size K. Then for Ļ=JumpReLUJumpReLUĻ=JumpReLUĻ = JumpReLU or Ļ=TopKTopKĻ=TopKĻ = TopK the SAE becomes: SĻā¢(x)=Wdecā¢PSā¢(Wencā¢x+benc)+bdec,xāĪ©SĻ,subscriptcasessubscriptdecsubscriptsubscriptencsubscriptencsubscriptdecsubscriptsuperscriptĪ©S_Ļ(x)= casesW_decP_S(W_encx+b_enc)+b% _dec,&xā ^Ļ_S, casesSitalic_Ļ ( x ) = start_ROW start_CELL Wdec Pitalic_S ( Wenc x + benc ) + bdec , end_CELL start_CELL x ā Ī©italic_Ļitalic_S , end_CELL end_ROW which is a piecewise affine spline. Note that the Ī©SJumpReLUsuperscriptsubscriptĪ©JumpReLU _S^JumpReLUĪ©italic_Sroman_JumpReLU and Ī©STopKsuperscriptsubscriptĪ©TopK _S^TopKĪ©italic_Sroman_TopK do not entirely partition the space, e.g. what if Wencā¢x+bencsubscriptencsubscriptencW_encx+b_encWenc x + benc has an entry equal to Ļ or has ties for the top K? Such xxxs (a set of measure zero) form the boundaries of these pieces, and SĻsubscriptS_ĻSitalic_Ļ is discontinuous at these boundaries (except in the ReLU case, i.e. Ļ=00Ļ=0Ļ = 0). Both Ī©SĻsuperscriptsubscriptĪ© _S^ĻĪ©italic_Sitalic_Ļ can be written in the form xāān:Hā¢x>cconditional-setsuperscriptā\x ^n:Hx>c\ x ā blackboard_Rn : H x > c , for appropriate matrices H and vectors c, see Theorem B.1. They are thus open and convex sets, and by Theorem B.1 are the interiors of convex polyhedra except in degenerate cases of WencsubscriptencW_encWenc. Going beyond this simple characterisation, we introduce a new geometric characterisation of the TopK pieces as the cells of a power diagram. (For some visualisations of these notions, see Appendix A.) Definition 2.1 (Power and Voronoi diagrams). A power diagram (a.k.a. a LaguerreāVoronoi diagram) is a partition of ānsuperscriptāR^nblackboard_Rn into k cells, defined by taking centroids μii=1kāānsuperscriptsubscriptsubscript1superscriptā\ _i\_i=1^k ^n μitalic_i i = 1k ā blackboard_Rn and weights αii=1kāāsuperscriptsubscriptsubscript1ā\ _i\_i=1^k αitalic_i i = 1k ā blackboard_R and defining the ithsuperscriptthi^thith cell to be Ci:=xāān:āxāμiā22āαi<āxāμjā22āαj⢠for all ā¢jā i.assignsubscriptconditional-setsuperscriptāsuperscriptsubscriptnormsubscript22subscriptsuperscriptsubscriptnormsubscript22subscript for all C_i:=\x ^n:\|x- _i\|_2^2- _i<\|x- _j\|_2% ^2- _j for all jā i\.Citalic_i := x ā blackboard_Rn : ā„ x - μitalic_i ā„22 - αitalic_i < ā„ x - μitalic_j ā„22 - αitalic_j for all j ā i . A Voronoi diagram is given by the special case when the αisubscript _iαitalic_i are constant in i. We further define a KthsuperscriptthK^thKth-order power diagram with centroids μii=1kāānsuperscriptsubscriptsubscript1superscriptā\ _i\_i=1^k ^n μitalic_i i = 1k ā blackboard_Rn, weights αii=1kāāsuperscriptsubscriptsubscript1ā\ _i\_i=1^k αitalic_i i = 1k ā blackboard_R, and (kK)binomial kK( FRACOP start_ARG k end_ARG start_ARG K end_ARG ) cells, where for Sā1,ā¦,k1ā¦S \1,...,k\S ā 1 , ⦠, k with |S|=K|S|=K| S | = K, let the SthsuperscriptthS^thSth cell be CS:=xāān:āxāμiā22āαi<āxāμjā22āαj⢠for all iāS and jāSc.assignsubscriptconditional-setsuperscriptāsuperscriptsubscriptnormsubscript22subscriptsuperscriptsubscriptnormsubscript22subscript for all iāS and jāScC_S:=\x ^n:\|x- _i\|_2^2- _i<\|x- _j\|_2% ^2- _j for all $iā S$ and $jā S^c$\.Citalic_S := x ā blackboard_Rn : ā„ x - μitalic_i ā„22 - αitalic_i < ā„ x - μitalic_j ā„22 - αitalic_j for all i ā S and j ā Sitalic_c . An identical power diagram (of any order) is given if a constant is added to all the weights. Note 2.2. All KthsuperscriptthK^thKth-order power diagrams are power diagrams, see Theorem B.2, but the converse does not hold, i.e. not all power diagrams with (kK)binomial kK( FRACOP start_ARG k end_ARG start_ARG K end_ARG ) centroids and weights can be written as a KthsuperscriptthK^thKth-order power diagram with k centroids and weights. As a counterexample, let k=44k=4k = 4, K=22K=2K = 2, and the power diagram centroids be the six vertices of the regular hexagon. There are no four vectors in ā2superscriptā2R^2blackboard_R2 whose pairwise means are the vertices of the regular hexagon. Theorem 2.3. The cells Ī©STopKsubscriptsuperscriptĪ©TopK\ ^TopK_S\ Ī©roman_TopKitalic_S form a KthsuperscriptthK^thKth-order power diagram with (dK)binomial dK( FRACOP start_ARG d end_ARG start_ARG K end_ARG ) cells. Conversely, for any KthsuperscriptthK^thKth-order power diagram with (dK)binomial dK( FRACOP start_ARG d end_ARG start_ARG K end_ARG ) cells with centroids μii=1dsuperscriptsubscriptsubscript1\ _i\_i=1^d μitalic_i i = 1d and weights αii=1dsuperscriptsubscriptsubscript1\ _i\_i=1^d αitalic_i i = 1d, there exist Weā¢nā¢cāādĆnsubscriptsuperscriptāW_enc ^dĆ nWitalic_e n c ā blackboard_Rd Ć n and beā¢nā¢cāādsubscriptsuperscriptāb_enc ^dbitalic_e n c ā blackboard_Rd such that the resulting TopK SAE is affine on the cells of that KthsuperscriptthK^thKth-order power diagram. The translations between each setting are given by: eiTā¢Weā¢nā¢c=μiTsubscriptsuperscriptsubscriptsuperscriptsubscript e^T_iW_enc= _i^Teitalic_Titalic_i Witalic_e n c = μitalic_iitalic_T and (beā¢nā¢c)i=12ā¢Ī±iā12ā¢āμiā22,subscriptsubscript12subscript12superscriptsubscriptnormsubscript22 (b_enc)_i= 12 _i- 12\| _i\|_2^2,( bitalic_e n c )i = divide start_ARG 1 end_ARG start_ARG 2 end_ARG αitalic_i - divide start_ARG 1 end_ARG start_ARG 2 end_ARG ℠μitalic_i ā„22 , (2.1a) μi=Weā¢nā¢cTā¢eisubscriptsubscriptsuperscriptsubscript _i=W^T_ence_iμitalic_i = Witalic_Titalic_e n c eitalic_i and αi=2ā¢(beā¢nā¢c)i+āWeā¢nā¢cTā¢eiā22,subscript2subscriptsubscriptsuperscriptsubscriptnormsubscriptsuperscriptsubscript22 _i=2(b_enc)_i+\|W^T_ence_i\|_2^2,αitalic_i = 2 ( bitalic_e n c )i + ā„ Witalic_Titalic_e n c eitalic_i ā„22 , (2.1b) for all i, where eisubscripte_ieitalic_i is the elementary basis vector with 1111 in coordinate i and 00 in every other coordinate. It follows from Theorem B.2 that the cells Ī©STopKsubscriptsuperscriptĪ©TopK\ ^TopK_S\ Ī©roman_TopKitalic_S form a power diagram with (dK)binomial dK( FRACOP start_ARG d end_ARG start_ARG K end_ARG ) cells, given by centroids νSsubscript\ _S\ νitalic_S and weights βSsubscript\ _S\ βitalic_S defined by νS:=1Kā¢āiāSWeā¢nā¢cTā¢eiassignsubscript1subscriptsubscriptsuperscriptsubscript _S:= 1K _iā SW^T_ence_iνitalic_S := divide start_ARG 1 end_ARG start_ARG K end_ARG āi ā S Witalic_Titalic_e n c eitalic_i and βS:=ā1Kā¢āiāSWeā¢nā¢cTā¢eiā22+1Kā¢āiāS2ā¢(beā¢nā¢c)i.assignsubscriptsuperscriptsubscriptnorm1subscriptsubscriptsuperscriptsubscript221subscript2subscriptsubscript _S:= \| 1K _iā SW^T_ence_i % \|_2^2+ 1K _iā S2(b_enc)_i.βitalic_S := ā„ divide start_ARG 1 end_ARG start_ARG K end_ARG āi ā S Witalic_Titalic_e n c eitalic_i ā„22 + divide start_ARG 1 end_ARG start_ARG K end_ARG āi ā S 2 ( bitalic_e n c )i . (2.2) The converse is false: a given power diagram with (dK)binomial dK( FRACOP start_ARG d end_ARG start_ARG K end_ARG ) cells can describe the cells upon which a TopK SAE is piecewise affine if and only if it can be written as a KthsuperscriptthK^thKth-order power diagram. What Theorem 2.3 tells us is exactly the spline geometries that TopK SAEs can have, namely that these are exactly the KthsuperscriptthK^thKth-order power diagrams. Indeed, we can explicitly derive the encoding parameters that give rise to a particular spline geometry. This opens the door to engineering TopK SAEs with desirable geometric features, by translating those features into constraints on the parameters. As an example of a geometric feature one might desire to encourage, Humayun et al. (2024) related the generalisability and robustness produced by neural network grokking (see Power et al. (2022)) to the local complexity of the spline geometry. 2.3 SAEs, k-means, and principal component analysis (PCA) By the above, all of the above SAEs are piecewise affine functions on regions Ī©SsubscriptĪ©\ _S\ Ī©italic_S , with rank |S||S|| S | on Ī©SsubscriptĪ© _SĪ©italic_S. We can compare this to the k-means clustering. Definition 2.4 (k-means clustering). Given data xrr=1Nāānsuperscriptsubscriptsuperscript1superscriptā\x^r\_r=1^N ^n xitalic_r r = 1N ā blackboard_Rn, the k-means clustering Steinhaus (1957) seeks k regions Rii=1kāānsuperscriptsubscriptsubscript1superscriptā\R_i\_i=1^k ^n Ritalic_i i = 1k ā blackboard_Rn and centroids νii=1kāānsuperscriptsubscriptsubscript1superscriptā\ _i\_i=1^k ^n νitalic_i i = 1k ā blackboard_Rn minimising: āi=1kāxrāRiāxrāνiā22.superscriptsubscript1subscriptsuperscriptsubscriptsubscriptsuperscriptnormsuperscriptsubscript22 _i=1^k _x^rā R_i\|x^r- _i\|^2_2.āi = 1k āxitalic_r ā R start_POSTSUBSCRIPT i end_POSTSUBSCRIPT ā„ xitalic_r - νitalic_i ā„22 . This is achieved when νisubscript _iνitalic_i are the in-region means and RisubscriptR_iRitalic_i are the following Voronoi cells: νi=xĀÆi:=1|r:xrāRi|ā¢āxrāRixr,Ri=xāān:āxāνiā22ā¤āxāνjā22⢠for all jā i.formulae-sequencesubscriptsubscriptĀÆassign1conditional-setsuperscriptsubscriptsubscriptsuperscriptsubscriptsuperscriptsubscriptconditional-setsuperscriptāsuperscriptsubscriptnormsubscript22superscriptsubscriptnormsubscript22 for all jā i _i= x_i:= 1|\r:x^rā R_i\| _x^rā R_ix^r% , R_i=\x ^n:\|x- _i\|_2^2ā¤\|x- _j\|_2% ^2 for all $jā i$\.νitalic_i = overĀÆ start_ARG x end_ARGi := divide start_ARG 1 end_ARG start_ARG | r : xitalic_r ā Ritalic_i | end_ARG āxitalic_r ā R start_POSTSUBSCRIPT i end_POSTSUBSCRIPT xitalic_r , Ritalic_i = x ā blackboard_Rn : ā„ x - νitalic_i ā„22 ⤠℠x - νitalic_j ā„22 for all j ā i . Note 2.5. Suppose we have k regions Ī©Sii=1ksuperscriptsubscriptsubscriptĪ©subscript1\ _S_i\_i=1^k Ī©italic_S start_POSTSUBSCRIPT i end_POSTSUBSCRIPT i = 1k. Consider the piecewise constant encoding feā¢nā¢cā¢(x):=eiassignsubscriptsubscriptf_enc(x):=e_ifitalic_e n c ( x ) := eitalic_i for xāĪ©SisubscriptĪ©subscriptxā _S_ix ā Ī©italic_S start_POSTSUBSCRIPT i end_POSTSUBSCRIPT and the linear decoding x^=Wdecā¢z^subscriptdec x=W_deczover start_ARG x end_ARG = Wdec z where WdecāānĆksubscriptdecsuperscriptāW_dec ^nĆ kWdec ā blackboard_Rn Ć k has ithsuperscriptthi^thith column νSisubscriptsubscript _S_iνitalic_S start_POSTSUBSCRIPT i end_POSTSUBSCRIPT. Then if we replace SĻsubscriptS_ĻSitalic_Ļ by Fā¢(x):=Wdecā¢fencā¢(x)assignsubscriptdecsubscriptencF(x):=W_decf_enc(x)F ( x ) := Wdec fenc ( x ) in āLL and take āsparsity=āaux=0subscriptāsparsitysubscriptāaux0L_sparsity=L_aux=0Lsparsity = Laux = 0, ā=ār=1NāxrāFā¢(xr)ā22=āi=1kāxrāĪ©SiāxrāνSiā22,āsuperscriptsubscript1superscriptsubscriptnormsuperscriptsuperscript22superscriptsubscript1subscriptsuperscriptsubscriptĪ©subscriptsuperscriptsubscriptnormsuperscriptsubscriptsubscript22L= _r=1^N\|x^r-F(x^r)\|_2^2= _i=1^k _x^r% ā _S_i\|x^r- _S_i\|_2^2,L = ār = 1N ā„ xitalic_r - F ( xitalic_r ) ā„22 = āi = 1k āxitalic_r ā Ī© start_POSTSUBSCRIPT S start_POSTSUBSCRIPT i end_POSTSUBSCRIPT end_POSTSUBSCRIPT ā„ xitalic_r - νitalic_S start_POSTSUBSCRIPT i end_POSTSUBSCRIPT ā„22 , which is exactly the k-means objective. An SAE is therefore a generalisation of this āk-means autoencoderā, where the encoding is allowed to be piecewise affine, the number of regions is allowed to be greater than the hidden dimension (k=2dsuperscript2k=2^dk = 2d in the (Jump)ReLU case and k=(dK)binomialk= dKk = ( FRACOP start_ARG d end_ARG start_ARG K end_ARG ) in the TopK case) and the SAE is overall piecewise affine with piecewise ranks |Si|subscript|S_i|| Sitalic_i |. But if SAEs are āk-means autoencodersā generalised to allow piecewise affine behaviour, how do they compare to the most general piecewise affine autoencoder? Theorem 2.6. On any partition Rii=1ksuperscriptsubscriptsubscript1\R_i\_i=1^k Ritalic_i i = 1k define the general piecewise affine autoencoder with piecewise ranks KisubscriptK_iKitalic_i (where Ui,ViāānĆKisubscriptsubscriptsuperscriptāsubscriptU_i,V_i ^nĆ K_iUitalic_i , Vitalic_i ā blackboard_Rn Ć Kitalic_i, UiTā¢Ui=IsuperscriptsubscriptsubscriptU_i^TU_i=IUitalic_iitalic_T Uitalic_i = I, and ciāānsubscriptsuperscriptāc_i ^ncitalic_i ā blackboard_Rn), Gā¢(x):=Uiā¢ViTā¢x+ci,xāRi.assigncasessubscriptsuperscriptsubscriptsubscriptsubscriptG(x):= casesU_iV_i^Tx+c_i,&xā R_i. casesG ( x ) := start_ROW start_CELL Uitalic_i Vitalic_iitalic_T x + citalic_i , end_CELL start_CELL x ā Ritalic_i . end_CELL end_ROW Let āaux=0subscriptāaux0L_aux=0Laux = 0 and āsparsity=ā„ā ā„0L_sparsity=\|Ā·\|_0Lsparsity = ā„ ā ā„0, which counts the non-zero entries. Then we have the loss ā=āi=1kāxrāRiāxrāGā¢(xr)ā22+Ī»ā¢āi=1kNiā¢Ki,āsuperscriptsubscript1subscriptsuperscriptsubscriptsuperscriptsubscriptnormsuperscriptsuperscript22superscriptsubscript1subscriptsubscriptL= _i=1^k _x^rā R_i\|x^r-G(x^r)\|_2^2+% Ī» _i=1^kN_iK_i,L = āi = 1k āxitalic_r ā R start_POSTSUBSCRIPT i end_POSTSUBSCRIPT ā„ xitalic_r - G ( xitalic_r ) ā„22 + Ī» āi = 1k Nitalic_i Kitalic_i , where Ni:=|r:xrāRi|assignsubscriptconditional-setsuperscriptsubscriptN_i:=|\r:x^rā R_i\|Nitalic_i := | r : xitalic_r ā Ritalic_i |. This has optimal parameters: Ui=VisubscriptsubscriptU_i=V_iUitalic_i = Vitalic_i where the columns of UisubscriptU_iUitalic_i are the top KisubscriptK_iKitalic_i (normalised) eigenvectors ξāiā=1Kisuperscriptsubscriptsubscriptsuperscriptā1subscript\ξ^i_ \_ =1^K_i ξitalic_iroman_ā ā = 1Kitalic_i of the covariance matrix Xi:=1Niā¢āxrāRi(xrāxĀÆi)ā¢(xrāxĀÆi)T,assignsubscript1subscriptsubscriptsuperscriptsubscriptsuperscriptsubscriptĀÆsuperscriptsuperscriptsubscriptĀÆX_i:= 1N_i _x^rā R_i(x^r- x_i)(x^r- x_% i)^T,Xitalic_i := divide start_ARG 1 end_ARG start_ARG Nitalic_i end_ARG āxitalic_r ā R start_POSTSUBSCRIPT i end_POSTSUBSCRIPT ( xitalic_r - overĀÆ start_ARG x end_ARGi ) ( xitalic_r - overĀÆ start_ARG x end_ARGi )T , ci=(IāUiā¢ViT)ā¢xĀÆisubscriptsubscriptsuperscriptsubscriptsubscriptĀÆc_i=(I-U_iV_i^T) x_icitalic_i = ( I - Uitalic_i Vitalic_iitalic_T ) overĀÆ start_ARG x end_ARGi, and optimal regions RisubscriptR_iRitalic_i minimising ā=āi=1k(āxrāRiā(xrāxĀÆi)ā22)+Niā¢Kiā¢(Ī»ā1Kiā¢āā=1KiĪ»āā¢(Xi)),āsuperscriptsubscript1subscriptsuperscriptsubscriptsuperscriptsubscriptnormsuperscriptsubscriptĀÆ22subscriptsubscript1subscriptsuperscriptsubscriptā1subscriptsubscriptāsubscriptL= _i=1^k ( _x^rā R_i\|(x^r- x_i)\|_% 2^2 )+N_iK_i (Ī»- 1K_i _ =1^K_i% _ (X_i) ),L = āi = 1k ( āxitalic_r ā R start_POSTSUBSCRIPT i end_POSTSUBSCRIPT ā„ ( xitalic_r - overĀÆ start_ARG x end_ARGi ) ā„22 ) + Nitalic_i Kitalic_i ( Ī» - divide start_ARG 1 end_ARG start_ARG Kitalic_i end_ARG āā = 1Kitalic_i Ī»roman_ā ( Xitalic_i ) ) , where Ī»āā¢(Xi)subscriptāsubscript _ (X_i)Ī»roman_ā ( Xitalic_i ) are the eigenvalues of XisubscriptX_iXitalic_i in descending order. Therefore, Gā¢(x)=xĀÆi+āā=1Ki(ξāi)Tā¢(xāxĀÆi)ā¢Ī¾āi,xāRi,casessubscriptĀÆsuperscriptsubscriptā1subscriptsuperscriptsubscriptsuperscriptāsubscriptĀÆsubscriptsuperscriptāsubscriptG(x)= cases x_i+ _ =1^K_i(ξ^i_ )^T(x- % x_i)ξ^i_ ,&xā R_i, casesG ( x ) = start_ROW start_CELL overĀÆ start_ARG x end_ARGi + āā = 1Kitalic_i ( ξitalic_iroman_ā )T ( x - overĀÆ start_ARG x end_ARGi ) ξitalic_iroman_ā , end_CELL start_CELL x ā Ritalic_i , end_CELL end_ROW Thus, the general piecewise affine autoencoder combines a k-means-esque clustering with a variable-rank local PCA correction. The optimal KisubscriptK_iKitalic_i will occur when Ī»Kiā¢(Xi)>Ī»ā„Ī»Ki+1ā¢(Xi)subscriptsubscriptsubscriptsubscriptsubscript1subscript _K_i(X_i)>λ℠_K_i+1(X_i)Ī»italic_K start_POSTSUBSCRIPT i end_POSTSUBSCRIPT ( Xitalic_i ) > Ī» ā„ Ī»italic_K start_POSTSUBSCRIPT i + 1 end_POSTSUBSCRIPT ( Xitalic_i ), and hence G is sensitive to the local intrinsic dimension of the data. Note 2.7. The key takeaway from Theorem 2.6 is that whilst SAEs generalise k-means to allow piecewise affine behaviour, they are less accurate than the most general piecewise affine autoencoder, which is k-means-like with a local PCA that tracks the local intrinsic dimension. However, G achieves this greater accuracy by using a different encoding/decoding in each region. The code entry zj:=(ξji)Tā¢(xāxĀÆi)assignsubscriptsuperscriptsubscriptsuperscriptsubscriptĀÆz_j:=(ξ^i_j)^T(x- x_i)zitalic_j := ( ξitalic_iitalic_j )T ( x - overĀÆ start_ARG x end_ARGi ) for an xāRisubscriptxā R_ix ā Ritalic_i is semantically unrelated to the zjsubscriptz_jzitalic_j for an x in another region. By contrast, SAEs sacrifice some accuracy to encode all inputs as monosemantic sparse codes z. This leads to SAEs having d decoding vectors (the columns of WdecsubscriptdecW_decWdec) of which a subset are deployed per region, so these vectors are shared between regions. 2.4 Visualising the SAE bridge between k-means and PCA We just saw mathematically how SAEs generalise k-means, but sacrifice accuracy for interpretability compared to the optimal piecewise affine autoencoder, which is k-means-esque extended via local PCA. Our first experiment is a quick empirical exploration of this bridge. We chose TopK SAEs, and trained them on 100 points in ā2superscriptā2R^2blackboard_R2 drawn from k=33k=3k = 3 clusters. For details on the experimental set-up, see Section D.1 and for another figure see Appendix E. We compared the SAEs to (i) a k-means āautoencodingā, which maps each data point to its centroid, and (i) a local 1-PCA extension of that k-means autoencoding. This is the optimal G from Theorem 2.6 with Rii=13superscriptsubscriptsubscript13\R_i\_i=1^3 Ritalic_i i = 13 fixed to be the k-means cells and Kiā”1subscript1K_iā” 1Kitalic_i ā” 1. We found (see Figures 2 and 8) that the SAE consistently had a lower mean squared error (MSE) than k-means but a higher MSE than the PCA extension, in accordance with the theory. Figure 2: Visualising the SAE bridge between k-means clustering and PCA. The cyan/brown boundary intersecting the point cloud (left and right figure) is a visualiser bug. 3 A proximal alternating method (PAM-SGD) for training SAEs 3.1 Convergence theory and the PAM-SGD algorithm It turns out that for any SAE that has the sort of loss function we have been considering, if we fix the encoding, then learning the decoding reduces to linear least squares regression: the decoding seeks an affine map that sends codes zr:=Ļā¢(Wencā¢xr+benc)assignsuperscriptsubscriptencsuperscriptsubscriptencz^r:=Ļ(W_encx^r+b_enc)zitalic_r := Ļ ( Wenc xitalic_r + benc ) to xrsuperscriptx^rxitalic_r. We can therefore solve for the decoding in closed form, which suggests the idea of training an SAE by alternating between updating our encoding holding the decoding fixed, e.g. by SGD, and then updating our decoding holding the encoding fixed, via the closed form optimum. This dovetails well with the spline theory perspective, as we saw in the previous section that the spline geometry depends entirely on the encoding parameters. Therefore, this alternation can be viewed as (i) updating the SAE spline geometry to better use a given decoding, and then (i) finding the most accurate decoding given that geometry. In particular, we will consider the following proximal alternating method with quadratic costs to move, as this has solid theoretical foundations Attouch et al. (2010): (Wenct+1,benct+1)superscriptsubscriptenc1superscriptsubscriptenc1 (W_enc^t+1,b_enc^t+1)( Wencitalic_t + 1 , bencitalic_t + 1 ) =argminWenc,bencabsentsubscriptargminsubscriptencsubscriptenc = *argmin_W_enc,b_enc= argminitalic_W start_POSTSUBSCRIPT enc , benc end_POSTSUBSCRIPT ār=1NāWdectā¢Ļā¢(Wencā¢xr+benc)+bdectāxrā22+Fā¢(Wenc,benc)superscriptsubscript1superscriptsubscriptnormsuperscriptsubscriptdecsubscriptencsuperscriptsubscriptencsuperscriptsubscriptdecsuperscript22subscriptencsubscriptenc _r=1^N\|W_dec^tĻ(W_encx^r+b_% enc)+b_dec^t-x^r\|_2^2+F(W_enc,b_enc)ār = 1N ā„ Wdecitalic_t Ļ ( Wenc xitalic_r + benc ) + bdecitalic_t - xitalic_r ā„22 + F ( Wenc , benc ) (3.1a) +μenctā¢āWencāWenctāF2+νenctā¢ābencābenctā22superscriptsubscriptencsuperscriptsubscriptnormsubscriptencsuperscriptsubscriptenc2superscriptsubscriptencsuperscriptsubscriptnormsubscriptencsuperscriptsubscriptenc22 + _enc^t\|W_enc-W_enc^t\|_F^2% + _enc^t\|b_enc-b_enc^t\|_2^2+ μencitalic_t ā„ Wenc - Wencitalic_t ā„F2 + νencitalic_t ā„ benc - bencitalic_t ā„22 (Wdect+1,bdect+1)superscriptsubscriptdec1superscriptsubscriptdec1 (W_dec^t+1,b_dec^t+1)( Wdecitalic_t + 1 , bdecitalic_t + 1 ) =argminWdec,bdecabsentsubscriptargminsubscriptdecsubscriptdec = *argmin_W_dec,b_dec= argminitalic_W start_POSTSUBSCRIPT dec , bdec end_POSTSUBSCRIPT ār=1NāWdecā¢Ļā¢(Wenct+1ā¢xr+benct+1)+bdecāxrā22+Gā¢(Wdec,bdec)superscriptsubscript1superscriptsubscriptnormsubscriptdecsubscriptsuperscript1encsuperscriptsubscriptsuperscript1encsubscriptdecsuperscript22subscriptdecsubscriptdec _r=1^N\|W_decĻ(W^t+1_encx^r+b^t% +1_enc)+b_dec-x^r\|_2^2+G(W_dec,b_dec% )ār = 1N ā„ Wdec Ļ ( Witalic_t + 1enc xitalic_r + bitalic_t + 1enc ) + bdec - xitalic_r ā„22 + G ( Wdec , bdec ) (3.1b) +μdectā¢āWdecāWdectāF2+νdectā¢ābdecābdectā22superscriptsubscriptdecsuperscriptsubscriptnormsubscriptdecsuperscriptsubscriptdec2subscriptsuperscriptdecsuperscriptsubscriptnormsubscriptdecsuperscriptsubscriptdec22 + _dec^t\|W_dec-W_dec^t\|_F^2% +ν^t_dec\|b_dec-b_dec^t\|_2^2+ μdecitalic_t ā„ Wdec - Wdecitalic_t ā„F2 + νitalic_tdec ā„ bdec - bdecitalic_t ā„22 We next use Attouch et al. (2010) to analyse the convergence of Equation 3.1, and find that under some assumptions (which will require minor adjustments to our SAE settings, see C.2 and C.3) the sequence defined by (3.1) converges to a critical point of the following loss: āā¢(Wenc,benc,Wdec,bdec):=ār=1NāWdecā¢Ļā¢(Wencā¢xr+benc)+bdecāxrā22+Fā¢(Wenc,benc)+Gā¢(Wdec,bdec).assignāsubscriptencsubscriptencsubscriptdecsubscriptdecsuperscriptsubscript1superscriptsubscriptnormsubscriptdecsubscriptencsuperscriptsubscriptencsubscriptdecsuperscript22subscriptencsubscriptencsubscriptdecsubscriptdecL(W_enc,b_enc,W_dec,b_dec):=Ī£% _r=1^N\|W_decĻ(W_encx^r+b_enc)+b_% dec-x^r\|_2^2+F(W_enc,b_enc)+G(W_dec,b_% dec).L ( Wenc , benc , Wdec , bdec ) := ār = 1N ā„ Wdec Ļ ( Wenc xitalic_r + benc ) + bdec - xitalic_r ā„22 + F ( Wenc , benc ) + G ( Wdec , bdec ) . We summarise the convergence result as follows, for details see Section C.1. Theorem 3.1. If C.2 holds, then from any initialisation, the sequence of SAE parameters defined by Equation 3.1 monotonically decrease the loss āLL and every convergent subsequence converges to a critical point of āLL. Furthermore, if the sequence is bounded (as would be ensured by e.g. weight decay) then the sequence converges to a critical point of āLL, with a rate that can be characterised (if the KurdykaāÅojasiewicz exponent of āLL is known). Note 3.2. Theorem 3.1 (i.e., Theorem C.6) does not prove that our PAM-SGD method (see Algorithm 3.1 below) converges, as the theorem assumes that Equation 3.1a is solved exactly, whilst in Algorithm 3.1 it will be only approximated via SGD. However, it does give some indication that the PAM-SGD method will approach an approximation to a critical point of āLL. The optimal decoding for Equation 3.1b with weight decay G:=αā¢āWdecāF2+βā¢ābdecā22assignsubscriptsuperscriptnormsubscriptdec2superscriptsubscriptnormsubscriptdec22G:=α\|W_dec\|^2_F+β\|b_dec\|_2^2G := α ā„ Wdec ā„2F + β ā„ bdec ā„22 can still be found in closed form, see Theorem C.1. This gives the following novel method for training an SAE by solving Equation 3.1b exactly, which we call a proximal alternating method SGD (PAM-SGD) algorithm. Input: Initial SAE parameters Wenc0,benc0,Wdec0,bdec0superscriptsubscriptenc0superscriptsubscriptenc0superscriptsubscriptdec0superscriptsubscriptdec0W_enc^0,b_enc^0,W_dec^0,b_dec^0Wenc0 , benc0 , Wdec0 , bdec0, iterations tmā¢aā¢xsubscriptt_maxtitalic_m a x, quadratic cost parameters μenct,νenct,μdect,νdectt=0tmā¢aā¢xā1superscriptsubscriptsuperscriptsubscriptencsuperscriptsubscriptencsuperscriptsubscriptdecsuperscriptsubscriptdec0subscript1\ _enc^t, _enc^t, _dec^t, _% dec^t\_t=0^t_max-1 μencitalic_t , νencitalic_t , μdecitalic_t , νdecitalic_t t = 0titalic_m a x - 1, weight decay parameters α,βα,βα , β, activation Ļ, learning rate Ī·, batch size B, SGD steps M. Training data =xrr=1Nāānsuperscriptsubscriptsuperscript1superscriptāD=\x^r\_r=1^N ^nD = xitalic_r r = 1N ā blackboard_Rn. Output: Final SAE parameters Wenctmā¢aā¢x,benctmā¢aā¢x,Wdectmā¢aā¢x,bdectmā¢aā¢xsuperscriptsubscriptencsubscriptsuperscriptsubscriptencsubscriptsuperscriptsubscriptdecsubscriptsuperscriptsubscriptdecsubscriptW_enc^t_max,b_enc^t_max,W_dec^t_max,b_% dec^t_maxWencitalic_titalic_m a x , bencitalic_titalic_m a x , Wdecitalic_titalic_m a x , bdecitalic_titalic_m a x. 1 xĀÆā1Nā¢ār=1NxrāĀÆ1superscriptsubscript1superscript xā 1N _r=1^Nx^roverĀÆ start_ARG x end_ARG ā divide start_ARG 1 end_ARG start_ARG N end_ARG ār = 1N xitalic_r; 2 for t=00t=0t = 0 to tmā¢aā¢xā1subscript1t_max-1titalic_m a x - 1 do /* -------------------------------------- SGD Encoder update -------------------------------------- */ (Wenct+1,benct+1)āSGDā¢(Wenct,benct,μenct,νenct,Ī·,B,M)āsuperscriptsubscriptenc1superscriptsubscriptenc1SGDsuperscriptsubscriptencsuperscriptsubscriptencsuperscriptsubscriptencsuperscriptsubscriptenc(W_enc^t+1,b_enc^t+1)ā SGD(W_enc% ^t,b_enc^t, _enc^t, _enc^t,Ī·,B,M)( Wencitalic_t + 1 , bencitalic_t + 1 ) ā SGD ( Wencitalic_t , bencitalic_t , μencitalic_t , νencitalic_t , Ī· , B , M ) ; //Computes Equation 3.1a via M steps of SGD with learning rate Ī· and batch size B /* ---------------------------------- Optimal Decoder update ---------------------------------- */ 3 foreach xrāsuperscriptx^r _r ā D do 4 zt+1rāĻā¢(Wenct+1ā¢xr+benct+1)āsuperscriptsubscript1superscriptsubscriptenc1superscriptsuperscriptsubscriptenc1z_t+1^rāĻ(W_enc^t+1x^r+b_enc^t+1)zitalic_t + 1r ā Ļ ( Wencitalic_t + 1 xitalic_r + bencitalic_t + 1 ) ; 5 6 end foreach 7 zĀÆt+1ā1Nā¢ār=1Nzt+1rāsubscriptĀÆ11superscriptsubscript1superscriptsubscript1 z_t+1ā 1N _r=1^Nz_t+1^roverĀÆ start_ARG z end_ARGt + 1 ā divide start_ARG 1 end_ARG start_ARG N end_ARG ār = 1N zitalic_t + 1r; 8 for r=11r=1r = 1 to N do 9 Ļtrāzt+1rāN+β+νdectā¢zĀÆt+1āsuperscriptsubscriptsubscriptsuperscript1subscriptsuperscriptdecsubscriptĀÆ1 _t^rā z^r_t+1- NN+β+ν^t_dec % z_t+1Ļitalic_titalic_r ā zitalic_ritalic_t + 1 - divide start_ARG N end_ARG start_ARG N + β + νitalic_tdec end_ARG overĀÆ start_ARG z end_ARGt + 1; ĻtrāxrāνdectN+β+νdectā¢bdectāN+β+νdectā¢xĀÆāsuperscriptsubscriptitalic-ĻsuperscriptsubscriptsuperscriptdecsubscriptsuperscriptdecsuperscriptsubscriptdecsubscriptsuperscriptdecĀÆ _t^rā x^r- ν^t_decN+β+ν^t_% decb_dec^t- NN+β+ν^t_dec xĻitalic_titalic_r ā xitalic_r - divide start_ARG νitalic_tdec end_ARG start_ARG N + β + νitalic_tdec end_ARG bdecitalic_t - divide start_ARG N end_ARG start_ARG N + β + νitalic_tdec end_ARG overĀÆ start_ARG x end_ARG; 10 11 end for 12 (ĻtN+1,ĻtN+1)āνdectā¢1N+β+νdectā¢(Nā¢zĀÆt+1,Nā¢xĀÆā(N+β)ā¢bdect)āsuperscriptsubscript1superscriptsubscriptitalic-Ļ1superscriptsubscriptdec1superscriptsubscriptdecsubscriptĀÆ1ĀÆsubscriptsuperscriptdec( _t^N+1, _t^N+1)ā _dec^t 1N% +β+ _dec^t (N z_t+1,N x-(N+β)b^t_% dec )( Ļitalic_titalic_N + 1 , Ļitalic_titalic_N + 1 ) ā square-root start_ARG νdecitalic_t end_ARG divide start_ARG 1 end_ARG start_ARG N + β + νdecitalic_t end_ARG ( N overĀÆ start_ARG z end_ARGt + 1 , N overĀÆ start_ARG x end_ARG - ( N + β ) bitalic_tdec ) ; 13 (ĻtN+2,ĻtN+2)āβā¢1N+β+νdectā¢(Nā¢zĀÆt+1,Nā¢xĀÆ+νdectā¢bdect)āsuperscriptsubscript2superscriptsubscriptitalic-Ļ21superscriptsubscriptdecsubscriptĀÆ1ĀÆsubscriptsuperscriptdecsubscriptsuperscriptdec( _t^N+2, _t^N+2)ā β 1N+β+ _% dec^t(N z_t+1,N x+ν^t_decb^t_dec)( Ļitalic_titalic_N + 2 , Ļitalic_titalic_N + 2 ) ā square-root start_ARG β end_ARG divide start_ARG 1 end_ARG start_ARG N + β + νdecitalic_t end_ARG ( N overĀÆ start_ARG z end_ARGt + 1 , N overĀÆ start_ARG x end_ARG + νitalic_tdec bitalic_tdec ) ; ĪØtācatā¢(Ļtr)āsubscriptĪØcatsubscriptsuperscript _tā cat(Ļ^r_t)ĪØitalic_t ā cat ( Ļitalic_ritalic_t ) ; Φtācatā¢(Ļtr)āsubscriptΦcatsubscriptsuperscriptitalic-Ļ _tā cat(Ļ^r_t)Φitalic_t ā cat ( Ļitalic_ritalic_t ) ; //Concatenates the ĻtrsubscriptsuperscriptĻ^r_tĻitalic_ritalic_t and Ļtrsubscriptsuperscriptitalic-ĻĻ^r_tĻitalic_ritalic_t into a dĆ(N+2)2dĆ(N+2)d Ć ( N + 2 ) matrix and a nĆ(N+2)2nĆ(N+2)n Ć ( N + 2 ) matrix, respectively 14 Wdect+1ā(Φtμdectā¢Wdect0nĆd)ā¢(ĪØtμdectā¢Idαā¢Id)ā āsuperscriptsubscriptdec1matrixsubscriptΦsubscriptsuperscriptdecsubscriptsuperscriptdecsubscript0superscriptmatrixsubscriptĪØsubscriptsuperscriptdecsubscriptsubscriptā W_dec^t+1ā pmatrix _t& μ^t_dec% W^t_dec&0_nĆ d pmatrix pmatrix _t& % μ^t_decI_d& αI_d pmatrix Wdecitalic_t + 1 ā ( start_ARG start_ROW start_CELL Φitalic_t end_CELL start_CELL square-root start_ARG μitalic_tdec end_ARG Witalic_tdec end_CELL start_CELL 0n Ć d end_CELL end_ROW end_ARG ) ( start_ARG start_ROW start_CELL ĪØitalic_t end_CELL start_CELL square-root start_ARG μitalic_tdec end_ARG Iitalic_d end_CELL start_CELL square-root start_ARG α end_ARG Iitalic_d end_CELL end_ROW end_ARG )ā ; bdect+1āνdectN+β+νdectā¢bdect+N+β+νdectā¢(xĀÆāWdect+1ā¢zĀÆt+1)āsubscriptsuperscript1decsubscriptsuperscriptdecsubscriptsuperscriptdecsuperscriptsubscriptdecsubscriptsuperscriptdecĀÆsubscriptsuperscript1decsubscriptĀÆ1b^t+1_decā ν^t_decN+β+ν^t_% decb_dec^t+ NN+β+ν^t_dec( x-% W^t+1_dec z_t+1)bitalic_t + 1dec ā divide start_ARG νitalic_tdec end_ARG start_ARG N + β + νitalic_tdec end_ARG bdecitalic_t + divide start_ARG N end_ARG start_ARG N + β + νitalic_tdec end_ARG ( overĀÆ start_ARG x end_ARG - Witalic_t + 1dec overĀÆ start_ARG z end_ARGt + 1 ) ; //Optimal Wdect+1subscriptsuperscript1decW^t+1_decWitalic_t + 1dec and bdect+1subscriptsuperscript1decb^t+1_decbitalic_t + 1dec, see Theorem C.1 15 16 end for Algorithm 3.1 PAM-SGD method (with optional weight decay) for learning an SAE. 3.2 Sample-efficient sparse coding for MNIST and LLMs: PAM-SGD vs. SGD We performed two experiments comparing the benefits of our PAM-SGD method (Algorithm 3.1) vs. standard SGD (using Adam for SGD in both cases) for training SAEs: (i) on simple visual domains, using the MNIST dataset, and (i) on high-dimensional LLM activations, using Google DeepMindās Gemma-2-2B. Figure 3: Training and test loss curves at different data sizes for MNIST, with ReLU activation. The chart highlights PAM-SGDās superior sample efficiency and convergence speed. For MNIST we used n=282superscript282n=28^2n = 282 input dimensions and d=256256d=256d = 256 hidden dimensions. Our LLM experiments used activations from the 12th layer of Gemma-2-2B, with n=23042304n=2304n = 2304 and a highly overcomplete hidden dimension d=40964096d=4096d = 4096. Experimental settings are described in Appendix D, and additional figures and ablation studies can be found in Appendix E. PAM-SGD generalised better than SGD in low-data regimes. (Figures 3, 4, 9, 24, 25, 26, 29, 28 and 27) On MNIST, PAM-SGD consistently (using both ReLU and TopK) substantially outperformed SGD in test loss, especially when trained on just 1%ā25% of the MNIST training data. In the LLM experiments, PAM-SGD again outperformed SGD when using ReLU activations, especially for low data. However, PAM-SGD became unstable when TopK was used unless K was large; even for K=320320K=320K = 320 and K=640640K=640K = 640 it underperformed SGD, slightly for low (and high) data and substantially for medium data. Figure 4: Training and test loss curves at different data sizes for Gemma-2-2B, with ReLU activation. PAM-SGD again has a huge advantage at low data, and remains superior throughout. PAM-SGD was faster, more accurate, and more interpretable on MNIST. (Figures 12, 14, 10, 13, 15 and 11) Reconstruction comparisons over training epochs show that PAM-SGD reconstructions were cleaner and converged faster than those from SGD. This was particularly evident when tracking digit reconstructions over time; PAM-SGDās exhibited sharper edges and more localised structure by early training. By the end of training, both methods produced visually accurate reconstructions, but PAM-SGDās showed slightly better fidelity and smoothness, and more closely resembled the originals. Finally, visualizing encoder and decoder filters in the TopK case reveals that both SGD and PAM-SGD learned edge- and stroke-like patterns, but PAM-SGDās filters were sharper and better structured. Summary and practical implications. PAM-SGD demonstrated clear advantages over SGD on MNIST in terms of generalisation, convergence speed, reconstruction quality, and (using TopK) visual interpretability, particularly in low-data regimes. Even in a much more challenging real-world LLM setting, PAM-SGD with ReLU still substantially outperformed in low data, and improved activation sparsity by about 15%. However, issues arose for TopK: small K led to rapidly diverging test loss, and for larger K PAM-SGD still underperformed SGD (though only slightly for low data). In summary, these results suggest that PAM-SGD is a powerful tool for learning overcomplete, sparse representations from visual data and LLM activations in low-data regimes, provided that the sparsity can adapt to the data. This insight is important in downstream applications where data may be scarce. 4 Conclusions and limitations In this work, we have sought to apply a spline theoretical lens to SAEs, to gain insight into how, why, and whether SAEs work. Given the current prominence of SAEs in mechanistic interpretability, and the societal importance of interpreting AI systems, we hope that the development of SAE theory (and our small contribution to it) can help develop more efficient, fairer, and reliable AI systems. Building on the piecewise affine spline nature of SAEs, we characterised the spline geometry of TopK SAEs as exactly the KthsuperscriptthK^thKth-order power diagrams, opening the door to directly incorporating geometric constraints into SAEs. We linked SAEs with traditional ML, showing how k-means can be viewed as a special kind of SAE, and how SAEs sacrifice accuracy for interpretability vs. the optimal piecewise affine autoencoder, which we showed to be a k-means-esque clustering with a local PCA correction. Finally, we developed a new proximal alternating training method (PAM-SGD) for SAEs, with both solid theoretical foundations and promising empirical results, particularly in sample efficiency and activation sparsity for LLMs, two pain points for mechanistic interpretability. PAM-SGDās separate updating of encoding and decoding dovetails well with the spline theory perspective of the encoding shaping the SAEās spline geometry vs. the decoding driving the SAEās autoencoding accuracy. This work is the beginning of a longer theoretical exploration, and is thus limited in ways we hope to address in future work. Our characterisation of the spline geometry of SAEs is currently limited to TopK SAEs; future work will seek to extend this, and explore more explicitly the incorporation of geometry into SAE training, perhaps giving insight into how to tailor an SAE architecture for a given task. Our bridge between SAEs and PCA-based autoencoders sets aside the matter (see 2.7) of shared decoding vectors. Future work will study the optimal autoencoding in that setting, and related results in the superposition hypothesis setting. Finally, PAM-SGD makes approximations which break assumptions of the theory, and had some empirical limitations. Future work will seek to understand more deeply the pros and cons of PAM-SGD, and incorporate the SGD step into the theory. Acknowledgments and Disclosure of Funding This collaboration did not form in the typical academic way, meeting at a conference or university. We instead thank the Machine Learning Street Talk (MLST) team, especially Tim Scarfe, for enabling all the authors to have met through the MLST Discord server. And we thank all the MLST Discord users involved in the discussion on āLearning in high dimension always amounts to extrapolationā, which set all this in motion. JB received financial support from start-up funds at the University of Birmingham. BMR received financial support from Taighde Ćireann ā Research Ireland under Grant number [12/RC/2289_P2]. We declare no conflicts of interest. References Ash & Bolker (1986) Ash, P. F. and Bolker, E. D. Generalized Dirichlet tessellations. Geometriae Dedicata, 20(2):209ā243, Apr 1986. ISSN 1572-9168. doi: 10.1007/BF00164401. URL https://doi.org/10.1007/BF00164401. Attouch et al. (2010) Attouch, H., Bolte, J., Redont, P., and Soubeyran, A. Proximal alternating minimization and projection methods for nonconvex problems: An approach based on the Kurdyka-Åojasiewicz inequality. Mathematics of operations research, 35(2):438ā457, 2010. Balestriero & Baraniuk (2018) Balestriero, R. and Baraniuk, R. A spline theory of deep learning. In Dy, J. and Krause, A. (eds.), Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, p. 374ā383. PMLR, 10ā15 Jul 2018. URL https://proceedings.mlr.press/v80/balestriero18b.html. Bennett et al. (2009) Bennett, C., Miller, M., and Wolford, G. Neural correlates of interspecies perspective taking in the post-mortem atlantic salmon: an argument for multiple comparisons correction. NeuroImage, 47:S125, 2009. ISSN 1053-8119. doi: https://doi.org/10.1016/S1053-8119(09)71202-9. URL https://w.sciencedirect.com/science/article/pii/S1053811909712029. Organization for Human Brain Mapping 2009 Annual Meeting. Bolte et al. (2007) Bolte, J., Daniilidis, A., and Lewis, A. The Åojasiewicz Inequality for Nonsmooth Subanalytic Functions with Applications to Subgradient Dynamical Systems. SIAM Journal on Optimization, 17(4):1205ā1223, 2007. doi: 10.1137/050644641. Bricken et al. (2023) Bricken, T., Templeton, A., Batson, J., Chen, B., Jermyn, A., Conerly, T., Turner, N., Anil, C., Denison, C., Askell, A., Lasenby, R., Wu, Y., Kravec, S., Schiefer, N., Maxwell, T., Joseph, N., Hatfield-Dodds, Z., Tamkin, A., Nguyen, K., McLean, B., Burke, J. E., Hume, T., Carter, S., Henighan, T., and Olah, C. Towards monosemanticity: Decomposing language models with dictionary learning. Transformer Circuits Thread, 2023. https://transformer-circuits.pub/2023/monosemantic-features/index.html. Elhage et al. (2022) Elhage, N., Hume, T., Olsson, C., Schiefer, N., Henighan, T., Kravec, S., Hatfield-Dodds, Z., Lasenby, R., Drain, D., Chen, C., et al. Toy models of superposition. arXiv preprint arXiv:2209.10652, 2022. Gao et al. (2025) Gao, L., la Tour, T. D., Tillman, H., Goh, G., Troll, R., Radford, A., Sutskever, I., Leike, J., and Wu, J. Scaling and evaluating sparse autoencoders. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=tcsZt9ZNKD. Heap et al. (2025) Heap, T., Lawson, T., Farnik, L., and Aitchison, L. Sparse autoencoders can interpret randomly initialized transformers, 2025. URL https://arxiv.org/abs/2501.17727. Hindupur et al. (2025) Hindupur, S. S. R., Lubana, E. S., Fel, T., and Ba, D. Projecting assumptions: The duality between sparse autoencoders and concept geometry, 2025. URL https://arxiv.org/abs/2503.01822. Huben et al. (2024) Huben, R., Cunningham, H., Smith, L. R., Ewart, A., and Sharkey, L. Sparse autoencoders find highly interpretable features in language models. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=F76bwRSLeK. Humayun et al. (2024) Humayun, A. I., Balestriero, R., and Baraniuk, R. Deep networks always grok and here is why. In High-dimensional Learning Dynamics 2024: The Emergence of Structure and Reasoning, 2024. URL https://openreview.net/forum?id=NpufNsg1FP. Leask et al. (2025) Leask, P., Bussmann, B., Pearce, M., Bloom, J., Tigges, C., Moubayed, N. A., Sharkey, L., and Nanda, N. Sparse autoencoders do not find canonical units of analysis, 2025. URL https://arxiv.org/abs/2502.04878. Li & Pong (2017) Li, G. and Pong, T. K. Calculus of the Exponent of KurdykaāÅojasiewicz Inequality and Its Applications to Linear Convergence of First-Order Methods. Foundations of Computational Mathematics, 18(5):1199ā1232, aug 2017. doi: 10.1007/s10208-017-9366-8. Åojasiewicz (1964) Åojasiewicz, S. Triangulation of semi-analytic sets. Annali della Scuola Normale Superiore di Pisa-Classe di Scienze, 18(4):449ā474, 1964. Makhzani & Frey (2014) Makhzani, A. and Frey, B. k-sparse autoencoders, 2014. URL https://arxiv.org/abs/1312.5663. Ng (2011) Ng, A. Sparse autoencoder. CS294A Lecture notes, 72(2011):1ā19, 2011. Olah et al. (2017) Olah, C., Mordvintsev, A., and Schubert, L. Feature visualization. Distill, 2(11):e7, 2017. Olshausen & Field (1996) Olshausen, B. A. and Field, D. J. Emergence of simple-cell receptive field properties by learning a sparse code for natural images. Nature, 381(6583):607ā609, 1996. Power et al. (2022) Power, A., Burda, Y., Edwards, H., Babuschkin, I., and Misra, V. Grokking: Generalization beyond overfitting on small algorithmic datasets, 2022. URL https://arxiv.org/abs/2201.02177. Rajamanoharan et al. (2024) Rajamanoharan, S., Lieberum, T., Sonnerat, N., Conmy, A., Varma, V., KramĆ”r, J., and Nanda, N. Jumping ahead: Improving reconstruction fidelity with JumpReLU sparse autoencoders, 2024. URL https://arxiv.org/abs/2407.14435. Smith et al. (2025) Smith, L., Rajamanoharan, S., Conmy, A., McDougall, C., Kramar, J., Lieberum, T., Shah, R., and Nanda, N. Negative Results for SAEs On Downstream Tasks and Deprioritising SAE Research (GDM Mech Interp Team Progress Update #2), Mar 2025. URL https://w.alignmentforum.org/posts/4uXCAJNuPKtKBsi28/sae-progress-update-2-draft. Steinhaus (1957) Steinhaus, H. Sur la division des corps matĆ©riels en parties. Bull. Acad. Pol. Sci., Cl. I, 4:801ā804, 1957. ISSN 0001-4095. Templeton et al. (2024) Templeton, A., Conerly, T., Marcus, J., Lindsey, J., Bricken, T., Chen, B., Pearce, A., Citro, C., Ameisen, E., Jones, A., Cunningham, H., Turner, N. L., McDougall, C., MacDiarmid, M., Freeman, C. D., Sumers, T. R., Rees, E., Batson, J., Jermyn, A., Carter, S., Olah, C., and Henighan, T. Scaling monosemanticity: Extracting interpretable features from Claude 3 Sonnet. Transformer Circuits Thread, 2024. URL https://transformer-circuits.pub/2024/scaling-monosemanticity/index.html. Appendix A Visualisations of Voronoi and power diagrams A.1 Spatial Partitioning Methods: From Voronoi to Power Diagrams This experiment explores the theoretical connections between different spatial partitioning methods. Starting with standard Voronoi diagrams that divide the plane based on proximity to generator points, we demonstrate how they relate to nearest-neighbor classification (k=11k=1k = 1), centroidal clustering (k-means), and finally to power diagrams which introduce weights to Voronoi cells. These relationships reveal that power diagrams emerge as a generalization of Voronoi diagrams, offering additional flexibility through weighted distance metrics and enabling richer geometric representations of data. Figure 5: Spatial Partitioning Methods (a) Standard Voronoi diagram where space is partitioned based on the nearest generator point using Euclidean distance; (b) Nearest-neighbor (k=11k=1k = 1) classification showing how Voronoi cells define decision boundaries for point classification (c) k-means clustering with k=33k=3k = 3 demonstrating how cluster centroids generate Voronoi cells that define cluster boundaries (d) Power diagram (weighted Voronoi) where each generator has an associated weight, creating curved boundaries between regions. Power diagrams generalise Voronoi diagrams and provide additional flexibility for modeling spatial relationships. (a) (b) Figure 6: Progressive Generalization of Voronoi Diagrams. Comparison showing (left) standard Voronoi diagram, (center) first-order power diagram with linear distance weighting, and (right) second-order power diagram. This progression demonstrates how higher-order power diagrams can capture more sophisticated spatial relationships. A.2 3D Voronoi diagrams to 2D power diagrams There is a neat relationship between power diagrams and projections of Voronoi diagrams, observed in Ash & Bolker (1986). Suppose that we consider a Vononoi diagram in n+11n+1n + 1 dimensions with cells defined by centroids (μi,ζi)i=1kāān+1superscriptsubscriptsubscriptsubscript1superscriptā1\( _i, _i)\_i=1^k ^n+1 ( μitalic_i , ζitalic_i ) i = 1k ā blackboard_Rn + 1, i.e. the ithsuperscriptthi^thith cell is defined to be Ci:=(x,z)āān+1:ā(x,z)ā(μi,ζi)ā22<ā(x,z)ā(μj,ζj)ā22⢠for all ā¢jā i.assignsubscriptconditional-setsuperscriptā1superscriptsubscriptnormsubscriptsubscript22superscriptsubscriptnormsubscriptsubscript22 for all C_i:=\(x,z) ^n+1:\|(x,z)-( _i, _i)\|_2^2<\|(x,z% )-( _j, _j)\|_2^2 for all jā i\.Citalic_i := ( x , z ) ā blackboard_Rn + 1 : ā„ ( x , z ) - ( μitalic_i , ζitalic_i ) ā„22 < ā„ ( x , z ) - ( μitalic_j , ζitalic_j ) ā„22 for all j ā i . Now suppose that we project this diagram into n-dimensional space, for example defining C^i:=xāān:(x,0)āCi=xāān:āxāμiā22+ζi2<āxāμjā22+ζj2⢠for all ā¢jā i.assignsubscript^conditional-setsuperscriptā0subscriptconditional-setsuperscriptāsuperscriptsubscriptnormsubscript22superscriptsubscript2superscriptsubscriptnormsubscript22superscriptsubscript2 for all C_i:=\x ^n:(x,0)ā C_i\=\x ^n:\|x-% _i\|_2^2+ _i^2<\|x- _j\|_2^2+ _j^2 for % all jā i\.over start_ARG C end_ARGi := x ā blackboard_Rn : ( x , 0 ) ā Citalic_i = x ā blackboard_Rn : ā„ x - μitalic_i ā„22 + ζitalic_i2 < ā„ x - μitalic_j ā„22 + ζitalic_j2 for all j ā i . This is precisely a power diagram with centroids μii=1kāānsuperscriptsubscriptsubscript1superscriptā\ _i\_i=1^k ^n μitalic_i i = 1k ā blackboard_Rn (the projections of the Voronoi centroids) and weights αi=āζi2subscriptsuperscriptsubscript2 _i=- _i^2αitalic_i = - ζitalic_i2. Conversely, for any power diagram defined by centroids μii=1kāānsuperscriptsubscriptsubscript1superscriptā\ _i\_i=1^k ^n μitalic_i i = 1k ā blackboard_Rn and weights αii=1kāāsuperscriptsubscriptsubscript1ā\ _i\_i=1^k αitalic_i i = 1k ā blackboard_R, we can subtract a constant from the αisubscript _iαitalic_i to get an equivalent power diagram with all non-positive weights, and therefore compute ζisubscript _iζitalic_i such that the corresponding Voronoi diagram with centroids (μi,ζi)i=1kāān+1superscriptsubscriptsubscriptsubscript1superscriptā1\( _i, _i)\_i=1^k ^n+1 ( μitalic_i , ζitalic_i ) i = 1k ā blackboard_Rn + 1 projects to that power diagram. We visualise this mathematical relationship between 3D Voronoi diagrams and 2D power diagrams in Figure 7. (a) (b) (c) (d) Figure 7: Projection of 3D Voronoi diagrams onto 2D power diagrams. The resulting power cells demonstrate the preservation of topological structure through projection Appendix B Proofs in Section 2 Theorem B.1. Both Ī©SJumpReLUsuperscriptsubscriptĪ©JumpReLU _S^JumpReLUĪ©italic_Sroman_JumpReLU and Ī©STopKsuperscriptsubscriptĪ©TopK _S^TopKĪ©italic_Sroman_TopK can be written in the form xāān:Hā¢x>c,conditional-setsuperscriptā\x ^n:Hx>c\, x ā blackboard_Rn : H x > c , where in the in the former H=(PSāPSc)ā¢WencsubscriptsubscriptsuperscriptsubscriptencH=(P_S-P_S^c)W_encH = ( Pitalic_S - Pitalic_Sitalic_c ) Wenc and c=(PSāPSc)ā¢(Ļā¢ābenc)subscriptsubscriptsuperscript1subscriptencc=(P_S-P_S^c)( 1-b_enc)c = ( Pitalic_S - Pitalic_Sitalic_c ) ( Ļ 1 - benc ), and in the latter H=MSā¢Weā¢nā¢csubscriptsubscriptH=M_SW_encH = Mitalic_S Witalic_e n c where MSāāKā¢(dāK)ĆdsubscriptsuperscriptāM_S ^K(d-K)Ć dMitalic_S ā blackboard_RK ( d - K ) Ć d has (i,j)(i,j)( i , j )-th row (with iāSiā Si ā S and jāSjā Sj ā S) with a 1111 in column i, a ā11-1- 1 in column j, and 00 otherwise, and c=āMSā¢bencsubscriptsubscriptencc=-M_Sb_encc = - Mitalic_S benc. These regions are therefore convex, and are the interiors of the convex polyhedra xāān:Hā¢xā„cconditional-setsuperscriptā\x ^n:Hxā„ c\ x ā blackboard_Rn : H x ā„ c (unless WencsubscriptencW_encWenc has a zero row, in the JumpReLU case, or has two identical rows, in the TopK case). Proof of Theorem B.1. The forms of H and c can be immediately derived by rearranging the inequalities in the definitions of Ī©SJumpReLUsubscriptsuperscriptĪ©JumpReLU ^JumpReLU_SĪ©roman_JumpReLUitalic_S and Ī©STopKsuperscriptsubscriptĪ©TopK _S^TopKĪ©italic_Sroman_TopK. Convexity immediately follows, since if Hā¢x1>csubscript1Hx_1>cH x1 > c and Hā¢x2>csubscript2Hx_2>cH x2 > c, then for all tā[0,1]01tā[0,1]t ā [ 0 , 1 ] Hā¢(tā¢x1+(1āt)ā¢x2)=tā¢Hā¢x1+(1āt)ā¢Hā¢x2>tā¢c+(1āt)ā¢c=c.subscript11subscript2subscript11subscript21H(tx_1+(1-t)x_2)=tHx_1+(1-t)Hx_2>tc+(1-t)c=c.H ( t x1 + ( 1 - t ) x2 ) = t H x1 + ( 1 - t ) H x2 > t c + ( 1 - t ) c = c . Finally, suppose that xāānsuperscriptāx ^nx ā blackboard_Rn lies in the interior of x:Hā¢xā„cconditional-set\x:Hxā„ c\ x : H x ā„ c . That is, there exists ε>00 >0ε > 0 such thatr for all Ī·āānsuperscriptāĪ· ^nĪ· ā blackboard_Rn with āĪ·ā2<εsubscriptnorm2\|Ī·\|_2< ā„ Ī· ā„2 < ε, Hā¢(x+Ī·)ā„cH(x+Ī·)ā„ cH ( x + Ī· ) ā„ c. We wish to show that Hā¢x>cHx>cH x > c. Suppose not, then for some j, (Hā¢x)j=cjsubscriptsubscript(Hx)_j=c_j( H x )j = citalic_j. Therefore for all Ī·āānsuperscriptāĪ· ^nĪ· ā blackboard_Rn with āĪ·ā2<εsubscriptnorm2\|Ī·\|_2< ā„ Ī· ā„2 < ε, (Hā¢Ī·)jā„0subscript0(HĪ·)_jā„ 0( H Ī· )j ā„ 0, and therefore for all Ī·āānsuperscriptāĪ· ^nĪ· ā blackboard_Rn, (Hā¢Ī·)j=0subscript0(HĪ·)_j=0( H Ī· )j = 0. This is possible if and only if the jthsuperscriptthj^thjth row of H is all zeroes. In the JumpReLU case, the jthsuperscriptthj^thjth row of H is ±plus-or-minus± the jthsuperscriptthj^thjth row of WencsubscriptencW_encWenc (depending on if jāSjā Sj ā S or jāSjā Sj ā S) and hence is zero if and only if the the jthsuperscriptthj^thjth row of WencsubscriptencW_encWenc is zero. In the TopK case, the (i,j)thsuperscriptth(i,j)^th( i , j )th row of H is the difference between the ithsuperscriptthi^thith and jthsuperscriptthj^thjth rows of WencsubscriptencW_encWenc, which is zero if and only if those rows are identical. ā Theorem B.2. Let μii=1kāānsuperscriptsubscriptsubscript1superscriptā\ _i\_i=1^k ^n μitalic_i i = 1k ā blackboard_Rn and αii=1kāāsuperscriptsubscriptsubscript1ā\ _i\_i=1^k αitalic_i i = 1k ā blackboard_R define a KthsuperscriptthK^thKth-order power diagram CSsubscript\C_S\ Citalic_S for S the K-subsets of 1,ā¦,k1ā¦\1,...,k\ 1 , ⦠, k . Then the power diagram given by νS:=1Kā¢āiāSμiassignsubscript1subscriptsubscript _S:= 1K _iā S _iνitalic_S := divide start_ARG 1 end_ARG start_ARG K end_ARG āi ā S μitalic_i and βS:=ā1Kā¢āiāSμiā22ā1Kā¢āiāSāμiā22+1Kā¢āiāSαi,assignsubscriptsuperscriptsubscriptnorm1subscriptsubscript221subscriptsuperscriptsubscriptnormsubscript221subscriptsubscript _S:= \| 1K _iā S _i \|_2^2% - 1K _iā S\| _i\|_2^2+ 1K _iā S _i,βitalic_S := ā„ divide start_ARG 1 end_ARG start_ARG K end_ARG āi ā S μitalic_i ā„22 - divide start_ARG 1 end_ARG start_ARG K end_ARG āi ā S ℠μitalic_i ā„22 + divide start_ARG 1 end_ARG start_ARG K end_ARG āi ā S αitalic_i , (B.1) i.e., RS:=x:āxāνSā22āβS<āxāνTā22āβT⢠for all Tā S, T a K-subset of 1,ā¦,k,assignsubscriptconditional-setsubscriptsuperscriptnormsubscript22subscriptsubscriptsuperscriptnormsubscript22subscript for all Tā S, T a K-subset of 1,ā¦,kR_S:=\x:\|x- _S\|^2_2- _S<\|x- _T\|^2_2- _T% for all $Tā S$, $T$ a $K$-subset of $\1,...,k\$\,Ritalic_S := x : ā„ x - νitalic_S ā„22 - βitalic_S < ā„ x - νitalic_T ā„22 - βitalic_T for all T ā S , T a K -subset of 1 , ⦠, k , satisfies RS=CSsubscriptsubscriptR_S=C_SRitalic_S = Citalic_S for all S. Proof of Theorem B.2. Define the power functions Piā¢(x):=ā2ā¢Ī¼iTā¢x+āμiā22āαiassignsubscript2superscriptsubscriptsubscriptsuperscriptnormsubscript22subscript P_i(x):=-2 _i^Tx+\| _i\|^2_2- _iPitalic_i ( x ) := - 2 μitalic_iitalic_T x + ℠μitalic_i ā„22 - αitalic_i and QSā¢(x):=ā2ā¢Ī½STā¢x+āνSā22āβS.assignsubscript2superscriptsubscriptsubscriptsuperscriptnormsubscript22subscript Q_S(x):=-2 _S^Tx+\| _S\|^2_2- _S.Qitalic_S ( x ) := - 2 νitalic_Sitalic_T x + ℠νitalic_S ā„22 - βitalic_S . Then by subtracting āxā22superscriptsubscriptnorm22\|x\|_2^2ā„ x ā„22 from both sides of the defining inequalities we get: CSsubscript C_SCitalic_S =x:Piā¢(x)<Pjā¢(x)⢠for all iāS, and jāSc,absentconditional-setsubscriptsubscript for all iāS, and jāSc =\x:P_i(x)<P_j(x) for all $iā S$, and $jā S^c$\,= x : Pitalic_i ( x ) < Pitalic_j ( x ) for all i ā S , and j ā Sitalic_c , RSsubscript R_SRitalic_S =x:QSā¢(x)<QTā¢(x)⢠for all Tā S, T a K-subset of 1,ā¦,k.absentconditional-setsubscriptsubscript for all Tā S, T a K-subset of 1,ā¦,k =\x:Q_S(x)<Q_T(x) for all $Tā S$, $T$ a $K$-subset % of $\1,...,k\$\.= x : Qitalic_S ( x ) < Qitalic_T ( x ) for all T ā S , T a K -subset of 1 , ⦠, k . It is straightforward to check that QSā¢(x)=1Kā¢āiāSPiā¢(x),subscript1subscriptsubscriptQ_S(x)= 1K _iā SP_i(x),Qitalic_S ( x ) = divide start_ARG 1 end_ARG start_ARG K end_ARG āi ā S Pitalic_i ( x ) , and hence xāRS⢠if and only if ā¢āiāSPiā¢(x)<āiāTPiā¢(x)⢠for all Tā S a K-subset.subscript if and only if subscriptsubscriptsubscriptsubscript for all Tā S a K-subsetxā R_S if and only if _iā SP_i(x)< _iā TP_i(x)% for all $Tā S$ a $K$-subset.x ā Ritalic_S if and only if āi ā S Pitalic_i ( x ) < āi ā T Pitalic_i ( x ) for all T ā S a K -subset . Suppose that xāRSsubscriptxā R_Sx ā Ritalic_S, and let iāSiā Si ā S and jāScsuperscriptjā S^cj ā Sitalic_c. Let T=(Sāi)āŖjT=(S \i\)āŖ\j\T = ( S ā i ) āŖ j . This is a K-subset distinct from S, and so Piā¢(x)+ākāSāiPkā¢(x)=āiāSPiā¢(x)<āiāTPiā¢(x)=Pjā¢(x)+ākāSāiPkā¢(x)subscriptsubscriptsubscriptsubscriptsubscriptsubscriptsubscriptsubscriptsubscriptsubscriptP_i(x)+ _kā S \i\P_k(x)= _iā SP_i(x)< _iā T% P_i(x)=P_j(x)+ _kā S \i\P_k(x)Pitalic_i ( x ) + āk ā S ā i Pitalic_k ( x ) = āi ā S Pitalic_i ( x ) < āi ā T Pitalic_i ( x ) = Pitalic_j ( x ) + āk ā S ā i Pitalic_k ( x ) and hence Piā¢(x)<Pjā¢(x)subscriptsubscriptP_i(x)<P_j(x)Pitalic_i ( x ) < Pitalic_j ( x ). Hence xāCSsubscriptxā C_Sx ā Citalic_S. Now suppose that xāCSsubscriptxā C_Sx ā Citalic_S and let Tā STā ST ā S be a K-subset. Then āiāSPiā¢(x)=āiāSā©TPiā¢(x)+āiāSāTPiā¢(x)<āiāSā©TPiā¢(x)+ājāTāSPjā¢(x)=āiāTPiā¢(x)subscriptsubscriptsubscriptsubscriptsubscriptsubscriptsubscriptsubscriptsubscriptsubscriptsubscriptsubscript _iā SP_i(x)= _iā Sā© TP_i(x)+ _iā S TP_i% (x)< _iā Sā© TP_i(x)+ _jā T SP_j(x)= _iā T% P_i(x)āi ā S Pitalic_i ( x ) = āi ā S ā© T Pitalic_i ( x ) + āi ā S ā T Pitalic_i ( x ) < āi ā S ā© T Pitalic_i ( x ) + āj ā T ā S Pitalic_j ( x ) = āi ā T Pitalic_i ( x ) where we have used that |SāT|=|TāS||S T|=|T S|| S ā T | = | T ā S | and for each iāSāTiā S Ti ā S ā T and jāTāSjā T Sj ā T ā S, Piā¢(x)<Pjā¢(x)subscriptsubscriptP_i(x)<P_j(x)Pitalic_i ( x ) < Pitalic_j ( x ). Hence xāRSsubscriptxā R_Sx ā Ritalic_S. ā Proof of 2.2. Identify ā2superscriptā2R^2blackboard_R2 with āCblackboard_C. Then we would need μii=14āāsuperscriptsubscriptsubscript14ā\ _i\_i=1^4 μitalic_i i = 14 ā blackboard_C such that ν12=1subscript121 _12=1ν12 = 1 =12ā¢Ī¼1+12ā¢Ī¼2,absent12subscript112subscript2 = 12 _1+ 12 _2,= divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ1 + divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ2 , ν13=eĻā¢i/3subscript13superscript3 _13=e^Ļ i/3ν13 = eitalic_Ļ i / 3 =12ā¢Ī¼1+12ā¢Ī¼3,absent12subscript112subscript3 = 12 _1+ 12 _3,= divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ1 + divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ3 , ν14=e2ā¢Ļā¢i/3subscript14superscript23 _14=e^2Ļ i/3ν14 = e2 Ļ i / 3 =12ā¢Ī¼1+12ā¢Ī¼4,absent12subscript112subscript4 = 12 _1+ 12 _4,= divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ1 + divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ4 , ν23=ā1subscript231 _23=-1ν23 = - 1 =12ā¢Ī¼2+12ā¢Ī¼3,absent12subscript212subscript3 = 12 _2+ 12 _3,= divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ2 + divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ3 , ν24=āeĻā¢i/3subscript24superscript3 _24=-e^Ļ i/3ν24 = - eitalic_Ļ i / 3 =12ā¢Ī¼2+12ā¢Ī¼4,absent12subscript212subscript4 = 12 _2+ 12 _4,= divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ2 + divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ4 , ν34=āe2ā¢Ļā¢i/3subscript34superscript23 _34=-e^2Ļ i/3ν34 = - e2 Ļ i / 3 =12ā¢Ī¼3+12ā¢Ī¼4.absent12subscript312subscript4 = 12 _3+ 12 _4.= divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ3 + divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ4 . Hence μ2āμ4=(12ā¢Ī¼1+12ā¢Ī¼2)+(12ā¢Ī¼2+12ā¢Ī¼3)ā(12ā¢Ī¼1+12ā¢Ī¼4)ā(12ā¢Ī¼3+12ā¢Ī¼4)=1+(ā1)āe2ā¢Ļā¢i/3ā(āe2ā¢Ļā¢i/3)=0subscript2subscript412subscript112subscript212subscript212subscript312subscript112subscript412subscript312subscript411superscript23superscript230 _2- _4=( 12 _1+ 12 _2)+( 12 _2+% 12 _3)-( 12 _1+ 12 _4)-( 12 _3% + 12 _4)=1+(-1)-e^2Ļ i/3-(-e^2Ļ i/3)=0μ2 - μ4 = ( divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ1 + divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ2 ) + ( divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ2 + divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ3 ) - ( divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ1 + divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ4 ) - ( divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ3 + divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ4 ) = 1 + ( - 1 ) - e2 Ļ i / 3 - ( - e2 Ļ i / 3 ) = 0, so μ2=μ4subscript2subscript4 _2= _4μ2 = μ4 and hence 1=12ā¢Ī¼1+12ā¢Ī¼2=12ā¢Ī¼1+12ā¢Ī¼4=e2ā¢Ļā¢i/3112subscript112subscript212subscript112subscript4superscript231= 12 _1+ 12 _2= 12 _1+ 12 _4=% e^2Ļ i/31 = divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ1 + divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ2 = divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ1 + divide start_ARG 1 end_ARG start_ARG 2 end_ARG μ4 = e2 Ļ i / 3, a contradiction. ā Proof of Theorem 2.3. For each S, Ī©STopKsubscriptsuperscriptĪ©TopK ^TopK_SĪ©roman_TopKitalic_S is given by Ī©STopK=xāān:eiTā¢Weā¢nā¢cā¢x+(beā¢nā¢c)i>ejTā¢Weā¢nā¢cā¢x+(beā¢nā¢c)j⢠for all iāS and jāSc.subscriptsuperscriptĪ©TopKconditional-setsuperscriptāsuperscriptsubscriptsubscriptsubscriptsubscriptsuperscriptsubscriptsubscriptsubscriptsubscript for all iāS and jāSc ^TopK_S=\x ^n:e_i^TW_encx+(b_% enc)_i>e_j^TW_encx+(b_enc)_j for all $iā S$ and $jā S^% c$\.Ī©roman_TopKitalic_S = x ā blackboard_Rn : eitalic_iitalic_T Witalic_e n c x + ( bitalic_e n c )i > eitalic_jitalic_T Witalic_e n c x + ( bitalic_e n c )j for all i ā S and j ā Sitalic_c . We can rewrite the definition of CSsubscriptC_SCitalic_S in a KthsuperscriptthK^thKth-order power diagram as CS:=xāān:μiTā¢x+12ā¢Ī±iā12ā¢āμiā22>μjTā¢x+12ā¢Ī±jā12ā¢āμjā22⢠for all iāS and jāSc.assignsubscriptconditional-setsuperscriptāsuperscriptsubscript12subscript12superscriptsubscriptnormsubscript22superscriptsubscript12subscript12superscriptsubscriptnormsubscript22 for all iāS and jāScC_S:=\x ^n: _i^Tx+ 12 _i- 12\|% _i\|_2^2> _j^Tx+ 12 _j- 12\| _j\|_2% ^2 for all $iā S$ and $jā S^c$\.Citalic_S := x ā blackboard_Rn : μitalic_iitalic_T x + divide start_ARG 1 end_ARG start_ARG 2 end_ARG αitalic_i - divide start_ARG 1 end_ARG start_ARG 2 end_ARG ℠μitalic_i ā„22 > μitalic_jitalic_T x + divide start_ARG 1 end_ARG start_ARG 2 end_ARG αitalic_j - divide start_ARG 1 end_ARG start_ARG 2 end_ARG ℠μitalic_j ā„22 for all i ā S and j ā Sitalic_c . It follows that Ī©STopK=CSsubscriptsuperscriptĪ©TopKsubscript ^TopK_S=C_SĪ©roman_TopKitalic_S = Citalic_S if for all ā ā eāTā¢Weā¢nā¢c=μāTsubscriptsuperscriptāsubscriptsuperscriptsubscriptā e^T_ W_enc= _ ^Teitalic_Troman_ā Witalic_e n c = μroman_āitalic_T and (beā¢nā¢c)ā=12ā¢Ī±āā12ā¢āμāā22,subscriptsubscriptā12subscriptā12superscriptsubscriptnormsubscriptā22 (b_enc)_ = 12 _ - 12\| _ % \|_2^2,( bitalic_e n c )ā = divide start_ARG 1 end_ARG start_ARG 2 end_ARG αroman_ā - divide start_ARG 1 end_ARG start_ARG 2 end_ARG ℠μroman_ā ā„22 , i.e. μā=Weā¢nā¢cTā¢eāsubscriptāsubscriptsuperscriptsubscriptā _ =W^T_ence_ μroman_ā = Witalic_Titalic_e n c eroman_ā and αā=2ā¢(beā¢nā¢c)ā+āWeā¢nā¢cTā¢eāā22.subscriptā2subscriptsubscriptāsuperscriptsubscriptnormsubscriptsuperscriptsubscriptā22 _ =2(b_enc)_ +\|W^T_ence_ \|_2^2.αroman_ā = 2 ( bitalic_e n c )ā + ā„ Witalic_Titalic_e n c eroman_ā ā„22 . Hence, any (Weā¢nā¢c,beā¢nā¢c)subscriptsubscript(W_enc,b_enc)( Witalic_e n c , bitalic_e n c ) gives rise to a KthsuperscriptthK^thKth-order power diagram, and any KthsuperscriptthK^thKth-order power diagram gives rise to an (Weā¢nā¢c,beā¢nā¢c)subscriptsubscript(W_enc,b_enc)( Witalic_e n c , bitalic_e n c ). Finally, Equation 2.2 follows from Equation B.1 and Equation 2.1. ā Proof of Theorem 2.6. We seek to minimise ā=āi=1kĪ»ā¢Niā¢Ki+āxrāRiāxrāUiā¢ViTā¢xrāciā22.āsuperscriptsubscript1subscriptsubscriptsubscriptsuperscriptsubscriptsuperscriptsubscriptnormsuperscriptsubscriptsuperscriptsubscriptsuperscriptsubscript22L= _i=1^kĪ» N_iK_i+ _x^rā R_i\|x^r-U_i% V_i^Tx^r-c_i\|_2^2.L = āi = 1k Ī» Nitalic_i Kitalic_i + āxitalic_r ā R start_POSTSUBSCRIPT i end_POSTSUBSCRIPT ā„ xitalic_r - Uitalic_i Vitalic_iitalic_T xitalic_r - citalic_i ā„22 . For the same reason as for the νisubscript _iνitalic_i in k-means, the cisubscriptc_icitalic_i will be minimising when ci=1Niā¢āxrāRi(IāUiā¢ViT)ā¢xr=(IāUiā¢ViT)ā¢xĀÆi,subscript1subscriptsubscriptsuperscriptsubscriptsubscriptsuperscriptsubscriptsuperscriptsubscriptsuperscriptsubscriptsubscriptĀÆc_i= 1N_i _x^rā R_i(I-U_iV_i^T)x^r=(I-U_iV_i% ^T) x_i,citalic_i = divide start_ARG 1 end_ARG start_ARG Nitalic_i end_ARG āxitalic_r ā R start_POSTSUBSCRIPT i end_POSTSUBSCRIPT ( I - Uitalic_i Vitalic_iitalic_T ) xitalic_r = ( I - Uitalic_i Vitalic_iitalic_T ) overĀÆ start_ARG x end_ARGi , and so āLL simplifies to ā=āi=1kĪ»ā¢Niā¢Ki+āxrāRiā(IāUiā¢ViT)ā¢(xrāxĀÆi)ā22.āsuperscriptsubscript1subscriptsubscriptsubscriptsuperscriptsubscriptsuperscriptsubscriptnormsubscriptsuperscriptsubscriptsuperscriptsubscriptĀÆ22L= _i=1^kĪ» N_iK_i+ _x^rā R_i\|(I-U_iV_% i^T)(x^r- x_i)\|_2^2.L = āi = 1k Ī» Nitalic_i Kitalic_i + āxitalic_r ā R start_POSTSUBSCRIPT i end_POSTSUBSCRIPT ā„ ( I - Uitalic_i Vitalic_iitalic_T ) ( xitalic_r - overĀÆ start_ARG x end_ARGi ) ā„22 . We claim that this is minimised when Ui=VisubscriptsubscriptU_i=V_iUitalic_i = Vitalic_i and the columns of UisubscriptU_iUitalic_i are the top KisubscriptK_iKitalic_i eigenvectors of Xi:=1Niā¢āxrāRi(xrāxĀÆi)ā¢(xrāxĀÆi)T,assignsubscript1subscriptsubscriptsuperscriptsubscriptsuperscriptsubscriptĀÆsuperscriptsuperscriptsubscriptĀÆX_i:= 1N_i _x^rā R_i(x^r- x_i)(x^r- x_% i)^T,Xitalic_i := divide start_ARG 1 end_ARG start_ARG Nitalic_i end_ARG āxitalic_r ā R start_POSTSUBSCRIPT i end_POSTSUBSCRIPT ( xitalic_r - overĀÆ start_ARG x end_ARGi ) ( xitalic_r - overĀÆ start_ARG x end_ARGi )T , and in this case āLL reduces to ā=āi=1kĪ»ā¢Niā¢Ki+(āxrāRiā(xrāxĀÆi)ā22)āNiā¢āā=1KiĪ»āā¢(Xi),āsuperscriptsubscript1subscriptsubscriptsubscriptsuperscriptsubscriptsuperscriptsubscriptnormsuperscriptsubscriptĀÆ22subscriptsuperscriptsubscriptā1subscriptsubscriptāsubscriptL= _i=1^kĪ» N_iK_i+ ( _x^rā R_i\|(x^% r- x_i)\|_2^2 )-N_i _ =1^K_i _ (X_i% ),L = āi = 1k Ī» Nitalic_i Kitalic_i + ( āxitalic_r ā R start_POSTSUBSCRIPT i end_POSTSUBSCRIPT ā„ ( xitalic_r - overĀÆ start_ARG x end_ARGi ) ā„22 ) - Nitalic_i āā = 1Kitalic_i Ī»roman_ā ( Xitalic_i ) , where Ī»āā¢(Xi)subscriptāsubscript _ (X_i)Ī»roman_ā ( Xitalic_i ) are the eigenvalues of XisubscriptX_iXitalic_i in descending order. This follows because āxrā(IāUā¢VT)ā¢(xrāxĀÆ)ā22subscriptsuperscriptsuperscriptsubscriptnormsuperscriptsuperscriptĀÆ22 _x^r\|(I-UV^T)(x^r- x)\|_2^2āxitalic_r ā„ ( I - U Vitalic_T ) ( xitalic_r - overĀÆ start_ARG x end_ARG ) ā„22 =āxr(xrāxĀÆ)Tā¢(IāVā¢UT)ā¢(IāUā¢VT)ā¢(xrāxĀÆ)absentsubscriptsuperscriptsuperscriptsuperscriptĀÆsuperscriptsuperscriptsuperscriptĀÆ = _x^r(x^r- x)^T(I-VU^T)(I-UV^T)(x^r- x)= āxitalic_r ( xitalic_r - overĀÆ start_ARG x end_ARG )T ( I - V Uitalic_T ) ( I - U Vitalic_T ) ( xitalic_r - overĀÆ start_ARG x end_ARG ) =āxrtrā”((xrāxĀÆ)Tā¢(IāVā¢UT)ā¢(IāUā¢VT)ā¢(xrāxĀÆ))absentsubscriptsuperscripttrsuperscriptsuperscriptĀÆsuperscriptsuperscriptsuperscriptĀÆ = _x^rtr ((x^r- x)^T(I-VU^T)% (I-UV^T)(x^r- x) )= āxitalic_r tr ( ( xitalic_r - overĀÆ start_ARG x end_ARG )T ( I - V Uitalic_T ) ( I - U Vitalic_T ) ( xitalic_r - overĀÆ start_ARG x end_ARG ) ) =āxrtrā”((xrāxĀÆ)ā¢(xrāxĀÆ)Tā¢(IāVā¢UT)ā¢(IāUā¢VT))absentsubscriptsuperscripttrsuperscriptĀÆsuperscriptsuperscriptĀÆsuperscriptsuperscript = _x^rtr ((x^r- x)(x^r- x% )^T(I-VU^T)(I-UV^T) )= āxitalic_r tr ( ( xitalic_r - overĀÆ start_ARG x end_ARG ) ( xitalic_r - overĀÆ start_ARG x end_ARG )T ( I - V Uitalic_T ) ( I - U Vitalic_T ) ) =Nā¢trā”(Xā¢(IāVā¢UT)ā¢(IāUā¢VT))absenttrsuperscriptsuperscript =Ntr (X(I-VU^T)(I-UV^T) )= N tr ( X ( I - V Uitalic_T ) ( I - U Vitalic_T ) ) =Nā¢trā”((XāXā¢Vā¢UT)ā¢(IāUā¢VT))absenttrsuperscriptsuperscript =Ntr ((X-XVU^T)(I-UV^T) )= N tr ( ( X - X V Uitalic_T ) ( I - U Vitalic_T ) ) =Nā¢trā”(XāXā¢Vā¢UTāXā¢Uā¢VT+Xā¢Vā¢VT)absenttrsuperscriptsuperscriptsuperscript =Ntr (X-XVU^T-XUV^T+XVV^T )= N tr ( X - X V Uitalic_T - X U Vitalic_T + X V Vitalic_T ) =Nā¢trā”(X)+Nā¢trā”(āUTā¢Xā¢VāVTā¢Xā¢U+VTā¢Xā¢V)absenttrtrsuperscriptsuperscriptsuperscript =Ntr(X)+Ntr (-U^TXV-V^TXU+V% ^TXV )= N tr ( X ) + N tr ( - Uitalic_T X V - Vitalic_T X U + Vitalic_T X V ) =Nā¢trā”(X)+Nā¢trā”((VāU)Tā¢Xā¢(VāU))āNā¢trā”(UTā¢Xā¢U)absenttrtrsuperscripttrsuperscript =Ntr(X)+Ntr ((V-U)^TX(V-U)% )-Ntr (U^TXU )= N tr ( X ) + N tr ( ( V - U )T X ( V - U ) ) - N tr ( Uitalic_T X U ) is minimised when U=VU=VU = V and trā”(UTā¢Xā¢U)trsuperscripttr (U^TXU )tr ( Uitalic_T X U ) is maximised (with the constraint that UTā¢U=IsuperscriptU^TU=IUitalic_T U = I). This occurs when U has columns the top K leading eigenvectors of X. At this choice: āxrā(IāUā¢VT)ā¢(xrāxĀÆ)ā2=Nā¢trā”(X)āNā¢āā=1kĪ»ā=āxrtrā”((xrāxĀÆ)Tā¢(xrāxĀÆ))āNā¢āā=1kĪ»ā=āxrāxrāxĀÆā22āNā¢āā=1kĪ»ā.subscriptsuperscriptsuperscriptnormsuperscriptsuperscriptĀÆ2trsuperscriptsubscriptā1subscriptāsubscriptsuperscripttrsuperscriptsuperscriptĀÆsuperscriptĀÆsuperscriptsubscriptā1subscriptāsubscriptsuperscriptsuperscriptsubscriptnormsuperscriptĀÆ22superscriptsubscriptā1subscriptā _x^r\|(I-UV^T)(x^r- x)\|^2=Ntr(X)-N _% =1^k _ = _x^rtr((x^r- x)^T(x^% r- x))-N _ =1^k _ = _x^r\|x^r- x\|_% 2^2-N _ =1^k _ .āxitalic_r ā„ ( I - U Vitalic_T ) ( xitalic_r - overĀÆ start_ARG x end_ARG ) ā„2 = N tr ( X ) - N āā = 1k Ī»roman_ā = āxitalic_r tr ( ( xitalic_r - overĀÆ start_ARG x end_ARG )T ( xitalic_r - overĀÆ start_ARG x end_ARG ) ) - N āā = 1k Ī»roman_ā = āxitalic_r ā„ xitalic_r - overĀÆ start_ARG x end_ARG ā„22 - N āā = 1k Ī»roman_ā . ā Appendix C Proofs in Section 3 Theorem C.1. The (Wdect+1,bdect+1)superscriptsubscriptdec1superscriptsubscriptdec1(W_dec^t+1,b_dec^t+1)( Wdecitalic_t + 1 , bdecitalic_t + 1 ) solving Equation 3.1b for G:=αā¢āWdecāF2+βā¢ābdecā22assignsubscriptsuperscriptnormsubscriptdec2superscriptsubscriptnormsubscriptdec22G:=α\|W_dec\|^2_F+β\|b_dec\|_2^2G := α ā„ Wdec ā„2F + β ā„ bdec ā„22 are given by bdect+1subscriptsuperscript1dec b^t+1_decbitalic_t + 1dec =νdectN+β+νdectā¢bdect+N+β+νdectā¢(xĀÆāWdecā¢zĀÆt+1),absentsubscriptsuperscriptdecsubscriptsuperscriptdecsuperscriptsubscriptdecsubscriptsuperscriptdecĀÆsubscriptdecsubscriptĀÆ1 = ν^t_decN+β+ν^t_decb_% dec^t+ NN+β+ν^t_dec( x-W_dec% z_t+1),= divide start_ARG νitalic_tdec end_ARG start_ARG N + β + νitalic_tdec end_ARG bdecitalic_t + divide start_ARG N end_ARG start_ARG N + β + νitalic_tdec end_ARG ( overĀÆ start_ARG x end_ARG - Wdec overĀÆ start_ARG z end_ARGt + 1 ) , Wdect+1subscriptsuperscript1dec W^t+1_decWitalic_t + 1dec =(Φtμdectā¢Wdect0nĆd)ā¢(ĪØtμdectā¢Idαā¢Id)ā ,absentmatrixsubscriptΦsubscriptsuperscriptdecsubscriptsuperscriptdecsubscript0superscriptmatrixsubscriptĪØsubscriptsuperscriptdecsubscriptsubscriptā = pmatrix _t& μ^t_decW^t_% dec&0_nĆ d pmatrix pmatrix _t& μ^t_% decI_d& αI_d pmatrix ,= ( start_ARG start_ROW start_CELL Φitalic_t end_CELL start_CELL square-root start_ARG μitalic_tdec end_ARG Witalic_tdec end_CELL start_CELL 0n Ć d end_CELL end_ROW end_ARG ) ( start_ARG start_ROW start_CELL ĪØitalic_t end_CELL start_CELL square-root start_ARG μitalic_tdec end_ARG Iitalic_d end_CELL start_CELL square-root start_ARG α end_ARG Iitalic_d end_CELL end_ROW end_ARG )ā , where zt+1r:=Ļā¢(Wenct+1ā¢xr+benct+1)assignsubscriptsuperscript1subscriptsuperscript1encsuperscriptsubscriptsuperscript1encz^r_t+1:=Ļ(W^t+1_encx^r+b^t+1_enc)zitalic_ritalic_t + 1 := Ļ ( Witalic_t + 1enc xitalic_r + bitalic_t + 1enc ), zĀÆt+1subscriptĀÆ1 z_t+1overĀÆ start_ARG z end_ARGt + 1 is the mean of the zt+1rsubscriptsuperscript1z^r_t+1zitalic_ritalic_t + 1, and ĪØtāādĆ(N+2)subscriptĪØsuperscriptā2 _t ^dĆ(N+2)ĪØitalic_t ā blackboard_Rd Ć ( N + 2 ) and ΦtāānĆ(N+2)subscriptΦsuperscriptā2 _t ^nĆ(N+2)Φitalic_t ā blackboard_Rn Ć ( N + 2 ) are matrices with columns (for r=11r=1r = 1 to N) Ļtrsuperscriptsubscript _t^rĻitalic_titalic_r :=zt+1rāNā¢zĀÆt+1N+β+νdect,assignabsentsubscriptsuperscript1subscriptĀÆ1subscriptsuperscriptdec :=z^r_t+1- N z_t+1N+β+ν^t_dec,:= zitalic_ritalic_t + 1 - divide start_ARG N overĀÆ start_ARG z end_ARGt + 1 end_ARG start_ARG N + β + νitalic_tdec end_ARG , ĻtN+1:=Nā¢Ī½dectN+β+νdectā¢zĀÆt+1,assignsuperscriptsubscript1superscriptsubscriptdecsuperscriptsubscriptdecsubscriptĀÆ1 _t^N+1:= N _dec^tN+β+ _% dec^t z_t+1,Ļitalic_titalic_N + 1 := divide start_ARG N square-root start_ARG νdecitalic_t end_ARG end_ARG start_ARG N + β + νdecitalic_t end_ARG overĀÆ start_ARG z end_ARGt + 1 , ĻtN+2:=Nā¢Ī²N+β+νdectā¢zĀÆt+1,assignsuperscriptsubscript2superscriptsubscriptdecsubscriptĀÆ1 _t^N+2:= N βN+β+ _dec^t% z_t+1,Ļitalic_titalic_N + 2 := divide start_ARG N square-root start_ARG β end_ARG end_ARG start_ARG N + β + νdecitalic_t end_ARG overĀÆ start_ARG z end_ARGt + 1 , Ļtrsuperscriptsubscriptitalic-Ļ _t^rĻitalic_titalic_r :=xrāNā¢xĀÆ+νdectā¢bdectN+β+νdect,assignabsentsuperscriptĀÆsubscriptsuperscriptdecsuperscriptsubscriptdecsubscriptsuperscriptdec :=x^r- N x+ν^t_decb_dec^tN+% β+ν^t_dec,:= xitalic_r - divide start_ARG N overĀÆ start_ARG x end_ARG + νitalic_tdec bdecitalic_t end_ARG start_ARG N + β + νitalic_tdec end_ARG , ĻtN+1:=νdectā¢Nā¢xĀÆā(N+β)ā¢bdectN+β+νdect,assignsuperscriptsubscriptitalic-Ļ1superscriptsubscriptdecĀÆsubscriptsuperscriptdecsuperscriptsubscriptdec _t^N+1:= _dec^t N x-(N+% β)b^t_decN+β+ _dec^t,Ļitalic_titalic_N + 1 := square-root start_ARG νdecitalic_t end_ARG divide start_ARG N overĀÆ start_ARG x end_ARG - ( N + β ) bitalic_tdec end_ARG start_ARG N + β + νdecitalic_t end_ARG , ĻtN+2:=βā¢Nā¢xĀÆ+νdectā¢bdectN+β+νdect.assignsuperscriptsubscriptitalic-Ļ2ĀÆsubscriptsuperscriptdecsuperscriptsubscriptdecsubscriptsuperscriptdec _t^N+2:= β N x+ν^t_decb_% dec^tN+β+ν^t_dec.Ļitalic_titalic_N + 2 := square-root start_ARG β end_ARG divide start_ARG N overĀÆ start_ARG x end_ARG + νitalic_tdec bdecitalic_t end_ARG start_ARG N + β + νitalic_tdec end_ARG . Proof of Theorem C.1. By completing the square, the optimal bdecsubscriptdecb_decbdec is given by bdec=1N+β+νdectā¢(νdectā¢bdect+ār=1txrāWdecā¢zt+1r)=νdectN+β+νdectā¢bdect+N+β+νdectā¢(xĀÆāWdecā¢zĀÆt+1),subscriptdec1subscriptsuperscriptdecsubscriptsuperscriptdecsuperscriptsubscriptdecsuperscriptsubscript1superscriptsubscriptdecsuperscriptsubscript1subscriptsuperscriptdecsubscriptsuperscriptdecsuperscriptsubscriptdecsubscriptsuperscriptdecĀÆsubscriptdecsubscriptĀÆ1b_dec= 1N+β+ν^t_dec (ν^t_dec% b_dec^t+ _r=1^tx^r-W_decz_t+1^r )= % ν^t_decN+β+ν^t_decb_dec^t+ N% N+β+ν^t_dec( x-W_dec z_t+1),bdec = divide start_ARG 1 end_ARG start_ARG N + β + νitalic_tdec end_ARG ( νitalic_tdec bdecitalic_t + ār = 1t xitalic_r - Wdec zitalic_t + 1r ) = divide start_ARG νitalic_tdec end_ARG start_ARG N + β + νitalic_tdec end_ARG bdecitalic_t + divide start_ARG N end_ARG start_ARG N + β + νitalic_tdec end_ARG ( overĀÆ start_ARG x end_ARG - Wdec overĀÆ start_ARG z end_ARGt + 1 ) , where zt+1r:=Ļā¢(Wenct+1ā¢xr+benct+1)assignsubscriptsuperscript1subscriptsuperscript1encsuperscriptsubscriptsuperscript1enc z^r_t+1:=Ļ(W^t+1_encx^r+b^t+1_enc)zitalic_ritalic_t + 1 := Ļ ( Witalic_t + 1enc xitalic_r + bitalic_t + 1enc ) and zĀÆt+1:=1Nā¢ār=1Nzt+1r.assignsubscriptĀÆ11superscriptsubscript1subscriptsuperscript1 z_t+1:= 1N _r=1^Nz^r_t+1.overĀÆ start_ARG z end_ARGt + 1 := divide start_ARG 1 end_ARG start_ARG N end_ARG ār = 1N zitalic_ritalic_t + 1 . This reduces āLL to: ār=1NāWdecā¢(zt+1rāN+β+νdectā¢zĀÆt+1)+νdectN+β+νdectā¢bdect+N+β+νdectā¢xĀÆāxrā22superscriptsubscript1superscriptsubscriptnormsubscriptdecsubscriptsuperscript1subscriptsuperscriptdecsubscriptĀÆ1subscriptsuperscriptdecsubscriptsuperscriptdecsuperscriptsubscriptdecsubscriptsuperscriptdecĀÆsuperscript22 _r=1^N \|W_dec (z^r_t+1- NN+% β+ν^t_dec z_t+1 )+ ν^t_decN+% β+ν^t_decb_dec^t+ NN+β+ν^t_% dec x-x^r \|_2^2ār = 1N ā„ Wdec ( zitalic_ritalic_t + 1 - divide start_ARG N end_ARG start_ARG N + β + νitalic_tdec end_ARG overĀÆ start_ARG z end_ARGt + 1 ) + divide start_ARG νitalic_tdec end_ARG start_ARG N + β + νitalic_tdec end_ARG bdecitalic_t + divide start_ARG N end_ARG start_ARG N + β + νitalic_tdec end_ARG overĀÆ start_ARG x end_ARG - xitalic_r ā„22 +μdectā¢āWdecāWdectāF2+αā¢āWdecāF2+νdectā¢āN+β+νdectā¢(xĀÆāWdecā¢zĀÆt+1)āN+βN+β+νdectā¢bdectā22superscriptsubscriptdecsuperscriptsubscriptnormsubscriptdecsuperscriptsubscriptdec2subscriptsuperscriptnormsubscriptdec2subscriptsuperscriptdecsuperscriptsubscriptnormsubscriptsuperscriptdecĀÆsubscriptdecsubscriptĀÆ1subscriptsuperscriptdecsuperscriptsubscriptdec22 + _dec^t\|W_dec-W_dec^t\|_F^2% +α\|W_dec\|^2_F+ν^t_dec \| NN+β% +ν^t_dec( x-W_dec z_t+1)- N+βN+% β+ν^t_decb_dec^t \|_2^2+ μdecitalic_t ā„ Wdec - Wdecitalic_t ā„F2 + α ā„ Wdec ā„2F + νitalic_tdec ā„ divide start_ARG N end_ARG start_ARG N + β + νitalic_tdec end_ARG ( overĀÆ start_ARG x end_ARG - Wdec overĀÆ start_ARG z end_ARGt + 1 ) - divide start_ARG N + β end_ARG start_ARG N + β + νitalic_tdec end_ARG bdecitalic_t ā„22 +βā¢āνdectN+β+νdectā¢bdect+N+β+νdectā¢(xĀÆāWdecā¢zĀÆt+1)ā22.superscriptsubscriptnormsubscriptsuperscriptdecsubscriptsuperscriptdecsuperscriptsubscriptdecsubscriptsuperscriptdecĀÆsubscriptdecsubscriptĀÆ122 +β \| ν^t_decN+β+ν^t_% decb_dec^t+ NN+β+ν^t_dec( x-W_% dec z_t+1) \|_2^2.+ β ā„ divide start_ARG νitalic_tdec end_ARG start_ARG N + β + νitalic_tdec end_ARG bdecitalic_t + divide start_ARG N end_ARG start_ARG N + β + νitalic_tdec end_ARG ( overĀÆ start_ARG x end_ARG - Wdec overĀÆ start_ARG z end_ARGt + 1 ) ā„22 . Hence ā =ār=1N+2āWdecā¢ĻtrāĻtrā22+μdectā¢āWdecāWdectāF2+αā¢āWdecāF2absentsuperscriptsubscript12subscriptsuperscriptnormsubscriptdecsuperscriptsubscriptsuperscriptsubscriptitalic-Ļ22superscriptsubscriptdecsuperscriptsubscriptnormsubscriptdecsuperscriptsubscriptdec2subscriptsuperscriptnormsubscriptdec2 = _r=1^N+2\|W_dec _t^r- _t^r\|^2_% 2+ _dec^t\|W_dec-W_dec^t\|_F^2+α\|% W_dec\|^2_F= ār = 1N + 2 ā„ Wdec Ļitalic_titalic_r - Ļitalic_titalic_r ā„22 + μdecitalic_t ā„ Wdec - Wdecitalic_t ā„F2 + α ā„ Wdec ā„2F =āWdecā¢ĪØtāΦtāF2+μdectā¢āWdecāWdectāF2+αā¢āWdecāF2absentsuperscriptsubscriptnormsubscriptdecsubscriptĪØsubscriptΦ2superscriptsubscriptdecsuperscriptsubscriptnormsubscriptdecsuperscriptsubscriptdec2subscriptsuperscriptnormsubscriptdec2 =\|W_dec _t- _t\|_F^2+ _dec^t% \|W_dec-W_dec^t\|_F^2+α\|W_dec\|^2_F= ā„ Wdec ĪØitalic_t - Φitalic_t ā„F2 + μdecitalic_t ā„ Wdec - Wdecitalic_t ā„F2 + α ā„ Wdec ā„2F =āWdecā¢(ĪØtμdectā¢Idαā¢Id)ā(Φtμdectā¢Wdect0nĆd)āF2absentsuperscriptsubscriptnormsubscriptdecmatrixsubscriptĪØsubscriptsuperscriptdecsubscriptsubscriptmatrixsubscriptΦsubscriptsuperscriptdecsubscriptsuperscriptdecsubscript02 = \|W_dec pmatrix _t& μ^t_% decI_d& αI_d pmatrix- pmatrix _t&% μ^t_decW^t_dec&0_nĆ d pmatrix % \|_F^2= ā„ Wdec ( start_ARG start_ROW start_CELL ĪØitalic_t end_CELL start_CELL square-root start_ARG μitalic_tdec end_ARG Iitalic_d end_CELL start_CELL square-root start_ARG α end_ARG Iitalic_d end_CELL end_ROW end_ARG ) - ( start_ARG start_ROW start_CELL Φitalic_t end_CELL start_CELL square-root start_ARG μitalic_tdec end_ARG Witalic_tdec end_CELL start_CELL 0n Ć d end_CELL end_ROW end_ARG ) ā„F2 and so Wdecsubscriptdec W_decWdec =(Φtμdectā¢Wdect0nĆd)ā¢(ĪØtμdectā¢Idαā¢Id)ā absentmatrixsubscriptΦsubscriptsuperscriptdecsubscriptsuperscriptdecsubscript0superscriptmatrixsubscriptĪØsubscriptsuperscriptdecsubscriptsubscriptā = pmatrix _t& μ^t_decW^t_% dec&0_nĆ d pmatrix pmatrix _t& μ^t_% decI_d& αI_d pmatrix = ( start_ARG start_ROW start_CELL Φitalic_t end_CELL start_CELL square-root start_ARG μitalic_tdec end_ARG Witalic_tdec end_CELL start_CELL 0n Ć d end_CELL end_ROW end_ARG ) ( start_ARG start_ROW start_CELL ĪØitalic_t end_CELL start_CELL square-root start_ARG μitalic_tdec end_ARG Iitalic_d end_CELL start_CELL square-root start_ARG α end_ARG Iitalic_d end_CELL end_ROW end_ARG )ā =(Φtā¢ĪØtT+μdectā¢Wdect)ā¢(ĪØtā¢ĪØtT+(α+μdect)ā¢Id)ā1.absentsubscriptΦsuperscriptsubscriptĪØsubscriptsuperscriptdecsubscriptsuperscriptdecsuperscriptsubscriptĪØsuperscriptsubscriptĪØsubscriptsuperscriptdecsubscript1 =( _t _t^T+μ^t_decW^t_dec)% ( _t _t^T+(α+μ^t_dec)I_d )^-1.= ( Φitalic_t ĪØitalic_titalic_T + μitalic_tdec Witalic_tdec ) ( ĪØitalic_t ĪØitalic_titalic_T + ( α + μitalic_tdec ) Iitalic_d )- 1 . ā C.1 Convergence proof We will need to make the following assumptions. Assumption C.2. F, G, Ļ, and μenct,νenct,μdect,νdectt=0āsuperscriptsubscriptsuperscriptsubscriptencsuperscriptsubscriptencsuperscriptsubscriptdecsuperscriptsubscriptdec0\ _enc^t, _enc^t, _dec^t, _% dec^t\_t=0^ā μencitalic_t , νencitalic_t , μdecitalic_t , νdecitalic_t t = 0ā are such that: 1. F and G are continuous and bounded below. 2. For all xāānsuperscriptāx ^nx ā blackboard_Rn, āWdecā¢Ļā¢(Wencā¢x+benc)+bdecāxā22superscriptsubscriptnormsubscriptdecsubscriptencsubscriptencsubscriptdec22\|W_decĻ(W_encx+b_enc)+b_dec-x\|_2^2ā„ Wdec Ļ ( Wenc x + benc ) + bdec - x ā„22 is C1superscript1C^1C1 in WencsubscriptencW_encWenc, bencsubscriptencb_encbenc, WdecsubscriptdecW_decWdec, and bdecsubscriptdecb_decbdec, with a gradient that is locally Lipschitz. 3. μenct,νenct,μdect,νdectt=0āā(a,b)superscriptsubscriptsuperscriptsubscriptencsuperscriptsubscriptencsuperscriptsubscriptdecsuperscriptsubscriptdec0\ _enc^t, _enc^t, _dec^t, _% dec^t\_t=0^āā(a,b) μencitalic_t , νencitalic_t , μdecitalic_t , νdecitalic_t t = 0ā ā ( a , b ) for some 0<a<b<ā00<a<b<ā0 < a < b < ā. These together entail that (Attouch et al., 2010, Assumptions (ā)ā(H)( H ) and (ā1)subscriptā1(H_1)( H1 )) are satisfied. 4. F, G, and Ļ are piecewise (real) analytic functions with finitely many pieces. This entails that āLL is a continuous and piecewise analytic function, with finitely many pieces. Note C.3. In the ReLU case, we must modify Ļ for C.2(2) to hold. For example taking Ļ to be any smooth and analytic approximation of ReLU, such as the Swish activation function, will suffice. In the TopK case, Ļ=TopKTopKĻ=TopKĻ = TopK is not continuous. This can however be patched by using the following analytic approximation of TopK: for any T>00T>0T > 0, let ĻTā¢(v):=āSā1,ā¦,d,|S|=K(āSā²expā”(1Tā¢ājāSā²vj))ā1ā¢expā”(1Tā¢ājāSvj)ā¢PSā¢v.assignsubscriptsubscriptformulae-sequence1ā¦superscriptsubscriptsuperscriptā²1subscriptsuperscriptā²subscript11subscriptsubscriptsubscript _T(v):= _S \1,...,d\,|S|=K ( _S % ( 1T _jā S v_j ) )^-1 ( % 1T _jā Sv_j )P_Sv.Ļitalic_T ( v ) := āS ā 1 , ⦠, d , | S | = K ( āSā² exp ( divide start_ARG 1 end_ARG start_ARG T end_ARG āj ā Sā² vitalic_j ) )- 1 exp ( divide start_ARG 1 end_ARG start_ARG T end_ARG āj ā S vitalic_j ) Pitalic_S v . It will then follow that if Ļ=ĻTsubscriptĻ= _TĻ = Ļitalic_T then C.2 holds. Furthermore, as Tā0ā0Tā 0T ā 0, ĻTā¢(v)āTopKā”(v)āsubscriptTopK _T(v) (v)Ļitalic_T ( v ) ā TopK ( v ), so long as v has a unique set of largest K entries. Proof of C.3. It is straightforward to check that if Ļ is smooth and (real) analytic, then the Ļ-dependent conditions of C.2 will be satisfied. As for the convergence of ĻTsubscript _TĻitalic_T to TopKTopKTopKTopK, let v have a unique set of K largest entries, and denote this set SāsuperscriptS^*Sā. Then multiplying the numerator and denominator by expā”(ā1Tā¢ājāSāvj)1subscriptsuperscriptsubscript (- 1T _jā S^*v_j )exp ( - divide start_ARG 1 end_ARG start_ARG T end_ARG āj ā Sā vitalic_j ) we get that ĻTā¢(v)=āSā1,ā¦,d,|S|=Kexpā”(1Tā¢[ājāSvjāājāSāvj])1+āSā²ā Sāexpā”(1Tā¢[ājāSā²vjāājāSāvj])ā¢PSā¢v.subscriptsubscriptformulae-sequence1ā¦1delimited-[]subscriptsubscriptsubscriptsuperscriptsubscript1subscriptsuperscriptā²1delimited-[]subscriptsuperscriptā²subscriptsubscriptsuperscriptsubscriptsubscript _T(v)= _S \1,...,d\,|S|=K ( 1T % [ _jā Sv_j- _jā S^*v_j ] )1+ _S % ā S^* ( 1T [ _jā S v_j- _jā S% ^*v_j ] )P_Sv.Ļitalic_T ( v ) = āS ā 1 , ⦠, d , | S | = K divide start_ARG exp ( divide start_ARG 1 end_ARG start_ARG T end_ARG [ āj ā S vitalic_j - āj ā Sā vitalic_j ] ) end_ARG start_ARG 1 + āSā² ā Sā exp ( divide start_ARG 1 end_ARG start_ARG T end_ARG [ āj ā Sā² vitalic_j - āj ā Sā vitalic_j ] ) end_ARG Pitalic_S v . As Tā0ā0Tā 0T ā 0, if Sā SāsuperscriptSā S^*S ā Sā then expā”(1Tā¢[ājāSvjāājāSāvj])ā0ā1delimited-[]subscriptsubscriptsubscriptsuperscriptsubscript0 ( 1T [ _jā Sv_j- _jā S^*v_j ]% )ā 0exp ( divide start_ARG 1 end_ARG start_ARG T end_ARG [ āj ā S vitalic_j - āj ā Sā vitalic_j ] ) ā 0, since ājāSvjāājāSāvjsubscriptsubscriptsubscriptsuperscriptsubscript _jā Sv_j- _jā S^*v_jāj ā S vitalic_j - āj ā Sā vitalic_j is stricly negative. Hence, as Tā0ā0Tā 0T ā 0 ĻTā¢(v)āPSāā¢v=TopKā”(v).āsubscriptsubscriptsuperscriptTopK _T(v)ā P_S^*v=TopK(v).Ļitalic_T ( v ) ā Pitalic_Sā v = TopK ( v ) . ā The theory in Attouch et al. (2010) relies crucially on the KurdykaāÅojasiewicz property, which we now define. Definition C.4 (KurdykaāÅojasiewicz property). A proper lower semi-continuous function g:ānā(āā,ā]:āsuperscriptāg:R^nā(-ā,ā]g : blackboard_Rn ā ( - ā , ā ] has the KurdykaāÅojasiewicz property at x^ādomā¢āg^dom x ā gover start_ARG x end_ARG ā dom ā g111We denote by domā”gdomdomgdom g the set of x such that gā¢(x)<āg(x)<āg ( x ) < ā, and by domā¢āgdomdomā gdom ā g the set of xādomā”gdomx ā dom g such that the (limiting) subdifferential of g at x, āgā¢(x)ā g(x)ā g ( x ) (Attouch et al., 2010, Definition 2.1), is non-empty. if there exist Ī·ā(0,ā]0Ī·ā(0,ā]Ī· ā ( 0 , ā ], a neighbourhood U of x^ xover start_ARG x end_ARG, and a continuous concave function Ļ:[0,Ī·)ā[0,ā):ā00 :[0,Ī·)ā[0,ā)Ļ : [ 0 , Ī· ) ā [ 0 , ā ), such that ā¢ Ļ Ļ is C1superscript1C^1C1 with Ļā¢(0)=000 (0)=0Ļ ( 0 ) = 0 and Ļā²>0superscriptā²0 >0Ļā² > 0 on (0,Ī·)0(0,Ī·)( 0 , Ī· ), and ⢠for all xāUxā Ux ā U such that gā¢(x^)<gā¢(x)<gā¢(x^)+Ī·^^g( x)<g(x)<g( x)+ ( over start_ARG x end_ARG ) < g ( x ) < g ( over start_ARG x end_ARG ) + Ī·, the KurdykaāÅojasiewicz inequality holds: Ļā²ā¢(gā¢(x)āgā¢(x^))ā¢distā”(,āgā¢(x))ā„1.superscriptā²^dist01 (g(x)-g( x))dist(0,ā g(x))% ā„ 1.Ļā² ( g ( x ) - g ( over start_ARG x end_ARG ) ) dist ( 0 , ā g ( x ) ) ā„ 1 . If Ļā¢(s):=cā¢s1āĪøassignsuperscript1 (s):=cs^1-ĪøĻ ( s ) := c s1 - Īø is a valid concave function for the above with c>00c>0c > 0 and Īøā[0,1)01Īøā[0,1)Īø ā [ 0 , 1 ), then we will say that g has the KurdykaāÅojasiewicz property with exponent Īø at x^ xover start_ARG x end_ARG. Note that if g is differentiable on U and Ļā¢(s):=cā¢s1āĪøassignsuperscript1 (s):=cs^1-ĪøĻ ( s ) := c s1 - Īø, this inequality becomes cā¢(1āĪø)ā¢āāgā¢(x)ā2ā„(gā¢(x)āgā¢(x^))Īø.1subscriptnormā2superscript^c(1-Īø)\|ā g(x)\|_2ā„(g(x)-g( x))^Īø.c ( 1 - Īø ) ā„ ā g ( x ) ā„2 ā„ ( g ( x ) - g ( over start_ARG x end_ARG ) )Īø . Theorem C.5. If C.2 holds, then for all Wenc,benc,Wdec,bdecsubscriptencsubscriptencsubscriptdecsubscriptdecW_enc,b_enc,W_dec,b_decWenc , benc , Wdec , bdec, āLL has the KurdykaāÅojasiewicz property, with some exponent Īøā[0,1)01Īøā[0,1)Īø ā [ 0 , 1 ), at Wenc,benc,Wdec,bdecsubscriptencsubscriptencsubscriptdecsubscriptdecW_enc,b_enc,W_dec,b_decWenc , benc , Wdec , bdec. Proof. Since āLL is continuous and piecewise analytic with finitely many pieces, it follows that it is semi-analytic (see Åojasiewicz (1964)). Then if (Wenc,benc,Wdec,bdec)subscriptencsubscriptencsubscriptdecsubscriptdec(W_enc,b_enc,W_dec,b_dec)( Wenc , benc , Wdec , bdec ) is not a critical point of āLL, the result follows by (Li & Pong, 2017, Lemma 2.1), and if (Wenc,benc,Wdec,bdec)subscriptencsubscriptencsubscriptdecsubscriptdec(W_enc,b_enc,W_dec,b_dec)( Wenc , benc , Wdec , bdec ) is a critical point, the result follows by (Bolte et al., 2007, Theorem 3.1). ā We therefore prove a more detailed version of Theorem 3.1. Theorem C.6. If C.2 holds, then for all Wenc0,benc0,Wdec0,bdec0subscriptsuperscript0encsubscriptsuperscript0encsubscriptsuperscript0decsubscriptsuperscript0decW^0_enc,b^0_enc,W^0_dec,b^0_decW0enc , b0enc , W0dec , b0dec the sequence of SAE parameters Īt:=(Wenct,benct,Wdect,bdect)t=0āsuperscriptsubscriptassignsubscriptĪsubscriptsuperscriptencsubscriptsuperscriptencsubscriptsuperscriptdecsubscriptsuperscriptdec0\ _t:=(W^t_enc,b^t_enc,W^t_dec,b^t_% dec)\_t=0^ā Īitalic_t := ( Witalic_tenc , bitalic_tenc , Witalic_tdec , bitalic_tdec ) t = 0ā defined by Equation 3.1 obeys: i. āā¢(Īt+1)ā¤āā¢(Īt)āsubscriptĪ1āsubscriptĪL( _t+1) ( _t)L ( Īitalic_t + 1 ) ⤠L ( Īitalic_t ) with equality if and only if Īt+1=ĪtsubscriptĪ1subscriptĪ _t+1= _tĪitalic_t + 1 = Īitalic_t. i. Īt+1āĪtā0āsubscriptĪ1subscriptĪ0 _t+1- _tā 0Īitalic_t + 1 - Īitalic_t ā 0 as tāāātāāt ā ā, and the number of t such that Īt+1āĪtsubscriptĪ1subscriptĪ _t+1- _tĪitalic_t + 1 - Īitalic_t has norm greater than some threshold ε>00 >0ε > 0 is proportional to at most εā2superscript2 ^-2ε- 2. i. Every limit point of Ītt=0āsuperscriptsubscriptsubscriptĪ0\ _t\_t=0^ā Īitalic_t t = 0ā is a critical point of āLL. And furthermore if the sequence Ītt=0āsuperscriptsubscriptsubscriptĪ0\ _t\_t=0^ā Īitalic_t t = 0ā is bounded: iv. The number of Īt+1āĪtsubscriptĪ1subscriptĪ _t+1- _tĪitalic_t + 1 - Īitalic_t with norm greater than ε ε is proportional to at most εā1superscript1 ^-1ε- 1. v. ĪtsubscriptĪ _tĪitalic_t converges to a critical point of āLL as tāāātāāt ā ā. Finally, if ĪtāĪāāsubscriptĪsubscriptĪ _tā _āĪitalic_t ā Īā and Īøā[0,1)01Īøā[0,1)Īø ā [ 0 , 1 ) is the KurdykaāÅojasiewicz exponent of āLL at ĪāsubscriptĪ _āĪā, then: vi. If Īø=00Īø=0Īø = 0, Ītt=0āsuperscriptsubscriptsubscriptĪ0\ _t\_t=0^ā Īitalic_t t = 0ā converges after finitely many steps. vii. If Īøā(0,1/2]012Īøā(0,1/2]Īø ā ( 0 , 1 / 2 ], there exist c>00c>0c > 0 and ζā[0,1)01ζā[0,1)ζ ā [ 0 , 1 ) such that āĪtāĪāāā¤cā¢Ī¶tnormsubscriptĪsubscriptĪsuperscript\| _t- _ā\|⤠cζ^tā„ Īitalic_t - Īā ℠⤠c ζitalic_t. viii. If Īøā(1/2,1)121Īøā(1/2,1)Īø ā ( 1 / 2 , 1 ), there exists c>00c>0c > 0 such that āĪtāĪāāā¤cā¢tā1āĪø2ā¢Īøā1normsubscriptĪsubscriptĪsuperscript121\| _t- _ā\|⤠ct^- 1-Īø2Īø-1ā„ Īitalic_t - Īā ℠⤠c t- divide start_ARG 1 - Īø end_ARG start_ARG 2 Īø - 1 end_ARG. Proof. (i) and (i) follow from (Attouch et al., 2010, Lemma 3.1). (i) follows from (Attouch et al., 2010, Proposition 3.1). (iv) and (v) follow from Theorem C.5 and (Attouch et al., 2010, Theorem 3.2). (vi) to (viii) follow from Theorem C.5 and (Attouch et al., 2010, Theorem 3.4). ā Note C.7. If F and G include weight decay terms this will not impede C.2, and furthermore will by (i) ensure that Wenct,benct,Wdect,bdectt=0āsuperscriptsubscriptsubscriptsuperscriptencsubscriptsuperscriptencsubscriptsuperscriptdecsubscriptsuperscriptdec0\W^t_enc,b^t_enc,W^t_dec,b^t_dec% \_t=0^ā Witalic_tenc , bitalic_tenc , Witalic_tdec , bitalic_tdec t = 0ā is always bounded, and hence weight decay ensures convergence of trajectories of Equation 3.1 to critical points of āLL. Appendix D Experimental settings All computations were performed on: WS Obsidian 750D AirFlow / AMD Ryzen 9 3900X 12x3.8 Ghz / 2x32GB DDR4 3600 / X570 WS / DIS. NOCTUA / 1000W Platinum / 2TB NVME Ent. / RTX 3090 24GB. All code is available at: https://github.com/splInterp2025/splInterp. D.1 SAEs as a bridge between k-means and PCA ⢠Data sampling: 100 points in 2D, sampled as three clusters: ā 40% on a noisy horizontal line (x from ā1.51.5-1.5- 1.5 to 00, yāā0.80.8yā-0.8y ā - 0.8) ā 30% in a dense square (xā[ā0.4,0.4]0.40.4xā[-0.4,0.4]x ā [ - 0.4 , 0.4 ], yā[0.4,1.2]0.41.2yā[0.4,1.2]y ā [ 0.4 , 1.2 ]) ā 30% along a noisy diagonal (xā0.8+t0.8xā 0.8+tx ā 0.8 + t, yātā0.50.5yā t-0.5y ā t - 0.5, tā[0,1]01tā[0,1]t ā [ 0 , 1 ]) ⢠Number of data points: 100 ⢠SAE architecture: Linear sparse autoencoder with 80 dictionary elements (d=8080d=80d = 80), 2D input/output, using a Top1 or Top3 sparse coding. ⢠Training method and hyperparameters: ā Adam optimiser (learning rate 8Ć10ā38superscript1038Ć 10^-38 Ć 10- 3) ā 5000 steps, full-batch (all data at once) ā Dictionary initialised near data points ⢠Runtime: 6 minutes D.2 PAM-SGD vs. SGD on MNIST ⢠Number of data points and training/test split: Uses the standard MNIST dataset: ā 60,000 training images ā 10,000 test images ā Images are 28Ć28282828Ć 2828 Ć 28 grayscale digits ⢠SAE architecture(s): Two models: ā SGD Autoencoder: Linear encoder/decoder, tied weights, sparsity via TopK (K=1515K=15K = 15) or ReLU (without L1 regularisation), 256 latent dimensions ā PAM-SGD Autoencoder: Linear encoder, decoder weights solved analytically (not tied), same latent size and sparsity. ⢠Training (hyper)parameters: ā Optimiser: Adam (learning rate 0.0030.0030.0030.003) ā Batch size: 128 (SGD), 1024 (PAM-SGD encoder update) ā Number of epochs: 50 (default, or fewer for small ablation subsets) ā K-sparsity: K=1515K=15K = 15 (for TopK) ā L1 regularisation: not used ā Input dimension: 784 (28Ć28282828Ć 2828 Ć 28) ā Ablation studies vary training set size, K-sparsity, number of SGD steps per batch, activation type, weight decay parameters, and cost-to-move parameters. ⢠Running time: 1.5 to 2 hours D.3 PAM-SGD vs. SGD on Gemma ⢠Details on Gemma version and license: Uses activations from Gemma-2-2B (https://huggingface.co/google/gemma-2-2b) (Google, 2.2B parameters). License: see Gemma Terms of Use (https://ai.google.dev/gemma/terms) (accessed 8th May 2025). ⢠Number of data points and training/test split: Up to 10,000 LLM activation vectors extracted from real text (default: 90% train, 10% test split). ⢠SAE architecture(s): Two models: ā SGD Autoencoder: Linear encoder/decoder (tied weights), 4096 latent dimensions, sparsity via TopK (K=320320K=320K = 320) or ReLU, with L1 regularisation and ācost-to-moveā penalties. ā PAM-SGD Autoencoder: Linear encoder, decoder weights solved analytically (not tied), same latent size and sparsity, with additional regularisation. ⢠Training (hyper)parameters: ā Optimiser: Adam (learning rate 0.0010.0010.0010.001) ā Batch size: 256 (SGD), 2048 (PAM-SGD Encoder update) ā Epochs: 100 ā K-sparsity: K=320320K=320K = 320 (for TopK) ā L1 regularisation: 0.010.010.010.01 (TopK), 0.000010.000010.000010.00001 (ReLU) ā āCost-to-moveā and weight decay regularisation for encoder/decoder ā Ablation studies vary training set size, K-sparsity, number of SGD steps per batch, activation type, weight decay parameters, and cost-to-move parameters. ⢠Runtimes: 3 to 7 minutes Appendix E Additional figures and ablation studies E.1 SAEs as a bridge between k-means and PCA Figure 8: Visualising the SAE bridge between k-means clustering and PCA. Top-1 SAE. E.2 MNIST experiments E.2.1 TopK experiments PAM-SGD similarly outperforms SGD with TopK. (Figure 9) We tested PAM-SGD using TopK activation for K=1515K=15K = 15. We again saw PAM-SGD outperform SGD, especially at low training data levels. Figure 9: Training and test loss curves at different data sizes for MNIST, with TopK (K=1515K=15K = 15) activation. The chart highlights PAM-SGDās superior sample efficiency. E.2.2 Reconstruction accuracy and interpretability Figure 10: Learned Dictionary Elements using ReLU. Visualization of encoder and decoder weights as filters: SGD encoder (top row), PAM-SGD encoder (second row), SGD decoder (third row), and PAM-SGD decoder (bottom row). Figure 11: Learned Dictionary Elements using TopK K=1515K=15K = 15. Visualization of encoder and decoder weights as filters: SGD encoder (top row), PAM-SGD encoder (second row), SGD decoder (third row), and PAM-SGD decoder (bottom row). With TopK, PAM-SGD produces more interpretable features representative of digit components Figure 12: Reconstruction Quality Comparison using ReLU. Original MNIST digits (top row) with their reconstructions using SGD optimization (middle row) and PAM-SGD optimization (bottom row). PAM-SGD produces cleaner, more accurate reconstructions. Figure 13: Reconstruction Quality Comparison using TopK K=1515K=15K = 15. Original MNIST digits (top row) with their reconstructions using SGD optimization (middle row) and PAM-SGD optimization (bottom row). PAM-SGD produces cleaner, more accurate reconstructions. Figure 14: Evolution of Reconstruction Quality Over Training using ReLU. Progression of a single digitās reconstruction across epochs, comparing SGD (top row) and PAM-SGD (bottom row) approaches, showing how representation quality improves with training. Here PAM-SGD converges almost immediately. Figure 15: Evolution of Reconstruction Quality Over Training using TopK K=1515K=15K = 15. Progression of a single digitās reconstruction across epochs, comparing SGD (top row) and PAM-SGD (bottom row) approaches, showing how representation quality improves with training E.2.3 Ablation study varying SGD updates per batch in PAM-SGD Stability Across SGD Updates. (Figures 16 and 17) Unlike in LLM experiments, PAM-SGD on MNIST is robust to the number of SGD updates per batch. Varying this hyperparameter from 1 to 10 has slightly improves final performance in the ReLU case and has little impact in the TopK case, suggesting that the optimization landscape is smoother and less sensitive in this setting. Figure 16: Effect of Multiple SGD Updates Per Batch on PAM-SGD Performance with ReLU. Test loss decreases with more updates per batch. Figure 17: Effect of Multiple SGD Updates Per Batch on PAM-SGD Performance with TopK K=1515K=15K = 15. Test loss increases with more updates per batch, suggesting simpler optimization (single updates) maintains better balance. E.2.4 TopK and ReLU activation patterns Figure 18: Sparse activation patterns for ReLU activations. Plots showing which latent neurons activate for 5 different input digits, comparing SGD (left) and PAM-SGD (right) models. PAM-SGD activations are roughly five times denser. Figure 19: Sparse activation patterns for TopK K=1515K=15K = 15 activations. Plots showing which latent neurons activate for 5 different input digits, comparing SGD (left) and PAM-SGD (right) models. Each sample activates exactly K=1515K=15K = 15 neurons from the 256-dimensional latent space. E.2.5 Ablation study adding weight decay Small amounts of weight decay make SGD compete with PAM-SGD in the ReLU setting. (Figures 20 and 21) We experimented with adding weight decay in the 100% data setting. In the ReLU setting, we found that small amounts aided SGD performance to be competitive with PAM-SGD and had little effect on PAM-SGD. Increasing weight decay further however degraded both performances, especially PAM-SGDās. In the TopK setting, weight decay just steadily degraded both performances. Figure 20: Impact of weight decay on final test loss in the ReLU case. Figure 21: Impact of weight decay on final test loss in the TopK K=1515K=15K = 15 case. E.2.6 Ablation study varying μ and ν Sensitivity to quadratic costs to move μ and ν. (Figures 22 and 23) We studied the effect of varying the values of the parameters μenc,μdec,νenc,subscriptencsubscriptdecsubscriptenc _enc, _dec, _enc,μenc , μdec , νenc , and νdecsubscriptdec _decνdec from Equation 3.1, in the 100% data setting. For ReLU activation, very small values for these parameters improve the test loss almost to zero for both SGD (where similar parameters can easily be introduced) and PAM-SGD. Further increases however degrade performance for both, rapidly in the case of PAM-SGD. For TopK increasing these parameters steadily degrades performance in both cases, though this may simply be due to these parameters slowing convergence and therefore worsening performance at the 50 epoch cut-off. Figure 22: Effect of modifying the cost-to-move parameters on final test loss in the ReLU case. Figure 23: Effect of modifying the cost-to-move parameters on final test loss in the TopK K=1515K=15K = 15 case. E.3 LLM Activation Experiments (Gemmaā2-2B) E.3.1 Additional ReLU test runs PAM-SGD consistently outperforms SGD. (Figure 24) Owing to the stochasticity of the training algorithms, different results are obtained in every re-run of the training. However, the pattern of PAM-SGD outperforming SGD remained consistent. Figure 24: Final test loss across training set sizes for Gemma-2-2B, with ReLU activation, for two additional training runs. PAM-SGD retains an advantage at low data, and remains superior throughout, in both runs. E.3.2 TopK activation experiments Stability only at high sparsity and underperforms SGD. (Figures 25, 26, 29, 28 and 27) PAM-SGD was highly unstable for low values of K, with the test loss diverging rapidly. Only for larger values was the test loss stable, but fairly stagnant agross epochs even for very large K (over 30% of the hidden dimension) leading us to choose K=320320K=320K = 320 as our default TopK sparsity. We speculate that this is because the LLM reconstruction is sufficiently complicated as to make being able to capture it with small K unrealistic. We furthermore compared SGD and PAM-SGD at various training data sizes for K=320320K=320K = 320 and K=640640K=640K = 640. We found that PAM-SGD consistently underperformed SGD in both cases, with the difference the smallest at low data sizes and again at high data sizes, with a surprising big rise in test loss for medium data sizes (with a maximum around 45%). This peak was consistent across multiple runs, so we suspect it is some fundamental issue perhaps caused by numerical instability. Inspecting the loss curves in the two cases shows that PAM-SGD only has well-behaved training and test loss in the low data regime, or at 100% data in the K=640640K=640K = 640 case. Figure 25: PAM-SGD test loss stable only for high values of K. Figure 26: Final test loss across training set sizes for Gemma-2-2b with TopK activation, for K=320320K=320K = 320. PAM-SGD here consistently underperforms SGD, with a major peak at 45% data. Figure 27: Final test loss across training set sizes for Gemma-2-2b with TopK activation, for K=640640K=640K = 640. PAM-SGD here consistently underperforms SGD, with a major peak at 45% data. Figure 28: Training and test loss curves across training set sizes for Gemma-2-2b with TopK activation, for K=320320K=320K = 320. PAM-SGD has well-behaved training and test loss only for low data. Figure 29: Training and test loss curves across training set sizes for Gemma-2-2b with TopK activation, for K=640640K=640K = 640. PAM-SGD has well-behaved training and test loss only for low data and 100% data. E.3.3 TopK and ReLU activation patterns Sparsity Comparison. (Figures 30, 31 and 32) TopK by design produces a constant sparsity K=320320K=320K = 320 for both SGD and PAM-SGD. ReLU produces much denser activations, around 58.5% (approx. 2400) for SGD and 49.6% (approx. 2000) for PAM-SGD. This increased sparsity from PAM-SGD is an important advantage of the method. Figure 30: Activation sparsity comparison. ReLU yields much denser activations than TopK, and PAM-SGD activations about 15% sparser than SGD activations. Figure 31: Sparse activation patterns. Plots showing which latent neurons were active in the ReLU case, comparing SGD (left) and PAM-SGD (right). Figure 32: Sparse activation patterns. Plots showing which latent neurons were active in the TopK (K=320320K=320K = 320) case, comparing SGD (left) and PAM-SGD (right). E.3.4 Ablation study varying SGD updates per batch in PAM-SGD Number of SGD steps per batch matters for PAM-SGD. (Figures 33 and 34) For both the ReLU and TopK activations (with K=320320K=320K = 320), performance improves slightly when increasing SGD updates per batch from 1 to 3, but degrades beyond that. Too few updates prevent convergence of the inner optimization loop. Too many updates may lead to overfitting within the inner loop or instability due to misaligned gradients. PAM-SGD benefits from a moderate number of decoder updates per batch. An optimal value provides enough adaptation without overfitting, highlighting the importance of tuning this hyperparameter for practical deployments. Figure 33: Effect of SGD Updates per Batch on PAM-SGD Test Loss with ReLU activation. Performance improves up to 3 updates but degrades beyond that, suggesting an optimal trade-off. Figure 34: Effect of SGD Updates per Batch on PAM-SGD Test Loss with TopK activation. Performance again improves up to 3 updates but degrades beyond that. E.3.5 Ablation study adding weight decay Weight decay had a minor effect on performance. (Figures 35 and 36) Weight decay had a very minor effect on the SAE performance using either ReLU or TopK activations, with final test loss relatively constant, and PAM-SGD slightly outperforming SGD in the ReLU case and underperforming SGD in the TopK case. However, in the TopK case large values of weight decay are intially divergent before converging, whilst in the ReLU case this behaviour is less pronounced. Figure 35: Training and test loss curves with various weight decay parameters, with ReLU activation. Figure 36: Training and test loss curves with various weight decay parameters, with TopK K=320320K=320K = 320 activation. E.3.6 Ablation study varying the quadratic costs to move μ and ν Sensitivity to quadratic costs to move μ and ν. (Figure 37) We studied the effect of varying the values of the parameters μenc,μdec,νenc,subscriptencsubscriptdecsubscriptenc _enc, _dec, _enc,μenc , μdec , νenc , and νdecsubscriptdec _decνdec from Equation 3.1. For ReLU activation, we found that very small values of these parameters caused the test loss to begin diverging, perhaps due to numerical instability. Slightly larger values improved performance, but increases beyond that slowed the learning process to no clear gain. In the TopK case, this divergence occurred at larger values than for ReLU, but went away once the parameters were sufficiently large. Figure 37: Loss curves for ReLU activation at different ācost to moveā parameters. Figure 38: Loss curves for TopK activation (K=320320K=320K = 320) at different ācost to moveā parameters.