English

What Dense Graph Do You Need for Self-Attention?

Machine Learning 2022-10-13 v5 Artificial Intelligence Computation and Language

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(NlogN)O(N\log N) complexity with sequence length NN. Experiments on tasks requiring various sequence lengths lay validation for our graph function well.

Keywords

Cite

@article{arxiv.2205.14014,
  title  = {What Dense Graph Do You Need for Self-Attention?},
  author = {Yuxin Wang and Chu-Tak Lee and Qipeng Guo and Zhangyue Yin and Yunhua Zhou and Xuanjing Huang and Xipeng Qiu},
  journal= {arXiv preprint arXiv:2205.14014},
  year   = {2022}
}

Comments

Accepted by ICML 2022. Code is available at https://github.com/yxzwang/Normalized-Information-Payload

R2 v1 2026-06-24T11:31:01.576Z