실수로부터의 맥락 내 원리 학습
In-Context Principle Learning from Mistakes
February 8, 2024
저자: Tianjun Zhang, Aman Madaan, Luyu Gao, Steven Zheng, Swaroop Mishra, Yiming Yang, Niket Tandon, Uri Alon
cs.AI
초록
컨텍스트 내 학습(In-context learning, ICL, 일명 퓨샷 프롬프팅)은 소수의 입력-출력 예제를 통해 대형 언어 모델(LLM)을 다운스트림 작업에 적응시키는 표준 방법으로 사용되어 왔다. 그러나 모든 ICL 기반 접근법은 정확한 입력-출력 쌍에서만 학습한다. 본 논문에서는 주어진 소수의 입력-출력 예제로부터 더 많은 것을 학습함으로써 이 패러다임을 재검토한다. 우리는 학습 원칙(Learning Principles, LEAP)을 소개한다: 먼저, 모델이 이 소수의 예제에서 실수를 하도록 의도적으로 유도한다; 그런 다음 이러한 실수를 반성하고, 이를 통해 명시적인 작업 특화 "원칙"을 학습하여 유사한 문제를 해결하고 일반적인 실수를 피할 수 있도록 한다; 마지막으로, 모델이 원래의 퓨샷 예제와 학습된 일반 원칙을 사용하여 보지 못한 테스트 질문에 답하도록 프롬프트한다. 우리는 LEAP를 다양한 벤치마크에서 평가했으며, 이 중 다중 홉 질문 응답(Hotpot QA), 텍스트 질문 응답(DROP), Big-Bench Hard 추론, 수학 문제(GSM8K 및 MATH)를 포함한다. 이러한 모든 벤치마크에서 LEAP는 GPT-3.5-turbo, GPT-4, GPT-4 turbo, Claude-2.1과 같은 가장 강력한 LLM을 개선한다. 예를 들어, LEAP는 GPT-4를 사용한 표준 퓨샷 프롬프팅보다 DROP에서 7.5%, HotpotQA에서 3.3% 향상된 성능을 보인다. 중요한 것은 LEAP가 표준 퓨샷 프롬프팅 설정보다 더 많은 입력이나 예제를 필요로 하지 않는다는 점이다.
English
In-context learning (ICL, also known as few-shot prompting) has been the
standard method of adapting LLMs to downstream tasks, by learning from a few
input-output examples. Nonetheless, all ICL-based approaches only learn from
correct input-output pairs. In this paper, we revisit this paradigm, by
learning more from the few given input-output examples. We introduce Learning
Principles (LEAP): First, we intentionally induce the model to make mistakes on
these few examples; then we reflect on these mistakes, and learn explicit
task-specific "principles" from them, which help solve similar problems and
avoid common mistakes; finally, we prompt the model to answer unseen test
questions using the original few-shot examples and these learned general
principles. We evaluate LEAP on a wide range of benchmarks, including multi-hop
question answering (Hotpot QA), textual QA (DROP), Big-Bench Hard reasoning,
and math problems (GSM8K and MATH); in all these benchmarks, LEAP improves the
strongest available LLMs such as GPT-3.5-turbo, GPT-4, GPT-4 turbo and
Claude-2.1. For example, LEAP improves over the standard few-shot prompting
using GPT-4 by 7.5% in DROP, and by 3.3% in HotpotQA. Importantly, LEAP does
not require any more input or examples than the standard few-shot prompting
settings.