NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning to Predict Context-Adaptive Convolution for Semantic Segmentation

Jianbo Liu, Junjun He, Yu Qiao, Jimmy S. Ren, Hongsheng Li

TL;DR

CaC-Net improves semantic segmentation by predicting spatially-varying channel weights instead of applying a single global weight to the entire image. By using an efficient "query-key" mechanism to generate adaptive convolution kernels, the model achieves state-of-the-art accuracy on major benchmarks while remaining computationally practical.

What Problem Does This Paper Address?

In semantic segmentation, the goal is to assign a category label (like "car," "tree," or "sky") to every pixel. To do this accurately, models need context. For example, a blurry blue patch is more likely to be "water" if there is a "boat" nearby.

Previous state-of-the-art methods (like SE-Net or EncNet) use global feature re-weighting. They look at the whole image, decide which feature channels are important (e.g., "water-related features"), and scale those channels up across the entire image.

Comparison of global vs. spatially-varying feature re-weighting.

The authors argue this is sub-optimal. A "water" feature might be highly relevant for pixels in a river but completely irrelevant for pixels representing a bird in the sky within the same image. Standard global re-weighting ignores these spatial differences. The challenge is that predicting unique, high-dimensional weights for every single pixel location is usually too "heavy" in terms of parameters and memory for real-world use.

Methods

The authors propose the Context-adaptive Convolution (CaC) module. Its workflow consists of two main stages:

The CaC-Net architecture and its internal modules.
  1. Kernel Prediction: Instead of using a massive fully-connected layer to predict weights (which would be $O(s^2c^3)$ complexity), they use a parameter-efficient "query-key" approach. The input feature map is transformed into a "Query" ($Q$) and a "Key" ($K$). By performing a matrix multiplication ($D = Q^T K$), they generate a set of convolution kernels that capture global spatial distributions.
  2. Weight Generation: These predicted kernels are then used in a depth-wise convolution over the original feature map. Because the convolution moves across the image, it generates a unique weighting factor for each spatial location.

To make the system even more robust, they apply these predicted kernels using multiple dilation rates (1, 2, and 3). This allows the model to capture context at multiple scales—essential for images containing both large buildings and tiny pedestrians.

Datasets

The researchers evaluated CaC-Net on three standard, highly competitive computer vision benchmarks:

  • PASCAL Context: A challenging scene-understanding dataset with 60 categories.
  • PASCAL VOC 2012: A classic segmentation benchmark focusing on 20 foreground object classes.
  • ADE20K: A large-scale dataset with 150 categories, known for its complexity and high density of objects.

Key Insights and Ideas

  • Context is Localized: The core "aha" moment is that while context is gathered globally, its application should be local. Different regions of an image have different needs.
  • Efficiency via Factorization: By treating kernel prediction as a matrix multiplication between queries and keys, the authors reduced the parameter overhead significantly. This makes "dynamic filters"—which are usually too expensive for segmentation—feasible.
  • Scale-Aware Weighting: Using dilated depth-wise convolutions with the same predicted kernels allows the model to be scale-invariant without a massive increase in parameters.

Key Results

CaC-Net consistently outperformed previous methods across all tested datasets:

  • PASCAL Context: Achieved 55.4% mIoU (mean Intersection over Union), significantly higher than the previous leader, EncNet (51.7%).
  • ADE20K: Reached 46.12% mIoU, surpassing other heavyweights like APCNet and DMNet.
  • PASCAL VOC 2012: Achieved 85.1% on the test set without needing extra pre-training on the massive MS-COCO dataset.
  • Efficiency: The CaC head adds less than 10% extra computational cost compared to the ResNet-101 backbone, making it much lighter than competing "dynamic" segmentation heads.

Limitations and Future Work

The authors noted a few practical limits during their ablation studies:

  • Diminishing Returns on Complexity: Increasing the number of CaC "heads" (multi-head ensemble) beyond two or increasing the dilation rate beyond 3 led to overfitting or increased complexity without significant performance gains.
  • Kernel Size: The study primarily focused on 3x3 kernels. While larger kernels might capture more info, they would also increase the parameter count, potentially negating the efficiency benefits of the CaC module.

Future work could involve exploring how these context-adaptive kernels perform in other domains, such as video object segmentation or real-time applications where efficiency is even more critical.

Summary updated

BibTeX
@inproceedings{liu2020learning,
  author = {Jianbo Liu and Junjun He and Yu Qiao and Jimmy S. Ren and Hongsheng Li},
  title = {{Learning to Predict Context-Adaptive Convolution for Semantic Segmentation}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58595-2\_46},
}
Figure