IterLara: A Turing Complete Algebra for Big Data, AI, Scientific Computing, and Database

Hongxiao Li, Wanling Gao, Lei Wang, Jianfeng ZhanarXiv 2023 · DOI

TL;DR

This paper introduces ITERLARA, an extension of the LARA algebra, designed to unify computations across big data, AI, scientific computing, and databases. By adding iterative operators to LARA, ITERLARA achieves Turing completeness and can represent complex operations like matrix inversion and determinant, which were previously beyond LARA's capabilities.

What Problem Does This Paper Address?

The increasing convergence of big data, AI, scientific computing, and database technologies has created a need for a unified algebraic model that can express computations across these diverse fields. Existing models, such as relational algebra for databases and tensor computation graphs for AI, have different algebraic structures, making unification challenging. General-purpose models like the Turing machine lack high-level abstractions suitable for contemporary computations. While LARA offered a step towards unification by combining linear and relational algebra, it had limitations, notably its inability to represent essential operations like matrix inversion and determinant, or iterative computations. This paper addresses this gap by proposing ITERLARA, an extension that aims to provide a concise, unified, and Turing-complete algebraic model for these diverse computational domains.

Methods

The core of this work is the extension of the LARA (Linear and Relational Algebra) algebraic model. LARA is a key-value algebra that unifies linear and relational algebra with three types of operation abstractions. The authors introduce an iterative operator to LARA, creating ITERLARA. This extension allows for the representation of iterative computations, which are crucial for general-purpose computing.

Key methodological contributions include:

  • Expressive Ability Study of LARA: Thoroughly analyzing LARA's capabilities, proving that it cannot represent matrix inversion and determinant for arbitrary matrices, though it can for specific sizes.
  • Introduction of ITERLARA: Defining ITERLARA by adding an iterative operator (iter) to LARA. This operator takes a condition expression and an iteration body, enabling the representation of loops.
  • Analysis of ITERLARA's Expressive Ability:
    • ITERLARAConst: Equivalent to LARA when iteration is limited to a constant number of steps.
  • ITERLARACount: Capable of representing matrix inversion and determinant by using aggregation functions within iterations.
  • ITERLARA (unrestricted): Proven to be Turing complete by demonstrating the representation of all operators from the BF language.
  • Operation Count (OP) Metric: Defining a new metric for computation amount, compatible with existing metrics like FLOPs and time/space complexity.

Datasets

Not discussed in the paper. The paper focuses on theoretical algebraic models and their expressive capabilities, rather than empirical evaluation on specific datasets.

Key Insights and Ideas

  • Iteration is Key to Universality: The addition of a simple iterative operator to LARA was sufficient to unlock Turing completeness and the ability to represent a much wider range of computations, including those previously impossible for LARA.
  • Bridging the Gap: ITERLARA effectively bridges the gap between specialized algebraic models (like relational algebra) and general-purpose computation, offering a unified framework for big data, AI, scientific computing, and databases.
  • Matrix Inversion and Determinant are Achievable with Iteration: The paper demonstrates that while LARA alone struggles with matrix inversion and determinant, ITERLARA (specifically ITERLARACount) can represent these operations, highlighting the power of iterative constructs.
  • Turing Completeness as a Benchmark: Proving ITERLARA's Turing completeness by mapping BF language operators provides a strong theoretical foundation for its expressive power, suggesting it can compute anything a Turing machine can.
  • Operation Count (OP) as a Unified Metric: The introduction of the OP metric offers a way to quantify computation cost within this new algebraic framework, aligning with existing performance metrics.

Key Results

  • LARA cannot represent arbitrary matrix inversion and determinant.
  • ITERLARA, with the addition of iterative operators, can represent matrix inversion and determinant (ITERLARACount).
  • ITERLARA (unrestricted) is Turing complete, capable of representing any computation.
  • The paper defines an Operation Count (OP) metric for ITERLARA expressions, which is shown to be compatible with FLOPs and time/space complexity.

Limitations and Future Work

  • Unsolved Problems: The paper notes that some propositions regarding expressive ability remain unsolved (marked with "?" in Table 11), indicating areas for future theoretical research.
  • Practical Implementation: While ITERLARA is a powerful theoretical model, its practical implementation and the development of OP computing tools based on libraries like LaraDB are suggested as future work.
  • Theoretical Exploration: Further theoretical work on the expressive ability of LARA with specific added computations (e.g., LARA + Inv) is also mentioned.
  • User-Defined Functions: The paper relies on user-defined functions and their properties (commutativity, associativity) for certain proofs. While methods are proposed to handle functions that don't initially possess these properties, this aspect could be a point of complexity in practical applications.

Summary updated

BibTeX
@misc{li2023iterlara,
  author = {Hongxiao Li and Wanling Gao and Lei Wang and Jianfeng Zhan},
  title = {{IterLara: A Turing Complete Algebra for Big Data, AI, Scientific Computing, and Database}},
  year = {2023},
  eprint = {2307.08315},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.08315},
}
Figure