paper-with-me

홈 › Papers

SMYRF: Efficient Attention using Asymmetric Clustering

2020-10-11 · Giannis Daras, Nikita Kitaev, Augustus Odena, Alexandros G. Dimakis

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.

📄 PDF Abstract BibTeX arXiv:2010.05315

Code (1)

giannisdaras/smyrf 공식 구현 pytorch

Tasks

16kClustering

Methods 이 논문이 사용한 방법론

1x1 Convolution A 1 x 1 Convolution is a convolution with some special properties in that it can be used for dimensionality reduction,…
Feedforward Network A Feedforward Network, or a Multilayer Perceptron (MLP), is a neural network with solely densely connected layers. This is the classic neural network architecture of the…
Non-Local Operation A Non-Local Operation is a component for capturing long-range dependencies with deep neural networks. It is a generalization of the classical non-local mean operation in…
Six Ways To Communicate To Someone At Expedia Via Phone And Email's. To communicate or get human at Expedia, the quickest option is typically to call their customer service at +1-888-829-0881 or +1(805) 330 (4056). You can also use the live chat…
Convolution A convolution is a type of matrix operation, consisting of a kernel, a small matrix of weights, that slides over input data performing element-wise multiplication with the…
Non-Local Block A Non-Local Block is an image block module used in neural networks that wraps a non-local operation. We can define a…
Conditional Batch Normalization Conditional Batch Normalization (CBN) is a class-conditional variant of batch normalization. The key idea is to…
((Reservation@Faqs))How do I cancel a reservation on Expedia? How do I cancel a reservation on Expedia? +1^888^829^0881° oR +1^888^829^0881 – Need to cancel your Expedia reservation quickly and without hassle? This step-by-step guide…

Similar Papers 제목 키워드 기반

SMYRF - Efficient Attention using Asymmetric Clustering

2020-12-01 · NeurIPS 2020 12 · Giannis Daras, Nikita Kitaev, Augustus Odena, Alexandros G. Dimakis

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 Sensi…

Clustering

Clustering, Hamming Embedding, Generalized LSH and the Max Norm

2014-05-13 · Behnam Neyshabur, Yury Makarychev, Nathan Srebro

We study the convex relaxation of clustering and hamming embedding, focusing on the asymmetric case (co-clustering and asymmetric hamming embedding), understanding their relationship to LSH as studied by (Charikar 2002) …

Clustering

HeNCler: Node Clustering in Heterophilous Graphs through Learned Asymmetric Similarity

2024-05-27 · Sonny Achten, Francesco Tonin, Volkan Cevher, Johan A. K. Suykens

Clustering nodes in heterophilous graphs presents unique challenges due to the asymmetric relationships often overlooked by traditional methods, which moreover assume that good clustering corresponds to high intra-cluste…

ClusteringNode Clustering

Asymmetric Semi-Nonnegative Matrix Factorization for Directed Graph Clustering

2020-12-31 · Reyhaneh Abdollahi; Seyed Amjad Seyedi; Mohamad Reza Noorimehr

Graph clustering is a fundamental task in the network analysis, which is essential for many modern applications. In recent years, Nonnegative Matrix Factorization (NMF) has been effectively used to discover cluster struc…

ClusteringGraph Clustering

Asymmetric Semi-Nonnegative Matrix Factorization for Directed Graph Clustering

2020-12-31 · Reyhaneh Abdollahi, Seyed Amjad Seyedi, Mohamad Reza Noorimehr

Graph clustering is a fundamental task in the network analysis, which is essential for many modern applications. In recent years, Nonnegative Matrix Factorization (NMF) has been effectively used to discover cluster struc…

ClusteringGraph Clustering