Deep networks rely mostly on neuron sign patterns for classification
The Sign Code: The Hidden Binary Nature of Deep Networks
Machine Learning
Summary
When a deep learning model makes a decision, each neuron produces a number that has a positive or negative sign and a size. The authors found that the pattern of just these signs, ignoring the sizes, is enough for the model to classify images almost as well as using the full numbers. Changing the signs a little causes big drops in accuracy, while messing with the sizes doesn’t. This means the hidden sign pattern is a key factor in how these networks work.
What this means in practice
- •For machine learning engineers: Simplify model analysis by focusing on binary neuron sign patterns to maintain classification accuracy.
- •For neural network hardware designers: Design efficient hardware that processes binary sign codes to reduce complexity and power use in vision models.$Commercial implications: Enables development of low-power AI chips by leveraging sign-based computations for image classifiers.
Authors
Niclas Göring, Shuofeng Zhang, Roi Holtzman, Yoonsoo Nam, Ard A. Louis
Abstract
Every neuron in a trained network outputs a number that can be separated into its sign (positive or negative) and its magnitude (absolute size). We call the set of all neuron signs the \textit{sign code}. This raises a key question: does classification depend more on the sign code or on the magnitudes? For overparameterized vision classifiers with sign-preserving activations, the answer is overwhelmingly the sign code. A $k$-nearest neighbor classifier operating only on this binary sign code achieves accuracy comparable to the full model across different architectures, activation functions, and datasets. Moreover, replacing all magnitudes in every layer with random noise while keeping the original signs barely changes residual network performance. In contrast, flipping just 20\% of the signs reduces accuracy to chance. Models generalize well when same-class inputs share similar sign codes. When this overlap is disrupted by a regularizer, training accuracy remains high, but test performance collapses. A margin decomposition helps explain these results: the sign-only contribution to each logit grows as $\sqrt{d}$ in network width, dominating the magnitude residual. The natural unit of analysis for these networks may not be through their continuous weight space but instead through their discrete sign codes.