Skip to main content
QUICK REVIEW

[논문 리뷰] Is In-Context Learning Sufficient for Instruction Following in LLMs?

Hao Zhao, Maksym Andriushchenko|arXiv (Cornell University)|2024. 05. 30.
Online Learning and Analytics인용 수 4
한 줄 요약

이 논문은 지식 조각 학습(In-context learning, ICL)만으로도 대규모 언어 모델(Large Language Models, LLMs)의 지시어 따르기(instruction following) 능력을 효과적으로 보정할 수 있는지 조사한다. 다양한 기본 모델에서 Urial 프롬프팅 방법을 평가하며, 탐색 전략을 통해 예시를 선별함으로써 성능 향상을 이룬다. 그러나 MT-Bench 및 AlpacaEval 2.0와 같은 벤치마크에서 ICL은 지시어에 대한 지식 조각 학습이 지도 미세조정(Supervised Fine-tuning, SFT)에 비해 여전히 뒤처지며, 특히 더 강력한 모델에서 그 격차가 더 두드러진다. 이는 ICL이 매개변수 갱신 없이 지시어 따르기 행동을 완전히 포착하기에 본질적인 한계를 지닌다는 것을 드러낸다.

ABSTRACT

In-context learning (ICL) allows LLMs to learn from examples without changing their weights: this is a particularly promising capability for long-context LLMs that can potentially learn from many examples. Recently, Lin et al. (2024) proposed URIAL, a method using only three in-context examples to align base LLMs, achieving non-trivial instruction following performance. In this work, we show that, while effective, ICL alignment with URIAL still underperforms compared to instruction fine-tuning on the established benchmark MT-Bench, especially with more capable base LLMs. We then uncover the most relevant elements for successful in-context alignment, finding the crucial role of the decoding parameters. Based on these insights, we show that the approach of URIAL can indeed be improved by adding high-quality, potentially carefully selected via greedy search, demonstrations in context, getting closer to the performance of instruct models. Finally, we provide the first, to our knowledge, systematic comparison of ICL and instruction fine-tuning (IFT) for instruction following in the low data regime, where ICL can be a viable alternative to IFT. Overall, our work advances the understanding of ICL as an alignment technique and its relationship to IFT. We provide our code at https://github.com/tml-epfl/icl-alignment.

연구 동기 및 목표

  • 기본 LLM에서 Urial 프롬프팅 방법을 통한 지식 조각 학습(ICL)이 지도 미세조정(SFT)과 유사한 지시어 따르기 성능을 달성할 수 있는지 평가하는 것.
  • 지식 조각 학습이 유연성과 가중치 비용 없이도 적용 가능한데도 불구하고, 지시어 따르기 벤치마크에서 미세조정된 모델과의 성능 격차를 메울 수 없는 이유를 탐구하는 것.
  • 지식 조각 예시의 수, 품질, 구조—특히 정답 일치의 중요성—이 지시어 따르기 성능에 미치는 영향을 분석하는 것.
  • 특히 초기 Urial 예시 선택에 사용되지 않은 최신 또는 더 큰 모델을 포함한 다양한 LLM 아키텍처 간에 지식 조각 예시의 이식 가능성(transferability)을 평가하는 것.
  • 지시어 따르기 작업에서 지식 조각 학습이 분류나 번역과 같은 다른 NLP 작업에서의 ICL과 본질적으로 어떻게 다를 수 있는지 이해하는 것.

제안 방법

  • MT-Bench 및 AlpacaEval 2.0(LC)와 같은 기존 벤치마크를 사용하여 Llama-2, Llama-3, Mistral, GPT-4-Base 등의 다양한 기본 LLM에서 Urial 프롬프팅 전략을 평가한다.
  • 기존 데이터셋에서 고품질의 지시어 따르기 예시를 추가하여 Urial 프롬프트의 예시 수를 3개를 초과하는 다수의 예시로 확장함으로써, 많은 예시를 포함한 지식 조각 학습을 테스트한다.
  • MT-Bench 점수를 최대화하는 데 기여하는 예시를 선별하는 탐욕적 선택 알고리즘을 제안하여, 모델 가중치를 변경하지 않고도 성능 향상을 이룬다.
  • 예시의 구조에 대한 분석을 위해, 질문만 있는 경우, 잘못된 답변만 있는 경우, 또는 무작위로 선택된 답변만 있는 경우를 포함한 아블레이션 연구를 수행하여 정답 일치의 역할을 분리한다.
  • 선택된 ICL 예시가 다양한 기본 모델(Llama-2-7B-80k, Mixtral-8x22B 등) 간에 이식 가능한지 평가하기 위해 이식 가능성 테스트를 수행한다. 이는 효과적인 예시가 모델에 따라 민감하게 작용하는지 여부를 분석하기 위함이다.
  • 다회화 대화와 단회화 대화의 영향을 분석하고, 특히 ICL 하에서는 2회차 응답 성능이 미세조정된 모델에 비해 현저히 열등한 이유를 규명한다.
Figure 1: The results of scaling experiments with different sampling strategies on Mistral-7B-v0.2-32k. The black dashed line refers to the 1st-turn MT-Bench score of Mistral-7B-Instruct-v0.2. ICL with more demonstrations does not bridge the gap between the base model and its aligned counterpart. Su
Figure 1: The results of scaling experiments with different sampling strategies on Mistral-7B-v0.2-32k. The black dashed line refers to the 1st-turn MT-Bench score of Mistral-7B-Instruct-v0.2. ICL with more demonstrations does not bridge the gap between the base model and its aligned counterpart. Su

실험 결과

연구 질문

  • RQ1번역이나 요약과 같은 작업에서 관찰된 것처럼, 장문의 컨텍스트를 가진 LLM에서 지식 조각 예시의 수를 늘리면 지시어 따르기 성능이 향상되는가?
  • RQ2지식 조각 예시에 대해 탐욕적 선택 전략을 적용하면, 지식 조각 학습과 지도 미세조정 간의 성능 격차를 메울 수 있는가?
  • RQ3지시어 따르기 작업에서 지식 조각 학습이 분류나 다중 선택 작업과 본질적으로 어떻게 다를 수 있으며, 특히 정답 쌍의 필요성 측면에서 어떤 차이를 보이는가?
  • RQ4효과적인 지식 조각 예시가 초기 Urial 예시 선택에 사용되지 않은 최신 또는 더 큰 모델 간에도 잘 일반화되는가?
  • RQ5잘못된 또는 구조가 불량한 예시가 지시어 따르기 작업에서 ICL 성능을 떨어뜨리는 데 어떤 역할을 하는가?

주요 결과

  • 3개를 초과하는 지식 조각 예시를 추가해도, 요약이나 번역과 같은 작업에서 관찰된 것처럼 MT-Bench에서 지시어 따르기 성능이 체계적으로 향상되지 않는다.
  • 탐욕적 선택 전략을 통해 지식 조각 예시를 선별함으로써 성능 향상이 크게 이루어졌으며, 이는 Mistral-7B-v0.2 모델이 지도 미세조정된 동반자 모델과의 MT-Bench 점수 격차를 거의 메워냈다(6.27에서 7.68로 향상).
  • 정답 일치가 핵심적이다: 답변을 생략하거나 잘못된 답변 또는 무작위로 선택된 답변을 사용할 경우 성능이 극도로 떨어지며, 답변의 순환 이동( circular shift )은 점수를 1.80까지 떨어뜨린다.
  • 도메인 내 무작위 답변을 사용하면 성능이 향상된다(6.24), 그러나 도메인 외 무작위 답변은 성능을 떨어뜨린다(4.13). 이는 답변의 의미적 관련성이 중요하다는 것을 시사한다.
  • 가장 효과적인 ICL 예시는 모델 간에 잘 일반화되지 않는다: 동일한 예시를 Llama-2-7B-80k 및 Mixtral-8x22B-v0.1-4bit에 적용했을 때 성능 향상이 일관되지 않거나 심지어 성능 저하가 발생할 수 있다.
  • 잘못된 예시는 성능을 심각하게 떨어뜨린다: 답변의 순환 이동은 MT-Bench 점수를 1.80까지 떨어뜨리며, 이는 지시어 따르기 작업에서 ICL의 성능이 예시 품질에 매우 민감함을 보여준다.
Figure 2: The distribution of the 1st-turn MT-Bench score (GPT-4-Turbo as judge) on Mistral-7B-v0.2-32k obtained by adding 100 instructions from Evol-Instruct-70k as a 4th demonstration to Urial . The black dashed line refers to the 1st-turn MT-Bench score of the base model with Urial . A majority o
Figure 2: The distribution of the 1st-turn MT-Bench score (GPT-4-Turbo as judge) on Mistral-7B-v0.2-32k obtained by adding 100 instructions from Evol-Instruct-70k as a 4th demonstration to Urial . The black dashed line refers to the 1st-turn MT-Bench score of the base model with Urial . A majority o

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.