Compact Bilinear Pooling

Yang Gao, Oscar Beijbom, Ning Zhang, Trevor Darrell

Introduction

Bilinear pooling has emerged as a powerful technique for fine-grained visual recognition and texture analysis. By computing the outer product of feature vectors, it captures complex second-order statistics that standard first-order pooling (like max or average pooling) misses. This capability is particularly effective for identifying subtle differences in bird species or complex scene textures. However, this comes at a steep computational cost: the dimensionality of the resulting feature vector is the square of the input channel count. For a typical 512-channel input, this results in over 260,000 dimensions, leading to massive memory requirements for subsequent classification layers. This paper introduces two techniques—Random Maclaurin and Tensor Sketch—to compress these features by two orders of magnitude with minimal loss in accuracy.

Methodology: Approximating the Bilinear Kernel

The authors address this "dimensionality explosion" by treating bilinear pooling as a second-order polynomial kernel. They propose two efficient approximations that project the high-dimensional outer product into a much smaller space, effectively creating an explicit feature map for the kernel.

Random Maclaurin (RM)

Random Maclaurin uses random projections to approximate the kernel. It involves multiplying the input features by two random matrices (typically filled with +/- 1) and then performing an element-wise product. This method is computationally efficient as it relies on standard matrix operations, though it requires storing the random projection matrices, which can be memory-intensive for very high dimensions.

Tensor Sketch (TS)

Tensor Sketch is a more sophisticated approach based on "count sketches." It leverages the property that the sketch of an outer product is equivalent to the circular convolution of the individual sketches. By utilizing the Fast Fourier Transform (FFT), the circular convolution can be computed in O(d log d) time. Unlike RM, TS requires almost no extra memory for parameters, as it uses fixed hash tables.

Overview of the compact bilinear pooling architecture.

Crucially, both RM and TS are fully differentiable. This allows the entire network—from the initial convolutional layers to the compact pooling layer—to be trained end-to-end. This optimization ensures that the learned features are specifically tailored for the compressed representation, significantly boosting performance compared to post-hoc compression methods like PCA.

Key Results and Discussion

The experiments across datasets like CUB-200-2011, MIT Indoor Scenes, and the Describable Texture Dataset (DTD) revealed that bilinear features are highly redundant. On the CUB dataset, the authors successfully reduced the dimensionality from 262,144 to just 8,192 while maintaining an identical error rate of 16.0%.

Performance comparison across various projection dimensions.

Efficiency and Memory

By shrinking the feature vector, the memory required for the final linear classifier was reduced from 1000MB to 40MB for a 1,000-class problem. This massive reduction makes high-performance bilinear models feasible for deployment on mobile and memory-constrained devices without sacrificing the discriminative power of second-order features.

Robustness in Few-Shot Learning

An unexpected benefit of compact features is their performance in low-data regimes. In 1-shot learning scenarios on the CUB dataset, compact models achieved a 22.8% relative improvement over the full bilinear model. The reduced parameter count in the final layer acts as a form of regularization, preventing the overfitting that typically plagues high-dimensional bilinear models when training data is scarce.

Conclusion

Compact Bilinear Pooling provides a scalable path for using second-order features in deep learning. By combining kernel approximation techniques with end-to-end training, the authors demonstrate that it is possible to maintain state-of-the-art accuracy while reducing feature dimensionality by two orders of magnitude. This work paves the way for more sophisticated feature interactions in real-time and large-scale computer vision applications.

Summary updated

BibTeX
@inproceedings{gao2016compact,
  author = {Yang Gao and Oscar Beijbom and Ning Zhang and Trevor Darrell},
  title = {{Compact Bilinear Pooling}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2016},
  doi = {10.1109/cvpr.2016.41},
}
Figure