Understanding Straight-Through Estimator in Training Activation Quantized Neural Nets

Penghang Yin, Jiancheng Lyu, Shuai Zhang, Stanley Osher, Yingyong Qi, Jack Xin

Introduction

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 floating-point parameters, and billions of floating-point operations to make a single inference. To achieve substantial memory savings and energy efficiency at inference time, many recent efforts have been made to the training of coarsely quantized DNN, meanwhile maintaining the performance of their float 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)f({\bm{w}}) subject to a discrete set-constraint w∈Q{\bm{w}}\in\mathcal{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)\nabla f({\bm{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. Specifically, 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.

The idea of STE originates to the celebrated perceptron algorithm (Rosenblatt, 1957; 1962) in 1950s for learning single-layer perceptrons. The perceptron algorithm essentially does not calculate the “gradient” through the standard chain rule, but instead through a modified chain rule in which the derivative of identity function serves as the proxy of the original derivative of binary output function 1{x>0}1_{\{x>0\}}. 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\pm 1, (Hubara et al., 2016) substituted the derivative of the signum activation function with 1{∣x∣≤1}1_{\{|x|\leq 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 classifier to improve the generalization accuracy of DNN. In the backward pass, the derivative of a pre-trained fully-connected 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.

2 Main Contributions

Throughout this paper, we shall refer to the “gradient” of loss function w.r.t. the weight variables through the STE-modified chain rule as coarse gradient. Since the backward and forward passes do not match, 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, as this is not the standard gradient descent algorithm? 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 first time, we prove that proper choices of STE give rise to training algorithms that are descent. Specifically, 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 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 classifications 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, which is consistent with our theoretical finding about the identity STE.

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. We present the main results and sketch the mathematical analysis for STE 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 algorithms associated with poor STEs observed in CIFAR experiments. Due to space limitation, all the technical proofs as well as some figures are deferred to the appendix.

Learning Two-Linear-Layer CNN with Binary Activation

We consider a model similar to (Du et al., 2018) that outputs the prediction

Unlike in (Du et al., 2018), the activation function σ\sigma here is not ReLU, but the binary function σ(x)=1{x>0}\sigma(x)=1_{\{x>0\}}.

With the Gaussian assumption on Z{\mathbf{Z}}, as will be shown in section 2.2, it is possible to find the analytic expressions of f(v,w)f({\bm{v}},{\bm{w}}) and its gradient

The gradient of objective function, however, is not available for the network training. In fact, we can only access the expected sample gradient, namely,

Using the STE μ′\mu^{\prime} 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.

2 Preliminaries

Let us present some preliminaries about the landscape of the population loss function f(v,w)f({\bm{v}},{\bm{w}}). To this end, we define the angle between w{\bm{w}} and w∗{\bm{w}}^{*} as \theta({\bm{w}},{\bm{w}}^{*}):=\arccos\Big{(}\frac{{\bm{w}}^{\top}{\bm{w}}^{*}}{\|{\bm{w}}\|\|{\bm{w}}^{*}\|}\Big{)} for any w≠0n{\bm{w}}\neq\mathbf{0}_{n}. Recall that the label is given by y∗(Z)=(v∗)⊤Zw∗y^{*}({\mathbf{Z}})=({\bm{v}}^{*})^{\top}{\mathbf{Z}}{\bm{w}}^{*} from (1), we elaborate on the analytic expressions of f(v,w)f({\bm{v}},{\bm{w}}) and ∇f(v,w)\nabla f({\bm{v}},{\bm{w}}).

If w≠0n{\bm{w}}\neq\mathbf{0}_{n}, the population loss f(v,w)f({\bm{v}},{\bm{w}}) is given by

In addition, f({\bm{v}},{\bm{w}})=\frac{1}{8}({\bm{v}}^{*})^{\top}\big{(}{\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top}\big{)}{\bm{v}}^{*} for w=0n{\bm{w}}=\mathbf{0}_{n}.

If w≠0n{\bm{w}}\neq\mathbf{0}_{n} and θ(w,w∗)∈(0,π)\theta({\bm{w}},{\bm{w}}^{*})\in(0,\pi), the partial gradients of f(v,w)f({\bm{v}},{\bm{w}}) w.r.t. v{\bm{v}} and w{\bm{w}} are

Stationary points where the gradients given by (6) and (7) vanish simultaneously (which may not be possible), i.e.,

Non-differentiable points where θ(w,w∗)=0\theta({\bm{w}},{\bm{w}}^{*})=0 and v=v∗{\bm{v}}={\bm{v}}^{*}, or θ(w,w∗)=π\theta({\bm{w}},{\bm{w}}^{*})=\pi and {\bm{v}}=\big{(}{\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top}\big{)}^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*}.

Among them, {(v,w):v=v∗, θ(w,w∗)=0}\{({\bm{v}},{\bm{w}}):{\bm{v}}={\bm{v}}^{*},\,\theta({\bm{w}},{\bm{w}}^{*})=0\} are obviously the global minimizers of (2). We show that the stationary points, if exist, can only be saddle points, and \{({\bm{v}},{\bm{w}}):\theta({\bm{w}},{\bm{w}}^{*})=\pi,\;{\bm{v}}=\big{(}{\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top}\big{)}^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*}\} are the only potential spurious local minimizers.

If the true parameter v∗{\bm{v}}^{*} satisfies (1m⊤v∗)2<m+12∥v∗∥2(\bm{1}_{m}^{\top}{\bm{v}}^{*})^{2}<\frac{m+1}{2}\|{\bm{v}}^{*}\|^{2}, then

give the saddle points obeying (8), and \{({\bm{v}},{\bm{w}}):\theta({\bm{w}},{\bm{w}}^{*})=\pi,\;{\bm{v}}=\big{(}{\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top}\big{)}^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{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)\nabla f({\bm{v}},{\bm{w}}) given by (6) and (7), is Lipschitz continuous when restricted to bounded domains.

Main Results

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.

Let {(vt,wt)}\{({\bm{v}}^{t},{\bm{w}}^{t})\} be the sequence generated by Algorithm 1 with ReLU μ(x)=max⁡{x,0}\mu(x)=\max\{x,0\} or clipped ReLU μ(x)=min⁡{max⁡{x,0},1}\mu(x)=\min\left\{\max\{x,0\},1\right\}. Suppose ∥wt∥≥cw\|{\bm{w}}^{t}\|\geq c_{\bm{w}} for all tt with some cw>0c_{\bm{w}}>0. Then if the learning rate η>0\eta>0 is sufficiently small, for any initialization (v0,w0)({\bm{v}}^{0},{\bm{w}}^{0}), the objective sequence {f(vt,wt)}\{f({\bm{v}}^{t},{\bm{w}}^{t})\} is monotonically decreasing, and {(vt,wt)}\{({\bm{v}}^{t},{\bm{w}}^{t})\} converges to a saddle point or a (local) minimizer of the population loss minimization (2). In addition, if 1m⊤v∗≠0\bm{1}_{m}^{\top}{\bm{v}}^{*}\neq 0 and m>1m>1, the descent and convergence properties do not hold for Algorithm 1 with the identity function μ(x)=x\mu(x)=x near the local minimizers satisfying θ(w,w∗)=π\theta({\bm{w}},{\bm{w}}^{*})=\pi and v=(Im+1m1m⊤)−1(1m1m⊤−Im)v∗{\bm{v}}=({\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top})^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*}.

The convergence guarantee for the coarse gradient descent is established under the assumption that there are infinite 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 amounts of data as in deep learning.

The same results hold, if the Gaussian assumption on the input data is weakened to that their rows i.i.d. follow some rotation-invariant distribution. The proof will be substantially similar.

In the rest of this section, we sketch the mathematical analysis for the main results.

Let μ(x)=max⁡{x,0}\mu(x)=\max\{x,0\} in (5). The expected coarse gradient w.r.t. w{\bm{w}} is

where h(v,v∗)=∥v∥2+(1m⊤v)2−(1m⊤v)(1m⊤v∗)+v⊤v∗h({\bm{v}},{\bm{v}}^{*})=\|{\bm{v}}\|^{2}+(\bm{1}_{m}^{\top}{\bm{v}})^{2}-(\bm{1}_{m}^{\top}{\bm{v}})(\bm{1}_{m}^{\top}{\bm{v}}^{*})+{\bm{v}}^{\top}{\bm{v}}^{*}.

If w≠0n{\bm{w}}\neq\mathbf{0}_{n} and θ(w,w∗)∈(0,π)\theta({\bm{w}},{\bm{w}}^{*})\in(0,\pi), then the inner product between the expected coarse and population gradients w.r.t. w{\bm{w}} is

where a) is due to (12). Therefore, if η\eta is small enough, we have monotonically decreasing energy until convergence.

Saddle points where (8) is satisfied according to Proposition 1.

Minimizers of (2) where v=v∗{\bm{v}}={\bm{v}}^{*}, θ(w,w∗)=0\theta({\bm{w}},{\bm{w}}^{*})=0, or v=(Im+1m1m⊤)−1(1m1m⊤−Im)v∗{\bm{v}}=({\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top})^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*}, θ(w,w∗)=π\theta({\bm{w}},{\bm{w}}^{*})=\pi.

Lemma 6 states that when Algorithm 1 using ReLU STE converges, it can only converge to a critical point of the population loss function.

2 Derivative of the Clipped ReLU as STE

If w≠0n{\bm{w}}\neq\mathbf{0}_{n} and θ(w,w∗)∈(0,π)\theta({\bm{w}},{\bm{w}}^{*})\in(0,\pi), then

where h(v,v∗):=∥v∥2+(1m⊤v)2−(1m⊤v)(1m⊤v∗)+v⊤v∗h({\bm{v}},{\bm{v}}^{*}):=\|{\bm{v}}\|^{2}+(\bm{1}_{m}^{\top}{\bm{v}})^{2}-(\bm{1}_{m}^{\top}{\bm{v}})(\bm{1}_{m}^{\top}{\bm{v}}^{*})+{\bm{v}}^{\top}{\bm{v}}^{*} same as in Lemma 5, and

Saddle points where (8) is satisfied according to Proposition 1.

Minimizers of (2) where v=v∗{\bm{v}}={\bm{v}}^{*}, θ(w,w∗)=0\theta({\bm{w}},{\bm{w}}^{*})=0, or v=(Im+1m1m⊤)−1(1m1m⊤−Im)v∗{\bm{v}}=({\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top})^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*}, θ(w,w∗)=π\theta({\bm{w}},{\bm{w}}^{*})=\pi.

3 Derivative of the Identity Function 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.

Let μ(x)=x\mu(x)=x in (5). Then the expected coarse partial gradient w.r.t. w{\bm{w}} is

If θ(w,w∗)=π\theta({\bm{w}},{\bm{w}}^{*})=\pi and {\bm{v}}=\big{(}{\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top}\big{)}^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*},

If w≠0n{\bm{w}}\neq\mathbf{0}_{n} and θ(w,w∗)∈(0,π)\theta({\bm{w}},{\bm{w}}^{*})\in(0,\pi), then the inner product between the expected coarse and true gradients w.r.t. w{\bm{w}} is

When θ(w,w∗)→π\theta({\bm{w}},{\bm{w}}^{*})\to\pi, {\bm{v}}\to\big{(}{\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top}\big{)}^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*}, if 1m⊤v∗≠0\bm{1}_{m}^{\top}{\bm{v}}^{*}\neq 0 and m>1m>1, we have

Experiments

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-10 (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 float.

The resolution α\alpha 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 modified batch normalization layer (Ioffe & Szegedy, 2015) without the scale and shift, whose output components approximately follow a unit Gaussian distribution. Then the α\alpha that fits 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 α\alpha, it will be fixed 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 specified in Table 2 in the appendix.

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 finding that ReLU is a great STE for learning the two-linear-layer (shallow) CNN.

2 Instability

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 1, 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%86.59\% (0.25) and 91.24%91.24\% (0.04), respectively, whereas that using the identity STE gives 54.16%54.16\% (1.38). 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−510^{-5}. For both initializations, the training loss and validation error significantly increase within the first 20 epochs; see Figure 2. To speedup training, at epoch 20, we switch to the normal schedule of learning rate specified 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 ResNet-20 is 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.

Concluding Remarks

We provided the first theoretical justification 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 confirmed 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 with intractable gradients.

This work was partially supported by NSF grants DMS-1522383, IIS-1632935, ONR grant N00014-18-1-2527, AFOSR grant FA9550-18-0167, DOE grant DE-SC0013839 and STROBE STC NSF grant DMR-1548924.

References

Appendix

B. The Schedule of Learning Rate

C. Instability of ReLU STE on ResNet-20 with 2-bit Activations

D. Additional Supporting Lemmas

Let p(θ,w)p(\theta,w) and q(θ,w)q(\theta,{\bm{w}}) be defined in Lemma 12. Then for θ∈[π2,π]\theta\in[\frac{\pi}{2},\pi], we have

p(θ,w)≤q(θ,w)p(\theta,{\bm{w}})\leq q(\theta,{\bm{w}}).

(1−θπ)p(0,w)≤q(θ,w)\left(1-\frac{\theta}{\pi}\right)p(0,{\bm{w}})\leq q(\theta,{\bm{w}}).

1. Let θ∈[π2,π]\theta\in[\frac{\pi}{2},\pi], since ξ≥0\xi\geq 0,

where the last inequality is due to the rearrangement inequality since both sin⁡(ϕ)\sin(\phi) and ξ(sec⁡(ϕ)∥w∥)\xi\left(\frac{\sec(\phi)}{\|{\bm{w}}\|}\right) are increasing in ϕ\phi on [0,π2][0,\frac{\pi}{2}].

2. Since cos⁡(ϕ)ξ(sec⁡(ϕ)∥w∥)\cos(\phi)\xi\left(\frac{\sec(\phi)}{\|{\bm{w}}\|}\right) is even, we have

The first inequality is due to part 1 which gives p(π/2,w)≤q(π/2,w)p(\pi/2,{\bm{w}})\leq q(\pi/2,{\bm{w}}), whereas the second one holds because sin⁡(ϕ)ξ(sec⁡(ϕ)∥w∥)\sin(\phi)\xi\left(\frac{\sec(\phi)}{\|{\bm{w}}\|}\right) is increasing on [0,π2][0,\frac{\pi}{2}]. ∎

where we used the fact sin⁡(x)≥2xπ\sin(x)\geq\frac{2x}{\pi} for x∈[0,π2]x\in[0,\frac{\pi}{2}] and the estimate in (Proof of Lemma 14.).

E. Main Proofs

If w≠0n{\bm{w}}\neq\mathbf{0}_{n}, the population loss f(v,w)f({\bm{v}},{\bm{w}}) is given by

In addition, f({\bm{v}},{\bm{w}})=\frac{1}{8}({\bm{v}}^{*})^{\top}\big{(}{\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top}\big{)}{\bm{v}}^{*} for w=0n{\bm{w}}=\mathbf{0}_{n}.

Then it is easy to validate the first claim. Moreover, if w=0n{\bm{w}}=\mathbf{0}_{n}, then

If w≠0n{\bm{w}}\neq\mathbf{0}_{n} and θ(w,w∗)∈(0,π)\theta({\bm{w}},{\bm{w}}^{*})\in(0,\pi), the partial gradients of f(v,w)f({\bm{v}},{\bm{w}}) w.r.t. v{\bm{v}} and w{\bm{w}} are

The first claim is trivial, and we only show the second one. Since θ(w,w∗)=arccos⁡(w⊤w∗∥w∥)\theta({\bm{w}},{\bm{w}}^{*})=\arccos\left(\frac{{\bm{w}}^{\top}{\bm{w}}^{*}}{\|{\bm{w}}\|}\right) is differentiable w.r.t. w{\bm{w}} at θ(w,w∗)∈(0,π)\theta({\bm{w}},{\bm{w}}^{*})\in(0,\pi), we have

If the true parameter v∗{\bm{v}}^{*} satisfies (1m⊤v∗)2<m+12∥v∗∥2(\bm{1}_{m}^{\top}{\bm{v}}^{*})^{2}<\frac{m+1}{2}\|{\bm{v}}^{*}\|^{2}, then

give the saddle points obeying (8), and \{({\bm{v}},{\bm{w}}):\theta({\bm{w}},{\bm{w}}^{*})=\pi,\;{\bm{v}}=\big{(}{\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top}\big{)}^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*}\} are the spurious local minimizers. Otherwise, the model (2) has no saddle points or spurious local minimizers.

Suppose v⊤v∗=0{\bm{v}}^{\top}{\bm{v}}^{*}=0 and ∂f∂v(v,w)=0\frac{\partial f}{\partial{\bm{v}}}({\bm{v}},{\bm{w}})=\mathbf{0}, then by Lemma 1,

On the other hand, from (18) it also follows that

where we used (Im+1m1m⊤)1m=(m+1)1m({\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top})\bm{1}_{m}=(m+1)\bm{1}_{m}. Taking the difference of the two equalities above gives

By (19), we have θ(w,w∗)=π2(m+1)∥v∗∥2(m+1)∥v∗∥2−(1m⊤v∗)2\theta({\bm{w}},{\bm{w}}^{*})=\frac{\pi}{2}\frac{(m+1)\|{\bm{v}}^{*}\|^{2}}{(m+1)\|{\bm{v}}^{*}\|^{2}-(\bm{1}_{m}^{\top}{\bm{v}}^{*})^{2}}, which requires

Furthermore, since ∂f∂v(v,w)=0\frac{\partial f}{\partial{\bm{v}}}({\bm{v}},{\bm{w}})=0, we have

Next, we check the local optimality of the stationary points. By ignoring the scaling and constant terms, we rewrite the objective function as

It is easy to check that its Hessian matrix

is indefinite. Therefore, the stationary points are saddle points.

Moreover, if (1m⊤v∗)2<m+12∥v∗∥2(\bm{1}_{m}^{\top}{\bm{v}}^{*})^{2}<\frac{m+1}{2}\|{\bm{v}}^{*}\|^{2}, at the point (v,θ)=((Im+1m1m⊤)−1(1m1m⊤−Im)v∗,π)({\bm{v}},\theta)=(({\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top})^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*},\pi), we have

where we used (20) in the last identity. We consider an arbitrary point (v+Δv,π+Δθ)({\bm{v}}+\Delta{\bm{v}},\pi+\Delta\theta) in the neighborhood of (v,π)({\bm{v}},\pi) with Δθ≤0\Delta\theta\leq 0. The perturbed objective value is

To prove the second claim, suppose (1m⊤v∗)2≥m+12∥v∗∥2(\bm{1}_{m}^{\top}{\bm{v}}^{*})^{2}\geq\frac{m+1}{2}\|{\bm{v}}^{*}\|^{2}, then either ∂f∂w(v,w)\frac{\partial f}{\partial{\bm{w}}}({\bm{v}},{\bm{w}}) does not exist, or ∂f∂v(v,w)\frac{\partial f}{\partial{\bm{v}}}({\bm{v}},{\bm{w}}) and ∂f∂w(v,w)\frac{\partial f}{\partial{\bm{w}}}({\bm{v}},{\bm{w}}) do not vanish simultaneously, and thus there is no stationary point.

At the point (v,θ)=((Im+1m1m⊤)−1(1m1m⊤−Im)v∗,π)({\bm{v}},\theta)=(({\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top})^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*},\pi), we have

It is easy to check that ∥Im+1m1m⊤∥=m+1\|{\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top}\|=m+1. Then

where the last inequality is due to Lemma 14.1.

where the second last inequality is to due to Lemma 14.2. Combining the two inequalities above validates the claim. ∎

Let μ(x)=max⁡{x,0}\mu(x)=\max\{x,0\} in (5). The expected coarse gradient w.r.t. w{\bm{w}} is

where h(v,v∗)=∥v∥2+(1m⊤v)2−(1m⊤v)(1m⊤v∗)+v⊤v∗h({\bm{v}},{\bm{v}}^{*})=\|{\bm{v}}\|^{2}+(\bm{1}_{m}^{\top}{\bm{v}})^{2}-(\bm{1}_{m}^{\top}{\bm{v}})(\bm{1}_{m}^{\top}{\bm{v}}^{*})+{\bm{v}}^{\top}{\bm{v}}^{*}.

Using the fact that μ′=σ=1{x>0}\mu^{\prime}=\sigma=1_{\{x>0\}}, we have

If w≠0n{\bm{w}}\neq\mathbf{0}_{n} and θ(w,w∗)∈(0,π)\theta({\bm{w}},{\bm{w}}^{*})\in(0,\pi), then the inner product between the expected coarse and true gradients w.r.t. w{\bm{w}} is

Notice that \Big{(}{\bm{I}}_{n}-\frac{{\bm{w}}{\bm{w}}^{\top}}{\|{\bm{w}}\|^{2}}\Big{)}{\bm{w}}=\mathbf{0}_{n} and ∥w∗∥=1\|{\bm{w}}^{*}\|=1, if θ(w,w∗)≠0,π\theta({\bm{w}},{\bm{w}}_{*})\neq 0,\pi, then we have

To show the second claim, without loss of generality, we assume ∥w∥=1\|{\bm{w}}\|=1. Denote θ:=θ(w,w∗)\theta:=\theta({\bm{w}},{\bm{w}}^{*}). By Lemma 1, we have

where the equality is due to (22) and (Proof of Lemma 5.), the first inequality is due to Cauchy-Schwarz inequality, the second inequality holds because the angle between w∥w∥\frac{{\bm{w}}}{\|{\bm{w}}\|} and w∥w∥+w∗∥w∥w∥+w∗∥\frac{\frac{{\bm{w}}}{\|{\bm{w}}\|}+{\bm{w}}^{*}}{\left\|\frac{{\bm{w}}}{\|{\bm{w}}\|}+{\bm{w}}^{*}\right\|} is θ2\frac{\theta}{2} and ∥w∥w∥−w∥w∥+w∗∥w∥w∥+w∗∥∥≤θ2\left\|\frac{{\bm{w}}}{\|{\bm{w}}\|}-\frac{\frac{{\bm{w}}}{\|{\bm{w}}\|}+{\bm{w}}^{*}}{\left\|\frac{{\bm{w}}}{\|{\bm{w}}\|}+{\bm{w}}^{*}\right\|}\right\|\leq\frac{\theta}{2}, whereas the third inequality is due to sin⁡(x)≥2xπ\sin(x)\geq\frac{2x}{\pi}, cos⁡(x)≥1−2xπ\cos(x)\geq 1-\frac{2x}{\pi}, and

Saddle points where (8) is satisfied according to Proposition 1.

Minimizers of (2) where v=v∗{\bm{v}}={\bm{v}}^{*}, θ(w,w∗)=0\theta({\bm{w}},{\bm{w}}^{*})=0, or v=(Im+1m1m⊤)−1(1m1m⊤−Im)v∗{\bm{v}}=({\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top})^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*}, θ(w,w∗)=π\theta({\bm{w}},{\bm{w}}^{*})=\pi.

where h(v,v∗)=∥v∥2+(1m⊤v)2−(1m⊤v)(1m⊤v∗)+v⊤v∗h({\bm{v}},{\bm{v}}^{*})=\|{\bm{v}}\|^{2}+(\bm{1}_{m}^{\top}{\bm{v}})^{2}-(\bm{1}_{m}^{\top}{\bm{v}})(\bm{1}_{m}^{\top}{\bm{v}}^{*})+{\bm{v}}^{\top}{\bm{v}}^{*}. By (25), we must have θ(w,w∗)=0\theta({\bm{w}},{\bm{w}}^{*})=0 or θ(w,w∗)=π\theta({\bm{w}},{\bm{w}}^{*})=\pi or v⊤v∗=0{\bm{v}}^{\top}{\bm{v}}^{*}=0.

If θ(w,w∗)=0\theta({\bm{w}},{\bm{w}}^{*})=0, then by (24), v=v∗{\bm{v}}={\bm{v}}^{*}, and (25) is satisfied.

If θ(w,w∗)=π\theta({\bm{w}},{\bm{w}}^{*})=\pi, then by (24), v=(Im+1m1m⊤)−1(1m1m⊤−Im)v∗{\bm{v}}=({\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top})^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*}, and (25) is satisfied.

If v⊤v∗=0{\bm{v}}^{\top}{\bm{v}}^{*}=0, then by (24), we have the expressions for v{\bm{v}} and θ(w,w∗)\theta({\bm{w}},{\bm{w}}^{*}) from Proposition 1, and (25) is satisfied. ∎

If w≠0n{\bm{w}}\neq\mathbf{0}_{n} and θ(w,w∗)∈(0,π)\theta({\bm{w}},{\bm{w}}^{*})\in(0,\pi), then

where h(v,v∗):=∥v∥2+(1m⊤v)2−(1m⊤v)(1m⊤v∗)+v⊤v∗h({\bm{v}},{\bm{v}}^{*}):=\|{\bm{v}}\|^{2}+(\bm{1}_{m}^{\top}{\bm{v}})^{2}-(\bm{1}_{m}^{\top}{\bm{v}})(\bm{1}_{m}^{\top}{\bm{v}}^{*})+{\bm{v}}^{\top}{\bm{v}}^{*} same as in Lemma 5, and

Since μ′=1{0<x<1}\mu^{\prime}=1_{\{0<x<1\}} and σ=1{x>0}\sigma=1_{\{x>0\}}, we have

In the last equality above, we called Lemma 12.

In the last line, q(θ,w)≥0q(\theta,{\bm{w}})\geq 0 because sin⁡(ϕ)ξ(sec⁡(ϕ)∥w∥)\sin(\phi)\xi\left(\frac{\sec(\phi)}{\|{\bm{w}}\|}\right) is odd in ϕ\phi and positive for ϕ∈(0,π2]\phi\in(0,\frac{\pi}{2}].

We rewrite the coarse partial gradient w.r.t. w{\bm{w}} in (7) as

To prove the last claim, we notice that in the above equality,

Now, what is left is to bound ((1−θπ)p(0,w)−p(θ,w))2\left(\left(1-\frac{\theta}{\pi}\right)p(0,{\bm{w}})-p(\theta,{\bm{w}})\right)^{2}, using a multiple of q(θ,w)q(\theta,{\bm{w}}). Recall that

We first show that both ((1−θπ)p(0,w)−p(θ,w))2\left(\left(1-\frac{\theta}{\pi}\right)p(0,{\bm{w}})-p(\theta,{\bm{w}})\right)^{2} and q(θ,w)q(\theta,{\bm{w}}) are symmetric with respect to θ=π2\theta=\frac{\pi}{2} on [0,π][0,\pi]. This is because

Therefore, it suffices to consider θ∈[π2,π]\theta\in[\frac{\pi}{2},\pi] only. Then calling Lemma 13 for θ∈[π2,π]\theta\in[\frac{\pi}{2},\pi], we have p(θ,w)≤q(θ,w)p(\theta,{\bm{w}})\leq q(\theta,{\bm{w}}) and (1−θπ)p(0,w)≤q(θ,w)\left(1-\frac{\theta}{\pi}\right)p(0,{\bm{w}})\leq q(\theta,{\bm{w}}). Therefore,

Combining the above estimate together with (27), (28) and (29), and using Cauchy-Schwarz inequality, we have

where p(0,w)p(0,{\bm{w}}) and q(θ,w)q(\theta,{\bm{w}}) are uniformly bounded. This completes the proof.

Saddle points where (8) is satisfied according to Proposition 1.

Minimizers of (2) where v=v∗{\bm{v}}={\bm{v}}^{*}, θ(w,w∗)=0\theta({\bm{w}},{\bm{w}}^{*})=0, or v=(Im+1m1m⊤)−1(1m1m⊤−Im)v∗{\bm{v}}=({\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top})^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*}, θ(w,w∗)=π\theta({\bm{w}},{\bm{w}}^{*})=\pi.

The proof of Lemma 8 is similar to that of Lemma 6, and we omit it here. The core part is that q(θ,w)q(\theta,{\bm{w}}) defined in Lemma 12 is non-negative and equals 0 only at θ=0,π\theta=0,\pi, as well as p(0,w)≥p(θ,w)≥p(π,w)=0p(0,{\bm{w}})\geq p(\theta,{\bm{w}})\geq p(\pi,{\bm{w}})=0. ∎

Let μ(x)=x\mu(x)=x in (5). Then the expected coarse partial gradient w.r.t. w{\bm{w}} is

If θ(w,w∗)=π\theta({\bm{w}},{\bm{w}}^{*})=\pi and {\bm{v}}=\big{(}{\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top}\big{)}^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*},

Using the facts that μ′=1\mu^{\prime}=1 and σ=1{x>0}\sigma=1_{\{x>0\}}, we have

In the last equality above, we called the third identity in Lemma 11. If θ(w,w∗)=π\theta({\bm{w}},{\bm{w}}^{*})=\pi and {\bm{v}}=\big{(}{\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top}\big{)}^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*}, then

In the third equality, we used the identity (Im+1m1m⊤)1m=(m+1)1m({\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top})\bm{1}_{m}=(m+1)\bm{1}_{m} twice. ∎

If w≠0n{\bm{w}}\neq\mathbf{0}_{n} and θ(w,w∗)∈(0,π)\theta({\bm{w}},{\bm{w}}^{*})\in(0,\pi), then the inner product between the expected coarse and true gradients w.r.t. w{\bm{w}} is

When θ(w,w∗)→π\theta({\bm{w}},{\bm{w}}^{*})\to\pi, {\bm{v}}\to\big{(}{\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top}\big{)}^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*}, if 1m⊤v∗≠0\bm{1}_{m}^{\top}{\bm{v}}^{*}\neq 0 and m>1m>1, we have

Since \Big{(}{\bm{I}}_{n}-\frac{{\bm{w}}{\bm{w}}^{\top}}{\|{\bm{w}}\|^{2}}\Big{)}{\bm{w}}=\mathbf{0}_{n} and ∥w∗∥=1\|{\bm{w}}^{*}\|=1, if θ(w,w∗)≠0,π\theta({\bm{w}},{\bm{w}}_{*})\neq 0,\pi, then we have

Let {(vt,wt)}\{({\bm{v}}^{t},{\bm{w}}^{t})\} be the sequence generated by Algorithm 1 with ReLU μ(x)=max⁡{x,0}\mu(x)=\max\{x,0\} or clipped ReLU μ(x)=min⁡{max⁡{x,0},1}\mu(x)=\min\{\max\{x,0\},1\}. Suppose ∥wt∥≥cw\|{\bm{w}}^{t}\|\geq c_{\bm{w}} for all tt with some cw>0c_{\bm{w}}>0. Then if the learning rate η>0\eta>0 is sufficiently small, for any initialization (v0,w0)({\bm{v}}^{0},{\bm{w}}^{0}), the objective sequence {f(vt,wt)}\{f({\bm{v}}^{t},{\bm{w}}^{t})\} is monotonically decreasing, and {(vt,wt)}\{({\bm{v}}^{t},{\bm{w}}^{t})\} converges to a saddle point or a (local) minimizer of the population loss minimization (2). In addition, if 1m⊤v∗≠0\bm{1}_{m}^{\top}{\bm{v}}^{*}\neq 0 and m>1m>1, the descent and convergence properties do not hold for Algorithm 1 with the identity function μ(x)=x\mu(x)=x near the local minimizers satisfying θ(w,w∗)=π\theta({\bm{w}},{\bm{w}}^{*})=\pi and v=(Im+1m1m⊤)−1(1m1m⊤−Im)v∗{\bm{v}}=({\bm{I}}_{m}+\bm{1}_{m}\bm{1}_{m}^{\top})^{-1}(\bm{1}_{m}\bm{1}_{m}^{\top}-{\bm{I}}_{m}){\bm{v}}^{*}.

Summing up the inequality (Proof of Theorem 1 .) over tt from to ∞\infty and using f≥0f\geq 0, we have

Invoking Lemma 6, we have that coarse gradient descent with ReLU μ(x)\mu(x) (subsequentially) 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. Convergence to Global Minimizers

We prove that if the initialization weights (v0,w0)({\bm{v}}^{0},{\bm{w}}^{0}) satisfy (v0)⊤v∗>0({\bm{v}}^{0})^{\top}{\bm{v}}^{*}>0, θ(w0,w∗)<π2\theta({\bm{w}}^{0},{\bm{w}}^{*})<\frac{\pi}{2} and (1m⊤v∗)(1m⊤v0)≤(1m⊤v∗)2(\bm{1}_{m}^{\top}{\bm{v}}^{*})(\bm{1}_{m}^{\top}{\bm{v}}^{0})\leq(\bm{1}_{m}^{\top}{\bm{v}}^{*})^{2}, then we have convergence guarantee to global optima by using the vanilla or clipped ReLU STE.

Under the assumptions of Theorem 1, if further the initialization (v0,w0)({\bm{v}}^{0},{\bm{w}}^{0}) satisfies (v0)⊤v∗>0({\bm{v}}^{0})^{\top}{\bm{v}}^{*}>0, θ(w0,w∗)<π2\theta({\bm{w}}^{0},{\bm{w}}^{*})<\frac{\pi}{2} and (1m⊤v∗)(1m⊤v0)≤(1m⊤v∗)2(\bm{1}_{m}^{\top}{\bm{v}}^{*})(\bm{1}_{m}^{\top}{\bm{v}}^{0})\leq(\bm{1}_{m}^{\top}{\bm{v}}^{*})^{2}, then by using the vanila or clipped ReLU STE for sufficiently learning rate η>0\eta>0, we have (vt)⊤v∗>0({\bm{v}}^{t})^{\top}{\bm{v}}^{*}>0 and θ(wt,w∗)<π2\theta({\bm{w}}^{t},{\bm{w}}^{*})<\frac{\pi}{2} for all t>0t>0, and {(vt,wt)}\{({\bm{v}}^{t},{\bm{w}}^{t})\} converges to a global minimizer.

Proof by induction. Suppose (vt)⊤v∗>0({\bm{v}}^{t})^{\top}{\bm{v}}^{*}>0, θ(wt,w∗)<π2\theta({\bm{w}}^{t},{\bm{w}}^{*})<\frac{\pi}{2} and (1m⊤v∗)(1m⊤vt)≤(1m⊤v∗)2(\bm{1}_{m}^{\top}{\bm{v}}^{*})(\bm{1}_{m}^{\top}{\bm{v}}^{t})\leq(\bm{1}_{m}^{\top}{\bm{v}}^{*})^{2}. Then for small enough η\eta, we have

and thus θ(wt+1,w∗)<π2\theta({\bm{w}}^{t+1},{\bm{w}}^{*})<\frac{\pi}{2}. Finally, since {(vt,wt)}\{({\bm{v}}^{t},{\bm{w}}^{t})\} converges, it can only converge to a global minimizer. ∎