Predicate Renaming via Large Language Models
Elisabetta Gentili, Tony Ribeiro, Fabrizio Riguzzi, Katsumi Inoue
TL;DR
Predicate renaming for unnamed predicates in ILP is tackled with a pipeline that uses large language models to propose semantically meaningful names. The approach combines zero-shot prompts, a structured naming workflow, and LLMs as judges plus human validation across multiple case studies including head-only, head-and-body, body-only, reachability, and mutagenesis data. Results show that several state-of-the-art LLMs can consistently produce plausible names and that LLM-based judging aligns with human judgments in many cases. The work demonstrates the practicality of automated predicate naming to improve readability and reuse of logic programs, and points to domain-specific fine-tuning as future work.
Abstract
In this paper, we address the problem of giving names to predicates in logic rules using Large Language Models (LLMs). In the context of Inductive Logic Programming, various rule generation methods produce rules containing unnamed predicates, with Predicate Invention being a key example. This hinders the readability, interpretability, and reusability of the logic theory. Leveraging recent advancements in LLMs development, we explore their ability to process natural language and code to provide semantically meaningful suggestions for giving a name to unnamed predicates. The evaluation of our approach on some hand-crafted logic rules indicates that LLMs hold potential for this task.
