Hasse Diagrams for Attention: A Partial Order Framework for Designing Transformer Masks
Not on the map. Why?
Abstract (arXiv)
During the training of large Transformer models, attention masks regulate the scope and direction of information flow across a sequence. Numerous mask variants exist, and operators such as FlexAttention already support arbitrary attention masks. Nevertheless, a systematic formal analysis of the information-flow structure induced by arbitrary masks has been missing. This paper develops a complete theoretical framework. We prove that, with sufficient depth, the information flow of a multi-layer Transformer converges to a Hasse diagram -- a directed acyclic graph representing a partial order. Building on this, we recast the design of parallel training tasks as the problem of finding a minimal common supergraph of Hasse diagrams, and we establish a criterion for the minimal common supergraph. This yields a constructive method to derive attention masks directly from a family of tasks. Applying the framework, we design two novel masks: a block-generation attention mask that ensures training-inference consistency (Block Two-Stream Attention), and a fully supervised bidirectional attention mask (Butterfly Attention). These results demonstrate the framework's capacity to discover new structures.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 5 of its 7 references that are in the map. First posted on arXiv 8 Jun 2026.
Builds on
5 of 7 references.
References · 5
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,811
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
- 2025DAM: Dynamic Attention Mask for Long-Context Large Language Model Inference Accelerationcited by 4
Built on by
Not cited yet.