Dual Focus: Local Windows & Task-Specific Global Tokens

Longformer's attention mechanism combines fixed-size sliding windows for capturing local context and syntactic structure, with strategically chosen "global tokens" (e.g., CLS tokens for classification or question tokens for QA) that attend to the entire sequence for critical document-level information.

Sources

Open the full topic