SMYRF: Efficient Attention using Asymmetric Clustering
원문 초록
We propose a novel type of balanced clustering algorithm to approximate attention. Attention complexity is reduced from $O(N^2)$ to $O(N \log N)$, where $N$ is the sequence length. Our algorithm, SMYRF, uses Locality Sensitive Hashing (LSH) in a novel way by defining new Asymmetric transformations and an adaptive scheme that produces balanced clusters. The biggest advantage of SMYRF is that it can be used as a drop-in replacement for dense attention layers without any retraining. On the contrary, prior fast attention methods impose constraints (e.g. queries and keys share the same vector representations) and require re-training from scratch. We apply our method to pre-trained state-of-the-art Natural Language Processing and Computer Vision models and we report significant memory and speed benefits. Notably, SMYRF-BERT outperforms (slightly) BERT on GLUE, while using $50\%$ less memory. We also show that SMYRF can be used interchangeably with dense attention before and after training. Finally, we use SMYRF to train GANs with attention in high resolutions. Using a single TPU, we were able to scale attention to 128x128=16k and 256x256=65k tokens on BigGAN on CelebA-HQ.
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
Tri-Learn Graph Fusion Network for Attributed Graph Clustering
Car Object Counting and Position Estimation via Extension of the CLIP-EBC Framework
HERCULES: Hierarchical Embedding-based Recursive Clustering Using LLMs for Efficient Summarization
MiCo: Multiple Instance Learning with Context-Aware Clustering for Whole Slide Image Analysis
Self-supervised Learning of Echocardiographic Video Representations via Online Cluster Distillation
MSTAR: Box-free Multi-query Scene Text Retrieval with Attention Recycling
토론
이 논문과 연결된 포럼 글이 아직 없습니다.