通过向量化与缓存加速神经符号推理,让模型训练快上百倍。
Accelerating NeurASP with vectorization and caching

- 用向量化和批量处理替代逐个计算,大幅减少重复运算。
- 在扑克牌复杂任务上实现多数量级提速,支持更复杂推理。
- 适合需要高效神经符号学习的研究者与工业应用落地者。
神经符号AI将神经网络与符号程序结合,实现稳健且可解释的预测。NeurASP框架通过神经网络预测概念,并利用答案集编程(ASP)规则进行推理以解决下游任务。关键在于仅对符号规则生成的最终输出提供标签,而非中间概念。由于ASP组件不可微,反向传播需进行昂贵的概率与梯度计算,限制了其在复杂任务上的扩展性。本文通过向量化、批处理及中间结果缓存,显著提升NeurASP的训练效率。我们在更大规模任务上对比新旧版本,报告了多个数量级的速度提升。为此,我们构建了一个包含扑克牌推理的新型困难数据集,用于测试增强后模型的学习能力。
原文摘要 · Abstract (English)
Neurosymbolic AI combines neural networks with symbolic programs to create robust and explainable predictions. One such framework is NeurASP, which trains a neural network to predict concepts and reasons over them using rules written in answer set programming (ASP) to solve downstream tasks. Crucially, labels are only provided for the downstream prediction produced by the symbolic rules, not for the latent concepts themselves. Backpropagation through the non-differentiable ASP component requires expensive probability and gradient calculations, which has hindered scalability to more sophisticated tasks. In this paper, we address the current limitations of NeurASP by improving its computational performance through vectorization, batch processing and caching of intermediate computations during training. We compare computation speeds between the original and our new implementation of NeurASP and report speedups of multiple orders of magnitude for larger tasks. To this end, we propose a new dataset of difficult tasks involving playing cards, which we use to test the capabilities of NeurASP's enhanced learning function.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。