It's All Just Vectorization: einx, a Universal Notation for Tensor Operations
This work addresses the verbosity and error-proneness of NumPy-style APIs in existing tensor frameworks, as well as the limited generality of alternatives like einsum. The authors propose einx, a universal, declarative notation for tensor operations grounded in vectorization. By unifying diverse tensor computations through loop-like pointwise expressions, einx leverages vectorization as its core abstraction, combining declarative element-wise specifications with dimension lifting techniques. This approach reconstructs the entire tensor API using only a small set of primitive operations. The resulting einx library is compatible with major deep learning frameworks and integrates seamlessly into Python, substantially improving code readability and consistency while reducing cognitive load and shape-related errors.