KBNet: Kernel Basis Network for Image Restoration

Yi Zhang, Dasong Li, Xiaoyu Shi, Dailan He, Kangning Song, Xiaogang Wang, Hongwei Qin, Hongsheng Li

Abstract

Image restoration requires balancing local structural awareness with adaptive feature processing. While CNNs offer efficiency and Transformers provide adaptivity, both have limitations in computational overhead or inductive bias. We present KBNet, which introduces Kernel Basis Attention (KBA) to learn a set of fundamental image patterns (bases) that are adaptively blended for every pixel. This mechanism enables pixel-adaptive convolution with significantly reduced complexity. Our Multi-axis Feature Fusion (MFF) block further integrates channel attention and depthwise convolutions to capture diverse features. KBNet achieves state-of-the-art results in denoising, deraining, and deblurring benchmarks while maintaining superior computational efficiency compared to existing heavyweights like Restormer and SwinIR.

Introduction

Standard convolutional neural networks (CNNs) typically utilize static kernels, applying the same filters across an entire image. While efficient, this approach lacks the flexibility to adapt to varying local structures such as edges, textures, and flat regions. Conversely, Transformers utilize self-attention for high adaptivity but often incur heavy computational costs and lack the inherent local inductive bias of convolutions. Dynamic convolutions attempt to address this by predicting unique kernels per pixel, but direct weight prediction is computationally prohibitive.

KBNet addresses these challenges by proposing a "middle ground" architecture. It leverages a set of learnable kernel bases that represent common local patterns. By predicting only the fusion coefficients for these bases at each pixel, the network achieves the benefits of dynamic convolution with the efficiency of static filters.

Methodology

Kernel Basis Attention (KBA)

The core innovation of KBNet is the Kernel Basis Attention module. Instead of generating a full convolutional kernel for every spatial location $(i, j)$, KBA maintains a set of $N$ learnable kernel bases $W$. For each pixel, the network predicts a small set of fusion coefficients $F[i, j]$. These coefficients are used to linearly combine the bases into a fused kernel $M[i, j]$, which is then applied to the enhanced feature map $X_e$.

The Kernel Basis Attention (KBA) module learns shared kernel bases and blends them per-pixel using predicted fusion coefficients.

This approach significantly reduces the parameter space for dynamic kernels. Notably, the authors found that omitting the Softmax normalization for fusion coefficients improved performance, as it allowed the model to more flexibly blend multiple bases rather than being forced to select a single dominant one.

Multi-axis Feature Fusion (MFF) Block

The MFF block serves as the fundamental building block of the KBNet architecture, typically arranged in a U-Net structure. It processes input features through three parallel branches:

  1. Channel Attention: Identifies important feature channels.
  2. Depthwise Convolution: Captures spatially-invariant, static local structures.
  3. KBA Module: Captures pixel-adaptive, dynamic local structures.

The outputs of these branches are fused via point-wise multiplication, followed by a $1 \times 1$ convolution and a residual connection to produce the final block output.

Experiments and Results

Datasets and Evaluation

KBNet was evaluated on over ten benchmarks across three primary tasks:

  • Denoising: Synthetic (CBSD68, Urban100) and real-world (SIDD, SenseNoise) datasets.
  • Deraining: Test2800 and Test1200 benchmarks.
  • Defocus Deblurring: The DPDD dataset.

Performance and Efficiency

KBNet demonstrates a superior trade-off between restoration quality (PSNR) and computational complexity (MACs). On the SIDD real-world denoising benchmark, KBNet achieved a state-of-the-art PSNR of 40.35 dB, surpassing NAFNet and Restormer.

Comparison of PSNR vs. MACs for various image restoration models. KBNet achieves higher performance with significantly lower computational cost.

As shown in the efficiency analysis, KBNet achieves higher PSNR than Restormer while utilizing approximately half the computational resources (e.g., 69G vs. 141G MACs in certain configurations). This efficiency stems from the "basis" approach, which allows for dense information representation without the global overhead of standard self-attention. Qualitative results further confirm that KBNet is particularly effective at recovering fine textures that other models often smudge.

Conclusion

KBNet effectively combines the strengths of CNNs and Transformers through its Kernel Basis Attention mechanism. By learning shared bases and predicting local fusion coefficients, it achieves high adaptivity and state-of-the-art performance across multiple restoration tasks with remarkable efficiency. While the current architecture focuses on local-to-regional feature aggregation, future work may explore integrating these efficient bases into global attention frameworks or extending the concept to video restoration for temporal consistency.

Summary updated

BibTeX
@misc{zhang2023kbnet,
  author = {Yi Zhang and Dasong Li and Xiaoyu Shi and Dailan He and Kangning Song and Xiaogang Wang and Hongwei Qin and Hongsheng Li},
  title = {{KBNet: Kernel Basis Network for Image Restoration}},
  year = {2023},
  eprint = {2303.02881},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.02881},
}
Figure