Learning Low-Rank Approximation for CNNs

Dongsoo Lee, Se Jung Kwon, Byeongwook Kim, Gu-Yeon WeiarXiv 2019

Abstract: Low-rank approximation is an effective model compression technique to not only reduce parameter storage requirements, but to also reduce computations. For convolutional neural networks (CNNs), however, well-known low-rank approximation methods, such as Tucker or CP decomposition, result in degraded model accuracy because decomposed layers hinder training convergence. In this paper, we propose a new training technique that finds a flat minimum in the view of low-rank approximation without a decomposed structure during training. By preserving the original model structure, 2-dimensional low-rank approximation demanding lowering (such as im2col) is available in our proposed scheme. We show that CNN models can be compressed by low-rank approximation with much higher compression ratio than conventional training methods while maintaining or even enhancing model accuracy. We also discuss various 2-dimensional low-rank approximation techniques for CNNs.

Introduction

Deep Neural Networks (DNNs) are notoriously over-parameterized, posing significant challenges for deployment on resource-constrained edge devices. While pruning and quantization are common strategies, they often necessitate specialized hardware to achieve tangible performance gains. Low-rank approximation (LRA) offers a compelling alternative by decomposing large weight tensors into smaller, multiplied matrices, which can be efficiently executed on standard hardware using optimized linear algebra libraries.

Despite its potential, LRA faces a critical hurdle: training a model post-decomposition is difficult. The multi-layer structures introduced by methods like Tucker or CP decomposition often impede convergence due to vanishing or exploding gradients. Consequently, standard fine-tuning often fails to recover the accuracy lost during the initial compression phase.

Methodology: The DeepTwist Algorithm

To address these challenges, we introduce DeepTwist, a compression-aware training technique. Unlike traditional methods that train on a modified, decomposed architecture, DeepTwist maintains the original model structure throughout the entire training process. This approach avoids the convergence issues associated with multi-layer decomposed structures.

The Distortion Step

The core of DeepTwist is the periodic injection of low-rank "noise" via a distortion step. The process follows a cyclical pattern:

  1. Standard Training: The original model is trained for a predefined number of batches ($S_D$).
  2. Weight Distortion: Weight tensors are decomposed using an LRA method (e.g., Tucker decomposition or SVD).
  3. Reconstruction: The decomposed factors are immediately multiplied back together to reconstruct the original tensor shape.
  4. Resumption: Training continues with these distorted weights.
The DeepTwist optimization procedure: periodically injecting weight distortion pushes the model toward a flat local minimum robust to low-rank approximation noise.

This mechanism effectively pushes the model away from "sharp" local minima. Training only stabilizes when the model reaches a "flat" minimum—a region of the loss surface where the LRA distortion does not significantly impact the loss. Furthermore, by preserving the original structure, DeepTwist enables the use of 2D SVD on "lowered" matrices (via im2col), a technique previously difficult to integrate into standard fine-tuning loops.

Experimental Results

We evaluated DeepTwist across several standard computer vision benchmarks, including CIFAR-10 (ResNet-32, VGG19) and ImageNet (ResNet-34).

CIFAR-10 Performance

On ResNet-32, DeepTwist demonstrated remarkable results. At a 1.5x compression ratio, the model achieved 92.92% accuracy, actually exceeding the pre-trained baseline of 92.63%. This suggests that the distortion step acts as a powerful regularizer. As shown in the comparison with typical Tucker decomposition training, DeepTwist maintains significantly higher accuracy as the compression ratio increases.

Accuracy vs. Compression Ratio for ResNet-32 on CIFAR-10: DeepTwist consistently outperforms typical Tucker decomposition training.

For VGG19, using tiled SVD with DeepTwist allowed for a 4x compression ratio with only a 0.3% drop from the baseline accuracy (92.07% vs. 92.37%).

ImageNet Scalability

To demonstrate scalability, we applied DeepTwist-based tiled SVD to ResNet-34 on ImageNet. The compressed model reached 73.00% top-1 accuracy at a 3.1x compression ratio, significantly outperforming typical Tucker training (72.31%) and closely approaching the 73.26% baseline.

Conclusion

DeepTwist provides a robust framework for training low-rank compressed CNNs by focusing on finding flat minima within the original model structure. By treating LRA as a form of structured noise injection, the method not only preserves accuracy at high compression ratios but can also improve generalization. Future work will explore the application of DeepTwist to other compression modalities, such as CP decomposition and pruning, to further validate the benefits of flat-minimum search in model optimization.

Summary updated

BibTeX
@misc{lee2019learning,
  author = {Dongsoo Lee and Se Jung Kwon and Byeongwook Kim and Gu-Yeon Wei},
  title = {{Learning Low-Rank Approximation for CNNs}},
  year = {2019},
  eprint = {1905.10145},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1905.10145},
}
Figure