Tunable Convolutions with Parametric Multi-Loss Optimization

Matteo Maggioni, Thomas Tanay, Francesca Babiloni, Steven McDonagh, Ales Leonardis

Introduction

In the field of image restoration, researchers often face a fundamental trade-off between fidelity and perceptual quality. A model optimized for peak Signal-to-Noise Ratio (PSNR) frequently produces results that appear blurry to the human eye, while a model optimized for perceptual realism may introduce unwanted artifacts or "hallucinated" details. Traditionally, navigating this "perception-distortion trade-off" required training and deploying multiple separate models, each fixed to a specific point on the spectrum.

"Tunable Convolutions" introduces a paradigm shift by enabling a single neural network to navigate a continuous landscape of behaviors at inference time. By utilizing simple interactive parameters—effectively "sliders"—users can adjust a model's output (e.g., balancing sharpness against noise reduction) without retraining or increasing the model's memory footprint.

The Problem: Static Models in a Dynamic World

Current image restoration tasks, such as denoising, deblurring, and super-resolution, lack a singular "perfect" solution. The optimal output often depends on the specific use case or user preference. Existing "controllable" networks attempt to address this but often suffer from significant drawbacks:

  1. Limited Range: Many are restricted to toggling between only two objectives.
  2. Complexity: Some require heavy auxiliary modules for every new feature added.
  3. Instability: Models often behave unpredictably when set to intermediate states that were not explicitly optimized during training.

Methodology: Linking Architecture to Supervision

The proposed framework rests on two interconnected innovations that synchronize the model's architecture with its training objective.

1. Tunable Convolutional Layer

Instead of employing static weights, the Tunable Convolutional Layer consists of $p$ individual kernels. At inference time, the effective kernel used for computation is a linear interpolation of these $p$ kernels, governed by a set of interactive parameters $\omega$. This allows the network's fundamental operations to morph based on user input.

2. Parametric Multi-Loss Optimization

To ensure these kernels learn meaningful, distinct behaviors, the authors introduce a corresponding loss function. During training, the total loss is a weighted sum of $p$ different objectives (such as $L_1$ loss for fidelity and GAN loss for texture).

The Shared Control Mechanism: The critical innovation is that the same parameters $\omega$ used to blend the kernels are used to blend the loss functions. By sampling $\omega$ at random for every training batch, the network is forced to "disentangle" the objectives. Kernel 1 learns to satisfy objective 1, kernel 2 learns objective 2, and so on. This creates an explicit mathematical link between a specific "knob" and a specific behavior, ensuring that intermediate values of $\omega$ produce coherent, interpolated results.

Crucially, this is a drop-in replacement. Researchers can take state-of-the-art architectures like SwinIR or NAFNet, swap the standard convolutions for tunable ones, and gain interactivity with negligible computational cost.

Experimental Setup and Datasets

The researchers evaluated Tunable Convolutions by integrating them into several standard computer vision benchmarks. The models were trained on the high-quality DIV2K dataset and tested across several tasks:

  • Denoising/Deblurring: Kodak and CBSD68.
  • Real-world Denoising: Smartphone Image Denoising Dataset (SIDD).
  • Super-Resolution: Set5, Set14, BSD100, and Urban100.
  • Style Transfer: Artistic transformations using styles like Mosaic, Edtaonisl, and Kandinsky.

Key Results and Insights

The experiments yielded several significant findings regarding the efficiency and flexibility of the tunable approach:

  • Performance Parity: When the control parameters are set to prioritize maximum fidelity, the tunable versions of SwinIR and NAFNet matched or even slightly exceeded the performance of the original, non-tunable baselines. Tunability does not come at the cost of base accuracy.
  • Smooth Interpolation: Unlike previous methods (such as DNI, DyNet, or CFSNet) that might exhibit "sudden jumps" or artifacts when moving between states, Tunable Convolutions provide smooth, predictable transitions. Noise disappears gradually, and edges sharpen without the introduction of strange artifacts.
  • Multi-Objective Scaling: The framework successfully scales beyond binary choices. The authors demonstrated the ability to blend three distinct artistic styles simultaneously, providing a high degree of creative control in real-time.
  • Efficiency: The overhead is remarkably low. For a typical setup with four control parameters, the runtime increase is less than 5% compared to a standard "frozen" convolution.

Limitations and Future Directions

While powerful, the method has specific constraints. The objectives must be defined before training; a new "knob" (e.g., a new style) cannot be added post-hoc without retraining the kernels. Additionally, the relative weighting ($\lambda_i$) between different losses still requires manual tuning during the initial setup to ensure one objective does not dominate the others.

Future research may explore non-uniform sampling distributions for $\omega$ to prioritize specific "sweet spots" in the trade-off landscape. Furthermore, the application of tunable layers to other domains, such as controlling the "creativity" versus "factuality" of generative models, presents a promising avenue for future exploration.

Summary updated

BibTeX
@inproceedings{maggioni2023tunable,
  author = {Matteo Maggioni and Thomas Tanay and Francesca Babiloni and Steven McDonagh and Ales Leonardis},
  title = {{Tunable Convolutions with Parametric Multi-Loss Optimization}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
}
Figure