Expressive Power of Linear Algebra Query Languages (original) (raw)
Related papers
On the Expressiveness of LARA: A Unified Language for Linear and Relational Algebra
2020
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...
Computing Logic Programming Semantics in Linear Algebra
Lecture Notes in Computer Science, 2018
Logic programming is a logic-based programming paradigm, and provides languages for declarative problem solving and symbolic reasoning. In this paper, we develop new algorithms for computing logic programming semantics in linear algebra. We first introduce an algorithm for computing the least model of a definite logic program using matrices. Next, we introduce an algorithm for computing stable models of a normal logic program. We also develop optimization techniques for speeding-up those algorithms. Finally, the complexity of them is analyzed and tested in practice.
Lecture Notes in Computer Science
We show that the matrix query language MATLANG corresponds to a natural fragment of the positive relational algebra on K-relations. The fragment is defined by introducing a composition operator and restricting K-relation arities to two. We then proceed to show that MATLANG can express all matrix queries expressible in the positive relational algebra on K-relations, when intermediate arities are restricted to three. Thus we offer an analogue, in a model with numerical data, to the situation in classical logic, where the algebra of binary relations is equivalent to first-order logic with three variables.
A language for computational algebra
1981
This paper reports ongoing research at th e IBM Research Center on the development of a languag e with extensible parameterized types and generic operator s for computational algebra. The language provides a n abstract data type mechanism for defining algorithm s which work in as general a setting as possible. The language is based on the notions of domains and categories. Domains represent algebraic structures. Categorie s designate collections of domains having common operations with stated mathematical properties. Domain s and categories are computed objects which may b e dynamically assigned to variables, passed as arguments , and returned by functions. Although the language ha s been carefully tailored for the application of algebrai c computation, it actually provides a very general abstrac t data type mechanism. Our notion of a category to group domains with common properties appears novel amon g programming languages (cf. image functor of RUSSELL) and leads to a very powerful notion of abstract algorithm s missing from other work on data types known to th e authors. 1. Introduction. This paper describes a language wit h parameterized types and generic operators particularl y suited to computational algebra. A flexible framewor k is given for building algebraic structures and definin g algorithms which work in as general a setting a s possible. This section will be an overview of our mai n concepts: domains " and " categories In section 2, w e give more precise definitions and some examples. Section 3 contains our conclusions .
Typed Linear Algebra for Efficient Analytical Querying
ArXiv, 2018
This paper uses typed linear algebra (LA) to represent data and perform analytical querying in a single, unified framework. The typed approach offers strong type checking (as in modern programming languages) and a diagrammatic way of expressing queries (paths in LA diagrams). A kernel of LA operators has been implemented so that paths extracted from LA diagrams can be executed. The approach is validated and evaluated taking TPC-H benchmark queries as reference. The performance of the LA-based approach is compared with popular database competitors (PostgreSQL and MySQL).
Expressiveness of Matrix and Tensor Query Languages in terms of ML Operators
Proceedings of the 3rd International Workshop on Data Management for End-to-End Machine Learning, 2019
Tensors are one of the most widely used data structures in modern Machine Learning applications. Although they provide a flexible way of storing and accessing data, they often expose too many low-level details that may result in error prone code that is difficult to maintain and extend. Abstracting low-level functionalities into high-level operators in the form of a query language is a task in which the Data Management community has extensive experience. It is thus important to understand how such an experience can be applied in the design of useful languages for tensor manipulation. In this short paper we study a matrix and a tensor query language that have been recently proposed in the database literature. We show, by using examples, how these proposals are in line with the practical interest in rethinking tensor abstractions. On the technical side, we compare the two languages in terms of operators that naturally arise in Machine Learning pipelines, such as convolution, matrix-in...
A Linear Logic View of Gamma Style Computations as Proof Searches
Coordination Programming: Mechanisms, Models and Semantics, 1996
Using the methodology of abstract logic programming in linear logic, we establish a correct and complete translation between the language Nabla and rst order linear logic. Nabla is a modi cation of the coordination language Gamma with parallel and sequential composition. Nabla, without modifying Gamma basic computational model, is amenable to this kind of analysis, at the price of a weaker expressive power. The translation is correct and complete in the sense that we establish a two way correspondence between computations in Nabla and the search for proofs in a suitable fragment of rst order linear logic. Moreover, the translation is not an encoding, meaning that to the algebraic structure of Nabla programs is assigned logical meaning through a non-trivial use of linear logic connectives, as opposed to merely re ecting their operational behavior through a simulation into terms of the logic. In this way we hope that the connection established between the two formalisms can compensate for the diminished expressive power of Nabla with a powerful analysis tool, which could lead both to theoretical and practical improvements in semantic foundations of Gamma-style languages and in the design of e cient implementations of their interpreters. The main di culty has been to deal with sequential composition of programs, and to smoothly integrate its logical treatment in a recursive framework. An intermediate step is the de nition of the language SMR, by which it is possible to specify in a very intuitive way Nabla operational semantics, and to prove that this speci cation is actually equivalent to the SOS-style one derived from Gamma semantics.
Bounded linear logic: a modular approach to polynomial-time computability
Theoretical Computer Science, 1992
Usual typed lambda-calculi yield input/output specifications; in this paper the authors show how to extend this paradigm to complexity specifications. This is achieved by means of a restricted version of linear logic in which the use of exponential connectives is bounded in advance. This bounded linear logic naturally involves polynomials in its syntax and dynamics. It is then proved that any functional term of appropriate type actually encodes a polynomial-time algorithm and that conversely any polynomial-time function can be obtained in this way.
FLAME: Formal Linear Algebra Methods Environment
ACM Transactions on Mathematical Software, 2001
Since the advent of high-performance distributed-memory parallel computing, the need for intelligible code has become ever greater. The development and maintenance of libraries for these architectures is simply too complex to be amenable to conventional approaches to implementation. Attempts to employ traditional methodology have led, in our opinion, to the production of an abundance of anfractuous code that is difficult to maintain and almost impossible to upgrade.
Algorithmic Specifications In Linear Logic With Subexponentials
Proceedings of the 11th ACM SIGPLAN …, 2009
The linear logic exponentials !, ? are not canonical: one can add to linear logic other such operators, say !^{l} , ?^{l} , which may or may not allow contraction and weakening, and where l is from some pre-ordered set of labels. We shall call these additional operators subexponentials and use them to assign locations to multisets of formulas within a linear logic programming setting. Treating locations as subexponentials greatly increases the algorithmic expressiveness of logic. To illustrate this new expressiveness, we show that focused proof search can be precisely linked to a simple algorithmic specification language that contains while-loops, conditionals, and insertion into and deletion from multisets. We also give some general conditions for when a focused proof step can be executed in constant time. In addition, we propose a new logical connective that allows for the creation of new subexponentials, thereby further augmenting the algorithmic expressiveness of logic.