Table of Contents
Fetching ...

Answer Set Networks: Casting Answer Set Programming into Deep Learning

Arseny Skryagin, Daniel Ochs, Phillip Deibert, Simon Kohaut, Devendra Singh Dhami, Kristian Kersting

TL;DR

Answer Set Networks (ASN) address the throughput bottleneck of ASP-based NeSy systems by casting ASP-Core-2 programs into Reasoning Graphs and solving with GPU-accelerated graph neural networks. The neural compilation, choice definitization, and message-passing enable parallel search for stable models and integration with neural predicates, yielding substantial speedups on DPPL tasks. The paper also demonstrates abductive LLM fine-tuning to mitigate the reversal curse and shows strong performance in large-scale UAV routing and MNIST-Addition tasks, illustrating practical impact for scalable NeSy AI. Overall, ASN provides a scalable bridge between symbolic logic and sub-symbolic learning, enabling new applications and efficient guidance of LLMs by logical constraints.

Abstract

Although Answer Set Programming (ASP) allows constraining neural-symbolic (NeSy) systems, its employment is hindered by the prohibitive costs of computing stable models and the CPU-bound nature of state-of-the-art solvers. To this end, we propose Answer Set Networks (ASN), a NeSy solver. Based on Graph Neural Networks (GNN), ASNs are a scalable approach to ASP-based Deep Probabilistic Logic Programming (DPPL). Specifically, we show how to translate ASPs into ASNs and demonstrate how ASNs can efficiently solve the encoded problem by leveraging GPU's batching and parallelization capabilities. Our experimental evaluations demonstrate that ASNs outperform state-of-the-art CPU-bound NeSy systems on multiple tasks. Simultaneously, we make the following two contributions based on the strengths of ASNs. Namely, we are the first to show the finetuning of Large Language Models (LLM) with DPPLs, employing ASNs to guide the training with logic. Further, we show the "constitutional navigation" of drones, i.e., encoding public aviation laws in an ASN for routing Unmanned Aerial Vehicles in uncertain environments.

Answer Set Networks: Casting Answer Set Programming into Deep Learning

TL;DR

Answer Set Networks (ASN) address the throughput bottleneck of ASP-based NeSy systems by casting ASP-Core-2 programs into Reasoning Graphs and solving with GPU-accelerated graph neural networks. The neural compilation, choice definitization, and message-passing enable parallel search for stable models and integration with neural predicates, yielding substantial speedups on DPPL tasks. The paper also demonstrates abductive LLM fine-tuning to mitigate the reversal curse and shows strong performance in large-scale UAV routing and MNIST-Addition tasks, illustrating practical impact for scalable NeSy AI. Overall, ASN provides a scalable bridge between symbolic logic and sub-symbolic learning, enabling new applications and efficient guidance of LLMs by logical constraints.

Abstract

Although Answer Set Programming (ASP) allows constraining neural-symbolic (NeSy) systems, its employment is hindered by the prohibitive costs of computing stable models and the CPU-bound nature of state-of-the-art solvers. To this end, we propose Answer Set Networks (ASN), a NeSy solver. Based on Graph Neural Networks (GNN), ASNs are a scalable approach to ASP-based Deep Probabilistic Logic Programming (DPPL). Specifically, we show how to translate ASPs into ASNs and demonstrate how ASNs can efficiently solve the encoded problem by leveraging GPU's batching and parallelization capabilities. Our experimental evaluations demonstrate that ASNs outperform state-of-the-art CPU-bound NeSy systems on multiple tasks. Simultaneously, we make the following two contributions based on the strengths of ASNs. Namely, we are the first to show the finetuning of Large Language Models (LLM) with DPPLs, employing ASNs to guide the training with logic. Further, we show the "constitutional navigation" of drones, i.e., encoding public aviation laws in an ASN for routing Unmanned Aerial Vehicles in uncertain environments.

Paper Structure

This paper contains 25 sections, 7 equations, 12 figures, 3 tables.

Figures (12)

  • Figure 1: ASN solving process: ASN takes a grounded ASP program as input and translates it into an equivalent Reasoning Graph via neural compilation. The RG instances representing all possible choice selections are constructed in the definitization stage, to be iteratively solved in parallel using message passing. Finally, the resulting models are reduced to yield the ASP's stable models.
  • Figure 2: Building Blocks of any Reasoning Graph: We depict nine distinct elements to compile any ground ASP program into an RG.
  • Figure 3: Neural Compilation of ASP-Core-2 Elements into RG: For each element of the ASP syntax, we generate the equivalent Reasoning Graph (RG) representation encoded as GNN. The graphs are generated automatically from grounded ASP-programs. From left to right, some building-blocks of the overall RG are: i) facts, ii) disjunctive facts, iii) aggregate literal, iv) rule, v) constraint, vi) classical negation, vii) choice rule.
  • Figure 4: Example of Neural-Probabilistic Predicate: $img(i).\; \#npp(digit(i), [0,1,2]):\!\!-\ img(i).$
  • Figure 5: ASN on Abductive Fine-Tuning of LLMs and ProMis over Paris during the Olympics.
  • ...and 7 more figures