Domain-Adaptive Deep Network Compression

Marc Masana, Joost van de Weijer, Luis Herranz, Andrew D. Bagdanov, Jose M. Álvarez

Abstract

Standard deep network compression methods often overlook the internal behavioral changes of a model when it is transferred to a new task. This paper presents Domain Adaptive Low Rank (DALR) compression, a technique that leverages activation statistics from the target domain to prune redundancy more effectively. By formulating compression as a rank-constrained regression problem, the authors achieve up to 4x better compression than standard methods, reducing models to 5-20% of their original size with minimal impact on accuracy.

Introduction

Deep learning relies heavily on transfer learning, where a large model pre-trained on a source task (like ImageNet) is fine-tuned for a specific target task (like bird species identification). While effective for accuracy, this process often results in models that are unnecessarily large and computationally expensive for the target domain.

Existing compression techniques, such as Low-Rank Matrix Decomposition, typically focus solely on the learned weights ($W$). However, these methods ignore the actual data distribution—the activations ($X$)—flowing through the network. The authors argue that when a model moves to a new domain, the distribution of these activations shifts significantly. Failing to account for which neurons are active in the target domain leads to wasted parameters on features irrelevant to the new task.

Methodology

The authors target the fully connected (FC) layers of the VGG19 architecture, proposing two primary improvements over standard Truncated Singular Value Decomposition (SVD):

  1. Bias Compensation (BC): Standard SVD introduces systematic bias because inputs, particularly after ReLU layers, are not zero-centered. The authors provide a closed-form solution to adjust the layer's bias term, compensating for errors introduced by low-rank approximation.
  2. Domain Adaptive Low Rank (DALR): This core contribution seeks to minimize the reconstruction error of the layer's output ($Y$) given specific inputs ($X$) from the target domain.

Mathematically, DALR is framed as a rank-constrained regression problem: $$\min_{A,B} ||WX - AB^T X||_F$$ Crucially, this problem has a closed-form solution, allowing for efficient computation without iterative optimization.

Visualization of the low-rank decomposition $A B^T$ compared to the original weight matrix $W$.

The Activation Shift

A central insight of this work is the "Activation Shift." On the original source domain (ImageNet), neurons tend to have a fairly uniform activation rate. However, once fine-tuned on a specific domain like "Flowers," the activations become highly skewed. A small fraction of neurons perform most of the work, while many others become "dead weight."

Activation rates for fc6 and fc7 layers across different target domains, showing significant skewness compared to the source domain.

By focusing on output-centric compression, the goal shifts from making a generic approximation of the weight matrix to ensuring the layer produces the same output for the data it will actually encounter in deployment.

Experimental Results

The researchers evaluated DALR on several benchmarks, including CUB-200-2011 Birds, Oxford 102 Flowers, and Stanford 40 Actions. Key findings include:

  • Superior Efficiency: For the fc6 layer of VGG19, DALR achieved 4x better compression than standard SVD at the same accuracy level.
  • Massive Parameter Reduction: Compressing both fc6 and fc7 simultaneously reduced parameters to 6.8% for Birds, 14.9% for Flowers, and 29.9% for Stanford Actions, all with less than a 1% drop in accuracy.
  • Object Detection: In the Fast-RCNN framework, DALR using 768 dimensions outperformed standard SVD using 1024 dimensions, demonstrating the importance of domain-specific statistics in complex tasks.

Conclusion and Future Work

DALR demonstrates that domain-specific activation statistics are vital for efficient network compression. While this study focused on fully connected layers, the authors suggest that extending this logic to convolutional layers via tensor decompositions is a promising next step. One limitation is that the method requires a fine-tuned model and representative target-domain data, making it unsuitable for zero-shot scenarios.

Summary updated

BibTeX
@inproceedings{masana2017domain,
  author = {Marc Masana and Joost van de Weijer and Luis Herranz and Andrew D. Bagdanov and Jose M. Álvarez},
  title = {{Domain-Adaptive Deep Network Compression}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2017},
  url = {https://openreview.net/forum?id=ByZOeWfdWr},
}
Figure