Year: 2021

Abstract:
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 fly 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 unification 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.

heading: 1 INTRODUCTION
text: 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 benefits and downsides, are briefly 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 difficult. Scalar quantization (Jacob et al., 2018; Nagel et al., 2021) approximates neural network weights with fixed-point values, i.e., integer values scaled by a fixed floating 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 filters 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 find a factorization C,Z for an original weight tensor W, such that the matrix product CZ closely approximates the
Weight tensor !!"#×!$%×ℎ×$
Tile and reshape Weight tensor tiled and
reshaped to %×&; & ≫ % Sparse PCA
C matrix %×); ) < % *
Z matrix (sparse) )×&; & ≫ )
& = !!"#×!$%×ℎ×$/% Weight tensor !!"#×!$%×ℎ×$
original weight tensor. The compr ssion is then pushed further by obtaining quantized factors and additionally sparse Z. During inference, the product CZ is computed first, and its result is reshaped back into the original weight tensor’s shape, and used for the following computations. This approach allows t e u e 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 unified 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 benefits 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.

heading: 2 RELATED WORK
text: SVD-based methods and tensor decompositions SVD decomposition was first used to demonstrate redundacy in weight parameters in neural networks in Denil et al. (2013). 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. (2019). 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. (2019).
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 floating points weight to 8 bit fixed point weights yields a 4x compression ratio. Most quantization approaches use the straight-through estimator (STE) for training quantized models (Bengio et al. (2013); 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. (2019); Bhalgat et al. (2020)). A recent survey on practical quantization approaches can be found in Nagel et al. (2021).
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. (2019) 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. (2014); Martinez et al. (2021); Fan et al. (2020); Stock et al. (2019); Wu et al. (2016)). 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. (2019). Another direction is introducing a permutation to the weight matrices which allows to find 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. (2010); Ge et al. (2013); 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. (2018); 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).

heading: 3 METHOD
text: In this section, we describe the main algorithm, which can be considered as sparse quantized principle component analysis (PCA).

heading: 3.1 QUANTIZED SPARSE PCA
text: Consider a weight tensor of a convolutional layer W ∈ Rfout×fin×h×w, where fin, fout are the number of input and output feature maps, and h, w are the spatial dimensions of the filter. We reshape it into a matrix W̃ ∈ Rd×n, where d is the tile size and n is the number of tiles. For the reshape, we consider the dimensions in the order fout, fin, h, w in our experiments. The goal is to factorize W̃ into the product of two matrices as follows:
W̃ = CZ, (1)
where C ∈ Rd×k is the codebook, and Z ∈ Rk×n is the set of linear coefficients, or a latent variable (k < d < n). Following the standard PCA method, we factorize the zero mean version of W̃. With this decomposition, every column of W̃, denoted by W̃:,i, is a linear combination of k codebook vectors (columns of C):
W̃:,i = k∑ j=1 ZjiC:,j , (2)
where C:,j is the j-th column of C. This decomposition problem is an instance of sparse PCA methods (Zou et al. (2006)). For network compression, we are additionally interested in quantized matrices C and Z. The quantization operation for an arbitrary C and Z is defined as follows:
Cq = Qc(C; sc, bc), (3) Zq = Qz(Z; sz, bz), (4)
where bc,bz are the quantization bit-widths, and sc and sz 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):
Cq,ij = clamp (⌊
Cij si
⌉ , 0, 2bc − 1 ) si, (5)
Zq,ij = clamp (⌊
Zij sj
⌉ , 0, 2bz − 1 ) sj , (6)
where b·e is rounding to nearest integer, and clamp(·) is defined as:
clamp(x, a, b) =  a x < a
x a ≤ x ≤ b b x > b . (7)
We refer to the problem of finding 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 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 find the best factorization on the data manifold (Zhang et al. (2015); He et al. (2017); Stock et al. (2019)). Therefore, we solve the following optimization problem:
C∗,Z∗ = argmin Cq,Zq
E(X,Y )∼D ( ‖Y − [CqZq] ∗X‖2F ) (8)
s.t. Cq = Qc(C; sc, bC) Zq = Qz(Z; sz, bZ)
‖Zq‖0 ≤ S,Z ∈ R k×n,C ∈ Rd×k,
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. L0 norm is used for the constraint on the number of nonzero elements in the matrix Zq. We approximate the expected value of above optimization problem using a subset of the training data:
E(X,Y )∼D ( ‖Y − [CqZq] ∗X‖2F ) ≈ 1 m m∑ i=1 ‖Yi − [CqZq] ∗Xi‖2F ,
where m is the number of samples used for optimization. Following the compression method introduced in Zhang et al. (2015), 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.

heading: 3.1.1 PROJECTED GRADIENT DESCENT OPTIMIZATION ALGORITHM
text: 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.
1. Initialization. The codebook C is initialized with first k left singular vectors of W̃. Given the SVD decomposition of W̃ as follows:
W̃ = UΣV>, (9)
Algorithm 1 Projected Gradient Descent Optimization
Require: W̃ 1: SVD of W̃ = UΣV>, 2: C← Uk 3: Z← U>k W̃ 4: while Stopping criteria not met do 5: Gradient descent step: C,Z← gradient descent update on equation (10). 6: M← binary mask for largest S values of Qz(Z; sz, bZ). 7: Hard thresholding step: Z← Z M . 8: end while 9: return: Qc(C; sc, bC), Qz(Z; sz, bZ).
we choose C(0) = Uk, where Uk denotes the top k left singular vectors of W̃. The latent matrix Z is initialized as the projection of W̃ onto the set of first k singular vectors, Z(0) = U>k W̃.
2. 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:
1
m m∑ i=1 ‖Yi − [Qc(C; sc, bC)Qz(Z; sz, bZ)] ∗Xi]‖2F , (10)
We use the straight through estimator (STE) (Bengio et al. (2013)) to compute the gradients of the quantization operation, i.e. we use the following gradient estimate for the rounding operation:
∂dpc ∂p = 1.
The outcome of this step is denoted by C(t)gd ,Z (t) gd .
3. 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 M(t). The mask matrix M (t) is obtained finding the support of S largest entries of Qz(Z (t) gd ; sz, bZ). This is the hard thresholding step. For the next iteration we set: Z(t) = Z
(t) gd M (t),C(t) = C (t) gd .
4. Repeat the previous three steps using Z(t),C(t) until termination criteria is met (MSE error or a fixed iterations number). The final matrices are given be Qc(C (t); sc, bC), Qz(Z (t); sz, bZ).
This iterative projection step has theoretical support for well behaved optimization problems. See Appendix A for more details.

heading: 3.1.2 RELATION TO OTHER APPROACHES
text: 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. Qc = id(·), Qz = id(·), then matrix C is in full precision, while Z encodes the indices such that
Zij = δimi , (11)
where mi is the centroid index corresponding to tile i.
(B) Additive vector quantization. If Qc = id(·), bz = 1 (binary quantization), then
W̃:,i = k∑ j=1 ρjiC:,j , (12)
where ρji ∈ {0, 1} are binary coefficients. Note that in the original work by Babenko & Lempitsky (2014), an additional constraint of ∑ j ρji = nt is enforced, i.e. each Wi,: is a
sum of a fixed number of terms. (C) Principle component analysis. If Qc = id(·), and Qz = id(·), then
W̃:,i = k∑ j=1 ZjiC:,j . (13)
This case corresponds to SVD factorization of zero mean version of weight matrix W̃. For specific values of n and d, the method is mathematically equivalent to the SVD decomposition methods for neural network compression (Denton et al. (2014); Jaderberg et al. (2014)). For example, if n = fouth, and d = finw, then the method is equivalent to the spatial SVD decomposition by Jaderberg et al. (2014). In contrast to the above-mentioned approaches, we do not decompose the convolutional operation into two convolutional layers, which gives extra flexibility in the choice of PCA dimensionality d.

heading: 3.2 COMPRESSION RATIO
text: Without sparsity, the compression ratio is computed as follows. LetLo(W) = fout×fin×h×w×32 denote the number of bits required to represent the original 32 bit floating point tensor W, and Lc(W) = d × k × bc + k × n × bz the size of the quantized tensor factors C and Z of W. The compression ratio Cr is then defined as Cr =
Lo(W) Lc(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 fout = fin = 256, h = w = 3, d = 256, and k = 128. In this scenario, the original weight tensor W has 256 × 256 × 3 × 3 = 589, 824 elements, the codebook matrix C has 256 × 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 bc 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× bz , where r = 1− S/kn is the sparsity ratio of Z with ‖Z‖0 = S. Note that this method only reduces memory footprint if r > 1/bz .
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 Lq(W) to Lc(W), where Lq = 2k × 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 Lc(W) = d× k× bc + k×n+ (1− r)× k×n× bz +Lq(W).

heading: 4 EXPERIMENTS
text: 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.

heading: 4.1 EXPERIMENTAL SETUP
text: Initial factorization We start with a pre-trained model and 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.
Sparsification Sparsification is applied after per layer data-aware optimization in a form of hard thresholding. We consider one-shot and iterative thresholding. Specifically, 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 fine-tuning stage, the sparsity mask is frozen.
Fine-tuning We follow Martinez et al. (2021) and fine-tune our models end-to-end using the target training set. Model-specific finetuning procedures are described below.

heading: 4.1.1 A NOTE ON COMPRESSION RATIO
text: In our experiments we leave the first convolutional weight tensor, all bias tensors, all batch normalization parameters, and the PCA centering vectors in FP32. We denote these uncompressible parameters as Lu. The sparsity ratio for a network is then computed as Cr = ∑ W Lo(W) Lu+ ∑
W Lc(W)

heading: 4.2 IMAGENET EXPERIMENTS
text: We evaluate our method on the ResNet18 and MobileNetV2 achitectures for ImageNet classification. 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 classification 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.

heading: 4.2.1 BASELINE METHODS
text: We compare our methods against scalar quantization by Esser et al. (2019), binary CNNs by Lin et al. (2017) (ABC-Net), the vector quantization method by Martinez et al. (2021) (PQF), the vector quantization method by Stock et al. (2019) (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, 3 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.

heading: 4.2.2 RESULTS
text: 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 figure we see that we outperform BGD, TTQ, ABC-Net and 3 and 2 bit 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.

heading: 4.3 ABLATION STUDIES

heading: 4.3.1 HARD THRESHOLDING METHODS
text: 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, 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 first is using the fixed 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 finetuning. The results suggest that the most important aspect of data-aware optimization is the stopping criterion. The best pre-finetuning 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 overfitting to the layer input and output data sample. This intuition is further supported by observing the lowest pre-finetuning accuracy for hard thresholding with the highest number of iterations, namely 1000.
However, overall benefits of per layer optimization methods become marginal after the compressed model is fine-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.

heading: 4.3.2 QUANTIZATION VS PRUNING VS RANK
text: 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 figure, 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 hy-
perparameters 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 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 fine-tune the target compression ratio.

heading: 5 CONCLUSION
text: We presented a weight compression method based on quantized sparse PCA which unifies SVDbased weight compression, sparse PCA, and vector quantization. We tested our method on ImageNet classification 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 efficiency-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.

heading: A HARD THRESHOLDING FOR SPARSE OPTIMIZATION
text: 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:
min x∈D f(x). (14)
The set D is a generic set. The projection function on D is defined as
ΠD(z) = arg min x∈D ‖x− z‖2 .
When the set D is the set of sparse vectors denoted by Σs(Rn) with sparsity order s, the projection function is hard thresholding. For a vector x, the hard thresholding function Hs(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? is the minimizer of the problem. Consider an iterative optimization algorithm with the initial point x0 and the iteration t defined by: xt+1 = ΠD(xt −∆f (xt)), where ∆f (.) is a function such that x−∆f (x) is L-Lipschitz, and ∆f (x?) = 0. Then we have:
‖xt − x?‖2 ≤ (2L) t ‖x0 − x?‖2 .
In particular, if L ≤ 1/2, the algorithm converges to the minimizer x? as t→∞.
Proof. First, for an arbitrary setD ⊆ Rn, the projection operation onto the set ΠD(·) and any x ∈ D and z ∈ Rn, we have the following inequality
‖ΠD(z)− x‖2 ≤ 2 ‖z − x‖2 We can obtain this inequality in two steps. We first use triangle inequality:
‖ΠD(z)− x‖2 ≤ ‖z − x‖2 + ‖ΠD(z)− z‖2 . For the last term, we use the definition of projection operation that for each x ∈ D, the projection of z to D minimizes its distance to the points in D:
‖ΠD(z)− z‖2 ≤ ‖z − x‖2 . Consider the iteration step t+ 1. We have:
‖ΠD(xt −∆f (xt))− x?‖2 ≤ 2 ‖xt −∆f (xt)− x?‖2 ≤ 2L ‖xt − x?‖2 , which implies
‖xt −∆f (xt)− x?‖2 ≤ (2L) t+1 ‖x0 − x?‖2 .
Some remarks are in order. First, the assumption ∆f (x?) = 0 means that x? is a stationary point of the algorithm. This holds particularly for gradient descent based methods where ∆f (x?) = α∇f(x) and x? 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) = ‖y −Ax‖22. In this case, we have:
x−∆f (x) = x− αAA>x = (I − αAA>)x,
which satisfies L-Lipschitz property with L bounded by the spectral norm of I − αAA>. 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 satisfies 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. (2013).

heading: B RESNET18 EXPERIMENTS
text: B.1 EXPERIMENTAL DETAILS
We run a small number of pilot experiments for 5 epochs, to find good settings for the optimizer, learning rate, and learning rate schedule. We then run a large number of 5 epoch experiments to find 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.2 PARETO DOMINATING RESULTS
B.3 ABLATION STUDY RESULTS

heading: 128 256 3 0.20 21.70 68.63

heading: 128 256 4 0.40 20.19 68.73

heading: 128 256 3 0.00 18.17 68.91

heading: 128 256 3 0.00 16.95 69.15

heading: 192 256 3 0.00 13.20 69.47

heading: 192 256 4 0.20 11.50 69.77

heading: 256 256 4 0.20 8.91 70.04

heading: 256 256 5 0.20 6.96 70.06

heading: 256 256 5 0.00 6.01 70.26

Review summaries:
This paper introduces a novel method of weight compression. Weight tensors are stored as sparse, quantized matrix factors, and the underlying matrix factorization problem can be considered as a quantized sparse PCA problem and be solved through iterative projected gradient descent methods. The authors' method  is applicable to both moderate and extreme compression regimes, and is claimed to achieve or be on par with state-of-the-art trade-offs between accuracy and model size.

The paper proposes a method for compression of neural network weights. The proposal turns weight tensors into matrices, factorizes these matrices into a rank-k factorization via PCA, applies quantization to the factor matrices, and additionally makes the right (latent) matrix sparse. An algorithm is presented, with two different thresholding options (per-iteration, or one-shot). In experiments, these ideas lead to an accuracy/compression tradeoff which is either competitive with or better than previous state-of-the-art across all compression ratios investigated.