Papers
Topics
Authors
Recent
Search
2000 character limit reached

AdaWPT: Adaptive Window Pruning for Deblurring

Updated 27 April 2026
  • The paper introduces AdaWPT, a mechanism that prunes non-blurred regions to enhance deblurring efficiency and accuracy in Vision Transformers.
  • It combines window-based attention, blur confidence prediction, and Gumbel-Softmax sampling to prune approximately 66% of windows, reducing FLOPs and accelerating inference.
  • Empirical results show improved PSNR and computational savings through its U-shaped encoder–decoder approach, highlighting a balance between performance and efficiency.

AdaWPT (Adaptive Window Pruning Transformer) is a mechanism designed to enhance the efficiency and fidelity of local motion deblurring in high-resolution images by dynamically selecting computation regions within a vision Transformer architecture. Local motion blur, characterized by spatially varying blur patterns due to moving objects and static backgrounds, presents challenges for contemporary deblurring networks that predominantly perform global operations. AdaWPT addresses this inefficiency by pruning non-blurred spatial windows during processing, focusing Transformer capacity on genuinely degraded regions. Developed in the context of the Local Motion Deblurring Vision Transformer (LMD-ViT), AdaWPT integrates window-based attention, blur-aware confidence prediction, Gumbel-Softmax-based discrete window selection, and loss functions guided by annotated blur masks (Li et al., 2023).

1. Structural Overview and Context

LMD-ViT employing AdaWPT follows a U-shaped encoder–decoder architecture with skip connections. AdaWPT blocks are inserted at various resolution levels, both in the encoder, bottleneck, and decoder pathways. The input image BRH×W×3B\in\mathbb{R}^{H\times W\times 3} is projected to an initial feature map X0X_0. Each encoder stage includes a down-sampling operation followed by nin_i AdaWPT blocks, generating successively lower-resolution (XiX_i) feature maps. After a two-block AdaWPT bottleneck, the decoder symmetrically upsamples the features, integrating encoder features via skip connections. The network outputs a residual image RR, added to the input BB to yield the final sharp prediction S=B+RS' = B + R. Only AdaWPT blocks conduct adaptive window pruning; other layers use standard convolutional or sampling operations (Li et al., 2023).

2. Window Partitioning and Feature Tokenization

An input feature map XRH×W×CX\in\mathbb{R}^{H\times W\times C} entering an AdaWPT block is partitioned into a grid of non-overlapping P×PP \times P spatial windows:

N=HP×WP,{Wi}i=1N,WiRP×P×CN = \frac{H}{P} \times \frac{W}{P}, \quad \{W_i\}_{i=1}^{N}, \quad W_i \in \mathbb{R}^{P \times P \times C}

Each window X0X_00 is flattened and/or linearly projected to a token vector:

X0X_01

This yields a set of tokens X0X_02 representing local regions, forming the computational units for adaptivity.

3. Blurriness Confidence Prediction and Gumbel-Softmax Pruning

AdaWPT employs a learned blurriness confidence predictor. In the first block at each scale (AdaWPT-F), each X0X_03 passes through a multi-layer perceptron stack:

X0X_04

Softmax is applied to X0X_05 to obtain a blur confidence X0X_06:

X0X_07

Subsequent blocks at the same scale (AdaWPT-P) reuse the same X0X_08 decision map.

During training, binarization of X0X_09 is facilitated by the Gumbel-Softmax re-parameterization. Sampling with Gumbel noise nin_i0 and temperature nin_i1 yields a soft, differentiable discrete decision:

nin_i2

where nin_i3, nin_i4. The hard sample nin_i5 is used in the forward pass, with gradients propagated through the soft variable nin_i6 (straight-through estimator). At inference, nin_i7 is set as nin_i8 if nin_i9 (a threshold, with XiX_i0 used in practice), and XiX_i1 otherwise (Li et al., 2023).

4. Pruning Mechanism and Transformer Application

During the forward pass, only windows with XiX_i2 are retained for subsequent Transformer computation; others are zeroed:

XiX_i3

Retained windows proceed through window-based multi-head self-attention (W-MSA) and local feed-forward (W-LeFF) operations. After processing, outputs are scattered back into the original spatial grid.

The pruning procedure is applied in both encoder and decoder stages, compounding computational savings by focusing on windows corresponding to blurred regions. A single confidence map is predicted and reused within each resolution group, reducing redundant computation (Li et al., 2023).

5. Supervision and Loss Functions

End-to-end training of LMD-ViT with AdaWPT is supervised by a composite loss:

  • Reconstruction loss (XiX_i4): Per-pixel loss (e.g., XiX_i5) between deblurred prediction XiX_i6 and ground truth XiX_i7, potentially emphasizing annotated blur regions defined by mask XiX_i8.
  • Pruning loss (XiX_i9): Binary cross-entropy between predicted windowwise RR0 and downsampled ground-truth mask RR1, enforcing RR2 on blurred regions and RR3 elsewhere:

RR4

The total loss is

RR5

with RR6 tuned to balance deblurring and pruning accuracy (RR7--RR8) (Li et al., 2023).

6. Computational Complexity and Comparative Results

With RR9 windows and local window FLOPs BB0, the unpruned network computes BB1 operations per block. Window pruning yields

BB2

with relative FLOPs reduction BB3. Empirically, AdaWPT prunes BB4 of windows, leading to a 66\% FLOPs saving and over BB5 inference speedup versus global Transformer baselines (Uformer, Restormer), while also increasing PSNR by BB6 dB. Weighted PSNR improves by BB7 dB over the best-performing CNNs with comparable or faster inference. Pruning in all 9 AdaWPT blocks provides the optimal trade-off, reducing inference time from 1.30 s to 0.56 s. Refined blur masks enhance pruning precision from 66\% to 97\%, yielding a further BB8 dB PSNR increase (Li et al., 2023).

System FLOPs Reduction Speedup PSNR Gain
vs. best CNN (ReLoBlur) n/a similar +0.50 dB
vs. global Transformer 66% >2× +0.28 dB

7. Limitations and Prospective Enhancements

Operationally, AdaWPT is not yet real-time for very high-resolution images. While pruning precision exceeds 95%, small or subtle blur regions may be missed. A plausible implication is that precise blur-region detection governs deblurring fidelity and computational efficiency. Future extensions proposed include integrating cross-window context into the confidence predictor, employing dynamic window sizes, multi-task deblurring and mask refinement, hardware-aware real-time implementations, and expanding to temporal modules for multi-frame deblurring.

In summation, AdaWPT’s integration of region-aware token selection, blur-confidence prediction, Gumbel-Softmax binarization, and selective Transformer computation efficiently targets the spatially localized nature of real-world motion blur, elevating both restoration accuracy and resource utilization efficiency (Li et al., 2023).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to AdaWPT Window Pruning.