Fovea Transformer: Efficient Long-Context Modeling with Structured Fine-to-Coarse Attention

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: He, Ziwei, Yuan, Jian, Zhou, Le, Leng, Jingwen, Jiang, Bo
Format: Preprint
Publié: 2023
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866913192034172928
author He, Ziwei
Yuan, Jian
Zhou, Le
Leng, Jingwen
Jiang, Bo
author_facet He, Ziwei
Yuan, Jian
Zhou, Le
Leng, Jingwen
Jiang, Bo
contents The quadratic complexity of self-attention in Transformers has hindered the processing of long text. To alleviate this problem, previous works have proposed to sparsify the attention matrix, taking advantage of the observation that crucial information about a token can be derived from its neighbors. These methods typically combine one or another form of local attention and global attention. Such combinations introduce abrupt changes in contextual granularity when going from local to global, which may be undesirable. We believe that a smoother transition could potentially enhance model's ability to capture long-context dependencies. In this study, we introduce Fovea Transformer, a long-context focused transformer that addresses the challenges of capturing global dependencies while maintaining computational efficiency. To achieve this, we construct a multi-scale tree from the input sequence, and use representations of context tokens with a progressively coarser granularity in the tree, as their distance to the query token increases. We evaluate our model on three long-context summarization tasks\footnote{Our code is publicly available at: \textit{https://github.com/ZiweiHe/Fovea-Transformer}}. It achieves state-of-the-art performance on two of them, and competitive results on the third with mixed improvement and setback of the evaluation metrics.
format Preprint
id arxiv_https___arxiv_org_abs_2311_07102
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Fovea Transformer: Efficient Long-Context Modeling with Structured Fine-to-Coarse Attention
He, Ziwei
Yuan, Jian
Zhou, Le
Leng, Jingwen
Jiang, Bo
Computation and Language
The quadratic complexity of self-attention in Transformers has hindered the processing of long text. To alleviate this problem, previous works have proposed to sparsify the attention matrix, taking advantage of the observation that crucial information about a token can be derived from its neighbors. These methods typically combine one or another form of local attention and global attention. Such combinations introduce abrupt changes in contextual granularity when going from local to global, which may be undesirable. We believe that a smoother transition could potentially enhance model's ability to capture long-context dependencies. In this study, we introduce Fovea Transformer, a long-context focused transformer that addresses the challenges of capturing global dependencies while maintaining computational efficiency. To achieve this, we construct a multi-scale tree from the input sequence, and use representations of context tokens with a progressively coarser granularity in the tree, as their distance to the query token increases. We evaluate our model on three long-context summarization tasks\footnote{Our code is publicly available at: \textit{https://github.com/ZiweiHe/Fovea-Transformer}}. It achieves state-of-the-art performance on two of them, and competitive results on the third with mixed improvement and setback of the evaluation metrics.
title Fovea Transformer: Efficient Long-Context Modeling with Structured Fine-to-Coarse Attention
topic Computation and Language
url https://arxiv.org/abs/2311.07102