DISK: Differentiable Sparse Kernel Complex for Efficient Spatially-Variant Convolution

Zhizhen Wu, Cao Zhe, Yuchi Huo

TL;DR

DISK (Differentiable Sparse Kernel Complex) is a new framework that replaces heavy, "dense" convolution kernels with a sequence of lightweight, sparse layers. By turning kernel decomposition into a differentiable optimization problem, the authors achieve high-fidelity spatially-varying effects—like realistic bokeh and motion blur—with up to a 20x speedup, making it practical for real-time use on mobile devices.

The Cost of Complex Convolution

Convolution is the bread and butter of image processing, used for everything from simple sharpening to complex "bokeh" effects in portrait mode. However, as kernels get larger and more complex (non-convex shapes like stars or hearts), the computational cost explodes quadratically ($O(M^2)$).

The challenge is even steeper for spatially-varying (SV) filtering, where the blur changes at every pixel (e.g., objects further away are blurrier). Generating and applying a unique, complex kernel for every single pixel is a massive bottleneck for memory and processing power. Existing shortcuts either struggle with non-circular shapes (low-rank methods) or rely on slow, "guess-and-check" heuristic searches like simulated annealing that often fail to find the best representation.

The DISK Approach

The authors introduce the Sparse Kernel Complex, which represents a single dense filter as a sequence of $L$ layers, each containing only a handful of sparse samples (offset-weight pairs).

Comparison of a dense kernel requiring 4489 samples versus the proposed sparse sequence requiring only 48 samples.

Key innovations include:

  • Differentiable Optimization: Instead of using heuristics, DISK treats the positions (offsets) and weights of the sparse samples as learnable parameters. They apply the sparse filter sequence to a single pixel (a Dirac delta function) to synthesize an "impulse response" and use gradient descent (Adam optimizer) to minimize the difference between this result and the target dense kernel.
  • Shape-Aware Initialization: To prevent the optimization from getting stuck in "local optima," they use a two-part strategy: a radial initialization for stability and a "Sparse Sampling" method using rejection sampling to ensure the initial points actually cover the non-zero parts of complex, non-convex kernels.
  • Filter-Space Interpolation: For spatially-varying effects, they precompute a "basis" of optimized sparse filters. At runtime, the system simply interpolates between these basis filters based on a per-pixel parameter map (like a depth map). This decouples the cost of generating the kernel from the resolution of the image.

Datasets and Evaluation

The researchers evaluated DISK using a wide variety of target kernels and images:

  • Kernels: Standard Gaussians ($ \sigma=5$ to $11$), geometric shapes (disks, rings, polygons), non-convex shapes (hearts, stars, ampersands), animal silhouettes, and real-world optical Point Spread Functions (PSFs) like coma and spherical aberration.

  • Images: Five high-resolution photographs representing realistic scenarios with complex textures.

  • Hardware: Benchmarks were performed on a high-end NVIDIA RTX 4090 and a mobile Qualcomm Snapdragon 8 Gen 3 SoC.

Key Insights and Results

  • Gradient Descent Wins: By framing kernel approximation as a differentiable task, DISK converges to a high-fidelity solution in roughly 1/100th the iterations required by previous state-of-the-art heuristic methods (like Parallel Simulated Tempering).
  • Linearity in Filter Space: A surprising "aha moment" is that these optimized sparse kernels appear to vary more linearly than other representations. This allows for smooth, high-quality interpolation between different blur levels without introducing the "blocky" artifacts common in low-rank decompositions.
  • Impulse Response "Collapsing": By supervising the model based on its impulse response, the authors can effectively "collapse" a complex multi-pass filtering sequence into a single target comparison during training.
The DISK pipeline: differentiable optimization of complex kernels and its application to real-time spatially varying filtering, achieving massive speedups.

Ultimately, DISK achieves up to a 20x speedup compared to traditional dense convolution. In tests on non-convex kernels (like a star shape), DISK maintained significantly higher PSNR and lower perceptual error (LPIPS) than both low-rank and simulated annealing baselines. The authors successfully demonstrated real-time (sub-20ms) spatially-varying effects like tilt-shift and rotational bokeh on a mobile Snapdragon processor, where traditional methods would be prohibitively slow.

Limitations and Future Work

  • Target Dependency: Currently, the method requires you to already have the target dense kernel to perform the optimization. It cannot "invent" a kernel from scratch without a reference.
  • Optimization Time: While the inference (running the filter) is lightning-fast, the offline optimization for a new kernel still takes time (though much less than previous methods).
  • Future Directions: The authors suggest using Neural Architecture Search (NAS) to automatically discover even more efficient hardware-optimized filter structures and expanding the parameter maps to handle more dimensions of control simultaneously.

Summary updated

BibTeX
@inproceedings{wu2026disk,
  author = {Zhizhen Wu and Cao Zhe and Yuchi Huo},
  title = {{DISK: Differentiable Sparse Kernel Complex for Efficient Spatially-Variant Convolution}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=bbuxDoRD2D},
}
Figure