A Simple and Efficient Tensor Calculus for Machine Learning
S\"oren Laue, Matthias Mitterreiter, Joachim Giesen

TL;DR
This paper introduces a new tensor calculus algorithm based on Einstein notation, offering a simpler, more efficient alternative to Ricci notation for derivatives in machine learning frameworks, with practical implementation.
Contribution
The paper develops an Einstein notation-based tensor calculus method that matches the efficiency of Ricci notation approaches, enabling integration into popular deep learning frameworks.
Findings
The new method achieves higher efficiency in tensor derivatives computation.
Implementation is available at www.MatrixCalculus.org.
The approach simplifies tensor calculus without sacrificing performance.
Abstract
Computing derivatives of tensor expressions, also known as tensor calculus, is a fundamental task in machine learning. A key concern is the efficiency of evaluating the expressions and their derivatives that hinges on the representation of these expressions. Recently, an algorithm for computing higher order derivatives of tensor expressions like Jacobians or Hessians has been introduced that is a few orders of magnitude faster than previous state-of-the-art approaches. Unfortunately, the approach is based on Ricci notation and hence cannot be incorporated into automatic differentiation frameworks from deep learning like TensorFlow, PyTorch, autograd, or JAX that use the simpler Einstein notation. This leaves two options, to either change the underlying tensor representation in these frameworks or to develop a new, provably correct algorithm based on Einstein notation. Obviously, the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
