BiFormer: Vision Transformer with Bi-Level Routing Attention

AI-generated keywords: Dynamic Sparse Attention Bi-level Routing BiFormer Vision Transformer Computational Efficiency

AI-generated Key Points

The license of the paper does not allow us to build upon its content and the key points are generated using the paper metadata rather than the full article.

  • Attention is a powerful tool for capturing long-range dependencies, but it can be computationally expensive.
  • Previous attempts to introduce sparsity into attention lack flexibility and content awareness.
  • The authors propose dynamic sparse attention via bi-level routing to overcome these limitations.
  • Bi-level routing attention filters out irrelevant key-value pairs at a coarse region level and applies fine-grained token-to-token attention in the union of remaining candidate regions.
  • BiFormer is a new general vision transformer that attends to a small subset of relevant tokens in a query adaptive manner without distraction from other irrelevant ones.
  • BiFormer achieves high computational efficiency and good performance in dense prediction tasks such as image classification, object detection, and semantic segmentation.
  • Empirical results demonstrate the effectiveness of the proposed design compared to existing methods.
  • The authors provide code for their implementation on GitHub.
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Lei Zhu, Xinjiang Wang, Zhanghan Ke, Wayne Zhang, Rynson Lau

CVPR 2023 camera-ready

Abstract: As the core building block of vision transformers, attention is a powerful tool to capture long-range dependency. However, such power comes at a cost: it incurs a huge computation burden and heavy memory footprint as pairwise token interaction across all spatial locations is computed. A series of works attempt to alleviate this problem by introducing handcrafted and content-agnostic sparsity into attention, such as restricting the attention operation to be inside local windows, axial stripes, or dilated windows. In contrast to these approaches, we propose a novel dynamic sparse attention via bi-level routing to enable a more flexible allocation of computations with content awareness. Specifically, for a query, irrelevant key-value pairs are first filtered out at a coarse region level, and then fine-grained token-to-token attention is applied in the union of remaining candidate regions (\ie, routed regions). We provide a simple yet effective implementation of the proposed bi-level routing attention, which utilizes the sparsity to save both computation and memory while involving only GPU-friendly dense matrix multiplications. Built with the proposed bi-level routing attention, a new general vision transformer, named BiFormer, is then presented. As BiFormer attends to a small subset of relevant tokens in a \textbf{query adaptive} manner without distraction from other irrelevant ones, it enjoys both good performance and high computational efficiency, especially in dense prediction tasks. Empirical results across several computer vision tasks such as image classification, object detection, and semantic segmentation verify the effectiveness of our design. Code is available at \url{https://github.com/rayleizhu/BiFormer}.

Submitted to arXiv on 15 Mar. 2023

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

The license of the paper does not allow us to build upon its content and the AI assistant only knows about the paper metadata rather than the full article.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2303.08810v1

This paper's license doesn't allow us to build upon its content and the summarizing process is here made with the paper's metadata rather than the article.

This paper proposes a novel approach to address the computational burden and memory footprint associated with attention in vision transformers. Attention is a powerful tool for capturing long-range dependencies, but it requires pairwise token interaction across all spatial locations, which can be computationally expensive. Previous works have attempted to introduce sparsity into attention through handcrafted and content-agnostic methods such as restricting attention to local windows or axial stripes. However, these approaches lack flexibility and content awareness. To overcome these limitations, the authors propose dynamic sparse attention via bi-level routing. This approach filters out irrelevant key-value pairs at a coarse region level and applies fine-grained token-to-token attention in the union of remaining candidate regions (i.e., routed regions). The proposed bi-level routing attention utilizes sparsity to save both computation and memory while involving only GPU-friendly dense matrix multiplications. Based on this approach, the authors present BiFormer, a new general vision transformer that attends to a small subset of relevant tokens in a query adaptive manner without distraction from other irrelevant ones. BiFormer achieves high computational efficiency and good performance in dense prediction tasks such as image classification, object detection, and semantic segmentation. Empirical results demonstrate the effectiveness of the proposed design compared to existing methods. The authors provide code for their implementation on GitHub. Overall, this paper presents an innovative solution for addressing the computational challenges associated with attention in vision transformers while maintaining high performance levels.
Created on 15 May. 2023

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

The license of this specific paper does not allow us to build upon its content and the summarizing tools will be run using the paper metadata rather than the full article. However, it still does a good job, and you can also try our tools on papers with more open licenses.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.