arXiv:2610.23616cs.LGOct 2026

Manuscript Offprint

arXiv:2610.23616

The Sign Code: The Hidden Binary Nature of Deep Networks

Niclas Göring, Shuofeng Zhang, Roi Holtzman, Yoonsoo Nam, Ard A. Louis

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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 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 d\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.

1 Introduction

ReLU networks admit a clean piecewise-linear decomposition: each input activates a subset of neurons, and within the resulting region the network acts as an affine map. This combinatorial structure has been a productive lens on deep learning, underpinning analyses of linear-region counts [Pascanu et al., 2013, Montúfar et al., 2014, Raghu et al., 2016, Serra et al., 2017, Hanin and Rolnick, 2019, Gamba et al., 2022], spline and max-affine views [Balestriero and Baraniuk, 2018], and gate-and path-based studies of expressivity and generalization [Neyshabur et al., 2015a,b, Fiat et al., 2018, Lakshminarayanan and Singh, 2020, Gonon et al., 2023, Lebeurrier et al., 2026]. But modern networks rarely use ReLU, while SiLU, GELU, and tanh have no piecewise-linear structure to exploit so that the tools built around ReLU do not transfer. We ask whether the combinatorial object underlying these ReLU analyses, which side of each neuron's hyperplane the input falls on, survives the move to smooth activations, and whether it remains the dominant carrier of classification signal.

For any sign-preserving activation φ\varphi (ReLU, SiLU, GELU, tanh), each neuron output decomposes exactly as hi(x)=Si(x)⋅Mi(x)h_i(x) = S_i(x) \cdot M_i(x), where Si∈{−1,+1}S_i \in \{-1, +1\} is a binary sign and Mi=∣hi∣M_i = |h_i| is a non-negative magnitude (Figure 1a,b). The sign identifies which combinatorial region of representation space the input occupies; the magnitude specifies where within that region. We call the collection {Si(x)}\{S_i(x)\} the sign code of the network, and ask whether it alone carries the essential information for classification. Across architectures, activations, and datasets, our experiments reveal a sharp

*Corresponding author: niclas.goring@physics.ox.ac.uk

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

asymmetry: the sign code is sufficient to recover full-model accuracy and causally dominant under intervention, while magnitudes are largely redundant (Figure 1c).

a)

b)

Figure

c)

Figure

Figure 1: a) Every neuron in a feedforward network computes a pre-activation zj(ℓ)z_j^{(\ell)}, which the activation function maps to hj(ℓ)=φ(zj(ℓ))h_j^{(\ell)} = \varphi(z_j^{(\ell)}). b) For any sign-preserving activation, this output decomposes as hj=Sj⊙Mjh_j = S_j \odot M_j: a binary sign Sj∈{−1,+1}S_j \in \{-1, +1\} encoding which side of the neuron's hyperplane the input falls on, and a non-negative magnitude Mj=∣hj∣M_j = |h_j| encoding how far. We test the causal role of each component with two channel-isolating interventions: randomly flipping signs while preserving magnitudes, or replacing magnitudes while enforcing the sign code. c) Flipping just 20% of sign bits collapses accuracy to chance (red); replacing every magnitude in every layer preserves far more classification performance (blue), and is nearly lossless for residual networks. The forward computation is dominated by binary routing decisions rather than raw activation strengths.