Bug or Feature^2: Weight Drift, Activation Sparsity, and Spikes

Hugging Face Daily Papers Papers

Summary

This paper formally proves that training neural networks with asymmetric activation functions like ReLU, GELU, or SiLU causes weights to drift negative, leading to up to 90% activation sparsity. It also shows that squared activations like ReLU² improve performance but cause activation spikes, which can be fixed by clipping, with GELU² achieving the best validation loss.

The design of modern neural architectures has converged through incremental empirical choices, yet the mechanisms governing their training dynamics remain only partially understood. We identify and analyze a negative weight drift induced by the interaction between standard losses and positively biased activation functions. We prove that under MSE or cross-entropy loss, the gradient with respect to positive pre-activations is non-negative in expectation at initialization, driving downstream weights toward negative values during early training. The drift is intrinsic to optimization rather than data, and persists across architectures (MLP, ResNet, ViT, GPT-nano, MP-SENe) and asymmetric activation functions (ReLU, GELU, SiLU). Coupled with ReLU, weight drift produces activation sparsity reaching up to 90\% in GPT-nano. We characterize the sparsity-accuracy tradeoff across 79 configurations and identify a sharp accuracy cliff above sim70\% activation sparsity. While ReLU^2 achieves a good sparsity--accuracy ratio in GPT-nano, it pathologically amplifies identified activation spikes in intermediate transformer layers. Clipping resolves this while preserving the representational benefits of squaring: clipped ReLU^2 outperforms its unclipped version, and GELU^2 achieves the lowest validation loss on GPT-nano. Code is available at https://github.com/On-Point-RND/BugOrFeature.
Original Article
View Cached Full Text

Cached at: 05/20/26, 10:40 PM

Paper page - Bug or Feature^2: Weight Drift, Activation Sparsity, and Spikes

Source: https://huggingface.co/papers/2605.17659 Every time you train a network with ReLU, GELU, or SiLU, your weights quietly drift negative. Not because of your data, it happens onrandom inputstoo. It’s baked into the math of gradient descent + asymmetric activations.

We prove it formally (MSE & cross-entropy) and show it across MLP, ResNet, ViT, GPT, and a speech model.

**What does this drift do?**Negative weights push pre-activations into negative regions, and with ReLU, up to 90% of activations end up being zero zeroed out by the very same function that caused the drift in the first place! Bug or feature? Depends on how to use it.

**The most interesting finding:**ReLU² boosts GPT-nano performance but it pathologically amplifies activation spikes by 25×. The fix is simple:clip it. Clipped ReLU² and GELU² both outperform their non squared versions, with GELU² achieving the best validation loss overall on GPT-nano.

💻 Code: github.com/On-Point-RND/BugOrFeature

Similar Articles

A law of robustness for two-layer neural networks with arbitrary weights

arXiv cs.LG

This paper proves a conjectured law of robustness for two-layer neural networks with unbounded weights, showing that a network fitting noisy data must have a Lipschitz constant at least of order sqrt(n/m), up to a logarithmic factor, for continuous piecewise-linear activations like ReLU.

Hidden Gauge Controls Feature Specialization in ReLU Networks

arXiv cs.LG

A theoretical study shows that in overparameterized ReLU networks, a positive-homogeneous scaling gauge hidden in the initial parameters can deterministically control which duplicate neuron learns a teacher feature, affecting specialization time and pruning trajectories.