Abstract
Partial differential equation (PDE) models and their associated variational energy formulations are often rotationally invariant by design. This ensures that a rotation of the input results in a corresponding rotation of the output, a property highly desirable in image analysis. Convolutional neural networks (CNNs), however, do not inherently share this property. This paper investigates how diffusion and variational models achieve rotation invariance and transfers these principles to neural network architectures. We propose a novel class of activation functions that couple network channels by combining information from multiple oriented filters. This approach guarantees rotation invariance within the basic building blocks of the network while maintaining the capacity for directional filtering. Our results demonstrate that these architectures achieve superior invariance with fewer filters compared to existing techniques, providing a mathematically grounded framework for model-based CNN design.
Introduction
The intersection of classical mathematical physics and modern deep learning offers a fertile ground for developing more robust and interpretable models. A significant challenge in computer vision is achieving rotational invariance—ensuring that a model's output remains consistent regardless of the input's orientation. While traditional PDE-based image processing models are rotationally invariant by construction, standard CNNs often struggle with this property, relying instead on data-intensive workarounds. This paper presents a blueprint for building neural networks that are rotationally invariant by their very mathematical architecture.
The Problem: Rotational Bias in CNNs
Standard CNNs are inherently translation-invariant due to the nature of the convolution operation. However, they lack inherent rotation invariance. If an object is rotated, the internal activations of a standard CNN change significantly, often leading to incorrect predictions. Current solutions typically involve:
- Data Augmentation: Training on millions of rotated images, which only approximates invariance and increases training time.
- Group Convolutions: Employing sets of filters rotated at discrete angles, which is computationally expensive and limited to a few orientations.
The authors address this by asking: Can we design a network that is rotationally invariant by design, mirroring the PDEs used in physics?
Methodology: From Diffusion PDEs to Coupled Activations
The research draws inspiration from diffusion models (such as the Perona-Malik model) and variational methods. In these frameworks, operations are performed on quantities like the gradient magnitude or the structure tensor, which are naturally invariant to rotation.
The Coupled Activation Function
The primary technical contribution is the Coupled Activation Function. In a standard CNN, an activation function like ReLU is applied to each channel independently ($y_i = \text{ReLU}(x_i)$). The authors propose coupling these channels to maintain invariance:
- Operator Coupling: Instead of activating channels separately, the network combines channels representing different directional derivatives (e.g., $\partial_x$ and $\partial_y$) into a single invariant quantity (e.g., the gradient magnitude $|\nabla u|$) before applying the non-linearity.
- Architectural Mapping: The paper establishes that a ResNet block is mathematically equivalent to a single step of a diffusion PDE, while a ResNeXt block corresponds to a multiscale diffusion process.
By using specific $3 \times 3$ discretization stencils known for high rotational symmetry, the authors ensure the entire "diffusion block" maintains invariance without sacrificing directional filtering capabilities.
Experimental Validation
To rigorously test rotational invariance, the authors utilized a synthetic dataset designed to induce directional bias:
- Training Data: Grayscale images containing white rectangles oriented at a fixed $30^\circ$ angle.
- Test Data: Similar images rotated at $5^\circ$ increments from $0^\circ$ to $90^\circ$.
This setup forces the network to fail if it has not truly internalized rotation invariance, as it cannot rely on having seen all angles during the training phase.
Key Results and Insights
The experiments in image denoising yielded several critical insights:
- Unprecedented Stability: The "coupled" models showed nearly flat performance (PSNR) across all rotation angles. In contrast, standard "uncoupled" models performed well only at the training angle ($30^\circ$) and failed at others.
- Quantitative Consistency: The variance in test error for coupled models was as low as 0.014 dB, compared to 1.25 dB for uncoupled models—a nearly 100x improvement in consistency.
- Visual Quality: The coupled anisotropic model produced significantly cleaner edges on rotated test data. Uncoupled models produced "ragged" edges because they lacked the mathematical framework to handle gradients at unseen angles.
Conclusion and Future Work
This work demonstrates that the activation function, rather than just the filter, is a key site for implementing rotational invariance. By coupling channels in the activation, networks can mimic complex physical processes like anisotropic diffusion. While currently focused on denoising, future research will explore how these coupled activations scale to high-level tasks like object detection and semantic segmentation on large-scale datasets. This approach provides a promising path toward mathematically well-founded and robust CNN designs.
Summary updated