[论文解读] Synthesizing Datalog Programs Using Numerical Relaxation
本文提出 Difflog,一种 Datalog 的数值松弛方法,通过为规则分配实数值权重,实现 Datalog 程序合成的连续优化。通过使用混合牛顿-MCMC 优化方法最小化预测输出值与目标输出值之间的差异,Difflog 在 34 个基准测试中显著优于当前最先进系统,成功恢复了离散 Datalog 程序,包括复杂的递归程序和高阶关系程序。
The problem of learning logical rules from examples arises in diverse fields, including program synthesis, logic programming, and machine learning. Existing approaches either involve solving computationally difficult combinatorial problems, or performing parameter estimation in complex statistical models. In this paper, we present Difflog, a technique to extend the logic programming language Datalog to the continuous setting. By attaching real-valued weights to individual rules of a Datalog program, we naturally associate numerical values with individual conclusions of the program. Analogous to the strategy of numerical relaxation in optimization problems, we can now first determine the rule weights which cause the best agreement between the training labels and the induced values of output tuples, and subsequently recover the classical discrete-valued target program from the continuous optimum. We evaluate Difflog on a suite of 34 benchmark problems from recent literature in knowledge discovery, formal verification, and database query-by-example, and demonstrate significant improvements in learning complex programs with recursive rules, invented predicates, and relations of arbitrary arity.
研究动机与目标
- 为解决从示例中合成 Datalog 程序的计算难度,特别是针对包含递归和自定义谓词的复杂程序。
- 克服现有组合搜索与统计学习方法在噪声和可扩展性方面面临的局限。
- 通过将规则选择重新表述为连续优化问题,实现高效且鲁棒的程序合成。
- 利用并行计算与随机采样加速合成过程,超越确定性方法。
- 证明连续松弛能够以高精度与高速度恢复正确的离散 Datalog 程序。
提出的方法
- 扩展 Datalog,引入实数值规则权重,构建一种称为 Difflog 的连续语义,其中输出元组根据加权规则推导获得数值赋值。
- 将程序合成问题重新表述为最小化计算输出值与目标标签(理想元组为 1,不良元组为 0)之间 L2 损失的问题。
- 采用混合优化策略,结合牛顿法实现局部收敛,以及基于 MCMC 的模拟退火以跳出局部极小值和鞍点。
- 使用 Viterbi 半环实例化 K-关系框架,支持可追溯性的数值推理。
- 优化完成后,通过阈值化规则权重恢复离散 Datalog 程序,利用 Difflog 与经典 Datalog 之间的语义对应关系。
- 并行运行多个独立的优化实例,以实现随机加速并提升对初始化的鲁棒性。
实验结果
研究问题
- RQ1Datalog 规则的数值松弛是否能提升复杂逻辑程序合成的可扩展性与鲁棒性?
- RQ2将牛顿法与基于 MCMC 的采样相结合,是否在解决规则选择的非凸优化曲面时优于纯优化或纯采样策略?
- RQ3与确定性组合搜索相比,连续优化结合随机采样在多大程度上能实现更快、更可靠的正确 Datalog 程序恢复?
- RQ4基于松弛的方法是否能保持对递归规则、自定义谓词和任意元数关系的表达能力?
- RQ5该方法是否能在知识发现、形式化验证和数据库查询示例等多种基准测试中实现最先进性能?
主要发现
- Difflog 在 34 个基准中的 32 个达到 100% 成功率,仅在 downcast 和 rv-check 两个任务出现超时,且在 10 个程序分析基准中中位运行时间优于 Alps。
- 混合优化方法相比仅使用牛顿法的版本减少 31 倍超时,相比仅使用 MCMC 的版本减少 54 倍超时,表明在探索与利用之间具有更优的平衡。
- 运行时间随规则模板数量的增加仅略有上升,且与训练数据规模呈线性增长,表明具有良好的实际可扩展性。
- 在 32 次并行运行中,最佳运行时间始终快于 Alps,且通过并行执行实现了随机加速。
- 该方法成功合成了包含递归、自定义谓词和任意元数关系的复杂程序,证实其表达能力与鲁棒性。
- 从连续最优解中恢复离散 Datalog 程序的效果良好,所有成功基准的最终程序均与期望输出行为一致。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。