Kernel Pooling for Convolutional Neural Networks

Yin Cui, Feng Zhou, Jiang Wang, Xiao Liu, Yuanqing Lin, Serge J. Belongie

Introduction

Standard Convolutional Neural Networks (CNNs) typically rely on global average pooling or fully connected layers to aggregate spatial features into a final representation. While these methods are computationally efficient, they often fail to capture the complex, non-linear relationships between features. Such higher-order interactions are particularly crucial for fine-grained visual categorization, where distinguishing between similar classes (e.g., different bird species or car models) requires capturing subtle, non-linear patterns.

Previous attempts to address this, such as "Bilinear Pooling," focused on 2nd-order (pairwise) interactions. However, these methods suffer from a "curse of dimensionality" where the feature vector size grows exponentially with the order ($d^p$), making 3rd or 4th-order interactions computationally prohibitive. Furthermore, most existing methods use fixed kernels, lacking the flexibility to adapt to specific datasets.

The Kernel Pooling Framework

The authors introduce Kernel Pooling (KP), a novel framework designed to explicitly approximate high-order kernels in an efficient and differentiable manner. The overall pipeline integrates Kernel Pooling as a drop-in replacement for standard pooling layers.

Overview of the Kernel Pooling framework integrated into a CNN pipeline for fine-grained classification.

As shown in the architecture above, the feature map from the final convolutional layers is processed by the Kernel Pooling module $\phi(\cdot)$, which produces a compact feature vector representing higher-order interactions. This vector is then passed to a linear layer and a softmax classifier.

Efficient Higher-Order Approximations

To overcome the computational challenges of high-order interactions, Kernel Pooling employs several key mathematical techniques:

  1. Taylor Series Expansion: Instead of computing a specific kernel directly, the method approximates kernels (like the Gaussian RBF) using a Taylor series expansion. This represents the kernel as a weighted sum of polynomial kernels of different orders ($1^{st}, 2^{nd}, \dots, p^{th}$).
  2. Compact Feature Mapping via Count Sketch: To avoid the exponential growth in dimensionality, the authors use Count Sketch (denoted as $\Psi_i$ in diagrams) for dimensionality reduction. A critical property of Count Sketch is that the sketch of a tensor product can be computed via the circular convolution of the individual sketches.
  3. The FFT Trick: Circular convolution, while expensive in the spatial domain, is equivalent to simple element-wise multiplication in the frequency domain. By applying Fast Fourier Transforms (FFT), performing element-wise multiplication, and then using an Inverse FFT (IFFT), the framework can compute high-order interactions with linear complexity relative to the order $p$.
The differentiable compact explicit feature map approximation used in Kernel Pooling, leveraging Count Sketch and FFTs.

Learnable Kernel Composition

A significant advantage of Kernel Pooling is that the coefficients ($\alpha_i$) for each order in the Taylor series are learnable parameters. This allows the network to automatically determine the optimal combination of feature interactions for a given task. For instance, the model might learn that 3rd-order interactions are more discriminative than 2nd-order ones for identifying specific aircraft variants.

Experimental Results

The method was evaluated on several challenging fine-grained recognition benchmarks, consistently outperforming both standard pooling and compact bilinear pooling (CBP).

  • CUB-200-2011 (Birds): Achieved 86.2% accuracy using a VGG-16 backbone, a significant improvement over the 84.1% achieved by previous bilinear methods.
  • Stanford Cars: Reached 92.4% accuracy.
  • FGVC-Aircraft: Reached 86.9% accuracy.

The authors also demonstrated the high fidelity of their approximation; with an order of $p=4$, the relative error in approximating a Gaussian RBF kernel was less than 1%. Interestingly, while older architectures like VGG-16 saw the largest performance gains, modern architectures like ResNet-50 also benefited, suggesting that Kernel Pooling captures information not fully exploited by residual connections.

Conclusion

Kernel Pooling provides a powerful and efficient way to incorporate higher-order feature interactions into CNNs. By leveraging the mathematical properties of Count Sketch and FFTs, the framework achieves high-order kernel approximation without the prohibitive memory costs of traditional methods. Its end-to-end differentiability and learnable coefficients make it a versatile tool for advancing fine-grained visual recognition.

Summary updated

BibTeX
@inproceedings{cui2017kernel,
  author = {Yin Cui and Feng Zhou and Jiang Wang and Xiao Liu and Yuanqing Lin and Serge J. Belongie},
  title = {{Kernel Pooling for Convolutional Neural Networks}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2017},
  doi = {10.1109/cvpr.2017.325},
}
Figure