Explaining Modern Gated-Linear RNNs via a Unified Implicit Attention Formulation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zimerman, Itamar, Ali, Ameen, Wolf, Lior
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912075769446400
author Zimerman, Itamar
Ali, Ameen
Wolf, Lior
author_facet Zimerman, Itamar
Ali, Ameen
Wolf, Lior
contents Recent advances in efficient sequence modeling have led to attention-free layers, such as Mamba, RWKV, and various gated RNNs, all featuring sub-quadratic complexity in sequence length and excellent scaling properties, enabling the construction of a new type of foundation models. In this paper, we present a unified view of these models, formulating such layers as implicit causal self-attention layers. The formulation includes most of their sub-components and is not limited to a specific part of the architecture. The framework compares the underlying mechanisms on similar grounds for different layers and provides a direct means for applying explainability methods. Our experiments show that our attention matrices and attribution method outperform an alternative and a more limited formulation that was recently proposed for Mamba. For the other architectures for which our method is the first to provide such a view, our method is effective and competitive in the relevant metrics compared to the results obtained by state-of-the-art Transformer explainability methods. Our code is publicly available.
format Preprint
id arxiv_https___arxiv_org_abs_2405_16504
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Explaining Modern Gated-Linear RNNs via a Unified Implicit Attention Formulation
Zimerman, Itamar
Ali, Ameen
Wolf, Lior
Machine Learning
F.2.2; I.2.7
Recent advances in efficient sequence modeling have led to attention-free layers, such as Mamba, RWKV, and various gated RNNs, all featuring sub-quadratic complexity in sequence length and excellent scaling properties, enabling the construction of a new type of foundation models. In this paper, we present a unified view of these models, formulating such layers as implicit causal self-attention layers. The formulation includes most of their sub-components and is not limited to a specific part of the architecture. The framework compares the underlying mechanisms on similar grounds for different layers and provides a direct means for applying explainability methods. Our experiments show that our attention matrices and attribution method outperform an alternative and a more limited formulation that was recently proposed for Mamba. For the other architectures for which our method is the first to provide such a view, our method is effective and competitive in the relevant metrics compared to the results obtained by state-of-the-art Transformer explainability methods. Our code is publicly available.
title Explaining Modern Gated-Linear RNNs via a Unified Implicit Attention Formulation
topic Machine Learning
F.2.2; I.2.7
url https://arxiv.org/abs/2405.16504