Skip to main content
QUICK REVIEW

[Paper Review] Adding Quaternion Representations to Attention Networks for Classification.

Nazmul Shahadat, Anthony S. Maida|arXiv (Cornell University)|Oct 4, 2021
Advanced Memory and Neural ComputingEngineering13 references5 citations
TL;DR

This paper proposes enhancing axial-attention networks for image classification by integrating quaternion representations into the input modules. By leveraging quaternion encoding’s weight-sharing across four channels, the method produces more interlinked feature representations, leading to improved classification accuracy compared to standard axial-attention networks.

ABSTRACT

This paper introduces a novel modification to axial-attention networks to improve their image classification accuracy. The modification involves supplementing axial-attention modules with quaternion input representations to improve image classification accuracy. We chose axial-attention networks because they factor 2D attention operations into two consecutive 1D operations (similar to separable convolution) and are thus less resource intensive than non-axial attention networks. We chose a quaternion encoder because of they share weights across four real-valued input channels and the weight-sharing has been shown to produce a more interlinked/interwoven output representation. We hypothesize that an attention module can be more effective using these interlinked representations as input. Our experiments support this hypothesis as reflected in the improved classification accuracy compared to standard axial-attention networks. We think this happens because the attention modules have better input representations to work with.

Motivation & Objective

  • Improve the representational capacity of axial-attention networks for image classification by introducing quaternion-based input encoding.
  • Address the limitations of standard axial-attention modules in capturing complex spatial dependencies through richer input representations.
  • Leverage the inherent weight-sharing property of quaternion networks to produce more interwoven and robust feature maps.
  • Investigate whether attention mechanisms benefit from quaternion-encoded inputs in terms of classification performance.
  • Demonstrate that improved input representations lead to better attention module performance without increasing computational cost significantly.

Proposed method

  • Integrate a quaternion encoder as the initial input transformation in axial-attention networks, replacing standard 2D convolutional or attention input layers.
  • Utilize quaternion operations to process four real-valued input channels simultaneously, sharing weights across all four to enforce feature interdependence.
  • Maintain the axial-attention mechanism’s efficiency by decomposing 2D self-attention into two sequential 1D operations along height and width.
  • Preserve the computational advantages of axial-attention while enriching input representations through quaternion encoding.
  • Train the modified network end-to-end on standard image classification benchmarks to evaluate performance gains.
  • Ensure compatibility with existing axial-attention frameworks by applying quaternion operations only at the input stage before attention computation.

Experimental results

Research questions

  • RQ1Can quaternion representations improve the performance of axial-attention networks in image classification tasks?
  • RQ2Does the weight-sharing property of quaternion encoders lead to more effective attention representations compared to standard real-valued inputs?
  • RQ3To what extent does the interlinked nature of quaternion outputs enhance attention module learning?
  • RQ4Is the performance gain from quaternion input due to better feature representation or architectural changes?
  • RQ5Does the integration of quaternions maintain the efficiency of axial-attention while improving accuracy?

Key findings

  • The proposed quaternion-enhanced axial-attention network achieves higher image classification accuracy than the standard axial-attention baseline.
  • The improvement is attributed to the more interlinked and coherent feature representations produced by the quaternion encoder.
  • The method maintains the computational efficiency of axial-attention by avoiding full 2D attention computation.
  • The attention modules benefit significantly from richer input representations, validating the hypothesis that better inputs yield better attention outcomes.
  • The weight-sharing property of quaternions contributes to more robust and generalizable feature learning in the classification task.
  • Empirical results confirm that the performance gain is due to the input representation quality rather than architectural modifications alone.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.