Quaternion Convolutional Neural Networks

Xuanyu Zhu, Yi Xu, Hongteng Xu, Changjian Chen

Standard Convolutional Neural Networks (CNNs) typically process color images by treating the Red, Green, and Blue (RGB) channels as three independent real-valued matrices. When a standard convolution kernel operates on these channels, it performs a weighted sum of the inputs. This paper argues that this traditional approach suffers from two primary drawbacks: it ignores the inherent structural interrelationships between color channels, leading to potential information loss, and it increases the risk of overfitting by providing the model with excessive degrees of freedom without physical constraints.

To address these issues, the authors introduce Quaternion Convolutional Neural Networks (QCNNs). By shifting the mathematical foundation from the real domain ($\mathbb{R}$) to the quaternion domain ($\mathbb{H}$), QCNNs treat color pixels as single structural units, preserving spatial-color correlations and introducing a form of implicit regularization.

The Quaternion Approach

In a QCNN, a color pixel is represented as a "pure quaternion": $$q = 0 + Ri + Gj + Bk$$ where $i, j,$ and $k$ are imaginary units. This representation allows an entire color image to be processed as a single quaternion matrix rather than three separate scalar fields.

The core innovation lies in the Quaternion Convolution. Unlike standard convolutions that use arbitrary weights, a quaternion convolution kernel is parameterized by scaling ($s$) and rotation ($\theta$). This operation enforces a specific geometric structure: the kernel adjusts the magnitude of the color vector and rotates it around the "gray axis" (where $R=G=B$).

Comparison between (a) traditional real-valued CNNs and (b) the proposed Quaternion CNN architecture. Note how the QCNN treats the RGB triplet as a single vector subject to rotation and scaling.

This structural constraint acts as an implicit regularizer. By restricting transformations to physically meaningful rotations and scales in color space, the network is forced to learn representations that are more robust and better aligned with the nature of color data.

Key Insights and Advantages

Implicit Regularization and Efficiency

By parameterizing kernels through rotations and scales, QCNNs have fewer effective degrees of freedom compared to standard CNNs. This leads to superior generalization. Interestingly, the authors found that QCNNs could match the parameter count of standard CNNs while maintaining higher accuracy, or even outperform them with fewer parameters.

Structural Preservation

In tasks like image denoising, QCNNs excel at preserving sharp color transitions and fine textures. Because the RGB triplet is treated as a single unit, the model is less likely to produce the blurring artifacts common in standard CNNs, which can occur when independent channel processing fails to maintain color consistency.

Faster Convergence

Empirical results show that QCNNs reach lower loss values significantly faster than real-valued counterparts. This suggests that the quaternion domain provides a more "natural" optimization landscape for color-based features.

Experimental Results

The QCNN was evaluated across several benchmarks, consistently outperforming traditional architectures:

  • CIFAR-10 Classification: A shallow QCNN achieved 77.78% accuracy, surpassing the 75.46% of a comparable real-valued CNN.
  • Oxford Flowers Classification: Using a deeper VGG-S style architecture, the Quaternion version reached 76.95% accuracy, a significant improvement over the real-valued model's 73.08%.
  • Image Denoising: On the Oxford Flowers dataset, the QCNN achieved a Peak Signal-to-Noise Ratio (PSNR) of 31.31 dB, compared to 30.97 dB for the standard CNN.

Limitations and Future Outlook

Despite its performance gains, QCNNs currently face a computational overhead. Quaternion matrix multiplications are approximately twice as slow as standard operations in current deep learning frameworks like TensorFlow. However, the authors anticipate that optimized low-level parallelization could mitigate this gap. Additionally, the benefits of QCNNs are most evident in "colorful" images; for near-grayscale data, the performance advantage diminishes as the model's behavior converges toward that of a standard CNN.

Future research directions include developing more efficient backpropagation algorithms specifically for quaternions and extending the framework to larger datasets and other hyper-complex number systems.

Summary updated

BibTeX
@inproceedings{zhu2018quaternion,
  author = {Xuanyu Zhu and Yi Xu and Hongteng Xu and Changjian Chen},
  title = {{Quaternion Convolutional Neural Networks}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  doi = {10.1007/978-3-030-01237-3\_39},
}
Figure