English

Unraveling Attention via Convex Duality: Analysis and Interpretations of Vision Transformers

Machine Learning 2022-05-23 v2 Computer Vision and Pattern Recognition Optimization and Control

Abstract

Vision transformers using self-attention or its proposed alternatives have demonstrated promising results in many image related tasks. However, the underpinning inductive bias of attention is not well understood. To address this issue, this paper analyzes attention through the lens of convex duality. For the non-linear dot-product self-attention, and alternative mechanisms such as MLP-mixer and Fourier Neural Operator (FNO), we derive equivalent finite-dimensional convex problems that are interpretable and solvable to global optimality. The convex programs lead to {\it block nuclear-norm regularization} that promotes low rank in the latent feature and token dimensions. In particular, we show how self-attention networks implicitly clusters the tokens, based on their latent similarity. We conduct experiments for transferring a pre-trained transformer backbone for CIFAR-100 classification by fine-tuning a variety of convex attention heads. The results indicate the merits of the bias induced by attention compared with the existing MLP or linear heads.

Keywords

Cite

@article{arxiv.2205.08078,
  title  = {Unraveling Attention via Convex Duality: Analysis and Interpretations of Vision Transformers},
  author = {Arda Sahiner and Tolga Ergen and Batu Ozturkler and John Pauly and Morteza Mardani and Mert Pilanci},
  journal= {arXiv preprint arXiv:2205.08078},
  year   = {2022}
}

Comments

38 pages, 2 figures. To appear in ICML 2022