Abstract
Global Covariance Pooling (GCP) captures second-order statistics to improve Convolutional Neural Network performance, but its normalization via eigendecomposition is computationally expensive and GPU-unfriendly. We present iSQRT-COV, a meta-layer that performs matrix square root normalization using a fast, iterative Newton-Schulz algorithm. This approach relies solely on matrix multiplications, enabling efficient GPU acceleration and seamless backpropagation. Experimental results on ImageNet and fine-grained benchmarks demonstrate that iSQRT-COV achieves up to a 3.1x speedup in training while reaching state-of-the-art accuracy.
Introduction
Standard Convolutional Neural Networks (ConvNets) typically utilize Global Average Pooling (GAP) to aggregate feature maps. While computationally efficient, GAP only captures first-order statistics. Global Covariance Pooling (GCP) captures richer, second-order information—specifically, how different features correlate—which significantly boosts performance in tasks like fine-grained visual categorization.
However, GCP faces a significant computational bottleneck. For the network to perform optimally, the resulting covariance matrix must be normalized, typically by calculating its matrix square root. Traditionally, this requires Eigendecomposition (EIG) or Singular Value Decomposition (SVD). These operations are notoriously "GPU-unfriendly"; they are difficult to parallelize and often necessitate synchronization with the CPU, creating a massive data bottleneck, particularly in multi-GPU environments.
Methods
The authors propose a "meta-layer" called iSQRT-COV that performs matrix square root normalization using only matrix multiplications, the primary operation for which GPUs are optimized.
The meta-layer employs a "sandwich" structure consisting of three distinct steps:
- Pre-normalization: The covariance matrix is scaled (using its trace or Frobenius norm) to ensure the subsequent iterative process converges.
- Coupled Newton-Schulz Iteration: Instead of solving for the square root exactly, the layer runs a fixed number of iterations (typically $N=5$) of the Newton-Schulz algorithm. This involves only matrix additions and multiplications. The authors derived the gradients for this iterative process, enabling seamless end-to-end backpropagation.
- Post-compensation: This step scales the result back to the original range to account for the initial pre-normalization.
By restricting the process to matrix multiplications, the entire computation remains on the GPU, facilitating high throughput and superior scalability across multiple devices.
Experimental Setup
The method was evaluated on several standard benchmarks:
- ImageNet (LSVRC2012): The gold standard for large-scale image classification, containing 1.28M images across 1,000 classes.
- Fine-Grained Visual Categorization (FGVC): Including CUB-200-2011 (bird species), FGVC-aircraft (aircraft variants), and Stanford Cars (car models).
Key Results
The iSQRT-COV meta-layer is 3.1x faster than previous GCP methods like MPN-COV and significantly more efficient than CPU-based EIG/SVD implementations.
On ImageNet, an iSQRT-COV network with a ResNet-50 backbone achieved a 22.14% top-1 error, outperforming much deeper models such as ResNet-101 (23.6%) and ResNet-152 (23.0%). Furthermore, the method established new state-of-the-art results on the three FGVC benchmarks, demonstrating that richer feature representations are highly effective for distinguishing between visually similar categories.
Discussion and Insights
Surprisingly, using an approximate square root (via 5 iterations) often performed as well as, or even slightly better than, the exact square root calculated via EIG. This suggests the approximation might provide a helpful regularization effect. Additionally, networks using iSQRT-COV converged in fewer epochs compared to standard first-order networks, further accelerating the total training time.
While effective, the output of the covariance pooling layer is high-dimensional ($d(d+1)/2$). For a 256-channel feature map, this results in a ~32k dimensional vector. Although the authors proposed a compression scheme using $1 \times 1$ convolutions to reduce this to 8k or 2k, a trade-off between dimensionality and accuracy remains. Future work may explore this iterative approach for other matrix functions, such as matrix logarithms, which are also used in manifold-based deep learning.
Summary updated