Tensor Relational Algebra for Distributed Machine Learning System Design
Binhang Yuan, Dimitrije Jankov, Jia Zou, Yuxin Tang, Daniel Bourgeois, Chris Jermaine
Abstract
We consider the question: what is the abstraction that should be implemented by the computational engine of a machine learning system? Current machine learning systems typically push whole tensors through a series of compute kernels such as matrix multiplications or activation functions, where each kernel runs on an AI accelerator (ASIC) such as a GPU. This implementation abstraction provides little built-in support for ML systems to scale past a single machine, or for handling large models with matrices or tensors that do not easily fit into the RAM of an ASIC. In this paper, we present an alternative implementation abstraction called the tensor relational algebra (TRA). The TRA is a set-based algebra based on the relational algebra. Expressions in the TRA operate over binary tensor relations, where keys are multi-dimensional arrays and values are tensors. The TRA is easily executed with high efficiency in a parallel or distributed environment, and amenable to automatic optimization. Our empirical study shows that the optimized TRA-based back-end can significantly outperform alternatives for running ML workflows in distributed clusters. 1 Throughout the paper, we use the term front-end to refer to the programmer-facing API and compiler; in PyTorch, for example, this would be the part of the system that accepts Einstein notation and transforms it into a set of executable operations. We use the term back-end to refer to the sub-system that actually executes the computation.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 19fcd5c6-8479-4b1b-bc1b-660afa416a92Cited by top-tier papers16
- Query Processing on Tensor Computation RuntimesDong He, Supun Chathuranga Nakandala, Dalitso Banda, Rathijit Sen et al.VLDB 2022 · 54 citations
- End-to-end Optimization of Machine Learning Prediction QueriesKwanghyun Park, Karla Saur, Dalitso Banda, Rathijit Sen et al.SIGMOD 2022 · 50 citations
- BAGUA: Scaling up Distributed Learning with System RelaxationsShaoduo Gan, Xiangru Lian, Rui Wang, Jianbin Chang et al.VLDB 2022 · 35 citations
- Autoscheduling for sparse tensor algebra with an asymptotic cost modelWillow Ahrens, Fredrik Kjolstad, Saman P. AmarasinghePLDI 2022 · 30 citations
- Optimizing Tensor Programs on Flexible StorageMaximilian Schleich, Amir Shaikhha, Dan SuciuSIGMOD 2023 · 21 citations
Builds on3
- A Simple and Efficient Tensor CalculusSören Laue, Matthias Mitterreiter, Joachim GiesenAAAI 2020 · 40 citations
- DB4ML - An In-Memory Database Kernel with Machine Learning SupportMatthias Jasny, Tobias Ziegler, Tim Kraska, Uwe Röhm et al.SIGMOD 2020 · 27 citations
- A Relational Matrix Algebra and its Implementation in a Column StoreOksana Dolmatova, Nikolaus Augsten, Michael H. BöhlenSIGMOD 2020 · 11 citations
Related papers
- Automatically Generating ML Compiler Backends from Tensor Accelerator ISA DescriptionsDevansh Jain, Akash Pardeshi, Marco Frigo, Kaustubh Khulbe et al.OOPSLA 2026
- PystachIO: Efficient Distributed GPU Query Processing with PyTorch over Fast Networks & Fast StorageJigao Luo, Nils Boeschen, Muhammad El-Hindi, Carsten BinnigVLDB 2026
- Automatic Optimization of Matrix Implementations for Distributed Machine Learning and Linear AlgebraShangyu Luo, Dimitrije Jankov, Binhang Yuan, Chris JermaineSIGMOD 2021 · 9 citations
- 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
- Tensors: An abstraction for general data processingDimitrios Koutsoukos, Supun Nakandala, Konstantinos Karanasos, Karla Saur et al.VLDB 2021 · 38 citations
