Efficient Maximal Coding Rate Reduction by Variational Forms
Abstract
The principle of Maximal Coding Rate Reduction (MCR2) has recently been proposed as a training objective for learning discriminative low-dimensional structures intrinsic to high-dimensional data to allow for more robust training than standard approaches, such as cross-entropy minimization. However, despite the advantages that have been shown for MCR2 training, MCR2 suffers from a significant computational cost due to the need to evaluate and differentiate a significant number of log-determinant terms that grows linearly with the number of classes. By taking advantage of variational forms of spectral functions of a matrix, we reformulate the MCR2 objective to a form that can scale significantly without compromising training accuracy. Experiments in image classification demonstrate that our proposed formulation results in a significant speed up over optimizing the original MCR2 objective directly and often results in higher quality learned representations. Further, our approach may be of independent interest in other models that require computation of log-determinant forms, such as in system identification or normalizing flow models.
1 Introduction
Given a classification task, deep networks aim to learn a nonlinear mapping, consisting of a series of linear and nonlinear functions, that can map data to their correct labels. The overall deep network can often be interpreted as a composition of a nonlinear “featurizer” and a linear classifier for some matrix . The hidden layers or the featurizer is designated with learning a latent representation that best facilitates the final layer or classifier for the downstream task.
The canonical way to train a deep learning model for a classification task is empirical risk minimization using cross-entropy (CE) loss. While CE measures the difference between the model’s prediction and the true labels, it does not explicitly enforce any structure over the representation. In fact, Papyan, Han, and Donoho collapse; hui2022limitations show that this direct label fitting implicitly leads to neural collapse in deep networks. That is, as CE loss converges to , the representations of each class at the last hidden layer collapse to a single point, suppressing within-class variability.
Beyond neural collapse and failing to represent within-class variation, several works shah2020simplicity; geiros2020; scimeca2021 have empirically shown that training neural networks using stochastic gradient descent (SGD) on CE loss often leads the network to utilize the simplest, often spurious, feature in the image for classification. This hypothesis is theoretically supported by allenzhu2021distillation which verified that when multiple explanations can describe a class, models trained with CE often pick a subset of features that can classify a majority of the points well and then classifies the remaining points from noise in the data.
To alleviate this issue, Yu et al. mcr proposed a framework for learning geometrically meaningful representations, via a featurizer , by maximizing the coding rate reduction (MCR2). In brief, the MCR2 objective encourages the latent representation of the entire training set to expand or occupy as much volume as possible, while simultaneously pushing each class to compress or occupy as little space as possible. Empirically and theoretically, it is shown that this objective drives the latent representations of each class to lie on a low dimensional linear subspace, with the subspaces orthogonal to each other, which empirically provides robustness against label noise, a notable advantage of MCR2 compared to CE mcr.
However, despite these inherent advantages, the MCR2 metric can be costly from a computational perspective. In particular, the loss involves calculating the of the Gram matrix of the representations of each class. Not only does the number of terms grow linearly with the number of classes, but computing (and back-propagating) the of a matrix incurs a computational cost of . For this reason, MCR2 methods to date have been limited to datasets with a relatively small number of classes such as MNIST and CIFAR-10, where the loss is computationally feasible. In order to make MCR2 scalable, there is a significant need to improve the computational efficiency, particularly as it pertains to computing terms, to allow for large numbers (hundreds or thousands) of classes in high dimensional spaces.
Contributions. In this paper we make significant progress towards this goal, with the following contributions:
- 1.
We provide an alternative formulation of the MCR2 objective based on a variational form of the function which scales much more gracefully with the number of classes and the problem dimension.
- 2.
We show experimentally that the alternative formulation requires approximately the same number of epochs to converge as the original MCR2 formulation, but achieves a significant speedup in the training cost per epoch, particularly as the number of classes in the dataset grows.
- 3.
As an additional benefit of our formulation, we also observe empirically that training over our proposed variational formulation often results in higher quality learned latent representations and better test accuracy than the original MCR2 objective.
Finally, we note that our approach for optimization with variational forms may be of independent interest for other models which require computing terms, such as in system identification log-det or normalizing flow models kobyzev2020normalizing.
2 Preliminaries
Here we first describe the original MCR2 formulation as well as introduce relevant background material.
2.1 MCR2 Objective
The original MCR2 objective mcr takes the following form: Given training samples belonging to classes11 1 Here we adopt the notation that an upper case letter represents a matrix and denotes the column of a matrix., let be the latent representation where recall is the featurizer parameterized by , and let define the class membership, where denotes the probability22 2 Note that if the labels are known exactly then the entries of are binary with each row of summing to one. Notice that our notation of is slightly different from that adopted in mcr. Our choice is more compact for optimization purposes. that is in class . Then, aims to learn a feature representation that maximizes the following coding rate reduction :
| (1) | ||||
where denotes the column of , denotes a diagonal matrix with along the diagonal, , , , is the set of all matrices whose columns all have unit norm33 3 Note the constraint that has unit norm columns is often achieved by simply having the final operation of the network be a normalization. and is a prescribed precision error. Roughly speaking, , known as the expansion term, captures the dimension (or the volume) of the space spanned by while , or the compression term, measures the sum of the dimensions/volumes of the data from each class. From an information-theoretic point of view, estimates the coding rate, or the number of binary bits required to encode , through -ball packing ma2007segmentation. The terms are called expansion and compression terms respectively, since by maximizing , the first coding rate term is maximized, which seeks to expand the overall volume of the embedded features, while the second coding rate term is minimized, which seeks to compress the volume of the embedded features from each class.
By assessing the MCR2 objective (1), one can already observe a potential drawback of MCR2 for optimization. In particular, note that each term requires operations to compute (and similarly to back-propagate through). While can often be made reasonably small for many high-dimensional datasets which have an underlying low-dimensional structure, in particular is still often expensive to compute because it requires computations of . This severely limits the application of MCR2 for datasets with even moderate numbers, say hundreds, of classes as the objective becomes computationally infeasible on common machines.
2.2 Variational Forms of Spectral Functions
To avoid this computational bottleneck, here we propose instead a formulation which takes advantage of variational forms of spectral functions of a matrix. Specifically, for a given positive semi-definite (PSD) matrix and any scalar , note that
| (2) |
where denotes the rank of and is the singular value of . Here note that is a non-decreasing, concave function of , so we can exploit known variational forms of spectral functionsgiampouras2020novel; ornhag2020bilinear. In particular note the following result in ornhag2020bilinear.
Theorem 2.1 (Adapted from ornhag2020bilinear)
For any matrix , let r denote the rank of , let denote the singular value of , and define
for some function . If is a concave, non-decreasing function on with , then the following holds
where denotes the columns of . Note also that can have an arbitrary number of columns provided .
3 Proposed Formulation
Having introduced the above background material, we now describe our proposed approach. In particular, note that Theorem 2.1 immediately gives the following result as a proposition.
Proposition 3.1
Let be any real positive semi-definite matrix and let be any non-negative scalar. Then the following holds:
| (3) |
Further, if is a SVD of then is a solution to the above problem.
Proof. First recall the basic fact that for any function one has . Additionally, recall (2) and note that the function satisfies the conditions required for in Theorem 2.1. These facts give the following:
| (4) | ||||
Further, note (4) implies that for all such that since we have simply added the constraint . The result is completed by noting that for the choice of the maximum can be attained since .
3.1 Variational Formulation of MCR2
Using Proposition 3.1, we develop our formulation by replacing the terms in of (1) by the above variational form. In particular, note that for each class we can eliminate the associated term in of (1) by introducing an additional matrix subject to the constraint that . Further, due to the fact that each row of sums to one, we also have . As such, the variational form in Proposition 3.1 gives that the original MCR2 objective in (1) is equivalent to the following constrained variational form:
| (5) | ||||
From this form, we now reparameterize the matrices as where is a dictionary with unit norm columns, and is a (non-negative) encoding vector. Now let be a matrix of the concatenated encoding vectors and note that we trivially have and , which gives another equivalent formulation for the MCR2 objective, provided the number of dictionary elements is sufficiently large so that each optimal matrix in (5) can be encoded by (i.e., each column of must be a column of within a scaling factor):
| (6) | ||||
Finally, we relax the strict equality constraints with penalties to arrive at our final proposed formulation, which we call V-MCR2:
| (7) | ||||
such that . Regularization parameter weights how strictly the equality constraints should be approximated, and the terms roughly ensure class balance (recall, ). From this reformulation, we have significantly reduced the complexity of evaluating the objective function. The terms in which take time to evaluate is now replaced by for the sum of the terms along with the cost of computing the term which scales as .
3.2 Interpretation of the Variational Form
Besides the above computational advantages, we also discuss a few additional aspects of our formulation below.
Sparsifying dictionary learning interpretation. Notice that the above variational reformulation takes on a natural interpretation as learning a sparsifying dictionary: it essentially “parameterizes” the subspaces spanned by each class with a common shared dictionary . Every class then selects a “sparse” number of eigenbases, with , from this dictionary and forms its estimate of the sample covariance within the subspace. Notice that the scalar terms in are precisely nonconvex sparsity promoting measures adopted in early studies of sparse representation olshausen1996emergence; olshausen1997sparse. The sparsity in the (spectral) bases in terms of precisely corresponds to the subspace spanned by each class being low-dimensional or low-rank.
Penalty function method and other options. Notice that in our formulation (7), the equality constraint in (6) is enforced through a penalty function . As the penalty weight increases to infinity and the dictionary is sufficiently large44 4 In the worst case the model become equivalent when is large enough to contain a concatenation of the singular vectors of each class ., the formulation becomes exactly equivalent to the original formulations (6) and (1). Of course, to deal with the equality constraint in (6) more precisely, one may also consider adopting more advanced methods such as the augmented Lagrangian multiplier method to incorporate the equality constraint hestenes1969multiplier; rockafellar1973multiplier, which we leave for future work. However, as we discuss next, by relaxing the strict equality constraint we also gain a potential advantage when the latent representation contains noise.
Low-rank LASSO interpretation. Notice that the sparse/low-rank promoting term and the quadratic penalty term together resemble the classic LASSO method for recovering a sparse solution from noisy measurements TibshiraniR1996. The only difference here is that we are seeking a sparse solution in the spectrum of a covariance matrix – hence seeking a low-rank solution for the covariance. So to some extent, one may consider the variational form as a “low-rank LASSO.” We have noticed a nice side benefit of this LASSO-type formulation: empirically it seems to lead to better solutions than solving the original MCR2 objective (see experimental results in Section 5). Part of the reason is likely because the LASSO type relaxation introduced by the variational form finds a solution that is more stable to small noise in the data or deviation from an ideal low-dimensional linear subspace.
3.3 Optimization Strategy
3.3.1 Alternating Maximization
To optimize (7), we adopt an alternating maximization strategy Eckstein2012 between the variation parameters and the network parameters . At each iteration, we first optimize and by taking one step of a proximal gradient ascent update which consists of taking a gradient ascent step on the relevant part of variational loss , followed by normalizing the columns of to have unit norm and thresholding the negative entries of the updated matrix to (i.e., applying the ReLU function). To ensure stability of the gradient-based method, we inversely scale the learning rate of and by upper-bounds of the Lipschitz constants of the gradients, and , respectively. (See Appendix for our derivation for the bounds.) Next, the matrix approximation term is recomputed using the updated and , and we then update the network parameters, , by taking a gradient step on the relevant part of the variation loss, .
In addition, note that from the variational form in Proposition 3.1 we know that the optimal variational parameters should be closely related to the singular values and vectors of for each class (the relationship becomes exact for large values of ). We exploit this fact to initialize the variational parameters and to make periodic ‘approximately closed-form’ updates to the variational parameters. We call this procedure latching, which we describe in more detail in the next Section 3.3.2. We summarize our overall training process in Algorithm 1.55 5 Note that for clarity we describe the full procedure for gradient ascent, but in our experiments stochastic gradient ascent is implemented.
3.3.2 Latching
In order to optimize the variational MCR2 objective, the dictionary and must maximize whilst minimizing the regularization term . This trade-off is controlled by the regularization constant . In practice, when is too large, each gradient step does not allow for to stray too far away from , which can result in slow convergence. We observe that the following procedure improves convergence in practice. Note that the variational form is maximized66 6 The maximization is exact as becomes large, but a good approximation otherwise. when and are derived from the SVDs of , as given in Proposition 3.1. This gives a means to periodically reinitialize the variational parameters based on the SVDs of , which we refer to as latching as described in detail in Algorithm 2. This latching step can be viewed as taking an (approximate) full-maximization step w.r.t. the variational parameters (as opposed to a proximal gradient descent step) based on the closed-form solution provided in Proposition 3.1. This will be an exact maximization step as becomes large. In short, given a dictionary with columns, we initialize the dictionary as the concatenation of the top singular vectors of for each class . Similarly, the columns of are initialized as the corresponding singular values. Though latching is in itself an expensive procedure, requiring one to compute the SVD of a matrix times, it is optional (though we notice a benefit in practice) and can be done relatively infrequently throughout training with a proper choice of the hyper-parameter latch-freq. As a result, the amortized cost of latching becomes insignificant.
4 Experimental Setup
We compare , wall-clock time, and accuracy of models trained with the original MCR2 objective and the variational MCR2 objective on MNIST lecun1998gradient, CIFAR-10 krizhevsky2009learning, CIFAR-100 krizhevsky2009learning, and Tiny ImageNet le2015tiny (with 200 classes) datasets. We also compare the performance to cross-entropy (CE) training as a benchmark of the correctness of the learned representations (for classification). The high-level goal of these experiments is to show that 1) the variational MCR2 objective is feasible for datasets where the original MCR2 objective is computationally expensive (or impossible) to train (such as CIFAR-100 and Tiny ImageNet), 2) show that training on the variational MCR2 maximizes the true objective and obtains the desired subspace-like representations.
4.1 Hyperparameters
For fair comparison across training objectives (original MCR2, variational MCR2), we use a learning rate of for the network optimizer and the same batch size. For CE, we use the same batch size, but a larger learning rate of . The batch size is 1000 for MNIST and CIFAR-10, and 2000 for CIFAR-100 and Tiny ImageNet. The network is optimized using stochastic gradient descent for all objectives. For the precision error of the MCR2 objectives, we use for all datasets. and batch size are consistent with the experimental settings in the original MCR2 work mcr for MNIST and CIFAR-10. For Variational MCR2, the regularization constant and initial learning rates , across all experiments. We perform latching every 50 epochs for all experiments. See Appendix for precise details. The dictionary size and feature dimension varies across the datasets. For MNIST and CIFAR-10 we use and , and for CIFAR-100 and Tiny ImageNet we use and .
4.2 Nearest Subspace Classifier
MCR2 is a loss over the featurizer . To classify the test data, we use the nearest-subspace classifier similar to the original work mcr. As shown by mcr, at the global optima of MCR2, the representations of each class lie on low-dimensional subspaces that are orthogonal to each other. Yu, et al. mcr also empirically observe this property for networks trained by SGD. Assuming that the learned representations satisfy this property, given a test datapoint, we can simply identify the closest subspace for the final classification. Formally, given a test sample , the predicted label is given as
| (8) |
where is a matrix of the top principal components of with being the embedding of the training data .
5 Experimental Results
We discuss the performance of variational MCR2 below. Performance is measured by 1) training speed, 2) the true value the model reaches over the training data, and 3) the classification accuracy over the test set. Note that we are more interested in comparing the accuracy and training efficiency between MCR2 and V-MCR2, over trying to reach state of the art results in this paper.
5.1 Computational Efficiency
Across datasets, we compare the wall-clock time to train one epoch using the MCR2 (1) and V-MCR2 (7) formulations. The batch size is set to be the same for both models, and all our experiments are performed using PyTorch 1.9.0 and Python 3.8.11 on Nvidia A100-SXM4 GPUs with 40GB of CUDA memory for fair comparison. As shown in Table 1, V-MCR2 training completes approximately faster on CIFAR-100 and faster on Tiny ImageNet. Even for datasets containing a small number of classes, i.e., MNIST and CIFAR-10, we observe a speedup. Note that the overhead for the original MCR2 model escalates significantly as the number of classes increases, so we expect even greater improvements in training efficiency with datasets with more classes. Even for Tiny ImageNet, training until convergence using MCR2 becomes nearly impractical, while it is easily handled by V-MCR2.
| Dataset | MCR2 | V-MCR2 |
|---|---|---|
| MNIST | 11.56 | 6.29 |
| CIFAR-10 | 33.06 | 20.71 |
| CIFAR-100 | 157.45 | 31.14 |
| Tiny ImageNet | 527.85 | 44.23 |
Additionally, we compare the true (i.e., computing the original MCR2 objective with the iterates of the V-MCR2 model) over training epochs and observe that both models 1) take approximately the same number of training epochs to converge and 2) reach approximately the same final objective value at convergence. Thus, V-MCR2 does not require additional epochs to obtain a good solution which might offset the increased efficiency per epoch. As shown in Figure 1, on MNIST and CIFAR-10, V-MCR2 and MCR2 follow a similar training loss trajectory across epochs. For CIFAR-100, we observe that the convergence rate depends on the dimension of the features/representations, . For a feature dimension of for CIFAR-100, we observed similar number of epochs to convergence for MCR2 and V-MCR2. With a feature dimension of , we observe across 5 seeds that training with the original MCR2 leads to a rapid convergence to a poor local optima where the expansion term increases rapidly but the compression term remains the same. On the other hand, although V-MCR2 requires more epochs to converge, we observe the standard expected behavior where increases and decreases and the final solution is of much higher quality (see 5.2). Experiments on Tiny ImageNet show similar behaviors.
5.2 V-MCR2 Obtains Better Representations
There are two properties of the representation that we aim to attain by optimizing the MCR2 objective. We say that a representation of the training data is of ‘high quality’ if points from different classes lie on separate, orthogonal subspaces, and the union of these subspaces span as many dimensions as possible. In particular, the orthogonal property is important in order to classify the points using the nearest subspace algorithm in Section 4.2. To check the orthogonality of subspaces learned by , we report the inner product between every pair of training points as a heatmap in Figure 2. Namely, we sort the columns of by class and compute . Ideally, we want to have a block diagonal structure, with for notating points from different classes.
Figure 2 shows heatmaps for MNIST, CIFAR-10, and CIFAR-100 after 2000 training epochs, when has converged for both MCR2 and V-MCR2 (Figure 1). For MNIST and CIFAR-10, note that both MCR2 and V-MCR2 obtain a block diagonal structure. However, on CIFAR-100 and Tiny Imagenet, we observe no block diagonal structure after MCR2 training, whereas we see a clear block diagonal structure for V-MCR2. These findings suggest that V-MCR2 training is more robust to avoiding poor local minima than training on the original MCR2 model, particularly as the number of classes increase. We leave a rigorous study of these phenomena for a future work.
5.3 Performance on Classification Tasks
In Table 2, we present test accuracies on the four aforementioned datasets when trained under original MCR2 and V-MCR2 objectives. In addition, we also train a separate model for each dataset by using CE loss as a reference classifier and report its test accuracy. Notice that the goal of our study here is not about achieving the best possible classification accuracy on these datasets -- the training procedure and architectures used here are not optimal for that purpose77 7 We use simple training practices (e.g. input data downsampling, minimal data augmentation and training from scratch), leading to about 15% and 30% difference in performance on CIFAR-100 and Tiny ImageNet as reported in yun2020regularizing from much more carefully engineered training recipes. . Instead, we make fair comparison of all methods on the same networks and datasets to justify the computational efficiency and effectiveness of the proposed method. To ensure fairness, we initialize this reference model with the same architecture along with other hyperparameters88 8 For experiments using CE, we use a higher learning rate of to improve convergence for CE training. as in V-MCR2 experiments and attach a final linear classifier with output dimension corresponding to the number of classes.
As shown in Table 2, when trained on datasets with a small number of classes, all three training objectives can reach competitive classification performance. We can observe that both MCR2 and V-MCR2 objectives are comparable to CE in these small-scale datasets. Again on CIFAR-100 we observe that the poor local minima obtained by training the original MCR2 objective results in a poor test accuracy, while the V-MCR2 model achieves comparable performance to training the same network with CE. Due to limited resources and heavy computational requirements of MCR2 training with a large number of classes, we can only report the result on Tiny ImageNet by optimizing MCR2 after 200 epochs while the other two objectives complete the full training session of 2000 epochs.
| Dataset | Objective | Training | Test Accuracy |
|---|---|---|---|
| MCR2 | 44.6429 | 0.9785 | |
| MNIST | V-MCR2 | 44.2117 | 0.9788 |
| CE | - | 0.9738 | |
| MCR2 | 49.40 | 0.8956 | |
| CIFAR-10 | V-MCR2 | 48.43 | 0.8997 |
| CE | - | 0.8665 | |
| MCR2 | 226.0519 | 0.2421 | |
| CIFAR-100 | V-MCR2 | 218.0185 | 0.5872 |
| CE | - | 0.5840 | |
| Tiny | MCR2 | 227.6468 | 0.1319 |
| ImageNet | V-MCR2 | 231.1538 | 0.2665 |
| 200 | CE | - | 0.1907 |
6 Conclusion
Building on Yu et al. mcr, we propose an alternative cost-efficient formulation of the MCR2 objective that is scalable to datasets with a large number of classes. Namely, for CIFAR-100 and Tiny ImageNet, we observed a and speedup per training epoch, respectively. The gain would be even more significant as the number of classes increases. Additionally, we show that we do not make any compromises when it comes to performance by using this approximate, variational formulation. In fact, in all datasets we tested, not only does V-MCR2 reach similar values as MCR2, the learned representations of V-MCR2 were just as good, oftentimes better, than those learned by MCR2 for the same number of training epochs. On a related note, we observe an interesting phenomenon that directly optimizing the MCR2 objective is not only slow, but often completely fails to learn the desired orthogonal subspace structures when the number of classes increases even after has successfully converged. In our experiments, we found that V-MCR2 is surprisingly not prone to this problem, suggesting that V-MCR2 allows for better control over learning the desired representations. By these means, we find that V-MCR2 is a very promising adaptation of MCR2 and we leave a rigorous comparison of the representations learned by MCR2 and V-MCR2 for future work.
Acknowledgements This work was partially supported by NSF Fellowship DGE2139757, NSF grants 1704458 and 2031985, and the Northrop Grumman Mission Systems Research in Applications for Learning Machines (REALM) initiative. Yi Ma was funded by ONR grants N00014-20-1-2002 and N00014-22-1-2102, the joint Simons Foundation-NSF DMS grant .
References
- (1) Zeyuan Allen-Zhu and Yuanzhi Li. Towards understanding ensemble, knowledge distillation, and self-distillation in deep learning. https://arxiv.org/abs/2012.09816, 2021.
- (2) J. Eckstein. Augmented Lagrangian and alternating direction methods for convex optimization: A tutorial and some illustrative computational results. RUTCOR Technical Report, 2012.
- (3) M. Fazel, H. Hindi, and S.P. Boyd. Log-det heuristic for matrix rank minimization with applications to hankel and euclidean distance matrices. In Proceedings of the 2003 American Control Conference, 2003., volume 3, pages 2156–2162 vol.3, 2003.
- (4) R Geirhos, J.-H. Jacobsen, C Michaelis, R Zemel, W Brendel, Bethge M, and F. A. Wichmann. Shortcut learning in deep neural networks. Nature Machine Intelligence, 2020.
- (5) Paris Giampouras, René Vidal, Athanasios Rontogiannis, and Benjamin Haeffele. A novel variational form of the schatten- quasi-norm. Advances in Neural Information Processing Systems, 33, 2020.
- (6) Magnus R Hestenes. Multiplier and gradient methods. Journal of optimization theory and applications, 4(5):303–320, 1969.
- (7) Like Hui, Mikhail Belkin, and Preetum Nakkiran. Limitations of neural collapse for understanding generalization in deep learning. arXiv preprint arXiv:2202.08384, 2022.
- (8) Ivan Kobyzev, Simon Prince, and Marcus Brubaker. Normalizing flows: An introduction and review of current methods. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020.
- (9) Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
- (10) Ya Le and Xuan Yang. Tiny imagenet visual recognition challenge. Stanford cs231, 2015.
- (11) Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
- (12) Yi Ma, Harm Derksen, Wei Hong, and John Wright. Segmentation of multivariate mixed data via lossy data coding and compression. IEEE transactions on pattern analysis and machine intelligence, 29(9):1546–1562, 2007.
- (13) Bruno A Olshausen and David J Field. Emergence of simple-cell receptive field properties by learning a sparse code for natural images. Nature, 381(6583):607, 1996.
- (14) Bruno A Olshausen and David J Field. Sparse coding with an overcomplete basis set: A strategy employed by v1? Vision research, 37(23):3311–3325, 1997.
- (15) Marcus Valtonen Ornhag, Carl Olsson, and Anders Heyden. Bilinear parameterization for differentiable rank-regularization. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, 2020.
- (16) Vardan Papyan, X.Y. Han, and David Donoho. Prevalence of neural collapse during the terminal phase of deep learning training. Proceedings of the National Academy of Sciences of the United States of America, 2020.
- (17) R Tyrell Rockafellar. The multiplier method of Hestenes and Powell applied to convex programming. Journal of Optimization Theory and Applications, 12(6):555–562, 1973.
- (18) Luca Scimeca, Seong Joon Oh, Sanghyuk Chun, Michael Poli, and Sangdoo Yun. Which shortcut cues will dnns choose? a study from the parameter-space perspective. arXiv preprint arXiv:2110.03095, 2021.
- (19) Harshay Shah, Kaustav Tamuly, Aditi Raghunathan, Prateek Jain, and Praneeth Netrapalli. The pitfalls of simplicity bias in neural networks. Advances in Neural Information Processing Systems, 2020.
- (20) R. Tibshirani. Regression shrinkage and selection via the LASSO. Journal of the Royal Statistical Society B, 58(1):267–288, 1996.
- (21) Yaodong Yu, Ryan Chan, Chong You, Chaobing Song, and Yi Ma. Learning diverse and discriminative representations via the principle of maximal coding rate reduction. NeurIPS, 2020.
- (22) Sukmin Yun, Jongjin Park, Kimin Lee, and Jinwoo Shin. Regularizing class-wise predictions via self-knowledge distillation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 13876–13885, 2020.
7 Appendix
7.1 Derivation of the Lipschitz Constants
To ensure stability of the gradient-based method, we scale the learning rate of and by (the inverse of) approximate upper-bounds of the Lipschitz constants of the gradients, and , respectively. To simplify calculations, we only bound the Lipschitz constant of the gradients with respect to the matrix approximation term , as we note this term typically dominates the Lipschitz constant of the gradient. Additionally, for notational simplicity we show the derivation for balanced classes which implies .
Now, consider the function , and note that with some simple algebra one can show the following equivalence:
| (9) |
where denotes raising to the second power entry-wise.
From this, the relevant gradients are
| (10) | ||||
| (11) |
We first bound the Lipschitz constant of . For , we have
| (12) | ||||
| (13) |
where the inequality is due to the sub-multiplicative property of the Frobenius norm and the operator norm inequality. Now we consider . Here we make the simplifying assumption that in addition to each column of being a unit vector, also approximately satisfies , which is known to be true near the globally optimal solution from the analysis of mcr. Now, we have the following approximation
| (14) |
which implies,
| (15) | ||||
| (16) |
Since has a summation over class , we get the following approximate upper bound for the Lipschitz constant
| (17) |
For the upper bound of the Lipschitz constant of we simply have
| (18) | ||||
| (19) |
7.2 Architecture
We utilize the following architectures for the experiments in Section 5. We use a fairly simple architecture for MNIST, and for the other datasets, we use a slightly modified version of ResNet18. Note d is the feature dimension.
For CIFAR-10/100 and Tiny Imagenet, we use the Torchvision ResNet18 model as the featurizer, but we remove the final layer of the ResNet18 and replace it with the following to reshape the output into the desired feature dimension . We also normalize the output at the end to fulfill the constraint that the features lie on the unit sphere in the MCR2 objective.
For cross-entropy experiments, we add another linear layer on top to map the output of the featurizer to logits.
7.3 Data Augmentation
We utilize the following data augmentations for the experiments in Section 5.
7.4 Additional Experiments
The experiments conducted and presented in the main body, Table 2, were only meant to compare the computational efficiency for different methods under the same conditions. The settings however were not chosen to optimize the classification performance since we did not conduct data augmentation or other training recipes normally adopted, e.g. see yun2020regularizing.
Here we report experimental results on CIFAR-100 and Tiny ImageNet by training with a similar training recipe adopted in yun2020regularizing. Specifically, as in yun2020regularizing, we use PreAct ResNet-18 as the backbone and train with both cross-entropy loss and V-MCR2. All networks are trained by SGD with momentum 0.9, and weight decay of . Similar to yun2020regularizing, we set the learning rate to be for the first half of training epochs, divide it by for the next quarter of epochs, and finally divide it again by for the remaining iterations. Additionally, we utilize the same transformations to augment the data. Note that the only difference we make between our strategy and the one in yun2020regularizing is the choice of batch size and total number of training epochs (both specified in Section 4.3) to ensure fair comparison between CE and V-MCR2. In addition to the training strategy, we set for V-MCR2 as we find a smaller value for helps stabilize training in the early stage. We keep all other hyperparameters identical to ones specified in Section 4.3.
| Dataset | Objective | Training | Test Accuracy |
|---|---|---|---|
| CIFAR-100 | V-MCR2 | 130.2177 | 0.6951 |
| CE | - | 0.7146 | |
| Tiny ImageNet | V-MCR2 | 134.9504 | 0.4189 |
| 200 | CE | - | 0.4843 |