Skip to main content
QUICK REVIEW

[论文解读] Monotonic Properties of Completed Aggregates in Recursive Queries

Carlo Zaniolo, Ariyam Das|arXiv (Cornell University)|Oct 20, 2019
Logic, Reasoning, and Knowledge参考文献 22被引用 6
一句话总结

本文为具有固定基数数据集的递归 Datalog 程序中的聚集函数提出了形式化语义,表明 min、max 和 count 等单调聚集函数可保持不动点收敛性,并可通过半朴素评估实现高效、可扩展的执行。主要贡献在于提出了一种分层语义,将聚集完成视为后置约束,从而在不引发非单调性问题的情况下应用现有优化技术。

ABSTRACT

The use of aggregates in recursion enables efficient and scalable support for a wide range of BigData algorithms, including those used in graph applications, KDD applications, and ML applications, which have proven difficult to be expressed and supported efficiently in BigData systems supporting Datalog or SQL. The problem with these languages and systems is that, to avoid the semantic and computational issues created by non-monotonic constructs in recursion, they only allow programs that are stratified with respect to negation and aggregates. Now, while this crippling restriction is well-justified for negation, it is frequently unjustified for aggregates, since (i) aggregates are often monotonic in the standard lattice of set-containment, (ii) the PreM property guarantees that programs with extrema in recursion are equivalent to stratified programs where extrema are used as post-constraints, and (iii) any program computing any aggregates on sets of facts of predictable cardinality tantamounts to stratified programs where the precomputation of the cardinality of the set is followed by a stratum where recursive rules only use monotonic constructs. With (i) and (ii) covered in previous papers, this paper focuses on (iii) using examples of great practical interest. For such examples, we provide a formal semantics that is conducive to efficient and scalable implementations via well-known techniques such as semi-naive fixpoint currently supported by most Datalog and SQL3 systems.

研究动机与目标

  • 解决分层语义在 Datalog 和 SQL 中对涉及递归和聚集的复杂大数据工作负载的局限性。
  • 证明在固定基数数据集上,聚集函数在集合包含格中是单调的,从而支持高效且正确的递归计算。
  • 表明使用极值(min、max)和 count 的递归程序可被转换为带有后置约束的等价分层程序,避免非单调性问题。
  • 通过标准优化技术(如半朴素不动点和约束下推)实现高效、可扩展的实现。
  • 通过利用预可映射性(Pre-Mappability)特性,弥合形式化非单调语义与高性能大数据系统之间的差距。

提出的方法

  • 利用预可映射性特性,为具有聚集函数的固定基数集合上的递归 Datalog 程序定义形式化语义。
  • 将程序划分为三个层次:(i) 底层用于计数或预计算基数,(ii) 中层为单调 Horn 规则,(iii) 顶层用于使用极值进行后选择。
  • 在单调中层使用半朴素不动点计算,以实现高效、可扩展的评估。
  • 利用系统级检测递归步骤中体部算子的完成情况,以触发最终结果提取,从而消除冗余计算。
  • 将该方法应用于真实世界算法(如马尔可夫链和 Lloyd 聚类),表明聚集计算涉及固定大小的操作数集合。
  • 使用编码/解码函数(例如 encd、decd)在递归规则中高效表示多维值。

实验结果

研究问题

  • RQ1当底层数据集具有固定且可预测的基数时,是否可以安全地使用递归 Datalog 程序中的聚集函数?
  • RQ2如何在不引入非单调性的情况下,语义上合理化递归程序中 min、max 和 count 等单调聚集函数?
  • RQ3是否可以将使用聚集函数的递归程序转换为带有后置约束的等价分层程序,以保持正确性并支持优化?
  • RQ4现有优化技术(如半朴素不动点和约束下推)在聚集密集型递归查询中可应用到何种程度?
  • RQ5预可映射性特性是否可用于在大数据工作负载中同时实现形式化语义和性能可扩展性?

主要发现

  • 在固定基数数据集上,min、max 和 count 等聚集函数在标准集合包含格中是单调的,从而支持安全的递归使用。
  • 使用极值的递归程序在语义上等价于将聚集作为后置约束应用的分层程序,避免了非单调性问题。
  • 可通过系统级监控 delta 变化来检测聚集计算的完成,从而实现高效的终止和结果提取。
  • 对于马尔可夫链和 Lloyd 聚类,每个聚集处理的元素数量在递归步骤中保持恒定,且可预先计算。
  • 在单调中层使用半朴素不动点可确保高效、可扩展的执行,通过消除不必要的中间原子,显著降低内存和计算开销。
  • 通过预可映射性特性补偿数据倾斜,该方法可在并行架构上实现高性能执行。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。