Abstract
Standard Convolutional Neural Networks (CNNs) lack inherent rotational invariance, often requiring extensive data augmentation to handle oriented features. This paper introduces Sorting Convolution (SC), a novel operation that achieves continuous rotational invariance by sorting local pixel values before convolution. By employing polar sampling and ring sorting, SC preserves essential spatial structures while remaining indifferent to angular variations. Experimental results on MNIST-rot, Outex, and NWPU-RESISC45 datasets demonstrate that SC-equipped networks achieve state-of-the-art performance without data augmentation or additional learnable parameters.
Introduction
Standard CNNs are robust to translations but remain fragile under rotation. Even minor tilts in input images can lead to misclassification. The common remedy, data augmentation, is computationally expensive and forces models to learn redundant weights for various orientations. Existing architectural solutions often target discrete rotations (e.g., 90-degree increments) or introduce complex layers that are difficult to integrate into standard backbones like ResNet or VGG. This work addresses these limitations by proposing a plug-and-play sorting-based convolution that provides natural invariance to continuous rotations.
Methodology
The core of the proposed method is the Sorting Convolution (SC). The fundamental principle is that a sorted sequence of values remains invariant regardless of their original spatial arrangement.
The SC operation involves several key components:
- Polar Sampling: To achieve continuous invariance rather than just grid-aligned invariance, pixels are sampled along concentric rings using bilinear interpolation.
- Ring Sorting: Instead of sorting all pixels in a neighborhood ("Global Sorting"), which destroys spatial information, pixels are sorted only within their respective concentric rings. This preserves radial distance information (knowing how far a feature is from the center) while ensuring invariance to rotation within each ring.
- Standard Convolution: The sorted values are mapped back to a grid and processed by a standard convolution layer. This design allows SC to be a direct replacement for standard convolution layers in existing architectures like VGG16 and ResNet18.
Experimental Setup
The effectiveness of the Sorting CNN (SCNN) was evaluated across three diverse datasets:
- MNIST-rot: Handwritten digits rotated by arbitrary angles (0° to 350°).
- Outex_TC_00012: A grayscale texture dataset for testing local pattern recognition under rotation.
- NWPU-RESISC45: A large-scale remote sensing dataset containing satellite imagery where objects (e.g., airplanes, bridges) appear in any orientation.
Analysis and Results
A key insight of this work is the distinction between invariance and equivariance. While many methods focus on equivariance (where features rotate with the input), SCNN targets absolute invariance, where feature maps remain identical regardless of input rotation. The transition from global to ring sorting is critical for preserving spatial structure while discarding angular dependency.
Key results include:
- State-of-the-Art Performance: On MNIST-rot, SCNN achieved 95.05% accuracy, surpassing specialized models like E(2)-CNN (94.37%) and H-Net (92.44%).
- Texture Recognition: Integrating SC into a VGG16 model improved Outex accuracy from 60.07% to 95.99%.
- Real-world Scalability: On the NWPU satellite dataset, SC-integrated ResNet18 outperformed the baseline by over 7%, demonstrating the method's effectiveness on complex RGB data.
- Data Efficiency: SCNN models perform exceptionally well with limited training data, as they do not need to "learn" rotated variants of objects through augmentation.
Conclusion
Sorting Convolution provides a robust, parameter-free method for achieving rotational invariance in CNNs. While it introduces a minor computational overhead and may struggle with orientation-sensitive classes (e.g., distinguishing '6' from '9'), its ability to generalize across rotations without augmentation makes it a powerful tool for rotation-heavy domains like remote sensing and medical imaging. Future work will focus on optimizing inference speed and balancing absolute invariance with semantic orientation sensitivity.
Summary updated