Motion blur smears each point of a scene along a path, the trajectory the camera or object traced during the exposure. Undoing it requires information from far along that path, which is why deblurring networks need a wide receptive field, meaning the region of the input that can influence each output pixel. The fastest current way to get a wide receptive field at linear cost is a state space model: a learned linear recurrence, as in Mamba, that reads the image as a one-dimensional sequence and carries a running memory along it. The catch is that the image must first be flattened into a sequence. Every existing deblurring model of this kind flattens along fixed axes: rows, columns, or flips and transposes of them. Real blur trajectories are diagonal, curved, and differ from pixel to pixel.
We propose to order the sequence along the blur itself. A lightweight head predicts a per-pixel blur-direction field. We trace streamlines of that field, gather the features along each streamline into a sequence, and run the state-space scan there, with an orthogonal scan across streamlines to mix them. The claim is specific and testable. Along its own trajectory, motion blur is a one-dimensional convolution, and a one-dimensional convolution is inverted exactly by a linear recurrence. A state-space scan that follows the trajectory can therefore implement a learned, stabilized deconvolution. A scan along fixed axes cannot, because the pixels on the path arrive interleaved with unrelated pixels at irregular gaps.
Core Claim
Consider a pixel sequence $x_1, x_2, \dots$ sampled along one blur trajectory. Let $y_s$ be the blurry observation at position $s$, and let $L$ be the blur length in pixels. With uniform motion, the observation is a box average of the sharp values, which can be rearranged into a recurrence:
$$y_s = \frac{1}{L}\sum_{j=0}^{L-1} x_{s-j} \quad\Longrightarrow\quad x_s = x_{s-L} + L\,(y_s - y_{s-1}).$$
The recurrence follows by subtracting consecutive averages. It is unstable as written, because errors accumulate. Its structure is nonetheless exactly that of a linear recurrence with memory of length about $L$ along the path. A selective state-space scan is a learned, input-dependent version of such a recurrence, so it can learn a damped version of the inversion. This is the physics that unfolding methods such as DGUNet and DWDN inject through explicit gradient or Wiener steps. Here it enters only through the ordering of the scan, with no kernel estimate and no extra inference stages.
The prediction that follows is sharp. Gains over axis-aligned scanning should concentrate on pixels whose blur is long and not aligned with the image axes. On short or horizontal blur there should be no gain.
Relation to Prior Work
Three papers supply the diagnosis we build on. MambaIR brought selective state-space scans to restoration with four-direction flattening. It identified "local pixel forgetting", where 2D neighbours end up far apart in the sequence, and patched it with depth-wise convolutions. It did not address motion deblurring. XYScanNet argues that whole-image flattening also causes spatial misalignment, with distant pixels placed next to each other. It slices the features along the X and Y axes, with intra-slice and inter-slice scanners. EVSSM instead alternates flips and transposes across layers so that a single scan per layer suffices, and adds a frequency-domain feedforward block.
All three share our premise that scan order matters for deblurring. All three restrict the order to the image axes. Our proposal keeps their machinery (inter/intra scanning, a single scan per layer, a local convolution branch) and changes only where each sequence goes.
Stripformer is the strongest evidence that aligning computation with blur direction helps. Its horizontal and vertical strip attention reached 33.08 dB on GoPro. It is also axis-aligned, and it pays $O(HW(H+W))$ attention cost where a scan pays linear cost.
On the physics side, F2former motivates the problem: standard Fourier operators assume blur is the same everywhere in the image, which fails on spatially varying motion. Its fix, a fractional Fourier Wiener step, depends on an external pretrained kernel estimator. We take on the same non-stationarity without estimating kernels. We estimate only a direction field, which is a far easier target. Butterworth as Attention learns rotatable elliptical spectral filters. It is anisotropic but global: one orientation response is applied across the whole image, so it constrains rather than solves the per-pixel problem. Deformable designs such as DAS and ERDN also sample off-grid along salient directions. They gather a handful of points with no memory, so they cannot express the long recurrence the equation above calls for.
Research Program
We build the trajectory-ordered scan as a drop-in replacement for the scan inside the EVSSM block. Everything else stays fixed: channel widths, the frequency feedforward block, the training schedule. Any difference can then be attributed to ordering.
At each encoder scale, a small convolutional head predicts an orientation field, an angle per pixel. It is predicted at quarter resolution and upsampled, and blur's sign ambiguity is handled by scanning each sequence in both directions. Streamlines are traced on the coarse grid by a fixed-step integrator. Each pixel is assigned to exactly one streamline, which yields a permutation of pixel indices. Features are gathered by that permutation and scanned with the recurrent state reset at streamline boundaries, as XYScanNet resets at slice boundaries. A second scan then runs across streamlines in a perpendicular ordering, and the results are scattered back. The gather and scatter are linear in the number of pixels. The permutation is not differentiable, so the orientation head is trained in two ways. The first is an auxiliary loss against blur directions derived from optical flow between the sharp frames that GoPro averages to synthesize each blurry image, used where those frames are available. The second, which needs no flow labels, is the restoration loss alone, passed through a soft mixture of the scan's outputs under K nearby orientations during a warm-up phase.
Beyond the model, the program has an analysis component. We will stratify test pixels by estimated blur length and by angle to the nearest image axis. We will then report every method's error per stratum, not only image-average PSNR. Without this, a 0.2 dB average change cannot be read.
Baselines
The naive reference is the blurry input itself, together with the identity-scan control: the same network with the orientation head replaced by a fixed raster ordering. This control isolates what any ordering buys over the backbone's convolutions and feedforward blocks.
The strongest existing method in the file is EVSSM. It reports 34.51 dB PSNR on GoPro, 0.3 dB above FFTformer, at 89 ms per 256×256 crop (EVSSM). It is the right primary competitor because it is the same model family with the best reported fidelity, and our method differs from it in exactly one component. We will retrain it from public settings on our hardware under the identical schedule and data, and report both our reproduction and the published number. Beating it means an average GoPro gain at or above the gap between the two reproduced runs' seed variance and our model, plus a clear gain in the long, off-axis stratum, at latency within 1.3 times that of EVSSM. For HIDE and RealBlur, no exact reported result for EVSSM was found on Lacuna. Comparisons there will rely entirely on our reproductions.
XYScanNet is the competitor for axis-sliced scanning. It reports 0.073 KID on GoPro (XYScanNet), so we will report KID and LPIPS alongside PSNR and SSIM. NAFNet, at 33.69 dB on GoPro (NAFNet), is the local-convolution reference. Stripformer, at 33.08 dB, is the directional-attention reference.
The key ablation is the random-direction-field scan. It uses the same streamline machinery and compute, but with a smooth random orientation field. If it matches the learned field, our gain is irregular mixing, not trajectory alignment. The oracle-field scan, which uses flow-derived directions at test time, bounds what better direction prediction could add.
Why not just…?
Why not just add diagonal scan directions to a fixed-order SSM? This is the most serious threat. Eight fixed orientations could approximate most straight trajectories well enough. We will run an eight-direction variant in two forms: one with eight times the scan cost, and one that alternates directions across layers in EVSSM's style at equal cost. If either matches the trajectory-ordered scan on the off-axis stratum, the honest conclusion is that orientation coverage, not per-pixel alignment, is what matters, and the simpler design wins. Our method can only win where trajectories curve or vary within a region. The rotation test below targets exactly that.
Why not just use a larger NAFNet or a multi-scale CNN? NAFNet already trails EVSSM by 0.82 dB on GoPro despite its efficiency. MIMO-UNet++ at 32.68 dB (MIMO-UNet) shows that coarse-to-fine pyramids lag further. We will still include a NAFNet scaled to our FLOPs, so the comparison is not purely against published sizes.
Why not just unfold a Wiener or proximal-gradient solver with an SSM prior? This is the obvious combination of the two directions. It adds stages and latency. In F2former's version it also inherits dependence on kernel accuracy. Our scan injects the same recurrence structure in a single pass. If a two-stage unfolded EVSSM at matched FLOPs beats us, that result is informative, so we will run it.
Why not just use anisotropic spectral gating? Butterworth gating applies one global orientation response per image. Our per-stratum analysis on GoPro scenes with multiple moving objects will show whether that suffices. We expect it to fail where object and camera motion disagree.
Proposed Experiments
We train on the GoPro training split and evaluate on the GoPro test split and on HIDE without fine-tuning. We evaluate on RealBlur-J and RealBlur-R both with and without fine-tuning on their training splits. Unpaired RWBI images are scored by NIQE. We use three seeds per configuration and report PSNR, SSIM, LPIPS, and KID, along with latency at 256×256 and 720p.
The first decisive check is the per-stratum analysis. The trajectory-ordered scan should beat EVSSM by a margin that grows with blur length and with angle from the axes, and should tie on short or horizontal blur. A uniform gain across strata would undercut the mechanism even if the average improves.
The second check is rotation. We rotate GoPro test images by 30°, 45°, and 60° and crop the valid centre. Axis-aligned scanners (EVSSM, XYScanNet, Stripformer) should degrade relative to their unrotated scores. A trajectory-ordered scan should degrade much less, because its ordering rotates with the content.
The third check is the field ablation. Comparing the learned, random, and oracle direction fields tells us whether alignment is the cause. The gap between learned and oracle tells us whether direction estimation is the bottleneck.
If the learned field beats the random field, is close to the oracle, and the gains sit where the equation says they should, the result supports a general lesson: for linear-recurrence models in restoration, the scan order should follow the degradation's own geometry.
References
- Deep Generalized Unfolding Networks for Image Restoration
- DWDN: Deep Wiener Deconvolution Network for Non-Blind Image Deblurring
- MambaIR: A Simple Baseline for Image Restoration with State-Space Model
- XYScanNet: A State Space Model for Single Image Deblurring
- Efficient Visual State Space Model for Image Deblurring
- Stripformer: Strip Transformer for Fast Image Deblurring
- F2former: When Fractional Fourier Meets Deep Wiener Deconvolution and Selective Frequency Transformer for Image Deblurring
- Butterworth as Attention: Anisotropic Spectral Gating for Pansharpening
- DAS: A Deformable Attention to Capture Salient Information in CNNs
- ERDN: Equivalent Receptive Field Deformable Network for Video Deblurring
- Simple Baselines for Image Restoration
- Rethinking Coarse-to-Fine Approach in Single Image Deblurring