LLASP: Fine-tuning Large Language Models for Answer Set Programming
Not on the map. Why?
Abstract (arXiv)
Recently, Large Language Models (LLMs) have showcased their potential in various natural language processing tasks, including code generation. However, while significant progress has been made in adapting LLMs to generate code for several imperative programming languages and tasks, there remains a notable gap in their application to declarative formalisms, such as Answer Set Programming (ASP). In this paper, we move a step towards exploring the capabilities of LLMs for ASP code generation. First, we perform a systematic evaluation of several state-of-the-art LLMs. Despite their power in terms of number of parameters, training data and computational resources, empirical results demonstrate inadequate performances in generating correct ASP programs. Therefore, we propose LLASP, a fine-tuned lightweight model specifically trained to encode fundamental ASP program patterns. To this aim, we create an ad-hoc dataset covering a wide variety of fundamental problem specifications that can be encoded in ASP. Our experiments demonstrate that the quality of ASP programs generated by LLASP is remarkable. This holds true not only when compared to the non-fine-tuned counterpart but also when compared to the majority of eager LLM candidates, particularly from a semantic perspective. All the code and data used to perform the experiments are publicly available at https://anonymous.4open.science/r/LLASP-D86C/.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). Builds on 15 of its 32 references that are in the map. First posted on arXiv 26 Jul 2024.
Builds on
15 of 32 references.
References · 15
- 2017Attention Is All You Needcited by 60,361
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2019Fine-Tuning Language Models from Human Preferencescited by 2,150
- 2022A Systematic Evaluation of Large Language Models of Codecited by 363
- 2023The Impact of AI on Developer Productivity: Evidence from GitHub Copilotcited by 274
- 2019Neural Machine Translation: A Review and Surveycited by 100
- 2021Improving Coherence and Consistency in Neural Sequence Models with Dual-System, Neuro-Symbolic Reasoningcited by 85
- 2023Coupling Large Language Models with Logic Programming for Robust and General Reasoning from Textcited by 59
- 2024LLaMoCo: Instruction Tuning of Large Language Models for Optimization Code Generationcited by 45
- 2015A Survey and Classification of Controlled Natural Languagescited by 18
- 2022AI-driven Development Is Here: Should You Worry?cited by 15
Built on by
Citing papers per year: 2025: 2; 2026: 6.
8 papers.
- 2025Intermediate Languages Matter: Formal Languages and LLMs affect Neurosymbolic Reasoningcited by 0
- 2025Bridging Natural Language and ASP: A Hybrid Approach Using LLMs and AMR Parsingcited by 0
- 2026XAI-LAW: A Logic Programming Tool for Modeling, Explaining, and Learning Legal Decisionscited by 0
- 2026ASP-Bench: From Natural Language to Logic Programscited by 0
- 2026Streamliners for Answer Set Programmingcited by 0
- 2026Distilling Answer-Set Programming Rules from LLMs for Neurosymbolic Visual Question Answeringcited by 0
- 2026Driving, Fast or Slow? Neuro-Symbolic Guidance for Motion Prediction in Multi-Modal Ground Mobilitycited by 0
- 2026Automatic Conversion of NICE Guidelines to an Executable Computational Model Using Large Language Modelscited by 0
- 2026Automatic Conversion of NICE Guidelines to an Executable Computational Model Using Large Language Models30 Aug 2026
- 2026Driving, Fast or Slow? Neuro-Symbolic Guidance for Motion Prediction in Multi-Modal Ground Mobility13 Jun 2026
- 2026Distilling Answer-Set Programming Rules from LLMs for Neurosymbolic Visual Question Answering2 Jun 2026
- 2026Streamliners for Answer Set Programming21 Apr 2026
- 2026ASP-Bench: From Natural Language to Logic Programs1 Feb 2026
- 2026XAI-LAW: A Logic Programming Tool for Modeling, Explaining, and Learning Legal Decisions7 Jan 2026
- 2025Bridging Natural Language and ASP: A Hybrid Approach Using LLMs and AMR Parsing11 Nov 2025
- 2025Intermediate Languages Matter: Formal Languages and LLMs affect Neurosymbolic Reasoning4 Sep 2025