An LLM + ASP Workflow for Joint Entity-Relation Extraction

Trang Tran, Trung Hoang Le, Huiping Cao, Tran Cao SonarXiv 2025 · DOI

Introduction

Joint Entity-Relation Extraction (JERE) is a fundamental task in Information Extraction that involves identifying entities and the semantic relationships between them within unstructured text. Traditionally, achieving high performance on JERE benchmarks requires extensive hand-annotated datasets. While Large Language Models (LLMs) have shown promise in zero-shot and few-shot scenarios, they are prone to "hallucinations"—generating predictions that are logically inconsistent with domain-specific constraints.

This paper, presented at the 41st International Conference on Logic Programming (ICLP 2025), proposes a hybrid neuro-symbolic approach. By combining the generative capabilities of fine-tuned LLMs with the formal logic of Answer Set Programming (ASP), the authors demonstrate a system that achieves state-of-the-art results, particularly in low-resource settings where training data is scarce.

Methodology

The proposed workflow consists of a two-stage pipeline: a generative stage followed by a logical validation stage.

The proposed neuro-symbolic workflow combining LLM predictions with an ASP-based consistency checker.

1. The LLM Stage (Generator)

The researchers utilize a fine-tuned GPT-4o model as the primary extractor. The model is guided by a modular prompt template that defines the domain, sets a specific persona ("Experience"), and establishes the dataset's rules ("Context"). The LLM processes the input text and outputs predictions in a structured JSON format, identifying potential entities and their relations.

2. The ASP Stage (Validator)

To mitigate hallucinations, the JSON output is converted into logical facts and processed by an ASP solver (clingo). This stage incorporates "type specifications"—formal domain rules that define valid entity-relation pairings. For instance, a rule might specify that a live_in relation must connect a Person entity to a Location entity. If the LLM predicts a relation that violates these constraints, the ASP consistency checker identifies it as a false declaration and removes it. This architecture is "elaboration tolerant," allowing domain rules to be updated without retraining the underlying LLM.

Experimental Setup

The workflow was evaluated on three distinct benchmarks representing different domains:

  • CoNLL04: General news (Entities: People, Organization, Location).
  • SciERC: Scientific abstracts (Entities: Task, Method, Material). This dataset is notably challenging due to technical terminology.
  • ADE: Medical data focused on Adverse Drug Events (Entities: Drug, Adverse-effect).

Results and Key Insights

The hybrid system demonstrated significant improvements over existing models, especially when training data was limited to 10% of the original corpus.

Performance on SciERC

On the complex SciERC dataset, the LLM + ASP workflow achieved a 35.37% F1-macro score for Relation Extraction. In comparison, the previous state-of-the-art system (ASPER) achieved only 16.06% under the same 10% data constraint. The ASP checker effectively reduced false positive relations in this corpus from 713 to 482.

Data Efficiency

A primary finding of the study is the extreme data efficiency of the neuro-symbolic approach. By using symbolic "guardrails" to catch impossible mistakes, the system outperformed specialized transformer-based models like ITER by more than 25% in low-resource settings.

The "Agreement" Trap

The authors also explored an ensemble approach combining GPT-4o and Gemini. Surprisingly, requiring agreement between the two models decreased overall performance. While precision improved slightly, recall dropped significantly because the models' differing extraction styles led to the exclusion of many valid relations.

Discussion and Future Work

While the system is highly effective, it relies on large-scale models like GPT-4o, which entails higher computational latency compared to smaller, specialized models. Furthermore, while the ASP checker is excellent at improving precision by filtering incorrect predictions, it cannot improve recall for entities or relations the LLM fails to detect initially.

Future research will focus on extending this workflow to extract comprehensive Knowledge Graphs, mapping relationships across entire documents rather than individual sentences. This neuro-symbolic framework provides a robust path forward for information extraction in niche domains where large-scale annotated data is unavailable.

Summary updated

BibTeX
@misc{tran2025llm,
  author = {Trang Tran and Trung Hoang Le and Huiping Cao and Tran Cao Son},
  title = {{An LLM + ASP Workflow for Joint Entity-Relation Extraction}},
  year = {2025},
  eprint = {2508.12611},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.12611},
}
Figure