Deep Generalized Max Pooling

Vincent Christlein, Lukas Spranger, Mathias Seuret, Anguelos Nicolaou, Pavel Král, Andreas MaierarXiv 2019 · DOI

TL;DR

The paper introduces Deep Generalized Max Pooling (DGMP), a novel global pooling layer for Convolutional Neural Networks (CNNs) that jointly balances frequent and rare spatial activations across an entire image. By re-weighting local feature descriptors to equalize their impact, DGMP significantly outperforms standard global average and max pooling layers on highly structured document analysis tasks, such as writer identification and medieval script classification.

What Problem Does This Paper Address?

In modern CNN architectures, global pooling layers (like global average pooling or global max pooling) are standard tools used at the end of a network to collapse spatial dimensions into a fixed-size vector. However, these traditional layers share a fundamental flaw: they treat each activation map (channel) completely independently.

For highly structured images—such as historical manuscripts or text—this spatial independence leads to the "visual burstiness" problem. Global average pooling overemphasizes frequently occurring, uninformative patches (like the document background or common script strokes), while global max pooling can easily be derailed by noise. The authors address this gap by proposing a pooling mechanism that looks across the entire depth of the activation volume to balance features in a spatially coherent way.

Methods

The authors adapt Generalized Max Pooling (GMP)—originally designed for traditional Bag-of-Words (BoW) models—and rephrase it as a trainable, end-to-end neural network layer called Deep Generalized Max Pooling (DGMP).

Instead of pooling each channel separately, DGMP treats the activations at any given spatial location across all channels as a single local descriptor embedding.

Fig. 1: Overview of Deep Generalized Max Pooling. The activation volume that is computed from a convolutional layer serves as input for the DGMP layer. A linear optimization problem with D unknowns is solved using each local activation vector along the depth axis of the activation volume as linear equation with D unknowns. The output is a weighted sum of the local activation vectors.

As shown in Figure 1, the layer computes a weighted sum of these local activation vectors. The weights ($\alpha$) are calculated by solving a linear optimization problem (a least-squares ridge regression) that forces the dot-product similarity between the final global representation and each individual local descriptor to be a constant value. This effectively down-weights over-represented, redundant features and boosts rare, distinctive ones. Crucially, this entire process adds only one single additional trainable parameter ($\lambda$, the regularization term) to the network.

Datasets

The authors evaluated DGMP on three challenging historical document datasets:

  • ICDAR17-WI: A writer identification dataset featuring 394 training writers (3 samples each) and 720 test writers (5 samples each). Distinguishing writers is notoriously difficult because the general layout and style of the documents dominate the visual similarity.
  • CLaMM16 & CLaMM17: Datasets from the Classification of Medieval Latin Manuscripts competitions, containing 12 distinct script-type classes. CLaMM16 consists of 2,000 training and 1,000 test images, while CLaMM17 contains 3,540 training and 2,000 test images.

Key Insights and Ideas

  • Statistical Attention: DGMP acts as a form of content-independent "statistical attention." While traditional attention mechanisms look at what is in the image, DGMP balances locations based purely on frequency, ensuring that image-to-image similarity metrics aren't hijacked by repetitive background textures.
  • The Power of $\lambda$: The regularization parameter $\lambda$ acts as a dial between two extremes: when $\lambda \to \infty$, DGMP behaves like standard sum-pooling; when $\lambda \to 0$, it turns into pure least-squares regression.
  • Spatial Coherence Matters: By treating the activation volume as a collection of multi-dimensional spatial descriptors rather than isolated 2D grids, the network retains crucial contextual relationships between different features at the same location.

Key Results

DGMP consistently outperformed standard global average pooling (Avg) and global max pooling (Max) across all tasks:

Writer Identification (ICDAR17-WI)

DGMP achieved a Mean Average Precision (mAP) of 54.8% and a rank-1 accuracy of 73.9%, substantially beating the baseline average pooling (50.4% mAP) and max pooling (50.3% mAP). It also outperformed other advanced pooling methods like mixed pooling and log-sum-exp (LSE) pooling.

Script Classification (CLaMM)

  • CLaMM16: A single ResNet-50 model equipped with DGMP achieved 87.1% accuracy, setting a new state-of-the-art high score for a single model. An ensemble of five DGMP models pushed this to 88.6%.
  • CLaMM17: DGMP reached an ensemble accuracy of 85.1%, matching the top-performing specialized architectures in the competition while using a much simpler single-view approach.
Fig. 4: Mean validation error per epoch of the different pooling schemes computed of five runs with different initializations. The brighter area denotes the standard deviation. Please note the logarithmic y scale for improved clarity.

As illustrated in the validation curves (Figure 4), DGMP (orange line) consistently converges to a lower validation error faster than standard average or max pooling techniques.

Limitations and Future Work

While DGMP shows clear advantages, the authors note a few limitations:

  1. Initialization Sensitivity: Although $\lambda$ is optimized during training via backpropagation, its initial value still significantly impacts final performance.
  2. Comparison to Unsupervised Methods: On the writer identification task, DGMP fell short of an older, unsupervised method by Christlein et al. (which achieved 76.2% mAP using VLAD encoding).

For future work, the authors suggest integrating DGMP with unsupervised feature learning frameworks, combining it with content-based attention mechanisms, and expanding its evaluation to other domains like word spotting.

Summary updated

BibTeX
@misc{christlein2019deep,
  author = {Vincent Christlein and Lukas Spranger and Mathias Seuret and Anguelos Nicolaou and Pavel Král and Andreas Maier},
  title = {{Deep Generalized Max Pooling}},
  year = {2019},
  eprint = {1908.05040},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1908.05040},
}
Figure