Papers
Topics
Authors
Recent
Search
2000 character limit reached

PolySAE: Sparse Autoencoder with Polynomial Decoding

Updated 8 February 2026
  • PolySAE is a sparse autoencoder variant that extends linear reconstructions by incorporating quadratic and cubic terms to model pairwise and triple feature interactions.
  • It employs a low-rank shared‐subspace factorization to efficiently approximate high‐order tensors and reduce parameter overhead in the decoding process.
  • Empirical evaluations demonstrate an 8%-10% F1 improvement and enhanced semantic separation, all achieved with a minimal increase in decoder complexity.

PolySAE is a sparse autoencoder (SAE) variant designed to capture the compositional structure in neural network representations by extending the linear reconstruction found in traditional SAEs to include higher-order polynomial feature interactions. Unlike classic SAEs, which decompose activations into sparse superpositions of additive dictionary atoms, PolySAE introduces quadratic and cubic decoding terms that enable modeling of pairwise and triple feature bindings. This extension preserves the interpretability provided by a linear encoder but allows the decoder to represent meanings not expressible in a purely additive basis, such as compounds, morphological binding, and multi-entity composition within LLM activations (Koromilas et al., 1 Feb 2026).

1. Motivation and Theoretical Foundations

Sparse autoencoders are widely used for interpreting the superposed internal representations of LLMs. These models express a given activation vector xRdx \in \mathbb{R}^d as a sparse code zRdsaez \in \mathbb{R}^{d_{\rm sae}}, with WencW_{\rm enc} and WdecW_{\rm dec} constituting the encoder and decoder, respectively. The conventional form:

z=S(ReLU(Wencx+benc))z = S(\mathrm{ReLU}(W_{\rm enc}^\top x + b_{\rm enc}))

x^=Wdecz\hat{x} = W_{\rm dec} z

where SS is a sparsifier (e.g., Top-KK operator), produces reconstructions via linear combination of dictionary atoms. However, the additive structure cannot disambiguate true compositional semantics from simple co-occurrence. For instance, distinguishing "Starbucks" as a composition of "star" and "coffee" features is not feasible with purely linear models; such SAEs must allocate dedicated features for the compound, compromising atomicity.

PolySAE addresses this by incorporating polynomial decoding: it enables the decoder to express both zizjz_i z_j and zizjzkz_i z_j z_k interactions, thus enriching the representational power without compromising sparse, interpretable encodings.

2. Polynomial Decoder Architecture

Let zRdsaez \in \mathbb{R}^{d_{\rm sae}}0 denote the output of the linear encoder and sparsifier. The PolySAE decoder reconstructs activations as:

zRdsaez \in \mathbb{R}^{d_{\rm sae}}1

with:

  • zRdsaez \in \mathbb{R}^{d_{\rm sae}}2 (linear term, typically zRdsaez \in \mathbb{R}^{d_{\rm sae}}3)
  • zRdsaez \in \mathbb{R}^{d_{\rm sae}}4 (quadratic term)
  • zRdsaez \in \mathbb{R}^{d_{\rm sae}}5 (cubic term)
  • zRdsaez \in \mathbb{R}^{d_{\rm sae}}6 are learned scalars modulating higher-order contributions.

Storage of zRdsaez \in \mathbb{R}^{d_{\rm sae}}7 and zRdsaez \in \mathbb{R}^{d_{\rm sae}}8 naively scales as zRdsaez \in \mathbb{R}^{d_{\rm sae}}9 and WencW_{\rm enc}0, prohibitive for WencW_{\rm enc}1. PolySAE circumvents this via low-rank tensor factorization on a shared projection subspace.

3. Low-Rank Shared-Subspace Factorization

Feature interaction tensors are approximated in a low-rank fashion using a shared basis. Defining WencW_{\rm enc}2 (feature-projection matrix, typically WencW_{\rm enc}3), project WencW_{\rm enc}4 as WencW_{\rm enc}5. Output-projection matrices WencW_{\rm enc}6, WencW_{\rm enc}7, WencW_{\rm enc}8 with WencW_{\rm enc}9 parameterize outputs. The reconstruction is

WdecW_{\rm dec}0

with WdecW_{\rm dec}1 denoting elementwise product. This construction yields tensor factorizations:

WdecW_{\rm dec}2

WdecW_{\rm dec}3

All interaction orders share WdecW_{\rm dec}4, ensuring interaction structure remains aligned with learned features. Enforcing WdecW_{\rm dec}5 (orthonormality) prevents degeneracy. Empirical ablations show that increasing WdecW_{\rm dec}6 beyond WdecW_{\rm dec}7 yields negligible reconstruction gains, supporting the hypothesis that interaction structure is low-rank in practice.

4. Training Objective and Computational Considerations

PolySAE is trained with a reconstruction loss plus optional sparsity regularization:

WdecW_{\rm dec}8

WdecW_{\rm dec}9

z=S(ReLU(Wencx+benc))z = S(\mathrm{ReLU}(W_{\rm enc}^\top x + b_{\rm enc}))0

Typically, hard z=S(ReLU(Wencx+benc))z = S(\mathrm{ReLU}(W_{\rm enc}^\top x + b_{\rm enc}))1-sparsity is used (no z=S(ReLU(Wencx+benc))z = S(\mathrm{ReLU}(W_{\rm enc}^\top x + b_{\rm enc}))2 penalty), with Adam optimizer (learning rate z=S(ReLU(Wencx+benc))z = S(\mathrm{ReLU}(W_{\rm enc}^\top x + b_{\rm enc}))3). z=S(ReLU(Wencx+benc))z = S(\mathrm{ReLU}(W_{\rm enc}^\top x + b_{\rm enc}))4 is maintained orthonormal via positive-QR retraction post-update.

The parameter overhead, for z=S(ReLU(Wencx+benc))z = S(\mathrm{ReLU}(W_{\rm enc}^\top x + b_{\rm enc}))5 and z=S(ReLU(Wencx+benc))z = S(\mathrm{ReLU}(W_{\rm enc}^\top x + b_{\rm enc}))6, adds z=S(ReLU(Wencx+benc))z = S(\mathrm{ReLU}(W_{\rm enc}^\top x + b_{\rm enc}))7 parameters. On GPT-2 Small (z=S(ReLU(Wencx+benc))z = S(\mathrm{ReLU}(W_{\rm enc}^\top x + b_{\rm enc}))8), this results in a decoder parameter increase of only z=S(ReLU(Wencx+benc))z = S(\mathrm{ReLU}(W_{\rm enc}^\top x + b_{\rm enc}))9–x^=Wdecz\hat{x} = W_{\rm dec} z0 over a vanilla Top-x^=Wdecz\hat{x} = W_{\rm dec} z1 SAE. This efficiency makes PolySAE tractable for large dictionary widths (x^=Wdecz\hat{x} = W_{\rm dec} z2).

5. Empirical Evaluation

PolySAE was evaluated on residual activations from four LLMs (GPT-2 Small, Pythia-410M, Pythia-1.4B, Gemma-2-2B) and three sparsifiers (TopK, BatchTopK, Matryoshka), with x^=Wdecz\hat{x} = W_{\rm dec} z3 and x^=Wdecz\hat{x} = W_{\rm dec} z4. Key empirical findings:

  • Reconstruction Error: MSE remains nearly unchanged (e.g., on GPT-2: SAE MSE x^=Wdecz\hat{x} = W_{\rm dec} z5, PolySAE MSE x^=Wdecz\hat{x} = W_{\rm dec} z6).
  • Probing F1 Score: Average improvement of x^=Wdecz\hat{x} = W_{\rm dec} z7 in F1 on six linguistic tasks across all models and sparsifiers (e.g., GPT-2 TopK: x^=Wdecz\hat{x} = W_{\rm dec} z8).
  • Distributional Separation: Wasserstein distances between class-conditional feature codes increase by x^=Wdecz\hat{x} = W_{\rm dec} z9-SS0, indicating better separation of semantic classes.
  • Compositionality vs. Co-occurrence: PolySAE’s learned quadratic interaction strengths (SS1) have low correlation with empirical co-occurrence (SS2), compared to vanilla SAE feature covariances (SS3). This demonstrates capacity for capturing true compositional (not surface-level) interactions.
Metric SAE PolySAE Key Improvement
Reconstruction MSE (GPT-2) 0.52 0.55 SS4unchanged
Probing F1 (GPT-2, TopK) 67.1% 77.9% +10.8% absolute
Pearson SS5 (co-occurrence v. interaction) 0.82 0.06 Drastic decorrelation
Decoder Overhead (GPT-2) SS63% Minimally increased size

6. Representative Feature Interaction Examples

Observed qualitative differences between PolySAE and standard SAEs underscore the model’s capability for capturing genuine composition:

Second-Order Interactions:

  • [star, stars] × [coffee, tea]: Correctly binding to “Starbucks” in appropriate contexts, contrasted with generic proper-noun firing in SAEs.
  • [surgery, repair] × [Trans, LGBT]: Specializes “surgery” under “Trans/LGBT,” tightening semantic scope.
  • [DNA, genetic] × [mod, mods]: Recovers the meaning of “genetic modification,” not just an agglomeration of "edit" features.

Third-Order Interactions:

  • [proved, proven] × [star, stars, superstar] × [reputation, fame]: Isolates relevant multiway semantic binding for sentences like “David Bowie proved some stars are big enough...”.
  • [black, racial] × [Americans, Canadians] × [people, women]: Disambiguates “Black Americans” intersection away from generic ethnicity features.

These interactions show that PolySAE allocates decoding capacity to morphology, phrasal semantics, and named-entity composition without proliferating monolithic dictionary atoms.

7. Summary and Significance

PolySAE introduces tractable, low-rank higher-order decoding to sparse autoencoders, enabling feature interactions that reflect genuine compositional semantics in LLM activations. It maintains the linear, interpretable encoder—critical for feature analysis—while enhancing decoder expressivity with minimal computational and parameter overhead (SS7 on GPT-2 Small). PolySAE demonstrates robust empirical improvements: average SS8 gain in probing F1, SS9–KK0 better class separation, and nearly zero correlation with surface-level co-occurrence. Its design and evaluation suggest a substantial advance in the analysis of compositional structure in neural representations (Koromilas et al., 1 Feb 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to PolySAE.