cs.LGMar 7, 2026

Spectral Conditioning of Attention Improves Transformer Performance

Authors: Hemanth Saratchandran, Simon Lucey

Organizations: Australian Institute for Machine Learning, Adelaide University

Abstract

We present a theoretical analysis of the Jacobian of an attention block within a transformer, showing that it is governed by the query, key, and value projections that define the attention mechanism. Leveraging this insight, we introduce a method that systematically alters the spectral properties of each attention layer to reduce the Jacobian's condition number, thereby improving the overall conditioning of the attention layers within a transformer network. We empirically show that this improved Jacobian conditioning translates to enhanced performance in practice. Our approach is simple, broadly applicable, and can be easily integrated as a drop-in replacement for a wide range of existing attention mechanisms. We validate its effectiveness across diverse transformer architectures and tasks, demonstrating consistent improvements in performance.

Figures & tables

Appendix figures & tables25 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Preconditioned Attention: Enhancing Efficiency in Transformers

    Mar 28, 2026Hemanth SaratchandranAttention MechanismsNeural Network Optimization

  2. Conditioned Initialization for Attention

    Sep 7, 2026Hemanth Saratchandran, Simon LuceyNeural Network InitializationTransformer Attention

  3. Exact Attention Sensitivity and the Geometry of Transformer Stability

    Feb 21, 2026Seyed Morteza EmadiTransformer AttentionSoftmax Attention