What Dense Graph Do You Need for Self-Attention?
Abstract
Transformers have made progress in miscellaneous tasks, but suffer from quadratic computational and memory complexities. Recent works propose sparse transformers with attention on sparse graphs to reduce complexity and remain strong performance. While effective, the crucial parts of how dense a graph needs to be to perform well are not fully explored. In this paper, we propose Normalized Information Payload (NIP), a graph scoring function measuring information transfer on graph, which provides an analysis tool for trade-offs between performance and complexity. Guided by this theoretical analysis, we present Hypercube Transformer, a sparse transformer that models token interactions in a hypercube and shows comparable or even better results with vanilla transformer while yielding $O(N\log N)$ complexity with sequence length $N$. Experiments on tasks requiring various sequence lengths lay validation for our graph function well.
Cite
Text
Wang et al. "What Dense Graph Do You Need for Self-Attention?." International Conference on Machine Learning, 2022.Markdown
[Wang et al. "What Dense Graph Do You Need for Self-Attention?." International Conference on Machine Learning, 2022.](https://mlanthology.org/icml/2022/wang2022icml-dense/)BibTeX
@inproceedings{wang2022icml-dense,
title = {{What Dense Graph Do You Need for Self-Attention?}},
author = {Wang, Yuxin and Lee, Chu-Tak and Guo, Qipeng and Yin, Zhangyue and Zhou, Yunhua and Huang, Xuanjing and Qiu, Xipeng},
booktitle = {International Conference on Machine Learning},
year = {2022},
pages = {22752-22768},
volume = {162},
url = {https://mlanthology.org/icml/2022/wang2022icml-dense/}
}