Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Deep learning›Longformer / BigBird
Machine learning

Longformer / BigBird

Long-Sequence Transformers with Sparse Attention (Longformer / BigBird) · Also known as: Uzun Dizi Transformer (Longformer / BigBird), uzun dizi transformer, long-document transformer, sparse-attention transformer

Long-sequence Transformers such as Longformer (Beltagy, Peters & Cohan, 2020) and BigBird (Zaheer et al., 2020) replace the standard Transformer's O(n²) attention with sparse attention patterns that scale linearly, O(n), with sequence length. This lets a single model attend over thousands of tokens — full documents, legal texts, or genomic sequences — that would not fit a conventional Transformer.

ScholarGate
  1. Machine learning
  2. v1
  3. 2 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

Longformer / BigBird
Graph Attention NetworkMixture of ExpertsRandom ForestXGBoostKnowledge DistillationNeural Architecture Sear…Visual Contrastive Learn…

When to use it

Use long-sequence Transformers when you have long-document text (typically beyond 512 tokens) and need classification or explanation over the full document — long reports, legal texts, or genomic sequences. They assume genuinely long inputs are available, a GPU is strongly recommended, and global token positions must be chosen sensibly. They need a reasonable amount of data: below about 500 documents the model tends to overfit, and below about 100 documents training is not meaningful and classical ML such as Random Forest or XGBoost is preferable.

Strengths & limitations

Strengths
  • Processes thousands of tokens — whole documents — that exceed a standard Transformer's window.
  • Linear O(n) attention scaling instead of the quadratic O(n²) cost of dense attention.
  • Combines local sliding-window context with global tokens for long-range information flow.
  • Well suited to long-document classification in law, genomics, and long-form text.
Limitations
  • A GPU is effectively required; training and inference are computationally heavy.
  • Overfits on small document sets — below about 500 documents results are unreliable.
  • Below about 100 documents training is meaningless and classical ML should be used instead.
  • Global token positions must be chosen correctly, or long-range information flow degrades.

Frequently asked

How is this different from a standard Transformer like BERT?

A standard Transformer uses dense attention, comparing every token with every other token at O(n²) cost, which in practice caps inputs around 512 tokens. Longformer and BigBird use sparse attention — mostly local sliding windows plus a few global tokens — so cost grows linearly and inputs of several thousand tokens become feasible.

When should I prefer Longformer or BigBird over classical ML?

Use them when your text is genuinely long (beyond 512 tokens) and you have enough documents. With fewer than about 500 documents the model tends to overfit, and below roughly 100 documents training is not meaningful — classical methods such as Random Forest or XGBoost are the safer choice there.

What are global tokens and why do they matter?

Global tokens are a small set of positions allowed to attend to, and be attended by, the entire sequence. They are the channel through which long-range information moves across the document, so choosing their positions correctly is important for performance.

Do I need special hardware?

A GPU is strongly recommended. These models still process long sequences with sizeable networks, so training and inference are computationally demanding even with the linear-scaling attention.

Sources

  1. Beltagy, I., Peters, M. E. & Cohan, A. (2020). Longformer: The Long-Document Transformer. arXiv. link ↗
  2. Zaheer, M. et al. (2020). Big Bird: Transformers for Longer Sequences. NeurIPS. link ↗

How to cite this page

ScholarGate. (2026, June 1). Long-Sequence Transformers with Sparse Attention (Longformer / BigBird). ScholarGate. https://scholargate.app/en/deep-learning/longformer-bigbird

Related methods

Graph Attention NetworkMixture of ExpertsRandom ForestXGBoost

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • Graph Attention NetworkDeep learning↔ compare
  • Mixture of ExpertsDeep learning↔ compare
  • Random ForestMachine learning↔ compare
  • XGBoostMachine learning↔ compare
Compare side by side →

Referenced by

Knowledge DistillationNeural Architecture SearchVisual Contrastive Learning

Similar methods

TransformerBERT-based ClassificationSelf-AttentionSelf-supervised BERT-based classificationFine-Tuned BERT-based ClassificationSelf-supervised TransformerFine-Tuned TransformerTransfer Learning with BERT-based Classification

Related reference concepts

Sequence-to-Sequence Models and TransformersConvolutional and Sequence ModelsNeural Language Models and Word EmbeddingsStatistical and Neural NLPPart-of-Speech Tagging and Sequence LabelingQuestion Answering and Dialogue Systems

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — Longformer / BigBird (Long-Sequence Transformers with Sparse Attention (Longformer / BigBird)). Retrieved 2026-07-21 from https://scholargate.app/en/deep-learning/longformer-bigbird · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Originator
Beltagy, Peters & Cohan (Longformer); Zaheer et al. (BigBird)
Year
2020
Type
Sparse-attention Transformer for long sequences
Task
Long-document classification & explanation
Complexity
O(n) attention (vs O(n²) standard)
MinSample
50
Related methods
Graph Attention NetworkMixture of ExpertsRandom ForestXGBoost
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account