Compressed Deep Networks: Goodbye SVD, Hello Robust Low-Rank Approximation
arXiv:2009.05647
Abstract
A common technique for compressing a neural network is to compute the -rank approximation of the matrix that corresponds to a fully connected layer (or embedding layer). Here, is the number of the neurons in the layer, is the number in the next one, and can be stored in memory instead of . This -approximation minimizes the sum over every entry to the power of in the matrix , among every matrix whose rank is . While it can be computed efficiently via SVD, the -approximation is known to be very sensitive to outliers ("far-away" rows). Hence, machine learning uses e.g. Lasso Regression, -regularization, and -SVM that use the -norm. This paper suggests to replace the -rank approximation by , for . We then provide practical and provable approximation algorithms to compute it for any , based on modern techniques in computational geometry. Extensive experimental results on the GLUE benchmark for compressing BERT, DistilBERT, XLNet, and RoBERTa confirm this theoretical advantage. For example, our approach achieves compression of RoBERTa's embedding layer with only additive drop in the accuracy (without fine-tuning) in average over all tasks in GLUE, compared to drop using the existing -approximation. Open code is provided for reproducing and extending our results.
References in corpus (19)
- Distributed Representations of Words and Phrases and their Compositionality
- The NumPy array: a structure for efficient numerical computation
- Distributed Representations of Sentences and Documents
- Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer
- Training Deep Nets with Sublinear Memory Cost
- Semi-supervised Sequence Learning
- Q8BERT: Quantized 8Bit BERT
- Distilling Task-Specific Knowledge from BERT into Simple Neural Networks
- Reducing Transformer Depth on Demand with Structured Dropout
- MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices
- Structured Pruning of a BERT-based Question Answering Model
- Optimal approximate matrix product in terms of stable rank
- Reweighted Proximal Pruning for Large-Scale Language Representation
- Dimensionality Reduction of Massive Sparse Datasets Using Coresets
- MKD: a Multi-Task Knowledge Distillation Approach for Pretrained Language Models
- Introduction to Coresets: Accurate Coresets
- Distilling BERT into Simple Neural Networks with Unlabeled Transfer Data
- Coresets for Near-Convex Functions
- Faster PAC Learning and Smaller Coresets via Smoothed Analysis