The Syntax and Semantics of einsum
Fuente:
arXiv
Gespeichert in:
| Hauptverfasser: | , , , |
|---|---|
| Format: | Preprint |
| Veröffentlicht: |
2025
|
| Schlagworte: | |
| Online-Zugang: | |
| Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
| _version_ | 1866915564122800128 |
|---|---|
| author | Wenig, Maurice Rump, Paul G. Blacher, Mark Giesen, Joachim |
| author_facet | Wenig, Maurice Rump, Paul G. Blacher, Mark Giesen, Joachim |
| contents | In 2011, einsum was introduced to NumPy as a practical and convenient notation for tensor expressions in machine learning, quantum circuit simulation, and other fields. It has since been implemented in additional Python frameworks such as PyTorch and TensorFlow, as well as in other programming languages such as Julia. Despite its practical success, the einsum notation still lacks a solid theoretical basis, and is not unified across the different frameworks, limiting opportunities for formal reasoning and systematic optimization. In this work, we discuss the terminology of tensor expressions and provide a formal definition of the einsum language. Based on this definition, we formalize and prove important equivalence rules for tensor expressions and highlight their relevance in practical applications. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2509_20020 |
| institution | arXiv |
| publishDate | 2025 |
| record_format | arxiv |
| spellingShingle | The Syntax and Semantics of einsum Wenig, Maurice Rump, Paul G. Blacher, Mark Giesen, Joachim Programming Languages Machine Learning Mathematical Software Symbolic Computation F.2.2; I.1.2; I.1.3 In 2011, einsum was introduced to NumPy as a practical and convenient notation for tensor expressions in machine learning, quantum circuit simulation, and other fields. It has since been implemented in additional Python frameworks such as PyTorch and TensorFlow, as well as in other programming languages such as Julia. Despite its practical success, the einsum notation still lacks a solid theoretical basis, and is not unified across the different frameworks, limiting opportunities for formal reasoning and systematic optimization. In this work, we discuss the terminology of tensor expressions and provide a formal definition of the einsum language. Based on this definition, we formalize and prove important equivalence rules for tensor expressions and highlight their relevance in practical applications. |
| title | The Syntax and Semantics of einsum |
| topic | Programming Languages Machine Learning Mathematical Software Symbolic Computation F.2.2; I.1.2; I.1.3 |
| url | https://arxiv.org/abs/2509.20020 |