Achieve the Minimum Width of Neural Networks for Universal Approximation
Anonymous authors
Paper under double-blind review
Abstract
The universal approximation property (UAP) of neural networks is fundamental for deep learning, and it is well known that wide neural networks are universal approximators of continuous functions within both the L p norm and the continuous/uniform norm.
However, the exact minimum width, w min , for the UAP has not been studied thoroughly.
Recently, using a decoder-memorizer-encoder scheme, Park et al.
(2021) found that w min = max( d x + 1 , d y ) for both the L p -UAP of ReLU networks and the
C -UAP of ReLU+STEP networks, where d x , d y are the input and output dimensions, respectively.
In this paper, we consider neural networks with an arbitrary set of activation functions.
We prove that both C -UAP and L p -UAP for functions on compact domains share a universal lower bound of the minimal width; that is, w ∗ min = max( d x , d y ).
In particular, the critical width, w ∗ min , for L p -UAP can be achieved by leaky-ReLU networks, provided that the input or output dimension is larger than one.
Our construction is based on the approximation power of neural ordinary diﬀerential equations and the ability to approximate ﬂow maps by neural networks.
The nonmonotone or discontinuous activation functions case and the one-dimensional case are also discussed.
Introduction
The study of the universal approximation property (UAP) of neural networks is fundamental for deep learning and has a long history.
Early studies, such as Cybenkot (1989); Hornik et al.
; Leshno et al.
(1993), proved that wide neural networks (even shallow ones) are universal approximators for continuous functions within both the L p norm (1 ≤ p < ∞ ) and the continuous/uniform norm.
Further research, such as Telgarsky (2016), indicated that increasing the depth can improve the expression power of neural networks.
If the budget number of the neuron is ﬁxed, the deeper neural networks have better expression power
Yarotsky & Zhevnerchuk (2020); Shen et al. (2022).
However, this pattern does not hold if the width is below a critical threshold w min .
Lu et al.
ﬁrst showed that the ReLU networks have the UAP for L 1 functions from R d x to R if the width is larger than d x + 4, and the UAP disappears if the width is less than d x .
Further research, Hanin & Sellke (2017); Kidger & Lyons (2020); Park et al.
(2021), improved the minimum width bound for ReLU networks.
Particularly, Park et al.
(2021) revealed that the minimum width is w min = max( d x + 1 , d y ) for the L p ( R d x , R d y ) UAP of ReLU networks and for the C ( K , R d y )
UAP of ReLU+STEP networks, where K is a compact domain in R d x .
For general activation functions, the exact minimum width w min for C -UAP is less studied.
Johnson (2019) consider uniformly continuous activation functions that can be approximated by a sequence of one-to-one functions and give a lower bound w min ≥ d x + 1 for C -UAP.
Kidger & Lyons (2020) consider continuous nonpolynomial activation functions and give an upper bound w min ≤ d x + d y + 1 for C -UAP.
Park et al.
(2021) improved the bound for L p -UAP to w min ≤ max( d x + 2 , d y + 1).
A summary of known upper/lower bounds on minimum width for the UAP can be found in Park et al.
In this paper, we consider neural networks having the UAP with arbitrary activation functions.
We give a universal lower bound, w min ≥ w ∗ min = max( d x , d y ), to approximate functions from a compact domain K ⊂ R d x to R d y in the L p norm or continuous norm.
Furthermore, we show that the critical width w ∗ min can be achieved by many neural networks, as listed in Table 1.
Surprisingly, the leaky-ReLU networks achieve the critical width for the L p -UAP provided that the input or output dimension is larger than one.
This result relies on a novel construction scheme proposed in this paper based on the approximation power of neural ordinary diﬀerential equations (ODEs) and the ability to approximate ﬂow maps by neural networks.
[Table]
References
[Table] [Table]
[Table] [Table]
w min =
d x +
Hanin & Sellke (2017)
L p (
[Table]
x ,
[Table]
ReLU w min = max( d x + 1 , d y )
Park et al.
C ([0 , 1] , R 2 )
ReLU w min = 3 = max( d x , d y )
+
Park et al.
C ( K ,
[Table]
y )
[Table]
+STEP w min = max
( d x + 1 , d y )
Park et al.
L
[Table]
Arbitrary w min ≥ max( d x , d y ) =: w ∗ min
Ours (Lemma 1)
Leaky-ReLU w min = max( d x , d y , 2)
Ours (Theorem 2)
Leaky
[Table]
ReLU+ABS w min = max( d x , d y )
Ours (Theorem 3)
C ( K ,
[Table]
Arbitrary w min ≥ max( d x , d y ) =: w ∗ min
Ours (Lemma 1)
ReLU+FLOOR w min = max( d x , d y , 2)
Ours (Lemma 4)
UOE † +FLOOR w min = max( d x , d y )
Ours (Corollary 6)
C ([0 , 1] , R d y )
UOE † w min =
d y
Ours (Theorem 5)
[Table]
1. Contributions
1) Obtained the universal lower bound of width w ∗ min for feed-forward neural networks (FNNs) that have universal approximation properties.
2) Achieved the critical width w ∗ min by leaky-ReLU+ABS networks and UOE+FLOOR networks.
(UOE is deﬁned in Deﬁnition 7.)
3) Proposed a novel construction scheme from a diﬀerential geometry perspective that could deepen our understanding of UAP through topology theory.
1. Related work
To obtain the exact minimum width, one must verify the lower and upper bounds.
Generally, the upper bounds are obtained by construction, while the lower bounds are obtained by counterexamples.
Lower bounds.
For ReLU networks, Lu et al.
(2017) utilized the disadvantage brought by the insuﬃcient size of the dimensions and proved a lower bound w min ≥ d x for L 1UAP; Hanin & Sellke (2017) considered the compactness of the level set and proved a lower bound w min ≥ d x +1 for C -UAP.
For monotone activation functions or its variants, Johnson (2019) noticed that functions represented by networks with width d x have unbounded level sets, and Beise & Da Cruz (2020) noticed that such functions on a compact domain K take their maximum value on the boundary ∂ K .
These properties allow one to construct counterexamples and give a lower bound w min ≥ d x + 1 for C -UAP.
For general activation functions, Park et al.
(2021) used the volume of simplex in the output space and gave a lower bound w min ≥ d y for either L p -UAP or C -UAP.
Our universal lower bound, w min ≥ max( d x , d y ), is based on the insuﬃcient size of the dimensions for both the input and output space, which combines the ideas from these references above.
Upper bounds.
For ReLU networks, Lu et al.
(2017) explicitly constructed a width-( d x +4) network by concatenating a series of blocks so that the whole network can be approximated by scale functions in L 1 ( R d x , R ) to any given constructed a width-( d x + d y ) network using the max-min string approach to achieve CUAP for functions on compact domains; Park et al.
(2021) proposed an encoder-memorizerdecoder scheme that achieves the optimal bounds w min = max( d x + 1 , d y ) of the UAP for
L p ( R d x , R d y ).
For general activation functions, Kidger & Lyons (2020) proposed a register model construction that gives an upper bound w min ≤ d x + d y + 1 for C -UAP.
Based on this result, Park et al.
(2021) improved the upper bound to w min ≤ max( d x + 2 , d y + 1) for
L p -UAP.
In this paper, we adopt the encoder-memorizer-decoder scheme to calculate the universal critical width for C -UAP by ReLU+FLOOR activation functions.
However, the ﬂoor function is discontinuous.
For L p -UAP, we reach the critical width by leaky-ReLU, which is a continuous network using a novel scheme based on the approximation power of neural ODEs.
ResNet and neural ODEs.
Although our original aim is the UAP for feed-forward neural networks, our construction is related to the neural ODEs and residual networks (ResNet, He et al.
(2016)), which include skipping connections.
Many studies, such as E (2017);
Lu et al.
; Chen et al.
(2018), have emphasized that ResNet can be regarded as the Euler discretization of neural ODEs.
The approximation power of ResNet and neural ODEs have also been examined by researchers.
To list a few, Li et al.
(2022) gave a suﬃcient condition that covers most networks in practice so that the neural ODE/dynamic systems (without extra dimensions) process L p -UAP for continuous functions, provided that the spatial dimension is larger than one; Ruiz-Balet & Zuazua (2021) obtained similar results focused on the case of one-hidden layer ﬁelds.
Tabuada & Gharesifard (2020) obtained the C -UAP for monotone functions, and for continuous functions it was obtained by adding one extra spatial dimension.
Recently, Duan et al.
(2022) noticed that the FNN could also be a discretization of neural ODEs, which motivates us to construct networks achieving the critical width by inheriting the approximation power of neural ODEs.
For the excluded dimension one, we design an approximation scheme with leaky-ReLU+ABS and UOE activation functions.
1. Organization
We formally state the main results and necessary notations in Section 2.
The proof ideas are given in Section 3 4, and 5.
In Section 3, we consider the case where N = d x = d y = 1, which is basic for the high-dimensional cases.
The construction is based on the properties of monotone functions.
In Section 4, we prove the case where N = d x = d y ≥ 2.
The construction is based on the approximation power of neural ODEs.
In Section 5, we consider the case where d x (cid:54) =
d y and discuss the case of more general activation functions.
Finally, we conclude the paper in Section 6.
All formal proofs of the results are presented in the
Appendix.
Main results
In this paper, we consider the standard feed-forward neural network with N neurons at each hidden layer.
We say that a σ network with depth L is a function with inputs x ∈ R d x and outputs y ∈ R d y , which has the following form:
[Equation]
where b i are bias vectors, W i are weight matrices, and σ ( · ) is the activation function.
For the case of multiple activation functions, for instance, σ 1 and σ 2 , we call f L a σ 1 + σnetwork.
In this situation, the activation function of each neuron is either σ 1 or σ 2 .
In this paper, we consider arbitrary activation functions, while the following activation functions are emphasized:
ReLU (max( x, 0)), leaky-ReLU (max( x, αx ) , α ∈ (0 , 1) is a ﬁxed positive parameter), ABS ( | x | ), SIN (sin( x )), STEP (1 x> 0 ), FLOOR ( (cid:98) x (cid:99) ) and UOE ( universal ordering of extrema , which will be deﬁned later).
Lemma 1.
For any compact domain K ⊂ R d x and any ﬁnite set of activation functions { σ i } , the { σ i } networks with width w < w ∗ min ≡ max( d x , d y ) do not have the UAP for both
L p ( K , R d y ) and C ( K , R d y ) .
The lemma indicates that w ∗ min ≡ max( d x , d y ) is a universal lower bound for the UAP in both L p ( K , R d y ) and C ( K , R d y ).
The main result of this paper illustrates that the minimal width w ∗ min can be achieved.
We consider the UAP for these two function classes, i.e.,
L p -UAP and C -UAP, respectively.
2. L p -UAP
Theorem 2.
Let K ⊂ R d x be a compact set; then, for the function class L p ( K , R d y ) , the minimum width of leaky-ReLU networks having L p -UAP is exactly w min = max( d x , d y , 2) .
The theorem indicates that leaky-ReLU networks achieve the critical width w ∗ min = max( d x , d y ), except for the case of d x = d y = 1.
The idea is to consider the case where d x = d y = d > 1 and let the network width equal d .
According to the results of Duan et al.
(2022), leaky-ReLU networks can approximate the ﬂow map of neural ODEs.
Thus, we can use the approximation power of neural ODEs to ﬁnish the proof.
Li et al.
(2022) proved that many neural ODEs could approximate continuous functions in the L p norm.
This is based on the fact that orientation preserving diﬀeomorphisms can approximate continuous functions Brenier & Gangbo (2003).
The exclusion of dimension one is because of the monotonicity of leaky ReLU.
When we add a nonmonotone activation function such as the absolute value function or sine function, the
L p -UAP at dimension one can be achieved.
Theorem 3.
Let K ⊂ R d x be a compact set; then, for the function class L p ( K , R d y ) , the minimum width of leaky-ReLU+ABS networks having L p -UAP is exactly w min = max( d x , d y ) .
2. C -UAP
C -UAP is more demanding than L p -UAP.
However, if the activation functions could include discontinuous functions, the same critical width w ∗ min can be achieved.
Following the encoder-memory-decoder approach in Park et al.
(2021), the step function is replaced by the ﬂoor function, and one can obtain the minimal width w min = max( d x , 2 , d y ).
Lemma 4.
Let K ⊂ R d x be a compact set; then, for the function class C ( K , R d y ) , the minimum width of ReLU+FLOOR networks having C -UAP is exactly w min = max( d x , 2 , d y ) .
Since ReLU and FLOOR are monotone functions, the C -UAP critical width w ∗ min does not hold for C ([0 , 1] , R ).
This seems to be the case even if we add ABS or SIN as an additional activator.
However, it is still possible to use the UOE function (Deﬁnition 12).
Theorem 5.
The UOE networks with width d y have C -UAP for functions in C ([0 , 1] , R d y ) .
Corollary 6.
Let K ⊂ R d x be a compact set; then, for the continuous function class
C ( K , R d y ) , the minimum width of UOE+FLOOR networks having C -UAP is exactly w min = max( d x , d y ) .
Approximation in dimension one ( N = d x = d y = d = 1 )
In this section, we consider one-dimensional functions and neural networks with a width of one.
In this case, the expression of ReLU networks is extremely poor.
Therefore, we consider the leaky ReLU activation σ α ( x ) with a ﬁxed parameter α ∈ (0 , 1).
Note that leaky-ReLU is strictly monotonic, and it was proven by Duan et al.
(2022) that any monotone function in
C ([0 , 1] , R ) can be uniformly approximated by leaky-ReLU networks with width one.
This is useful for our construction to approximate nonmonotone functions.
Since the composition of monotone functions is also a monotone function, to approximate nonmonotone functions we need to add a nonmonotone activation function.
Let us consider simple nonmonotone functions, such as | x | or sin( x ).
We show that leakyReLU+ABS or leaky-ReLU+SIN can approximate any continuous function f ∗ ( x ) under the
L p norm.
The idea, shown in Figure 1, is that the target function f ∗ ( x ) can be uniformly approximated by the polynomial p ( x ), which can be represented as the composition g ◦ u ( x ) =
p ( x ) ≈ f ∗ ( x ) .
Here, the outer function g ( x ) is any continuous function whose value at extrema matches the value at extrema of p ( x ), and the inner function u ( x ) is monotonically increasing, which adjusts the location of the extrema (see Figure 1).
Since polynomials have a ﬁnite number of extrema, the inner function u ( x ) is piecewise continuous.
For L p -UAP, the approximation is allowed to have a large deviation on a small interval; therefore, the extrema could not be matched exactly (over a small error).
For example, we can choose g ( x ) as the sine function or the sawtooth function (which can be approximated by ABS networks), and u ( x ) is a leaky-ReLU network approximating g − 1 ◦ p ( x ) at each monotone interval of p .
Figure 1(a) shows an example of the composition.
For C -UAP, matching the extrema while keeping the error small is needed.
To achieve this aim, we introduce the UOE functions.
Deﬁnition 7 (Universal ordering of extrema (UOE) functions) .
A UOE function is a continuous function in C ( R , R ) such that any (ﬁnite number of) possible ordering(s) of values at the (ﬁnite) extrema can be found in the extrema of the function.
There are an inﬁnite number of UOE functions.
Here, we give an example, as shown in
Figure 2.
This UOE function ρ ( x ) is deﬁned by a sequence { o i } ∞ i =1 , ρ ( x
[Equation]
= (cid:26)
[Equation] [Equation]
where { o i } ∞ i =
= (1 , 2 , 2 , 1 , 1 , 2 , 3 , 1 , 3 , 2 , 2 , 1 , 3 , 2 , 3 , 1 , 3 , 1 , 2 , 3 , 2 , 1 , 1 , 2 , 3 , 4 , ... ) is the concatenation of all permutations of positive integer numbers.
The term UOE in this paper means this function ρ .
Since the UOE function ρ ( x ) can represent leaky-ReLU σ 1 / 4 on any ﬁnite interval, this implies that the UOE networks can uniformly approximate any monotone functions.
To illustrate the C -UAP of UOE networks, we only need to construct a continuous function g ( x ) matching the extrema of p ( x ) (see Figure 1(b)).
That is, construct g ( x ) by the composition ˜
u ◦ ρ ( x ), where ˜ u ( x ) is a monotone and continuous function.
This is possible since the UOE function contains any ordering of the extrema.
The following lemma summarizes the approximation of one-dimensional functions.
As a consequence, Theorem 5 holds since functions in C ([0 , 1] , R d y ) can be regarded as d y onedimensional functions.
Lemma 8.
For any function f ∗ ( x ) ∈ C [0 , 1] and ε > 0 , there is a leaky-ReLU+ABS (or leaky-ReLU+SIN) network with width one and depth L such that (cid:82) 1 0 | f ∗ ( x ) − f L
( x ) | p dx < ε p .
There is a leaky-ReLU+UOE network with a width of one and a depth of L such that | f ∗ ( x ) − f L ( x ) | < ε, ∀ x ∈ [0 , 1] .
Connection to the neural ODEs ( N = d x = d y = d ≥ 2 )
Now, we turn to the high-dimensional case and connect the feed-forward neural networks to neural ODEs.
To build this connection, we assume that the input and output have the same dimension, d x = d y = d .
Consider the following neural ODE with one-hidden layer neural ﬁelds:
[Equation]
where x, x 0 , ∈ R d and the time-dependent parameters ( A, W, b )
∈ R
d × d × R d × d × R d are piecewise constant functions of t .
The ﬂow map is denoted as φ τ ( · ), which is the function from x 0 to x ( τ ).
According to the approximation results of neural ODEs (see Li et al.
; Tabuada & Gharesifard (2020); Ruiz-Balet & Zuazua (2021) for examples), we have the following lemma.
Lemma 9 (Special case of Li et al.
Let d ≥ 2 .
Then, for any continuous function f ∗ : R d → R d , any compact set K ⊂ R d , and any ε > 0 , there exist a time τ ∈ R + and a piecewise constant input ( A, W, b ) : [0 , τ ] → R d × d × R d × d × R d so that the ﬂow-map φ τ associated with the neural ODE (3) satisﬁes:
|| f ∗ − φ τ ||
L p ( K ) ≤ ε.
Next, we consider the approximation of the ﬂow map associated with (3) by neural networks.
Recently, Duan et al.
(2022) found that leaky-ReLU networks could perform such approximations.
Lemma 10 (Theorem 2.2 in Duan et al.
If the parameters ( A, W, b ) in (3) are piecewise constants, then for any compact set K and any ε > 0 , there is a leaky-ReLU network f L ( x ) with width d and depth L such that
[Equation]
Combining these two lemmas, one can directly prove the following lemma, which is a part of our Theorem 2.
Lemma 11.
Let K ⊂ R
d be a compact set and d ≥ 2 ; then, for the function class L p ( K , R d ) , the leaky-ReLU networks with width d have L p -UAP.
Here, we summarize the main ideas of this result.
Let us start with the discretization of the neural ODE by the splitting approach.
For a given time step ∆ t = τ/K , ( K large enough), deﬁne the iteration as
[Equation]
where the map T ( i,j ) k : x → y is
[Equation] [Equation]
where a =
A ij , w = W j, : , b is the value at t , and the superscript in x ( i ) means the i -th coordinate of x .
Note that the scalar functions tanh( ξ ) and ξ + a ∆ t tanh( ξ ) are monotone with respect to ξ when ∆ t is small enough.
This allows us to construct leaky-ReLU networks with width d to approximate each map T ( i,j ) k and then approximate the ﬂow-map, φ τ ( x 0 )
≈ x K .
Note that Lemma 10 holds for all dimensions, while Lemma 9 holds for dimensions larger than one.
This is because ﬂow maps are orientation-preserving diﬀeomorphisms, and they can approximate continuous functions only for dimensions larger than one; see Brenier &
Gangbo (2003).
The approximation is based on control theory where the ﬂow map can be adjusted to match any ﬁnite set of input-output pairs.
This match does not hold for dimension one.
However, the case of dimension one is discussed in the last section.
Achieving the minimal width
Now, we turn to the cases where the input and output dimensions cannot be equal.
5. Universal lower bound w ∗ min = max( d x , d y )
Here, we give a sketch of the proof of Lemma 1, which states that w ∗ min is a universal lower bound over all activation functions.
Parts of Lemma 1 have been demonstrated in many papers, such as Park et al.
Here, we give proof by two counterexamples that are simple and easy to understand from the topological perspective.
It contains two cases: 1) there is a function f ∗ that cannot be approximated by networks with width w ≤ d x − 1; 2) there is a function f ∗ that cannot be approximated by networks with width w ≤ d y − 1.
Figure 3(a)-(b) shows the counterexamples that illustrate the essence of the proof.
For the ﬁrst case, w ≤ d x − 1, we show that f ∗ ( x ) = (cid:107) x (cid:107) 2 , x ∈ K
=
[ − 2 , 2] d x , is what we want; see Figure 3(a).
In fact, we can relax the networks to a function f ( x ) =
φ ( Wx + b ), where Wx + b is a transformer from R d x to R d x − 1 and φ ( x ) could be any function.
A consequence is that there exists a direction v (set as the vector satisfying Wv = 0, (cid:107) v (cid:107) = 1) such that f ( x ) = f
( x + λv ) for all λ ∈ R .
Then, considering the sets
A
=
x : (cid:107) x (cid:107) ≤ 0 .
1 } and B = { x : (cid:107) x − v (cid:107) ≤ 0 . 1 } , we have
[Equation]
Since the volume of A is a ﬁxed positive number, the inequality implies that even the Lapproximation for f ∗ is impossible.
The case of the L p norm and the uniform norm is impossible as well.
For the second case, w ≤ d y − 1, we show the example of f ∗ , which is the parametrized curve from 0 to 1 along the edge of the cubic, see Figure 3(b).
Relaxing the networks to a function f ( x )
=
Wψ ( x ) + b , ψ ( x ) could be any function.
Since the range of f is in a hyperplane while f ∗ has a positive distance to any hyperplane, the target f ∗ cannot be approximated.
5. Achieving w ∗ min for L p -UAP
Now, we show that the lower bound w ∗ min for L p -UAP can be achieved by leaky-ReLU+ABS networks.
Without loss of generality, we consider K =
[0 , 1] d x .
For any function f ∗ in L p ([0 , 1] d x , R d y ), we can extend it to a function ˜ f ∗ in L p ([0 , 1] d , R d ) by ﬁlling in zeros where d = max( d x , d y ) =
w ∗ min .
When d x > 1 or d y > 1, the L p -UAP for leaky-ReLU networks with width w ∗ min is obtained by using Lemma 11.
Recall that by the
Lemma 1, w ∗ min is optimal, and we obtain our main result Theorem 2.
Combining the case of d x = d y =
d = 1 in Section 3, adding absolute function ABS as an additional activation function, we obtain Theorem 3.
5. Achieving w ∗ min for C -UAP
Here, we use the encoder-memorizer-decoder approach proposed in Park et al.
(2021) to achieve the minimum width.
Without loss of generality, we consider the function class
C ([0 , 1] d x , [0 , 1] d y ).
The coding scheme includes three parts:
1) an encoder maps [0 , 1] d x to [0 , 1] which quantizes each coordinate of x by a Kbit binary representation and concatenates the quantized coordinates into a single scalar value ¯ x having a ( d x K )-bit binary representation; 2) a memorizer maps each codeword ¯ x to its target codeword ¯ y ; 3) a decoder maps ¯ y to the quantized target that approximates the true target.
As illustrated in Figure 3(c), using the ﬂoor function instead of a step function, one can construct the encoder by FLOOR networks with width d x and the decoder by FLOOR networks with width d y .
The memorizer is a one-dimensional scalar function that can be approximated by ReLU networks with a width of two or UOE networks with a width of one.
Therefore, the minimal widths max( d x , 2 , d y ) and max( d x , d y ) are obtained, which demonstrate Lemma 4 and Corollary 6, respectively.
5. Effect of the activation functions
Here, we emphasize that our universal bound of the minimal width is optimized over arbitrary activation functions.
However, it cannot always be achieved when the activation functions are ﬁxed.
Here, we discuss the case of monotone activation functions.
If the activation functions are strictly monotone and continuous (such as leaky-ReLU), a width of at least d x + 1 is needed for C -UAP.
This can be understood through topology theory.
Leaky-ReLU, the nonsingular linear transformer, and its inverse are continuous and homeomorphic.
Since compositions of homeomorphisms are also homeomorphisms, we have the following proposition:
If N = d x = d y = d and the weight matrix in leaky-ReLU networks are nonsingular, then the input-output map is a homeomorphism.
Note that singular matrices can be approximated by nonsingular matrices; therefore, we can restrict the weight matrix in neural networks to the nonsingular case.
When d x ≥ d y , we can reformulate the leaky-ReLU network as f L ( x ) =
W L +1 ψ ( x ) + b L +1 , where ψ ( x ) is the homeomorphism.
Note that considering the case where d y = 1 is suﬃcient, according to Hanin & Sellke (2017); Johnson (2019).
They proved that the neural network width d x cannot approximate any scalar function with a level set containing a bounded path component.
This can be easily understood from the perspective of topology theory.
An example is to consider the function f ∗ ( x ) = (cid:107) x (cid:107) 2 , x ∈ K
=
[ − 2 , 2] d x shown in Figure 4.
The case where d x < d y .
We present a simple example in Figure 5.
The curve ‘4’ corresponding to a continuous function from [0 , 1] ⊂ R to R 2 cannot be uniformly approximated.
However, the L p approximation is still possible.
Conclusion
Let us summarize the main results and implications of this paper.
After giving the universal lower bound of the minimum width for the UAP, we proved that the bound is optimal by constructing neural networks with some activation functions
For the L p -UAP, our construction to achieve the critical width was based on the approximation power of neural ODEs which bridges the feed-forward networks to the ﬂow maps corresponding to the ODEs.
This allowed us to understand the UAP of the FNN through topology theory.
Moreover, we obtained not only the lower bound but also the upper bound.
For the C -UAP, our construction was based on the encoder-memorizer-decoder approach in Park et al.
(2021), where the activation sets contain a discontinuous function (cid:98) x (cid:99) .
It is still an open question whether we can achieve the critical width by continuous activation functions.
Johnson (2019) proved that continuous and monotone activation functions need at least width d x + 1.
This implies that nonmonotone activation functions are needed.
By using the UOE activation, we calculated the critical width for the case of d x = 1.
It would be of interest to study the case of d x ≥ 2 in future research.
We remark that our UAP is for functions on a compact domain.
Examining the critical width of the UAP for functions on unbounded domains is desirable for future research
A Proof of the lemmas A. Proof of Lemma
We give a deﬁnition and a lemma below that are useful for proving Lemma 8.
Deﬁnition 12.
We say two functions, f 1 ,
f 2 ∈ C
( R , R ) , have the same ordering of extrema if they have the following properties:
f i ( x ) has only a ﬁnite number of extrema that are (increasing) x ∗ i,j , j = 1 , 2 , ..., m i . 2)
m
= m
=: m and the two sequences, S 1 :=
{ f 1 ( −∞ ) , f 1 ( x ∗ 1 , 1 ) , ..., f 1 ( x ∗ 1 ,m ) , f 1 (+ ∞ ) } , and S 2 :=
{ f 2 ( −∞ ) , f 2 ( x ∗ 2 , 1 ) , ..., f 2 ( x ∗ 2 ,m ) , f 2 (+ ∞ ) } , have the same ordering, i.e. , S 1 ,i < S 1 ,j ⇐⇒ S 2 ,i < S 2 ,j , ∀ i, j, S 1 ,i = S 1 ,j ⇐⇒ S 2 ,i =
S 2 ,j , ∀ i, j.
Lemma 13.
Let f 1 and f 2 be continuous functions in C ( R , R ) that have the same ordering of extrema; then, there are two strictly monotone functions, v and u , such that
[Equation]
Proof.
Here, we use the same notation in Deﬁnition 12.
The functions v and u can be constructed as follows.
(1) Construct the outer function v that tries to match the function values at the extrema.
The only requirement is that
[Equation]
Since S 1 and S 2 have the same ordering, it is easy to construct such a function v that is continuous and strictly increasing, for example, piecewise linear.
(2) Construct the inner function u to match the location of the extrema.
Denote g =
v ◦ f 2 , which satisﬁes f 1 ( x ∗ 1 ,i ) =
g ( x ∗ 2 ,i ).
Since f 1 and g are strictly monotone and continuous on the intervals
I i :=
( x ∗ 1 ,i , x ∗ 1 ,i +1 ) and J i
=
( x ∗ 2 ,i , x ∗ 2 ,i +1 )
, respectively, we can construct the function u on I i as
[Equation]
Combining each piece of u , we have a strictly increasing and continuous function u on the whole space R .
As a consequence, we have f 1 = g ◦ u
= v ◦ f 2 ◦ u .
Lemma 8.
For any function f ∗ ( x ) ∈ C [0 , 1] and ε > 0 ,
1) there is a leaky-ReLU+ABS (or leaky-ReLU+SIN) network with width one and depth L such that (cid:82) 1 0 | f ∗ ( x ) − f L
( x ) | p dx <
ε p .
2) there is a leaky-ReLU + UOE network width one and depth L
such that | f ∗ ( x ) − f L ( x ) | < ε, ∀ x ∈ [0 , 1] .
Proof.
We mainly provide proof of the second point, while the ﬁrst point can be proven using the same scheme.
For any function f ∗ ( x ) ∈ C ([0 , 1] , R ) and ε > 0, we can approximate it by a polynomial p n ( x ) with order n such that
[Equation]
according to the well-known Weierstrass approximation theorem.
Without a loss of generality, we can assume that p n ( x ) is not the same at all of its extrema.
Then, we can represent p n ( x ) by the following composition, using Lemma 13 and the property of UOE:
[Equation]
where ρ ( x ) is the UOE function (2) and v ( x ) and u ( x ) are monotonically increasing continuous functions.
Then, we can approximate p n ( x ) by UOE networks.
Since v ( x ) and u ( x ) are monotone, there are UOE networks ˜ v ( x ) and ˜ u
( x ) such that (cid:107) v − ˜ v (cid:107) and (cid:107) u − ˜ u (cid:107) are arbitrarily small.
Hence, there is a UOE network f L ( x ) =
˜ v ◦ ρ ◦ ˜ u ( x ) that can approximate p n ( x ) such that
[Equation]
which implies that
[Equation]
This completes the proof of the second point.
For the ﬁrst point, we only emphasize that it is easy to construct a function f ( x ) that has the same local maximum and local minimum in the interval and has (cid:107) f − f ∗ (cid:107)
L p small enough.
This f ( x ) has the same ordering of extrema as the sawtooth function (or sine) and hence can be uniformly approximated by leaky-ReLU+ABS (or leaky-ReLU+SIN)
networks f L .
As a consequence, (cid:107) f
L − f ∗ (cid:107)
L p is small enough.
A. Proof of Lemma
Lemma 9.
Let d ≥ 2 .
Then, for any continuous function f ∗ : R d → R d , any compact set K ⊂ R d , and any ε > 0 , there exist a time τ ∈ R + and a piecewise constant input ( A, W, b ) : [0 , τ ] → R d × d × R d × d × R d so that the ﬂow map φ τ associated with the neural
ODE (3) satisﬁes:
|| f ∗ − φ τ ||
L p ( K ) ≤ ε.
Proof.
This is a special case of Theorem 2.3 in Li et al.
A. Proof of Lemma
Lemma 10.
If the parameters ( A, W, b ) in (3) are piecewise constants, then for any compact set K and any ε > 0 , there is a leaky-ReLU network f L ( x ) with width d and depth L such that
[Equation]
Proof.
It is Theorem 2.2 in Duan et al.
A. Proof of Lemma
Lemma 11.
Let K ⊂ R
d be a compact set and d ≥ 2 ; then, for the function class L p ( K , R d ) , the leaky-ReLU networks with width d have L p -UAP.
Proof.
For any f ∗ ( x ) ∈
L p ( K , R d ) and ε > 0, there is a ﬂow map φ τ ( x ) associated with the neural ODE (3) such that (according to Lemma 9)
[Equation]
Then, employing Lemma 10, there is a leaky-ReLU network f L such that
[Equation]
Therefore, we have
[Equation]
B Proof of the main results B. Proof of Lemma
Lemma 1.
For any compact domain K ⊂ R d x and any ﬁnite set of activation functions { σ i } , the { σ i } networks with width w < w ∗ min ≡ max( d x , d y ) do not have the UAP for both
L p ( K , R d y ) and C ( K , R d y ) .
Proof.
It is enough to show the following two counterexamples f ∗ ( x ) that cannot be approximated in the L p -norm.
f
[Equation]
=
[Equation]
, x ∈ K =
− 2 ,
d
x , cannot be approximated by any networks with widths less than d x − 1.
In fact, we can relax the networks to a function f ( x ) =
φ ( Wx + b ), where
Wx + b is a transformer from R d x to R d x − 1 and φ ( x ) could be any function.
A consequence is that there exists a direction v (set as the vector satisfying Wv = 0, (cid:107) v (cid:107) = 1) such that f ( x ) = f
( x + λv ) for all λ ∈ R .
Then, considering the sets
A
=
x : (cid:107) x (cid:107) ≤ 0 .
and
B = { x : (cid:107) x − v (cid:107) ≤ 0 . 1 } , we have
[Equation]
Since the volume of A is a ﬁxed positive number, the inequality implies that even the Lapproximation for f ∗ is impossible.
The case of the L p norm and the uniform norm is impossible as well.
The function f ∗ , the parametrized curve from 0 to 1 along the edge of the cubic, cannot be approximated by any networks with a width less than d y − 1.
Relaxing the networks to a function f ( x )
=
Wψ ( x ) + b , ψ ( x ) could be any function.
Since the range of f is in a hyperplane while f ∗ has a positive distance to any hyperplane, the target f ∗ cannot be approximated.
B. Proof of Theorem
Theorem 2.
Let K ⊂ R d x be a compact set; then, for the function class L p ( K , R d y ) , the minimum width of leaky-ReLU networks having L p -UAP is exactly w min = max( d x , d y , 2) .
Proof.
Using Lemma 1, we only need to prove two points: 1) the L p -UAP holds when max( d x , d y ) ≥ 2, 2) when d x = d y = 1, there is a function that cannot be approximated by leaky-ReLU networks with width one (since width two is enough for the L p -UAP).
The ﬁrst point is a consequence of Lemma 11 since we can extend the target function to dimension d = max( d x , d y ).
The second point is obvious since leaky-ReLU networks with a width of one are monotone functions that cannot approximate nonmonotone functions such as f ∗ ( x ) = x 2 , x ∈ [ − 1 , 1].
B. Proof of Theorem
Theorem 3.
Let K ⊂ R d x be a compact set; then, for the function class L p ( K , R d y ) , the minimum width of leaky-ReLU+ABS networks having L p -UAP is exactly w min = max( d x , d y ) .
Proof.
This is a consequence of Theorem 2 (for the case of max( d x , d y ) ≥ 2) combined with
Lemma 8 (for the case of d x = d y = 1).
B. Proof of Lemma
Lemma 4.
Let K ⊂ R d x be a compact set; then, for the function class C ( K , R d y ) , the minimum width of ReLU+FLOOR networks having C -UAP is exactly w min = max( d x , 2 , d y ) .
Proof.
Recalling the results of Lemma 1, we only need to prove two points: 1) the C-UAP holds when max( d x , d y ) ≥ 2, 2) when d x = d y = 1, there is a function that cannot be approximated by ReLU+FLOOR networks with width one (since width two is enough for the C -UAP).
The ﬁrst step can be constructed by the encoder-memorizer-decoder approach.
The second point is obvious since ReLU+FLOOR networks with width one are monotone functions that cannot approximate nonmonotone functions such as f ∗ ( x ) = x 2 , x ∈ [ − 1 , 1].
B. Proof of Theorem
Theorem 5.
The UOE networks with width d y have C -UAP for functions in C ([0 , 1] , R d y ) .
Proof.
Since functions in C ([0 , 1] , R d y ) can be regarded as d y one-dimensional functions, it is enough to prove the case of d y = 1, which is the result in Lemma 8.
B. Proof of Corollary
Corollary 6.
Let K ⊂ R d x be a compact set; then, for the continuous function class
C ( K , R d y ) , the minimum width of UOE+FLOOR networks having C -UAP is exactly w min = max( d x , d y ) .
Proof.
The case where max( d x , d y ) ≥ 2 is a consequence of Lemma 4 since the UOE function contains the leaky-ReLU as a part.
The case where max( d x , d y ) = 1, i.e. d x = d y = 1, is a consequence of Lemma 8.