Orthogonal Self-Attention
Leo Zhang, James Martens
TL;DR
The paper addresses instability in Softmax Self-Attention (SSA) when training skipless Transformers by proposing Orthogonal Self-Attention (OSA), which enforces an orthogonal attention matrix through a matrix exponential of a skew-symmetric matrix S = (α / sqrt(d_v)) (QK^T − KQ^T). OSA enables linear-time computation by exploiting a low-rank structure and yields A(X) ∈ SO(N), improving stability for non-causal architectures. The authors provide theoretical results showing that OSA preserves rank and offers initialization schemes that make the input–output Jacobian well-conditioned, along with practical methods (reduced QR or Newton–Schultz) to compute the exponential. Empirical results on MNIST demonstrate that replacing SSA with OSA in a ViT while removing skip connections and LayerNorm yields competitive generalisation and training efficiency, indicating OSA’s potential to enable stable, efficient skipless Transformers. Overall, OSA presents a principled, scalable approach to stabilising skipless Transformer architectures with implications for representation learning and model design.
Abstract
Softmax Self-Attention (SSA) is a key component of Transformer architectures. However, when utilised within skipless architectures, which aim to improve representation learning, recent work has highlighted the inherent instability of SSA due to inducing rank collapse and poorly-conditioned Jacobians. In this work, we design a novel attention mechanism: Orthogonal Self-Attention (OSA), which aims to bypass these issues with SSA, in order to allow for (non-causal) Transformers without skip connections and normalisation layers to be more easily trained. In particular, OSA parametrises the attention matrix to be orthogonal via mapping a skew-symmetric matrix, formed from query-key values, through the matrix exponential. We show that this can be practically implemented, by exploiting the low-rank structure of our query-key values, resulting in the computational complexity and memory cost of OSA scaling linearly with sequence length. Furthermore, we derive an initialisation scheme for which we prove ensures that the Jacobian of OSA is well-conditioned.
