Efficient Multi-Domain Learning by Covariance Normalization

Yunsheng Li, Nuno Vasconcelos · DOI

TL;DR

This paper introduces Covariance Normalization (CovNorm), a novel method for Multi-Domain Learning (MDL) that significantly reduces the number of parameters needed for adaptation layers in deep neural networks. CovNorm achieves performance comparable to full network fine-tuning while using as little as 0.13% of the parameters, making it highly efficient for deploying multiple specialized tasks on resource-constrained devices.

What Problem Does This Paper Address?

Modern deep neural networks (CNNs) are incredibly powerful but also computationally expensive, requiring millions of parameters and powerful GPUs. This poses a challenge for applications that need to perform many different tasks (e.g., object detection, segmentation) simultaneously, especially on devices with limited computational resources like smartphones or smart home gadgets. The current approach often involves using a separate, fully trained network for each task, which is inefficient due to the overhead of loading and switching between these large models. Multi-Domain Learning (MDL) aims to solve this by sharing a large, fixed base network (F layers) across all tasks and using small, task-specific "adaptation" layers (A layers) that are fine-tuned for each domain. The problem is that even these adaptation layers can still be quite large, and the goal is to shrink them further while maintaining high performance.

Methods

The core contribution is Covariance Normalization (CovNorm). It's a data-driven approach that views the adaptation layer (A) as a transformation that maps the statistics of its input to the statistics of its output. CovNorm approximates this transformation by:

  1. Principal Component Analysis (PCA): Performing PCA on the input and output of the adaptation layer to understand their dominant statistical directions (eigenvectors) and variances (eigenvalues).
  2. Recoloring Operation: Using the PCA results to construct a "whitening" matrix (to normalize the input's statistics) and a "coloring" matrix (to match the output's statistics).
  3. Mini-Adaptation Layer: Introducing a small, learnable matrix (Mx,y) between the whitening and coloring operations. This layer helps to correct for mismatches between the input and output PCAs and accounts for the fact that real network activations are not perfectly Gaussian.

This entire process is designed to be much more parameter-efficient than previous methods. After fine-tuning the mini-adaptation layer, it can be "absorbed" into the whitening or coloring matrices, further reducing the total number of parameters. CovNorm can be applied in two modes:

  • Independent: Each task's adaptation layer is learned and optimized independently.
  • Joint: A global PCA is learned from all available target datasets, and only the mini-adaptation layers are fine-tuned per task. This is beneficial when all tasks can be trained together.

Datasets

The paper evaluates its method on several popular vision datasets:

  • SUN 397
  • MITIndoor
  • FGVC-Aircraft Benchmark
  • Flowers 102
  • CIFAR100
  • Caltech256
  • SVHN

They also mention using the "decathlon dataset" proposed by [34] but found it too small for training larger CNNs.

Key Insights and Ideas

  • Statistics Matter: The key insight is that adaptation layers primarily need to align the statistics of feature representations between domains, not just perform arbitrary transformations. CovNorm leverages this by explicitly modeling and matching covariance matrices.
  • Data-Driven Efficiency: Unlike purely geometric methods (like SVD), CovNorm uses data statistics to determine the most important dimensions for adaptation, leading to more effective parameter reduction.
  • PCA as a Dimension Selector: The PCA analysis naturally identifies the intrinsic dimensionality of the input and output spaces for a given layer and task, allowing for significant compression.
  • The Power of the Mini-Adaptation Layer: The small Mx,y layer, though tiny, is crucial for handling PCA mismatches and non-Gaussian distributions, significantly boosting performance over geometric approximations that omit it.
  • Flexibility in Deployment: The independent and joint training modes offer flexibility depending on whether tasks are available simultaneously or sequentially.

Key Results

  • Parameter Efficiency: CovNorm achieves performance comparable to fully fine-tuned networks (FNFT) and residual adapters (RA) while using drastically fewer parameters. For example, it uses as few as 0.13% of the parameters of a VGG16 network for adaptation layers. On average, it requires 0.53% additional parameters per dataset.
  • Performance: CovNorm consistently outperforms geometric approximations like SVD+FTA and FTA, often by a significant margin (up to 4% accuracy difference). It also outperforms RA, achieving higher accuracy with 20x fewer parameters.
  • Joint Training Gains: The joint training mode offers slightly better performance for a slightly higher parameter count, showing the benefit of learning a global PCA when possible.
  • Broad Applicability: The method demonstrates strong performance across diverse datasets, including object, scene, and fine-grained recognition tasks, suggesting its general applicability.

Limitations and Future Work

  • Gaussian Assumption: While the method accounts for deviations from Gaussianity with the mini-adaptation layer, its theoretical foundation is strongest for Gaussian distributions.
  • Computational Cost of PCA: Computing PCAs for each layer and task adds some overhead, though it's a one-time cost per dataset/task.
  • Future Work: The paper suggests that further gains are possible with joint optimization, and the method's ability to adapt large CNNs across very diverse domains with minimal parameters opens doors for more efficient AI deployment on edge devices. The authors also note that their method can be used with other adaptation layer structures beyond residual adapters.

Summary updated

BibTeX
@inproceedings{li2019efficient,
  author = {Yunsheng Li and Nuno Vasconcelos},
  title = {{Efficient Multi-Domain Learning by Covariance Normalization}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.00557},
}
Figure