Reproduce “Graphical einops: bridging tensor networks and computation graphs” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Vincent Wang-Maścianica, Nikhil Khatri

A formal graphical calculus unifies undirected tensor networks and directed computation graphs for structural tensor programming, making structural equality decidable for `einops`-like operations. The framework enables concise diagrammatic derivations of complex properties, such as the attention mask-augment duality, and provides a theoretical basis for several attention optimization strategies.

Key insights

  • Structural `einops` programs can be faithfully embedded within the proposed `FinSet^op`-graded tube calculus, providing a formal representation for ubiquitous tensor operations.
  • Structural equality in this fragment of tensor programming is decidable, reducible to equality of composite functions between finite sets.
  • The 'Mask-Augment Duality' theorem demonstrates that masked attention is structurally equivalent to fibrewise unmasked attention over a specific display of Key/Value streams.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.