SDCA without Duality

Shai Shalev-Shwartz

Introduction

The following regularized loss minimization problem is associated with many machine learning methods:

As its name indicates, SDCA is derived by considering a dual problem. In this paper, we consider the possibility of applying SDCA for problems in which individual ϕi\phi_{i} are non-convex, e.g., deep learning optimization problems. In many such cases, the dual problem is meaningless. Instead of directly using the dual problem, we describe and analyze a variant of SDCA in which only gradients of ϕi\phi_{i} are being used (similar to option 5 in the pseudo code of Prox-SDCA given in ). Following , we show that SDCA is a variant of the Stochastic Gradient Descent (SGD), that is, its update is based on an unbiased estimate of the gradient. But, unlike the vanilla SGD, for SDCA the variance of the estimation of the gradient tends to zero as we converge to a minimum.

In recent years, many methods for optimizing regularized loss minimization problems have been proposed. For example, SAG , SVRG , Finito , SAGA , and S2GD . The best convergence rate is for accelerated SDCA . A systematic study of the convergence rate of the different methods under non-convex losses is left to future work.

SDCA without Duality

Dual-Free SDCA(P,T,η,α(0)P,T,\eta,\alpha^{(0)}) Goal: Minimize P(w)=1n∑i=1nϕi(w)+λ2∥w∥2P(w)=\frac{1}{n}\sum_{i=1}^{n}\phi_{i}(w)+\frac{\lambda}{2}\|w\|^{2} Input: Objective PP, number of iterations TT, step size η\eta s.t. β:=ηλn<1\beta:=\eta\lambda n<1, initial dual vectors α(0)=(α1(0),…,αn(0)\alpha^{(0)}=(\alpha_{1}^{(0)},\ldots,\alpha_{n}^{(0)} Initialize: w(0)=1λn∑i=1nαi(0)w^{(0)}=\frac{1}{\lambda n}\sum_{i=1}^{n}\alpha_{i}^{(0)} For t=1,…,Tt=1,\ldots,T Pick ii uniformly at random from [n][n] Update: αi(t)=αi(t−1)−ηλn(∇ϕi(w(t−1))+αi(t−1))\alpha_{i}^{(t)}=\alpha_{i}^{(t-1)}-\eta\lambda n\left(\nabla\phi_{i}(w^{(t-1)})+\alpha_{i}^{(t-1)}\right) Update: w(t)=w(t−1)−η(∇ϕi(w(t−1))+αi(t−1))w^{(t)}=w^{(t-1)}-\eta\left(\nabla\phi_{i}(w^{(t-1)})+\alpha_{i}^{(t-1)}\right)

Observe that SDCA keeps the primal-dual relation

Observe also that the update of α\alpha can be rewritten as

namely, the new value of αi\alpha_{i} is a convex combination of its old value and the negation of the gradient. Finally, observe that, conditioned on the value of w(t−1)w^{(t-1)} and α(t−1)\alpha^{(t-1)}, we have that

That is, SDCA is in fact an instance of Stochastic Gradient Descent. As we will see in the analysis section below, the advantage of SDCA over a vanilla SGD algorithm is because the variance of the update goes to zero as we converge to an optimum.

Analysis

The theorem below provides a linear convergence rate for smooth and convex functions. The rate matches the analysis given in , but the analysis is simpler and does not rely on duality.

Assume that each ϕi\phi_{i} is LL-smooth and convex, and the algorithm is run with η≤1L+λn\eta\leq\frac{1}{L+\lambda n}. Let w∗w^{*} be the minimizer of P(w)P(w) and let αi∗=−∇ϕi(w∗)\alpha^{*}_{i}=-\nabla\phi_{i}(w^{*}). Then, for every t≥1t\geq 1,

In particular, setting η=1L+λn\eta=\frac{1}{L+\lambda n}, then after

The theorem below provides a linear convergence rate for smooth functions, without assuming that individual ϕi\phi_{i} are convex. We only require that the average of ϕi\phi_{i} is convex. The dependence on L/λL/\lambda is worse in this case.

Assume that each ϕi\phi_{i} is LL-smooth and that the average function, 1n∑i=1nϕi\frac{1}{n}\sum_{i=1}^{n}\phi_{i}, is convex. Let w∗w^{*} be the minimizer of P(w)P(w) and let αi∗=−∇ϕi(w∗)\alpha^{*}_{i}=-\nabla\phi_{i}(w^{*}). Then, if we run SDCA with η=min⁡{λ2L2 , 12λn}\eta=\min\{\frac{\lambda}{2L^{2}}~{},~{}\frac{1}{2\lambda n}\}, we have that

The advantage of SDCA over a generic SGD is that the variance of the update goes to zero as we converge to the optimum. To see this, observe that

Proofs

Observe that 0=∇P(w∗)=1n∑i∇ϕi(w∗)+λw∗0=\nabla P(w^{*})=\frac{1}{n}\sum_{i}\nabla\phi_{i}(w^{*})+\lambda w^{*}, which implies that w∗=1λn∑iαi∗w^{*}=\frac{1}{\lambda n}\sum_{i}\alpha_{i}^{*}.

Define ui=−∇ϕi(w(t−1))u_{i}=-\nabla\phi_{i}(w^{(t-1)}) and vt=−ui+αi(t−1)v_{t}=-u_{i}+\alpha_{i}^{(t-1)}. We also denote two potentials:

We will first analyze the evolution of AtA_{t} and BtB_{t}. If on round tt we update using element ii then αi(t)=(1−β)αi(t−1)+βui\alpha_{i}^{(t)}=(1-\beta)\alpha_{i}^{(t-1)}+\beta u_{i}, where β=ηλn\beta=\eta\lambda n. It follows that,

The proofs of Theorem 1 and Theorem 2 will follow by studying different combinations of AtA_{t} and BtB_{t}.

The definition of η\eta implies that η≤λ(1−β)/L2\eta\leq\lambda(1-\beta)/L^{2}, so the coefficient of ∥vt∥2\|v_{t}\|^{2} is non-negative. By smoothness of each ϕi\phi_{i} we have ∥ui−αi∗∥2=∥∇ϕi(w(t−1))−∇ϕi(w∗)∥2≤L2∥w(t−1)−w∗∥2\|u_{i}-\alpha_{i}^{*}\|^{2}=\|\nabla\phi_{i}(w^{(t-1)})-\nabla\phi_{i}(w^{*})\|^{2}\leq L^{2}\|w^{(t-1)}-w^{*}\|^{2}. Therefore,

Using the strong convexity of PP we have (w(t−1)−w∗)⊤∇P(w(t−1))≥P(w(t−1))−P(w∗)+λ2∥w(t−1)−w∗∥2(w^{(t-1)}-w^{*})^{\top}\nabla P(w^{(t-1)})\geq P(w^{(t-1)})-P(w^{*})+\frac{\lambda}{2}\|w^{(t-1)}-w^{*}\|^{2} and P(w(t−1))−P(w∗)≥λ2∥w(t−1)−w∗∥2P(w^{(t-1)})-P(w^{*})\geq\frac{\lambda}{2}\|w^{(t-1)}-w^{*}\|^{2}, which together yields (w(t−1)−w∗)⊤∇P(w(t−1))≥λ∥w(t−1)−w∗∥2(w^{(t-1)}-w^{*})^{\top}\nabla P(w^{(t-1)})\geq\lambda\|w^{(t-1)}-w^{*}\|^{2}. Therefore,

and repeating this recursively we end up with

which concludes the proof of the first part of Theorem 2. The second part follows by observing that PP is (L+λ)(L+\lambda) smooth, which gives P(w)−P(w∗)≤L+λ2∥w−w∗∥2P(w)-P(w^{*})\leq\frac{L+\lambda}{2}\|w-w^{*}\|^{2}.

2 Proof of Theorem 1

In the proof of Theorem 1 we bounded the term ∥ui−αi∗∥2\|u_{i}-\alpha_{i}^{*}\|^{2} by L2∥w(t−1)−w∗∥2L^{2}\|w^{(t-1)}-w^{*}\|^{2} based on the smoothness of ϕi\phi_{i}. We now assume that ϕi\phi_{i} is also convex, which enables to bound ∥ui−αi∗∥2\|u_{i}-\alpha_{i}^{*}\|^{2} based on the current sub-optimality.

Assume that each ϕi\phi_{i} is LL-smooth and convex. Then, for every ww,

Clearly, since ϕi\phi_{i} is LL-smooth so is gig_{i}. In addition, by convexity of ϕi\phi_{i} we have gi(w)≥0g_{i}(w)\geq 0 for all ww. It follows that gig_{i} is non-negative and smooth, and therefore, it is self-bounded (see Section 12.1.3 in ):

Using the definition of gig_{i}, we obtain

where in the last inequality we used the assumption

References