Fine-Grained Local Sensitivity Analysis of Standard Dot-Product Self-Attention
Abstract
Self-attention has been widely used in various machine learning models, such as vision transformers. The standard dot-product self-attention is arguably the most popular structure, and there is a growing interest in understanding the mathematical properties of such attention mechanisms. This paper presents a fine-grained local sensitivity analysis of the standard dot-product self-attention, leading to new non-vacuous certified robustness results for vision transformers. Despite the well-known fact that dot-product self-attention is not (globally) Lipschitz, we develop new theoretical analysis of Local Fine-grained Attention Sensitivity (LoFAST) quantifying the effect of input feature perturbations on the attention output. Our analysis reveals that the local sensitivity of dot-product self-attention to $\ell_2$ perturbations can actually be controlled by several key quantities associated with the attention weight matrices and the unperturbed input. We empirically validate our theoretical findings by computing non-vacuous certified $\ell_2$-robustness for vision transformers on CIFAR-10 and SVHN datasets. The code for LoFAST is available at https://github.com/AaronHavens/LoFAST.
Cite
Text
Havens et al. "Fine-Grained Local Sensitivity Analysis of Standard Dot-Product Self-Attention." International Conference on Machine Learning, 2024.Markdown
[Havens et al. "Fine-Grained Local Sensitivity Analysis of Standard Dot-Product Self-Attention." International Conference on Machine Learning, 2024.](https://mlanthology.org/icml/2024/havens2024icml-finegrained/)BibTeX
@inproceedings{havens2024icml-finegrained,
title = {{Fine-Grained Local Sensitivity Analysis of Standard Dot-Product Self-Attention}},
author = {Havens, Aaron J and Araujo, Alexandre and Zhang, Huan and Hu, Bin},
booktitle = {International Conference on Machine Learning},
year = {2024},
pages = {17680-17696},
volume = {235},
url = {https://mlanthology.org/icml/2024/havens2024icml-finegrained/}
}