Q UANTIZED SPARSE PCA FOR NEURAL NETWORK WEIGHT COMPRESSION
Anonymous authors
Paper under double-blind review
A BSTRACT
In this paper, we introduce a novel method of weight compression.
In our method, we store weight tensors as sparse, quantized matrix factors, whose product is computed on the ﬂy during inference to generate the target model’s weight tensors.
The underlying matrix factorization problem can be considered as a quantized sparse PCA problem and solved through iterative projected gradient descent methods.
Seen as a uniﬁcation of weight SVD, vector quantization and sparse PCA, our method achieves or is on par with state-of-the-art trade-offs between accuracy and model size.
Our method is applicable to both moderate compression regime, unlike vector quantization, and extreme compression regime.
I NTRODUCTION
Deep neural networks have achieved state-of-the-art results in a wide variety of tasks.
However, deployment remains challenging due to their large compute and memory requirements.
Neural networks deployed on edge devices such as mobile or IoT devices are subject to stringent compute and memory constraints, while networks deployed in the cloud do not suffer such constraints but might suffer excessive latency or power consumption.
To reduce neural network memory and compute footprint, several approaches have been introduced in literature.
Methods related to our approach, as well as their beneﬁts and downsides, are brieﬂy introduced in this section and described in more detail in the related works section.
Tensor factorization approaches (Denil et al., 2013) replace a layer in a neural network with two layers, whose weights are low-rank factors of the original layer’s weight tensor.
This reduces the number of parameters and multiply-add operations (MACs), but since the factorizations are by design restricted to those that can be realized as individual layers, potential for compression is limited.
By pruning a neural network (Louizos et al., 2017; He et al., 2017), individual weights are removed.
Pruning has shown to yield moderate compression-accuracy trade-offs.
Due to the overhead required to keep track of which elements are pruned, real yield of (unstructured) pruning is lower than the pruning ratio.
An exception to this is structured pruning , in which entire neurons are removed from a network, and weight tensors can be adjusted accordingly.
However, achieving good compression ratios at reasonable accuracy using structured pruning has proven difﬁcult.
Scalar quantization (Jacob et al., 2018; Nagel et al., 2021) approximates neural network weights with ﬁxed-point values, i.e., integer values scaled by a ﬁxed ﬂoating point scalar.
Scalar quantization has shown to yield high accuracy at reasonable compression ratios, e.g., 8 bit quantization yields a 4x compression ratio and virtually no accuracy degradation on many networks.
However, scalar quantization does not yield competitive compression vs accuracy trade-offs at high compression ratios.
Vector quantization (Stock et al., 2019; Martinez et al., 2021) approximates small subsets of weights, e.g., individual 3 × 3 ﬁlters in convolutional weight tensors, by a small set of codes.
This way, the storage can be reduced by storing the codebook and one code index for each original vector, instead of the individual weights.
While vector quantization can achieve high compression with moderate accuracy loss, these methods usually struggle to reach the accuracy of uncompressed models in low compression regimes.
In this paper, we provide a novel view on tensor factorization.
Instead of restricting factorization to those that can be realized as two separate neural network layers, we show that much higher compression ratios can be achieved by shifting the order of operations.
In our method, we ﬁnd a factorization
C , Z for an original weight tensor W , such that the matrix product CZ closely approximates the
[Figure]
a aa bb c  cdd d
[Figure]
× [Figure] original weight tensor. The compression is then pushed further by obtaining quantized factors and additionally sparse Z .
During inference, the product CZ is computed ﬁrst, and its result is reshaped back into the original weight tensor’s shape, and used for the following computations.
This approach allows the use of an arbitrary factorization of the original weight tensor.
We show that this approach outperforms or is on par with vector quantization in high compression regimes, yet extends to scalar quantization levels of compression-accuracy trade-offs for lower compression ratios.
Our contributions in this paper are as follows:
• We show that the problem of tensor factorization and vector quantization can be formulated in a uniﬁed way as quantized sparse principle component analysis (PCA) problem.
• We propose an iterative projected gradient descent method to solve the quantized sparse PCA problem.
• Our experimental results demonstrate the beneﬁts of this approach.
By simultaneously solving tensor factorization and vector quantization problem, we can achieve better accuracy than vector quantization in low compression regimes, and higher compression ratios than scalar quantization approaches at moderate loss in accuracy.
R ELATED WORK
SVD-based methods and tensor decompositions
SVD decomposition was ﬁrst used to demonstrate redundacy in weight parameters in neural networks in Denil et al.
Later several methods for reducing the inference time based on SVD decomposition were suggested (Denton et al., 2014; Jaderberg et al., 2014).
A similar technique was proposed for gradients compression in dataparallel distributed optimization by Vogels et al.
The main difference between these methods is the way 4D weights of a convolutional layer is transformed into a matrix which leads to different shapes of the convolutional layers in the resulting decomposition.
Following a similar direction, several works focus on higher-order tensor decomposition methods which lead to introducing of three or four convolutional layers (Lebedev et al., 2014;
Kim et al., 2015; Su et al., 2018).
Weight pruning A straightforward approach to reducing neural network model size is removing a percentage of weights.
A spectrum of weight pruning approaches of different granularity has been introduced in the literature.
Structured pruning approaches such as He et al.
(2017) kill entire channels of the weights, while unstructured pruning approaches (Louizos et al., 2017; Zhu & Gupta, 2017; Neklyudov et al., 2017; Dai et al., 2018) focus on individual values.
A recent survey on unstructured pruning is provided in Gale et al.
Scalar quantization and mixed precision training By quantizing neural network weights to lower bitwidths, model footprint can be reduced as well, as each individual weight requires fewer bits to be stored.
For example, quantizing 32 bit ﬂoating points weight to 8 bit ﬁxed point weights yields a 4x compression ratio.
Most quantization approaches use the straight-through estimator (STE) for training quantized models (Bengio et al.
; Krishnamoorthi (2018)).
One way to further improve the accuracy of quantized models is learning the quantization scale and offset jointly with the network parameters (Esser et al.
; Bhalgat et al.
A recent survey on practical quantization approaches can be found in Nagel et al.
In order to improve the accuracy of quantized models, several methods suggest using mixed precision quantization.
The work by Uhlich et al.
(2019) introduced an approach on learning integer bit-width for each layer using STE.
Using non-uniform bit-width allows the quantization method to use lower bit-width for more compressible layers of the network.
Several works (van Baalen et al., 2020; Dong et al., 2019; Wang et al., 2019) improve upon the approach by Uhlich et al.
by using different methods for optimization over the bit-widths.
Vector quantization.
Several works use vector quantization approach for compression of weights of convolutional and fully connected layers (Gong et al.
; Martinez et al.
; Fan et al.
(2020); Stock et al.
; Wu et al.
The convolutional weight tensors are reshaped into matrices, then K-means methods is applied directly on the rows or columns.
Besides weight compression, the work by Wu et al.
(2016) suggests using vector quantization for reducing the inference time by reusing parts of the computation.
Recently several works suggested improvements on the basic vector quantization approach.
Dataaware vector quantization which improves the clustering method by considering input activation data is demonstrated to improve the accuracy of the compressed models by Stock et al.
Another direction is introducing a permutation to the weight matrices which allows to ﬁnd subsets of weights which are more compressible (Martinez et al., 2021).
An inverse permutation is applied at the output of the corresponding layers to preserve the original output of the model.
Besides weights compression problem, various improved vector quantization methods were applied in image retrieval domain in order to accelerate scalar product computation for image descriptors (Chen et al.
; Ge et al.
; Norouzi & Fleet (2013)).
In particular, additive quantization method which we will show is related to quantized sparse PCA was introduced Babenko & Lempitsky (2014).
Surveys on vector quantization methods are provided in Matsui et al.
Gersho & Gray (2012).
Sparse PCA.
Introduced in Zou et al.
(2006), sparse PCA can be solved by a plethora of algorithms.
The method proposed in this paper can be considered as an instance of thresholding algorithms (Ma, 2013).
Although soft-thresholding methods are prevalent in the literature, we adopt an explicit projection step using hard thresholding to have direct control over the compression ration.
Note that sparse PCA can be extended to include additional structures with sparsity (Jenatton et al., 2010; Lee et al., 2006).
M ETHOD
In this section, we describe the main algorithm, which can be considered as sparse quantized principle component analysis (PCA).
3. Q UANTIZED S PARSE PCA
Consider a weight tensor of a convolutional layer W ∈ R f out × f in × h × w , where f in , f
out are the number of input and output feature maps, and h , w are the spatial dimensions of the ﬁlter.
We reshape it into a matrix (cid:102) W ∈ R d × n , where d is the tile size and n is the number of tiles.
For the reshape, we consider the dimensions in the order f out , f in , h, w in our experiments.
The goal is to factorize (cid:102) W into the product of two matrices as follows:
[Equation]
where C ∈ R d × k is the codebook, and Z ∈ R k × n is the set of linear coefﬁcients, or a latent variable ( k < d < n ).
Following the standard PCA method, we factorize the zero mean version of (cid:102) W .
With this decomposition, every column of (cid:102) W , denoted by (cid:102) W : ,i , is a linear combination of k codebook vectors (columns of C ) :
[Equation]
where C : ,j is the j -th column of C .
This decomposition problem is an instance of sparse PCA methods (Zou et al.
For network compression, we are additionally interested in quantized matrices C and Z .
The quantization operation for an arbitrary C and Z is deﬁned as follows:
[Equation]
where b c , b z are the quantization bit-widths, and s c and s z are the quantization scale vectors for C and Z , respectively.
We consider per-channel quantization, i.e., the quantization scale values are shared for each column of C and each row or column of Z (see section 3.2 for details on which is used when):
[Equation]
where (cid:98)·(cid:101) is rounding to nearest integer, and clamp ( · ) is deﬁned as:
[Equation]
We refer to the problem of ﬁnding quantized factors C and Z with sparse Z as quantized sparse PCA problem.
Once we obtain the factors C and Z , we get the matrix (cid:102) W =
( CZ ) , which can be reshaped back to a convolutional layer.
The reshaped convolutional layer for factors C , Z is denoted by [ CZ ] .
It is well known in network compression literature that it is better to ﬁnd the best factorization on the data manifold (Zhang et al.
; He et al.
(2017); Stock et al.
Therefore, we solve the following optimization problem:
[Equation]
where the parameter S controls the sparsity ratio of Z , X and Y are the stored input output of the target layer in the original model, D is the data distribution, and ∗ is the convolution operation.
Lnorm is used for the constraint on the number of nonzero elements in the matrix Z q .
We approximate the expected value of above optimization problem using a subset of the training data:
[Equation]
where m is the number of samples used for optimization.
Following the compression method introduced in Zhang et al.
, we use output of the previous compressed layer as X instead of the stored input to the layer in the original model.
This approach aims at compensating for the error accumulation in deep networks.
3.1. P ROJECTED G RADIENT D ESCENT O PTIMIZATION A LGORITHM
The above optimization problem can be solved using an iterative projected gradient descent method.
The projection step is a hard thresholding operation which project onto the space of sparse matrices.
The optimization algorithm is given below. Algorithm
Require: (cid:102) W 1: SVD of (cid:102) W = UΣV (cid:62) , 2: C ← U k 3: Z ← U (cid:62) k (cid:102) W 4: while Stopping criteria not met do 5:
Gradient descent step: C , Z ← gradient descent update on equation (10).
M ← binary mask for largest S values of Q z ( Z ; s z , b Z ) .
Hard thresholding step: Z ← Z (cid:12) M .
8: end while 9: return: Q c ( C ; s c , b C ) , Q z ( Z ; s z , b Z ) .
Initialization.
The codebook C is initialized with ﬁrst k left singular vectors of (cid:102) W .
Given the SVD decomposition of (cid:102) W as follows:
[Equation]
we choose C (0)
=
U k , where U k denotes the top k left singular vectors of (cid:102) W .
The latent matrix Z is initialized as the projection of (cid:102) W onto the set of ﬁrst k singular vectors,
Z (0) =
U (cid:62) k
(cid:102) W .
Gradient Descent.
At iteration t , the matrices C ( t − 1) , Z ( t − 1) are updated by gradient descent on the following objective w.r.t.
C and Z :
[Equation]
We use the straight through estimator (STE) (Bengio et al.
to compute the gradients of the quantization operation, i.e. we use the following gradient estimate for the rounding operation: [Equation]
The outcome of this step
is denoted by C ( t ) gd , Z ( t ) gd .
Hard thresholding.
After the gradient descent, we project Z ( t ) gd onto the space of sparse matrices.
The projection is done using entrywise product of Z ( t ) gd with a binary mask matrix M ( t ) , namely Z ( t ) gd (cid:12) M ( t ) .
The mask matrix M ( t ) is obtained ﬁnding the support of S largest entries of Q z ( Z ( t ) gd ; s z , b Z ) .
This is the hard thresholding step.
For the next iteration we set:
[Equation]
Repeat the previous three steps using Z ( t ) , C ( t ) until termination criteria is met.
The ﬁnal matrices are given be Q c ( C ( t ) ; s c , b C ) ,
Q z ( Z ( t ) ; s z , b Z ) .
The termination criteria can be either based on MSE error on a subset of data or a simple bound on the iteration number.
This iterative projection step has theoretical support for well behaved optimization problems.
See
Appendix A for more details.
3.1. R ELATION TO OTHER APPROACHES
In this section, we discuss the connection with other existing methods.
(A) Vector quantization.
If we replace the quantizers for C and Z by identity functions,
i
e. Q c = id ( · ) , Q z = id ( · ) , then matrix C is in full precision, while Z encodes the indices such that
[Equation]
where m i is the centroid index corresponding to tile i .
(B) Additive vector quantization.
If Q c = id ( · ) , b z
=
1 (binary quantization), then
[Equation]
where ρ ji ∈ { 0 , 1 } are binary coefﬁcients.
Note that in the original work by Babenko & Lempitsky (2014), an additional constraint of (cid:80)
j ρ ji = n t is enforced, i.e. each W i, : is a sum of a ﬁxed number of terms.
(C) Principle component analysis.
If Q c = id ( · ) , and Q z = id ( · ) , then
[Equation]
This case corresponds to SVD factorization of zero mean version of weight matrix (cid:102) W .
For speciﬁc values of n and d , the method is mathematically equivalent to the SVD decomposition methods for neural network compression (Denton et al.
; Jaderberg et al.
For example, if n = f out h , and d = f in w , then the method is equivalent to the spatial SVD decomposition by Jaderberg et al.
In contrast to the above-mentioned approaches, we do not decompose the convolutional operation into two convolutional layers, which gives extra ﬂexibility in the choice of PCA dimensionality d .
3. C OMPRESSION RATIO
Without sparsity, the compression ratio is computed as follows.
Let L o ( W ) = f out × f in × h × w ×denote the number of bits required to represent the original 32 bit ﬂoating point tensor W , and
L c ( W ) =
d × k × b c + k × n × b z the size of the quantized tensor factors C and Z of W .
The compression ratio C r is then deﬁned as C r =
L o ( W )
L c ( W ) .
Note that, since k < d < n , the latent matrix
Z contributes more to the resulting model size than the codebook matrix C .
For example, let us assume f out = f in = 256 , h = w = 3 , d = 256 , and k = 128 .
In this scenario, the original weight tensor W has 256 × 256 × 3 × 3 = 589 ,elements, the codebook matrix C has
× 128 = 32 , 768 elements and the latent matrix Z has 128 × 2 , 034 = 260 , 356 elements, almost 8 times as many as C .
For this reason, efforts to compress
Z , e.g., by using a lower bitwidth b c or pruning elements, will likely yield a better accuracy vs compression trade-off than focusing similar efforts on C .
Additional compression is achieved by encoding the sparse matrix Z as follows.
We assume the sparsity mask M is stored as a binary matrix.
Then, we only store the nonzero values in Z .
At runtime, Z can be decoded by only reading values in Z for which the corresponding binary mask value is equal to 1 .
The total number of bits required to store M and the nonzero values in Z is k × n + (1 − r )
× k × n × b z , where r = 1 − S/kn is the sparsity ratio of Z with (cid:107) Z (cid:107)
= S .
Note that this method only reduces memory footprint if r > 1 /b z .
The size of the compressed tensor must be adjusted for quantization parameters introduced by perchannel quantization.
We assume that each quantization scale parameter is encoded using FP16.
To account for this we add a quantization adjustment term L q ( W ) to L c ( W ) , where L q = 2 k × 16 is used for per-row quantization of Z .
Finally, taking into account the adjustments for sparsity and quantization parameters, the size of a compressed tensor is computed as L c ( W ) =
d × k × b c + k × n + (1 − r ) × k × n × b z + L q ( W ) .
E XPERIMENTS
In this section we describe two sets of experiments: one set to explore the effect of compression hyperparameters on compression-accuracy trade-offs, and one set of experiments to compare against various baseline methods.
4. E XPERIMENTAL SETUP
In all our experiments we start from a pre-trained model.
The experimental details for each step in
Section 3 is described below.
Initial factorization We perform the factorization as described in Section 3.1.1.
We initialize the per-channel quantization scale using min-max quantization (Krishnamoorthi, 2018).
Per layer data-aware optimization To perform the data-aware optimization, we sample a single batch of 64 input and output activations for a layer.
We split the data into a training set and a validation set (we keep one eighth of the data as the validation set).
We keep track of the error on the validation set.
During this step we use the Adam optimizer (Kingma & Ba (2014)) with learning rate 10 − 4 and weight decay 10 − 5 .
Sparsiﬁcation Sparsiﬁcation is applied after per layer data-aware optimization in a form of hard thresholding.
We consider one-shot and iterative thresholding.
Speciﬁcally, for each layer, the quantized weights are sorted by absolute value, then a desired percentage of values is masked out.
We do not prune weights that become zeros after the quantization step, instead, we add extra sparsity on top of accidental sparsity that occurs after the quantization.
During the consequent ﬁne-tuning stage, the sparsity mask is frozen.
Fine-tuning We follow Martinez et al.
and ﬁne-tune our models end-to-end using the target training set.
Model-speciﬁc ﬁnetuning procedures are described below.
4.1. A NOTE ON COMPRESSION RATIO
In our experiments we leave the ﬁrst convolutional weight tensor, all bias tensors, all batch normalization parameters, and the PCA centering vectors in FP32.
We denote these uncompressible parameters as L u .
The sparsity ratio for a network is then computed as C r =
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
4. I MAGE N ET E XPERIMENTS
We evaluate our method on the ResNet18 achitecture for ImageNet classiﬁcation.
We apply our method on pretrained versions of the model, where we take the pretrained weights from the PyTorch model zoo.
In all our experiments we keep the tile size d constant at 256, the bitwidth of the codebook matrix C constant at 4, and use per-channel scalar quantization of 4 bits for the fully connected classiﬁcation layer weights.
To achieve different compression ratios we vary the rank k with values between 64-256, the bitwidth of the latent matrix Z between 3-6, and the extra sparsity of Z between 0% and 40%.
Further experimental details can be found in Section B.1.
4.2. B ASELINE METHODS
We compare our methods against scalar quantization by Esser et al.
binary CNNs by Lin et al.
(ABC-Net), the vector quantization method by Martinez et al.
(2021) (PQF), the vector quantization method by Stock et al.
(BGD)
, trained ternary quantization by Zhu et al.
(2016) (TTQ).
The results for scalar quantization are produced using LSQ Esser et al.
(2019), with 4,and 2-bit per-channel weight quantization and FP32 bit activations.
For these experiments a weight decay of 10 − 4 and cosine learning rate decay to 10 − 2 of the original learning rate was used.
4.2. R ESULTS
The Pareto dominating results of our method and comparison to the baselines can be found in Figure 2.
The full set of (non Pareto dominating) results can be found in Figure 3a.
The same results along with the values for rank, bitwidth and sparsity and resulting compression ratios can be found in
Table 2 in the Appendix.
In this ﬁgure we see that we outperform BGD, TTQ, ABC-Net and 3 andbit scalar quantization by considerable margins.
Furthermore, we outperform or match the strongest baseline at high compression ratios, PQF for compression ratios of 17x and higher, and are on par with 4-bit scalar quantization for compression ratios under 17x.
Lastly, we are the only method to achieve SOTA compression-accuracy trade-offs over the full range from 5x to 40x compression.
4. A BLATION STUDIES 4.3. H ARD THRESHOLDING METHODS
In this section, we study the impact of the hard thresholding method and the stopping criterion for data-aware optimization.
Algorithm 1 applies the hard-thresholding step at each iteration.
However,
[Figure]
we can also apply it only after the end of gradient descent iterations.
We call this one-shot hardthresholding.
The method has precedence in non-convex sparse optimization (Shen (2020)).
We consider two different stopping criteria.
The ﬁrst is using the ﬁxed number of gradient descent iterations, e.g., 30, 100, or 1000.
The second is based on achieving the MSE error threshold on the validation set.
We split the data used for per-layer optimization into a training set and a validation set.
We stop the iterations as soon as the error on the validation set is not decreasing for more than two iterations.
Finally, we compare both methods with one-shot hard-thresholding without data-aware optimization.
We present the results for Resnet18 in the Table 1.
Three different levels of sparsity are considered for a model with 4 bit latent.
We report the validation accuracy of the model before and after ﬁnetuning.
The results suggest that the most important aspect of data-aware optimization is the stopping criterion.
The best pre-ﬁnetuning results are obtained by using iterative hard thresholding with the least number of iterations, namely 30.
The second best method is one-shot iterative hard thresholding with the stopping criterion based on the validation set.
These results suggest that it is important to limit the number of iterations of per layer optimization in order to prevent the method from overﬁtting to the layer input and output data sample.
This intuition is further supported by observing the lowest pre-ﬁnetuning accuracy for hard thresholding with the highest number of iterations, namely 1000.
However, overall beneﬁts of per layer optimization methods become marginal after the compressed model is ﬁne-tuned.
In various experiments, we observed an 0.1-0.3% improvement in the validation accuracy compared to using one-shot hard thresholding without any data-aware optimization.
Therefore, in our further full model experiments, we used one-shot hard thresholding with the stopping criterion based on the validation set as a method of low computational complexity, which gives nearly the best results compared to the other methods.
4.3. Q UANTIZATION VS P RUNING VS R ANK
In our method, compression can be achieved by lowering rank, lowering the bit-width for latent matrices (hence referred to as ‘bit-width’), or increasing extra sparsity.
Thus, similar compression ratios can be achieved with different values for rank, bit-width and sparsity.
For example, for a given model, we can retain the same compression ratio by increasing rank and decreasing bit-width to compensate.
In this section we investigate whether we can discover patterns that would help guide compression hyperparameter search.
In Figure 3a we show a scatter plot with the full set of results. In this ﬁgure, we see that for low compression ratios (below 14x) only minor improvements can be achieved by tweaking compression hyperparameters.
For example, around 10x compression even the worst performing compression hyperparameters are still on par with quantization to 3 bits (10.67x compression).
However, for higher compression ratios the compression hyperparameters have a larger impact on model performance.
In Figure 3b we show the effect of rank, bit-width and sparsity ratios on a set of models with a low (near 11x, top row) and a high (near 25x, bottom row) compression ratio.
Again we see little effect (roughtly 0.5%) for the lower compression ratio.
However, for the more aggressively compressed
[Table]
Hard thresholdingmethod
Stopping
[Table]
critetion
[Table]
shot HT
[Table]
Iterative HT
[Table]
Iterative HT
[Table]
Iterative HT
[Table]
No data-aware opt.
[Table]
[Figure] [Figure]
[Figure]
models in the bottom row, we see that increasing rank while lowering bit-width to compensate has a strong positive effect on model performance.
Finally, in both plots we see no clearly discernible trend in the effect of compression ratio on model accuracy.
Based on these results we conclude that, at high compression ratios, increasing rank and decreasing bit-widths can improve results.
Sparsity can be used to further ﬁne-tune the target compression ratio.
C ONCLUSION
We presented a weight compression method based on quantized sparse PCA which uniﬁes SVDbased weight compression, sparse PCA, and vector quantization.
We tested our method on ImageNet classiﬁcation and show compression-accuracy trade-offs which are state-of-the-art or on par with strong baselines, and demonstrated that our method is the only method to achieve SOTA compression-accuracy trade-offs in both low and high compression regimes.
Lastly, we investigated whether low rank approximations, quantization, or sparsity yield the best efﬁciency-accuracy trade-offs, and found that at high compression ratios, increasing rank and decreasing bit-width can improve results.
For future work, we plan to investigate methods for automated rank, bit-width, and sparsity ratio selection in order to further improve the accuracy and reduce the hyper-parameter search time.
A H ARD T HRESHOLDING FOR S PARSE O PTIMIZATION
The sparse optimization method sketched in this paper is based on one-shot or alternating applications of a projection step onto the space of sparse vectors.
In this section, we provide some theoretical supports for this approach.
Consider the following optimization problem:
[Equation]
The set D is a generic set.
The projection function on D is deﬁned as
[Equation]
When the set D is the set of sparse vectors denoted by Σ s ( R n ) with sparsity order s , the projection function is hard thresholding.
For a vector x , the hard thresholding function H s ( x ) yields a vector with at most s non-zero entries, which are the s entries of x with largest absolute value.
The following proposition provides a general condition under which the optimization problem (14) can be solved using iterative projection methods.
Proposition A.1.
Consider the optimization problem equation 14 and assume that x (cid:63) is the minimizer of the problem.
Consider an iterative optimization algorithm with the initial point x 0 and the iteration t deﬁned by:
[Equation]
where ∆ f ( . ) is a function such that x − ∆ f ( x ) is L -Lipschitz, and ∆ f ( x (cid:63) )
= 0 .
Then we have:
[Equation]
In particular, if L ≤ 1 / 2 , the algorithm converges to the minimizer x (cid:63) as t → ∞ .
Proof.
First, for an arbitrary set D ⊆ R n , the projection operation onto the set Π D ( · ) and any x ∈ D and z ∈ R n , we have the following inequality
[Equation]
We can obtain this inequality in two steps.
We ﬁrst use triangle inequality:
[Equation]
For the last term, we use the deﬁnition of projection operation that for each x ∈ D , the projection of z to D minimizes its distance to the points in D :
[Equation]
Consider the iteration step t + 1 .
We have:
[Equation]
which implies
[Equation]
Some remarks are in order.
First, the assumption ∆ f
( x (cid:63) )
=
means that x (cid:63) is a stationary point of the algorithm.
This holds particularly for gradient descent based methods where ∆ f ( x (cid:63) )
=
α ∇ f ( x ) and x (cid:63) is a stationary point of f .
The Lipschitz property of x − ∆ f ( x ) holds in many situations.
As an example, consider the function f ( · ) as a simple mean squared error (MSE) loss, i.e., f ( x ) = (cid:107) y − Ax (cid:107) 22 .
In this case, we have:
[Equation]
which satisﬁes L -Lipschitz property with L bounded by the spectral norm of I − α AA (cid:62) .
In many situations, when this spectral norm is restricted to the set D , it can be controlled to be less than 1 / 2 .
A notable example, closely related to our problem, is the sparse recovery problem where one can prove recovery guarantee for iterative hard thresholding methods when the matrix A satisﬁes restricted isometry property .
See Foucart & Rauhut (2013) for a comprehensive exposition of the topic including iterative hard thresholding for linear problems.
Hard thresholding methods are widely used in sparse optimization literature.
Particularly relevant to our problem is the one-bit sparse recovery problem, where iterative hard thresholding is used Jacques et al.
B R ES N ET 18 EXPERIMENTS B. E XPERIMENTAL DETAILS
We run a small number of pilot experiments for 5 epochs, to ﬁnd good settings for the optimizer, learning rate, and learning rate schedule.
We then run a large number of 5 epoch experiments to ﬁnd good compression-accuracy trade-offs.
For the best performing compression-accuracy trade-offs we then run longer experiments of 25 epochs, with the two best optimization schedules.
We use a batch size of 64 for Resnet18, use cosine learning rate decay to 10 − 3 of the initial learning rate, and turn off weight decay.
B. P ARETO DOMINATING RESULTS B. A BLATION STUDY RESULTS
[Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]