Skip to main content
QUICK REVIEW

[논문 리뷰] Let's Sample Step by Step: Adaptive-Consistency for Efficient Reasoning and Coding with LLMs

Pranjal Aggarwal, Aman Madaan|arXiv (Cornell University)|2023. 05. 19.
Topic ModelingComputer Science인용 수 3
한 줄 요약

이 논문은 대규모 언어 모델(Large Language Models, LLMs)을 위한 모델에 종속되지 않고 비용 효율적인 샘플링 기법 \ours를 제안한다. 이 기법은 다수의 출력에 대한 딜리클레 분포 기반 신뢰도를 바탕으로 한 경량 정지 기준을 사용하여 추론 및 코드 생성에 대한 샘플 수를 동적으로 조정한다. 17개의 데이터셋과 세 종류의 LLM에서 최대 7.9배의 샘플링 예산 절감을 이룩했으며, 정확도 저하가 0.1% 미만으로 유지되며, 고정 예산(Self-Consistency) 대비 효율성과 정확도의 상호 보완적 성능을 뛰어나게 뛰어넘는다.

ABSTRACT

A popular approach for improving the correctness of output from large language models (LLMs) is Self-Consistency - poll the LLM multiple times and output the most frequent solution. Existing Self-Consistency techniques always generate a constant number of samples per question, where a better approach will be to non-uniformly distribute the available budget based on the amount of agreement in the samples generated so far. In response, we introduce Adaptive-Consistency, a cost-efficient, model-agnostic technique that dynamically adjusts the number of samples per question using a lightweight stopping criterion. Our experiments over 17 reasoning and code generation datasets and three LLMs demonstrate that Adaptive-Consistency reduces sample budget by up to 7.9 times with an average accuracy drop of less than 0.1%. Our code and data are available at https://www.sample-step-by-step.info

연구 동기 및 목표

  • 고정 예산(Self-Consistency) 기반의 LLM 추론 및 코드 생성에서 발생하는 높은 계산 비용을 해결하기 위해.
  • 재학습이 필요 없이 추론 시점에만 적용 가능한 모델에 종속되지 않는 기법을 개발하기 위해.
  • 유형별로 발생하는 다수의 답변에 대한 신뢰도에 따라 입력당 샘플 수를 동적으로 조정하기 위해.
  • 필요로 하는 LLM 생성 수를 크게 줄이면서도 정확도를 유지하거나 향상시키기 위해.
  • 다양한 작업에 걸쳐 효율적이고 신뢰할 수 있는 LLM 추론을 위한 실용적인 오프더쇼프 솔루션을 제공하기 위해.

제안 방법

  • 이 방법은 관측된 답변 빈도에 대한 딜리클레 분포를 기반으로 다수의 출력에 대한 신뢰도를 평가하는 경량 정지 기준을 사용한다.
  • 현재 카운트를 바탕으로 향후 샘플링에서 현재의 다수 답변이 여전히 지배적인 확률을 모델링한다.
  • 정지 조건은 다수의 상위 답변이 향후에도 다수로 유지될 확률이 신뢰도 임계값을 초과할 경우에 발동되며, 이는 딜리클레 사후분포의 수치적 적분을 통해 계산된다.
  • 계산 효율성을 위해 고차원 적분을 단순화하기 위해 상위 두 답변의 빈도에 집중한 베타 분포 근사가 사용된다.
  • 알고리즘은 반복적으로 답변을 샘플링하고 카운트를 갱신하며, 각 샘플 후에 정지 조건을 확인하고, 충분한 신뢰도가 확보되면 조기에 정지한다.
  • 이 방법은 모델에 종속되지 않으며, 미세조정이 필요 없어 사전에 학습된 모든 LLM에 적용 가능하다.
Figure 1: An overview of \ours : Self-Consistency samples a predetermined number of answers, whereas \ours iteratively samples until a lightweight Stopping Criteria, decides to report the majority answer. The figure demonstrates an example where \ours reduces sampling costs by 4x, requiring only ten
Figure 1: An overview of \ours : Self-Consistency samples a predetermined number of answers, whereas \ours iteratively samples until a lightweight Stopping Criteria, decides to report the majority answer. The figure demonstrates an example where \ours reduces sampling costs by 4x, requiring only ten

실험 결과

연구 질문

  • RQ1동적 샘플링 전략은 정확도를 희생시키지 않고 LLM 추론 및 코드 생성에서 추론 비용을 줄일 수 있는가?
  • RQ2샘플링 과정에서 다수의 답변에 대한 신뢰도는 어떻게 변화하며, 이를 정량화하여 조기 정지를 유도할 수 있는가?
  • RQ3Self-Consistency 방식의 기법에서 샘플링 비용과 정확도 사이의 최적의 트레이드오프는 무엇인가?
  • RQ4제안된 방법은 다양한 추론 및 코드 생성 작업에서 고정 예산 Self-Consistency과 비교해 어떻게 성능을 냈는가?
  • RQ5가벼운 모델에 종속되지 않는 정지 기준은 상당한 비용 절감을 이룰 수 있으며, 높은 신뢰성을 유지할 수 있는가?

주요 결과

  • code-davinci-002에서, \ours는 정확도 저하 없이 평균 샘플 예산을 3.4배 줄였다.
  • Vicuna-13B에서, \ours는 정확도 저하가 0.1% 미만으로 1.9배 적은 샘플 수를 요구했다.
  • GPT-3.5-turbo에서, \ours는 샘플링을 4.4배 줄였으며 정확도 저하가 0.2% 미만이었다.
  • 모든 17개의 데이터셋과 세 종류의 모델에서, \ours는 평균 샘플 예산을 3.3배 줄였고 평균 정확도 저하가 0.1% 미만이었다.
  • 고정된 샘플링 비용에서 \ours는 항상 Self-Consistency보다 더 높은 정확도를 달성했으며, 일부 작업에서는 최대 5%포인트의 성능 향상을 보였다.
  • 이 방법은 수학, 일반 지식, 기호 추론, 코드 생성을 포함한 다양한 작업에서 뛰어난 강건성을 보였다.
Figure 3: Impact of Confidence Threshold ( $C_{thresh}$ ) on \ours for GSM-8K : As $C_{thresh}$ varies, the accuracy of \ours increases gradually, eventually plateauing. Initially, the average number of generations also increases gradually but then sharply climbs, reflecting the accuracy-confidence
Figure 3: Impact of Confidence Threshold ( $C_{thresh}$ ) on \ours for GSM-8K : As $C_{thresh}$ varies, the accuracy of \ours increases gradually, eventually plateauing. Initially, the average number of generations also increases gradually but then sharply climbs, reflecting the accuracy-confidence

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.