Preserving Bilinear Weight Spectra with a Signed and Shrunk Quadratic Activation Function
Jason Abohwo, Thomas Mosen · 2025
Read Preserving Bilinear Weight Spectra with a Signed and Shrunk Quadratic Activation Function by Jason Abohwo, Thomas Mosen (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2509-01874.txt.
Introduction
Jason Abohwo and Thomas Mosen design an activation function that keeps neural network weights readable. Activation functions shape each unit output in a network. Most interpretability work reads activations, but reading weights directly would be cheaper and more certain. Past weight reading tricks hurt accuracy or need much data.
Their Signed Quadratic Shrink function lets gated units learn features that stay legible in the weights. Gated units multiply two paths to select useful signals. In tests, the new function matches top rivals on task scores. At the same time it enables weight based reading of learned features. The trade-off between clarity and skill shrinks with this design.
Catalog record
| CREATOR | Jason Abohwo, Thomas Mosen |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 19 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2509-01874
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Preserving Bilinear Weight Spectra with a Signed and Shrunk Quadratic Activation Function Jason Abohwo, Thomas Mosen Abstract Understanding the inner workings of machine learning models is critical for ensuring their reliability and robustness. Whilst many techniques in mechanistic interpretability focus on activation-driven analyses, being able to derive meaningful features directly from the weights of a neural network would provide greater guarantees and more computational efficiency. Existing techniques for analyzing model features through weights suffer from drawbacks such as reduced performance and data inefficiency. In this paper, we introduce Signed Quadratic Shrink (SQS)—an activation function designed to allow Gated Linear Units (GLUs) to learn interpretable features without these drawbacks. Our experimental results show that SQS achieves performance competitive with state-of-the-art activation functions whilst enabling weight-based interpretability. 1 Introduction Understanding how neural networks make decisions is crucial for ensuring models are robust, and one promising avenue towards this is weight-based interpretability. One path to reaching weight-based interpretability that has been explored in previous work is to design performant, innately interpretable architectures. To this end, Sharkey [ 1 ] proposed the use of bilinear MLPs (MLPs in the form (Wx+b)(Vx+c) i.e,. Gated Linear Units (GLUs) [ 3 ] without the activation function) to enable neural networks to learn interpretable features. Following up on this, Pearce et al. [ 2 ] demonstrated that Bilinear MLPs naturally lead to the development of features that can be interpreted via weight spectra. Though Bilinear MLPs allow for this, in some scenarios, they lag behind state-of-the-art GLUs like SwiGLU and GEGLU [ 11 ] in performance [ 11 ] and data efficiency [ 11 ] . To rectify this shortcoming, we propose Signed Quadratic Shrink (SQS)—an activation function for GLUs that yields performance and data efficiency on par with current activation functions (e.g., SwiGLU, GEGLU) [ 16 ] whilst also preserving the weight structure properties that bilinear MLPs yield. 2 Related Works 2.1 Bilinear Multi-Layer Perceptrons Bilinear MLPs [ 11 , 1 , 2 ] are Gated Linear Units (GLUs) [ 3 ] that yield interpretable features due to a lack of activation function. Traditional GLUs can be expressed as (Wx+b)\odot\sigma(Vx+c) , where W and V are weight matrices, b and c are vector biases, and x is a given input vector. Bilinear MLPs are GLUs in the same form, without the activation function \sigma (i.e. (Wx+b)\odot(Vx+c) ). From this, each output logit can be expressed as: g(x)_{a}=(W_{a}^{T}x)(V_{a}^{T}x)\implies g(x)_{a}=(x^{T}W_{a})(V_{a}^{T}x)\implies g(x)_{a}=x^{T}A_{a}x As stated by Pearce et al. [ 2 ] , since the interaction matrix A_{a} is evaluated with two copies of x, it can be expressed as the sum of a symmetric and anti-symmetric matrix; however, the anti-symmetric component always evaluates to 0, which implies that A_{a} is a symmetric matrix. As a result, through eigen-decomposition, we have the following: g(x)_{a}=(x^{T}A_{a}x)=\sum_{i}^{d}\lambda_{i}(v_{i}^{T}x)^{2} 3 Methodology 3.1 Signed Quadratic Shrink To rectify the shortcomings of Bilinear MLPs, we introduce Signed Quadratic Shrink (SQS). We motivate our activation function by the following properties of traditional MLPs and Bilinear MLPs. Figure 1: ReLU [ 5 ] , GeLU [ 4 ] , Swish [ 10 ] SQS ( p=1 , \lambda=.5 , c=.5 ) functions. We include x \cdot SQS to provide intuition for the use of SQS within a GLU [ 3 ] . As noted by Pearce et al. [ 2 ] , a given output logit of a bilinear layer can be formulated as g(x)_{a}=(x^{T}A_{a}x)=\sum_{i}^{d}\lambda_{i}(v_{i}^{T}x)^{2} . With this, regular MLPs can be seen as a special case in which \lambda and v are shared between output logits. This then reduces the bilinear to an MLP with a quadratic activation function (i.e. g(x)=((XV)^{\odot 2})^{T}\Lambda , where V and \Lambda are weight matrices). Quadratic activations have 2 main issues: vanishing gradients for small x and exploding gradients for large x. To rectify this, we modify the activation function as follows: f(x)=x^{2}\rightarrow g(x)=\frac{(|x|+c)^{2}-c^{2}}{(1+(\lambda|x|)^{p})^{\frac{1}{p}}} In this function, the c hyperparameter provides a shift to the original function, and the term (1+(\lambda|x|)^{p})^{\frac{1}{p}} adds a shrinking factor, governed by \lambda and p , to the output. Note that g=f if hyperparameters c=\lambda=0 and p=1 . We then adapt this g(x) for GLUs by factoring out an |x| and adding a component to maintain directional information in the gate. Thus Signed Quadratic Shrink can be formulated as (we omit biases here for brevity): \sigma(x)=\frac{x}{\lvert\lvert x\lvert\lvert}\cdot\frac{\lvert x\rvert-c}{(1+(\lambda\lvert x\rvert)^{p})^{\frac{1}{p}}}\quad\quad(Wx)\odot\sigma(Vx)=\frac{x}{\lvert\lvert x\lvert\lvert}\cdot\frac{Wx\odot\lvert Vx\rvert-c(Wx)}{(1+(\lambda\lvert Vx\rvert)^{p})^{\frac{1}{p}}} Which can be approximated by the following if p=1 : sgn(x)=\begin{cases}1,&x\geq 0,\\ -1,&x<0,\end{cases}\quad\sigma(x)=\frac{x-c\,\operatorname{sgn}(x)}{1+\lambda\,x\,\operatorname{sgn}(x)} Effectively, this function is quasi-linear for |x|<<1 and |x|>10 and is otherwise similar to a signed quadratic function. Figure 1 provides a visualization of Signed Quadratic Shrink. 4 Experiments For our experiments, we evaluate SQS, GeLU [ 4 ] , and ReLU [ 5 ] GLUs as well as Bilinear GLUs [ 2 ] on MNIST [ 6 ] , Fashion MNIST [ 7 ] , and Tiny Stories [ 8 ] . For all uses of SQS, we set \lambda=.5 , c=.01 (as we find that this yields the most interpretable eigenvectors whilst maintaining performance on par with current activation functions), and p=1 (for computational efficiency. We note that despite the complexity of the function, with p=1 , a triton implementation of SQS runs in time on par—see Appendix C). 4.1 MNIST and FMNIST: SQS-GLU Learns Interpretable Eigenfeatures For this section, we follow the same procedure elucidated by Pearce et al. [ 2 ] . More specifically, we analyze a shallow Feed-Forward network consisting of an embedding projection, an SQS-GLU, and an output projection (see Appendix A for details). Figure 2: A) On the Top Eigenvectors after Eigendecomposition on each output dimension of the SQS-GLU. The top row, in order, contains the eigenvectors for 1, 2, 3, 4, and 5. The bottom row, in order, contains the eigenvectors for trousers, pullover, dress, coat, and sandal. B) The cosine similarity between eigenvectors derived from an SQS-GLU and a Bilinear MLP averaged across 5 runs. Our results demonstrate that SQS-GLU facilitates the learning of interpretable features as revealed through eigenvector decomposition. Figure 2 displays the top eigenvectors for five classes in both datasets. Visually, these eigenvectors can be seen to correspond to distinct classes in MNIST and FMNIST, respectively. Additionally, we compare the eigenvectors derived from SQS-GLU to those from Bilinear MLPs to assess similarity in learned features. As shown in Figure 2 , the cosine similarity between the eigenvectors from these two architectures is relatively high (never below .5 and .95 for the most important eigenvectors), supporting the notion that SQS-GLU retains the interpretability of Bilinear MLPs. Through these experiments, we establish that SQS-GLU, similarly to the Bilinear MLP [ 2 ] generates eigenfeatures that are meaningful and consistent with human intuition. 4.2 Performance Results In this section, we demonstrate that SQS achieves results competitive with previous activation functions with respect to final performance and data efficiency (measured as loss/evaluation metric vs training iteration). To this end, we conduct experiments on MNIST [ 6 ] , FMNIST [ 7 ] , and Tiny-Stories [ 8 ] . 4.2.1 MNIST and FMNIST For MNIST [ 6 ] and FMNIST [ 7 ] , we train 2-layer MLPs for 20 epochs with a batch size of 512 and report the average over 5 runs (more details