Natural Language Inference Fine-tuning for Scientific Hallucination Detection

Tim Schopf, Juraj Vladika, Michael Färber, Florian Matthes2025 · DOI

Abstract

Modern generative Large Language Models (LLMs) are capable of generating text that sounds coherent and convincing, but are also prone to producing hallucinations—facts that contradict world knowledge. Even in Retrieval-Augmented Generation (RAG) systems, where relevant context is provided, generated facts can contradict or be unverifiable by the references. This motivated SciHal 2025, a shared task focusing on hallucination detection in scientific content. The task involved: (1) predicting whether a claim is entailed, contradicted, or unverifiable; and (2) predicting fine-grained error categories. Our best approach used an ensemble of fine-tuned encoder-only ModernBERT and DeBERTa-v3 models. Our system achieved first place in sub-task 1 and second place in sub-task 2 among nine competing teams.

Introduction

Generative LLMs are increasingly utilized as academic research assistants. However, they suffer from persistent hallucinations, even when grounded in specific source texts via RAG. The SciHal 2025 shared task benchmarks the ability of systems to detect these errors in scientific contexts. Sub-task 1 focuses on coarse-grained entailment (Entailed, Contradicted, or Unverifiable), while Sub-task 2 requires fine-grained categorization of errors, such as numeric inaccuracies or entity misrepresentations.

Methodology

We explored three primary strategies for hallucination detection:

  1. Zero-shot Prompting: Utilizing state-of-the-art models like GPT-4o and DeepSeek-R1. We implemented a "Simple Zero-shot Prompt" (see Figure 1) and a "Claim Decomposition" strategy, where complex claims were broken into atomic sub-claims for individual verification.
  2. Fine-tuning Decoder Models: We fine-tuned Llama-3.1-8B-Instruct to generate reasoning chains before predicting a final label.
  3. Fine-tuning Encoder Models: We fine-tuned DeBERTa-v3 and ModernBERT on Natural Language Inference (NLI) datasets. These encoder-only models are specifically architected to understand directional relationships between text pairs.
The simple zero-shot prompt template used to evaluate LLM performance on the SciHal task.

Our winning approach was an ensemble that utilized majority voting across multiple fine-tuned versions of DeBERTa and ModernBERT.

Dataset and Evaluation

The study utilized the SciHal dataset, comprising over 50,000 real-world academic queries. For the shared task, 500 questions were selected, with RAG systems retrieving the top 20 scientific abstracts to generate answers. To ensure a robust benchmark, 75% of the claims were synthetically modified to introduce specific error types. Labels were provided by Subject Matter Experts (SMEs) through a multi-stage annotation process.

Results and Discussion

Our results demonstrate that specialized fine-tuning significantly outperforms general-purpose zero-shot prompting. As shown in Table 1, the ensemble of fine-tuned encoder models achieved the highest performance.

Comparison of F1 scores across different prompting and fine-tuning approaches for Sub-task 1.

Key Insights

  • Specialization beats Scale: Smaller models like DeBERTa-v3 (F1: 0.57) outperformed massive frontier models like GPT-4o (F1: 0.43). Task-specific NLI training proved more effective than raw parameter count.
  • The Decomposition Trap: Breaking claims into sub-claims actually decreased performance. This approach often led the AI to be overly pedantic, flagging entire claims as false due to minor unsupported details that human annotators viewed holistically.
  • Prompting Rigidity: Zero-shot models struggled with dataset-specific annotation conventions. Fine-tuned models were better at learning the subtle distinctions between "unverifiable" and "contradiction" present in the training data.

Conclusion

Our participation in SciHal 2025 confirms that fine-tuning specialized encoder-only models remains the most effective strategy for scientific hallucination detection. While zero-shot models are versatile, they lack the precision required for the nuanced verification of academic claims. Future work will focus on hierarchical classification and advanced committee voting techniques to further improve fine-grained error categorization.

Summary updated

Abstract

Modern generative Large Language Models (LLMs) are capable of generating text that sounds coherent and convincing, but are also prone to producing hallucinations, facts that contradict the world knowledge.Even in the case of Retrieval-Augmented Generation (RAG) systems, where relevant context is first retrieved and passed in the input, the generated facts can contradict or not be verifiable by the provided references.This has motivated SciHal 2025, a shared task that focuses on the detection of hallucinations for scientific content.The two sub-tasks focused on: (1) predicting whether a claim from a generated LLM answer is entailed, contradicted, or unverifiable by the used references; (2) predicting a fine-grained category of erroneous claims.Our best performing approach used an ensemble of fine-tuned encoder-only ModernBERT and DeBERTa-v3 models for classification.Out of nine competing teams, our approach achieved the first place in sub-task 1 and the second place in sub-task 2.
BibTeX
@misc{schopf2025natural,
  author = {Tim Schopf and Juraj Vladika and Michael Färber and Florian Matthes},
  title = {{Natural Language Inference Fine-tuning for Scientific Hallucination Detection}},
  year = {2025},
  doi = {10.18653/v1/2025.sdp-1.33},
}
Figure