U NDERSTANDING S TRAIGHT -T HROUGH E STIMATOR IN T RAINING A CTIVATION Q UANTIZED N EURAL N ETS
A BSTRACT
Training activation quantized neural networks involves minimizing a piecewise constant function whose gradient vanishes almost everywhere, which is undesirable for the standard back-propagation or chain rule.
An empirical way around this issue is to use a straight-through estimator (STE) (Bengio et al., 2013) in the backward pass, so that the “gradient” through the modiﬁed chain rule becomes non-trivial.
Since this unusual “gradient” is certainly not the gradient of loss function, the following question arises: why searching in its negative direction minimizes the training loss?
In this paper, we provide the theoretical justiﬁcation of the concept of STE by answering this question.
We consider the problem of learning a two-linear-layer network with binarized ReLU activation and Gaussian input data.
We shall refer to the unusual “gradient” given by the STE-modifed chain rule as coarse gradient.
The choice of STE is not unique.
We prove that if the STE is properly chosen, the expected coarse gradient correlates positively with the population gradient (not available for the training), and its negation is a descent direction for minimizing the population loss.
We further show the associated coarse gradient descent algorithm converges to a critical point of the population loss minimization problem.
Moreover, we show that a poor choice of STE may lead to instability of the training algorithm near certain local minima, which is also observed in our CIFAR-10 experiments.
I NTRODUCTION
Deep neural networks (DNN) have achieved the remarkable success in many machine learning applications such as computer vision (Krizhevsky et al., 2012;
Ren et al., 2015), natural language processing (Collobert & Weston, 2008) and reinforcement learning (Mnih et al., 2015; Silver et al., 2016).
However, the deployment of DNN typically require hundreds of megabytes of memory storage for the trainable full-precision ﬂoating-point parameters, and billions of ﬂoating-point operations to make a single inference.
To achieve substantial memory savings and energy efﬁciency at inference time, many recent efforts have been made to the training of coarsely quantized DNN, in the hope of maintaining the performance of their ﬂoat counterparts (Courbariaux et al., 2015;
Rastegari et al., 2016;
Cai et al., 2017; Hubara et al., 2018; Yin et al., 2018b).
Training fully quantized DNN amounts to solving a very challenging optimization problem.
It calls for minimizing a piecewise constant and highly nonconvex empirical risk function f ( w ) subject to a discrete set-constraint w ∈ Q that characterizes the quantized weights.
In particular, weight quantization of DNN have been extensively studied in the literature; see for examples (Li et al., 2016;
Zhu et al., 2016; Li et al., 2017;
Yin et al., 2016; 2018a; Hou & Kwok, 2018; He et al., 2018; Li &
Hao, 2018).
On the other hand, the gradient ∇ f ( w ) in training activation quantized DNN is almost everywhere (a.e.) zero, which makes the standard back-propagation inapplicable.
The arguably most effective way around this issue is nothing but to construct a non-trivial search direction by properly modifying the chain rule.
Speciﬁcally, one can replace the a.e. zero derivative of quantized activation function composited in the chain rule with a related surrogate.
This proxy derivative used in the backward pass only is referred as the straight-through estimator (STE) (Bengio et al., 2013).
In the same paper, Bengio et al.
(2013) proposed an alternative approach based on stochastic neurons.
In addition, Friesen & Domingos (2017) proposed the feasible target propagation algorithm for learning hard-threshold (or binary activated) networks (Lee et al., 2015) via convex combinatorial optimization.
1. R ELATED W ORKS
The idea of STE originates to the celebrated perceptron algorithm (Rosenblatt, 1957; 1962) in 1950s for learning single-layer perceptron with binary output, in which the derivative of identity function is used as a proxy of that of binary function 1 { x> 0 } in the chain rule.
Its convergence has been extensive discussed in the literature; see for examples, (Widrow & Lehr, 1990; Freund & Schapire, 1999) and the references therein.
Hinton (2012) extended this idea to train multi-layer networks with binary activations (a.k.a. binary neuron), namely, to back-propagate as if the activation had been the identity function.
Bengio et al.
(2013) proposed a STE variant which uses the derivative of the sigmoid function instead.
In the training of DNN with weights and activations constrained to ± 1 , (Hubara et al., 2016) substituted the derivative of the signum activation function with 1 {| x |≤ 1 } in the backward pass, known as the saturated STE.
Later the idea of STE was readily employed to the training of DNN with general quantized ReLU activations (Hubara et al., 2018;
Zhou et al., 2016;
Cai et al., 2017; Choi et al., 2018; Yin et al., 2018b), where some other proxies took place including the derivatives of vanilla ReLU and clipped ReLU.
Despite all the empirical success of STE, there is very limited theoretical understanding of it in training DNN with stair-case activations.
Goel et al.
(2018) considers leaky ReLU activation of a one-hidden-layer network.
They showed the convergence of the so-called Convertron algorithm, which uses the identity STE in the backward pass through the leaky ReLU layer.
Other similar scenarios, where certain layers are not desirable for back-propagation, have been brought up recently by (Wang et al., 2018) and (Athalye et al., 2018).
The former proposed an implicit weighted nonlocal Laplacian layer as the classiﬁer to improve the generalization accuracy of DNN.
In the backward pass, the derivative of a pre-trained fullyconnected layer was used as a surrogate.
To circumvent adversarial defense (Szegedy et al., 2013), (Athalye et al., 2018) introduced the backward pass differentiable approximation, which shares the same spirit as STE, and successfully broke defenses at ICLR 2018 that rely on obfuscated gradients.
1. M AIN C ONTRIBUTIONS
Throughout this paper, we shall refer to the “gradient” of loss function w.r.t.
the weight variables through the STE-modiﬁed chain rule as coarse gradient.
The coarse gradient is certainly not the gradient of loss function, and it is generally not the gradient of any function.
Why searching in its negative direction minimizes the training loss, since this is not the standard gradient descent?
Apparently, the choice of STE is non-unique, then what makes a good STE?
From the optimization perspective, we take a step towards understanding STE in training quantized ReLU nets by attempting these questions.
On the theoretical side, we consider three representative STEs for learning a two-linear-layer network with binary activation and Gaussian data: the derivatives of the identity function (Rosenblatt, 1957; Hinton, 2012;
Goel et al., 2018), vanilla ReLU and the clipped ReLUs (Cai et al., 2017;
Hubara et al., 2016).
We adopt the model of population loss minimization (Brutzkus & Globerson, 2017; Tian, 2017; Li & Yuan, 2017; Du et al., 2018).
For the ﬁrst time, we prove that proper STEs give rise to descent algorithms .
Speciﬁcally, the negative expected coarse gradients based on STEs of the vanilla and clipped ReLUs are provably descent directions for the minimizing the population loss, which yield monotonically decreasing energy in the training.
In contrast, this is not true for the identity STE.
We further prove that the corresponding training algorithm can be unstable sometimes near certain local minima, because the coarse gradient may simply not vanish there.
Complementary to the analysis, we examine the empirical performances of the three STEs on
MNIST and CIFAR-10 classiﬁcations with general quantized ReLU.
While both vanilla and clipped
ReLUs work very well on the relatively shallow LeNet-5, clipped ReLU STE is arguably the best for the deeper VGG-11 and ResNet-20.
In our CIFAR experiments in section 4.2, we observe that the training using identity or ReLU STE can be unstable at good minima and repelled to an inferior one with substantially higher training loss and decreased generalization accuracy.
This is an implication that poor STEs generate coarse gradients incompatible with the energy landscape .
To our knowledge, convergence guarantees of perceptron algorithm (Rosenblatt, 1957; 1962) and
Convertron algorithm (Goel et al., 2018) were proved for the identity STE.
It is worth noting that
Convertron (Goel et al., 2018) makes weaker assumptions than in this paper.
These results, however, do not generalize to the network with two trainable layers studied here.
As aforementioned, the identity STE is actually a poor choice in our case.
Moreover, it is not clear if their analyses can be extended to other STEs.
Similar to Convertron with leaky ReLU, the monotonicity of quantized activation function plays a role in coarse gradient descent.
Indeed, all three STEs considered here exploit this property.
But this is not the whole story.
A great STE like the clipped ReLU matches quantized ReLU at the extrema, otherwise the instability/incompatibility issue may arise. Organization.
In section 2, we study the energy landscape of a two-linear-layer network with binary activation and Gaussian data, and show that it is Lipschitz smooth restricted to a bounded domain.
We present the main results and sketch the mathematical analysis in section 3.
In section 4, we compare the empirical performances of different STEs in 2-bit and 4-bit activation quantization, and report the instability phenomena of the training algorithm with poor STEs.
Due to space limitation, all the technical proofs as well as some ﬁgures are deferred to the appendix.
Notations.
(cid:107) · (cid:107) denotes the Euclidean norm of a vector or the spectral norm of a matrix.
0 n ∈ R
n represents the vector of all zeros, whereas 1 n ∈ R n the vector of all ones.
I n is the identity matrix of order n .
For any w , z ∈ R n , w (cid:62) z = (cid:104) w , z (cid:105) =
(cid:80)
i w i
z i is their inner product.
w (cid:12) z denotes the Hadamard product whose i th entry is given by ( w (cid:12) z ) i =
w i
z i .
L EARNING T WO -L INEAR -L AYER CNN WITH B INARY A CTIVATION
We consider a model similar to (Du et al., 2018) that outputs the prediction y ( Z , v , w ) :
[Equation]
for some input Z ∈ R m × n .
Here w ∈ R n and v ∈ R m are the trainable weights in the ﬁrst and second linear layer, respectively; Z (cid:62) i denotes the i th row vector of Z ; the activation function σ acts component-wise on the vector Z w , i.e., σ ( Z w ) i
= σ (( Z w ) i )
=
σ ( Z (cid:62) i w ) .
The ﬁrst layer serves as a convolutional layer, where each row Z (cid:62) i can be viewed as a patch sampled from Z and the weight ﬁlter w is shared among all patches, and the second linear layer is the classiﬁer.
The label is generated according to y ∗ ( Z ) =
( v ∗ ) (cid:62) σ ( Z w ∗ ) for some true (non-zero) parameters v ∗ and w ∗ .
Moreover, we use the following squared sample loss
[Equation]
Unlike in (Du et al., 2018), the activation function σ here is not ReLU, but the binary function σ ( x ) = 1 { x> 0 } .
We assume that the entries of Z ∈ R m × n are i.i.d.
sampled from the Gaussian distribution N (0 , 1) (Zhong et al., 2017; Brutzkus & Globerson, 2017).
Since (cid:96) ( v , w ; Z ) = (cid:96) ( v , w /c ; Z ) for any scalar c > 0 , without loss of generality, we take (cid:107) w ∗ (cid:107) = 1 and cast the learning task as the following population loss minimization problem:
[Equation]
where the sample loss (cid:96) ( v , w ; Z ) is given by (1).
2. B ACK - PROPAGATION AND C OARSE G RADIENT D ESCENT
With the Gaussian assumption on Z , as will be shown in section 2.2, it is possible to ﬁnd the analytic expressions of f ( v , w ) and its gradient
[Equation]
The gradient of objective function, however, is not available for the network training.
In fact, we can only access the expected sample gradient, namely,
E
[Equation]
w
[Equation]
Z
[Equation]
and E Z
[Equation]
We remark that E Z (cid:2) ∂(cid:96)∂
w ( v , w ; Z ) (cid:3) is not the same as ∂f∂ w ( v , w ) =
∂ E Z
[ (cid:96) ( v , w ; Z )] ∂ w .
By the standard back-propagation or chain rule, we readily check that
[Equation]
and
[Equation]
[Equation]
Note that σ (cid:48) is zero a.e., which makes (4) inapplicable to the training.
The idea of STE is to simply replace the a.e. zero component σ (cid:48) in (4) with a related non-trivial function µ (cid:48)
(Hinton, 2012; Bengio et al., 2013; Hubara et al., 2016;
Cai et al., 2017), which is the derivative of some (sub)differentiable function µ .
More precisely, back-propagation using the STE µ (cid:48) gives the following non-trivial surrogate of ∂(cid:96)∂ w ( v , w ; Z ) , to which we refer as the coarse (partial) gradient
[Equation]
Using the STE µ (cid:48) to train the two-linear-layer convolutional neural network (CNN) with binary activation gives rise to the (full-batch) coarse gradient descent described in Algorithm 1.
Input : initialization v 0 ∈ R m , w 0 ∈ R n , learning rate η . for t = 0 , 1 , . . .
do
[Equation]
end for
2. P RELIMINARIES
Let us present some preliminaries about the landscape of the population loss function f ( v , w ) .
To this end, we deﬁne the angle between w and w ∗ as θ ( w , w ∗ ) := arccos (cid:16) w (cid:62) w ∗ (cid:107) w (cid:107)(cid:107) w ∗ (cid:107) (cid:17) for any w (cid:54) = 0 n .
Recall that the label is given by y ∗ ( Z ) =
( v ∗ ) (cid:62) Z w ∗ from (1), we elaborate on the analytic expressions of f ( v , w ) and ∇ f ( v , w ) .
Lemma 1.
If w (cid:54) = 0 n , the population loss f
( v , w ) is given by
[Equation]
m (cid:19) v ∗ + ( v ∗ ) (cid:62) (cid:0) I m + 1 m 1 (cid:62) m (cid:1) v ∗ (cid:35) .
In addition, f ( v , w ) =
18 ( v ∗ ) (cid:62) (cid:0) I m + 1 m 1 (cid:62) m (cid:1) v ∗ for w = 0 n .
Lemma 2.
If w (cid:54) = 0 n and θ ( w , w ∗ ) ∈ (0 , π ) , the partial gradients of f ( v , w ) w.r.t.
v and w are ∂f
[Equation]
and
[Equation]
respectively.
For any v ∈ R m , ( v , 0 m ) is impossible to be a local minimizer.
The only possible (local) minimizers of the model (2) are located at
may not be possible) [Equation] Non-differentiable
where θ ( w , w ∗ ) = 0 and v = v ∗ , or θ
[Equation]
w , w
[Equation]
= π and v
[Equation]
Among them, { ( v , w ) : v = v ∗ , θ ( w , w ∗ )
= 0 } are obviously the global minimizers of (2).
We show that the stationary points, if exist, can only be saddle points, and { ( v , w ) : θ ( w , w ∗ ) =
π, v = (cid:0) I m + 1 m 1 (cid:62) m (cid:1) − 1 ( 1 m 1 (cid:62) m
− I m ) v ∗ } are the only potential spurious local minimizers.
Proposition 1.
If the true parameter v ∗ satisﬁes ( 1 (cid:62) m v ∗ ) 2 < m +12 (cid:107) v ∗ (cid:107) 2 , then
[Equation]
give the saddle points obeying (8), and { ( v , w ) : θ ( w , w ∗ )
=
π, v = (cid:0) I m + 1 m 1 (cid:62) m (cid:1) − 1 ( 1 m 1 (cid:62) m −
I m ) v ∗ } are the spurious local minimizers.
Otherwise, the model (2) has no saddle points or spurious local minimizers.
We further prove that the population gradient ∇ f ( v , w ) given by (6) and (7), is Lipschitz continuous under a boundedness condition.
Lemma 3.
For any differentiable points ( v , w ) and (˜ v , ˜ w ) with min {(cid:107) w (cid:107) , (cid:107) ˜ w (cid:107)} =
c w > 0 and max {(cid:107) v (cid:107) , (cid:107) ˜
v (cid:107)} =
C v , there exists a Lipschitz constant L > 0 depending on C v and c w , such that
[Equation]
M AIN R ESULTS
We are most interested in the complex case where both the saddle points and spurious local minimizers are present.
Our main results are concerned with the behaviors of the coarse gradient descent summarized in Algorithm 1 when the derivatives of the vanilla and clipped ReLUs as well as the identity function serve as the STE, respectively.
We shall prove that Algorithm 1 using the derivative of vanilla or clipped ReLU converges to a critical point, whereas that with the identity STE does not.
Theorem 1 (Convergence) .
Let { ( v t , w t ) } be the sequence generated by Algorithm 1 with ReLU µ ( x ) = max { x, 0 } or clipped ReLU µ ( x ) =
min { max { x, 0 } , 1 } .
Suppose (cid:107) w t (cid:107) ≥ c w for all t with some c w > 0 .
Then if the learning rate η > 0 is sufﬁciently small, for any initialization ( v 0 , w 0 ) , the objective sequence { f ( v t , w t ) } is monotonically decreasing, and { ( v t , w t ) } converges to a saddle point or a (local) minimizer of the population loss minimization (2).
In addition, if 1 (cid:62) m v ∗ (cid:54) =
and m > 1 , the descent and convergence properties do not hold for Algorithm 1 with the identity function µ ( x ) = x near the local minimizers satisfying θ ( w , w ∗ )
=
π and v =
( I m + 1 m 1 (cid:62) m ) − 1 ( 1 m 1 (cid:62) m − I m ) v ∗ .
Remark 1.
The convergence guarantee for the coarse gradient descent is established under the assumption that there are inﬁnite training samples.
When there are only a few data, in a coarse scale, the empirical loss roughly descends along the direction of negative coarse gradient, as illustrated by Figure 1.
As the sample size increases, the empirical loss gains monotonicity and smoothness.
This explains why (proper) STE works so well with massive training data as in deep learning.
Remark 2.
The same results hold, if the Gaussian assumption on the input data is weakened to that their rows i.i.d.
follow any rotation-invariant distribution.
The proof will not be substantially different.
In the rest of this section, we sketch the mathematical analysis for the main results.
[Figure]
3. D ERIVATIVE OF THE V ANILLA R E LU AS STE
If we choose the derivative of ReLU µ ( x ) = max { x, 0 } as the STE in (5), it is easy to see µ (cid:48)
( x ) = σ ( x ) , and we have the following expressions of E Z (cid:2) ∂(cid:96)
∂ v ( v , w ; Z ) (cid:3) and E Z (cid:104) g relu ( v , w ; Z ) (cid:105) for Algorithm 1.
Lemma 4.
The expected partial gradient of (cid:96) ( v , w ; Z ) w.r.t.
v is
[Equation]
Let µ ( x ) = max { x, 0 } in (5).
The expected coarse gradient w.r.t.
w is
[Equation]
where h ( v , v ∗ ) = (cid:107) v (cid:107)
+ ( 1 (cid:62) m v ) 2 − ( 1 (cid:62) m v )( 1 (cid:62) [Equation]
∗ ) + v (cid:62) v ∗ .
As stated in Lemma 5 below, the key observation is that the coarse partial gradient
E Z (cid:104)
g relu ( v , w ; Z ) (cid:105) has non-negative correlation with the population partial gradient ∂f∂ w ( v , w ) , and − E Z (cid:104)
g relu ( v , w ; Z ) (cid:105) together with − E Z (cid:2) ∂(cid:96)∂
v ( v , w ; Z ) (cid:3) form a descent direction for minimizing the population loss.
Lemma 5.
If w (cid:54) = 0 n and θ ( w , w ∗ ) ∈ (0 , π )
, then the inner product between the expected coarse and population gradients w.r.t.
w is
[Equation]
Moreover, if further (cid:107) v (cid:107) ≤ C v and (cid:107) w (cid:107) ≥ c w , there exists a constant A relu > 0 depending on C v and c w , such that [Equation]
[Equation]
Clearly, when (cid:68) E Z (cid:104)
g relu ( v , w ; Z ) (cid:105) , ∂f ∂ w ( v , w ) (cid:69) > 0 , E Z (cid:104)
g relu ( v , w ; Z ) (cid:105) is roughly in the same direction as ∂f∂ w ( v , w ) .
Moreover, since by Lemma 4, E Z (cid:2) ∂(cid:96)∂
v ( v , w ; Z ) (cid:3) =
∂f∂ v ( v , w ) , we expect that the coarse gradient descent behaves like the gradient descent directly on f ( v , w ) .
Here we would like to highlight the signiﬁcance of the estimate (12) in guaranteeing the descent property of
[Equation]
) is due to (12).
Therefore, if η is small enough, we have monotonically decreasing energy until convergence.
Lemma 6.
When Algorithm 1 converges, E Z (cid:104) ∂(cid:96)∂
v ( v , w ; Z ) (cid:105) and E Z (cid:104)
g relu ( v , w ; Z ) (cid:105) vanish simultaneously, which only occurs at the
Saddle points where (8) is satisﬁed according to Proposition 1.
Minimizers of (2) where v = v ∗ ,
[Equation]
( w , w
[Equation]
, or
[Equation]
Lemma 6 states that when Algorithm 1 using ReLU STE converges, it can only converge to a critical point of the original loss function.
3. D ERIVATIVE OF THE C LIPPED R E LU AS STE
For the STE using clipped ReLU, µ ( x ) = min { max { x, 0 } , 1 } and µ (cid:48) ( x ) = 1 { 0 <x< 1 } ( x ) .
We have results similar to Lemmas 5 and 6.
That is, the coarse partial gradient using clipped ReLU
STE E Z (cid:104) g crelu ( v , w ; Z ) (cid:105) generally has positive correlation with the true partial gradient of the population loss ∂f∂ w ( v , w ) (Lemma 7)).
Moreover, the coarse gradient vanishes and only vanishes at the critical points (Lemma 8).
Lemma 7.
If w (cid:54) = 0 n and θ ( w , w ∗ ) ∈ (0 , π ) , then
[Equation]
(cid:13)(cid:13)(cid:13) w (cid:107) w (cid:107) + w ∗ (cid:13) (cid:13)(cid:13) − (
[Equation]
(cid:62)
[Equation]
p
[Equation]
, w
[Equation]
− cot(
[Equation]
θ, w
[Equation]
(cid:107) w (cid:107) , where h ( v , v ∗ ) :
= (cid:107) v (cid:107)
+ ( 1 (cid:62) m v ) 2 − ( 1 (cid:62) m v )( 1 (cid:62) m v ∗ )
+ v (cid:62) v ∗ same as in Lemma 5, and p ( θ, w ) :
= 1 2 π (cid:90) π−
π 2 + θ cos( φ ) ξ (cid:18) sec( φ ) (cid:107) w (cid:107) (cid:19)
d φ, q ( θ, w ) :
= 1 2 π (cid:90) π−
π
2 + θ sin( φ ) ξ (cid:18) sec( φ ) (cid:107) w (cid:107) (cid:19)
d φ with ξ ( x ) :
= (cid:82) x 0 r 2 exp( − r 2 2 )d r .
The inner product between the expected coarse and true gradients w.r.t.
w
[Equation]
E Z
[Equation]
g crelu
[Equation]
v
[Equation]
v ,
[Equation] [Equation]
=
[Equation]
( θ, w )
[Equation]
π (cid:107) w (cid:107) ( v (cid:62) v
[Equation]
) 2 ≥ 0 .
Moreover, if further (cid:107) v (cid:107) ≤ C v and (cid:107) w (cid:107) ≥ c w , there exists a constant A crelu > 0 depending on C v and c w , such that
[Equation]
Lemma 8.
When Algorithm 1 converges, E Z (cid:104) ∂(cid:96)∂
v ( v , w ; Z ) (cid:105) and E Z (cid:104)
g crelu ( v , w ; Z ) (cid:105) vanish simultaneously, which only occurs at the 1.
Saddle points where (8) is satisﬁed according to Proposition 1.
Minimizers of (2) where v = v ∗ , θ ( w , w ∗ ) = 0 , or v =
( I m + 1 m 1 (cid:62) m ) − 1 ( 1 m 1 (cid:62) m −
I m ) v ∗ , θ ( w , w ∗ ) = π .
3. D ERIVATIVE OF THE I DENTITY F UNCTION AS STE
Now we consider the derivative of identity function.
Similar results to Lemmas 5 and 6 are not valid anymore.
It happens that the coarse gradient derived from the identity STE does not vanish at local minima, and Algorithm 1 may never converge there.
Lemma 9.
Let µ ( x ) =
x
in (5).
Then the expected coarse partial gradient w.r.t.
w is
[Equation]
If θ ( w , w ∗ ) = π and v = (cid:0) I m + 1 m 1 (cid:62)
m (cid:1) − 1 ( 1 m 1 (cid:62) m − I m ) v ∗ , (cid:13)(cid:13)(cid:13) E Z (cid:104)
g id ( v , w
[Equation]
Z ) (cid:105)(cid:13)(cid:13)(cid:13) =
[Equation]
i.e., E Z (cid:104) g id
[Equation]
v , w
[Equation]
Z ) (cid:105) does not vanish at the local minimizers if 1 (cid:62) m v ∗ (cid:54) = 0 and m > 1 .
Lemma 10.
If w (cid:54) = 0 n and θ ( w , w ∗ ) ∈ (0 , π ) , then the inner product between the expected coarse and true gradients w.r.t.
w is
[Equation]
When θ ( w , w ∗ ) → π , v → (cid:0) I m + 1 m 1 (cid:62)
m (cid:1) − 1 ( 1 m 1 (cid:62) m −
I m ) v ∗ , if 1 (cid:62) m v ∗ (cid:54) =
and m > 1 , we have
[Equation]
Lemma 9 suggests that if 1 (cid:62) m v ∗ (cid:54) = 0 , the coarse gradient descent will never converge near the spurious minimizers with θ ( w , w ∗ )
=
π and v = (cid:0) I m + 1 m 1 (cid:62) m (cid:1) − 1 ( 1 m 1 (cid:62) m − I m ) v ∗ , because
E Z (cid:104) g id ( v , w ; Z ) (cid:105) does not vanish there.
By the positive correlation implied by (15) of Lemma 10, for some proper ( v 0 , w 0 ) , the iterates { ( v t , w t ) } may move towards a local minimizer in the beginning.
But when { ( v t , w t ) } approaches it, the descent property (13) does not hold for E
Z [ g id ( v , w ; Z )] because of (16), hence the training loss begins to increase and instability arises.
E XPERIMENTS
While our theory implies that both vanilla and clipped ReLUs learn a two-linear-layer CNN, their empirical performances on deeper nets are different.
In this section, we compare the performances of the identity, ReLU and clipped ReLU STEs on MNIST (LeCun et al., 1998) and CIFAR-
(Krizhevsky, 2009) benchmarks for 2-bit or 4-bit quantized activations.
As an illustration, we plot the 2-bit quantized ReLU and its associated clipped ReLU in Figure 3 in the appendix.
Intuitively, the clipped ReLU should be the best performer, as it best approximates the original quantized ReLU.
We also report the instability issue of the training algorithm when using an improper STE in section 4.2.
In all experiments, the weights are kept ﬂoat.
The resolution α for the quantized ReLU needs to be carefully chosen to maintain the full-precision level accuracy.
To this end, we follow (Cai et al., 2017) and resort to a modiﬁed batch normalization layer (Ioffe & Szegedy, 2015) without the scale and shift, whose output components approximately follow a unit Gaussian distribution.
Then the α that ﬁts the input of activation layer the best can be pre-computed by a variant of Lloyd’s algorithm (Lloyd, 1982; Yin et al., 2018a) applied to a set of simulated 1-D half-Gaussian data.
After determining the α , it will be ﬁxed during the whole training process.
Since the original LeNet-5 does not have batch normalization, we add one prior to each activation layer.
We emphasize that we are not claiming the superiority of the quantization approach used here, as it is nothing but the HWGQ (Cai et al., 2017), except we consider the uniform quantization.
The optimizer we use is the stochastic (coarse) gradient descent with momentum = 0.9 for all experiments.
We train 50 epochs for LeNet-5 (LeCun et al., 1998) on MNIST, and 200 epochs for
VGG-11 (Simonyan & Zisserman, 2014) and ResNet-20 (He et al., 2016) on CIFAR-10.
The parameters/weights are initialized with those from their pre-trained full-precision counterparts.
The schedule of the learning rate is speciﬁed in Table 2 in the appendix.
4. C OMPARISON R ESULTS
The experimental results are summarized in Table 1, where we record both the training losses and validation accuracies.
Among the three STEs, the derivative of clipped ReLU gives the best overall performance, followed by vanilla ReLU and then by the identity function.
For deeper networks, clipped ReLU is the best performer.
But on the relatively shallow LeNet-5 network, vanilla ReLU exhibits comparable performance to the clipped ReLU, which is somewhat in line with our theoretical ﬁnding that ReLU is a great STE for learning the two-linear-layer (shallow) CNN.
[Table]
BitWidth
Straight-through estimator
[Table]
4. I NSTABILITY
We report the phenomenon of being repelled from a good minimum on ResNet-20 with 4-bit activations when using the identity STE, to demonstrate the instability issue as predicted in Theorem 1.
By Table
[Table]
the coarse gradient descent algorithms using the vanilla and clipped ReLUs converge to the neighborhoods of the minima with validation accuracies (training losses) of 86 .
59% (0.25) and 91 .
24% (0.04), respectively, whereas that using the identity STE gives 54 .
Note that the landscape of the empirical loss function does not depend on which STE is used in the training.
Then we initialize training with the two improved minima and use the identity STE.
To see if the algorithm is stable there, we start the training with a tiny learning rate of 10 − 5 .
For both initializations, the training loss and validation error signiﬁcantly increase within the ﬁrst 20 epochs; see Figure 4.2.
To speedup training, at epoch 20, we switch to the normal schedule of learning rate speciﬁed in Table 2 and run 200 additional epochs.
The training using the identity STE ends up with a much worse minimum.
This is because the coarse gradient with identity STE does not vanish at the good minima in this case (Lemma 9).
Similarly, the poor performance of ReLU STE on 2-bit activated ResNetis also due to the instability of the corresponding training algorithm at good minima, as illustrated by Figure 4 in Appendix C, although it diverges much slower.
C ONCLUDING R EMARKS
We provided the ﬁrst theoretical justiﬁcation for the concept of STE that it gives rise to descent training algorithm.
We considered three STEs: the derivatives of the identity function, vanilla ReLU and clipped ReLU, for learning a two-linear-layer CNN with binary activation.
We derived the explicit formulas of the expected coarse gradients corresponding to the STEs, and showed that the negative expected coarse gradients based on vanilla and clipped ReLUs are descent directions for minimizing the population loss, whereas the identity STE is not since it generates a coarse gradient incompatible with the energy landscape.
The instability/incompatibility issue was conﬁrmed in
CIFAR experiments for improper choices of STE.
In the future work, we aim further understanding of coarse gradient descent for large-scale optimization problems without tractable gradients.
A CKNOWLEDGMENTS
This work was partially supported by NSF grants DMS-1522383, IIS-1632935, ONR grant N0001418-1-2527, AFOSR grant FA9550-18-0167, DOE grant DE-SC0013839 and STROBE
STC NSF grant DMR-1548924.
A PPENDIX A. T HE P LOTS OF Q UANTIZED AND C LIPPED R E LU S
quantized ReLU clipped ReLU
B. T HE S CHEDULE OF L EARNING R ATE
[Table]
C. I NSTABILITY OF R E LU STE ON R ES N ET -20 WITH 2- BIT A CTIVATIONS
D. A DDITIONAL S UPPORTING L EMMAS
Lemma 11.
Let z ∈ R n be a Gaussian random vector with entries i.i.d.
sampled from N (0 , 1) .
Given nonzero vectors w , ˜ w ∈ R n with the angle θ , we have
[Equation]
and
[Equation]
Proof of Lemma 11.
The third identity was proved in Lemma A.1 of (Du et al., 2018).
To show the ﬁrst one, without loss of generality we assume w =
[ w 1 , 0 (cid:62) n − 1 ] (cid:62) with w 1 > 0 , then
E (cid:2) 1 { z (cid:62) w > 0 } (cid:3) =
P ( z 1 > 0)
= 12 .
We further assume ˜ w =
[ ˜ w 1 , ˜ w 2 , 0 (cid:62) n − 2 ] (cid:62) .
It is easy to see that
[Equation]
To prove the last identity, we use polar representation of two-dimensional Gaussian random variables, where r is the radius and φ is the angle with d P r = r exp( − r 2 / 2)d r and d P φ = 12 π d φ .
Then
E (cid:2)
z
[Equation]
= 0 for i ≥ 3 .
Moreover,
[Equation]
and
[Equation]
Therefore,
[Equation]
, where the last equality holds because w (cid:107) w (cid:107) and
[Equation]
˜ w
[Equation]
˜ w
[Equation]
are two unit-normed vectors with angle θ/ 2 .
Lemma 12.
Let z ∈ R n be a Gaussian random vector with entries i.i.d.
sampled from N (0 , 1) .
Given nonzero vectors w , ˜ w ∈ R n with the angle θ , we have
[Equation]
Here p ( θ, w ) = 1 2 π (cid:90) π−
π 2 + θ cos( φ ) ξ (cid:18) sec( φ ) (cid:107) w (cid:107) (cid:19)
d φ, q ( θ, w ) =
1 2 π (cid:90)
[Equation]
− π
[Equation]
+ θ sin( φ ) ξ (cid:18) sec( φ ) (cid:107) w (cid:107) (cid:19)
d φ with ξ ( x ) =
(cid:82) x 0 r 2 exp( − r 2 2 )d r satisfying ξ (+ ∞ ) =
(cid:112)
π 2 .
In addition, p ( π, w ) =
q (0 , w ) =
q ( π, w ) = 0 .
2 Same as in Lemma 4, we redeﬁne E
[Equation]
[Table] [Table]
[Table]
Proof of Lemma 12.
Following the proof of Lemma 11, we let w =
[ w 1 , 0 (cid:62) n − 1 ] (cid:62) with w 1 > 0 , ˜ w
=
[ ˜ w 1 , ˜ w 2 , 0 (cid:62) n − 2 ] (cid:62) , and use the polar representation of two-dimensional Gaussian distribution.
Then
[Equation]
and
[Equation]
since the integrand above is an odd function in φ .
Moreover, E (cid:2) z i 1 {
[Equation]
<
[Equation]
<
[Equation]
≥ 3 .
[Equation]
the ﬁrst identity holds.
For the second one, we have
[Equation]
and similarly, E (cid:2) z 2 1 { 0 < z (cid:62) w < 1 , z (cid:62) ˜ w > 0 } (cid:3) =
q ( θ, w ) .
Therefore,
E [ z1 { 0 < z (cid:62) w < 1 , z (cid:62) ˜ w > 0 } ] =
[ p ( θ, w ) , q ( θ, w ) , 0 (cid:62) n − 2 ] (cid:62) .
Since w (cid:107) w (cid:107) =
[1 , 0 (cid:62) n − 1 ] (cid:62) and w (cid:107) w (cid:107) + ˜ w (cid:107) ˜
w (cid:107) (cid:107) w (cid:107) w (cid:107) + ˜ w (cid:107) ˜ w (cid:107) (cid:107) =
[cos( θ/ 2) , sin( θ/ 2) , 0 (cid:62) n − 2 ] (cid:62) , it is easy to check the second identity is also true.
Lemma 13.
Let p ( θ, w ) and q ( θ, w ) be deﬁned in Lemma 12.
Then for θ ∈ [ π 2 , π ] , we have 1.
p ( θ, w ) ≤ q ( θ, w ) .
(cid:0) 1 − θπ (cid:1) p (0 , w ) ≤ q ( θ, w ) .
Proof of Lemma 13.
Let θ ∈
[ π 2 , π ] , since ξ ≥ 0 , p ( θ, w ) = 1 2 π (cid:90) πθ − πcos( φ ) ξ (cid:18) sec( φ ) (cid:107) w (cid:107) (cid:19)
d φ = 1 2 π (cid:90)
πθ − πsin (cid:16) π 2 − φ (cid:17) ξ (cid:18) sec( φ ) (cid:107) w (cid:107) (cid:19)
d φ ≤2 π (cid:90) πθ − πsin(
[Equation]
ξ
[Equation]
sec
[Equation]
φ
[Equation]
φ
[Equation]
(cid:107)
[Equation]
(cid:19) d φ = q ( θ, w ) , where the last inequality is due to the rearrangement inequality since both sin( φ ) and ξ (cid:16) sec( φ ) (cid:107) w (cid:107) (cid:17) are increasing in φ on [0 , π 2 ] .
Since cos( φ ) ξ (cid:16) sec( φ ) (cid:107) w (cid:107) (cid:17) is even, we have
[Equation]
φ
[Equation]
w
[Equation]
(cid:19) d φ.
The ﬁrst inequality is due to part 1 which gives p ( π/ 2 , w ) ≤ q ( π/ 2 , w ) , whereas the second one holds because sin( φ ) ξ (cid:16) sec( φ ) (cid:107) w (cid:107) (cid:17) is increasing on [0 , π 2 ] .
Lemma 14.
For any nonzero vectors w and ˜ w with (cid:107) ˜ w (cid:107) ≥ (cid:107) w (cid:107) =
c > 0 , we have
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
Proof of Lemma 14.
Since by Cauchy-Schwarz inequality,
[Equation]
we have
[Equation] [Equation]
Therefore,
[Equation]
where we used the fact sin( x ) ≥ 2 xπ for x ∈ [0 , π 2 ] and the estimate in (17).
Since (cid:16) I n − ww
[Equation]
w
[Equation]
2 (cid:17) w ∗ is the projection of w ∗ onto the complement space of w , and likewise for (cid:16) I n − ˜ w ˜ w
[Equation]
˜ w
[Equation]
2 (cid:17) w ∗ , the angle between (cid:16) I n − ww (cid:62) (cid:107) w (cid:107) 2 (cid:17) w ∗ and (cid:16) I n − ˜ w ˜ w (cid:62) (cid:107) ˜
w
[Equation]
2 (cid:17) w ∗ is equal to the angle between w and ˜ w .
Therefore,
[Equation]
, and thus
[Equation] [Equation]
=
[Equation]
The second equality above holds because
[Equation]
w (cid:107) w (cid:107)
[Equation]
− ˜ w (cid:107) ˜ w (cid:107) 2 (cid:13)(cid:13)(cid:13)(cid:13) =
(cid:107) w (cid:107)
[Equation]
(cid:107)
[Equation]
(cid:104)
[Equation]
(cid:105) (cid:107)
[Equation]
(cid:107)
[Equation]
(cid:107)
[Equation]
(cid:107)
w
[Equation]
˜ w (cid:107)(cid:107) w (cid:107) 2 (cid:107) ˜ w (cid:107) 2 .
E. M AIN P ROOFS
Lemma 1.
If w (cid:54) = 0 n , the population loss f
( v , w ) is given by
[Equation]
(cid:35)
[Equation]
In addition, f ( v , w ) = 1 8 ( v ∗ ) (cid:62) (cid:0) I m + 1 m 1 (cid:62) m (cid:1) v ∗ for w = 0 n .
Proof of Lemma 1.
We notice that
[Equation]
Let Z (cid:62) i be the i th row vector of Z .
Since w (cid:54) = 0 n , using Lemma 11, we have
[Equation]
, and for i (cid:54) =
j ,
E Z
[Equation]
Z
[Equation]
Z
[Equation] [Equation]
= 1 4 .
Therefore, E Z (cid:2) σ ( Z w ) σ ( Z w ) (cid:62) (cid:3) =
E Z (cid:2) σ ( Z w ∗ ) σ ( Z w ∗ ) (cid:62) (cid:3) = 14 (cid:0) I m + 1 m 1 (cid:62) m (cid:1) .
Furthermore,
E
[Equation]
Z w )
[Equation]
Z w
[Equation] [Equation]
ii =
[Equation]
and E Z
[Equation]
σ
[Equation]
Z w
[Equation]
Z w
[Equation] [Equation]
[Equation]
Then it is easy to validate the ﬁrst claim.
Moreover, if w = 0 n , then
[Equation]
Lemma 2.
If w (cid:54) = 0 n and θ ( w , w ∗ ) ∈ (0 , π ) , the partial gradients of f ( v , w ) w.r.t.
v and w are ∂f
[Equation]
and ∂f
[Equation]
w
[Equation]
, respectively.
Proof of Lemma 2.
The ﬁrst claim is trivial, and we only show the second one.
Since θ ( w , w ∗ ) =
arccos (cid:16) w (cid:62) w ∗ (cid:107) w (cid:107) (cid:17) is differentiable w.r.t.
w at θ ( w , w ∗ ) ∈ (0 , π ) , we have
[Equation]
Proposition 1.
If the true parameter v ∗ satisﬁes ( 1 (cid:62) m
[Equation]
2 <
[Equation]
2 (cid:107)
[Equation]
∗ (cid:107) 2 , then
[Equation]
give the saddle points obeying (8), and { ( v , w ) : θ ( w , w ∗ )
=
π, v = (cid:0) I m + 1 m 1 (cid:62) m (cid:1) − 1 ( 1 m 1 (cid:62) m −
I m ) v ∗ } are the spurious local minimizers.
Otherwise, the model (2) has no saddle points or spurious local minimizers.
Proof of Proposition 1.
Suppose v (cid:62) v ∗ = 0 and ∂f∂ v ( v , w ) = 0 , then by Lemma 1,
[Equation]
From (18) it follows that
[Equation]
On the other hand, from (18) it also follows that
[Equation]
where we used ( I m + 1 m
[Equation] [Equation]
= ( m
[Equation]
1) 1 m .
Taking the difference of the two equalities above gives
[Equation]
By (19), we have θ ( w , w ∗ ) =
π
[Equation]
v ∗ ) 2 , which requires
[Equation]
( m + 1)
[Equation]
v ∗
[Equation]
2 − ( 1 (cid:62) m v ∗ ) 2 < π, or equivalently, ( 1 (cid:62) m v ∗ )
2 <
[Equation]
Furthermore, since ∂f∂ v ( v , w ) = 0 , we have
[Equation]
Next
[Equation]
we check the local optimality of the staionary points.
By ignoring the scaling and constant terms
[Equation]
we rewrite the objective function as
[Equation]
It is easy to check that its Hessian matrix
[Equation]
is indeﬁnite.
Therefore, the stationary points are saddle points.
Moreover, if ( 1 (cid:62) m v ∗ ) 2 < m +1 2 (cid:107) v ∗ (cid:107) 2 , at the point ( v , θ ) =
(( I m + 1 m 1 (cid:62) m ) − 1 ( 1 m 1 (cid:62) m −
I m ) v ∗ , π ) , we have
[Equation] [Equation]
where we used (20) in the last identity.
We consider an arbitrary point ( v + ∆ v , π + ∆ θ ) in the neighborhood of ( v , π ) with ∆ θ ≤ 0 .
The perturbed objective value is
[Equation]
On the right hand side, since v = ( I m + 1 m 1 (cid:62) m ) − 1 ( 1 m 1 (cid:62) m −
I m ) v ∗ is the unique minimizer to the quadratic function ˜ f
( v , π ) , we have if ∆ v (cid:54) =
m ,
[Equation]
Moreover, for sufﬁcently small (cid:107) ∆ v (cid:107) , it holds that ∆ θ · ( v + ∆ v ) (cid:62) v ∗ > 0 for ∆ θ < 0 because of (21).
Therefore, ˜ f ( v + ∆ v , π + ∆ θ ) >
˜ f ( v , π ) whenever (∆ v , ∆ θ ) is small and non-zero, and (( I m + 1 m 1 (cid:62) m ) − 1 ( 1 m 1 (cid:62) m −
I m ) v ∗ , π ) is a spurious local minimizer of ˜ f .
To prove the second claim, suppose ( 1 (cid:62) m v
[Equation]
) 2 ≥
[Equation]
(cid:107) v
[Equation]
(cid:107) 2 , then either ∂f∂ w ( v , w ) does not exist, or ∂f∂ v ( v , w ) and ∂f∂ w ( v , w ) do not vanish simultaneously, and thus there is no stationary point.
At the point ( v , θ )
=
(( I m + 1 m 1 (cid:62) m ) − 1 ( 1 m 1 (cid:62) m −
I m ) v ∗ , π ) , we have
[Equation]
If v (cid:62) v ∗ > 0 , since ∇ ˜
f
( v , θ ) = 14 [ 0 (cid:62) m , 2 π v (cid:62) v ∗ ] (cid:62) , a small perturbation [ 0 (cid:62) m , ∆ θ ] (cid:62) with ∆ θ <will give a strictly decreased objective value, so ( v , θ ) =
(cid:0) ( I m + 1 m 1 (cid:62) m ) − 1 ( 1 m 1 (cid:62) m − I m ) v ∗ , π (cid:1) is not a local minimizer.
If v (cid:62) v ∗ = 0 , then ∇ ˜ f
( v , θ ) = 0 n +1 , the same conclusion can be reached by examining the second order necessary condition.
Lemma 3.
For any differentiable points ( v , w ) and (˜ v , ˜ w ) with min {(cid:107) w (cid:107) , (cid:107) ˜ w (cid:107)} =
c w > 0 and max {(cid:107) v (cid:107) , (cid:107) ˜
v (cid:107)} =
C v , there exists a Lipschitz constant L > 0 depending on C v and c w , such that
[Equation]
Proof of Lemma 3.
It is easy to check that (cid:107) I m + 1 m 1 (cid:62) m (cid:107) = m
+ 1 .
Then (cid:13)(cid:13)(cid:13)(cid:13)
[Equation]
where the last inequality is due to Lemma 14.1.
[Table]
[Equation]
where the second last inequality is to due to Lemma 14.2.
Combining the two inequalities above validates the claim.
Lemma 4.
The expected partial gradient of (cid:96) ( v , w ; Z ) w.r.t.
v is
[Equation]
Let µ ( x ) = max { x, 0 } in (5).
The expected coarse gradient w.r.t.
w is
E Z
[Equation]
g relu (
[Equation] [Equation]
where h ( v , v ∗ ) = (cid:107) v (cid:107)
+ ( 1 (cid:62) m v ) 2 − ( 1 (cid:62) m v )( 1 (cid:62) m v ∗ )
+ v (cid:62) v ∗ .
Proof of Lemma 4.
The ﬁrst claim is true because ∂(cid:96)∂ v ( v , w ; Z ) is linear in v .
By (5), g µ ( v , w ; Z ) =
Z (cid:62) (cid:0) µ (cid:48)
( Z w ) (cid:12) v (cid:1)(cid:16) v (cid:62) σ ( Z w ) − ( v ∗ ) (cid:62) σ ( Z w ∗ ) (cid:17) .
Using the fact that µ (cid:48)
=
σ = 1 { x> 0 } , we have
E Z [ g relu ( v , w ; Z )]
=
E Z (cid:34)(cid:32) m
(cid:88) i
= v i σ ( Z (cid:62) i w ) − m (cid:88) i = v ∗
i σ ( Z (cid:62) i w ∗ ) (cid:33) (cid:32) m (cid:88) i =
Z i v i σ ( Z (cid:62) i w ) (cid:33)(cid:35) =
E Z (cid:34)(cid:32) m
(cid:88) i
= v
i 1 { Z (cid:62) i w > 0 } − m (cid:88) i = v ∗
i 1 { Z (cid:62) i w ∗ > 0 } (cid:33) (cid:32) m (cid:88) i =
1 { Z (cid:62) i w > 0 } v i Z
i (cid:33)(cid:35) .
Invoking Lemma 11, we have
E (cid:104)
Z i 1 { Z (cid:62) i w > 0 , Z (cid:62) j w > 0 } (cid:105) =
(cid:40) 1 √ 2 π w (cid:107) w (cid:107) if i = j, 1 2 √ 2 π w (cid:107) w (cid:107) if i (cid:54) =
j, and
E (cid:104)
Z i 1 { Z (cid:62) i w > 0 , Z (cid:62) j w ∗ > 0 } (cid:105)
[Equation]
Therefore,
[Equation]
and the result follows
[Equation]
Lemma 5.
If w (cid:54) = 0 n and θ ( w , w ∗ ) ∈ (0 , π ) , then the inner product between the expected coarse and true gradients w.r.t.
w is
[Equation]
Moreover, if further (cid:107) v (cid:107) ≤ C v and (cid:107) w (cid:107) ≥ c w , there exists a constant A relu > 0 depending on C v and c w , such that
[Equation]
Proof of Lemma 5.
By Lemmas 2 and 5, we have
[Equation]
and
[Equation]
Notice that (cid:16) I n − ww (cid:62) (cid:107) w (cid:107) 2 (cid:17) w = 0 n and (cid:107) w ∗ (cid:107) =
1 , if θ ( w , w ∗ ) (cid:54) = 0 , π , then we have (cid:28) E Z (cid:104)
g relu ( v , w ; Z ) (cid:105) , ∂f ∂ w ( v , w ) (cid:29) =
cos (cid:18) θ ( w , w ∗ ) (cid:19) ( v (cid:62) v ∗ )( √ 2 π )(cid:42)(cid:107) w (cid:107) (cid:16) I n − ww (cid:62) (cid:107) w (cid:107) 2 (cid:17) w ∗ (cid:13)(cid:13)(cid:13)(cid:16) I n − ww (cid:62) (cid:107) w (cid:107) 2 (cid:17) w ∗ (cid:13)(cid:13)(cid:13) , w ∗ (cid:13)(cid:13)(cid:13) w (cid:107) w (cid:107) + w ∗ (cid:13)(cid:13)(cid:13) (cid:43) =
cos (cid:18) θ ( w , w ∗ ) (cid:19) ( v (cid:62) v ∗ )( √ 2 π )(cid:107) w (cid:107) 2 − ( w (cid:62) w ∗ )(cid:107)(cid:107) w (cid:107) 2 w ∗ − w ( w (cid:62) w ∗ ) (cid:107) (cid:107) w + (cid:107) w (cid:107) w ∗ (cid:107) = cos (cid:18) θ ( w , w ∗ ) (cid:19) ( v (cid:62) v
[Equation]
To show the second claim, without loss of generality, we assume (cid:107) w (cid:107)
= 1 .
Denote θ := θ ( w , w ∗ ) .
By Lemma 1, we have ∂f ∂ v
[Equation]
By Lemma
[Equation]
where
[Equation] [Equation]
and by the ﬁrst claim,
[Equation]
Hence, for some A relu depending only on C v and c w , we have
[Equation]
[Table]
, where the equality is due to (22) and (23), the ﬁrst inequality is due to Cauchy-Schwarz inequality, the second inequality holds because the angle between w (cid:107) w (cid:107) and w (cid:107) w (cid:107) + w ∗ (cid:107) w (cid:107) w (cid:107) + w ∗ (cid:107) is θ 2 and (cid:13)(cid:13)(cid:13)(cid:13) w (cid:107) w (cid:107) − w (cid:107) w (cid:107) + w ∗ (cid:107) w (cid:107) w (cid:107) + w ∗ (cid:107) (cid:13)(cid:13)(cid:13)(cid:13) ≤ θ 2 , whereas the third inequality is due to sin( x ) ≥ 2 xπ , cos( x ) ≥ 1 − 2 xπ , and
[Equation]
for all x ∈ [0 , π 2 ] .
Lemma 6.
When Algorithm 1 converges, E Z (cid:104) ∂(cid:96)∂
v ( v , w ; Z ) (cid:105) and E Z (cid:104)
g relu ( v , w ; Z ) (cid:105) vanish simultaneously, which only occurs at the 1.
Saddle points where (8) is satisﬁed according to Proposition 1.
Minimizers of
2) where v
= v
∗ , θ
( w , w ∗ )
= 0 , or v =
( I m + 1 m 1 (cid:62) m ) − 1 ( 1 m 1 (cid:62) m −
I m ) v ∗ , θ ( w , w ∗ ) = π .
Proof of Lemma 6.
By Lemma 4, suppose we have
E Z
[Equation]
∂(cid:96)
[Equation] [Equation]
24) and
E
[Equation]
= 0 n , (25) where h ( v , v ∗ )
= (cid:107) v (cid:107) 2 +
[Equation] [Equation]
v ) 2 −
[Equation] [Equation]
[Equation] [Equation]
m v ∗ )
+ v (cid:62) v ∗ .
By (25), we must have θ ( w , w ∗ ) =
or θ ( w , w ∗ )
=
π or v (cid:62) v ∗ = 0 .
If θ ( w , w ∗ ) = 0 , then by (24), v = v ∗ , and (25) is satisﬁed.
If θ ( w , w ∗ ) =
π , then by (24), v = ( I m + 1 m 1 (cid:62) m ) − 1 ( 1 m 1 (cid:62) m − I m ) v ∗ , and (25) is satisﬁed.
If v (cid:62) v ∗ = 0 , then by (24), we have the expressions for v and θ ( w , w ∗ ) from Proposition 1, and (25) is satisﬁed.
Lemma 7.
If w (cid:54) = 0 n and θ ( w , w ∗ ) ∈ (0 , π ) , then
[Equation]
where h ( v , v ∗ ) :
= (cid:107) v (cid:107)
+ ( 1 (cid:62)
[Equation] [Equation]
m
[Equation]
)( 1 (cid:62) m v ∗ )
+ v (cid:62) v ∗ same as in Lemma 5, and p
[Equation]
= 1 2 π
[Equation]
with ξ ( x ) := (cid:82) x 0 r 2 exp( − r 2 2 )d r .
The inner product between the expected coarse and true gradients w.r.t.
w
[Equation]
Moreover, if further (cid:107) v (cid:107) ≤ C v and (cid:107) w (cid:107) ≥ c w , there exists a constant A crelu > 0 depending on C v and c w , such that
[Equation]
Proof of Lemma 7.
Denote θ := θ ( w , w ∗ ) .
We ﬁrst compute E Z (cid:104)
g crelu ( v , w ; Z ) (cid:105) .
By (5), g µ ( v , w ; Z ) =
Z
[Equation]
µ
[Equation]
( Z w )
[Equation]
v (cid:1)(cid:16) v (cid:62)
[Equation]
( Z w ) − ( v ∗ ) (cid:62) σ ( Z w ∗ ) (cid:17) .
Since µ (cid:48)
= 1 { 0 <x< 1 } and σ = 1 { x> 0 } , we have
E Z [ g crelu ( v , w ; Z )]
=
E Z
[Equation]
In the last equality above, we called Lemma 12.
Notice that (cid:16) I n − ww (cid:62) (cid:107) w (cid:107) 2 (cid:17) w = 0 n and (cid:107) w ∗ (cid:107) = 1 .
If θ ( w , w ∗ ) (cid:54) = 0 , π , then the inner product between E Z (cid:104)
g crelu ( v , w ; Z ) (cid:105) and ∂f∂ w ( v , w ) is given by
[Equation]
Z
[Equation]
=
[Equation] [Equation]
(cid:13)(cid:13)(cid:13)(cid:16)
[Equation]
= q (
[Equation]
, w )
[Equation]
In the last line, q ( θ, w ) ≥ 0 because sin( φ ) ξ (cid:16) sec( φ ) (cid:107) w (cid:107) (cid:17) is odd in φ and positive for φ ∈ (0 , π 2 ] .
Next, we bound (cid:13)(cid:13)(cid:13) E Z (cid:104)
g crelu ( v , w ; Z ) (cid:105)(cid:13)(cid:13)(cid:13) 2 .
Since (23) gives
[Equation]
where according to Lemma 1,
[Equation]
We rewrite the coarse partial gradient w.r.t.
w in (26) as
[Equation]
Z [
[Equation]
crelu ( v , w ; Z )] =
[Equation] [Equation]
To prove the last claim
[Equation]
we notice that in the above equality,
[Equation]
Now, what is left is to bound (cid:0)(cid:0) 1 − θπ (cid:1) p
[Equation]
0 , w ) − p ( θ, w ) (cid:1) 2 , using a multiple of q ( θ, w ) .
Recall that
[Equation]
We ﬁrst show that both (cid:0)(cid:0) 1 − θπ (cid:1) p (0 , w ) − p ( θ, w ) (cid:1) 2 and q ( θ, w ) are symmetric with respect to θ
= π 2 on [0 , π ] .
This is because
[Equation]
and
[Equation]
Therefore, it sufﬁces to consider θ ∈ [ π 2 , π ] only.
Then calling Lemma 13 for θ ∈ [ π 2 , π ] , we have p ( θ, w ) ≤ q ( θ, w ) and (cid:0) 1 − θπ (cid:1) p (0 , w ) ≤ q ( θ, w ) .
Therefore,
[Equation]
Combining the above estimate together with (27), (28) and (29), and using Cauchy-Schwarz inequality, we have
[Equation]
(cid:13)(cid:13)(cid:13)(cid:13)
[Equation]
(cid:13)(cid:13)(cid:13)(cid:13)
[Equation]
(cid:18)
[Equation]
(cid:19) q (
[Equation]
w
[Equation] [Equation]
(cid:62)
[Equation]
(cid:33) , where p (0 , w ) and q ( θ, w ) are uniformly bounded.
This completes the proof.
Lemma 8.
When Algorithm 1 converges, E Z (cid:104) ∂(cid:96)∂
v ( v , w ; Z ) (cid:105) and E Z (cid:104)
g crelu ( v , w ; Z ) (cid:105) vanish simultaneously, which only occurs at the 1.
Saddle points where (8) is satisﬁed according to Proposition 1.
Minimizers of (2) where v = v ∗ , θ ( w , w ∗ ) = 0 , or v =
( I m + 1 m 1 (cid:62) m ) − 1 ( 1 m 1 (cid:62) m −
I m ) v ∗ , θ ( w , w ∗ ) = π .
Proof of Lemma 8.
The proof of Lemma 8 is similar to that of Lemma 6, and we omit it here.
The core part is that q ( θ, w ) deﬁned in Lemma 12 is non-negative and equals 0 only at θ = 0 , π , as well as p (0 , w ) ≥ p ( θ, w ) ≥ p ( π, w ) = 0 .
Lemma 9.
Let µ ( x ) =
x
in (5).
Then the expected coarse partial gradient w.r.t.
w is
[Equation]
(cid:107) − ( v (cid:62) v ∗ ) w ∗ (cid:19) .
If θ ( w , w ∗ ) = π and v = (cid:0) I m + 1 m 1 (cid:62)
m (cid:1) − 1 ( 1 m 1 (cid:62) m − I m ) v ∗ , (cid:13)(cid:13)(cid:13) E Z (cid:104)
g id ( v , w ; Z )
(cid:105)(cid:13)(cid:13)(cid:13) =
[Equation]
i.e., E Z (cid:104)
g id ( v , w ; Z ) (cid:105) does not vanish at the local minimizers if 1 (cid:62) m v ∗ (cid:54)
=
and m > 1 ,.
Proof of Lemma 9.
By (5),
[Equation]
Using the facts that µ (cid:48)
= 1 and σ = 1 { x> 0 } , we have
[Equation]
In the last equality above
[Equation]
we called the third identity in Lemma 11.
If θ ( w , w ∗ ) =
π and v = (cid:0)
I m
[Equation]
− I m ) v ∗ , then
[Equation]
In the third equality, we used the identity ( I m + 1 m 1 (cid:62) m ) 1 m = ( m + 1) 1 m twice.
Lemma 10.
If w (cid:54) = 0 n and θ ( w , w ∗ ) ∈ (0 , π ) , then the inner product between the expected coarse and true gradients w.r.t.
w is (cid:28)
[Equation]
When θ ( w , w ∗ ) → π , v → (cid:0) I m + 1 m 1 (cid:62)
m (cid:1) − 1 ( 1 m 1 (cid:62) m −
I m ) v ∗ , if 1 (cid:62) m v ∗ (cid:54) =
and m > 1 , we have (cid:13)(cid:13)(cid:13) E Z (cid:104) g id ( v , w ; Z ) (cid:105)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13) ∂f∂ v ( v , w ) (cid:13)(cid:13)(cid:13) 2 + (cid:68) E Z (cid:104)
g id ( v , w ; Z ) (cid:105) , ∂f∂ w ( v , w ) (cid:69) →
+ ∞ .
Proof of Lemma 10.
By Lemmas 2 and 4, we have ∂f
[Equation]
[Equation] [Equation]
v (cid:62) v ∗ 2 π (cid:107) w (cid:107) (cid:16) I n − ww (cid:62) (cid:107) w (cid:107) 2 (cid:17)
w ∗ (cid:13)(cid:13)(cid:13)(cid:16)
I n − ww (cid:62) (cid:107) w (cid:107) 2 (cid:17) w ∗ (cid:13)(cid:13)(cid:13) and
E Z (cid:104) g id ( v , w ; Z ) (cid:105)
= 1 √ 2 π (cid:18) (cid:107) v (cid:107) 2 w (cid:107) w (cid:107) − ( v (cid:62) v ∗ ) w ∗ (cid:19) .
Since (cid:16) I n − ww (cid:62) (cid:107) w (cid:107) 2 (cid:17) w = 0 n and (cid:107) w ∗ (cid:107) =
1 , if θ ( w , w ∗ ) (cid:54) = 0 , π , then we have (cid:28) E Z (cid:104) g
id ( v , w ;
[Equation]
When θ ( w , w ∗ )
→ π , v
[Equation]
I
[Equation]
+
[Equation]
m (cid:1)
[Equation]
[Table]
[Equation]
[Table]
[Equation]
I m ) v ∗ , both (cid:13)(cid:13)(cid:13) ∂f∂ v ( v , w ) (cid:13)(cid:13)(cid:13) and (cid:68) E Z (cid:104) g id ( v , w ; Z ) (cid:105) , ∂f∂ w ( v , w ) (cid:69) converge to 0.
But if 1 (cid:62) m v ∗ (cid:54) =
and m > 1 ,
[Table]
Z
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
, which completes the proof.
Theorem 1.
Let { ( v t , w t ) } be the sequence generated by Algorithm 1 with ReLU µ ( x ) = max { x, 0 } or clipped ReLU µ ( x ) =
min { max { x, 0 } , 1 } .
Suppose (cid:107) w t (cid:107) ≥ c w for all t with some c w > 0 .
Then if the learning rate η > 0 is sufﬁciently small, for any initialization ( v 0 , w 0 ) , the objective sequence { f ( v t , w t ) } is monotonically decreasing, and { ( v t , w t ) } converges to a saddle point or a (local) minimizer of the population loss minimization (2).
In addition, if 1 (cid:62) m v ∗ (cid:54) =
and m > 1 , the descent and convergence properties do not hold for Algorithm 1 with the identity function µ ( x ) = x near the local minimizers satisfying θ ( w , w ∗ )
=
π and v =
( I m + 1 m 1 (cid:62) m ) − 1 ( 1 m 1 (cid:62) m − I m ) v ∗ .
Proof of Theorem 1 .
We ﬁrst prove the upper boundedness of { v t } .
Due to the coerciveness of f ( v , w ) w.r.t v , there exists C v > 0 , such that (cid:107) v (cid:107) ≤ C v for any v ∈ { v ∈ R m : f ( v , w ) ≤ f ( v 0 , w 0 ) for some w } .
In particular, (cid:107) v 0 (cid:107) ≤ C v .
Using induction, suppose we already have f ( v t , w t ) ≤ f ( v 0 , w 0 ) and (cid:107) v t (cid:107) ≤ C v .
If θ ( w t , w ∗ ) = 0 or π , then θ ( w T , w ∗ ) = 0 or π for all
T ≥ t , and the original problem reduces to a quadratic program in terms of v .
So { v t } will converge to v ∗ or ( I m + 1 m 1 (cid:62) m ) − 1 ( 1 m 1 (cid:62) m − I m ) v ∗ by choosing a suitable step size η .
In either case, we have (cid:13)(cid:13)(cid:13) E Z (cid:104) ∂(cid:96)∂
v ( v t , w t ; Z ) (cid:105)(cid:13)(cid:13)(cid:13) and (cid:13)(cid:13)(cid:13) E Z (cid:104)
g relu ( v t , w t ; Z ) (cid:105)(cid:13)(cid:13)(cid:13) both converge to 0.
Else if θ ( w t , w ∗ ) ∈ (0 , π ) , we deﬁne for any a ∈ [0 , 1] that
[Equation]
and w t
[Equation]
which satisfy
[Equation]
Let us ﬁx 0 < c ≤ c w and C ≥ C v .
By the expressions of E Z (cid:2) ∂(cid:96)
∂ v ( v t , w t ; Z ) (cid:3) and
E Z [ g relu ( v t , w t ; Z )] given in Lemma 4, and since (cid:107) w t (cid:107) = 1 , for sufﬁciently small ˜
η depending on C 0 and c w , with η ≤ ˜ η , it holds that (cid:107) v t ( a ) (cid:107) ≤ C and (cid:107) w t ( a ) (cid:107) ≥ c for all a ∈ [0 , 1] .
Possibly at some point a 0 where θ ( w t ( a 0 ) , w ∗ ) = 0 or π , the partial gradient ∂f∂ w ( v t ( a 0 ) , w t ( a 0 )) does not exist.
Otherwise, (cid:13)(cid:13)(cid:13) ∂f∂ w ( v t ( a ) , w t ( a )) (cid:13)(cid:13)(cid:13) is uniformly bounded for all a ∈ [0 , 1] / { a 0 } , which makes it integrable over the interval [0 , 1] .
Then for some constants L and A relu depending on C and c , we have
[Equation]
The third equality is due to the fundamental theorem of calculus.
In the ﬁrst inequality, we called
Lemma 3 for ( v t , w t ) and ( v t ( a ) , w t ( a )) with a ∈ [0 , 1] / { a 0 } .
In the last inequality, we used
Lemma 5.
So when η < η 0 := min (cid:110) 2 (1+ A relu
[Equation]
L , ˜ η
(cid:111)
, we have f ( v t +1 , w t +1 )
≤ f ( v t , w t ) ≤ f ( v 0 , w 0 ) , and thus (cid:107) v t +1 (cid:107) ≤ C v .
Summing up the inequality (30) over t from 0 to ∞ and using f ≥ 0 , we have ∞ (cid:88)
[Equation]
v t , w t ) , E Z
[Equation]
relu
[Equation]
t
[Equation]
w
[Equation]
; Z
[Equation]
(cid:105)(cid:29) ≤ f ( v 0 , w 0 ) /η < ∞ .
Hence,
[Equation]
and
[Equation]
Invoking Lemma 5 again, we further have
[Equation]
Invoking Lemma 6, we have that coarse gradient descent with ReLU µ ( x ) only converges to a saddle point or a minimizer.
Using Lemmas 7, 8 and similar arguments, we can prove the convergence of coarse gradient descent with clipped ReLU STE.
The second claim follows from Lemmas 9 and 10.
F. C ONVERGENCE TO G LOBAL M INIMIZERS
We prove that if the initialization weights ( v 0 , w 0 ) satisfy ( v 0 ) (cid:62) v ∗ > 0 , θ ( w 0 , w ∗ ) <
π 2 and ( 1 (cid:62) m v ∗ )( 1 (cid:62) m v 0 ) ≤ ( 1 (cid:62) m v ∗ ) 2 , then we have convergence guarantee to global optima by using the vanilla or clipped ReLU STE.
Theorem 2.
Under the assumptions of Theorem 1, if further the initialization ( v 0 , w 0 ) satisﬁes ( v 0 ) (cid:62) v ∗ > 0 , θ ( w 0 , w ∗ ) <
π 2 and ( 1 (cid:62) m v ∗ )( 1 (cid:62) m v 0 ) ≤ ( 1 (cid:62) m v ∗ ) 2 , then by using the vanila or clipped
ReLU STE for sufﬁciently learning rate η > 0 , we have ( v t ) (cid:62) v ∗ > 0 and θ ( w t , w ∗ ) <
π 2 for all t > 0 , and { ( v t , w t ) } converges to a global minimizer.
Proof of Theorem 2.
Proof by induction.
Suppose ( v t ) (cid:62) v ∗ > 0 , θ ( w t , w ∗ ) <
π 2 and ( 1 (cid:62) m v ∗ )( 1 (cid:62) m v t ) ≤ ( 1 (cid:62)
m v ∗ ) 2 .
Then for small enough η , we have
[Equation]
and
[Equation]
Moreover, by Lemmas 4, 5 and 7, both E Z [ g relu ( v , w ; Z )] and E Z [ g crelu ( v , w ; Z )] can be written in the form of α 1 (cid:16) I m −
[Equation]
w
[Equation] [Equation]
w ∗ + α 2 w , where α 1 ≤ 0 and α 2 is bounded by a constant depending on C v and c w .
Therefore,
[Equation]
and thus θ ( w t +1 , w ∗ ) <
π 2 .
Finally, since { ( v t , w t ) } converges, it can only converge to a global minimizer.