research digesten April 15, 2026 4 min read
The Discrete Charm of the MLP: Why Transformer Feed-Forward Layers Act Like Switchboards, Not Splines
By kualia research desk
The standard theoretical framework for understanding multilayer perceptrons, particularly within transformer architectures, treats them as smooth function approximators. Drawing from the universal approximation theorem and the spline characterization of deep networks by Balestriero and Baraniuk, we conceptualize MLPs as continuous piecewise affine mappings that partition input space into polytopes, fitting local linear functions to approximate complex manifolds. This view is mathematically rigorous and intuitively satisfying. However, Peter Balogh's recent study, "The Discrete Charm of the MLP: Binary Routing of Continuous Signals in Transformer Feed-Forward Layers," presents compelling empirical evidence that this framing, while technically correct, obscures the actual computational character of these networks. Balogh demonstrates that transformer MLPs function less like curve fitting devices and more like discrete switching networks, routing continuous signals through binary decision boundaries that determine which tokens require nonlinear processing.
The Consensus Architecture: From Diffuse Processing to Discrete Routing
Balogh's investigation centers on GPT-2 Small, analyzing the 124 million parameter model through the lens of neuron activation patterns. The analysis reveals a striking structural organization in the feed forward layers, particularly a consensus architecture in Layer 11 composed of seven "default-ON" neurons and a single exception handler, neuron 2123. This ensemble operates with 93 to 98 percent mutual exclusivity, functioning effectively as a binary routing switch. When the consensus neurons agree that standard processing suffices, the MLP contributes minimally to the residual stream. When neuron 2123 activates, indicating an exception condition, the network engages in substantial nonlinear computation.
This architecture is not uniform across depth. Balogh identifies a developmental arc spanning the network's layers. Early layers, specifically layers 1 through 3, employ single gateway neurons to route exceptions without requiring consensus quorums. Middle layers, 4 through 6, exhibit diffuse processing patterns lacking clear gateway or consensus structures. Late layers, 7 through 11, crystallize into full consensus exception architectures with quorum sizes increasing from 1 to 3 to 7 neurons. This progression suggests that the network learns hierarchical abstractions where early layers make simple routing decisions, middle layers perform distributed feature extraction, and late layers implement discrete categorical switches for complex exception handling.
The functional significance of this routing structure is validated through causal interventions. Removing or ablating the MLP computation at points of consensus breakdown, where the binary routing disagrees, incurs a perplexity cost of 43.3 percent on the OpenWebText validation set. In contrast, removing the MLP during full consensus periods costs only 10.1 percent perplexity. This fourfold difference confirms that the binary routing decision determines when the MLP's nonlinear capacity is actually necessary. The network is not continuously approximating a smooth function; it is selectively applying computational resources based on discrete categorical judgments.
Beyond Smooth Approximation: The Failure of Polynomial Fits
If MLPs were truly implementing smooth spline approximations along the data manifold, we would expect to recover polynomial structure in their nonlinear transformations. Balogh tests this hypothesis directly by fitting polynomials of degrees 2 through 7 to the MLP outputs using cross validation. The results are striking: even for highly nonlinear layers, polynomial fits never achieve R² values exceeding 0.06. This near complete failure of smooth polynomial approximation suggests that the piecewise affine structure of the network is not approximating a continuous underlying function with increasing local resolution.
Instead, Balogh proposes that the piecewise boundaries implement discrete routing decisions. This claim is supported by comparing binary versus continuous features for predicting routing decisions. When using binary thresholded activations to predict whether a token requires exception processing, the accuracy reaches 79.2 percent. Using continuous activation magnitudes yields only 78.8 percent accuracy, a negligible difference indicating that binarization loses essentially no information about the routing decision. However, continuous activations do carry additional information about signal magnitude, as evidenced by R² values of 0.36 versus 0.22 when predicting output contributions. This dichotomy is crucial: the routing decision is binary, but the signal being routed remains continuous.
This finding resonates with the Kolmogorov representation theorem, which guarantees that continuous multivariate functions can be decomposed into compositions of univariate functions. While MLPs literally implement this structure through linear combinations and pointwise nonlinearities, the theorem does not specify the character of the univariate functions. Balogh's results suggest these functions are not low degree polynomials amenable to smooth approximation, but rather high degree or non polynomial switching functions that implement discrete routing logic.
Your Take: Switching Networks and the Future of Efficient Computation
Balogh's routing characterization invites us to reconsider the fundamental nature of transformer computation. The analogy to Claude Shannon's 1937 analysis of relay circuits is particularly apt. Shannon demonstrated that relay switches, despite being continuous electromechanical devices with variable current flow, could be understood purely through Boolean algebra. The continuous properties of current were computationally irrelevant; only the discrete ON/OFF switching pattern mattered. Transformer MLPs present a more nuanced case. Like Shannon's relays, they make discrete binary decisions about
This digest was drafted by kualia's research assistant from a public paper and reviewed before publishing. It summarises the paper; it is not a substitute for reading it.