Skip to main content
Back

Hypercomplex Widely Linear Processing Finally Makes Quaternion Neural Nets Accessible

A new tutorial chapter lays out the algebra, statistics, and calculus needed to train neural networks that treat 3D and 4D signals as single entities.

Pro

Paper, Full Access
  • Tutorial chapter lays out algebra, statistics, and calculus for quaternion-valued machine learning from first principles.
  • Core idea: pair a quaternion with its three involutions to capture full second-order statistics.
  • Widely linear estimators are shown to be the true MMSE solution for jointly Gaussian quaternions.
  • HR-calculus derived for norms, squares, ReLU, and product and chain rules.
  • Complete QLMS and nonlinear QLMS algorithms derived, with MATLAB code using the Quaternion Toolbox.
  • Best suited for color image, 3D audio, aerospace, and polarization-multiplexed communication problems.

Most machine learning happens on real-valued tensors, occasionally on complex ones. But a growing body of work argues that some data, like RGB pixels, 3D rotations, and ambisonic audio, is really four-dimensional and should be processed that way. A new foundational chapter titled Hypercomplex Widely Linear Processing by Sayed Pouria Talebi and Clive Cheong Took walks through the algebra, statistics, and calculus you need to actually build learning algorithms in the quaternion domain.

It is a tutorial, not a benchmark paper. But if you have ever looked at quaternion neural networks and bounced off the notation, this is the piece that finally makes the machinery accessible, complete with MATLAB code and worked derivatives for things like a quaternion ReLU.

Why quaternions keep coming back

Quaternions are a four-dimensional number system with one real part and three imaginary units that do not commute. Hamilton invented them to model rotations in 3D, and the authors trace their modern comeback across aerospace attitude estimation, computer graphics interpolation, three-phase power systems, body motion tracking, three-dimensional sound processing, color image processing, and quantum computing.

In deep learning specifically, quaternion convolutional networks have been shown to preserve the correlations between color channels that ordinary CNNs destroy when they sum channel activations, and to do it with roughly a quarter of the parameters of an equivalent real-valued model. Quaternion CNNs have also been applied to 3D sound event detection from first-order ambisonic microphones, where the four channels of the signal map naturally onto a single quaternion.

The catch that everyone hits

The problem is that quaternion multiplication is not commutative, and standard calculus rules fall apart. Attempts to extend complex analyticity via the Cauchy-Riemann-Fueter condition turn out to be too restrictive to derive practical learning algorithms. That is the wall the chapter sets out to demolish.

The solution rests on two ideas that are simple to state but easy to get wrong in practice:

  • Augmented representation. A quaternion variable q alone does not capture its full statistics. You have to pair it with its three involutions q^i, q^j, q^k, which rotate the imaginary part around each imaginary axis by pi. Stacked together, these four views give a linear map back to the four real components.
  • Widely linear models. Instead of estimating a target as W*q, you estimate it as a linear combination of q and all three involutions. For jointly Gaussian quaternion variables, this widely linear form is the actual minimum mean square error solution. Ordinary linear models leave information on the table.

Autocorrelation, but four times over

The augmented view forces a rethink of second-order statistics. The classical autocorrelation E{q(n)q*(n-l)} is not enough. You need it plus three eta-autocorrelations, one per imaginary axis, defined using the involution-conjugate. Any four of these five sequences (including a pseudo-autocorrelation) form a sufficient set. The chapter works this out numerically on a three-element quaternion vector and shows how the real-valued auto- and cross-correlations between the r, i, j, k components can be recovered exactly from the quaternion-valued matrices.

HR-calculus, in plain steps

To differentiate a quaternion-valued function you cannot just apply the chain rule. The HR-calculus, formalized by Xu, Jahanchahi, Cheong Took, and Mandic, gets around this by expressing the function through the augmented vector and then mapping gradients back and forth via the same 4x4 involution matrix that defines the augmented representation. The chapter derives base cases you will actually use, including:

  • The squared norm: d||q||^2 / dq* = q/2, which differs from the complex CR-calculus result.
  • The norm itself and the square function.
  • A quaternion ReLU that applies the real ReLU componentwise, with its gradient worked out symbolically.
  • Product and chain rules that account for non-commutativity by inserting involutions of one factor around the other.

Putting it together: QLMS

The payoff is a clean derivation of the Quaternion Least Mean Square algorithm, in which the weight update reduces to w[n+1] = w[n] + gamma * e[n] * conj(q_a[n]) where q_a is the augmented input vector. The chapter also extends this to a nonlinear QLMS using locally analytic activations such as tanh, sinh, and atan, giving the exact backpropagation-style update.

Working MATLAB snippets are included for both the linear and nonlinear versions, and they rely on the open-source Quaternion Toolbox for Matlab by Sangwine and Bihan for the underlying arithmetic and the involution operator.

Where it fits and where it does not

This is a reference chapter, not a new model release. There is no repo of trained weights, no benchmark table, and the code is illustrative MATLAB rather than a PyTorch layer. If you are looking for a plug-and-play quaternion transformer, this is not it.

What it is genuinely good for is anyone trying to derive their own quaternion layer, loss function, or adaptive filter and getting stuck on the derivatives. The natural targets are problems where the data really is 3D or 4D and channels carry meaning that summation would destroy: color image restoration, ambisonic audio, IMU and attitude estimation, polarization-multiplexed communications, and quantum circuit modeling. For a plain tabular or text task, real-valued networks remain the right tool.