Abstract
Deep probabilistic generative models have achieved incredible success in many fields of application. Among such models, variational autoencoders (VAEs) have proved their ability in modeling a generative process by learning a latent representation of the input. In this paper, we propose a novel VAE defined in the quaternion domain, which exploits the properties of quaternion algebra to improve performance while significantly reducing the number of parameters required by the network. The success of the proposed quaternion VAE with respect to traditional VAEs relies on the ability to leverage the internal relations between quaternion-valued input features and on the properties of second-order statistics which allow to define the latent variables in the augmented quaternion domain. In order to show the advantages due to such properties, we define a plain convolutional VAE in the quaternion domain and we evaluate its performance with respect to its real-valued counterpart on the CelebA face dataset.
Introduction
Variational Autoencoders (VAEs) are fundamental tools in deep learning, designed to learn compressed latent representations for data generation. However, standard VAEs operate in the real-valued domain, which can be suboptimal for multidimensional data like RGB images. In real-valued networks, color channels are often treated as independent entities, potentially overlooking the intricate inter-dependencies between them.
While Quaternion Neural Networks (QNNs) have demonstrated success in reducing parameter counts by processing groups of features (e.g., R, G, and B) as a single quaternion unit, adapting them to the probabilistic framework of VAEs presented significant challenges. Specifically, defining variational inference and calculating Kullback-Leibler (KL) divergence in a quaternion latent space required new theoretical foundations.
Methodology
The proposed Quaternion-Valued VAE (QVAE) replaces standard real-valued components with quaternion counterparts across the entire architecture.
Quaternion Algebra and the Hamilton Product
Instead of standard matrix multiplication, the QVAE utilizes the Hamilton product. This operation allows the network to capture internal relations between the four components of a quaternion (one real and three imaginary parts), effectively modeling the correlations between color channels.
Q-Properness and Latent Variables
A core theoretical contribution of this work is the application of "Q-properness" to quaternion random vectors. A quaternion is considered Q-proper if its components are uncorrelated in a specific manner. By assuming latent variables are Q-proper, the authors derived a tractable formula for the Quaternion KL Divergence, enabling efficient variational inference.
Architecture
The model employs a convolutional encoder and a transposed convolutional decoder. Every layer—from convolutions to the fully connected layers generating the latent mean ($\mu$) and variance ($\sigma$)—operates in the quaternion domain. The standard "reparameterization trick" was also adapted to handle quaternion-valued noise.
Experimental Results
The QVAE was evaluated on the CelebA dataset, consisting of over 200,000 face images scaled to 64x64 pixels. It was compared against a real-valued VAE of similar structural depth.
Quantitative Performance
The QVAE outperformed the standard VAE across all primary metrics while maintaining a significantly smaller footprint.
As shown in the table, the QVAE achieved a 62% reduction in parameters (1.4M vs 3.7M). Despite this efficiency, it improved the Structural Similarity Index (SSIM) to 0.8941 and reduced the Mean Square Error (MSE) to 0.0031. Furthermore, the Fréchet Inception Distance (FID), a measure of generation quality, improved from 195.7 to 175.7.
Qualitative Analysis
Visually, the QVAE produces reconstructions with higher fidelity. While the standard VAE tends to blur complex areas like hair, necklines, and backgrounds, the QVAE preserves these details more effectively.
Conclusion and Future Work
The QVAE demonstrates that leveraging quaternion algebra can lead to more efficient and higher-quality generative models. By treating RGB channels as a single unit, the model naturally preserves spatial and color relationships.
Future research may explore "improper" quaternions to model more complex correlations between imaginary components. Additionally, integrating quaternion logic into more advanced architectures, such as Hierarchical VAEs, or developing robust quaternion batch normalization techniques could further enhance performance and stability.
Summary updated