Lune

NeurIPS2025Top-tier venue

Exploiting Dynamic Sparsity in Einsum

Christoph Staudt, Mark Blacher, Tim Hoffmann, Lea Kasche, Olaf Beyersdorff, Joachim Giesen

Abstract

Einsum expressions specify an output tensor in terms of several input tensors. They offer a simple yet expressive abstraction for many computational tasks in artificial intelligence and beyond. However, evaluating einsum expressions poses hard algorithmic problems that depend on the representation of the tensors. Two popular representations are multidimensional arrays and coordinate lists. The latter is a more compact representation for sparse tensors, that is, tensors where a significant proportion of the entries are zero. So far, however, most of the popular einsum implementations use the multidimensional array representation for tensors. Here, we show on a non-trivial example that, when evaluating einsum expressions, coordinate lists can be exponentially more efficient than multidimensional arrays. In practice, however, coordinate lists can also be significantly less efficient than multidimensional arrays, but it is hard to decide from the input tensors whether this will be the case. Sparsity evolves dynamically in intermediate tensors during the evaluation of an einsum expression. Therefore, we introduce a hybrid solution where the representation is switched on the fly from multidimensional arrays to co-ordinate lists depending on the sparsity of the remaining tensors. In our experiments on established benchmark einsum expressions, the hybrid solution is consistently competitive with or outperforms the better of the two static representations.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Proof Systems for Tensor-based Model Counting cites Scalable Quantitative Verification For Deep Neural Networks
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Proof Systems for Tensor-based Model CountingOlaf Beyersdorff, Joachim Giesen, Andreas Goral, Tim Hoffmann et al.AAAI 2026 · 1 citation
  2. Automated Tensor-Relational Decomposition for Large-Scale Sparse Tensor ComputationYuxin Tang, Zhiyuan Xin, Zhimin Ding, Xinyu Yao et al.VLDB 2026

Builds on10

  1. A Compositional Atlas of Tractable Circuit Operations for Probabilistic InferenceAntonio Vergari, YooJung Choi, Anji Liu, Stefano Teso et al.NeurIPS 2021 · 112 citations
  2. Deep Ensembling with No Overhead for either Training or Testing: The All-Round Blessings of Dynamic SparsityShiwei Liu, Tianlong Chen, Zahra Atashgahi, Xiaohan Chen et al.ICLR 2022 · 62 citations
  3. Check before You Change: Preventing Correlated Failures in Service UpdatesEnnan Zhai, Ang Chen, Ruzica Piskac, Mahesh Balakrishnan et al.NSDI 2020 · 46 citations
  4. Scalable Quantitative Verification For Deep Neural NetworksTeodora Baluta, Zheng Leong Chua, Kuldeep S. Meel, Prateek SaxenaICSE 2021 · 39 citations
  5. Non-asymptotic Approximation Error Bounds of Parameterized Quantum CircuitsZhan Yu, Qiuhao Chen, Yuling Jiao, Yinan Li et al.NeurIPS 2024 · 35 citations

Related papers

  1. Einsum Trees: An Abstraction for Optimizing the Execution of Tensor ExpressionsAlexander Breuer, Mark Blacher, Max Engel, Joachim Giesen et al.ASPLOS 2025
  2. Insum: Sparse GPU Kernels Simplified and Optimized with Indirect EinsumsJaeyeon Won, Willow Ahrens, Saman P. Amarasinghe, Joel S. EmerASPLOS 2026
  3. Efficient and Portable Einstein Summation in SQLMark Blacher, Julien Klaus, Christoph Staudt, Sören Laue et al.SIGMOD 2023 · 15 citations
  4. Automatic generation of efficient sparse tensor format conversion routinesStephen Chou, Fredrik Kjolstad, Saman P. AmarasinghePLDI 2020 · 26 citations
  5. EinDecomp: Decomposition of Declaratively-Specified Machine Learning and Numerical Computations for Parallel ExecutionDaniel Bourgeois, Zhimin Ding, Dimitrije Jankov, Jiehui Li et al.VLDB 2025 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines