arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1608.00139cs.AI
收藏

数据量评估的线性代数方法

A Linear Algebraic Approach to Datalog Evaluation

AI research center AIST(日本产业技术综合研究所人工智能研究中心);National Institute of Informatics(日本国立信息学研究所)

Taisuke Sato

摘要:

在本文中,我们提出了一个全新的方法来评估数据库。给定一个使用N个常量和二元谓词编写的线性Datasheet程序DB,我们首先将DB中子句的if-and-only-if完成转换为具有非线性运算的矩阵方程组Eq(DB),其中DB的最小Herbrand模型M_DB中的关系被编码为邻接矩阵。然后,我们将Eq(DB)转换为另一个纯线性矩阵方程tilde_Eq(DB)。证明了波浪号_Eq(DB)在矩阵排序意义下的最小解转化为Eq(DB)的最小解,后者给出M_DB作为邻接矩阵的集合。因此,计算波浪线_Eq(DB)的最小解等效于计算DB指定的M_DB。对于一类尾递归程序和一些其他类型的程序,我们的方法实现了O(N^3)时间复杂度的变量在一个子句中的数量无关,因为只有成本O(N^3)或更少的矩阵运算被使用。我们进行了两个实验,计算最少Herbrand模型的线性Datasheet程序。第一个实验计算人工数据和从Koblenz网络集合中获取的真实网络数据的传递闭包。第二个比较所提出的方法与国家的最先进的符号系统,包括两个Prolog系统和两个ASP系统,在计算时间方面的传递闭包程序和相同的生成程序。在实验中,我们观察到,我们的线性代数方法运行速度比符号系统的10^1 ~ 10^4倍,当数据不是稀疏的。逻辑程序设计理论与实践(Theory and Practice of Logic Programming,TPLP)

英文摘要:

In this paper, we propose a fundamentally new approach to Datalog evaluation. Given a linear Datalog program DB written using N constants and binary predicates, we first translate if-and-only-if completions of clauses in DB into a set Eq(DB) of matrix equations with a non-linear operation where relations in M_DB, the least Herbrand model of DB, are encoded as adjacency matrices. We then translate Eq(DB) into another, but purely linear matrix equations tilde_Eq(DB). It is proved that the least solution of tilde_Eq(DB) in the sense of matrix ordering is converted to the least solution of Eq(DB) and the latter gives M_DB as a set of adjacency matrices. Hence computing the least solution of tilde_Eq(DB) is equivalent to computing M_DB specified by DB. For a class of tail recursive programs and for some other types of programs, our approach achieves O(N^3) time complexity irrespective of the number of variables in a clause since only matrix operations costing O(N^3) or less are used. We conducted two experiments that compute the least Herbrand models of linear Datalog programs. The first experiment computes transitive closure of artificial data and real network data taken from the Koblenz Network Collection. The second one compared the proposed approach with the state-of-the-art symbolic systems including two Prolog systems and two ASP systems, in terms of computation time for a transitive closure program and the same generation program. In the experiment, it is observed that our linear algebraic approach runs 10^1 ~ 10^4 times faster than the symbolic systems when data is not sparse. To appear in Theory and Practice of Logic Programming (TPLP).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑