TLDR: A research paper introduces a method using Large Language Models (LLMs) to automatically assign meaningful names to unnamed predicates in logic programs, a common issue in Inductive Logic Programming. The approach involves LLMs suggesting names, selecting the best ones, and then LLM judges scoring them. Results show LLMs can effectively improve the interpretability and reusability of logic theories, though challenges remain with highly complex or domain-specific cases.
In the evolving landscape of artificial intelligence, logic programming stands as a powerful method for modeling complex relationships. However, a persistent challenge in this field, particularly within Inductive Logic Programming (ILP), is the emergence of “unnamed predicates.” These are new logical concepts introduced by AI systems that lack clear, human-understandable names, making the resulting logic programs difficult to read, interpret, and reuse.
Imagine a computer program that learns to define complex family relationships, like “grandparent.” An ILP system might invent an intermediate concept, let’s call it “inv,” to represent “parent.” So, a rule might look like: grandparent(A,B) :- inv(A,C), inv(C,B). and inv(A,B) :- mother(A,B). or inv(A,B) :- father(A,B). While functionally correct, the name “inv” offers no semantic meaning to a human trying to understand the code. This issue becomes even more pronounced in larger, more intricate logic theories, where manually renaming these predicates is often impractical and requires specialized domain knowledge.
A recent research paper, “Predicate Renaming via Large Language Models,” explores a novel solution to this problem by leveraging the advanced capabilities of Large Language Models (LLMs). These AI models, known for their prowess in understanding and generating human language and code, are being put to the test to automatically assign meaningful names to these previously unnamed predicates.
How LLMs Tackle the Naming Challenge
The researchers developed a three-step pipeline to harness LLMs for this task. First, multiple LLMs are queried to suggest names for each unnamed predicate. This step is repeated several times to account for the non-deterministic nature of LLM outputs and gather a diverse set of suggestions. Next, the same LLMs are asked to review their own suggestions and select the most suitable one. Finally, a set of designated LLM “judges” evaluates all the proposed names, assigning scores based on correctness and precision, ultimately leading to a ranked list of suggestions.
The study tested this approach on various types of logic rules, ranging from simple, hand-crafted examples (like family relationships and basic mathematical operations) to more complex scenarios, including rules from a real-world dataset (Mutagenesis) and those generated by an actual ILP system (POPPER). This comprehensive evaluation aimed to understand how well LLMs could generalize across different contexts.
Also Read:
- Decoding How Large Language Models Filter Information
- Enhancing FrameNet Annotation with AI: A Look at LLM-Assisted Workflows
Promising Results and Future Directions
The findings indicate that LLMs hold significant potential for this challenging task. High-performing models like OpenAI’s ChatGPT (GPT-4o and o3mini), Google DeepMind’s Gemini, and Cohere’s Command R+ demonstrated a strong ability to suggest accurate and semantically meaningful names for many predicates. While some smaller models initially struggled, the researchers found that a technique called “few-shot prompting” – providing the model with a few examples – could significantly improve their performance, especially for models like FalconMamba.
The evaluation also involved comparing LLM judgments with human judgments. Encouragingly, the LLM judges largely aligned with human experts in identifying appropriate names, suggesting that LLMs can effectively assess the quality of predicate names. However, the study also highlighted limitations, particularly with highly domain-specific or very complex predicates where the LLMs lacked sufficient contextual knowledge. In such cases, fine-tuning LLMs on specific domain data or providing more context could be beneficial.
This research marks a crucial step towards making AI-generated logic programs more accessible and usable for humans. By automating the renaming of predicates, the interpretability and reusability of these complex systems can be greatly enhanced, paving the way for broader adoption and easier debugging in various AI applications. To delve deeper into the methodology and results, you can read the full paper available at arXiv.


