Add Batch 7f69c793-bf41-49d8-b6c8-744ef9a657f3
Browse files- spredsolvingl1penaltywithsgd/f12ddf8a-1fac-4de3-bfcb-cbc467b76219_content_list.json +3 -0
- spredsolvingl1penaltywithsgd/f12ddf8a-1fac-4de3-bfcb-cbc467b76219_model.json +3 -0
- spredsolvingl1penaltywithsgd/f12ddf8a-1fac-4de3-bfcb-cbc467b76219_origin.pdf +3 -0
- spredsolvingl1penaltywithsgd/full.md +508 -0
- spredsolvingl1penaltywithsgd/images.zip +3 -0
- spredsolvingl1penaltywithsgd/layout.json +3 -0
spredsolvingl1penaltywithsgd/f12ddf8a-1fac-4de3-bfcb-cbc467b76219_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cfe6d22f0cb51823f0b011991d9f33ae42d0d0b161378a745723e9f7057f5cbf
|
| 3 |
+
size 110304
|
spredsolvingl1penaltywithsgd/f12ddf8a-1fac-4de3-bfcb-cbc467b76219_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:72d5a8c28e208be23e519348c46be6461bcf39972bf98844ea3e01f2253cbd78
|
| 3 |
+
size 130255
|
spredsolvingl1penaltywithsgd/f12ddf8a-1fac-4de3-bfcb-cbc467b76219_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:33e8ee54a15f162a5b3f307405048ef875c4b4f2638fedde834fe85faac7a6ff
|
| 3 |
+
size 2085855
|
spredsolvingl1penaltywithsgd/full.md
ADDED
|
@@ -0,0 +1,508 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Liu Ziyin\*1 Zihao Wang\*2
|
| 2 |
+
|
| 3 |
+
# Abstract
|
| 4 |
+
|
| 5 |
+
We propose to minimize a generic differentiable objective with $L_{1}$ constraint using a simple reparametrization and straightforward stochastic gradient descent. Our proposal is the direct generalization of previous ideas that the $L_{1}$ penalty may be equivalent to a differentiable reparametrization with weight decay. We prove that the proposed method, spred, is an exact differentiable solver of $L_{1}$ and that the reparametrization trick is completely "benign" for a generic nonconvex function. Practically, we demonstrate the usefulness of the method in (1) training sparse neural networks to perform gene selection tasks, which involves finding relevant features in a very high dimensional space, and (2) neural network compression task, to which previous attempts at applying the $L_{1}$ -penalty have been unsuccessful. Conceptually, our result bridges the gap between the sparsity in deep learning and conventional statistical learning.
|
| 6 |
+
|
| 7 |
+
# 1. Introduction
|
| 8 |
+
|
| 9 |
+
In many problems, optimization of an objective function under an $L_{1}$ constraint is of fundamental importance (Santosa and Symes, 1986; Tibshirani, 1996; Donoho, 2006; Sun et al., 2015; Candes et al., 2008). The advantage of the $L_{1}$ penalized solution is that they are sparse and thus highly interpretable, and it could be of great use if we can broadly apply the $L_{1}$ penalty to general problems. However, $L_{1}$ has only seen limited use in the case of simple models such as linear regression, logistic regression, or dictionary learning, where effective optimization methods are known to exist. As soon as the model becomes as complicated as a neural network, it is unknown how to optimize an $L_{1}$ penalty.
|
| 10 |
+
|
| 11 |
+
*Equal contribution 1The University of Tokyo 2HKUST. Correspondence to: Liu Ziyin <liu.ziyin.p@gmail.com>, Zihao Wang <zwanggc@cse.ust.hk>.
|
| 12 |
+
|
| 13 |
+
Proceedings of the $40^{th}$ International Conference on Machine Learning, Honolulu, Hawaii, USA. PMLR 202, 2023. Copyright 2023 by the author(s).
|
| 14 |
+
|
| 15 |
+
In contrast, with complicated models like neural networks, gradient descent (GD) has been the favored method of optimization because of its scalability on large-scale problems and simplicity of implementation. However, gradient descent has yet to be shown to work well in solving the $L_{1}$ penalty because the $L_{1}$ penalty is not differentiable at zero, precisely where the model becomes sparse. In fact, there is a large gap between the conventional $L_{1}$ learning and deep learning literature. Many tasks, such as feature selection, that $L_{1}$ -based methods work well cannot be tackled by deep learning, and achieving sparsity in deep learning is almost never based on $L_{1}$ . This gap between conventional statistics and deep learning is perhaps because no method has been demonstrated to efficiently solve the $L_{1}$ penalized objectives in general nonlinear settings, not to mention incorporating such methods within the standard backpropagation-based neural network training pipelines. Thus, optimizing a general nonconvex objective with $L_{1}$ regularization remains an important open problem.
|
| 16 |
+
|
| 17 |
+
The foremost contribution of our work is to theoretically prove and empirically demonstrate that a reparametrization trick, also called the Hadamard parametrization, allows for solving arbitrary nonconvex objectives with $L_{1}$ regularization with gradient descent. The method is simple and takes only a few lines to implement in any modern deep-learning framework. Furthermore, we demonstrate that the proposed method is compatible with and can be boosted by common training tricks in deep learning, such as minibatch training, adaptive learning rates, and pretraining. See Figure 1 for an illustration.
|
| 18 |
+
|
| 19 |
+
# 2. Related Works
|
| 20 |
+
|
| 21 |
+
L1 Penalty. It is well-known that the $L_{1}$ penalty leads to a sparse solution (Wasserman, 2013). For linear models, the objectives with $L_{1}$ regularization are usually convex, but they are challenging to solve because the objective becomes non-differentiable precisely at the point where sparsity is achieved (namely, the origin). The mainstream literature often proposes special algorithms for solving the $L_{1}$ penalty for a specific task. For example, the original lasso paper suggests a method based on the quadratic programming algorithms (Tibshirani, 1996). Later, algorithms such as coordinate descent (Friedman et al., 2010) and least-angle
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
Figure 1: Illustration of the spred algorithm for achieving parameter sparsity (left) and feature selection (right). Essentially, the proposed algorithm creates redundant parameters and does not change the original architecture or training protocol. Therefore, the algorithm is compatible with pretraining.
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
Figure 2: Loss landscape of the original $L_{1}$ regularized loss and the equivalent $L_{2}$ regularized redundant parametrization. With the redundant parametrization, the loss becomes smooth and differentiable. The reparametrization introduces one additional minimum but is entirely benign because the two minima are identical and converging to either achieves an equivalent performance. Left: the original 1d $L_{1}$ loss for $L_{L1} = (w - c)^{2} + |w|$ . Mid: reparametrized loss with $c = 0.5$ . Right: $c = 1.5$ .
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
|
| 31 |
+

|
| 32 |
+
|
| 33 |
+
regression (LARS) (Efron et al., 2004) have been proposed as more efficient alternatives. The same problem also exists in the sparse multinomial logistic regression task (Cawley et al., 2006), which relies on a diagonal second-order coordinate descent algorithm. Another line of work proposes to use the iterative thresholding algorithms (ISTA) for solving lasso (Beck and Teboulle, 2009), but it is unclear how ISTA-type algorithms could be generalized to solve general nonconvex problems. Instead of finding an efficient algorithm for a special $L_{1}$ problem, our strategy is to transform an $L_{1}$ problem into a differentiable problem for which the simplest gradient descent algorithms can be efficient.
|
| 34 |
+
|
| 35 |
+
Redundant Parameterization. The method we propose is based on a reparametrization trick of the $L_{1}$ loss function. The idea that a redundant parametrization with $L_{2}$ penalty has some resemblance to an $L_{1}$ penalty has a rather long history, and this resemblance has been utilized in various limited settings to solve an $L_{1}$ problem. Grandvalet (1998) is one of the earliest to suggest an equivalence between $L_{1}$ and a redundant parametrization. However, this equivalence is only approximate. Hoff (2017) theoretically studies the Hadamard parametrization in the context of generalized linear models and proposes to minimize the loss function by alternatively applying the solution of the ridge regression problem; notably, this work is the first to prove that not only the global minima of the redundant parametrization is
|
| 36 |
+
|
| 37 |
+
equivalent to the $L_{1}$ global minima, but that all the local minima of the redundant parametrization are also local minima of the original $L_{1}$ objective, although only in case of linear models. Poon and Peyré (2021) studied the redundant parametrization in the case of a convex loss function and showed that all local minima of the redundant loss function are global and that the saddles are strict. In follow-up work, Poon and Peyré (2022) analyzed the optimization property of these convex loss functions.
|
| 38 |
+
|
| 39 |
+
Compared to previous results, our result comprehensively characterizes all the saddle and local minima of the loss landscape of the redundant parametrization for a generic and nonconvex loss function. Our theoretical result, in turn, justifies the application of simple SGD to solve this problem and makes it possible to apply this method to highly complicated and practical problems, such as training a sparse neural network. Our motivation is also different from previous works. Previous works motivate the reparametrization trick from the viewpoint of solving the original Lasso problem, whereas our focus is on solving and understanding problems in deep learning. Application-wise, Hoff (2017) applied the method to linear logistic regression.(Poon and Peyré, 2021) applied the method to lasso regression and optimal transport. In contrast, our work is also the first to identify and demonstrate its usage in contemporary deep learning.
|
| 40 |
+
|
| 41 |
+
Sparsity in Deep Learning. One important application of our theory is understanding and achieving any type of parameter sparsity in deep learning. There are two main reasons for introducing sparsity to the model. The first is that some level of sparsity often leads to better generalization performance; the second is that compressing the models can lead to more memory/computation-efficient deployment of the models (Gale et al., 2019; Blalock et al., 2020). However, none of the popular methods for sparsity in deep learning is based on the $L_{1}$ penalty, which is the favored method in conventional statistics. For example, pruning-based methods are the dominant strategies in deep learning (LeCun et al., 1989). However, such methods are not satisfactory from a principled perspective because the pruning part is separated from the training, and it is hard to understand what these pruning procedures are optimizing.
|
| 42 |
+
|
| 43 |
+
# 3. Algorithm and Theory
|
| 44 |
+
|
| 45 |
+
In this section, we first introduce the reparametrization trick. We then present our theoretical results, which establish that the reparametrization trick does not make the landscape more complicated. All the proofs are presented in Appendix B.
|
| 46 |
+
|
| 47 |
+
# 3.1. Landscape of the Reparametrization Trick
|
| 48 |
+
|
| 49 |
+
Consider a generic objective function $L(V_{s}, V_{d})$ that depends on two sets of learnable parameters $V_{s}$ and $V_{d}$ , where the subscript $s$ stands for "sparse," and $d$ stands for "dense." Often, we want to find a sparse set of parameters $V_{s}$ that minimizes $L$ . The conventional way to achieve this is by minimizing the loss function with an $L_{1}$ penalty of strength $2\kappa$ :
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\min _ {V _ {s}, V _ {d}} L \left(V _ {s}, V _ {d}\right) + 2 \kappa \| V _ {s} \| _ {1}. \tag {1}
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
We will refer to $L(V_s, V_d) + 2\kappa \| V_s \|_1$ as $L_{L1}$ . Under suitable conditions for $L$ , the solutions of $L(V_s, V_d)$ will feature both (1) sparsity and (2) shrinkage of the norm of the solution $V_s$ , and thus one can perform variable selection and overfitting avoidance at the same time. A primary obstacle that has prevented a scalable optimization of Eq. (1) with gradient descent algorithms is that it is non-differentiable at the points where sparsity is achieved. The optimization problem only has efficient algorithms when the loss function belongs to a restrictive set of families. See Figure 2.
|
| 56 |
+
|
| 57 |
+
Let $\odot$ denote the element-wise product. The following theorem derives a precise equivalence of Eq. (1) with a redundantly parameterized objective.
|
| 58 |
+
|
| 59 |
+
Theorem 1. Let $\alpha \beta = \kappa^2$ and
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
L _ {s r} (U, W, V _ {d}) := L (U \odot W, V _ {d}) + \alpha \| U \| ^ {2} + \beta \| W \| ^ {2}. \tag {2}
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
Then, $(U,W,V_d)$ is a global minimum of Eq. (2) if and only
|
| 66 |
+
|
| 67 |
+
if (a) $|U_i| = |W_i|$ for all $i$ and (b) $(U \odot W, V_d)$ is a global minimum of Eq. (1).<sup>1</sup>
|
| 68 |
+
|
| 69 |
+
Because having $V_{d}$ in the loss function or not does not change the proof, we omit writing $V_{d}$ from this point on. We note that the suggestion that this reparametrization trick is equivalent to the $L_{1}$ penalty at global minima appeared in previous works under various restricted settings. A limited version of this theorem appeared in Hoff (2017) in the context of a linear model. Poon and Peyre (2021) proved this equivalence in the global minimum when the landscape is convex.
|
| 70 |
+
|
| 71 |
+
The subscript $sr$ stands for "sparsity by redundancy." When $L$ is $n$ -time differentiable, the objective $L_{sr}$ is also $n$ -time differentiable. It is thus tempting to apply simple gradient-based optimization methods to optimize this alternative objective when $L$ itself is differentiable. When $L$ is twice-differentiable, one can also apply second-order methods for acceleration. As an example of $L$ , consider the case when $L$ is a training-set-dependent loss function (such as in deep learning), and the parameters $V_s$ and $V_d$ are learnable weights of a nonlinear neural network. In this case, one can write $L_{sr}$ as
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\frac {1}{N} \sum_ {i = 1} ^ {N} \ell \left(f _ {w} \left(x _ {i}\right), y _ {i}\right) + \alpha \| U \| ^ {2} + \beta \| W \| ^ {2}, \tag {3}
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
where $w = (U, W, V_d)$ denotes the total set of parameters we want to minimize, and $(x_i, y_i)$ are data point pairs of an empirical dataset. For a deep learning practitioner, it feels intuitive to solve this loss function with popular deep learning training methods. Additionally, $L_2$ regularization can be implemented efficiently as weight decay as in the standard deep learning frameworks. Section 3.2 provides several specific examples of this redundant parametrization.
|
| 78 |
+
|
| 79 |
+
However, the equivalence in the global minimum is insufficient to motivate an application of SGD to it because gradient descent is local, and if this parametrization induces many bad minima, SGD can still fail badly. An important question is thus whether this redundant parametrization has made the optimization process more difficult for SGD or not. We now show that it does not, in the sense that all local minima of Eq. (2) faithfully reproduce the local minima of the original loss and vice versa. Thus, the redundant parametrization cannot introduce new bad minima to the loss landscape.
|
| 80 |
+
|
| 81 |
+
Theorem 2. All stationary points of Eq. (2) satisfy $|U_i| = |W_i|$ . Additionally, $(U,W)$ is a local minimum of Eq. (2) if and only if (a) $V = U \odot W$ is a local minimum of Eq. (1) and (b) $|U_i| = |W_i|$ .
|
| 82 |
+
|
| 83 |
+
Namely, one can partition all of the local minima of $L_{rs}$ into
|
| 84 |
+
|
| 85 |
+
exclusive and equivalent sets, such that these sets have a one-to-one mapping with the local minima in the corresponding $L_{L1}$ . We are the first to prove this one-to-one mapping relation for a general loss function. This proposition thus offers a partial theoretical explanation to our empirical observation that optimizing Eq. (2) is no more difficult (and often much easier) than the original $L_{1}$ -regularized loss. A corollary of this theorem reduces to the main theorem of Poon and Peyré (2021), which states that if $L$ is convex (such as in Lasso), then every local minimum of $L_{rs}$ is global. A crucial new insight we offer is that one can still converge to a bad minimum for a general landscape, but this only happens because the original $L_{L1}$ has bad minima, not because of the reparametrization trick.
|
| 86 |
+
|
| 87 |
+
Still, this alone is insufficient to imply that GD can navigate this landscape easily because gradient descent can get stuck on saddle points easily (Du et al., 2017; Ziyin et al., 2021). In particular, GD often has a problem escaping higher-order saddle points where the Hessian eigenvalues along escaping directions vanish. The following theorem shows that this is also not a problem for the reparametrization trick because the strength of the gradient is as strong as the original $L_{L1}$ .
|
| 88 |
+
|
| 89 |
+
Theorem 3. Let $|U| = |W|$ , $V = U \odot W$ and $L$ be everywhere differentiable. Then, for every infinitesimal variation $\delta V$ ,
|
| 90 |
+
|
| 91 |
+
1. if $L_{L1}(V)$ is directionally differentiable in $\delta V$ , there exist variations $\delta W, \delta U \in \Theta(\delta V)$ such that $L_{L1}(V + \delta V) = L_{rs}(U + \delta U, W + \delta W)$ ;
|
| 92 |
+
2. if $L_{L1}(V)$ is not directionally differentiable in $\delta V$ , there exist variations $\delta W, \delta U \in \Theta((\delta V)^{0.5})$ such that $L_{L1}(V + \delta V) = L_{rs}(U + \delta U, W + \delta W)$ .
|
| 93 |
+
|
| 94 |
+
Namely, away from nondifferential points of $L_{L1}$ , the reparametrized landscape is qualitatively the same as the original landscape, and escaping the saddles in the reparametrized landscape must be no harder than escaping the original saddle. If GD finds it difficult to escape a saddle point, it must be because the original $L_{L1}$ contains a difficult saddle. All nondifferentiable points of $L_{L1}$ occur at a sparse solution where some parameters are zero. Here, the first-order derivative is discontinuous, and the variation of the $L_{L1}$ is thus first-order in $\delta V$ . This implies that the variation in the corresponding $L_{rs}$ is second-order in $\delta U$ and $\delta W$ and that the Hessian of $L_{rs}$ should have at least one negative eigenvalue, which implies that escaping from these points should be of no problem to gradient descent (Jin et al., 2017). Combined, Theorem 2 and 3 directly motivate the application of stochastic gradient descent to any problem that SGD has been demonstrated efficient for, an important example being a neural network.
|
| 95 |
+
|
| 96 |
+
In more general scenarios, one is interested in a structured sparsity, where a group of parameters is encouraged to be
|
| 97 |
+
|
| 98 |
+
sparse simultaneously. It suffices to consider the case when there is a single group because one can add $L_{1}$ penalty recursively to prove the general multigroup case:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
L \left(V _ {s}, V _ {d}\right) + \kappa \left| V _ {s} \right| _ {2}. \tag {4}
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
The following theorem gives the equivalent redundant form.
|
| 105 |
+
|
| 106 |
+
Theorem 4. Let $\alpha \beta = \kappa^2$ and
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
L _ {s r} (u, W, V _ {d}) := L (u W, V _ {d}) + \alpha u ^ {2} + \beta \| W \| ^ {2}. \tag {5}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
Then, $(u,W,V_d)$ is a global minimum of Eq. (5) if and only if (a) $|u| = \| W\| _2$ for all $i$ and (b) $(uW,V_d)$ is a global minimum of Eq. (4).
|
| 113 |
+
|
| 114 |
+
Namely, every $L_{1}$ group only requires one additional parameter to sparsify. Note that recursively applying Theorem 4 and setting $W$ to have dimension 1 allows us to recover Theorem 1. $^{2}$ The above theory justifies the application of the reparametrization trick to any sparsity-related tasks in deep learning. For completeness, we give an explicit algorithm in Algorithm 1 and 2. Let $m$ be the number of groups. This algorithm adds $m$ parameters to the training process. Consequently, it has the same complexity as the standard deep learning training algorithms such as SGD because it, at most, doubles the memory and computation cost of training and does not incur additional costs for inference. For the ResNet18/CIFAR10 experiment we performed, each iteration of training with spred takes less than $5\%$ more time than the standard training, much lower than the worst-case upper bound of $100\%$ .
|
| 115 |
+
|
| 116 |
+
# Algorithm 1 spred algorithm for parameter sparsity
|
| 117 |
+
|
| 118 |
+
Input: loss function $L(V_{s}, V_{d})$ , parameter $V_{s}, V_{d}$ , $L_{1}$ regularization strength $2\kappa$
|
| 119 |
+
|
| 120 |
+
Initialize $W$ , $U$
|
| 121 |
+
|
| 122 |
+
Solve (with SGD, Adam, LBGFS, etc.)
|
| 123 |
+
|
| 124 |
+
$\min_{W,U,V_d}L\big(U\odot W,V_d\big) + \kappa (\| W\| _2^2 +\| U\| ^2)$
|
| 125 |
+
|
| 126 |
+
Output: $V^{*} = uW$
|
| 127 |
+
|
| 128 |
+
# Algorithm 2 spred algorithm for structured sparsity
|
| 129 |
+
|
| 130 |
+
Input: loss function $L(V_{s}, V_{d})$ , parameter $V_{s}, V_{d}, L_{1}$ regularization strength $2\kappa$
|
| 131 |
+
|
| 132 |
+
Initialize $W$ , $u$
|
| 133 |
+
|
| 134 |
+
Solve $\min_{W,u,V_d}L(uW,V_d) + \kappa (\| W\| _2^2 +u^2)$
|
| 135 |
+
|
| 136 |
+
Output: $V^{*} = uW$
|
| 137 |
+
|
| 138 |
+
Implementation and practical remarks. First, multiple ways exist to initialize the redundant parameters $W$ and $U$ . One way is to initialize $W$ with, say, the Kaiming init., and $U$ to be of variance 1. The other way is to give both variables
|
| 139 |
+
|
| 140 |
+
the same variance by, e.g., taking the squared root of the standard initialization methods. A question is whether one should initialize with a balanced norm: $|u| = |w|$ . Our initial experiments find no significant difference between making the norm balanced or not at initialization, and we recommend not balancing the weights as a default setting. Secondly, even if one only wants to add $L_{1}$ to one layer, one should also add a small weight decay to all the other layers to prevent the model from diverging. Lastly, while the proposed method does not require a threshold to reach a sparse solution, it could reduce the training time without affecting the performance by stopping earlier and pruning at a small threshold. Our experiments suggest that $10^{-6}$ is often a reasonable threshold for linear models and $10^{-3}$ for neural networks.
|
| 141 |
+
|
| 142 |
+
# 3.2. Examples
|
| 143 |
+
|
| 144 |
+
It is instructive to consider two examples to understand better how to apply the spred parametrization.
|
| 145 |
+
|
| 146 |
+
Example 1 (lasso). The lasso objective is $L(V_s) = \sum_i (V_s^T x_i - y_i)^2 + 2\kappa \| V_s \|_1$ . The equivalent spred loss is
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
L (U, W) = \sum_ {i} \left(\left(U \odot W\right) ^ {T} x _ {i} - y _ {i}\right) ^ {2} + \kappa \left(\left\| W \right\| ^ {2} + \left\| U \right\| ^ {2}\right), \tag {6}
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
where $V_{d}$ is the empty set.
|
| 153 |
+
|
| 154 |
+
Example 2 (unstructured sparsity in two-layer tanh nets). Let both the input and the label be one-dimensional. Also, let $V_{s} = (V_{1},V_{2})$ be the union of the first layer weight matrix $V_{1}$ and the second layer weight $V_{2}$ . With the MSE objective, the original loss is $L(V_{s}) = \sum_{i}(V_{1}\tanh (V_{2}x_{i}) - y_{i})^{2} + 2\kappa (\| V_{1}\|_{1} + \| V_{2}\|_{1})$ . The equivalent spred loss is then
|
| 155 |
+
|
| 156 |
+
$$
|
| 157 |
+
\begin{array}{l} L (U, W) = \sum_ {i} \left(\left(U _ {2} \odot W _ {2}\right) ^ {T} \tanh \left(\left(U _ {1} \odot W _ {1}\right) x _ {i}\right) - y _ {i}\right) ^ {2} \\ + \kappa \left(\left\| W _ {1} \right\| ^ {2} + \left\| W _ {2} \right\| ^ {2} + \left\| U _ {1} \right\| ^ {2} + \left\| U _ {2} \right\| ^ {2}\right), \tag {7} \\ \end{array}
|
| 158 |
+
$$
|
| 159 |
+
|
| 160 |
+
where we have also partitioned the parameters into those of the two layers, respectively: $U = (U_{1}, U_{2})$ and $U = (U_{1}, U_{2})$ . Here, $V_{d}$ is also the empty set.
|
| 161 |
+
|
| 162 |
+
See Figure 1 for an illustration. Also, see the next section for an example of structured sparsity.
|
| 163 |
+
|
| 164 |
+
# 4. Experiments
|
| 165 |
+
|
| 166 |
+
In this section, we empirically validate that spred is useful for sparsity-related tasks in deep learning. We first demonstrate the correctness of the proposed approach for the classical lasso problem. Then, we apply the algorithm to two deep learning problems: (1) high dimensional nonlinear feature selection on gene datasets; (2) neural network compression.
|
| 167 |
+
|
| 168 |
+

|
| 169 |
+
Figure 3: spred reaches the theoretical optimal solution when solving lasso across different values of $\alpha$ . The dashed line shows the closed-form solution. $L1$ : $L_{1}$ regularized least square regression solved by gradient descent; spred: the proposed method.
|
| 170 |
+
|
| 171 |
+
# 4.1. Lasso
|
| 172 |
+
|
| 173 |
+
We illustrate the correctness of the proposed algorithm on the well-understood lasso problem. We first consider the case of an orthogonal input distribution. In this case, the closed-form solution for lasso is known, allowing us to evaluate whether the method can reach the optimal lasso solutions. For illustration, we also show the performance of the naive gradient-descent baseline: directly applying gradient descent to the original lasso objective, denoted as $L1$ . While one does not expect this method to work, it has been the popular way in deep learning to optimize the $L_{1}$ penalty (for example, see Han et al. (2015) and Scardapane et al. (2017)). We choose both gradient descent and Adam optimizers to optimize spred, as well as the original $L_{1}$ regularized mean square error objective. The learning rate is chosen from $\{1, 0.1, 0.01, 0.001\}$ . The final result is chosen from the best setting. Figure 3 shows that spred agrees with the closed-form solution for all sparsity levels and for two different levels of accuracy, while the naive gradient-based method never reached a sparse solution. Our experiments also show that the convergence speed of spred is similar to the standard $L_{1}$ optimization methods such as coordinate descent or LARS. See Appendix A.
|
| 174 |
+
|
| 175 |
+
# 4.2. Nonlinear Feature Selection
|
| 176 |
+
|
| 177 |
+
The common gene selection tasks have a feature dimension of order $10^{4} - 10^{5}$ (the size of the human genome), and the number of samples (often the number of patients) is of order $10^{2}$ (Shevade and Keerthi, 2003; Sun et al., 2015). These tasks can be seen as a "transpose" of MNIST and are the direct opposite of the tasks that deep learning is good at. Additionally, one indispensable part of these tasks is that we want to not only make generalizable predictions but also pinpoint the relevant genes that have a direct physiological consequence. For example, out of roughly 50000 genes of human beings, we want to know which gene is the closest associated with, say, hemophilia – such a requirement for interpretability is also challenging for deep learning. At the heart of this problem is a feature selection
|
| 178 |
+
|
| 179 |
+
Table 1: Prediction accuracy for the gene selection task for cancer diagnosis and survival time prediction. All tasks are classification tasks. On average, each dataset contains 300 data points, each with 40000 feature dimensions, and labeled into 10 classes. See Table 2 for more description.
|
| 180 |
+
|
| 181 |
+
<table><tr><td rowspan="2">Dataset</td><td rowspan="2">HSIClasso</td><td rowspan="2">MLP (WD)</td><td rowspan="2">MLP (L1)</td><td colspan="2">spred</td></tr><tr><td>fl only</td><td>fl and fn</td></tr><tr><td>GDS1815</td><td>11.62 ± 0.29</td><td>0.56 ± 0.22</td><td>7.75 ± 0.55</td><td>17.75 ± 0.77</td><td>19.31 ± 0.70</td></tr><tr><td>GDS1816</td><td>13.68 ± 0.06</td><td>0.31 ± 0.13</td><td>7.12 ± 0.75</td><td>17.43 ± 0.79</td><td>18.75 ± 0.77</td></tr><tr><td>GDS3268</td><td>30.69 ± 0.44</td><td>3.03 ± 0.41</td><td>15.90 ± 0.81</td><td>25.90 ± 0.59</td><td>27.86 ± 0.65</td></tr><tr><td>GDS3952</td><td>45.61 ± 0.52</td><td>14.92 ± 1.14</td><td>17.92 ± 0.92</td><td>37.00 ± 1.22</td><td>46.76 ± 1.55</td></tr><tr><td>GDS4761</td><td>42.63 ± 0.51</td><td>50.79 ± 2.48</td><td>12.62 ± 1.78</td><td>60.26 ± 2.37</td><td>57.63 ± 2.09</td></tr><tr><td>GDS5027</td><td>23.51 ± 0.10</td><td>2.55 ± 0.48</td><td>15.47 ± 0.98</td><td>30.37 ± 0.97</td><td>30.95 ± 0.94</td></tr></table>
|
| 182 |
+
|
| 183 |
+
problem. Existing feature-selection methods based on $L_{1}$ penalty are predominantly linear. The nonlinear methods are often kernel-based, where the nonlinearity comes from an unlearnable kernel. While neural networks have fantastic capabilities in capturing nonlinear associations in the data, it is generally unknown how to apply deep learning to this problem.
|
| 184 |
+
|
| 185 |
+
In this section, we demonstrate how spred offers a direct way to apply deep learning nonlinear feature selection. To the best of our knowledge, no deep learning method has been shown to work for these tasks (for a review, see Montesinos-López et al. (2021)). We compare with relevant baselines on 6 public cancer classification datasets based on microarray gene expression features from the Gene Expression Omnibus, including two datasets on glioma (#1815, #1816), three on breast cancer (#3952, #4761, #5027), and one on ulcerative colitis (#3268). More detailed descriptions of the datasets are in the appendix.
|
| 186 |
+
|
| 187 |
+
At the same time, linear models have been found to work reasonably well for these tasks. Thus, one would like to make feature selections based on both linear and nonlinear models. The proposed method allows one to achieve this goal easily: we demonstrate how to perform feature selection with an ensemble of models using spred. Let $f_{l}(W^{l}x)$ and $f_{n}(W^{n}x)$ denote the two different models to be trained on loss function $L(f_{l},f_{n})$ . We have explicitly written weight matrices $W^{l}$ and $W^{n}$ to emphasize that these two models start with a learnable linear layer. The following parametrization allows one to perform $L_{1}$ feature selection with both models:
|
| 188 |
+
|
| 189 |
+
$$
|
| 190 |
+
\begin{array}{l} \mathbb {E} _ {x} \left[ L \left(f _ {l} \left(W ^ {l} (U \odot x)\right), f _ {n} \left(W ^ {n} (U \odot x)\right)\right) \right] \\ + \kappa \left(\left\| W ^ {l} \right\| _ {2} ^ {2} + \left\| W ^ {n} \right\| _ {2} ^ {2} + \left\| U \right\| _ {2} ^ {2}\right), \tag {8} \\ \end{array}
|
| 191 |
+
$$
|
| 192 |
+
|
| 193 |
+
where $\dim(U) = \dim(x)$ , and $\mathbb{E}_x$ denotes averaging over the training set. Note that the input to the two models is masked by the same vector $U$ : this is crucial; without $U$ , we are just training an ensemble of independent models, whereas $U$ makes them coupled. Each $U_i$ is a redundant parameter, and this is equivalent to performing $L_1$ penalty on $W_{:i}^l$ and $W_{:i}^n$ together by Theorem 4. In the experiment, we let $f_l$ be a simple linear regressor without bias and $f_n$ be
|
| 194 |
+
|
| 195 |
+
a three-layer feedforward network with the ReLU activation. For simplicity, we set the objective function $L(f_{l},f_{n}) = CE(f_{l}(W^{l}(U\odot x),y) + CE(f_{n}(W^{l}(U\odot x),y))$ to be the summation of two Cross Entropy (CE) losses.
|
| 196 |
+
|
| 197 |
+
See Table 1 for the results. Because the dataset size is small, for each run of each model, we randomly pick $20\%$ samples as the test set, $20\%$ as the validation set for hyperparameter tuning, and $60\%$ as the training set. For SGD-based models (MLP, Linear, Linear + MLP), we stop the optimization when the accuracy on the validation set is not increasing. The performance is averaged over 20 independent samplings of the datasets for comparison. We report the percentage of the majority class of each dataset to justify whether the models produce meaningful results. In table 1, MLP contains one hidden layer of 4096 neurons. $f_{n}$ contains two hidden layers of 1024 neurons. spred models are optimized by SGD. The learning rate and $\kappa$ are both selected from $\{7\mathrm{e} - 1,5\mathrm{e} - 1,3\mathrm{e} - 1,$ $1\mathrm{e} - 1,5\mathrm{e} - 2,3\mathrm{e} - 2,1\mathrm{e} - 2\}$ . Besides the deep learning methods, we also compare with HSIC-Lasso, a conventional $L_{1}$ -based non-linear feature selection method (Yamada et al., 2014), which has been a standard method, and recent works have identified it as one of the best-performing methods for these tasks (Sun et al., 2015; Krakovska et al., 2019).
|
| 198 |
+
|
| 199 |
+
We see that deep learning combined with spred achieves state-of-the-art performance, outperformed by the conventional method on only one dataset. In sharp contrast, simply applying deep learning does not work on any of the datasets. This is expected for tasks whose dimension is far larger than the number of available data points because memorization can be too easy. Importantly, simply applying $L_{1}$ to an MLP fails badly because gradient descent cannot find a sparse solution and thus cannot prevent overfitting. In the future, designing better architectures that suit the task of gene selection will further boost performance.
|
| 200 |
+
|
| 201 |
+
# 4.3. Neural Network Compression
|
| 202 |
+
|
| 203 |
+
The proposed method also offers a principled way of performing network compression in deep learning. We experiment with unstructured weight sparsity for deep neural networks. Our method can also achieve structured compres
|
| 204 |
+
|
| 205 |
+

|
| 206 |
+
Figure 4: Performance of $L_{1}$ -based ResNet18 pruning on CIFAR-10 and CIFAR-100. For both datasets, the performance of spred is competitive against any known existing pruning methods. Left: Distribution of weight parameters in the largest convolution layer of ResNet18 trained on CIFAR10. Training with spred leads to a very sparse distribution without affecting test accuracy. Mid: CIFAR-10. Right: CIFAR-100.
|
| 207 |
+
|
| 208 |
+

|
| 209 |
+
|
| 210 |
+

|
| 211 |
+
|
| 212 |
+
sion, which we leave to future work.4 We apply spred to all the weights of a ResNet in this section. Previous methods often rely on heuristics for pruning, such as removing the weights with the smallest magnitudes from a trained network. However, the problem with such methods is that one does not know, in principle, the effect of removing such weights, even though they seem to work empirically. Our method is equivalent to $L_{1}$ and has its theoretical foundation in both traditional statistics and Bayesian learning with a Laplace prior. The meaning of removing a parameter with magnitude $c$ is clear: its removal from the model will cause the training loss to increase by roughly $\kappa c$ . We also emphasize that we are not proposing a new compression method: $L_{1}$ is known to lead to sparsity, and spred is just a method for optimizing $L_{1}$ constraints. The performance of the proposed method can thus be no better than what a simple $L_{1}$ constraint can provide. The thesis of this section is that when an efficient way to optimize $L_{1}$ exists, it can perform as well as the existing methods that are not $L_{1}$ -based, and thus $L_{1}$ based strategies are really worth exploring by the community. Prior to our work, many works have attempted to naively optimize the $L_{1}$ constraint with SGD, but such approaches have been found to perform rather badly compared with non $L_{1}$ -based methods (Han et al., 2015).
|
| 213 |
+
|
| 214 |
+
We first train a ResNet18 on CIFAR10 with and without spred both at $\kappa = 5e - 4$ and compare the weight distribution. Our implementation of ResNet18 contains roughly 11M parameters, consistent with the standard implementation. See Figure 4. Both models achieve the established accuracy of $93\%$ while the training with spred leads to a much sparser distribution. We now test the performance of $L_{1}$ for network pruning on CIFAR-10 and CIFAR-100. We implement spred in the training protocol provided by (Kusupati et al., 2020). We run the model at different weight decay strengths and report the pareto frontier obtained by fitting a sigmoid. For the raw data used to estimate the pareto frontier, see
|
| 215 |
+
|
| 216 |
+
# Appendix A.
|
| 217 |
+
|
| 218 |
+
We compare with the following baselines. L1 regularization: this is the simplest baseline suggested by Han et al. (2015) by simply adding an $L_{1}$ penalty to all the model parameters; we then prune at a given threshold and evaluate. The only hyperparameter is the regularization strength, which we search from $10^{-5}$ to $10^{-2}$ . Soft threshold weight parametrization (STR): this is the $L_{1}$ -based state-of-the-art neural network compression method. It serves as the main baseline of the proposed method because (1) it admits a direct interpretation as an $L_{1}$ approximate (but not exact), and (2) it uses a similar but nonequivalent reparametrization trick. Our results for L1 and STR are directly obtained using the implementation of (Kusupati et al., 2020). Magnitude pruning (magni.): this is a simple method recommended by (Gale et al., 2019) as a strong baseline that performs as well as the state-of-the-art methods in training a sparse network. Synflow: this method performs pruning at the beginning of training and is the state-of-the-art method for extreme compression rates. For example, with ResNet18 on CIFAR10/100, it is the only established benchmark that can prune beyond a 1000 compression ratio (Tanaka et al., 2020). We use the implementation of (Tanaka et al., 2020) to evaluate magnitude pruning and Synflow. For all baselines, we follow the hyperparameters recommended by (Kusupati et al., 2020) and (Tanaka et al., 2020), respectively. The comparison metric is the compression ratio, which is the total number of weights over the number of nonzero weights.
|
| 219 |
+
|
| 220 |
+
See the mid (CIFAR-10) and right panels (CIFAR-100). For both datasets, the training at $\kappa = 5e - 4$ recovers the standard performance of these models. For CIFAR10, the model can be pruned up to a 500 compression ratio while keeping an $>90\%$ accuracy. This is five times sparser than all the baselines for this performance level. For CIFAR100, the result is similar. The proposed method maintains a $>70\%$ accuracy while being an order of magnitude sparser than the previous methods.
|
| 221 |
+
|
| 222 |
+
To the extreme end, the proposed method keeps an above-
|
| 223 |
+
|
| 224 |
+

|
| 225 |
+
Figure 5: sped can be directly applied to standard pretrained models. The figure shows the top-1 test accuracy of ResNet50 on Imagenet at $80\%$ sparsity. Good and bad init. refers to initializing sped with two different pretrained models, with $80\%$ and 77 percent accuracy respectively. ft refers to finetuning after pruning. We see that with a good pretrained model, sped achieves the state-of-the-art result for the network compression task on Imagenet. Finetuning improves sped further.
|
| 226 |
+
|
| 227 |
+
chance accuracy even at a compression ratio of $10^{5}$ for both datasets, with a performance much better than Synflow, the best-known method at an extreme compression ratio. We also note that both STR and magnitude pruning has difficulty in extreme compression regime. The magnitude pruning method drops to chance-level accuracy at a compression ratio of 10, while STR cannot run above the 1000 compression ratio. Notably, our method has the implementation and training advantage over many existing methods in deep learning. One popular trick in network pruning is to iteratively retrain the model, having obtained a pruning mask, whereas the proposed method does not require iterative retraining.
|
| 228 |
+
|
| 229 |
+
# 4.4. Compressing Pretrained Models
|
| 230 |
+
|
| 231 |
+
The training can be prohibitively expensive for larger tasks such as Imagenet and even larger tasks such as large language models. The important question is, therefore, whether we can perform efficient compression while leveraging the existing pretrained models. This experiment shows that spred can be applied to existing pretrained models to achieve state-of-the-art network compression performance. For every pretrained weight matrix $\bar{V}_{ij}$ , the weight $W_{ij}$ and the redundant weight $U_{ij}$ are initialized by
|
| 232 |
+
|
| 233 |
+
$$
|
| 234 |
+
W _ {i j} = \operatorname {s g n} \left(\bar {V} _ {i j}\right) \sqrt {\left| \bar {V} _ {i j} \right|}, \quad U _ {i j} = \sqrt {\left| \bar {V} _ {i j} \right|}. \tag {9}
|
| 235 |
+
$$
|
| 236 |
+
|
| 237 |
+
The initialized model is then optimized by spred. After the spred training, the resulting weights $V_{ij} = U_{ij}W_{ij}$ are pruned towards a target sparsity to obtain the sparsed one $\hat{V}_{ij}$ . The performance of spred pruning weights $\hat{V}$ can be further improved by finetuning the model without spred while setting the redundant weight as a boolean mask, where
|
| 238 |
+
|
| 239 |
+
$$
|
| 240 |
+
W _ {i j} = \hat {V} _ {i j}, \quad U _ {i j} = 1 _ {\hat {V} _ {i j} > 0}. \tag {10}
|
| 241 |
+
$$
|
| 242 |
+
|
| 243 |
+
The performances of spred before and after finetuning are shown in Figure 5. The spred $\kappa$ is selected from $\{1e - 5,2e-$ $5,3e - 5,1e - 4\}$ and $2e - 5$ is found to be the most suitable for $80\%$ sparsity. We see that the performance of spred with proper dense initialization outperforms previous baselines such as STR (Kusupati et al., 2020), magnitude (Gale et al., 2019), and DNW (Wortsman et al., 2019) and achieves the state-of-the-art performance for Imagenet.
|
| 244 |
+
|
| 245 |
+
Our result thus promotes using the $L_{1}$ penalty in deep learning. Interestingly, the higher the $\kappa$ , the more suited the trained model becomes for more aggressive pruning. $\kappa$ is thus a parameter worth finetuning to achieve the best sparsity-performance tradeoff. We also tried using the thresholds of the trained model as a mask, which we apply to a model at initialization, and a similar performance to the finetuned model is obtained. Our result thus supports the lottery ticket hypothesis and can be an alternative method for obtaining a lottery ticket. At a conceptual level, we have demonstrated this: $L_{1}$ can indeed work in the context of deep learning if we have an efficient way to optimize it.
|
| 246 |
+
|
| 247 |
+
# 4.5. Memory Cost
|
| 248 |
+
|
| 249 |
+
One might worry that using spred will tend to double the memory cost of training. Our experiment shows that this is not true because the dominant factor of memory cost in training is minibatch size. At minibatch size 1, spred roughly doubles the memory cost of training. However, when the minibatch size is above 50, the memory cost of spred is of no observable difference from that of a standard network. See Appendix A.6. For the same setting, we note that the time it takes for every training epoch is also only negligibly more than standard training by roughly $5\%$ .
|
| 250 |
+
|
| 251 |
+
# 5. Discussion
|
| 252 |
+
|
| 253 |
+
In this work, we have thoroughly studied the landscape of a reparametrization trick that can be used to minimize a general nonconvex objective with an $L_{1}$ penalty. While the origin of the method itself is difficult to trace, we are the first to thoroughly investigate its theoretical influence on the loss landscape and to demonstrate how to apply it to deep learning. Our theory directly suggests that even in the case of highly complicated nonconvex landscapes, one may be able to optimize such a loss landscape highly efficiently with gradient descent. Our empirical result, in turn, demonstrates that $L_{1}$ penalty can help solve deep learning-related tasks very effectively. For all problems we approached, we have applied spred in a straightforward way, and developing more sophisticated training methods for spred is certainly one promising future direction.
|
| 254 |
+
|
| 255 |
+
# References
|
| 256 |
+
|
| 257 |
+
Beck, A. and Teboulle, M. (2009). A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM journal on imaging sciences, 2(1):183-202.
|
| 258 |
+
Blalock, D., Gonzalez Ortiz, J. J., Frankle, J., and Guttag, J. (2020). What is the state of neural network pruning? Proceedings of machine learning and systems, 2:129-146.
|
| 259 |
+
Candes, E. J., Wakin, M. B., and Boyd, S. P. (2008). Enhancing sparsity by reweighted 11 minimization. Journal of Fourier analysis and applications, 14(5):877-905.
|
| 260 |
+
Cawley, G., Talbot, N., and Girolami, M. (2006). Sparse multinomial logistic regression via bayesian 11 regularisation. Advances in neural information processing systems, 19.
|
| 261 |
+
Donoho, D. L. (2006). Compressed sensing. IEEE Transactions on information theory, 52(4):1289-1306.
|
| 262 |
+
Du, S. S., Jin, C., Lee, J. D., Jordan, M. I., Singh, A., and Poczos, B. (2017). Gradient descent can take exponential time to escape saddle points. Advances in neural information processing systems, 30.
|
| 263 |
+
Efron, B., Hastie, T., Johnstone, I., and Tibshirani, R. (2004). Least angle regression. The Annals of statistics, 32(2):407-499.
|
| 264 |
+
Friedman, J., Hastie, T., and Tibshirani, R. (2010). Regularization paths for generalized linear models via coordinate descent. Journal of statistical software, 33(1):1.
|
| 265 |
+
Gale, T., Olsen, E., and Hooker, S. (2019). The state of sparsity in deep neural networks. arXiv preprint arXiv:1902.09574.
|
| 266 |
+
Grandvalet, Y. (1998). Least absolute shrinkage is equivalent to quadratic penalization. In International Conference on Artificial Neural Networks, pages 201-206. Springer.
|
| 267 |
+
Han, S., Mao, H., and Dally, W. J. (2015). Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149.
|
| 268 |
+
Hoff, P. D. (2017). Lasso, fractional norm and structured sparse estimation using a hadamard product parametrization. Computational Statistics & Data Analysis, 115:186-198.
|
| 269 |
+
Jin, C., Ge, R., Netrapalli, P., Kakade, S. M., and Jordan, M. I. (2017). How to escape saddle points efficiently. In International Conference on Machine Learning, pages 1724-1732. PMLR.
|
| 270 |
+
|
| 271 |
+
Kimbung, S., Kovács, A., Bendahl, P.-O., Malmström, P., Fernö, M., Hatschek, T., and Hedenfalk, I. (2014). Claudin-2 is an independent negative prognostic factor in breast cancer and specifically predicts early liver recurrences. Molecular oncology, 8(1):119-128.
|
| 272 |
+
Krakovska, O., Christie, G., Sixsmith, A., Ester, M., and Moreno, S. (2019). Performance comparison of linear and non-linear feature selection methods for the analysis of large survey datasets. Plos one, 14(3):e0213584.
|
| 273 |
+
Kusupati, A., Ramanujan, V., Somani, R., Wortsman, M., Jain, P., Kakade, S., and Farhadi, A. (2020). Soft threshold weight reparameterization for learnable sparsity. In International Conference on Machine Learning, pages 5544-5555. PMLR.
|
| 274 |
+
LaBreche, H. G., Nevins, J. R., and Huang, E. (2011). Integrating factor analysis and a transgenic mouse model to reveal a peripheral blood predictor of breast tumors. BMC medical genomics, 4(1):1-14.
|
| 275 |
+
LeCun, Y., Denker, J., and Solla, S. (1989). Optimal brain damage. Advances in neural information processing systems, 2.
|
| 276 |
+
Montesinos-Lopez, O. A., Montesinos-Lopez, A., Pérez-Rodríguez, P., Barrón-López, J. A., Martini, J. W., Fajardo-Flores, S. B., Gaytan-Lugo, L. S., Santana-Mancilla, P. C., and Crossa, J. (2021). A review of deep learning applications for genomic selection. BMC genomics, 22(1):1-23.
|
| 277 |
+
Noble, C. L., Abbas, A. R., Cornelius, J., Lees, C. W., Ho, G.-T., Toy, K., Modrusan, Z., Pal, N., Zhong, F., Chalasani, S., et al. (2008). Regional variation in gene expression in the healthy colon is dysregulated in ulcerative colitis. Gut, 57(10):1398-1405.
|
| 278 |
+
Phillips, H. S., Kharbanda, S., Chen, R., Forrest, W. F., Soriano, R. H., Wu, T. D., Misra, A., Nigro, J. M., Colman, H., Sor Oceanu, L., et al. (2006). Molecular subclasses of high-grade glioma predict prognosis, delineate a pattern of disease progression, and resemble stages in neurogenesis. Cancer cell, 9(3):157-173.
|
| 279 |
+
Poon, C. and Peyre, G. (2021). Smooth bilevel programming for sparse regularization. Advances in Neural Information Processing Systems, 34:1543-1555.
|
| 280 |
+
Poon, C. and Peyré, G. (2022). Smooth over-parameterized solvers for non-smooth structured optimization. arXiv preprint arXiv:2205.01385.
|
| 281 |
+
Prat, A., Bianchini, G., Thomas, M., Belousov, A., Cheang, M. C., Koehler, A., Gomez, P., Semiglazov, V., Eiermann, W., Tjulandin, S., et al. (2014). based pam50 subtype predictor identifies higher responses and improved survival
|
| 282 |
+
|
| 283 |
+
outcomes in her2-positive breast cancer in the noah study. Clinical Cancer Research, 20(2):511-521.
|
| 284 |
+
Santosa, F. and Symes, W. W. (1986). Linear inversion of band-limited reflection seismograms. SIAM Journal on Scientific and Statistical Computing, 7(4):1307-1330.
|
| 285 |
+
Scardapane, S., Comminiello, D., Hussain, A., and Uncini, A. (2017). Group sparse regularization for deep neural networks. Neurocomputing, 241:81-89.
|
| 286 |
+
Shevade, S. K. and Keerthi, S. S. (2003). A simple and efficient algorithm for gene selection using sparse logistic regression. *Bioinformatics*, 19(17):2246-2253.
|
| 287 |
+
Sun, Y., Yao, J., and Goodison, S. (2015). Feature selection for nonlinear regression and its application to cancer research. In Proceedings of the 2015 SIAM International Conference on Data Mining, pages 73-81. SIAM.
|
| 288 |
+
Tanaka, H., Kunin, D., Yamins, D. L., and Ganguli, S. (2020). Pruning neural networks without any data by iteratively conserving synaptic flow. Advances in Neural Information Processing Systems, 33:6377-6389.
|
| 289 |
+
Tibshirani, R. (1996). Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society: Series B (Methodological), 58(1):267-288.
|
| 290 |
+
Wasserman, L. (2013). All of statistics: a concise course in statistical inference. Springer Science & Business Media.
|
| 291 |
+
Wortsman, M., Farhadi, A., and Rastegari, M. (2019). Discovering neural wireings. Advances in Neural Information Processing Systems, 32.
|
| 292 |
+
Yamada, M., Jitkrittum, W., Sigal, L., Xing, E. P., and Sugiyama, M. (2014). High-dimensional feature selection by feature-wise kernelized lasso. Neural computation, 26(1):185-207.
|
| 293 |
+
Ziyin, L., Li, B., Simon, J. B., and Ueda, M. (2021). Sgd can converge to local maxima. In International Conference on Learning Representations.
|
| 294 |
+
|
| 295 |
+

|
| 296 |
+
Figure 6: The training trajectory of L1 (GD on the vanilla lasso objective) and spred when $\alpha \approx 0.3$ (left) and $\alpha \approx 2.3$ (right)
|
| 297 |
+
|
| 298 |
+

|
| 299 |
+
|
| 300 |
+

|
| 301 |
+
|
| 302 |
+

|
| 303 |
+
Figure 7: Performance of spred across different values of $\alpha$ . From upper left to lower right: $\alpha = 2, 3, 4, 5$ . The main text contains the case when $\alpha = 1$ .
|
| 304 |
+
|
| 305 |
+
# A. Experimental Concerns
|
| 306 |
+
|
| 307 |
+
# A.1. Convergence of SGD on spred Lasso
|
| 308 |
+
|
| 309 |
+
When using Spred, one can speed up training is to set a threshold below which we set the parameter to zero at the stopping point. We test two levels of threshold, and both agree with the optimal solution at convergence. Figure 6 presents the training trajectory under different value of $\alpha$ , and we see that they converge to the same value at roughly the same time scale. This can be used as a criterion for assessing the convergence of spred.
|
| 310 |
+
|
| 311 |
+
# A.2. spred linear regression for different regularization strengths
|
| 312 |
+
|
| 313 |
+
Now, we compare the optimization efficiency of spred with the coordinate descent and LARS solutions of lasso under different input and output dimensions. The coordinated descent solution of lasso is denoted as Lasso. The Least Angle Regression of lasso is denoted by LARS. See Figure 7. For spred, we report the time when the zero rates of the solution matrix hit $75\%$ , $90\%$ , and $100\%$ of the zero rates of the converged solution. We note that there is no discernible difference in the training loss with the lasso objective for all three rates. As the plots show, the optimization speed of spred compares rather favorably against the standard methods at a large data dimension.
|
| 314 |
+
|
| 315 |
+

|
| 316 |
+
Figure 8: Normalized parameter distribution of the three largest convolutional layers of ResNet18 trained on CIFAR10 with SGD. The blue histogram shows the distribution of a normal ResNet18 with weight decay strength $5 \times 10^{-4}$ , which is very dense. The orange shows the distribution of a spred ResNet18 (also with $5 \times 10^{-4}$ weight decay), which exhibits a predominant peak at zero that includes more than $99.9\%$ of all the weight parameters of the layer. This shows that training with a very small value of regularization with spred already leads to a parameter distribution that favors sparsity.
|
| 317 |
+
|
| 318 |
+

|
| 319 |
+
|
| 320 |
+

|
| 321 |
+
|
| 322 |
+
Table 2: Basic statistics of seven gene datasets.
|
| 323 |
+
|
| 324 |
+
<table><tr><td>Dataset</td><td>#features</td><td>#labels</td><td>#samples</td><td>#samples
|
| 325 |
+
#features</td></tr><tr><td>GDS1815 (Phillips et al., 2006)</td><td>22283</td><td>15</td><td>400</td><td>1.79%</td></tr><tr><td>GDS1816 (Phillips et al., 2006)</td><td>22645</td><td>15</td><td>400</td><td>1.77%</td></tr><tr><td>GDS3268 (Noble et al., 2008)</td><td>44290</td><td>8</td><td>606</td><td>1.37%</td></tr><tr><td>GDS3952 (LaBreche et al., 2011)</td><td>54675</td><td>8</td><td>324</td><td>0.59%</td></tr><tr><td>GDS4761 (Kimbung et al., 2014)</td><td>52378</td><td>7</td><td>91</td><td>0.17%</td></tr><tr><td>GDS5027 (Prat et al., 2014)</td><td>54675</td><td>6</td><td>468</td><td>0.86%</td></tr></table>
|
| 326 |
+
|
| 327 |
+
# A.3. Weight Distribution of a Trained ResNet
|
| 328 |
+
|
| 329 |
+
We show more results on the weight distribution of a trained ResNet18, with roughly 11M parameters in total. We plot the parameter distribution of the three largest convolutional layers, each with roughly 2.3M parameters. See Figure 8.
|
| 330 |
+
|
| 331 |
+
# A.4. Detailed Description of the Feature Selection Task
|
| 332 |
+
|
| 333 |
+
See Table 2 for the statistics of the datasets. The datasets are taken from the public datasets of Gene Expression Omnibus.5 The indices of the datasets are the same as the indices on GEO.
|
| 334 |
+
|
| 335 |
+

|
| 336 |
+
Figure 9: Pareto frontier of spred for CIFAR10 and CIFAR100.
|
| 337 |
+
|
| 338 |
+

|
| 339 |
+
|
| 340 |
+

|
| 341 |
+
Figure 10: The memory cost of spred is negligible at common batch sizes for Imagenet. Training with batch size 1, spred doubles the memory cost of training. However, the relative cost overhead diminishes to zero when the batch size is of order $10^{2}$ . Left: ResNet50. Right: MobileNetV1.
|
| 342 |
+
|
| 343 |
+

|
| 344 |
+
|
| 345 |
+
# A.5. Estimating the Pareto Frontier for Network Compression
|
| 346 |
+
|
| 347 |
+
See Figure 9. The grey dashed line shows the estimated pareto frontier with a tanh function.
|
| 348 |
+
|
| 349 |
+
# A.6. Memory Cost
|
| 350 |
+
|
| 351 |
+
In this section, we compare the memory cost of spred with standard training on two different architectures. See Figure 10.
|
| 352 |
+
|
| 353 |
+
# B. Proof
|
| 354 |
+
|
| 355 |
+
# B.1. Proof of Theorem 1
|
| 356 |
+
|
| 357 |
+
For notational conciseness, we prove the case when $\alpha = \beta = \kappa$ . The case $\alpha \neq \beta$ can be reduced to this simpler case if we redefine both $U$ and $W$ by a constant scaling. We first prove a lemma.
|
| 358 |
+
|
| 359 |
+
Lemma 1. For all $i$ , any local minimum of Eq. (2) satisfies
|
| 360 |
+
|
| 361 |
+
$$
|
| 362 |
+
\left| U _ {i} \right| = \left| W _ {i} \right|. \tag {11}
|
| 363 |
+
$$
|
| 364 |
+
|
| 365 |
+
Proof. We prove by contradiction. Suppose not. Then there exists $U'$ , $W'$ and index $i$ such that $|U_i| \neq |W_i|$ and they are a local minimum of $L(U' \odot W') + L_2$ reg, where
|
| 366 |
+
|
| 367 |
+
$$
|
| 368 |
+
L _ {2} \operatorname {r e g .} = \kappa \left(\left\| U \right\| _ {2} ^ {2} + \left\| W \right\| _ {2} ^ {2}\right). \tag {12}
|
| 369 |
+
$$
|
| 370 |
+
|
| 371 |
+
Now, we consider an infinitesimal perturbation of the solution such that $U_{i} = U_{i}^{\prime}(1 + dz)$ and $W_{i} = W_{i}^{\prime}(1 - dz)$ . It is straightforward to see that, by the definition of element-wise multiplication,
|
| 372 |
+
|
| 373 |
+
$$
|
| 374 |
+
L \left(U ^ {\prime} \odot W ^ {\prime}\right) = L (U \odot W). \tag {13}
|
| 375 |
+
$$
|
| 376 |
+
|
| 377 |
+
Without loss of generality, we assume $|U_i| < |W_i|$ . Now, because $U_i < W_i$ , the $L_2$ reg. term strictly reduces:
|
| 378 |
+
|
| 379 |
+
$$
|
| 380 |
+
U _ {i} ^ {\prime 2} (1 + 2 d z) + W _ {i} ^ {\prime 2} (1 - 2 d z) - U _ {i} ^ {2} - W _ {i} ^ {2} = 2 \left(U _ {i} ^ {\prime 2} - W _ {i} ^ {\prime 2}\right) d z < 0. \tag {14}
|
| 381 |
+
$$
|
| 382 |
+
|
| 383 |
+
This means that $U_{i}$ and $W_{i}$ cannot be a local minimum. The proof is complete.
|
| 384 |
+
|
| 385 |
+
The above lemma implies that to find the global minimum of Eq. (2), it suffices to minimize over the solutions such that $\left|W_i\right| = \left|U_i\right|$ for all $i$ . The following lemma shows that the two loss functions are identical if we restrict to the domain where $\left|W_i\right| = \left|U_i\right|$ .
|
| 386 |
+
|
| 387 |
+
Lemma 2. Let $W \odot U = V$ and $|W_i| = |U_i|$ for all $i$ . Then,
|
| 388 |
+
|
| 389 |
+
$$
|
| 390 |
+
L _ {r s} (W, U) = L _ {L 1} (V). \tag {15}
|
| 391 |
+
$$
|
| 392 |
+
|
| 393 |
+
Proof. When $|W_i| = |U_i|$ ,
|
| 394 |
+
|
| 395 |
+
$$
|
| 396 |
+
\begin{array}{l} L _ {r s} = L (U \odot W) + \kappa \left(\sum_ {i} U _ {i} ^ {2} + W _ {i} ^ {2}\right) (16) \\ = L (U \odot W) + \kappa \left(\sum_ {i} 2 \left| U _ {i} W _ {i} \right|\right) (17) \\ = L (U \odot W) + 2 \kappa \| U \odot W \| _ {1}. (18) \\ \end{array}
|
| 397 |
+
$$
|
| 398 |
+
|
| 399 |
+
By definition, $U \odot W = V$ , and so this loss is, in turn, equivalent to the following loss:
|
| 400 |
+
|
| 401 |
+
$$
|
| 402 |
+
L (V) + 2 \kappa \| V \| _ {1}. \tag {19}
|
| 403 |
+
$$
|
| 404 |
+
|
| 405 |
+
This finishes the proof. $\square$
|
| 406 |
+
|
| 407 |
+
Now, we are ready to prove the main theorem. To repeat, the main theorem states the following (when $\alpha = \beta$ ).
|
| 408 |
+
|
| 409 |
+
Theorem 5. Let $\alpha \beta = \kappa^2$ and
|
| 410 |
+
|
| 411 |
+
$$
|
| 412 |
+
L _ {s r} (U, W, V _ {d}) := L (U \odot W, V _ {d}) + \alpha \| U \| ^ {2} + \beta \| W \| ^ {2}. \tag {20}
|
| 413 |
+
$$
|
| 414 |
+
|
| 415 |
+
Then, $(U,W,V_d)$ is a global minimum of Eq. (2) if and only if (a) $|U_i| = |W_i|$ for all $i$ and (b) $(U\odot W,V_d)$ is a global minimum of Eq. (1).
|
| 416 |
+
|
| 417 |
+
Proof. The theorem immediately follows from the combination of the previous two lemmas. $\square$
|
| 418 |
+
|
| 419 |
+
# B.2. Proof of Theorem 2
|
| 420 |
+
|
| 421 |
+
To repeat, the theorem states the following.
|
| 422 |
+
|
| 423 |
+
Theorem 6. All stationary points of Eq. (2) satisfy $|U_i| = |W_i|$ . Additionally, $(U, W)$ is a local minimum of Eq. (2) if and only if (a) $V = U \odot W$ is a local minimum of Eq. (1) and (b) $|U_i| = |W_i|$ .
|
| 424 |
+
|
| 425 |
+
Proof. We first prove the statement regarding the local minima. For both directions, we prove by contradiction. The forward direction is much easier to prove. Let $(U,W)$ be a local minimum of $L_{sr}$ and suppose $V$ is not a local minimum of $L_{L1}(V)$ . Then, one can infinitesimally perturb $V$ such that $V + dz$ has a smaller loss. This corresponds to a perturbation in $U$ and $W$ under the constraint $|U_i| = |W_i|$ . By Lemma 2, $L_{rs}$ under this perturbation is also smaller than the unperturbed value. Thus, $(U,W)$ is not a local minimum - a contradiction.
|
| 426 |
+
|
| 427 |
+
We now consider the backward direction. Let $V$ be a local minimum of $L_{L1}$ and suppose $(U, W)$ is not a local minimum of $L_{rs}$ . As Lemma 2 shows, if we restrict to the subspace where $|U_i| = |W_i|$ , there cannot be a perturbation that leads to a lower loss value because in this subspace, $L_{rs}$ is equivalent to $L_{L1}$ . Thus, that $(U, W)$ is not a local minimum implies that there exists perturbation $dz_U$ and $dz_W$ such that $(U + dz_U, W + dz_W)$ has a smaller loss value than $(U, W)$ . The loss function value is
|
| 428 |
+
|
| 429 |
+
$$
|
| 430 |
+
L \left(\left(U + d z _ {U}\right) \odot \left(W + d z _ {W}\right)\right) + \kappa \left(\left\| U + d z _ {U} \right\| _ {2} ^ {2} + \left\| W + d z _ {W} \right\| ^ {2}\right) < L _ {r s} (U \odot W) \tag {21}
|
| 431 |
+
$$
|
| 432 |
+
|
| 433 |
+
such that $|(W + dz_W)_i| \neq |(U + dz_U)_i|$ . Now, we can construct a new parameter $U' = \operatorname{sgn}(U + dz_U) \sqrt{|(U + dz_U) \odot (W + dz_W)|}$ , $W' = \operatorname{sgn}(W + dz_W) \sqrt{|(U + dz_U) \odot (W + dz_W)|}$ . This transformation is also infinitesimal and leaves the $L$ term unchanged. However, it strictly decreases the $L_2$ term
|
| 434 |
+
|
| 435 |
+
$$
|
| 436 |
+
\left\| U ^ {\prime} \right\| ^ {2} + \left\| W ^ {\prime} \right\| ^ {2} = 2 \left| (U + d z _ {U}) \odot (W + d z _ {W}) \right| ^ {2} < \left\| U + d z _ {U} \right\| _ {2} ^ {2} + \left\| W + d z _ {W} \right\| ^ {2}. \tag {22}
|
| 437 |
+
$$
|
| 438 |
+
|
| 439 |
+
Thus, we have constructed a model such that $|U_i'| = |W_i'|$ for all $i$ , and with a strictly smaller loss. By Lemma 2, this implies that $V$ is not a local minimum of $L_{L1}$ . This is a contradiction.
|
| 440 |
+
|
| 441 |
+
Now we prove the statement regarding all the stationary points. Since we have proved Lemma 1, it is sufficient to only prove the condition for all saddles points. We show that when $|U_i| \neq |W_i|$ the variation of Eq. (2) has a nonvanishing first-order variation if one varies $U$ and $W$ by a perturbative amount. Consider the following transformation of $U_i$ and $W_i$
|
| 442 |
+
|
| 443 |
+
$$
|
| 444 |
+
\left\{\begin{array}{l}U _ {i} \rightarrow U _ {i} + d z,\\W _ {i} \rightarrow W _ {i} - d z.\end{array}\right. \tag {23}
|
| 445 |
+
$$
|
| 446 |
+
|
| 447 |
+
To first order in $dz$ , $L$ remains unchanged, whereas the regularization term changes by
|
| 448 |
+
|
| 449 |
+
$$
|
| 450 |
+
2 \kappa d z \left(U _ {i} - W _ {i}\right). \tag {24}
|
| 451 |
+
$$
|
| 452 |
+
|
| 453 |
+
Because $|U_i| \neq |W_i|$ , this is a first order term in $dz$ and so $U_i, W_i$ cannot be a saddle. The proof is complete.
|
| 454 |
+
|
| 455 |
+
# B.3. Proof of Theorem 3
|
| 456 |
+
|
| 457 |
+
To repeat, the theorem statement is the following.
|
| 458 |
+
|
| 459 |
+
Theorem 7. Let $|U| = |W|$ , $V = U \odot W$ and $L$ be everywhere differentiable. Then, for every infinitesimal variation $\delta V$ ,
|
| 460 |
+
|
| 461 |
+
1. if $L_{L1}(V)$ is directionally differentiable in $\delta V$ , there exist variations $\delta W, \delta U \in \Theta(\delta V)$ such that $L_{L1}(V + \delta V) = L_{rs}(U + \delta U, W + \delta W)$ ;
|
| 462 |
+
2. if $L_{L1}(V)$ is not directionally differentiable in $\delta V$ , there exist variations $\delta W, \delta U \in \Theta((\delta V)^{0.5})$ such that $L_{L1}(V + \delta V) = L_{rs}(U + \delta U, W + \delta W)$ .
|
| 463 |
+
|
| 464 |
+
Proof. Because $L_{L1}(V) = L_{rs}(U,W)$ when $|U| = |W|$ , we have $L_{L1}(V + \delta V) = L_{rs}(U + \delta U, W + \delta W)$ as long as
|
| 465 |
+
|
| 466 |
+
$$
|
| 467 |
+
W \odot \delta U + U \odot \delta W + \delta U \odot \delta W = \delta V, \tag {25}
|
| 468 |
+
$$
|
| 469 |
+
|
| 470 |
+
provided that the constraint $|U + \delta U| = |W + \delta W|$ is satisfied. Let $K$ denote the set indices such that for all $i \in K$ , $V_i = 0$ . Because $L$ is differentiable, $L_1$ is directionally differentiable as long as $\delta V_i = 0$ for all $i \in K$ . This means that for all
|
| 471 |
+
|
| 472 |
+
$i \notin K$ , $|U_i| = |W_i| = \sqrt{|V|} \neq 0$ . In turn, this means that with an infinitesimal $\delta V$ , setting $\delta U_i = \delta V_i / 2W_i \in \Theta(\delta V)$ and $\delta W_i = \delta V_i / 2U_i \in \Theta(\delta V)$ achieves the desired variation:
|
| 473 |
+
|
| 474 |
+
$$
|
| 475 |
+
W \odot \delta U + U \odot \delta W = \delta V. \tag {26}
|
| 476 |
+
$$
|
| 477 |
+
|
| 478 |
+
One can easily check that the constraint is also satisfied. This proves the first part of the theorem.
|
| 479 |
+
|
| 480 |
+
For the second part, we first note that $L_{L1}$ is only directionally nondifferentiable in $\delta V$ if for some $i \in K$ , $\delta V_i \neq 0$ . Since $V_i = 0$ , we have $U_i = W_i = 0$ , and so for these indices Eq. (25) becomes
|
| 481 |
+
|
| 482 |
+
$$
|
| 483 |
+
\delta U _ {i} \delta W _ {i} = \delta V _ {i}. \tag {27}
|
| 484 |
+
$$
|
| 485 |
+
|
| 486 |
+
Because the variation must also satisfy $|\delta U_i| = \delta |W_i|$ , one solution is
|
| 487 |
+
|
| 488 |
+
$$
|
| 489 |
+
\left\{ \begin{array}{l} \delta U _ {i} = \sqrt {\left| \delta V _ {i} \right|}; \\ \delta W _ {i} = \operatorname {s g n} (V _ {i}) \sqrt {\left| \delta V _ {i} \right|}. \end{array} \right. \tag {28}
|
| 490 |
+
$$
|
| 491 |
+
|
| 492 |
+
For infinitesimal $\delta V, \Theta(\delta V^{0.5} + \delta V) = \Theta(\delta V^{0.5})$ . We thus have that $\delta U, \delta W \in \Theta(\delta V^{0.5})$ . This proves the second part of the theorem. $\square$
|
| 493 |
+
|
| 494 |
+
# B.4. Proof of Theorem 4
|
| 495 |
+
|
| 496 |
+
Theorem 8. Let $\alpha \beta = \kappa^2$ and
|
| 497 |
+
|
| 498 |
+
$$
|
| 499 |
+
L _ {s r} (u, W, V _ {d}) := L (u W, V _ {d}) + \alpha u ^ {2} + \beta \| W \| ^ {2}. \tag {29}
|
| 500 |
+
$$
|
| 501 |
+
|
| 502 |
+
Then, $(u,W,V_d)$ is a global minimum of Eq. (2) if and only if $(a)|u| = ||W||_2$ for all $i$ and $(b)(uW,V_d)$ is a global minimum of Eq. (1).
|
| 503 |
+
|
| 504 |
+
The proof is similar to that of Theorem 1, and we thus only give a proof sketch.
|
| 505 |
+
|
| 506 |
+
Proof Sketch. When $|u| = \| W\| _2$ , it is easy to check that the two loss functions agree in value. When $|u|\neq \| W\| _2$ , one can always find continuous transformation (rescaling $u$ and $W$ simultaneously) of $u$ and $W$ such that the loss function is strictly reduced, and these points cannot be local minima.
|
| 507 |
+
|
| 508 |
+
The proof also shows that every minimum of $L_{rs}$ corresponds to the local minimum in the original loss, consistent with Theorem 2. This result can be immediately generalized to the case of multi-group $L_{1}$ , where we want to apply $L_{1}$ (possibly with different strengths) to different groups. This can be proved by simply induction on the size of the set of groups and using Theorem 4.
|
spredsolvingl1penaltywithsgd/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d6b9e36471c4922be6755cf92c3ddd110cc4936f0990950a7c198384fa0e8354
|
| 3 |
+
size 678256
|
spredsolvingl1penaltywithsgd/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:981b68a11d68755a637369c365235a99fcf56ed0b2159aa7e3737a0ac8dd240b
|
| 3 |
+
size 757361
|