Abstract
In recent years, deep neural networks (DNNs) achieved unprecedented performance in many low-level vision tasks. However, state-of-the-art results are typically achieved by very deep networks, which can reach tens of layers with tens of millions of parameters. To make DNNs implementable on platforms with limited resources, it is necessary to weaken the tradeoff between performance and efficiency. In this paper, we propose a new activation unit, which is particularly suitable for image restoration problems. In contrast to the widespread per-pixel activation units, like ReLUs and sigmoids, our unit implements a learnable nonlinear function with spatial connections. This enables the net to capture much more complex features, thus requiring a significantly smaller number of layers in order to reach the same performance. We illustrate the effectiveness of our units through experiments with state-of-the-art nets for denoising, de-raining, and super resolution, which are already considered to be very small. With our approach, we are able to further reduce these models by nearly 50% without incurring any degradation in performance.
Introduction
Image restoration tasks—such as denoising, de-raining, and super-resolution—are currently dominated by deep Convolutional Neural Networks (CNNs). While these models perform exceptionally well, they often require massive parameter counts and deep architectures to achieve state-of-the-art results. This "depth-for-performance" trade-off poses a significant challenge for deployment on resource-constrained devices like smartphones or IoT hardware.
Traditionally, spatial processing is handled entirely by convolutional layers, while activation functions (like ReLU or Sigmoid) are simple, per-pixel operations. The authors of xUnit argue that this division of labor is inefficient. By introducing spatial context into the activation layer itself, networks can extract complex features more efficiently, allowing for much shallower architectures.
The xUnit Architecture
The core innovation is the xUnit, which treats activation as a "soft gating" mechanism. Unlike the hard thresholding of a ReLU, the xUnit computes a continuous-valued weight map ($g_k$) that is multiplied element-wise with the input features.
The xUnit computes this weight map through a small internal pipeline:
- Batch Normalization & ReLU: Used for stability and initial non-linearity.
- Depth-wise Convolution: This is the critical "spatial" component. It allows the activation to incorporate information from neighboring pixels. Using depth-wise convolution keeps the parameter overhead minimal.
- Gaussian Gating: The output is passed through an exponential function ($\exp(-d^2)$), ensuring gating values are bounded between 0 and 1.
By investing a small portion (roughly 15–20%) of the total parameter budget into these "smart" xUnits, the overall network can be made significantly shallower while maintaining performance.
Experimental Results
The authors evaluated xUnit across three major restoration tasks: image denoising (BSD68), single image rain removal (Rain12), and super-resolution (BSD100).
Key Performance Metrics
- Denoising (xDnCNN): A 9-layer network using xUnits matched the performance of the 17-layer state-of-the-art DnCNN while using only 54% of the parameters (303K vs 555K).
- De-raining: The xDnCNN achieved a higher PSNR (31.17 dB) on the Rain12 dataset compared to the original DnCNN (30.90 dB) and DerainNet (28.94 dB), despite being significantly smaller.
- Super-Resolution: The xSRCNNf model achieved comparable results to the standard SRCNN but reduced the parameter count from 57K down to 32K.
Insights and Discussion
Visualizations reveal that xUnit activations are "denser" than ReLUs. While ReLUs often zero out large portions of feature maps (sparsity), xUnits learn complex, continuous maps where more channels actively participate in the restoration process. This allows a shallow network with xUnits to outperform much deeper ReLU-based networks. For instance, a 3-layer xNet with $9 \times 9$ activations outperformed a 9-layer standard ConvNet while using less than one-third of the parameters.
Limitations
While xUnits reduce the total number of parameters, they are computationally more expensive per layer than a simple ReLU. The use of exponentiation and additional depth-wise convolutions increases the number of floating-point operations (FLOPs). While look-up tables can mitigate the cost of the exponential function, the xUnit remains inherently slower to compute than a standard ReLU. Furthermore, while highly effective for low-level restoration, the applicability of spatial activations to high-level vision tasks (like classification) remains an open research question.
Conclusion
xUnit represents a shift in how we think about activation functions in restoration networks. By moving away from per-pixel operations and embracing spatial context within the activation layer, xUnit enables the design of highly efficient, shallow networks that rival the performance of their much deeper counterparts. This makes high-quality image restoration more accessible for mobile and embedded applications.
Summary updated