A Simple and Efficient Tensor Calculus
摘要
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 first option is impractical. Hence, we pursue the second option. Here, we show that using Ricci notation is not necessary for an efficient tensor calculus and develop an equally efficient method for the simpler Einstein notation. It turns out that turning to Einstein notation enables further improvements that lead to even better efficiency. The methods that are described in this paper have been implemented in the online tool www.MatrixCalculus.org for computing derivatives of matrix and tensor expressions.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
引用它的顶会 Paper8
- Tensor Relational Algebra for Distributed Machine Learning System DesignBinhang Yuan, Dimitrije Jankov, Jia Zou, Yuxin Tang 等VLDB 2021 · 33 次引用
- Why Capsule Neural Networks Do Not Scale: Challenging the Dynamic Parse-Tree AssumptionMatthias Mitterreiter, Marcel Koch, Joachim Giesen, Sören LaueAAAI 2023 · 17 次引用
- Optimization for Classical Machine Learning Problems on the GPUSören Laue, Mark Blacher, Joachim GiesenAAAI 2022 · 9 次引用
- Modeling the Impact of Timeline Algorithms on Opinion Dynamics Using Low-rank UpdatesTianyi Zhou, Stefan Neumann, Kiran Garimella, Aristides GionisWWW 2024 · 7 次引用
- Convolutions and More as Einsum: A Tensor Network Perspective with Advances for Second-Order MethodsFelix DangelNeurIPS 2024 · 5 次引用
它引用的 Paper1
相关 Paper
- Einops: Clear and Reliable Tensor Manipulations with Einstein-like NotationAlex RogozhnikovICLR 2022 · 124 次引用
- EinDecomp: Decomposition of Declaratively-Specified Machine Learning and Numerical Computations for Parallel ExecutionDaniel Bourgeois, Zhimin Ding, Dimitrije Jankov, Jiehui Li 等VLDB 2025 · 4 次引用
- BackPACK: Packing more into BackpropFelix Dangel, Frederik Kunstner, Philipp HennigICLR 2020 · 114 次引用
- It's All Just Vectorization: einx, a Universal Notation for Tensor OperationsFlorian Fervers, Sebastian Bullinger, Christoph Bodensteiner, Michael ArensICLR 2026 · 1 次引用
- EINNET: Optimizing Tensor Programs with Derivation-Based TransformationsLiyan Zheng, Haojie Wang, Jidong Zhai, Muyan Hu 等OSDI 2023 · 19 次引用
