On the Number of Linear Regions of Deep Neural Networks
Paper · 2014 · Guido Montúfar, Razvan Pascanu, Kyunghyun Cho et al.
Summary
A neural network can place its hidden units side by side or make some of them work on the results of others. What does the second arrangement buy? The authors answer by counting how many separate parts of the input space can have their own affine response, meaning a fixed set of slopes and an offset. They call these parts linear regions. The count gives a concrete way to compare what different arrangements of units can express. The study concerns feedforward networks whose hidden operations are piecewise linear, including rectifiers, which replace negative preactivations with zero, and maxout units, which return the largest of several affine responses.
The advantage of depth comes from what a layer can make identical. Imagine that several different neighborhoods of the input all cover the same range of intermediate activations. A later layer can divide that shared range into smaller pieces, and its divisions will appear back in every neighborhood that reached it. The authors call this folding. One layer can fold a range that an earlier layer has already folded, so the number of copies can multiply while the computation producing each copy is shared. The copies are related by construction, which explains how a function can have many pieces even though relatively few parameters specify it.
For rectifiers, the authors show how to place several folds along each input coordinate and combine them across coordinates. A final layer then subdivides the common image. The resulting lower bound strengthens an earlier rectifier result. In architectures that support repeated folds, the guaranteed number of attainable regions grows exponentially with depth. For a shallow rectifier network using the same total number of hidden units, the maximum grows polynomially with that total when the input dimension is fixed. A separate construction gives an exponential depth dependence for maxout networks, where the regions arise from competition among affine candidates.
A synthetic binary classification experiment illustrates why the extra pieces can matter. On data with a sinusoidal decision boundary, the reported shallow fit with 20 hidden units makes 123 mistakes. The reported deeper fit, with 10 units in each of two hidden layers, makes 24. A study on the Toronto Faces Dataset examines the mechanism more closely. It recovers the local affine responses of selected hidden units and shows distinct inputs bringing a higher-layer unit to the same activation through different local computations. The experiments illustrate boundary fitting and unit behavior. The exponential comparison comes from the constructions, which establish what suitable weights can express and leave open how often training finds such partitions or whether their size improves generalization.
Deep dive: On the Number of Linear Regions of Deep Neural Networks
A geometric study of how deep neural networks use rectifier and maxout layers to create many linear regions with relatively few units. · about 38 minutes to read
The problem and its context
Approximation with a limited supply of units
The motivation came from a contrast between practice and theory. Deep networks were already being used successfully in machine learning tasks such as traffic-sign recognition, speech recognition and image classification. The authors cite a convolutional image classifier as one example. Such successes made the arrangement of layers worth studying in its own right. An improvement on a task could have several causes, however, and a task score alone could scarcely tell the authors how much of the difference came from the functions the architecture could represent. ImageNet Classification with Deep Convolutional Neural Networks
A shallow network was already known to be a powerful approximator when given a sufficiently large hidden layer. The paper reviews universal approximation results for feedforward networks and mentions related investigations of probability distributions and approximation in deep belief networks. The question here changes the comparison. Once the number of available units matters, the size of the hidden layer needed to express a complicated response becomes part of the answer. Universal approximation leaves room for a substantial difference in how economically two architectures express the same kind of behavior.
Work on sum-product networks gave the authors a precedent. The earlier analysis considered families of polynomials and showed that a shallow arrangement could require exponentially more units than a deep one for those families. It was an example of a depth advantage established through a specific kind of computation. The present paper seeks a comparable explanation for activation functions becoming common in practical feedforward networks. The polynomial argument belongs to a different architecture, so the authors need a property of the newer operations that they can analyze directly.
The immediate predecessor was an analysis by Pascanu and colleagues of networks built from rectifiers. It had already established an asymptotic separation between deep and shallow arrangements when total hidden-unit counts agree. Its measure was the number of distinct regions of linear response. The authors retain that measure and ask how composition produces those regions. They also want an argument that can reach a second type of unit, maxout, and a rectifier construction that makes more effective use of the input dimensions.
A measure tied to the activation function
A rectifier has a sharp change of behavior where its preactivation passes through zero. On one side it returns a constant. On the other it follows its weighted input. A maxout unit has a change of behavior wherever one of its candidate functions overtakes another at the maximum. These transitions give the authors concrete boundaries to study. A bounded smooth activation or a Boolean unit, both familiar from earlier work discussed by the authors, would call for a different description of its behavior.
Inside a region, the network’s response has fixed slopes and a fixed offset. For a scalar output, this gives a flat piece of the graph. For a vector output, each output coordinate has an affine formula on the same piece of input space. The offset matters because the network’s biases allow these formulas to be shifted. The paper uses the name linear region for this affine case as well.
The definition adds two requirements that keep the count meaningful. The input set must be connected, and it must be maximal for the formula in question. Cutting a neighborhood into smaller pieces while keeping the same affine rule does not create new regions. A disconnected repeat, in contrast, can occupy different regions even when it uses related computations. The paper counts regions with interior in the input space. The boundaries shared by adjoining pieces describe where behavior can change and are treated separately from the full-dimensional regions being counted.
This measure concerns the network’s continuous response. A classifier can keep assigning the same label while its underlying response changes affine rule, and it can switch labels within an affine piece when the relevant outputs exchange order. The region count therefore describes an aspect of flexibility that matters for decision boundaries without simply counting predicted classes or boundary segments.
Why composition changes the counting problem
In a shallow rectifier network, every hidden unit reads the original coordinates. Its switch occurs along a hyperplane, the higher-dimensional analogue of a straight dividing line. The units collectively place an arrangement of hyperplanes in the input space. Each open cell of the arrangement gives a consistent answer to the question of which side of each switch the input occupies. The theory of hyperplane arrangements already provides a way of counting how many cells can result.
A later rectifier also places a hyperplane, but in the coordinates it receives from the preceding layer. Those coordinates can have different affine relationships to the original input in different neighborhoods. Following the later hyperplane back to the original space can therefore give different boundary pieces in different places. The authors’ approach is to construct intermediate maps for which this effect is predictable. They arrange for several neighborhoods to reach the same part of activation space, where the later layer can apply a common subdivision.
This view also leads to a question about interpretability. A later unit has a stored vector of weights on its immediate inputs. Those inputs are themselves responses of earlier units, so the vector that describes the later unit’s sensitivity to the original input can change from place to place. The paper connects its geometric argument to a way of recovering those local vectors. An earlier visualization study started from the related problem of approximately reversing computation in a convolutional network. The authors start from the affine calculation selected by a particular input and follow it forward. Visualizing and Understanding Convolutional Networks
The method, step by step
Follow an input through the network
A hidden layer performs two operations in order. It forms weighted sums with offsets, called preactivations, and applies an activation function to them. The resulting values become the next layer’s inputs. The architecture specifies the input dimension, the number of hidden layers, and the number of units in each layer. Weights and offsets determine which function an architecture actually computes.
F(x; θ) = (f_out ∘ g_L ∘ f_L ∘ … ∘ g₁ ∘ f₁)(x)
Here F is the network function, x is the original input vector, and θ collects its parameters. L counts the hidden layers. The function f at each indexed layer forms its preactivations, and the corresponding g forms its activations. The subscript out refers to the output transformation. The composition sign ∘ means the function on the right acts first. The ellipsis stands for the intervening pairs of transformations.
f_l(x_(l−1)) = W_l x_(l−1) + b_l
The index l labels the current layer. The vector x_(l−1) contains the preceding activations, or the original input when l is the first hidden layer. The matrix W_l gives the weights, and the vector b_l gives the biases. If the preceding layer has width n_(l−1), the weight matrix has that many columns. For n_l units with k preactivation candidates apiece, it has k n_l rows and the bias vector has k n_l entries. The resulting preactivations are grouped by unit.
x_(l,i) = g_(l,i)(f_(l,i)(x_(l−1)))
The index i selects a unit within layer l. Its preactivation or group of preactivations is f_(l,i), its activation function is g_(l,i), and its resulting scalar activation is x_(l,i). Collecting these scalars gives the vector passed forward.
g(a) = max{0, a}
In a rectifier, a is the unit’s scalar preactivation and g is its activation function. The maximum operator chooses the larger of zero and a. When a is positive, the unit passes it through. When a is negative, the output stays at zero. At the switch the responses meet.
g(a₁, …, a_k) = max{a₁, …, a_k}
For maxout, a₁ through a_k are the competing preactivations, and k is the rank, the number of candidates. The dots denote all intermediate candidates. Selecting a winner selects the affine formula the unit uses there. Each hidden layer, whether rectifier or maxout, supplies a finite set of such choices. On a domain where the choices are fixed, substituting the affine calculations from layer to layer gives another affine calculation.
How the proofs construct and count replicated regions
The steps in order.
Count a layer that sees the original coordinates
For a single rectifier, the weighted sum and offset vanish on its switching hyperplane. Each row of the layer’s weight matrix gives the orientation of a switch. Its bias helps place the switch relative to the origin.
H_i = {x ∈ ℝⁿ⁰ : W_(i,:) x + b_i = 0}
The set H_i is the boundary for unit i. Here ℝⁿ⁰ is the real input space of dimension n₀, x is a vector in that space, W_(i,:) denotes row i of the weight matrix W, and b_i is that unit’s bias. The colon introduces the condition for membership in the set. Zero is the preactivation at which the unit switches branches.
Take all the hyperplanes together and consider the connected open components left between them. A component can extend indefinitely. What matters for counting it is that the side of every hyperplane is fixed throughout the component. Each component therefore determines a pattern of active rectifiers, and the hidden layer has an affine formula there.
R_shallow = Σ_(j=0)^n₀ C(n₁, j)
The quantity R_shallow is the maximum possible number of linear regions for a shallow rectifier network with input dimension n₀ and hidden width n₁. The summation sign Σ adds the terms for the indicated indices j. The binomial coefficient C(n₁, j) counts selections of j items from n₁. The paper uses a hyperplane-arrangement result to obtain this maximum. General position is the configuration that attains the largest cell count. In familiar planar terms, coincident lines or unnecessary concurrence would waste opportunities to create cells. Suitable parameters realize the full arrangement count as a function of the input.
A much broader upper bound comes from recording the switches throughout an entire rectifier network. Fix an activity pattern and replace each unit by the branch it would use in that pattern. The constraints for consistency are then affine inequalities in the original input. Where a pattern occurs on an open set, these inequalities describe a convex cell. Different patterns can yield the same overall affine rule, and some patterns are infeasible.
R_max ≤ 2^N
Here R_max is the largest attainable region count for the rectifier architecture and N counts all its hidden units. The power counts possible binary activity patterns. The inequality is an upper bound because a network can realize only the patterns compatible with its weights and with the preceding layers’ calculations. It applies without needing the particular arrangement used for the lower bound.
Work backward from a common neighborhood
The central operation is identification. Choose different input neighborhoods and apply a map to them. If each covers the very same output subset, the map identifies them. This is a setwise statement. Each neighborhood has a way to reach every value of the shared subset. Merely finding equal outputs for a few inputs would give less information about where a later operation will be reproduced.
g(x₁, x₂) = [|x₁|, |x₂|]ᵀ
In the paper’s elementary example, g is the folding map and x₁ and x₂ are the two coordinates of a planar point. The vertical bars denote absolute value and the transpose mark turns the displayed pair into a column. The signs distinguish quadrants at the input, while the output records the magnitudes. Each open quadrant covers the same open positive quadrant. A new division drawn there has a corresponding division in every original quadrant.
A neural layer can make this kind of identification with offsets and changes of orientation. Equal activation images can come from original sets of different sizes. The folding terminology describes what happens to the images of the sets, so it accommodates affine stretching and distortion. This matters when relating the geometry to learned responses, since the useful equivalences may be more complicated than reflection across an axis.
F_l = h_l ∘ … ∘ h₁
The map F_l sends an original input to the activations of layer l. The map h at each index is the complete transformation performed by that layer, with its activation applied after its preactivation. The dots denote the preceding layers in order, and ∘ again denotes composition. The authors write S_l for the image of F_l, the set of activations that original inputs can actually reach at this stage. Counting subdivisions on the full nominal activation space could include regions the network never visits.
𝒩_R^l = Σ_(R′ ∈ P_R^l) 𝒩_R′^(l−1)
Here R is a neighborhood in S_l. The set P_R^l collects the separate neighborhoods R′ from the preceding reachable space that the layer maps onto R. The count 𝒩_R^l is the number of original-input neighborhoods reaching R along these branches. Each term 𝒩_R′^(l−1) counts the original neighborhoods that already reach one of the preceding neighborhoods. The symbol ∈ indicates membership and the sum combines the contributions of the separate branches.
𝒩_R^0 = 1
The superscript zero refers to the original input, before applying the hidden layers. At that stage a chosen neighborhood R contributes itself. This is the starting value for tracing the branches backward. The point of the recursion is that a common neighborhood can have several predecessors at one stage, and each predecessor can already represent several original domains.
R_max ≥ Σ_(R ∈ P^L) 𝒩_R^(L−1)
In the paper’s lower-bound lemma, R_max is the maximum region count that can be attained, L is the final hidden-layer index, and P^L is a collection of neighborhoods in its reachable input domain. The collection is chosen so that its members lie in distinct linear regions of the last hidden transformation. The term 𝒩_R^(L−1) counts copies reaching R through the layers before it. The inequality expresses the constructive use of identification. First make many separate original neighborhoods cover a useful domain, then make the final layer act differently on pieces within it. In the concrete constructions the copied neighborhoods have full dimension, and the arrangement is chosen to yield distinguishable affine pieces.
Build a repeated fold from rectifiers
Consider a layer wide enough to devote a group of units to each input coordinate. The simple allocation used for the main bound gives every coordinate the same group size.
p = ⌊n/n₀⌋
Here p is the number of rectifiers assigned to each coordinate, n is the layer width, and n₀ is the input dimension. The floor brackets take the largest integer no greater than the quotient. Any units left over under this allocation can be omitted from this version of the construction.
For a group, all the other coordinates have zero weight. The first rectifier follows the chosen coordinate once it is positive. Other rectifiers become active as that coordinate passes successive thresholds. The weights on their outputs alternate in sign. Each newly active term changes the accumulated slope, and the slopes on successive chosen intervals have opposite signs. The appendix gives the scalar expression on an interval where the active rectifiers are fixed.
h̃(x) = x + 2 Σ_(i=1)^(k−1) (−1)^i (x − i)
The variable x now denotes the chosen scalar coordinate, lying in the interval from k−1 to k with the endpoints excluded. The index k selects one of the p intervals and has a different role here from maxout rank. The index i runs through the earlier breakpoints. The factor 2 gives the slope of a shifted rectifier on its active side, and the power of −1 alternates the signs of those contributions. The function h̃ is the effective folded coordinate.
h̃(x) = (−1)^(k−1)(x − (k−1)) − ((−1)^(k−1) − 1)/2
This is the appendix’s equivalent expression on the same interval. The power of −1 gives the slope. The subtraction and constant place the affine piece so that one end of the interval maps to zero and the other to one. The order alternates with k. Consequently the interior of every selected interval maps onto the entire open interval from zero to one. The construction singles out these branches because they have a common image of positive length. The appendix’s interval calculation is the basis for the count.
The alternating sum can be implemented by the affine preactivation of the next layer. Any subsequent weighted sum of these folded coordinates is a weighted sum of the rectifier outputs that define them. This lets the authors speak of effective intermediate coordinates even though the architecture has no additional nonlinear layer at that point. The units within a group supply the ingredients of a coordinate, and the connections to the next layer perform the combination.
Combine the folds and use the final layer
For each coordinate, a branch is an interval that maps onto the open unit interval. Pick an interval independently on every coordinate. Together the choices specify an open box in the original input, and that box maps onto the open unit cube. Choosing a different interval on any coordinate gives a separate box. Thus an equal allocation gives p choices independently in each of the n₀ directions, for p raised to the power n₀ boxes.
Inside the common cube the next layer can carry out the same strategy on a finer set of intervals. Its weights can rescale the effective coordinates so the prescribed branches lie in the available domain. Each subdivision can be pulled back through each of the branches of the preceding map. At one stage the source sets are boxes in the original coordinates. At later stages, it is the full collection of their preimages that matters. The appendix allows different allocations across coordinates and across layers.
𝒩_((0,1)^n₀)^(L−1) = Π_(l=1)^(L−1) Π_(i=1)^n₀ p_(l,i)
The left side counts the selected original neighborhoods mapped to the open cube after the layers before the last hidden layer. The interval (0,1) is open, and raising it to the power n₀ here denotes its Cartesian product across n₀ coordinates. The index l runs over the folding layers, and i runs over the coordinates. The group size p_(l,i) is the number of rectifiers at layer l assigned to coordinate i. The product sign Π multiplies the independent choices, first across coordinates and then across layers.
The final hidden layer supplies a new subdivision. It places its switching hyperplanes in general position and arranges for the cells to be represented inside the common cube. A finite arrangement can be placed there by shrinking and shifting it so the cube contains a point from each cell. Each original neighborhood that maps onto the cube then contains corresponding pieces of that partition. This is the source of the two factors in the theorem.
R_max ≥ (Π_(i=1)^(L−1) ⌊n_i/n₀⌋^n₀) Σ_(j=0)^n₀ C(n_L, j)
Here R_max is the maximum for a rectifier network with n₀ input coordinates and L hidden layers. The index i runs through the earlier layers of widths n_i, and the theorem assumes every hidden width is at least n₀. Each floored quotient gives the equal group size in a folding layer. The exponent n₀ accounts for the simultaneous coordinate choices. The last width is n_L, and the binomial sum over j gives the general-position subdivision supplied by that layer. The statement is a lower bound because the authors exhibit one way to create at least this many pieces.
R_max ≥ (Π_(l=1)^(L−1) ⌊n_l/n₀⌋^(n₀−m_l) (⌊n_l/n₀⌋ + 1)^m_l) Σ_(j=0)^n₀ C(n_L, j)
The additional symbol m_l is the remainder when the width n_l is divided by n₀. That many coordinate groups can each receive an extra rectifier, while the other groups keep the smaller size. The two powers within the product account for those two group sizes at layer l. The final sum is the same subdivision as before. If the widths divide evenly, the refined expression reduces to the main bound. When there are units left over, the refinement gives them a role in the folding and can guarantee additional copies.
Compare the two allocations of network size
The paper compares a deep rectifier network of uniform hidden width n with a shallow network using Ln hidden units. It fixes input dimension n₀ in the asymptotic discussion. For the shallow network the cell-count formula gives the following order.
R_shallow = O(L^n₀ n^n₀)
Here R_shallow is the shallow maximum under the matched hidden-unit allocation, L counts the hidden layers of the deep architecture being compared, and n is their common width. The symbol O denotes an asymptotic upper order up to a constant factor. The fixed input dimension n₀ determines the degree in this expression. The shallow architecture has a single collection of switches in the original coordinates even as its unit budget increases.
R_deep = Ω((n/n₀)^((L−1)n₀) n^n₀)
The paper states this corollary for the attainable deep rectifier count R_deep. The symbol Ω denotes an asymptotic lower order up to a constant factor. The repeated-layer factor places L−1 and n₀ together in the exponent, while the last-layer term contributes the power of n. For a specific combination of widths and depth, the theorem with the floor brackets gives the directly usable guarantee. This matters when the quotient is near the threshold for assigning an additional rectifier to a group.
R_previous = Ω((n/n₀)^(L−1) n^n₀)
Here R_previous labels the lower order established by the preceding rectifier analysis as reported in the paper. The symbols have the same architectural meanings. In that expression the input dimension appears in the final-layer width term and in the quotient, while the exponent on the repeated factor is L−1. The new construction combines folds along independent coordinates at each stage, which accounts for the input dimension’s additional role in the depth-dependent exponent of the new expression.
The authors also express the comparison in terms of parameter counts. A connection between consecutive wide layers has a weight for each pair of units it connects. The costs of a stack of such layers and of a single wide layer therefore scale differently.
P_deep = Θ(L n²)
The symbol P_deep counts the parameters of the uniform-width deep architecture in the paper’s comparison. L is the number of hidden layers, n is their width, and Θ is asymptotic order bounded both above and below up to constant factors. The squared width reflects connections between successive hidden layers.
P_shallow = Θ(L n)
Here P_shallow counts parameters in the shallow architecture with Ln hidden units, with the input and output dimensions treated as fixed in the comparison. The units see the fixed-dimensional input and feed the output layer, so their total count determines the order.
E_deep = Ω((n/n₀)^(n₀(L−1)) n^(n₀−2)/L)
The quantity E_deep is the attainable number of linear regions per parameter in the deep comparison as expressed in the paper. The symbols n, n₀ and L retain their width, input-dimension and depth meanings. The lower-order expression retains the repeated folding factor after accounting for the cost of the parameters.
E_shallow = O(L^(n₀−1) n^(n₀−1))
The quantity E_shallow is the corresponding shallow maximum per parameter. The upper-order expression has polynomial dependence with n₀ fixed. These formulas describe a region count relative to the number of adjustable parameters. Their exponential-in-parameters interpretation concerns increasing depth at fixed width in a regime where the folding factor is greater than one. The finite construction gives the appropriate starting point when both width and depth vary.
Count where maxout candidates win
The same identification question leads to different geometry for maxout. Within a unit, every candidate supplies a plane in the graph of the response. The activation follows the upper envelope of those planes. The region of a particular winner is the set of inputs where its affine value exceeds the others. Since this condition is a collection of affine inequalities, its interiors, when present, belong to a convex domain. At most k candidates can win for a rank-k unit. The maximum of k regions is attained when each candidate wins uniquely on a neighborhood. Convexity holds for the scalar response of each unit within a layer.
When several units work on the same input, a layer region can be specified by a simultaneous choice of winners. A proposed choice gives a region only when the corresponding winner domains intersect in a set with interior. The paper relates single-unit partitions to Voronoi diagrams, which divide a domain into cells associated with sites. It uses this connection to describe the geometry and obtains bounds from arrangements that are easier to count than a general intersection of diagrams.
k^min{n,m} ≤ R_layer ≤ min{Σ_(j=0)^n C(k² m, j), k^m}
Here R_layer denotes the maximum number of regions for a maxout layer with n input coordinates, m output units, and k candidates per unit. The operator min selects the smaller of its arguments. The first inequality comes from a construction in which a unit’s winners occupy successive strips along a coordinate. Using different coordinates makes these choices independent for up to the smaller of n and m coordinates. The term k^m is an upper bound on the number of winner combinations across all units.
The other upper bound uses a larger partition. When the winner changes, some pair of candidates ties. The relevant part of such an equality usually occupies only a piece of its hyperplane, since another candidate can dominate elsewhere. Extend all those pieces to full hyperplanes and count the resulting cells. The number of cells can increase under this operation. The paper uses k² as an upper count of candidate-pair boundaries for a unit. With m units the sum over j counts cells up to dimension n for the enlarged arrangement. The bound is intentionally loose when the extended cuts produce many cells unrelated to changes in the actual winner.
The appendix gives examples of special arrangements that can be described exactly. A rank-3 unit associated with a pair of coordinates can base its partition on their difference. Its parallel boundaries, combined with the boundaries from other pairs, give the Shi arrangement. For that example the coordinate difference takes the values zero and one on the two cuts. The paper states the arrangement’s count as follows.
R_Shi = (n + 1)^(n−1)
Here R_Shi counts regions of the Shi arrangement on n input coordinates. The formula is specific to the indicated arrangement of winner boundaries. The appendix also describes a rank-4 example giving a Catalan arrangement with triplets of parallel hyperplanes.
R_Catalan = n! C_n
The symbol R_Catalan is the region count for that arrangement, n is the number of input coordinates, and the exclamation mark denotes factorial. The quantity C_n is the Catalan number indexed by n.
C_n = C(2n, n)/(n + 1)
In this expression C without a subscript is the binomial coefficient, and C_n is the Catalan number just defined. The factor 2n specifies the size of the set from which n items are chosen. These examples show what can be gained from recognizing the geometry of a particular family of candidate boundaries. The single-layer bounds apply more broadly.
Stack maxout layers with shared images
The deep maxout argument uses conical neighborhoods. A candidate affine function has a gradient that points in the direction where its linear part increases most quickly. The proof arranges candidate directions so that corresponding winning cones for the units in a layer overlap. It uses slightly different coordinate orientations for the different units. On a cone with a consistent collection of winners, the layer is affine. The construction calls for the winning gradients there to form a basis, making the corresponding map full dimensional. The aim is for these cone images to share an open part and for biases to put that part where the next layer can fold it again.
R_deep,maxout ≥ k^(L−1) k^n₀
This is the paper’s stated lower bound for the maximum R_deep,maxout of a network with L layers, width n₀, input dimension n₀, and rank k. The first factor corresponds to identifying neighborhoods through the layers that precede the last one. The factor with exponent n₀ comes from the last layer, which can choose coordinate partitions of the shared domain. The paper states this result for general rank. Its treatment of candidate directions in the appendix qualifies how explicitly the displayed construction realizes the claimed number of cones.
R_rank2 ≥ 2^(n₀ L)
The quantity R_rank2 is the maximum for the separately discussed rank-2 construction at input dimension and width n₀ with L layers. The paper’s argument identifies branches across the coordinates of the intermediate layers, then uses a final subdivision. In this case a unit can select between a linear response and its reflection, so the relationship to the rectifier folds is particularly direct. This special-case expression gives a stronger depth factor than the general bound specialized to rank 2 can give when more than one coordinate contributes independently.
Recover the affine rule that a trained unit used
The empirical inspection starts with a particular input and records the branches taken on the way to a chosen unit. Fixing those branches gives the effective affine response from the original input. For an image, the coefficients can be arranged in the same layout as the input pixels. The display then shows the direction in image space to which that local response is sensitive.
f_i(x) = uᵀx + c, x ∈ R_i
Here R_i is the input domain for the selected piece, i identifies that piece, and f_i is the scalar local map. The original input is x, uᵀ is a row of effective weights, and c is the offset. The transpose symbol converts the column u to a row so that multiplication by x yields a scalar. The membership relation limits the formula to inputs in R_i. A large response may reflect the projection onto u as well as the offset, so the visualization of u is a view of local sensitivity.
uᵀ = (W_l)_(j:) diag(I_(f_(l−1)>0)(x)) W_(l−1) … diag(I_(f₁>0)(x)) W₁
The chosen unit is j in layer l, and (W_l)_(j:) is the row of incoming weights for that unit. The other W matrices are the weights of the preceding layers, ending with W₁, which acts directly on the original input. Each f in an indicator refers to the relevant preceding preactivations evaluated along the forward pass from x. The indicator I records their positive entries, and diag places the resulting indicators on the diagonal of a matrix. This leaves active rectifier paths in the product and zeros out inactive ones. The dots stand for the corresponding operations at intervening layers. The offsets can be combined along the same active paths to recover c.
The expression gives the preactivation of the chosen unit locally. It also gives the unit’s rectified response on a piece where that unit is active. The authors find local maps by visiting actual training inputs and recording their branch patterns. They can then compare maps or use a map’s direction to search for a point where the chosen unit reaches a desired activation. That procedure samples the geometry from observed inputs. The synthetic and face experiments use trained networks, whereas the proofs select weights analytically to get a known pattern of folds.
Experiments and results
Fitting the sinusoidal boundary
The synthetic task is binary classification with a curved boundary that repeats its changes of direction. Such a boundary makes the consequences of a piecewise affine response visible. Straight pieces can follow small portions of the curve. Tracking repeated bends over the range of the plot calls for changes in the rule used to draw the boundary.
Both networks receive the same synthetic dataset. The shallow multilayer perceptron has a single hidden layer with 20 units. Its comparison has two hidden layers, each with 10 units. The multilayer perceptron is a feedforward network whose successive layers pass activations forward. Here the equal hidden-unit budget makes the arrangement of the units the obvious experimental difference. The authors use conjugate natural gradient for both fits with the aim of reducing the influence of optimization on what they observe. They show the best of several runs.
Hidden-layer arrangements on the synthetic sinusoidal task, misclassified examples
The selected deeper fit follows the sinusoidal boundary more closely and makes fewer classification errors.
The numbers
| System or setting | misclassified examples |
|---|---|
| Shallow, 20 hidden units | 123 |
| Deep, 10 units in each hidden layer (this paper) | 24 |
The metric is the number of incorrectly classified examples in the reported comparison. The illustrated shallow fit misclassifies 123 examples, and the illustrated deep fit misclassifies 24. The paper gives the counts without identifying an evaluation split or a denominator for them. The figure superposes the fitted boundaries and uses filled markers to show errors of the shallow network. Its close-up lets the reader see where the deeper boundary more closely follows the target. The experiment is evidence of a better fit in the selected runs, with the observed boundary shapes supporting the authors’ geometric interpretation.
The experiment and the theorem are measuring different aspects of the comparison. The error count depends on where the examples lie relative to the fitted boundary. The theorem counts affine regions anywhere in the input space. A chart of the errors can show the practical consequence of fitting this boundary more closely. For a quantitative check of the theorem on the trained networks, the regions themselves would need to be counted, including those away from the boundary and outside the illustrated data.
Training a network to inspect on the Toronto Faces Dataset
The face experiment asks what distinct local response directions look like in a trained rectifier network. The first two hidden layers have 1000 units each, and the last hidden layer has 100. The authors train on fold 1 of the Toronto Faces Dataset. The reported error for this trained classifier is 20.49%. They describe that error as reasonable for a network without convolution. The report names the training fold and gives the error without a further designation of the evaluation split.
Training uses stochastic gradient descent, which updates parameters using sampled training data. The learning rate is 0.1. The authors add an L₂ penalty with coefficient 10⁻³, apply dropout to the first two hidden layers with drop probability 0.5, and project the weight columns back to unit norm after each update. The penalty provides a cost on weight magnitude, dropout suppresses selected activations during training, and the projection fixes the length of each weight column. The output units use sigmoid activations. The authors choose this setup to obtain cleaner and sharper filters for inspection. The error figure characterizes the network used for that purpose. The paper reports no matched face classifier for a depth comparison.
For the first hidden layer, the relationship to the original image is direct. When a rectifier there is positive, its own weight vector gives the active affine direction. The authors randomly choose 16 units from this layer and show the learned directions as images. In subsequent layers the effective direction also depends on which preceding rectifiers responded to the input. A single stored row of weights would describe how a unit reads the preceding layer but would leave that dependence on the image unresolved.
For each of the higher hidden layers, the authors randomly choose 20 units. From that pool they display four, selected for large maximum Euclidean separation among their local responses. This distance compares the effective direction vectors in the same input coordinate system. Distinct responses for a unit are collected by visiting training inputs that activate it positively. The authors group the observed vectors into four clusters using K-means, which groups vectors around representatives according to their distance. They display a representative response from each cluster. The result gives a compact view of alternative routes by which the unit reacts to images.
The figures show response maps both with their original scale and normalized to emphasize direction. They also display the maps for all seven output units, corresponding to anger, disgust, fear, happy, sad, surprise and neutral. Since these units have sigmoid outputs, the affine reconstruction describes the response entering the sigmoid. The authors also compare the local maps of a selected unit in the third hidden layer directly, making differences between its responses easier to see. Their interpretation is that higher layers can tolerate more abstract changes to the input than the first-layer templates can express on their own. This is a qualitative observation about the displayed responses.
Finding distinct inputs for exactly the same activation
The authors make a second kind of comparison on the face network. They randomly select a unit in the third hidden layer and locate three training examples whose activations are close to 2.5. For each training example they recover the local affine map. They then search along the corresponding direction for a point that makes the unit’s activation exactly 2.5. The displayed inputs are the points found by that search, distinct from the training examples that supplied the starting positions.
The paper shows each such input beside the local map associated with it. The scalar match is exact at the reported target, while the maps explain that match using different responses in the original image coordinates. The authors read the images as showing a common response to a wide-open mouth and open eyes even when features such as the eyebrows differ. That reading concerns the particular examples displayed and the selected unit.
The search demonstrates why recovering a conditional affine map is useful even when there is no complete inventory of regions. At a sampled input the map describes how to move the activation locally. Finding different maps which lead to the same target then gives concrete examples that connect the input geometry with unit behavior. The matched quantity in this demonstration is one activation. Any additional agreement among the other coordinates of the layer would require observing those coordinates.
What the ablations show
The paper includes no systematic component-removal ablation. Its comparisons come from the matched-unit classification experiment, changes in the mathematical constructions, and selective inspection of a trained network.
Rearranging the same number of hidden units
The synthetic experiment holds the dataset and optimizer fixed and uses the same total number of hidden units. This makes the rearrangement into successive layers a meaningful comparison. A unit in the deeper network can respond to combinations of features already transformed by an earlier rectifier layer. Its switching boundary is therefore expressed in those transformed coordinates. The boundary picture and the error counts together show that the extra stage can matter for this task.
The comparison includes the changes in connectivity that come with adding a layer. Equal unit counts alone do not equate parameter counts. The authors’ use of a common optimizer makes the two fits more directly comparable, while reporting the best runs makes the comparison one of achieved fits. A typical training outcome would require information about the other runs. Nor does the experiment vary the widths systematically, so there is no empirical depth-growth curve to compare with the theorem.
Changing the proof while keeping the architecture
The comparison with the earlier rectifier lower bound isolates the value of independently arranging the folds by coordinate. Each coordinate has a choice of branches that reach the same effective interval. The combinations of those choices multiply before the next layer is even applied. The stronger expression therefore comes from using the available rectifiers differently in the proof. It shows a greater attainable count for the architectural family.
The alternative allocation in the appendix makes a smaller comparison within the new construction. Equal group sizes simplify the theorem. Distributing the remainder units yields larger groups on some coordinates without sacrificing the other coordinate groups. Whenever there is a remainder, this raises the corresponding constructive factor. The improvement is attributable to using more of the given layer width in the same scheme.
The maxout analysis changes both the unit and the geometry of the witness. It replaces the arrangement of alternating rectifiers by a design in which winner domains feed a common activation neighborhood. At the level of the proof strategy, the conclusion is that a shared image can be created through different kinds of piecewise affine calculation. The results are separate guarantees for each architecture. Their bounds do not supply a trained rectifier-versus-maxout comparison.
Conditioning on which calculation took place
The face visualizations compare effective input-space response maps across inputs for the same unit. The weights of that unit and of the network are fixed during the comparison. What varies is the configuration of earlier active rectifiers. Variation in the recovered maps thus reveals how strongly the paths leading into a unit can affect its local response. The exact-activation example shows that different such paths can reach the same scalar value.
The contrast between first-layer and later maps is informative about the mechanism. A first-layer active response has a direct vector on the original pixels. A later active response combines earlier vectors according to the particular branches in use. The authors’ selection for large differences exposes this dependence clearly. Because only sampled, positively activating inputs contribute to the higher-layer displays, these comparisons characterize the shown cases and the observed branches.
The paper’s perturbation argument addresses a separate question about its witnesses. The authors argue that a function with finitely many full-dimensional affine pieces can retain at least its count under sufficiently small weight changes. In their account, positive-volume regions give room to perturb the parameters. The intended comparison is between a chosen construction and functions in a small parameter neighborhood surrounding it. This supports local persistence of the count as a theoretical claim. It gives no empirical frequency of such counts after optimization.
Limitations
Questions the authors leave open
The paper distinguishes attaining a count from knowing how often that count occurs. Its stability discussion argues that there is a neighborhood of a successful parameter choice in which at least as many regions remain. Under a uniform measure on a bounded domain containing such a neighborhood, the event then has positive probability. The authors explicitly allow that this probability can be very small. They leave the distribution of counts across parameter settings for future investigation.
A related question concerns the shapes of the partitions. Functions with equal region counts can join their regions in different ways. A description might record which regions meet, which boundaries intersect, and how these intersections are ordered. The authors suggest studying the parts of parameter space that produce partitions with the same combinatorial structure. They emphasize the difficulty of obtaining such descriptions, even for arrangements of ordinary hyperplanes.
In maxout, the authors explicitly describe the count from extending boundary fragments to whole hyperplanes as loose. The simplified partition can cut through a neighborhood in which a different candidate dominates throughout. Counting the cuts still gives a valid way of placing a ceiling on the number of actual regions, but the gap between the construction and that ceiling remains. The special examples in the appendix are configurations where the geometry has an established count. They do not resolve the general intersections of maxout winner domains.
The authors also state that recovering local responses from sampled inputs gives incomplete coverage. If a branch is absent from the sample, it supplies no response map to cluster or display. They propose that a sufficiently large set of points can still reveal useful behavior. Their suggestion about generalization has a similar status. The authors propose that the constraints imposed by replicated computations may help on unseen samples. The paper does not establish a generalization guarantee through that mechanism.
Qualifications of the constructions
Under the main rectifier theorem, the number of units in every hidden layer must equal or exceed the number of input coordinates. That ensures that the coordinate groups can be formed. There is a further distinction between being able to form a group and having enough units in it to create multiple branches. If the equal allocation gives only one unit to each group, the product of those particular folding factors contributes no exponential increase. The remainder allocation can still help for some widths. The exact formulas let the reader see when a claimed depth effect is supported by the construction.
The floor in the finite rectifier bound deserves particular care. The corollary is printed with an unrounded width-to-dimension quotient raised to an exponent that grows with depth. Replacing the floored quotient by the unrounded one can change the exponential base when width is fixed and the division is uneven. The floor-based theorem and the appendix allocation are the statements that directly determine the guaranteed replication for given widths. The exponential comparison is clearest where those factors explicitly exceed one.
There is also a discrepancy between the shifted rectifiers printed in the illustrative construction and the calculation in the appendix. The illustration places the shift outside the scaling of the coordinate. The appendix uses scaled differences from the integer breakpoints and proves the fold with the associated endpoint values. The appendix calculation establishes the mapping of successive selected intervals onto the shared open interval. Reading the illustrative formulas literally without that correction would yield different breakpoints.
For the general-rank maxout result, the appendix describes directions along positive and negative coordinate axes and says to set the excess weight rows to zero once rank exceeds twice the input dimension. That leaves a gap in the displayed construction. The recurrence used in the theorem needs k full-dimensional cones sharing an image. Setting excess rows to zero does not explain where the corresponding additional cones would come from. The description using paired directions also leaves the role of an unpaired candidate unclear for odd rank. The stated theorem and the particulars of the supplied construction deserve to be distinguished, especially when using that construction as a recipe for a specific rank.
The mathematical proofs are about attainable functions. Region-rich examples contain tied behavior because the repeated pieces are derived from shared later calculations. A region can add a new local rule or location without giving a free parameter to vary it independently. Region counts also give no information by themselves about which pieces contain likely data, how large those pieces are, or where a classification boundary falls within them. These properties matter when using affine-region complexity to explain a task result.
The authors discuss convolutional networks as a further application of the framework. Convolution is linear, so its outputs can be treated as vector preactivations, while max pooling can identify inputs within a pooling region. The authors use this to sketch how repeated identification can arise in such networks. The matrices allowed by weight sharing form a restricted class. The dense rectifier construction uses freedom to choose weights for its particular coordinate groups, and a convolutional architecture would require a separate argument that its restrictions permit a construction with the asserted count.
Qualifications of the observations in trained networks
The synthetic error counts come from selected runs on a task chosen to make changes of boundary direction visible. The paper supplies no variability across runs and does not specify a held-out evaluation split for those counts. The reported comparison supports a concrete instance of a better deep fit. It leaves typical performance, sensitivity to optimizer choice and generalization from the synthetic data unresolved.
The Toronto Faces Dataset experiment gives context for the inspected classifier through its reported error. There is no shallow counterpart trained and evaluated for that experiment. The regularization choices and the use of sigmoid outputs are part of the setup used to obtain the displayed responses. The paper does not vary those choices to determine which ones matter for filter quality. The sigmoid also means that the full output function is outside the literal piecewise affine setting, even though its hidden computations and output preactivations can be inspected with the affine method.
Finally, exact agreement at a single unit establishes a scalar identification. The general construction used for region counting concerns neighborhoods that cover the same full activation subset, on which a later computation can act. To extend the face demonstration to that claim would require following the other units and establishing shared images over neighborhoods, as opposed to a match at selected points. The local affine maps offer evidence about how the selected scalar is reached. Their validity depends on the activation branches remaining fixed, which is why the activation achieved by the search is the relevant quantity to verify at the resulting point.
What came after
Network shape and the use of depth
Later citations carry the paper’s capacity question into several kinds of architectural research. The citation links establish the relationship to this paper and the titles identify each later work’s subject. The specific role of the linear-region argument within each work is unspecified, so the connections below concern the questions those works address.
The 2014 FitNets paper puts thin and deep networks together in its title and presents its subject through hints. Its concern with thinness makes the allocation question particularly direct. If width is limited, what does another stage of composition make possible, and how is that possibility made useful? The region proofs address the first part for their specified architectures. They give a geometric reason to take depth seriously when distributing a fixed budget of units. FitNets: Hints for Thin Deep Nets
The 2015 residual-learning paper brings depth into an image-recognition setting. This returns to an application that motivated the earlier theoretical question. A proof that composition can multiply affine pieces establishes one property a deep network may have, while an image-recognition study has to address the network’s behavior on the task. The citation connects those two levels of inquiry. Deep Residual Learning for Image Recognition
The 2016 paper on wide residual networks brings width to the foreground within the residual line of work. Width has a role of its own in the earlier bounds. It determines how many rectifiers can be assigned to each coordinate and how finely a final layer can divide the common image. Those roles help explain why a depth result leaves room for an architectural investigation centered on width. Wide Residual Networks
Architecture, convergence and structured responses
Highway Networks, published in 2015, is another architecture paper that cites the study. Its connection is to the problem of arranging successive layers so depth is useful. The region-count paper makes an architecture-dependent statement about possible functions. A new architecture poses the further question of which of those geometric arguments apply to its particular layer transformations. Highway Networks
The 2020 ReZero paper foregrounds fast convergence at large depth. The distinction between convergence and representability is especially relevant here. The earlier constructions proceed from a target geometry to a choice of weights. A convergence study instead concerns the course of learning. Even for a network that admits many affine pieces, reaching useful parameters is a separate issue. ReZero is All You Need: Fast Convergence at Large Depth
The 2020 work on symbolic discovery cites the paper from a line of research concerned with inductive biases and symbolic descriptions. The conceptual connection is the relationship between the apparent complexity of a response and the structure that generates it. In the region-count construction, many local pieces come from a short description because later computation recurs across identified neighborhoods. That is a concrete instance of intricate behavior arising under strong structural constraints, the aspect of the earlier analysis most directly related to the later paper’s stated subject. Discovering Symbolic Models from Deep Learning with Inductive Biases
Cite
Cite as Guido Montúfar, Razvan Pascanu, Kyunghyun Cho and Yoshua Bengio. 2014. On the Number of Linear Regions of Deep Neural Networks. arXiv (Cornell University).
@misc{montufar2014number,
title = {{On the Number of Linear Regions of Deep Neural Networks}},
author = {Guido Montúfar, Razvan Pascanu, Kyunghyun Cho and Yoshua Bengio},
year = {2014},
doi = {10.48550/arxiv.1402.1869},
eprint = {1402.1869},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.1402.1869}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/montufar-2014-number-linear-regions-deep-neural/
References
- M. Anthony and P. Bartlett. Neural Network Learning: Theoretical Foundations. Cambridge University Press, 1999. OpenAlex ↗ · Scholar ↗
- D. Ciresan, U. Meier, J. Masci, and J. Schmidhuber. Multi column deep neural network for traffic sign classification. Neural Networks, 32:0 333–338, 2012. OpenAlex ↗ · Scholar ↗
- G. Cybenko. Approximation by superpositions of a sigmoidal function. Mathematics of Control, Signals and Systems, 20 (4):0 303–314, 1989. OpenAlex ↗ · Scholar ↗
- O. Delalleau and Y. Bengio. Shallow vs. deep sum-product networks. In NIPS, 2011. OpenAlex ↗ · Scholar ↗
- X. Glorot, A. Bordes, and Y. Bengio. Deep sparse rectifier neural networks. In AISTATS, 2011. OpenAlex ↗ · Scholar ↗
- I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y. Bengio. Maxout networks. In Proceedings of The 30th International Conference on Machine Learning (ICML'2013), 2013. OpenAlex ↗ · Scholar ↗
- G. Hinton, L. Deng, G. E. Dahl, A. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. Sainath, and B. Kingsbury. Deep neural networks for acoustic modeling in speech recognition. IEEE Signal Processing Magazine, 290 (6):0 82–97, Nov. 2012. OpenAlex ↗ · Scholar ↗
- K. Hornik, M. Stinchcombe, and H. White. Multilayer feedforward networks are universal approximators. Neural Networks, 2:0 359–366, 1989. OpenAlex ↗ · Scholar ↗
- O. Krause, A. Fischer, T. Glasmachers, and C. Igel. Approximation properties of DBNs with binary hidden units and real-valued visible units. In Proceedings of The 30th International Conference on Machine Learning (ICML'2013), 2013. OpenAlex ↗ · Scholar ↗
- A. Krizhevsky, I. Sutskever, and G. Hinton. ImageNet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25 (NIPS'2012). 2012. our card
- N. Le Roux and Y. Bengio. Deep belief networks are compact universal approximators. Neural Computation, 220 (8):0 2192–2207, Aug. 2010. OpenAlex ↗ · Scholar ↗
- G. Montúfar. Universal approximation depth and errors of narrow belief networks with discrete units. Neural Computation, 26, July 2014. OpenAlex ↗ · Scholar ↗
- G. Montúfar and N. Ay. Refinements of universal approximation results for deep belief networks and restricted Boltzmann machines. Neural Computation, 230 (5):0 1306–1319, May 2011. OpenAlex ↗ · Scholar ↗
- V. Nair and G. E. Hinton. Rectified linear units improve restricted Boltzmann machines. In L. Bottou and M. Littman, editors, Proceedings of the Twenty-seventh International Conference on Machine Learning (ICML-10), pages 807–814. ACM, 2010. OpenAlex ↗ · Scholar ↗
- R. Pascanu and Y. Bengio. Revisiting natural gradient for deep networks. In International Conference on Learning Representations, 2014. OpenAlex ↗ · Scholar ↗
- R. Pascanu, G. Montúfar, and Y. Bengio. On the number of inference regions of deep feed forward networks with piece-wise linear activations. arXiv: 1312.6098 [cs.LG], Dec. 2013. OpenAlex ↗ · Scholar ↗
- R. Stanley. An introduction to hyperplane arrangements. In Lect. notes, IAS/Park City Math. Inst., 2004. OpenAlex ↗ · Scholar ↗
- J. Susskind, A. Anderson, and G. E. Hinton. The Toronto face dataset. Technical Report UTML TR 2010-001, U. Toronto, 2010. OpenAlex ↗ · Scholar ↗
- T. Zaslavsky. Facing Up to Arrangements: Face-Count Formulas for Partitions of Space by Hyperplanes. Number no. 154 in Memoirs of the American Mathematical Society. American Mathematical Society, 1975. OpenAlex ↗ · Scholar ↗
- M. D. Zeiler and R. Fergus. Visualizing and understanding convolutional networks. Technical Report Arxiv 1311.2901, 2013. our card