Yongil Kim

Seoul National University

[EMNLP2023] HaluEval: A Large-Scale Hallucination Evaluation Benchmark for Large Language Models

08 Jan 2024 » Hallucination, LLM

[pdf] [github]

Junyi Li 1,3,4*, Xiaoxue Cheng 1*, Wayne Xin Zhao 1,4†, Jian-Yun Nie 3, and Ji-Rong Wen 1,2,4
1 Gaoling School of Artificial Intelligence, Renmin University of China 2 School of Information, Renmin University of China 3 DIRO, Université de Montréal  

image

Abstract

  • (Hallucination) ChatGPT 와 같은 Large Language Model (LLM) 은 soruce 와 대치되거나, factual knowledge 를 확인할 수 없는 hallucination 이 발생한다.
  • (HaluEval) Hallucination 의 what types of contentto which extent 을 측정하기 위해, hallucination recognize 하는 LLM 의 능력을 평가하는 large hallucinated sample 인 HaleuEval benchmark 를 만들었다.
  • (Challenges) ChatGPT 와 LLM 들이 hallucination recognizing 에 great challenge 가 있음을 보이며, external knowledge 를 제공하거나 addtional reasoning step 을 추가하는 것이 hallucination 을 줄일 수 있음을 보인다.

1. Introduction

image

Large Language Model 의 prominent capability 이면에 hallucination 문제가 존재함은 공공연한 사실이다. Hallucination 은 soruce 와 대치되거나, factual knowledge 를 확인할 수 없는 content 를 생성하는 것을 의미한다. 몇몇의 연구([1],[2],[3]) 에서 small LM 에 대한 hallucination 원인을 조사하기 위한 연구가 있었지만, what types of content and to which extent LLMs tend to hallucinate 에 대한 연구는 미흡하다.

이를 위해 이 논문에서는 Hallucination Evaluation (HaluEval) benchmark 를 소개한다. HaluEval 은 35,000 개의 hallucinated/normal sample 로 이뤄져있고, 이 중 5,000 개는 general user query 에 대한 chatGPT 의 response, 그리고 30,000 개는 (1) question answering, (2) knowledge-grounded dialogue, (3) text summarization 에 걸친 task-specific sample 이다.

위의 Figure 에 construction pipeline 을 볼 수 있다.

우선, general user query 에 대하여(Figure bottom), Alpca 의 instruction tuning dataset 에서, 5,000개의 query 를 추출한다. LLM 이 hallucination 을 더 잘 생성하게 하기 위해, chatGPT 에 query 에 대한 3 개의 response 를 생성하게 한 후, 이 3개의 response 의 simiarilty 가 가장 낮은 5,000개의 query 만을 사용한다. 이러한 것은 최근 SelfcheckGPT 에서 LLM 의 conflicting and diverged response 에서 hallucination 이 나타날 확률이 높다는 발견에 기반한다. 이후 Human annotator 로 하여금, hallucinated info 가 있는지, 그리고 있다면 corresponding span 을 mark 하도록 한다.

image

위의 Table 의 예시에서, human annotator 초록색으로 hallucinated span 을 marking 한 것을 볼 수 있다. 이 human-annotated query-response 를 통해 LLM 이 어떠한 type 의 content 를 hallucinate 하는지 분석할 수 있다.

그 다음, task-specific sample 에 대하여(Figure top), two-stage approach 가 사용된다. 첫 step 으로 existing task (e.g. HotpotQA) 에 대하여, ChatGPT 로 하여금, one-pass syle 과 conversational style 로 hallucinated sample 을 생성하게 한다. 두 style 로 나누는 것은 hallucinated sample 의 다양성을 위해서다. 두번째 step 으로, 가장 plausible 하고 difficult 한 hallucinated sample 을 고르기 위하여, ground-trtuth example 을 통해 filtering instruction 을 elaborate 하여, ChatGPT 로 하여금 sample 을 고르게한다. 이 Sample-then-Filtering 기법을 통해, specific task example 의 hallucinated counterpart 를 생성할 수 있다.

HaluEval benchmark 를 활용한 실험 을 통해 아래 세 가지 특징을 발견한다.

  • ChatGPT 는 unverifable information 를 날조하는 경향이 강하다.
  • LLM 들은 hallucination 을 알아차리는 것이 매우 어려우며, 특히 sample generation 에 사용된 ChatGPT 역시 그러하다.
  • LLM 의 부족한 hallucination recognizing 능력은 explicit knowledge 의 제공과, intermediate reasoning step 의 추가로 발전시킬 수 있다. Hallucinated sample 에 대한 contrastive learning 은 오히려 LLM 으로 하여금 더 confuse 하게 만들어, worse performance 를 보이게 한다.

2. The HaluEval Benchmark

HaluEval의 목표는 LLMs가 어떤 유형의 콘텐츠를 어느 정도로 (what types of content and to which extent) 환각하는 경향이 있는지 이해하는 것이므로, 이 벤치마크에는 다양한 sample-hallucinated counterpart 가 포함된다. Benchmark colleciton 은 Automatic generation 과 human annotation 두 방법을 통해 이뤄진다.

2.1. Automatic Generation

Automatic generation pipeline 의 목표는 (1) divserse hallucination sampling, (2) high-quality filtering 두 가지이다.

(1) Diverse Hallucination Sampling.
본 논문에서는 두 가지 Hallucination sampling method 를 활용한다. 첫 번째는 맨 처음 figure 에도 나와있듯이 one-pass 방법이고, 두 번째는 conversational 방법이다.

  • one-pass

Instruction 을 활용한 방법이다.

image

위의 Table2 에 나와있는 것과 같이, Instruction 을 활용하여 ChatGPT로 하여금 Hallucination sample 을 만들도록 한다.

  • converational

두 번째는 대화를 하듯, 차근차근 ChatGPT 로 하여금 hallucinated answer 를 생성하게 하는 것이다.

이렇듯 두 가지 방법을 통해 diverse 한 hallucination sample 을 생성할 수 있고, 이 sample 들은 추후에 filtered 될 것이다.

(2) Instruction Design.

위의 Table 2 에서 보이듯, one-pass instruction smapling 방법에서는 instruction design 이 중요하다. 저자들은 intention decription, hallucination pattern, hallucination demonstration 세 가지 중요한 파트를 나누어 ChatGPT 에게 제공한다.

  • 처음 Intetion decription 에서는 ChatGPT 에게 role 을 부여하고, 생성의 objective 를 설명한다.
  • 두 번째, hallucination pattern 은 hallucinated sample 의 type 과 quality 를 control 한다.
  • 마지막, hallucination demonstration 에서는 few-shot exempler 를 제공한다.

저자들은 세 가지 task 에 대하여 hallucinated sample 을 생성한다.

  • Question answering : comprehension, factualness, specificity, inference 네 가지 type 의 hallucination pattern / HotpotQA
  • Knowledge grounded dialog : extrinsic-soft, extrinsichard, extrinsic-grouped 세 가지 type 의 hallucination pattern / OpenDialKG
  • Text summarization : factual, non-factual, intrinsic 세 가지 type 의 hallucination pattern / CNN/DailyMail

(3) High-quality Hallucination Filtering.

위의 방법대로 생성된 hallucination sample 들을 다시 ChatGPT 를 활용하여 filtering 한다.

image

위의 Table3 에서와 같이, Demonstration 에서는 ground-truth 를 고르게끔 exempler 를 주고, 실제 test example 에서는, hallucination sampling 들로만 이뤄진 candidate 중에서 고르게 하여 가장 plausible 하고 difficult hallucinated sample 을 filtering 한다. 이렇게 challenging 한 hallucinated sample 은 identify 하기 어렵기 때문에, LLM 들의 hallucination recognition evluation 에 사용된다.

이러한 sampling-then-filtering 기법을 통해 세 task 에 걸쳐 30,000 개의 hallucinated sample 을 생성한다.

2.2 Human Annotation

Autmoatic generation 과 별개로, human labeler 를 초청하여 ChatGPT response 가 hallucinated content 를 포함하는지 annotate 시킨다. Alpaca 의 52K instruction tuning datset 으로부터 user query 를 추출한 후, ChatGPT 에 생성시킨다. 이 때, ChatGPT 에 세 개 response 를 생성시키게 한 후, BERTScore 를 통해 가장 낮은 similarity 를 보이는 user query 로만 5,000개를 남긴다. 이후, Human labeler 들이 개입하여 “Yes or No” 의 대답과 함께, 어느 span 이 hallucination 인지 list 한다. 이 때 type 은 unverifiable, non-factual, irrelevant 세 가지이다. Annotator 는 영어에 능통한 사람들로 골랐으며, 각 query 당 세 명이며, max-voting 을 활용한다. kappa score 가 0.81 로 굉장히 높게 나왔다.

Human Annotation 예시는 아래의 Table 4 에서 볼 수 있다.

image

2.3 Benchmark Analysis and Usage

ChatGPT response 의 human annotation 결과 977개의 response(19.5%) 에 hallucination 이 담겨있었다.

image

image

위의 Figure 2 와 3 에서, automatic sampling 과 human annotation 에서, topic distribution 을 볼 수 있다.

이 benchmark 를 통해 연구자들은 세 가지 usage 를 가져갈 수 있다.

  • analyzing what types of content LLMs tend to generate
  • evaluating the ability of LLMs to recognize hallucinations in the generated samples
  • assessing whether the LLMs’ output contains hallucinations

3. Experiments

3.1 Experimental Setup

closed-source LLMs

  • GPT-3 (davinci)
  • InstructGPT (text-davinci-002/003)
  • ChatGPT (gpt-3.5-turbo)
  • Claude
  • Claude2

open-source LLMs

  • Alpaca (7B)
  • Vicuna (7B)
  • ChatGLM (7B)
  • Falcon (7B)
  • LLam2-chat (7B)

3.2. Results and Anlaysis

Hallucination Recognition

  • LLMs are still poor at identifying hallucination.

image

Summarization task 의 hallucination detection 에서, State-of-the-Art 인 ChatGPT 모델도 58.53% 를 보였고, random guess 인 50% 보다도 못한 성능을 보인 LLM 이 많다.

  • 세 가지 task 에서 모두 Facutally correct 하지만 context 와 conflict 하는 hallucination pattern 에서 (P-I) failure 를 보인다

image

Improvement Strategies

  • knowledge retrieval 과 CoT 의 추가는 improvement 를 보였지만, sample contrast 는 오히려 성능을 나쁘게한다

image

Case Study

  • knowledge retrieval 가 hallucination 해결에 도움이 된다

image

4. Conclusion

We introduce HaluEval, a large-scale collection of generated and human-annotated hallucinated samples for evaluating the performance of LLMs in recognizing hallucinations. To automatically generate large-scale samples, we propose a two-step approach, i.e., sampling-then-filtering. We first introduce two different sampling methods to generate diverse samples using instructions and then filter and select the difficult one. Besides, we invite qualified human labelers to annotate the hallucinations of ChatGPT responses given user queries. We find that, existing LLMs mostly fail to recognize the hallucinations in text and tend to generate hallucinated content. Finally, we suggest several strategies to help LLMs recognize hallucinations. Our benchmark can facilitate research in understanding what types of content and to which extent LLMs tend to hallucinate, ultimately paving the way for building more effective and reliable LLMs in the future.