mlsanityData to 14 Oct 2026

LLASP: Fine-tuning Large Language Models for Answer Set Programming

arXiv 2407.18723 ↗First posted 26 Jul 2024cs.LG cs.LOcited by 8

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
  4. 2019Fine-Tuning Language Models from Human Preferencescited by 2,150
  5. 2022A Systematic Evaluation of Large Language Models of Codecited by 363
  6. 2023The Impact of AI on Developer Productivity: Evidence from GitHub Copilotcited by 274
  7. 2019Neural Machine Translation: A Review and Surveycited by 100
  8. 2021Improving Coherence and Consistency in Neural Sequence Models with Dual-System, Neuro-Symbolic Reasoningcited by 85
  9. 2023Coupling Large Language Models with Logic Programming for Robust and General Reasoning from Textcited by 59
  10. 2024LLaMoCo: Instruction Tuning of Large Language Models for Optimization Code Generationcited by 45
  11. 2015A Survey and Classification of Controlled Natural Languagescited by 18
  12. 2022AI-driven Development Is Here: Should You Worry?cited by 15
3 more
  1. 2024Towards Automatic Composition of ASP Programs from Natural Language Specificationscited by 7
  2. 2023CNL2ASP: converting controlled natural language sentences into ASPcited by 5
  3. 2018Specifying and Verbalising Answer Set Programs in Controlled Natural Languagecited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 6.

8 papers.