0. Abstract
자연어 생성(NLG) 시스템은 기존의 전통적인 참조기반 평가지표인 BLEU, ROUGE로 평가하기 어렵다. 이에 따라 최근엔 LLM 기반의 reference-free 평가지표가 연구되고 있다.
그러나 여전히 인간이 평가한 것과는 적은 상관관계를 보이고 있다.
본 논문의 G-EVAL은 LLM과 함께 CoT(Chain-of-Thoughts)와 form-filling paradigm을 사용하는 평가 프레임워크를 제안하고 있다.
1. Introduction
-
[ Traditional automatic metrics ]
- BLEU : n-gram의 precision과 text 길이를 고려한 평가지표
- ROUGE : n-gram의 recall에 기반한 평가지표
- METEOR : precision, recall을 결합 + 형태소 및 동의어를 고려한 평가지표
위의 전통적인 평가지표들은 특히 창의성와 다양성을 요구하는 open-ended generation task에서 human judgments와 낮은 연관성을 지닌다는 한계가 있다.
또한 위 지표들은 target(=associated reference output)이 필요하다는 단점이 있고, 이는 대부분 인간이 생성해야 하는 데이터이기 때문에 엄청난 시간적 비용이 소모된다.
최근 연구(⁋Is chatgpt a good nlg evaluator?(Wang et al.,2023), ⁋Evaluate as you desire.(Fu et al.,2023)) : 높은 퀄리티나 유창성을 띄는 텍스트에 높은 확률을 할당하도록 학습되었다는 LLM을 사용한다는 가정 하에, LLM이 생성된 text를 평가하는 방법
그러나 LLM을 NLG 평가에 사용하는 방법에 대한 타당성이나 신뢰성이 아직 연구되지 않았다. 또한 meta-evaluation이라고 하는 것이 LLM-based evaluator가 여전히 인간의 평가와는 거리가 있음을 확인했다고 한다(⁋Towards a unified multi-dimensional evaluator for text generation.(Zhong et al.,2022)).
본 논문에서 제안하는 G-EVAL은 프롬프트로 오직 "task introduction"과 "evaluation criteria"만 입력하여 LLM이 구체적인 평가 단계의 CoT를 생성하도록 한다. 그런 다음 프롬프트와 생성된 CoT를 바탕으로 NLG output을 평가하도록 한다.
G-EVAL은 human evaluation과의 연관성 부분에서 기존 연구를 크게 뛰어넘는 성과를 보였다고 한다.
-
[ Main Contributions in this paper ]
- open-ended generation task에서 LLM-based metrics는 기존 전통적인 평가지표들을 능가한다.
- LLM-based metrics는 프롬프트와 지시 내용에 민감하며, CoT를 통해 이를 개선할 수 있다.
- 기존 지표들이 discrete scores를 제공하는 것에 비해 LLM-based metrics는 더 세밀한 continuous scores를 제공한다.
- LLM-based metrics는 LLM이 생성한 텍스트를 사람의 것보다 더 선호하는 잠재적인 문제가 존재한다.
2. Method
G-EVAL은 3개의 주요 구성요소로 이루어진 프롬프트 기반 평가 프레임워크이다.
[Figure-1 : overall framework of G-EVAL]
🔸1. Prompt for NLG Evaluation
evaluation task에 대한 지시사항과 추구하는 evaluation criteria를 정의하는 프롬프트를 입력한다.
text summarization에 대한 Intruction prompt 예시는 아래와 같다.
You will be given one summary written for a news article.이와 더불어 prompt는 customized evaluation criteria에 대한 prompt도 포함해야 한다. 평가 기준은 NLG task의 종류에 맞게 설정해줘야 한다. 예를 들어, text summarization task라면 coherence(일관성)을 평가해달라고 prompt를 작성할 수 있다.
Your task is to rate the summary on one metric.
Please make sure you read and understand these instructions carefully.
Please keep this document open while reviewing, and refer to it as needed.
Evaluation Criteria:위 프롬프트 예시에서는 "Coherence(일관성)"을 평가하라고 지시하고 있다. coherence의 점수는 1~5점으로 제한하고 있으며 해당 평가 기준에 대한 설명은 DUC quality question of structure and coherence를 참조하고 있다.
Coherence (1-5) - the collective quality of all sentences.
We align this dimension with the DUC quality question of structure and coherence whereby ”the summary should be well-structured and well-organized.
The summary should not just be a heap of related information, but should build from sentence to sentence to a coherent body of information about a topic.”
🔸2. Auto Chain-of-Thoughts for NLG Evaluation
앞서 제시된 prompt를 수행하기 위해 더 디테일한 evaluation instruction이 필요한데, LLM이 이 평가 단계들을 스스로 생성할 수 있다.
예를 들어, 위의 prompt에 "Evaluation Steps:" 를 덧붙여 LLM이 해당 step들(CoT)을 스스로 생성하도록 한다.
아래는 논문에 소개된 자동으로 생성된 CoT 예시이다.
1. Read the news article carefully and identify the main topic and key points.
2. Read the summary and compare it to the news article.
Check if the summary covers the main topic and key points of the news article, and if it presents them in a clear and logical order.
3. Assign a score for coherence on a scale of 1 to 5, where 1 is the lowest and 5 is the highest based on the Evaluation Criteria.
🔸3. Scoring Function (Form Filling paradigm)
LLM에 처음에 작성한 prompt, 자동으로 생성한 CoT, 전체 텍스트, 평가할 target text를 한번에 전달하여 평가를 진행하는 함수이다.
그러나 G-EVAL의 scoring function은 2가지 문제점을 갖고 있다.
-
[ Issues ]
- 몇몇 평가 과제에서 점수의 분산이 작게 나타나 human judgments와의 연관성이 떨어진다.
- 소수점까지 점수를 출력하라고 지시해도 대부분 정수값을 출력한다. 텍스트의 미묘한 차이를 잘 평가하지 못할 수 있다.
이를 해결하기 위해 본 논문에서는 2가지 방법을 제안했다. 우선 LLM 출력 토큰의 확률값을 사용하여 점수를 normalize하는 것이고, 이렇게 점수와 점수의 확률값 곱셈에 대해 총합을 구하는 weighted summation으로 최종 결과를 도출하는 것이다.
수식으로 표현하면 아래와 같다. 집합 S는 integer score 값들의 집합이다. \[ score = \sum_{i=1}^np(s_i)\times s_i \quad \Big(S=\lbrace s_1,s_2,\cdots,s_n\rbrace\Big) \] 위 개선방안을 통해 더 세밀하고 연속적인 점수값을 얻을 수 있다.
3. Experiments
🔸Implementation Details
본 논문에서는 OpenAI의 GPT-3.5(text-davinci-003)와 GPT-4 모델을 사용했다.
-
[ Model parameters ]
- GPT-3.5 : temperature = 0
- GPT-4 : n = 20, temperature = 1, top_p = 1 → GPT-4는 output token의 확률값을 알려주지 않기 때문에 이를 추정하기 위해 20번의 샘플링을 수행하여 확률을 매긴다.
🔸Benchmarks & Baselines
G-EVAL은 아래와 같은 meta-evaluation 밴치마크를 참고하여 평가했다.
- SummEval : 요약에 대한 평가지표로 fluency(유창성), coherence(일관성), consistency(일치성), relevance(관련성) 측면에서 평가한다. 요약 데이터셋에 대해 전문가와 일반인들이 4가지 측면에서 평가한 점수를 제공한다.
- Fluency : 문장이 자연스럽고 문법적으로 올바른가
- Coherence : 요약이 전체적인 논리적 흐름과 구조를 갖고 있는가
- Consistency : 요약이 원본 문서의 사실, 정보를 정확하게 반영하는가
- Relevance : 요약이 원본 문서의 핵심 정보를 잘 전달하는가
- Topical-Chat : 대화 응답 생성 시스템을 평가하는 서로 다른 평가자들을 메타 평가하기 위한 지표이다. 마찬가지로 4가지 측면에서 평가한다.
- Naturalness(자연스러움) : 대화 응답이 얼마나 인간과 유사한가
- Coherence(일관성) : 대화가 논리적으로 잘 연결되었는가
- Engagingness(유도성) : 대화가 사용자의 관심을 끌고 참여를 유도하는가
- Groundedness(근거성) : 대화가 외부 지식이나 문서에 기반하여 정확한 정보를 전달하는가
- QAGS : 요약에서 hallucination을 평가하기 위한 지표이다. consistency dimension을 측정하여 consistency를 평가한다. 구체적인 요약문인 QAGS-CNN과 좀 더 추상적인 요약문인 QAGS-Xsum 데이터셋으로 구성되어 있다.
G-EVAL과 비교할 baseline으로 BERTScore, MoverScore, BARTScore, FactCC, QAGS, USR, UniEval, GPTScore를 사용한다.
🔸Meta Evaluation
본 논문의 Table에서는 3가지 메타 평가지표를 사용한다.
논문에 구체적으로 표시되진 않았지만, 아마 각 벤치마크에서 인간 평가 점수와 Evaluator가 평가한 점수 간 상관관계를 측정하는 것이지 않을까 싶다. 따라서 상관계수가 높을수록 인간과 유사한 평가지표로 해석할 수 있다.
1. Spearman Correlation : 점수 차이의 제곱합을 기반으로 상관계수를 측정
2. Kendall-Tau Correlation : 점수가 일치하는 데이터 쌍과 불일치하는 데이터 쌍의 개수를 기반으로 상관계수를 측정
3. Pearson Correlation : 두 변수의 공분산과 표준편차를 기반으로 상관계수를 측정하는 모수적 추론 방법
🔸Results for Summarization task
SummEval 벤치마크를 사용한 요약 과제에서 유사성 기반 지표 < 신경망 기반 지표 < LLM 기반 지표 순으로 인간 평가와 높은 상관관계를 보였다.
또한 G-EVAL 지표가 GPTScore를 능가했다는 점에서 간단한 form-filling 방식의 프롬프트가 갖는 효과성도 입증했다고 할 수 있다.
+) 표에서 - Probs, - CoT는 G-EVAL에서 probability normalization 또는 auto CoT 구성요소를 제거하고 실험하는 ablation study를 나타낸다.
🔸Results for Dialogue Generation
Topical-Chat 벤치마크를 사용한 실험에서는 pearson, spearman 상관계수를 측정했다.
similarity-based인 전통적인 평가지표들이 요약 과제에선 relevance, 대화 과제에선 groundedness 측면에서 나름 인간 평가와 괜찮은 상관관계를 보여준다.
그러나 모든 측면에서 역시 G-EVAL의 지표가 가장 좋았다. Engagingness나 groundedness에서 G-EVAL-3.5가 더 높은 상관계수를 보이는데, 이는 Topical-Chat 벤치마크가 G-EVAL 모델에게 상대적으로 평가하기 쉬운 데이터셋이었다고 볼 수 있다.
🔸Results on Hallucinations
좀 더 구체적인 요약문 데이터셋인 QAGS-CNN, 추상적인 요약문 데이터셋인 QAGS-Xsum에 대해 인간이 consistency를 평가한 점수와 evaluator들이 consistency를 평가한 것에 대한 상관계수를 측정한 표이다.
대체적으로 G-EVAL-4의 상관계수가 높으나, UniEval도 우수한 결과를 보여줬다.
그리고 G-EVAL-3.5의 성능이 낮은 것으로 미루어 보아 Consistency 요소를 평가할 때는 LLM 모델의 크기(capacity)가 중요하다는 점을 나타낸다. 이는 SummEval 벤치마크에서도 그랬는데, 유독 Consistency 요소의 상관계수가 G-EVAL-3.5에서 낮았다.
4. Analysis
Analysis section에서는 LLM-based evalutor에 대한 issue를 분석하고 있다.
🔸Will G-EVAL prefer LLM-based output?
Introduction에서 언급한 "LLM-based evaluator는 사람의 글보다 LLM이 생성한 글에 더 높은 선호도를 보인다"라는 문제에 대한 실험을 했다.
⁋Benchmarking Large Language Models for News Summarization(Zhang et al.,2023), 뉴스 기사에 대해 사람이 요약한 것과 GPT-3.5(text-davinci-003)모델이 요약한 것에 대해 인간 annotator가 평가한 데이터셋을 사용했다고 한다.
위의 데이터셋은 3가지 종류로 나뉠 수 있다.
- human-written summaries are better than GPT-3.5 summaries
- GPT-3.5 summaries are better than human-written summaries
- both equally good
위 표는 G-EVAL-4가 humman-written summary와 GPT-3.5 summary에 매긴 점수의 평균을 나타낸다. 실제로 인간이 humman summary가 더 좋다고 평가한 데이터셋에 대해서는 G-EVAL-4도 humman summary에 평균적으로 높은 점수를 부여하고 인간도 LLM이 더 요약을 잘했다고 평가한 데이터셋에서는 humman summary를 낮게 평가했다.
그러나 전체적으로 GPT-3.5 summary를 모든 경우에 높게 평가했다는 문제점이 있다.
연구자들은 이런 현상에 대해 2가지 잠재적 이유를 제시했다.
- GPT와 같은 고성능 시스템의 NLG output은 평가하기 매우 어렵다. 그리고 원 논문(⁋Benchmarking Large Language Models for News Summarization)의 저자가 말하길 annotator 간 평가 기준에 대한 합의가 부족했다고 한다. multiple annotator 간 합의의 신뢰도를 나타내는 Krippendorff's alpha 지수가 0.07에 불과했다고 한다.(0~1의 범위를 갖는 지수인데 1에 가까울수록 신뢰성이 높다고 판단)
즉, 애초에 데이터셋에 일관성이 부족하다는 잠재적 이유가 있다는 것이다. - LLM 모델이 이미 문장을 생성할 때 평가할 때와 같은 개념(모델 구조, 추론 방식)을 공유하기 때문에 편향(bias)이 생길 수 있다.
🔸Ablation Study : The effect of Chain-of-Thoughts & Probability Normalication
Table-1을 보면 특히 fluency 측면에서 CoT를 포함한 G-EVAL이 인간 평가와 더 높은 상관관계를 보이고 있다.
Score Function에서의 Probability Normalization 역시 Table-1을 보면 확률 정규화를 하는 모델의 Spearman 상관계수가 더 높게 나타난다. 그러나 Kendall-Tau 상관계수의 경우 순위척도 변수의 일치/불일치 쌍의 개수로 상관계수를 계산하기 때문에 확률값을 배제한 모델(- Probs)에서 일치하는 데이터 쌍이 더 많아 tau 계수도 더 높게 나온 것 같다고 한다.
메타 평가지표의 계산 방식의 문제점이기 때문에 이것이 모델의 설명력에 영향을 주지는 않는다. 따라서 CoT와 Probability Normalization 모두 G-EVAL의 효과적인 구성요소라고 판단할 수 있다.
🔸The effect of Model Size
비록 Topical-Chat 벤치마크의 engagingess와 groundedness 요소에서는 G-EVAL-3.5가 더 우수했지만 그 외의 벤치마크 평가요소에서는 모두 모델 크기가 클수록 성능이 우수했다.
특히 consistency(일치성)와 relevance(관련성)처럼 더 복잡한 평가요소에서 모델 크기가 주요하게 작용했다.
5. Related Work
Ngram-based Metrics, Embedding-based Metrics, Task-specific Evaluators, Unified Evaluators, LLM-based Evaluators와 관련된 선행 연구들을 소개하고 있다. 여기서는 생략한다.
6. Conclusion
여전히 LLM이 생성한 텍스트를 더 선호한다는 편향에 대한 문제점이 있으나, G-EVAL은 form-filling 방식을 통해 기존의 GPTScore보다 간단하면서도 auto CoT, score function을 활용해 더 효과적인 평가방법이다.
+) Appandix
Summarization task에서 Coherence를 평가하는 Prompt 예제
You will be given one summary written for a news article.
Your task is to rate the summary on one metric.
Please make sure you read and understand these instructions carefully. Please keep this
document open while reviewing, and refer to it as needed.
Evaluation Criteria:
Coherence (1-5) - the collective quality of all sentences. We align this dimension with
the DUC quality question of structure and coherence whereby ”the summary should be
well-structured and well-organized. The summary should not just be a heap of related information, but should build from sentence to sentence to a coherent body of information about a topic.”
Evaluation Steps:
1. Read the news article carefully and identify the main topic and key points.
2. Read the summary and compare it to the news article. Check if the summary covers the main
topic and key points of the news article, and if it presents them in a clear and logical order.
3. Assign a score for coherence on a scale of 1 to 5, where 1 is the lowest and 5 is the highest
based on the Evaluation Criteria.
Example:
Source Text:
{{Document}}
Summary:
{{Summary}}
Evaluation Form (scores ONLY):
- Coherence:
Dialogue Generation task에서 engagingness를 평가하는 Prompt 예제
You will be given a conversation between two individuals. You will then be given one potential
response for the next turn in the conversation. The response concerns an interesting fact, which
will be provided as well.
Your task is to rate the responses on one metric.
Please make sure you read and understand these instructions carefully. Please keep this
document open while reviewing, and refer to it as needed.
Evaluation Crieteria:
Engagingness (1-3) Is the response dull/interesting?
- A score of 1 (dull) means that the response is generic and dull.
- A score of 2 (somewhat interesting) means the response is somewhat interesting and could
engage you in the conversation (e.g., an opinion, thought)
- A score of 3 (interesting) means the response is very interesting or presents an interesting fact
Evaluation Steps:
1. Read the conversation, the corresponding fact and the response carefully.
2. Rate the response on a scale of 1-3 for engagingness, according to the criteria above.
3. Provide a brief explanation for your rating, referring to specific aspects of the response and
the conversation.
Example:
Conversation History:
{{Document}}
Corresponding Fact:
{{Fact}}
Response:
{{Response}}
Evaluation Form (scores ONLY):
- Engagingness:
Evaluating Hallucinations 예제
Human Evaluation of Text Summarization Systems:
Factual Consistency: Does the summary untruthful or misleading facts that are not
supported by the source text?
Source Text:
{{Document}}
Summary:
{{Summary}}
Does the summary contain factual inconsistency?
Answer:
References
'논문 리뷰' 카테고리의 다른 글
[논문리뷰] RAGAs: Automated Evaluation of Retrieval Augmented Generation (3) | 2024.09.22 |
---|---|
[논문리뷰] RAG : Retrieval-Augmented Generation for Knowledge-Intensive NLP tasks (4) | 2024.09.03 |
[논문리뷰] Text clustering with LLM embeddings (0) | 2024.08.02 |
[논문코드리뷰] Attention is all you need (code) (0) | 2024.07.01 |
[논문리뷰] Informer: Beyond Efficient Transformer for Long SequenceTime-Series Forecasting (1) | 2024.03.11 |