---
title: Strip Pooling Module (SPM)
url: https://www.emergentmind.com/topics/strip-pooling-module-spm
type: topic
---

# Strip Pooling Module (SPM)

The Strip Pooling Module (SPM) is a mechanism for spatial pooling introduced to improve contextual representation in pixel-wise prediction networks, especially in scene parsing. SPM redefines spatial pooling by employing long, narrow kernels—specifically $1 \times N$ (horizontal strips) or $N \times 1$ (vertical strips)—to efficiently model long-range dependencies along a single spatial axis while minimizing the loss of spatial detail inherent in conventional $N \times N$ pooling. The module is designed for plug-and-play integration, lightweight computation, and strong ablation-tested performance gains in architectures such as those based on ResNet backbones. SPM is a central building block in SPNet, a scene parsing network that achieves state-of-the-art performance on ADE20K and Cityscapes benchmarks with reduced parameter count compared to prior spatial pooling approaches [2003.13328].

## 1. Core Architectural Concept

SPM operates on an input feature tensor $X \in \mathbb{R}^{C \times H \times W}$, where $C$ denotes channels, $H$ height, and $W$ width. The module applies two parallel pooling operations:

- **Horizontal Strip Pooling:** Utilizes a kernel of size $(1 \times W)$, aggregating information across each row to produce $y^h \in \mathbb{R}^{C \times H}$.
- **Vertical Strip Pooling:** Employs a kernel of size $(H \times 1)$, aggregating information across each column to produce $y^v \in \mathbb{R}^{C \times W}$.

After strip pooling, each output is processed with a 1D convolution (kernel size 3), which enables local communication along the pooled axis. The outputs $y^h$ and $y^v$ are then broadcast-added to reconstruct a spatial map $y_{c, i, j} = y^h_{c, i} + y^v_{c, j}$ over the full $H \times W$ grid.

A subsequent $1 \times 1$ convolution and sigmoid activation produce a spatial attention map $A \in (0, 1)^{C \times H \times W}$. The final output $Z$ is the element-wise product of the input $X$ and attention $A$: $Z = X \odot \sigma(f(y))$. Each spatial location $(i, j)$ in $Z$ is thus informed by the context of its entire row and column in $X$ but without intermingling large, square 2D neighborhoods [2003.13328].

## 2. Formal Mathematical Formulation

Strip pooling operations are defined for each channel $c$ as:

\[
F_h(c, i, j) = \frac{1}{W} \sum_{k=1}^{W} X(c, i, k), \quad
F_w(c, i, j) = \frac{1}{H} \sum_{k=1}^{H} X(c, k, j)
\]

where $F_h$ (horizontal) is constant along $j$ and $F_w$ (vertical) is constant along $i$. After 1D convolutions on these pooled features, the result is merged by broadcasting:

- Horizontal: $C \times H \times 1 \rightarrow C \times H \times W$
- Vertical: $C \times 1 \times W \rightarrow C \times H \times W$

The summed result $y$ is passed through $1 \times 1$ convolution and sigmoid, yielding an attention tensor for feature map reweighting.

## 3. Module Internal Structure

The SPM is structured as follows:

- **Input:** $X \in \mathbb{R}^{C \times H \times W}$
- **Path A (Horizontal):**
  - Strip pool each row: $Y^h$ of $C \times H \times 1$
  - 1D convolution (kernel 3) $\rightarrow \widehat{Y}^h$
- **Path B (Vertical):**
  - Strip pool each column: $Y^v$ of $C \times 1 \times W$
  - 1D convolution (kernel 3) $\rightarrow \widehat{Y}^v$
- **Merge:** Broadcast $\widehat{Y}^h$ and $\widehat{Y}^v$ to shape $C \times H \times W$, sum to obtain $y$
- **Attention:** $1 \times 1$ convolution $f(\cdot) \rightarrow$ sigmoid $\sigma(\cdot) \rightarrow A$
- **Output:** $Z = X \odot A$

All strip and pointwise convolutions are typically followed by BatchNorm and ReLU, aside from the final $1 \times 1$ convolution before sigmoid. The parameter count is minimal: each 1D convolution introduces $C \times C \times 3$ parameters, and the $1 \times 1$ convolution has $C^2$ parameters [2003.13328].

## 4. Integration into Backbone Architectures

SPM can be inserted into standard ResNet architectures using the following prescribed pattern:

- Conduct “dilated” convolutions in the last two ResNet stages (4 and 5), so the final feature stride is $1/8$.
- Insert an SPM after the $3 \times 3$ convolution in the final residual block of each of the first three stages.
- For the last stage (typically 3–4 residual blocks), insert an SPM after every $3 \times 3$ convolution.
- The SPM output is integrated into the usual residual addition; no special skip connections required.
- In code, this is implemented with a boolean flag activating SPM in late stages/residual blocks.

The module can be used as a plug-in attention block for any convolutional feature map of shape $C \times H \times W$. Standard training protocols apply; no alterations for loss functions, normalization, or learning rate schedules are required [2003.13328].

## 5. Hyperparameters and Ablation Insights

Key hyperparameters and ablation findings include:

- **Kernel Lengths:** Strip pooling uses the full width $W$ (horizontal) and height $H$ (vertical) of the input tensor, providing global 1D context without further dilation.
- **Channel Widths:** The module is channel-preserving; the 1D and $1 \times 1$ convolutions maintain the channel size $C$.
- **Insertion Strategy:** Maximum mIoU gain is realized by applying SPM primarily in deeper layers. Excessive use across all layers yields diminishing returns.

Ablation results on ADE20K (ResNet-50, single-scale test):

| Module      | mIoU (%) |
|-------------|----------|
| Base FCN    | 37.63    |
| +SPM (late) | 41.66    |
| +2 MPM      | 41.92    |
| +2 MPM + SPM| 44.03    |

## 6. Empirical Performance

SPM confers significant improvements in scene parsing benchmarks:

- **ADE20K (ResNet-50, single model, single-scale):**
  - Base FCN: 37.63% mIoU
  - +PPM (PSPNet): 41.68% mIoU
  - +2 MPM: 41.92% mIoU
  - +2 MPM + SPM (SPNet-50): 44.03% mIoU

- **ADE20K (multi-scale+flip):**
  - SPNet-50: 45.03% mIoU
  - SPNet-101: 45.60% mIoU

- **Cityscapes (test, ResNet-101, fine only):**
  - DANet / CCNet / APCNet: 81.4–81.5% mIoU
  - SPNet: 82.0% mIoU

- **Parameter Overhead:**
  - ResNet-50: 27.7M (base), with SPM+MPM: 39.6M, which is ~9M fewer than PPM/PSPNet (48.7M).

SPNet, which extensively uses SPM, surpasses PSPNet’s accuracy with substantially fewer parameters. This efficiency makes SPM attractive for large-scale, high-performance semantic segmentation tasks [2003.13328].

## 7. Practical Implementation Guidance

- SPM is modular and can be integrated into any $C \times H \times W$ convolutional feature map.
- Strip pooling’s single-axis context aggregation preserves local spatial detail more effectively than global (square) pooling while yielding full-image context in each direction.
- Optimal cost-accuracy tradeoff is achieved by restricting SPM to moderate-resolution, late-stage feature maps (e.g., with $H$ and $W$ at $1/8$ or $1/16$ spatial scale).
- Combining SPM with the lightweight mixed pooling module (MPM), which focuses on close-range context via pyramid pools, further enhances performance.
- Typical networks require only a modest number of SPM insertions—e.g., last block of each ResNet stage and all blocks in the final stage—to achieve $>4\%$ mIoU gain on ADE20K.
- No special training tricks are necessary; SPM integrates seamlessly with standard learning rate schedules and loss functions [2003.13328].

Source: https://www.emergentmind.com/topics/strip-pooling-module-spm