Year: 2019

Abstract:
We provide a theoretical algorithm for checking local optimality and escaping saddles at nondifferentiable points of empirical risks of two-layer ReLU networks. Our algorithm receives any parameter value and returns: local minimum, secondorder stationary point, or a strict descent direction. The presence ofM data points on the nondifferentiability of the ReLU divides the parameter space into at most 2 regions, which makes analysis difficult. By exploiting polyhedral geometry, we reduce the total computation down to one convex quadratic program (QP) for each hidden node, O(M) (in)equality tests, and one (or a few) nonconvex QP. For the last QP, we show that our specific problem can be solved efficiently, in spite of nonconvexity. In the benign case, we solve one equality constrained QP, and we prove that projected gradient descent solves it exponentially fast. In the bad case, we have to solve a few more inequality constrained QPs, but we prove that the time complexity is exponential only in the number of inequality constraints. Our experiments show that either benign case or bad case with very few inequality constraints occurs, implying that our algorithm is efficient in most cases.

heading: 1 INTRODUCTION
text: Empirical success of deep neural networks has sparked great interest in the theory of deep models. From an optimization viewpoint, the biggest mystery is that deep neural networks are successfully trained by gradient-based algorithms despite their nonconvexity. On the other hand, it has been known that training neural networks to global optimality is NP-hard (Blum & Rivest, 1988). It is also known that even checking local optimality of nonconvex problems can be NP-hard (Murty & Kabadi, 1987). Bridging this gap between theory and practice is a very active area of research, and there have been many attempts to understand why optimization works well for neural networks, by studying the loss surface (Baldi & Hornik, 1989; Yu & Chen, 1995; Kawaguchi, 2016; Soudry & Carmon, 2016; Nguyen & Hein, 2017; 2018; Safran & Shamir, 2018; Laurent & Brecht, 2018; Yun et al., 2019; 2018; Zhou & Liang, 2018; Wu et al., 2018; Shamir, 2018) and the role of (stochastic) gradientbased methods (Tian, 2017; Brutzkus & Globerson, 2017; Zhong et al., 2017; Soltanolkotabi, 2017; Li & Yuan, 2017; Zhang et al., 2018; Brutzkus et al., 2018; Wang et al., 2018; Li & Liang, 2018; Du et al., 2018a;b;c; Allen-Zhu et al., 2018; Zou et al., 2018; Zhou et al., 2019).
One of the most important beneficial features of convex optimization is the existence of an optimality test (e.g., norm of the gradient is smaller than a certain threshold) for termination, which gives us a certificate of (approximate) optimality. In contrast, many practitioners in deep learning rely on running first-order methods for a fixed number of epochs, without good termination criteria for the optimization problem. This means that the solutions that we obtain at the end of training are not necessarily global or even local minima. Yun et al. (2018; 2019) showed efficient and simple global optimality tests for deep linear neural networks, but such optimality tests cannot be extended to general nonlinear neural networks, mainly due to nonlinearity in activation functions.
Besides nonlinearity, in case of ReLU networks significant additional challenges in the analysis arise due to nondifferentiability, and obtaining a precise understanding of the nondifferentiable points is still elusive. ReLU activation function h(t) = max{t, 0} is nondifferentiable at t = 0. This means that, for example, the function f(w, b) := (h(wTx + b) − 1)2 is nondifferentiable for any (w, b) satisfyingwTx+b = 0. See Figure 1 for an illustration of how the empirical risk of a ReLU network
looks like. Although the plotted function does not exactly match the definition of empirical risk we study in this paper, the figures help us understand that the empirical risk is continuous but piecewise differentiable, with affine hyperplanes on which the function is nondifferentiable.
Such nondifferentiable points lie in a set of measure zero, so one may be tempted to overlook them as “non-generic.” However, when studying critical points we cannot do so, as they are precisely such “non-generic” points. For example, Laurent & Brecht (2018) study one-hidden-layer ReLU networks with hinge loss and note that except for piecewise constant regions, local minima always occur on nonsmooth boundaries. Probably due to difficulty in analysis, there have not been other works that handle such nonsmooth points of losses and prove results that work for all points. Some theorems (Soudry & Carmon, 2016; Nguyen & Hein, 2018) hold “almost surely”; some assume differentiability or make statements only for differentiable points (Nguyen & Hein, 2017; Yun et al., 2019); others analyze population risk, in which case the nondifferentiability disappears after taking expectation (Tian, 2017; Brutzkus & Globerson, 2017; Du et al., 2018b; Safran & Shamir, 2018; Wu et al., 2018).

heading: 1.1 SUMMARY OF OUR RESULTS
text: In this paper, we take a step towards understanding nondifferentiable points of the empirical risk of one-hidden-layer ReLU(-like) networks. Specifically, we provide a theoretical algorithm that tests second-order stationarity for any point of the loss surface. It takes an input point and returns:
(a) The point is a local minimum; or (b) The point is a second-order stationary point (SOSP); or (c) A descent direction in which the function value strictly decreases.
Therefore, we can test whether a given point is a SOSP. If not, the test extracts a guaranteed direction of descent that helps continue minimization. With a proper numerical implementation of our algorithm (although we leave it for future work), one can run a first-order method until it gets stuck near a point, and run our algorithm to test for optimality/second-order stationarity. If the point is an SOSP, we can terminate without further computation over many epochs; if the point has a descent direction, our algorithm will return a descent direction and we can continue on optimizing. Note that the descent direction may come from the second-order information; our algorithm even allows us to escape nonsmooth second-order saddle points. This idea of mixing first and second-order methods has been explored in differentiable problems (see, for example, Carmon et al. (2016); Reddi et al. (2017) and references therein), but not for nondifferentiable ReLU networks.
The key computational challenge in constructing our algorithm for nondifferentiable points is posed by data points that causes input 0 to the ReLU hidden node(s). Such data point bisects the parameter space into two halfspaces with different “slopes” of the loss surface, so one runs into nondifferen-
tiability. We define these data points to be boundary data points. For example, in Figure 1b, if the input to our algorithm is (w, v) = (−2/3, 1/3), then there are two boundary data points: “blue” and “red.” If there are M such boundary data points, then in the worst case the parameter space divides into 2M regions, or equivalently, there are 2M “pieces” of the function that surround the input point. Of course, naively testing each region will be very inefficient; in our algorithm, we overcome this issue by a clever use of polyhedral geometry. Another challenge comes from the second-order test, which involves solving nonconvex QPs. Although QP is NP-hard in general (Pardalos & Vavasis, 1991), we prove that the QPs in our algorithm are still solved efficiently in most cases. We further describe the challenges and key ideas in Section 2.1. Notation. For a vector v, [v]i denotes its i-th component, and ‖v‖H := √ vTHv denotes a seminorm where H is a positive semidefinite matrix. Given a matrix A, we let [A]i,j , [A]i,·, and [A]·,j be A’s (i, j)-th entry, the i-th row, and the j-th column, respectively.

heading: 2 PROBLEM SETTING AND KEY IDEAS
text: We consider a one-hidden-layer neural network with input dimension dx, hidden layer width dh, and output dimension dy . We are given m pairs of data points and labels (xi, yi)mi=1, where xi ∈ Rdx and yi ∈ Rdy . Given an input vector x, the output of the network is defined as Y (x) := W2h(W1x+ b1) + b2, where W2 ∈ Rdy×dh , b2 ∈ Rdy , W1 ∈ Rdh×dx , and b1 ∈ Rdh are the network parameters. The activation function h is “ReLU-like,” meaning h(t) := max{s+t, 0} + min{s−t, 0}, where s+ > 0, s− ≥ 0 and s+ 6= s−. Note that ReLU and Leaky-ReLU are members of this class. In training neural networks, we are interested in minimizing the empirical risk
R((Wj , bj) 2 j=1) = ∑m i=1 `(Y (xi), yi) = ∑m i=1 `(W2h(W1xi + b1) + b2, yi),
over the parameters (Wj , bj)2j=1, where `(w, y) : Rdy × Rdy 7→ R is the loss function. We make the following assumptions on the loss function and the training dataset: Assumption 1. The loss function `(w, y) is twice differentiable and convex in w. Assumption 2. No dx + 1 data points lie on the same affine hyperplane. Assumption 1 is satisfied by many standard loss functions such as squared error loss and crossentropy loss. Assumption 2 means, if dx = 2 for example, no three data points are on the same line. Since real-world datasets contain noise, this assumption is also quite mild.

heading: 2.1 CHALLENGES AND KEY IDEAS
text: In this section, we explain the difficulties at nondifferentiable points and ideas on overcoming them. Our algorithm is built from first principles, rather than advanced tools from nonsmooth analysis.
Bisection by boundary data points. Since the activation function h is nondifferentiable at 0, the behavior of data points at the “boundary” is decisive. Consider a simple example dh = 1, so W1 is a row vector. IfW1xi+b1 6= 0, then the sign of (W1+∆1)xi+(b1+δ1) for any small perturbations ∆1 and δ1 stays invariant. In contrast, when there is a point xi on the “boundary,” i.e., W1xi + b1 = 0, then the slope depends on the direction of perturbation, leading to nondifferentiability. As mentioned earlier, we refer to such data points as boundary data points. When ∆1xi + δ1 ≥ 0,
h((W1 +∆1)xi+(b1 +δ1)) = h(∆1xi+δ1) = s+(∆1xi+δ1) = h(W1xi+b1)+s+(∆1xi+δ1),
and similarly, the slope is s− for ∆1xi + δ1 ≤ 0. This means that the “gradient” (as well as higher order derivatives) of R depends on direction of (∆1, δ1).
Thus, every boundary data point xi bisects the space of perturbations (∆j , δj)2j=1 into two halfspaces by introducing a hyperplane through the origin. The situation is even worse if we have M boundary data points: they lead to a worst case of 2M regions. Does it mean that we need to test all 2M regions separately? We show that there is a way to get around this issue, but before that, we first describe how to test local minimality or stationarity for each region.
Second-order local optimality conditions. We can expand R((Wj +∆j , bj +δj)2j=1) and obtain the following Taylor-like expansion for small enough perturbations (see Lemma 2 for details)
R(z + η) = R(z) + g(z, η)T η + 12η TH(z, η)η + o(‖η‖2), (1)
where z is a vectorized version of all parameters (Wj , bj)2j=1 and η is the corresponding vector of perturbations (∆j , δj)2j=1. Notice now that in (1), at nondifferentiable points the usual Taylor expansion does not exist, but the corresponding “gradient” g(·) and “Hessian” H(·) now depend on the direction of perturbation η. Also, the space of η is divided into at most 2M regions, and g(z, η) andH(z, η) are piecewise-constant functions of η whose “pieces” correspond to the regions. One could view this problem as 2M constrained optimization problems and try to solve for KKT conditions at z; however, we provide an approach that is developed from first principles and solves all 2M problems efficiently.
Given this expansion (1) and the observation that derivatives stay invariant with respect to scaling of η, one can note that (a) g(z, η)T η ≥ 0 for all η, and (b) ηTH(z, η)η ≥ 0 for all η such that g(z, η)T η = 0 are necessary conditions for local optimality of z, thus z is a “SOSP” (see Definition 2.2). The conditions become sufficient if (b) is replaced with ηTH(z, η)η > 0 for all η 6= 0 such that g(z, η)T η = 0. In fact, this is a generalized version of second-order necessary (or sufficient) conditions, i.e., ∇f = 0 and∇2f 0 (or ∇2f 0), for twice differentiable f .
Efficiently testing SOSP for exponentially many regions. Motivated from the second-order expansion (1) and necessary/sufficient conditions, our algorithm consists of three steps:
(a) Testing first-order stationarity (in the Clarke sense, see Definition 2.1), (b) Testing g(z, η)T η ≥ 0 for all η, (c) Testing ηTH(z, η)η ≥ 0 for {η | g(z, η)T η = 0}.
The tests are executed from Step (a) to (c). Whenever a test fails, we get a strict descent direction η, and the algorithm returns η and terminates. Below, we briefly outline each step and discuss how we can efficiently perform the tests. We first check first-order stationarity because it makes Step (b) easier. Step (a) is done by solving one convex QP per each hidden node. For Step (b), we formulate linear programs (LPs) per each 2M region, so that checking whether all LPs have minimum cost of zero is equivalent to checking g(z, η)T η ≥ 0 for all η. Here, the feasible sets of LPs are pointed polyhedral cones, whereby it suffices to check only the extreme rays of the cones. It turns out that there are only 2M extreme rays, each shared by 2M−1 cones, so testing g(z, η)T η ≥ 0 can be done with only O(M) inequality/equality tests instead of solving exponentially many LPs. In Step (b), we also record the flat extreme rays, which are defined to be the extreme rays with g(z, η)T η = 0, for later use in Step (c).
In Step (c), we test if the second-order perturbation ηTH(·)η can be negative, for directions where g(z, η)T η = 0. Due to the constraint g(z, η)T η = 0, the second-order test requires solving constrained nonconvex QPs. In case where there is no flat extreme ray, we need to solve only one equality constrained QP (ECQP). If there exist flat extreme rays, a few more inequality constrained QPs (ICQPs) are solved. Despite NP-hardness of general QPs (Pardalos & Vavasis, 1991), we prove that the specific form of QPs in our algorithm are still tractable in most cases. More specifically, we prove that projected gradient descent on ECQPs converges/diverges exponentially fast, and each step takesO(p2) time (p is the number of parameters). In case of ICQPs, it takesO(p3 +L32L) time to solve the QP, where L is the number of boundary data points that have flat extreme rays (L ≤M ). Here, we can see that if L is small enough, the ICQP can still be solved in polynomial time in p. At the end of the paper, we provide empirical evidences that the number of flat extreme rays is zero or very few, meaning that in most cases we can solve the QP efficiently.

heading: 2.2 PROBLEM-SPECIFIC NOTATION AND DEFINITION
text: In this section, we define a more precise notion of generalized stationary points and introduce some additional symbols that will be helpful in streamlining the description of our algorithm in Section 3. Since we are dealing with nondifferentiable points of nonconvex R, usual notions of (sub)gradients do not work anymore. Here, Clarke subdifferential is a useful generalization (Clarke et al., 2008): Definition 2.1 (FOSP, Theorem 6.2.5 of Borwein & Lewis (2010)). Suppose that a function f(z) : Ω 7→ R is locally Lipschitz around the point z∗ ∈ Ω, and differentiable in Ω \ W where W has Lebesgue measure zero. Then the Clarke differential of f at z∗ is
∂zf(z ∗) := cvxhull{limk∇f(zk) | zk → z∗, zk /∈ W}.
If 0 ∈ ∂zf(z∗), we say z∗ is a first-order stationary point (FOSP).
From the definition, we can note that Clarke subdifferential ∂zR(z∗) is the convex hull of all the possible values of g(z∗, η) in (1). For parameters (Wj , bj)2j=1, let ∂Wjf(z ∗) and ∂bjf(z ∗) be the Clarke differential w.r.t. to Wj and bj , respectively. They are the projection of ∂zf(z∗) onto the space of individual parameters. Whenever the point z∗ is clear (e.g. our algorithm), we will omit (z∗) from f(z∗). Next, we define second-order stationary points for the empirical risk R. Notice that this generalizes the definition of SOSP for differentiable functions f : ∇f = 0 and∇2f 0. Definition 2.2 (SOSP). We call z∗ is a second-order stationary point (SOSP) of R if (1) z∗ is a FOSP, (2) g(z∗, η)T η ≥ 0 for all η, and (3) ηTH(z∗, η)η ≥ 0 for all η such that g(z∗, η)T η = 0.
Given an input data point x ∈ Rdx , we define O(x) := h(W1x + b1) to be the output of hidden layer. We note that the notation O(·) is overloaded with the big O notation, but their meaning will be clear from the context. Consider perturbing parameters (Wj , bj)2j=1 with (∆j , δj) 2 j=1, then the
perturbed output Ỹ (x) of the network and the amount of perturbation dY (x) can be expressed as
dY (x) := Ỹ (x)− Y (x) = ∆2O(x) + δ2 + (W2 + ∆2)J(x)(∆1x+ δ1), where J(x) can be thought informally as the “Jacobian” matrix of the hidden layer. The matrix J(x) ∈ Rdh×dh is diagonal, and its k-th diagonal entry is given by
[J(x)]k,k := { h′([W1x+ b1]k) if [W1x+ b1]k 6= 0 h′([∆1x+ δ1]k) if [W1x+ b1]k = 0,
where h′ is the derivative of h. We define h′(0) := s+, which is okay because it is always multiplied with zero in our algorithm. For boundary data points, [J(x)]k,k depends on the direction of perturbations [∆1 δ1]k,·, as noted in Section 2.1. We additionally define dY1(x) and dY2(x) to separate the terms in dY (x) that are linear in perturbations versus quadratic in perturbations.
dY1(x) := ∆2O(x) + δ2 +W2J(x)(∆1x+ δ1), dY2(x) := ∆2J(x)(∆1x+ δ1).
For simplicity of notation for the rest of the paper, we define for all i ∈ [m] := {1, . . . ,m}, x̄i := [ xTi 1 ]T ∈ Rdx+1, ∇`i := ∇w`(Y (xi), yi), ∇2`i := ∇2w`(Y (xi), yi). In our algorithm and its analysis, we need to give a special treatment to the boundary data points. To this end, for each node k ∈ [dh] in the hidden layer, define boundary index set Bk as
Bk := {i ∈ [m] | [W1xi + b1]k = 0} . The subspace spanned by vectors x̄i for in i ∈ Bk plays an important role in our tests; so let us define a symbol for it, as well as the cardinality of Bk and their sum:
Vk := span{x̄i | i ∈ Bk}, Mk := |Bk|, M := ∑dh
k=1 Mk.
For k ∈ [dh], let vTk ∈ R1×(dx+1) be the k-th row of [∆1 δ1], and uk ∈ Rdy be the k-th column of ∆2. Next, we define the total number of parameters p, and vectorized perturbations η ∈ Rp:
p := dy + dydh + dh(dx + 1), η T := [ δT2 u T 1 · · · uTdh v T 1 · · · vTdh ] .
Also let z ∈ Rp be vectorized parameters (Wj , bj)2j=1, packed in the same order as η. Define a matrix Ck := ∑ i/∈Bk h
′([W1xi + b1]k)∇`ix̄Ti ∈ Rdy×(dx+1). This quantity appears multiplie times and does not depend on the perturbation, so it is helpful to have a symbol for it.
We conclude this section by presenting one of the implications of Assumption 2 in the following lemma, which we will use later. The proof is simple, and is presented in Appendix B.1. Lemma 1. If Assumption 2 holds, thenMk ≤ dx and the vectors {x̄i}i∈Bk are linearly independent.

heading: 3 TEST ALGORITHM FOR SECOND-ORDER STATIONARITY
text: In this section, we present SOSP-CHECK in Algorithm 1, which takes an arbitrary tuple (Wj , bj)2j=1 of parameters as input and checks whether it is a SOSP. We first present a lemma that shows the explicit form of the perturbed empirical risk R(z+η) and identify first and second-order perturbations. The proof is deferred to Appendix B.2.
Algorithm 1 SOSP-CHECK (Rough pseudocode) Input: A tuple (Wj , bj)2j=1 of R(·).
1: Test if ∂W2R = {0dy×dh} and ∂b2R = {0dy}. 2: for k ∈ [dh] do 3: if Mk > 0 then 4: Test if 0Tdx+1 ∈ ∂[W1 b1]k,·R. 5: Test if gk(z, vk)T vk ≥ 0 for all vk via testing extreme rays ṽk of polyhedral cones. 6: Store extreme rays ṽk s.t. gk(z, ṽk)T ṽk = 0 for second-order test. 7: else 8: Test if ∂[W1 b1]k,·R = {0 T dx+1}.
9: end if 10: end for 11: For all η’s s.t. g(z, η)T η = 0, test if ηTH(z, η)η ≥ 0. 12: if ∃η 6= 0 s.t. g(z, η)T η = 0 and ηTH(z, η)η = 0 then 13: return SOSP. 14: else 15: return Local Minimum. 16: end if
Lemma 2. For small enough perturbation η,
R(z + η) = R(z) + g(z, η)T η + 12η TH(z, η)η + o(‖η‖2),
where g(z, η) and H(z, η) satisfy
g(z, η)T η = ∑
i ∇`Ti dY1(xi) = 〈∑ i ∇`iO(xi)T ,∆2 〉 + 〈∑ i ∇`i, δ2 〉 + dh∑ k=1 gk(z, vk) T vk,
ηTH(z, η)η = ∑
i ∇`Ti dY2(xi) + 12 ∑ i ‖dY1(xi)‖2∇2`i ,
and gk(z, vk)T := [W2]T·,k ( Ck + ∑ i∈Bk h ′(x̄Ti vk)∇`ix̄Ti ) . Also, g(z, η) and H(z, η) are piecewise constant functions of η, which are constant inside each polyhedral cone in space of η.
Rough pseudocode of SOSP-CHECK is presented in Algorithm 1. As described in Section 2.1, the algorithm consists of three steps: (a) testing first-order stationarity (b) testing g(z, η)T η ≥ 0 for all η, and (c) testing ηTH(z, η)η ≥ 0 for {η | g(z, η)T η = 0}. If the input point satisfies the secondorder sufficient conditions for local minimality, the algorithm decides it is a local minimum. If the point only satisfies second-order necessary conditions, it returns SOSP. If a strict descent direction η is found, the algorithm terminates immediately and returns η. A brief description will follow, but the full algorithm (Algorithm 2) and a full proof of correctness are deferred to Appendix A.

heading: 3.1 TESTING FIRST-ORDER STATIONARITY (LINES 1, 4, AND 8)
text: Line 1 of Algorithm 1 corresponds to testing if ∂W2R and ∂b2R are singletons with zero. If not, the opposite direction is a descent direction. More details are in Appendix A.1.1.
Test for W1 and b1 is more difficult because g(z, η) depends on ∆1 and δ1 when there are boundary data points. For each k ∈ [dh], Line 4 (if Mk > 0), and Line 8 (if Mk = 0) test if 0Tdx+1 is in ∂[W1 b1]k,·R. Note from Definition 2.1 and Lemma 2 that ∂[W1 b1]k,·R is the convex hull of all possible values of gk(z, vk)T . If Mk > 0, 0 ∈ ∂[W1 b1]k,·R can be tested by solving a convex QP:
minimize{si}i∈Bk ‖[W2] T ·,k(Ck + ∑ i∈Bk si∇`ix̄ T i )‖22
subject to min{s−, s+} ≤ si ≤ max{s−, s+}, ∀i ∈ Bk. (2)
If the solution {s∗i }i∈Bk does not achieve zero objective value, then we can directly return a descent direction. For details please refer to FO-SUBDIFF-ZERO-TEST (Algorithm 3) and Appendix A.1.2.
3.2 TESTING g(z, η)T η ≥ 0 FOR ALL η (LINES 5–6)
Linear program formulation. Lines 5–6 are about testing if gk(z, vk)T vk ≥ 0 for all directions of vk. If 0Tdx+1 ∈ ∂[W1 b1]k,·R, with the solution {s ∗ i } from QP (2) we can write gk(z, vk)T as
gk(z, vk) T =[W2] T ·,k ( Ck + ∑ i∈Bk h′(x̄Ti vk)∇`ix̄Ti ) =[W2] T ·,k (∑ i∈Bk ( h′(x̄Ti vk)− s∗i ) ∇`ix̄Ti ) .
Every i ∈ Bk bisects Rdx+1 into two halfspaces, x̄Ti vk ≥ 0 and x̄Ti vk ≤ 0, in each of which h′(x̄Ti vk) stays constant. Note that by Lemma 1, x̄i’s for i ∈ Bk are linearly independent. So, given Mk boundary data points, they divide the space Rdx+1 of vk into 2Mk polyhedral cones.
Since gk(z, vk)T is constant in each polyhedral cones, we can let σi ∈ {−1,+1} for all i ∈ Bk, and define an LP for each {σi}i∈Bk ∈ {−1,+1}Mk :
minimize vk
[W2] T ·,k (∑ i∈Bk(sσi − s ∗ i )∇`ix̄Ti ) vk
subject to vk ∈ Vk, σix̄Ti vk ≥ 0, ∀i ∈ Bk. (3)
Solving these LPs and checking if the minimum value is 0 suffices to prove gk(z, vk)T vk ≥ 0 for all small enough perturbations. The constraint vk ∈ Vk is there because any vk /∈ Vk is also orthogonal to gk(z, vk). It is equivalent to dx + 1 − Mk linearly independent equality constraints. So, the feasible set of LP (3) has dx + 1 linearly independent constraints, which implies that the feasible set is a pointed polyhedral cone with vertex at origin. Since any point in a pointed polyhedral cone is a conical combination (linear combination with nonnegative coefficients) of extreme rays of the cone, checking nonnegativity of the objective function for all extreme rays suffices. We emphasize that we do not solve the LPs (3) in our algorithm; we just check the extreme rays.
Computational efficiency. Extreme rays of a pointed polyhedral cone in Rdx+1 are computed from dx linearly independent active constraints. For each i ∈ Bk, the extreme ray v̂i,k ∈ Vk ∩ span{x̄j | j ∈ Bk \ {i}}⊥ must be tested whether gk(z, v̂i,k)T v̂i,k ≥ 0, in both directions. Note that there are 2Mk extreme rays, and one extreme ray v̂i,k is shared by 2Mk−1 polyhedral cones. Moreover, x̄Tj v̂i,k = 0 for j ∈ Bk \ {i}, which indicates that
gk(z, v̂i,k) T v̂i,k = (sσi,k − s∗i )[W2]T·,k∇`ix̄Ti v̂i,k, where σi,k = sign(x̄Ti v̂i,k),
regardless of {σj}j∈Bk\{i}. Testing an extreme ray can be done with a single inequality test instead of 2Mk−1 separate tests for all cones! Thus, this extreme ray approach instead of solving individual LPs greatly reduces computation, from O(2Mk) to O(Mk).
Testing extreme rays. For the details of testing all possible extreme rays, please refer to FO-INCREASING-TEST (Algorithm 4) and Appendix A.2. FO-INCREASING-TEST computes all possible extreme rays ṽk and tests if they satisfy gk(z, ṽk)T ṽk ≥ 0. If the inequality is not satisfied by an extreme ray ṽk, then this is a descent direction, so we return ṽk. If the inequality holds with equality, it means this is a flat extreme ray, and it needs to be checked in second-order test, so we save this extreme ray for future use.
How many flat extreme rays (gk(z, ṽk)T ṽk = 0) are there? Presence of flat extreme rays introduce inequality constraints in the QP that we solve in the second-order test. It is ideal not to have them, because in this case there are only equality constraints, so the QP is easier to solve. Lemma A.1 in Appendix A.2 shows the conditions for having flat extreme rays; in short, there is a flat extreme ray if [W2]T·,k∇`i = 0 or s∗i = s+ or s−. For more details, please refer to Appendix A.2.
3.3 TESTING ηTH(z, η)η ≥ 0 FOR {η | g(z, η)T η = 0} (LINES 11–16) The second-order test checks ηTH(z, η)η ≥ 0 for “flat” η’s satisfying g(z, η)T η = 0. This is done with help of the function SO-TEST (Algorithm 5). Given its input {σi,k}k∈[dh],i∈Bk , it defines fixed “Jacobian” matrices Ji for all data points and equality/inequality constraints for boundary data points, and solves the QP of the following form:
minimizeη ∑ i∇`Ti ∆2Ji(∆1xi + δ1)+ 1 2 ∑ i ‖∆2O(xi) + δ2 +W2Ji(∆1xi+δ1)‖2∇2`i , subject to [W2] T ·,kuk=[W1 b1]k,·vk, ∀k ∈ [dh],
x̄Ti vk = 0, ∀k ∈ [dh],∀i ∈ Bk s.t. σi,k = 0, σi,kx̄ T i vk ≥ 0, ∀k ∈ [dh],∀i ∈ Bk s.t. σi,k ∈ {−1,+1}.
(4)
Constraints and number of QPs. There are dh equality constraints of the form [W2]T·,kuk = [[W1]k,· [b1]k] vk. These equality constraints are due to the nonnegative homogeneous property of activation h; i.e., scaling [W1]k,· and [b1]k by α > 0 and scaling [W2]·,k by 1/α yields exactly
the same network. So, these equality constraints force η to be orthogonal to the loss-invariant directions. This observation is stated more formally in Lemma A.2, which as a corollary shows that any differentiable FOSP of R always has rank-deficient Hessian. The other constraints make sure that the union of feasible sets of QPs is exactly {η | g(z, η)T η = 0} (please see Lemma A.3 in Appendix A.3 for details). It is also easy to check that these constraints are all linearly independent.
If there is no flat extreme ray, the algorithm solves just one QP with dh +M equality constraints. If there are flat extreme rays, the algorithm solves one QP with dh + M equality constraints, and 2K more QPs with dh +M − L equality constraints and L inequality constraints, where
K := dh∑ k=1 ∣∣{i ∈Bk | [W2]T·,k∇`i = 0}∣∣ , L := dh∑ k=1 |{i ∈Bk | v̂i,k or −v̂i,k is a flat ext. ray}| . (5)
Recall from Section 3.2 that i ∈ Bk has a flat extreme ray if [W2]T·,k∇`i = 0 or s∗i = s+ or s−; thus, K ≤ L ≤M . Please refer to Appendix A.3 for more details.
Efficiency of solving the QPs (4). Despite NP-hardness of general QPs, our specific form of QPs (4) can be solved quite efficiently, avoiding exponential complexity in p. After solving QP (4), there are three (disjoint) termination conditions:
(T1) ηTQη > 0 whenever η ∈ S, η 6= 0, or (T2) ηTQη ≥ 0 whenever η ∈ S, but ∃η 6= 0, η ∈ S such that ηTQη = 0, or (T3) ∃η such that η ∈ S and ηTQη < 0,
where S is the feasible set of QP. With the following two lemmas, we show that the termination conditions can be efficiently tested for ECQPs and ICQPs. First, the ECQPs can be iteratively solved with projected gradient descent, as stated in the next lemma.
Lemma 3. Consider the QP, where Q ∈ Rp×p is symmetric and A ∈ Rq×p has full row rank:
minimizeη 1 2η TQη subject to Aη = 0q
Then, projected gradient descent (PGD) updates
η(t+1) = (I −AT (AAT )−1A)(I − αQ)η(t)
with learning rate α < 1/λmax(Q) converges to a solution or diverges to infinity exponentially fast. Moreover, with random initialization, PGD correctly checks conditions (T1)–(T3) with probability 1.
The proof is an extension of unconstrained case (Lee et al., 2016), and is deferred to Appendix B.3. Note that it takes O(p2q) time to compute (I−AT (AAT )−1A)(I−αQ) in the beginning, and each update takes O(p2) time. It is also surprising that the convergence rate does not depend on q.
In the presence of flat extreme rays, we have to solve QPs involving L inequality constraints. We prove that our ICQP can be solved in O(p3 +L32L) time, which implies that as long as the number of flat extreme rays is small, the problem can still be solved in polynomial time in p.
Lemma 4. Consider the QP, where Q ∈ Rp×p is symmetric, A ∈ Rq×p and B ∈ Rr×p have full row rank, and [ AT BT ] has rank q + r:
minimizeη η TQη subject to Aη = 0q, Bη ≥ 0r.
Then, there exists a method that checks whether (T1)–(T3) in O(p3 + r32r) time.
In short, we transform η to define an equivalent problem, and use classical results in copositive matrices (Martin & Jacobson, 1981; Seeger, 1999; Hiriart-Urruty & Seeger, 2010); the problem can be solved by computing the eigensystem of a (p−q−r)×(p−q−r) matrix, and testing copositivity of an r × r matrix. The proof is presented in Appendix B.4.
Concluding the test. During all calls to SO-TEST, whenever any QP terminated with (T3), then SOSP-CHECK immediately returns the direction and terminates. After solving all QPs, if any of SO-TEST calls finished with (T2), then we conclude SOSP-CHECK with “SOSP.” If all QPs terminated with (T1), then we can return “Local Minimum.”

heading: 4 EXPERIMENTS
text: For experiments, we used artificial datasets sampled iid from standard normal distribution, and trained 1-hidden-layer ReLU networks with squared error loss. In practice, it is impossible to get to the exact nondifferentiable point, because they lie in a set of measure zero. To get close to those points, we ran Adam (Kingma & Ba, 2014) using full-batch (exact) gradient for 200,000 iterations and decaying step size (start with 10−3, 0.2× decay every 20,000 iterations). We observed that decaying step size had the effect of “descending deeper into the valley.”
After running Adam, for each k ∈ [dh], we counted the number of approximate boundary data points satisfying |[W1xi + b1]k| < 10−5, which gives an estimate of Mk. Moreover, for these points, we solved the QP (2) using L-BFGS-B (Byrd et al., 1995), to check if the terminated points are indeed (approximate) FOSPs. We could see that the optimal values of (2) are close to zero (≤ 10−6 typically, ≤ 10−3 for largest problems). After solving (2), we counted the number of s∗i ’s that ended up with 0 or 1. The number of such s∗i ’s is an estimate of L −K. We also counted the number of approximate boundary data points satisfying |[W2]T·,k∇`i| < 10−4, for an estimate of K.
We ran the above-mentioned experiments for different settings of (dx, dh,m), 40 times each. We fixed dy = 1 for simplicity. For large dh, the optimizer converged to near-zero minima, making ∇`i uniformly small, so it was difficult to obtain accurate estimates of K and L. Thus, we had to perform experiments in settings where the optimizer converged to minima that are far from zero.
Table 1 summarizes the results. Through 280 runs, we observed that there are surprisingly many boundary data points (M ) in general, but usually there are zero or very few (maximum was 3) flat extreme rays (L). This observation suggests two important messages: (1) many local minima are on nondifferentiable points, which is the reason why our analysis is meaningful; (2) luckily, L is usually very small, so we only need to solve ECQPs (L = 0) or ICQPs with very small number of inequality constraints, which are solved efficiently (Lemmas 3 and 4). We can observe that M , L, and K indeed increase as model dimensions and training set get larger, but the rate of increase is not as fast as dx, dh, and m.

heading: 5 DISCUSSION AND FUTURE WORK
text: We provided a theoretical algorithm that tests second-order stationarity and escapes saddle points, for any points (including nondifferentiable ones) of empirical risk of shallow ReLU-like networks. Despite difficulty raised by boundary data points dividing the parameter space into 2M regions, we reduced the computation to dh convex QPs,O(M) equality/inequality tests, and one (or a few more) nonconvex QP. In benign cases, the last QP is equality constrained, which can be efficiently solved with projected gradient descent. In worse cases, the QP has a few (say L) inequality constraints, but it can be solved efficiently when L is small. We also provided empirical evidences that L is usually either zero or very small, suggesting that the test can be done efficiently in most cases. A limitation of this work is that in practice, exact nondifferentiable points are impossible to reach, so the algorithm must be extended to apply the nonsmooth analysis for points that are “close” to nondifferentiable ones. Also, current algorithm only tests for exact SOSP, while it is desirable to check approximate second-order stationarity. These extensions must be done in order to implement a robust numerial version of the algorithm, but they require significant amount of additional work; thus, we leave practical/robust implementation as future work. Also, extending the test to deeper neural networks is an interesting future direction.

heading: ACKNOWLEDGMENTS
text: This work was supported by the DARPA Lagrange Program. Suvrit Sra also acknowledges support from an Amazon Research Award.

heading: A FULL ALGORITHMS AND PROOF OF CORRECTNESS
text: In this section, we present the detailed operation of SOSP-CHECK (Algorithm 2), and its helper functions FO-SUBDIFF-ZERO-TEST, FO-INCREASING-TEST, and SO-TEST (Algorithm 3–5).
In the subsequent subsections, we provide a more detailed proof of the correctness of Algorithm 2. Recall that, by Lemmas 1 and 2, Mk := |Bk| ≤ dx and vectors {x̄i}i∈Bk are linearly independent. Also, we can expand R(z + η) so that
R(z + η) = R(z) + g(z, η)T η + 12η TH(z, η)η + o(‖η‖2),
Algorithm 4 FO-INCREASING-TEST Input: k ∈ [dh], {s∗i }i∈Bk
1: for all i ∈ Bk do 2: Define Si,k ← ∅. 3: Get a vector v̂i,k ∈ Vk ∩ span{x̄j | j ∈ Bk \ {i}}⊥. 4: for ṽk ∈ {v̂i,k,−v̂i,k} do 5: Define σi,k ← sign(x̄Ti ṽk). 6: if (sσi,k − s∗i )[W2]T·,k∇`ix̄Ti ṽk < 0 then 7: return (True, ṽk, {∅}i∈Bk) 8: else if (sσi,k − s∗i )[W2]T·,k∇`ix̄Ti ṽk = 0 then 9: Si,k ← Si,k ∪ {σi,k}.
10: end if 11: end for 12: If Si,k = ∅, Si,k ← {0}. 13: end for 14: return (False,0dx+1, {Si,k}i∈Bk).
Algorithm 5 SO-TEST Input: {σi,k}k∈[dh],i∈Bk
1: For all i ∈ [m], define diagonal matrices Ji ∈ Rdh×dh such that for k ∈ [dh],
[Ji]k,k ←  h′([N(xi)]k) if i ∈ [m] \Bk sσi,k if i ∈ Bk and σi,k ∈ {−1,+1} 0 if i ∈ Bk and σi,k = 0.
2: Solve the following QP. If there is no solution, get a descent direction (∆∗j , δ ∗ j ) 2 j=1.
minimize η ∑ i ∇`Ti ∆2Ji(∆1xi+δ1)+ 12 ∑ i ‖∆2O(xi)+δ2+W2Ji(∆1xi+δ1)‖2∇2`i , subject to [W2] T ·,kuk=[W1 b1]k,·vk, ∀k ∈ [dh],
x̄Ti vk = 0, ∀k ∈ [dh],∀i ∈ Bk s.t. σi,k = 0, σi,kx̄ T i vk ≥ 0, ∀k ∈ [dh],∀i ∈ Bk s.t. σi,k ∈ {−1,+1}.
(4)
3: if There is no solution then return (True,False, (∆∗j , δ∗j )2j=1). 4: else if QP has nonzero minimizers then return (False,True,0) 5: else return (False,False,0) 6: end if
where g(z, η) and H(z, η) satisfy
g(z, η)T η = ∑
i ∇`Ti dY1(xi) = 〈∑ i ∇`iO(xi)T ,∆2 〉 + 〈∑ i ∇`i, δ2 〉 + dh∑ k=1 gk(z, vk) T vk,
ηTH(z, η)η = ∑
i ∇`Ti dY2(xi) + 12 ∑ i ‖dY1(xi)‖2∇2`i ,
and gk(z, vk)T := [W2]T·,k ( Ck + ∑ i∈Bk h ′(x̄Ti vk)∇`ix̄Ti ) .

heading: A.1 TESTING FIRST-ORDER STATIONARITY (LINES 1–3, 6–10 AND 15–17)
text: A.1.1 TEST OF FIRST-ORDER STATIONARITY FOR W2 AND b2 (LINES 1–3)
Lines 1–3 of Algorithm 2 correspond to testing if ∂W2R = {0dy×dh} and ∂b2R = {0dy}. If they are not all zero, the opposite direction is a descent direction, as Line 2 returns. To see why, suppose∑m i=1∇`i [ O(xi) T 1 ] 6= 0dy×(dh+1). Then choose perturbations
[∆2 δ2] = − ∑m
i=1 ∇`i
[ O(xi) T 1 ] , ∆1 = 0dh×dx , δ1 = 0dh .
If we apply perturbation (γ∆j , γδj)2j=1 where γ > 0, we can immediately check that dY1(xi) = ∆2O(xi) + δ2 and dY2(xi) = 0. So,
g(z, η)T η = ∑m
i=1 ∇`Ti (∆2O(xi) + δ2) = 〈∑m i=1 ∇`i [ O(xi) T 1 ] , [∆2 δ2] 〉 = −O(γ),
ηTH(z, η)η = 12 ∑ i dY1(xi) T∇2`idY1(xi) = O(γ2) ≥ 0.
and also that ∑m i=1 ‖dY (xi)‖ 2 2 = O(γ
2). Then, by scaling γ sufficiently small we can achieve R(z + η) < R(z), which disproves that (Wj , bj)2j=1 is a local minimum.
A.1.2 TEST OF FIRST-ORDER STATIONARITY FOR W1 AND b1 (LINES 6–10 AND 15–17)
Test for W1 and b1 is more difficult because g(z, η) depends on ∆1 and δ1 when there are boundary data points. Recall that vTk (k ∈ [dh]) is the k-th row of [∆1 δ1]. Then note from Lemma 2 that∑m
i=1 ∇`Ti (W2J(xi)(∆1xi + δ1)) = ∑dh k=1 gk(z, vk) T vk,
where gk(z, vk)T := [W2]T·,k ( Ck + ∑ i∈Bk h ′(x̄Ti vk)∇`ix̄Ti ) . Thus we can separate k’s and treat them individually.
Test for zero gradient. Recall the definition Mk := |Bk|. If Mk = 0, there is no boundary data point for k-th hidden node, so the Clarke subdifferential with respect to [W1 b1]k,·, is {CTk [W2]·,k}. Lines 15–17 handle this case; if the singleton element in the subdifferential is not zero, its opposite direction is a descent direction, so return that direction, as in Line 16.
Test for zero in subdifferential. For the case Mk > 0, we saw that for boundary data points i ∈ Bk, h′([∆1xi + δ1]k) = h′(x̄Ti vk) ∈ {s−, s+} depends on vk. Lines 6–10 test if 0Tdx+1 is in the Clarke subdifferential of R with respect to [W1]k,· and [b1]k. Since the subdifferential is used many times, we give it a specific name Dk := ∂[W1 b1]k,·R. By observing that Dk is the convex hull of all possible values of gk(z, vk)T ,
Dk := { [W2] T ·,k ( Ck + ∑ i∈Bk si∇`ix̄Ti ) | min{s−, s+} ≤ si ≤ max{s−, s+}, ∀i ∈ Bk } .
Testing 0Tdx+1 ∈ Dk is done by FO-SUBDIFF-ZERO-TEST in Algorithm 3. It solves a convex QP (2), and returns {s∗i }i∈Bk .
If 0Tdx+1 ∈ Dk, {s ∗ i }i∈Bk will satisfy ṽTk := [W2]T·,k(Ck + ∑ i∈Bk s ∗ i∇`ix̄Ti ) = 0Tdx+1. Suppose 0Tdx+1 /∈ Dk. Then, ṽk is the closest vector in Dk from the origin, so 〈ṽk, v〉 > 0 for all v T ∈ Dk. Choose perturbations
vk = −ṽk, vk′ = 0dx+1 for all k′ ∈ [dh] \ {k}, ∆2 = 0dy×dh , δ2 = 0dy ,
and apply perturbation (γ∆j , γδj)2j=1 where γ > 0. With this perturbation, we can check that
g(z, η)T η = ∑m
i=1 ∇`Ti dY1(xi) = −γ[W2]T·,k
( Ck + ∑ i∈Bk h′(−x̄Ti ṽk)∇`ix̄Ti ) ṽk,
and since h′(−x̄Ti ṽk) ∈ {s−, s+} for i ∈ Bk, we have
[W2] T ·,k ( Ck + ∑ i∈Bk h′(−x̄Ti ṽk)∇`ix̄Ti ) ∈ Dk,
and 〈ṽk, v〉 > 0 for all vT ∈ Dk shows that g(z, η)T η is strictly negative with magnitude O(γ). It is easy to see that ηTH(z, η)η = O(γ2), so by scaling γ sufficiently small we can disprove local minimality of (Wj , bj)2j=1.
A.2 TESTING g(z, η)T η ≥ 0 FOR ALL η (LINES 11–14)
Linear program formulation. Lines 11–14 are essentially about testing if gk(z, vk)T vk ≥ 0 for all directions vk. If 0Tdx+1 ∈ Dk, with the solution {s ∗ i }i∈Bk from FO-SUBDIFF-ZERO-TEST we can write gk(z, vk)T as
gk(z, vk) T = [W2] T ·,k ( Ck + ∑ i∈Bk h′(x̄Ti vk)∇`ix̄Ti ) = [W2] T ·,k (∑ i∈Bk ( h′(x̄Ti vk)− s∗i ) ∇`ix̄Ti ) .
For any i ∈ Bk, h′(x̄Ti vk) ∈ {s−, s+} changes whenever the sign of x̄Ti vk changes. Every i ∈ Bk bisects Rdx+1 into two halfspaces, x̄Ti vk ≥ 0 and x̄Ti vk ≤ 0, in each of which h′(x̄Ti vk) stays constant. Note that by Lemma 1, x̄i’s for i ∈ Bk are linearly independent. So, given Mk linearly independent x̄i’s, they divide the space Rdx+1 of vk into 2Mk polyhedral cones.
Since gk(z, vk)T is constant in each polyhedral cone, we can let σi ∈ {−1,+1} for all i ∈ Bk, and define an LP for each {σi}i∈Bk ∈ {−1,+1}Mk :
minimize vk
[W2] T ·,k (∑ i∈Bk(sσi − s ∗ i )∇`ix̄Ti ) vk
subject to vk ∈ Vk, σix̄Ti vk ≥ 0, ∀i ∈ Bk. (3)
Solving these LPs and checking if the minimum value is 0 suffices to prove gk(z, vk)T vk ≥ 0 for all small enough perturbations. Recall that Vk := span{x̄i | i ∈ Bk} and dim(Vk) = Mk. Note that any component of vk that is orthogonal to Vk is also orthogonal to gk(z, vk), so it does not affect the objective function of any LP (3). Thus, the constraint vk ∈ Vk is added to the LP (3), which is equivalent to adding dx+1−Mk linearly independent equality constraints. The feasible set of LP (3) has dx + 1 linearly independent equality/inequality constraints, which implies that the feasible set is a pointed polyhedral cone with vertex at origin. Since any point in a pointed polyhedral cone is a conical combination (linear combination with nonnegative coefficients) of extreme rays of the cone, checking nonnegativity of the objective function for all extreme rays suffices. We emphasize that we do not solve the LPs (3) in our algorithm; we just check the extreme rays.
Computational efficiency. Extreme rays of a pointed polyhedral cone in Rdx+1 are computed from dx linearly independent active constraints. Line 3 of Algorithm 4 is exactly computing such extreme rays: v̂i,k ∈ Vk ∩ span{x̄j | j ∈ Bk \ {i}}⊥ for each i ∈ Bk, tested in both directions.
Note that there are 2Mk extreme rays, and one extreme ray v̂i,k is shared by 2Mk−1 polyhedral cones. Moreover, x̄Tj v̂i,k = 0 for j ∈ Bk \ {i}, which indicates that
gk(z, v̂i,k) T v̂i,k = (sσi,k − s∗i )[W2]T·,k∇`ix̄Ti v̂i,k, where σi,k = sign(x̄Ti v̂i,k),
regardless of {σj}j∈Bk\{i}. This observation is used in Lines 6 and 8 of Algorithm 4. Testing gk(z, ṽk)
T ṽk ≥ 0 for an extreme ray ṽk can be done with a single inequality test instead of 2Mk−1 separate tests for all cones! Thus, this extreme ray approach instead of solving individual LPs greatly reduces computation, from O(2Mk) to O(Mk).
Algorithm operation in detail. Testing all possible extreme rays is exactly what FO-INCREASING-TEST in Algorithm 4 is doing. Output of FO-INCREASING-TEST is a tuple of three items: a boolean, a (dx + 1)-dimensional vector, and a tuple of Mk sets. Whenever we have a descent direction, it returns True and the descent direction ṽk. If there is no descent direction, it returns False and the sets {Si,k}i∈Bk .
For both direction of extreme rays ṽk = v̂i,k and ṽk = −v̂i,k (Line 4), we check if gk(z, ṽk)T ṽk ≥ 0. Whenever it does not hold (Lines 6–7), ṽk is a descent direction, so FO-INCREASING-TEST returns it with True. Line 13 of Algorithm 2 uses that ṽk to return perturbations, so that scaling by small enough γ > 0 will give us a point with R(z+γη) < R(z). If equality holds (Lines 8–9), this means ṽk is a direction of perturbation satisfying g(z, η)T η = 0, so this direction needs to be checked if ηTH(z, η)η ≥ 0 too. In this case, we add the sign of boundary data point x̄i to Si,k for future use in the second-order test. The operation with Si,k will be explained in detail in Appendix A.3. After checking if gk(z, ṽk)T ṽk ≥ 0 holds for all extreme rays, FO-INCREASING-TEST returns False with {Si,k}i∈Bk .
Counting flat extreme rays. How many of these extreme rays satisfy gk(z, ṽk)T ṽk = 0? Presence of such flat extreme rays introduce inequality constraints in the QP that we will solve in SO-TEST (Algorithm 5). It is ideal not to have flat extreme rays, because in this case there are only equality constraints, so the QP is easier to solve. The following lemma shows conditions for existence of flat extreme rays as well as output of Algorithm 4.
Lemma A.1. Suppose 0Tdx+1 ∈ Dk and all extreme rays ṽk satisfy gk(z, ṽk) T ṽk ≥ 0. Consider all i ∈ Bk, and its corresponding v̂i,k ∈ Vk ∩ span{x̄j | j ∈ Bk \ {i}}⊥.
1. If [W2]T·,k∇`i = 0, then both extreme rays v̂i,k and −v̂i,k are flat extreme rays, and Si,k = {−1,+1} at the end of Algorithm 4.
2. If [W2]T·,k∇`i 6= 0 and s∗i = s+ (or s−), one (and only) of ṽk ∈ {v̂i,k,−v̂i,k} that satisfies sign(x̄Ti ṽk) = +1 (or −1) is a flat extreme ray, and Si,k = {+1} (or {−1}) at the end of Algorithm 4.
3. If [W2]T·,k∇`i 6= 0 and s∗i 6= s±, both v̂i,k and −v̂i,k are not flat extreme rays, and Si,k = {0} at the end of Algorithm 4.
Proof First note that we already assumed that all extreme rays ṽk satisfy gk(z, ṽk)T ṽk ≥ 0, so SOSP-CHECK will reach Line 14 at the end. Also note that x̄i’s in i ∈ Bk are linearly independent (by Lemma 1), so x̄Ti v̂i,k 6= 0.
If [W2]T·,k∇`i = 0, then (sσi,k−s∗i )[W2]T·,k∇`ix̄Ti ṽk = 0 regardless of ṽk, so both v̂i,k and−v̂i,k are flat extreme rays. If [W2]T·,k∇`i 6= 0 and s∗i = s+, ṽk ∈ {v̂i,k,−v̂i,k} that satisfies sign(x̄Ti ṽk) = +1 gives σi,k = +1, so sσi,k = s ∗ i . Thus, ṽk is a flat extreme ray. The case with s ∗ i = s− is proved similarly. If [W2]T·,k∇`i 6= 0 and s∗i 6= s+, none of (s± − s∗i ), [W2]T·,k∇`i, and x̄Ti v̂i,k are zero, so v̂i,k and −v̂i,k cannot be flat.
Let B(j)k ⊆ Bk denote the set of indices i ∈ Bk satisfying conditions in Lemma A.1.j (j = 1, 2, 3). Note thatB(j)k ’s partition the setBk. We denote the union ofB (1) k andB (2) k byB (1,2) k , and similarly, B (2,3) k := B (2) k ∪ B (3) k . We can see from the lemma that |Si,k| = 2 for i ∈ B (1) k , and |Si,k| = 1 for i ∈ B(2,3)k . Also, it follows from the definition of K and L (5) that
K = dh∑ k=1 |B(1)k |, L = dh∑ k=1 |B(1)k |+ |B (2) k |.
Connection to KKT conditions. As a side remark, we provide connections of our tests to the wellknown KKT conditions. Note that the equality gk(z, vk)T = [W2]T·,k (∑ i∈Bk(sσi − s ∗ i )∇`ix̄Ti ) for σix̄ T i vk ≥ 0, ∀i ∈ Bk corresponds to the KKT stationarity condition, where (sσi − s∗i )[W2]T·,k∇`i’s correspond to the Lagrange multipliers for inequality constraints. Then, testing extreme rays is equivalent to testing dual feasibility of Lagrange multipliers, and having zero dual variables ([W2]T·,k∇`i = 0 or s∗i = s+ or s−, resulting in flat extreme rays) corresponds to having degeneracy in the complementary slackness condition.
As mentioned in Section 2.1, given that g(z, η) and H(z, η) are constant functions of η in each polyhedral cone, one can define inequality constrained optimization problems and try to solve for KKT conditions for z directly. However, this also requires solving 2M problems. The strength of our approach is that by solving the QPs (2), we can automatically compute the exact Lagrange multipliers for all 2M subproblems, and dual feasibility is also tested in O(M) time.
A.3 TESTING ηTH(z, η)η ≥ 0 FOR {η | g(z, η)T η = 0} (LINES 19–32)
The second-order test checks ηTH(z, η)η ≥ 0 for “flat” η’s satisfying g(z, η)T η = 0. This is done with help of the function SO-TEST in Algorithm 5. Given its input {σi,k}k∈[dh],i∈Bk , it defines fixed “Jacobian” matrices Ji for all data points and equality/inequality constraints for boundary data points, and solves the QP (4).
Equality/inequality constraints. In the QP (4), there are dh equality constraints of the form [W2] T ·,kuk = [[W1]k,· [b1]k] vk. These equality constraints are due to the nonnegative homogeneous property of activation function h: scaling [W1]k,· and [b1]k by α > 0 and scaling [W2]·,k by 1/α yields exactly the same network. This observation is stated more precisely in the following lemma. Lemma A.2. Suppose z is a FOSP (differentiable or not) of R(·). Fix any k ∈ [dh], and define perturbation η as
uk = −[W2]·,k, vk = [[W1]k,· [b1]k] T , uk′ = 0, vk′ = 0 for all k′ 6= k, δ2 = 0.
Then, g(z, η)T η = ηTH(z, η)η = 0.
The proof of Lemma A.2 can be found in Appendix B.5. A corollary of this lemma is that any differentiable FOSP of R always has rank-deficient Hessian, and the multiplicity of zero eigenvalue is at least dh. Hence, these dh equality constraints on uk’s and vk’s force η to be orthogonal to the loss-invariant directions.
The equality constraints of the form x̄Ti vk = 0 are introduced when σi,k = 0; this happens for boundary data points i ∈ B(3)k . Therefore, there are M − L additional equality constraints. The inequality constraints come from i ∈ B(1,2)k . So there are L inequality constraints. Now, the following lemma proves that feasible sets defined by these equality/inequality constraints added to (4) exactly correspond to the regions where gk(z, vk)T vk = 0. Recall from Lemma A.1 that Si,k = {−1,+1} for i ∈ B(1)k , Si,k = {−1} or {+1} for i ∈ B (2) k , and Si,k = {0} for i ∈ B (3) k .
Lemma A.3. Let {σi,k}i∈B(2)k be the only element of ∏ i∈B(2)k
Si,k. Then, in SO-TEST,⋃ {σi,k}
i∈B(1) k
∈ ∏
i Si,k
{ vk | ∀i ∈ B(3)k , x̄ T i vk = 0, and ∀i ∈ B (1,2) k , σi,kx̄ T i vk ≥ 0 }
= { vk | ∀i ∈ B(3)k , x̄ T i vk = 0, and ∀i ∈ B (2) k , σi,kx̄ T i vk ≥ 0 } = { vk | gk(z, vk)T vk = 0 } .
The proof of Lemma A.3 is in Appendix B.6.
In total, there are dh + M − L equality constraints and L inequality constraints in each nonconvex QP. It is also easy to check that these constraints are all linearly independent.
How many QPs do we solve? Note that in Line 19, we call SO-TEST with {σi,k}k∈[dh],i∈Bk = 0, which results in a QP (4) with dh + M equality constraints. This is done even when we have flat extreme rays, just to take a quick look if a descent direction can be obtained without having to deal with inequality constraints. If there exist flat extreme rays (Line 22), the algorithm calls SO-TEST for each element of∏ k∈[dh] ∏ i∈Bk Si,k. Recall that |Si,k| = 2 for i ∈ B
(1) k , so∣∣∣∣∏k∈[dh]∏i∈Bk Si,k ∣∣∣∣ = 2K . In summary, if there is no flat extreme ray, the algorithm solves just one QP with dh + M equality constraints. If there are flat extreme rays, the algorithm solves one QP with dh + M equality constraints, and 2K QPs with dh +M −L equality constraints and L inequality constraints. This is also an improvement from the naive approach of solving 2M QPs.
Concluding the test. After solving the QP, SO-TEST returns result to SOSP-CHECK. The algorithm returns two booleans and one perturbation tuple. The first is to indicate that there is no solution, i.e., there is a descent direction that leads to −∞. Whenever there was any descent direction then we immediately return the direction and terminate. The second boolean is to indicate that there are nonzero η that satisfies ηTH(z, η)η = 0. After solving all QPs, if any of SO-TEST calls found out η 6= 0 such that g(z, η)T η = 0 and ηTH(z, η)η = 0, then we conclude SOSP-CHECK with “SOSP.” If all QPs terminated with unique minimum at zero, then we can conclude “Local Minimum.”

heading: B PROOF OF LEMMAS

heading: B.1 PROOF OF LEMMA 1
text: By definition, we have [W1]k,·xi + [b1]k = 0 for all i ∈ Bk, meaning that they are all on the same hyperplane [W1]k,·x + [b1]k = 0. By the assumption, we cannot have more than dx points on the hyperplane.
Next, assume for the sake of contradiction that the Mk := |Bk| data points x̄i’s are linearly dependent, i.e., there exists a1, . . . , aMk ∈ R, not all zero, such that
Mk∑ i=1 ai [ xi 1 ] = 0 =⇒ a1 = − Mk∑ i=2 ai =⇒ Mk∑ i=2 ai(xi − x1) = 0,
where a2, . . . , aMk are not all zero. This implies that theseMk points xi’s are on the same (Mk−2)dimensional affine space. To see why, consider for example the case Mk = 3: a2(x2 − x1) = −a3(x3−x1), meaning that they have to be on the same line. By adding any dx+1−Mk additional xi’s, we can see that dx + 1 points are on the same (dx − 1)-dimensional affine space, i.e., a hyperplane in Rdx . This contradicts Assumption 2.

heading: B.2 PROOF OF LEMMA 2
text: From Assumption 1, `(w, y) is twice differentiable and convex in w. By Taylor expansion of `(·) at (Y (xi), yi),
R(z + η) = ∑m
i=1 `(Y (xi) + dY (xi), yi) = ∑m
i=1 `(Y (xi), yi) +∇`Ti dY (xi) + 12dY (xi) T∇2`idY (xi) + o(‖η‖2)
= R(z) + m∑ i=1 ∇`Ti dY1(xi) + m∑ i=1 ∇`Ti dY2(xi) + 12 m∑ i=1 ‖dY1(xi)‖2∇2`i + o(‖η‖ 2 ),
where the first-order term ∑m i=1∇`Ti dY1(xi) = ∑m i=1∇`Ti (∆2O(xi)+δ2 +W2J(xi)(∆1xi+δ1)) can be further expanded to show∑m i=1 ∇`Ti (∆2O(xi) + δ2) = 〈 ∆2, ∑ i ∇`iO(xi)T 〉 + 〈 δ2, ∑
i ∇`i 〉 ,∑m
i=1 ∇`Ti (W2J(xi)(∆1xi + δ1)) = tr (∑m i=1 J(xi)W T 2 ∇`ix̄Ti [ ∆T1 δT1 ]) =
dh∑ k=1 [W2] T ·,k ( m∑ i=1 [J(xi)]k,k∇`ix̄Ti ) vk = dh∑ k=1 [W2] T ·,k ( Ck + ∑ i∈Bk h′(x̄Ti vk)∇`ix̄Ti ) vk.
Also, note that in each of the 2M divided region (which is a polyhedral cone) of η, J(xi) stays constant for all i ∈ [m]; thus, g(z, η) and H(z, η) are piece-wise constant functions of η. Specifically, since the parameter space is partitioned into polyhedral cones, we have g(z, η) = g(z, γη) and H(z, η) = H(z, γη) for any γ > 0.

heading: B.3 PROOF OF LEMMA 3
text: Suppose that w1, w2, . . . , wq are orthonormal basis of row(A). Choose wq+1, . . . , wp so that w1, w2, . . . , wp form an orthonormal basis of Rp. Let W be an orthogonal matrix whose columns are w1, w2, . . . , wp, and Ŵ be an submatrix of W whose columns are wq+1, . . . , wp. With this definition, note that I −AT (AAT )−1A = ŴŴT .
Suppose that we are given η(t) satisfying Aη(t) = 0. Then we can write η(t) = Ŵµ(t), where µ(t) ∈ Rp−q and [µ(t)]i = wTi+qη(t). Define µ(t+1) likewise. Then, noting η(t) = ŴŴT η(t) gives
Ŵµ(t+1) = η(t+1) = η(t) − αŴŴTQŴµ(t) = Ŵ (I − αŴTQŴ )µ(t).
Define C := ŴTQŴ ∈ R(p−q)×(p−q), and then write its eigen-decomposition C = V SV T and denote its eigenvectors as ν1, . . . , νp−q and its corresponding eigenvalues λ1, . . . , λp−q . Then note
µ(t+1) = (I − αC)µ(t) = (I − αV SV T ) p−q∑ i=1 (νTi µ (t))νi = p−q∑ i=1 (1− αλi)(νTi µ(t))νi
= p−q∑ i=1 (1− αλi)2(νTi µ(t−1))νi = · · · = p−q∑ i=1 (1− αλi)t+1(νTi µ(0))νi.
This proves that this iteration converges or diverges exponentially fast. Starting from the initial point η(0) = Ŵµ(0), the component of µ(0) that corresponds to negative eigenvalue blows up exponentially fast, those corresponding to positive eigenvalue shrinks to zero exponentially fast (if α < 1/λmax(C)), and those with zero eigenvalue will stay invariant. Therefore, if there exists λi < 0, then η(t) blows up to infinity quickly and finds an η such that ηTQη < 0 (T3). If all λi ≥ 0, it converges exponentially fast to Ŵ ∑ i:λi=0 (νTi µ (0))νi (T2). If all λi > 0, η(t) → 0 (T1).
It is left to prove that α < 1/λmax(Q) guarantees convergence, as stated. To this end, it suffices to show that λmax(Q) ≥ λmax(C). Note that
C = ŴTQŴ = ŴTWWTQWWT Ŵ = [0 I]WTQW [ 0 I ] .
Using the facts that λmax(Q) = λmax(WTQW ) and C is a principal submatrix of WTQW ,
λmax(Q) = max x
xTWTQWx
xTx ≥ max x:[x]1:q=0
xTWTQWx
xTx = λmax(C).
Also, if we start at a random initial point (e.g., sample from a Gaussian in Rp and project to row(A)⊥), then with probability 1 we have νTi µ
(0) 6= 0 for all i ∈ [p − q], so we will get the correct convergence/divergence result almost surely.

heading: B.4 PROOF OF LEMMA 4

heading: B.4.1 PRELIMINARIES
text: Before we prove the complexity lemma, we introduce the definitions of copositivity and Pareto spectrum, which are closely related concepts to our specific form of QP. Definition B.1. Let Q ∈ Rr×r be a symmetric matrix. We say that Q is copositive if ηTQη ≥ 0 for all η ≥ 0. Moreover, strict copositivity means that ηTQη > 0 for all η ≥ 0, η 6= 0.
Testing whether Q is not copositive known to be NP-complete (Murty & Kabadi, 1987); it is certainly a difficult problem. There is a method testing cositivity of Q in O(r32r) time which uses its Pareto spectrum Π(Q). The following is the definition of Pareto spectrum, taken from Seeger (1999); Hiriart-Urruty & Seeger (2010). Definition B.2. Consider the problem
minimize η≥0,‖η‖2=1
ηTQη.
KKT conditions for the above problem gives us a complementarity system
η ≥ 0, Qη − λη ≥ 0, ηT (Qη − λη) = 0, ‖η‖2 = 1, (6) where λ ∈ R is viewed as a Lagrange multiplier associated with ‖η‖2 = 1. The number λ ∈ R is called a Pareto eigenvalue of Q if (6) admits a solution η. The set of all Pareto eigenvalues of Q, denoted as Π(Q), is called the Pareto spectrum of Q.
The next lemma reveals the relation of copositivity and Pareto spectrum: Lemma B.1 (Theorem 4.3 of Hiriart-Urruty & Seeger (2010)). A symmetric matrix Q is copositive (or strictly copositive) if and only if all the Pareto eigenvalues of Q are nonnegative (or strictly positive).
Now, the following lemma tells us how to compute Pareto spectrum of Q. Lemma B.2 (Theorem 4.1 of Seeger (1999)). Let Q be a matrix of order r. Consider a nonempty index set J ⊆ [r]. Given J , QJ refers to the principal submatrix of Q with the rows and columns of Q indexed by J . Let 2[r] \ ∅ denote the set of all nonempty subsets of [r]. Then λ ∈ Π(Q) if and only if there exists an index set J ∈ 2[r] \ ∅ and a vector ξ ∈ R|J| such that
QJξ = λξ, ξ ∈ int(R|J|+ ), ∑ j∈J [Q]i,j [ξ]j ≥ 0 for all i /∈ J.
In such a case, the vector η ∈ Rr by
[η]j = { [ξ]j if j ∈ J, 0 if j /∈ J
is a Pareto-eigenvector of Q associated to the Pareto eigenvalue λ.
These lemmas tell us that the Pareto spectrum of Q can be calculated by computing eigensystems of all 2r − 1 possible QJ , which takes O(r32r) time in total, and from this we can determine whether a symmetric Q is copositive.

heading: B.4.2 PROOF OF THE LEMMA
text: With the preliminary concepts presented, we now start proving our Lemma 4. We will first transform η to eliminate the equality constraints and obtain an inequality constrained problem of the form minimizew:B̄w≥0 w
TRw. From there, we can use the theorems from Martin & Jacobson (1981), which tell us that by testing positive definiteness of a (p−q−r)×(p−q−r) matrix and copositivity of a r × r matrix we can determine which of the three categories the QP falls into. Transforming η and testing positive definiteness take O(p3) time and testing copositivity takes O(r32r) time, so the test in total is done in O(p3 + r32r) time.
We now describe how to transform η and get an equivalent optimization problem of the form we want. We assume without loss of generality that A = [A1 A2] where A1 ∈ Rq×q is invertible. If not, we can permute components of η. Then make a change of variables
η = TA [ w̄ w ] := [ A−11 −A −1 1 A2
0(p−q)×q Ip−q
] [ w̄ w ] , so that ATA [ w̄ w ] = [I 0] [ w̄ w ] = w̄.
Consequently, the constraint Aη = 0 becomes w̄ = 0. Now partition B = [B1 B2], where B1 ∈ Rr×q . Also let R be the principal submatrix of TTAQTA composed with the last p − q rows and columns. It is easy to check that
minimizeη η TQη subject to Aη = 0q, Bη ≥ 0r. ≡ minimizew wTRw subject to (B2 −B1A−11 A2)w ≥ 0r.
Let us quickly check if B2 −B1A−11 A2 has full row rank. One can observe that[ A1 A2 B1 B2 ] = [ Iq 0 B1A −1 1 Ir ] [ A1 A2 0 B2 −B1A−11 A2 ] .
It follows from the assumption rank( [ AT BT ] ) = q + r that B̄ := B2 − B1A−11 A2 has rank r, which means it has full row rank.
Before stating the results from Martin & Jacobson (1981), we will transform the problem a bit further. Again, assume without loss of generality that B̄ = [ B̄1 B̄2 ] where B̄1 ∈ Rr×r is invertible. Define another change of variables as the following:
w = TBν :=
[ B̄−11 −B̄ −1 1 B̄2
0(p−q−r)×r Ip−q−r ] [ ν1 ν2 ] , TTBRTB =: [ R̄11 R̄12 R̄T12 R̄22 ] =: R̄.
Consequently, we get
minimizew w TRw subject to B̄w ≥ 0r. ≡ minimizew νT R̄ν = νT1 R̄11ν1 + 2νT1 R̄12ν2 + νT2 R̄22ν2
subject to ν1 ≥ 0r. Given this transformation, we are ready to state the lemmas.
Lemma B.3 (Theorem 2.2 of Martin & Jacobson (1981)). If B̄ = [ B̄1 B̄2 ] , with B̄1 r× r invertible, then with R̄ij’s given as above, wTRw > 0 whenever B̄w ≥ 0, w 6= 0 if and only if
• R̄22 is positive definite, and
• R̄11 − R̄12R̄−122 R̄T12 is strictly copositive. Lemma B.4 (Theorem 2.1 of Martin & Jacobson (1981)). If B̄ = [ B̄1 B̄2 ] , with B̄1 r× r invertible, then with R̄ij’s given as above, wTRw ≥ 0 whenever B̄w ≥ 0 if and only if
• R̄22 is positive semidefinite, null(R̄22) ⊆ null(R̄12), and
• R̄11 − R̄12R̄†22R̄T12 is copositive,
where R̄†22 is a pseudoinverse of R̄22.
Using Lemmas B.3 and B.4, we now describe how to test our given QP and declare one of (T1), (T2), or (T3). First, we compute the eigensystem of R̄22 and see which of the following disjoint categories it belongs to:
(PD1) All eigenvalues λ1, . . . , λp−q−r of R̄22 satisfy λi > 0.
(PD2) ∀i, λi ≥ 0, but ∃i such that λi = 0, and ∀ν2 s.t. R̄22ν2 = 0, we have R̄12ν2 = 0. (PD3) ∀i, λi ≥ 0, but ∃i such that λi = 0, and ∃ν2 s.t. R̄22ν2 = 0 but R̄12ν2 6= 0. (PD4) ∃i such that λi < 0, i.e., ∃ν2 such that νT2 R̄22ν2 < 0.
If the test comes out (PD3) or (PD4), then we can immediately declare (T3) without having to look at copositivity. This is because if we get (PD4), we can choose ν1 = 0 so that νT R̄ν = νT2 R̄22ν2 < 0. In case of (PD3), one can fix any ν1 satisfying νT1 R̄12ν2 6= 0, and by scaling ν2 to positive or negative we can get νT R̄ν → −∞. Notice that once we have these ν satisfying νT R̄ν < 0, we can recover η from ν by backtracking the transformations.
Next, compute the Pareto spectrum of S := R̄11 − R̄12R̄†22R̄T12 and check which case S belongs to:
(CP1) S = R̄11 − R̄12R̄†22R̄T12 is strictly copositive. (CP2) S is copositive, but ∃ν1 ≥ 0, ν1 6= 0 such that νT1 Sν1 = 0. (CP3) ∃ν1 ≥ 0 such that νT1 Sν1 < 0.
Here, ν1’s are Pareto eigenvectors of S defined in Lemma B.2. If we have (CP3), we can declare (T3) because one can fix ν2 = −R̄†22RT12ν1 and get νT R̄ν = νT1 Sν1 < 0. If the tests come out (PD1) and (CP1), by Lemma B.3 we have (T1). For the remaining cases, we conclude (T2).

heading: B.5 PROOF OF LEMMA A.2
text: With the given η,
∆1 =  0(k−1)×dx[W1]k,· 0(dh−k)×dx  , δ1 = [ 0k−1[b1]k 0dh−k ] , ∆2 = [ 0dy×(k−1) −[W2]·,k 0dy×(dh−k) ] .
It is straightforward to check that for all i ∈ [m],
dY1(xi) = ∆2O(xi) +W2J(xi)(∆1xi + δ1) = −[O(xi)]k[W2]·,k +W2
[ 0k−1
[O(xi)]k 0dh−k
] = 0.
From this, g(z, η)T η = ∑ i∇`Ti dY1(xi) = 0. For the second order terms,
ηTH(z, η)η = m∑ i=1 ∇`Ti dY2(xi) + 12 m∑ i=1 ‖dY1(xi)‖2∇2`i = ∑m i=1 ∇`Ti ∆2J(xi)(∆1xi + δ1)
= ∑m
i=1 ∇`Ti (−[O(xi)]k[W2]·,k) = − (∑m i=1 [O(xi)]k∇`Ti ) [W2]·,k.
From the fact that z is a FOSP of R, it follows that ∑ i∇`iO(xi)T = 0, so ηTH(z, η)η = 0.

heading: B.6 PROOF OF LEMMA A.3
text: The first equality is straightforward, because it follows from Si,k = {−1,+1} for all i ∈ B(1)k that taking union of {x̄Ti vk ≤ 0} and {x̄Ti vk ≥ 0} will eliminate the inequality constraints for i ∈ B (1) k .
For the next equality, we start by expressing U1 := { vk | gk(z, vk)T vk = 0 } as a linear combination of its linearly independent components. The set U1 can be expressed in the following form:
U1 = {v⊥ + ∑ i∈B(1)k αiv̂i,k + ∑ i∈B(2)k βiv̂i,k | v⊥ ∈ V⊥k ,∀i ∈ B (1) k , αi ∈ R, and ∀i ∈ B (2) k , βi ≥ 0},
where v̂i,k ∈ Vk ∩ span{x̄j | j ∈ Bk \ {i}}⊥ for all i ∈ B(1,2)k . Additionally, for i ∈ B (2) k , v̂i,k is in the direction that satisfies σi,k = sign(x̄Ti v̂i,k). To see why U1 can be expressed in such a form, first note that at the moment SO-TEST is executed, it is already given that the point z is a FOSP. So, for any perturbation vk we have gk(z, vk) ∈ Vk, and gk(z, vk)T v⊥ = 0 for any v⊥ ∈ V⊥k . For the remaining components, please recall FO-INCREASING-TEST and Lemma A.1; v̂i,k are flat extreme rays, so they are the ones satisfying gk(z, vk)T vk = 0.
It remains to show that U2 := {vk | ∀i ∈ B(3)k , x̄Ti vk = 0, and ∀i ∈ B (2) k , σi,kx̄ T i vk ≥ 0} = U1. We show this by proving U1 ⊆ U2 and Uc1 ⊆ Uc2 .
To show the first part, we start by noting that for any v⊥ ∈ V⊥k , x̄Ti v⊥ = 0 for i ∈ B (2,3) k because x̄i ∈ Vk for these i’s. Also, for all i ∈ B(1)k , it follows from the definition of v̂i,k that x̄Tj v̂i,k = 0 for all j ∈ B(2,3)k . Similarly, for all i ∈ B (2) k , x̄ T j v̂i,k = 0 for all j ∈ B (2,3) k \ {i}, and σi,kx̄Ti v̂i,k > 0. Therefore, any vk ∈ U1 must satisfy all constraints in U2, hence U1 ⊆ U2. For the next part, we prove that vk ∈ Uc1 violates at least one constraint in U2. Observe that the whole vector space Rp can be expressed as
Rp = {v⊥ + ∑
i∈B(1)k αiv̂i,k + ∑ i∈B(2)k βiv̂i,k + w | w ∈ Vk ∩ span{v̂i,k, i ∈ B(1,2)k } ⊥,
v⊥ ∈ V⊥k ,∀i ∈ B (1) k , αi ∈ R, and ∀i ∈ B (2) k , βi ∈ R}.
Therefore, any vk ∈ Uc1 either has a nonzero component w in Vk ∩ span{v̂i,k, i ∈ B (1,2) k }⊥ or there exists i ∈ B(k)2 such that βi < 0. By definition, v̂i,k ∈ span{x̄j | j ∈ B (3) k }⊥ for any i ∈ B(1,2)k , which implies that Vk ∩ span{v̂i,k, i ∈ B (1,2) k }⊥ = span{x̄j | j ∈ B (3) k }. Thus, a nonzero component w ∈ span{x̄j | j ∈ B(3)k } will violate some equality constraints in U2. Next, in case where ∃i ∈ B(k)2 such that βi < 0, this violates the inequality constraint corresponding to i.

Review summaries:
The paper proposes a method to check if a given point is a stationary point or not (if not, it provides a descent direction), and then classify stationary points as either local min or second-order stationary. The method works for a specific non-differentiable loss.  In the worst case, there can be exponentially many flat directions to check (2^L), but usually this is no the case.