Hasse Diagrams for Attention: A Partial Order Framework for Designing Transformer Masks
Mirrored from arXiv — Machine Learning for archival readability. Support the source by reading on the original site.
Computer Science > Machine Learning
Title:Hasse Diagrams for Attention: A Partial Order Framework for Designing Transformer Masks
Abstract: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.
| Comments: | 21 pages, 9 figures. Theoretical framework for attention mask design; no experiments included |
| Subjects: | Machine Learning (cs.LG) |
| Cite as: | arXiv:2606.09951 [cs.LG] |
| (or arXiv:2606.09951v1 [cs.LG] for this version) | |
| https://doi.org/10.48550/arXiv.2606.09951
arXiv-issued DOI via DataCite
|
Access Paper:
- View PDF
- HTML (experimental)
- TeX Source
References & Citations
Bibliographic and Citation Tools
Code, Data and Media Associated with this Article
Demos
Recommenders and Search Tools
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.
More from arXiv — Machine Learning
-
Restless bandits with imperfect binary feedback: PCL-indexability analysis and computation
Jun 11
-
Few-Shot Resampling for Scalable Statistically-Sound Data Mining
Jun 11
-
Physics-informed generative AI for semiconductor manufacturing: Enforcing hard physical constraints in generative models by construction
Jun 11
-
Mechanical Field Networks: Structured Neural Dynamics for Multivariate Systems
Jun 11
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.