[Paper Review] On the Expressiveness of LARA: A Unified Language for Linear and Relational Algebra
This paper investigates the expressive power of Lara, a unified language for linear and relational algebra, showing it is expressive complete with respect to first-order logic with aggregation. The study reveals that while Lara can express many database and machine learning operations, it cannot express matrix convolution or inverse under genericity and locality constraints, and proving inexpressibility without complexity assumptions remains challenging.
We study the expressive power of the LARA language -- a recently proposed unified model for expressing relational and linear algebra operations -- both in terms of traditional database query languages and some analytic tasks often performed in machine learning pipelines. We start by showing LARA to be expressive complete with respect to first-order logic with aggregation. Since LARA is parameterized by a set of user-defined functions which allow to transform values in tables, the exact expressive power of the language depends on how these functions are defined. We distinguish two main cases depending on the level of genericity queries are enforced to satisfy. Under strong genericity assumptions the language cannot express matrix convolution, a very important operation in current machine learning operations. This language is also local, and thus cannot express operations such as matrix inverse that exhibit a recursive behavior. For expressing convolution, one can relax the genericity requirement by adding an underlying linear order on the domain. This, however, destroys locality and turns the expressive power of the language much more difficult to understand. In particular, although under complexity assumptions the resulting language can still not express matrix inverse, a proof of this fact without such assumptions seems challenging to obtain.
Motivation & Objective
- To analyze the expressive power of Lara, a unified language for linear and relational algebra, in terms of logical query languages and machine learning operations.
- To determine under which conditions Lara can express key operations like matrix convolution and matrix inverse.
- To investigate the impact of user-defined functions and domain ordering on Lara’s expressive completeness and logical properties such as locality and genericity.
- To assess the feasibility of proving inexpressibility results for complex operations like matrix inverse in Lara, especially under complexity-theoretic assumptions.
- To explore extensions of Lara with minimal primitives to express recursive operations such as matrix inverse while maintaining practicality.
Proposed method
- The paper establishes expressive completeness of Lara with respect to a safe syntactic fragment of first-order logic with aggregation (FO_Agg), using a parameterized class of user-defined functions.
- It distinguishes two main cases: a 'tame' version of Lara with equality-only key comparisons and FO-expressible functions, which satisfies strong genericity and locality.
- It introduces a more expressive variant of Lara with a built-in linear order and arithmetic functions, which breaks locality and genericity but enables more complex operations.
- It applies complexity-theoretic reasoning to show that expressing matrix inverse in a restricted fragment of Lara would imply Logspace = Det, a widely believed false collapse.
- It uses Ehrenfeucht-Fraïssé games as a potential but combinatorially difficult technique for proving inexpressibility in the ordered setting.
- It proposes future directions, such as extending the tame fragment with specific operators like convolution or inverse, to study minimal extensions for recursive expressiveness.
Experimental results
Research questions
- RQ1Can Lara express all queries expressible in first-order logic with aggregation, and under what conditions on its user-defined functions?
- RQ2Why is matrix convolution inexpressible in the generic, local variant of Lara, and what changes are needed to express it?
- RQ3Does adding a linear order to Lara’s domain break its locality and genericity, and what are the consequences for expressive power?
- RQ4Is it possible to prove that matrix inverse is not expressible in Lara without relying on complexity-theoretic assumptions?
- RQ5What minimal extensions to Lara’s tame fragment are needed to naturally express recursive operations like matrix inverse?
Key findings
- Lara is expressive complete with respect to a safe fragment of first-order logic with aggregation, provided the user-defined functions are appropriately constrained.
- The tame variant of Lara, which uses only equality on keys and FO-expressible functions, satisfies strong genericity and locality, preventing it from expressing non-generic or recursive operations.
- Matrix convolution cannot be expressed in the generic, local version of Lara, as it violates the strong genericity requirement.
- Adding a linear order to the domain allows expression of convolution but breaks locality and genericity, complicating logical analysis.
- The fragment of Lara with standard aggregate operators and safe functions can be evaluated in Logspace, implying that expressing matrix inverse in this fragment would collapse Logspace to Det, a highly unlikely complexity-theoretic result.
- Proving inexpressibility of matrix inverse in the general ordered variant of Lara remains challenging without complexity assumptions, due to the combinatorial difficulty of applying techniques like Ehrenfeucht-Fraïssé games.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.