Skip to main content
QUICK REVIEW

[논문 리뷰] Contrastive Decoding Improves Reasoning in Large Language Models

Sean O’Brien|arXiv (Cornell University)|2023. 09. 17.
Natural Language Processing Techniques참고 문헌 6인용 수 5
한 줄 요약

이 논문은 대조적 디코딩(Contrastive Decoding) — 훈련이 필요 없고 계산적으로 가벼운 방법으로, 강력한 전문 모델과 약한 초보자 모델 간의 가능도 차이를 최대화하는 — 방법이 대규모 언어 모델의 추론 성능을 크게 향상시킨다는 것을 보여준다. 이 방법은 피팅 트레이닝 없이도 GSM8K 및 HellaSwag 벤치마크에서 LLaMA 2와 GPT-3.5와 같은 더 큰 모델들을 능가하는 최신 기술 수준의 성능을 달성한다.

ABSTRACT

This record contains the camera-ready paper “LLM Inference in Normal Form: A TRoT-Based Unification.”We show that many inference-time methods for large language models (LLMs)—e.g., MBR/eMBR decoding, Conformal prediction gates, Verifier/Judge ensembles, Self-RAG, Chain/Tree/Graph-of-Thought, and Verifier-Sandwich (VS)—admit a single normal form derived from the Theory of Relativity of Theories (TRoT). Our formulation uses enriched category theory over the Lawvere cost quantale (tropical (min,+) semiring): left/right Kan extensions \Lan/\Ran\Lan/\Ran\Lan/\Ran, residuation (elementwise residuals), masking and nuclei (1-Lipschitz projectors). In this normal form, generation/lifts (K3), safety consolidation (K4), and auditing (K6–K10 RAVE) become GraphBLAS-style sparse operators with explicit stability and auditability contracts. Provable guarantees Implementation equivalence (normal form): common decoding “tricks” map to \Lan\Lan\Lan → Obs → \Ran\Ran\Ran with the same outputs under masking/nucleus conditions. Stability: \Lan\Lan\Lan and the residual are 1-Lipschitz in ℓ∞\ell_\inftyℓ∞. Approximation bounds: geometric truncation error q\*k+11−q\*\frac{q_\*^{k+1}}{1-q_\*}1−q\*q\*k+1; soft-min (log-sum-exp) gap k log⁡dmax⁡λcost\frac{k\,\log d_{\max}}{\lambda_{ ext{cost}}}λcostklogdmax (with join ≡ numeric infimum in Cost polarity). Auditing: a deterministic spending schedule ∑tαt≤αglobal\sum_t\alpha_t\le\alpha_{ ext{global}}∑tαt≤αglobal with test-(super)martingale e-processes gives time-uniform FWER control; LR/mixture-LR constructions yield valid e-values. Implementation blueprint (GPU/GraphBLAS-ready) \Lan\Lan\Lan: sparse SpMV/SpGEMM on (min,+); \Ran\Ran\Ran: elementwise residual → max-reduce; Numerics: log-domain + row-wise max-shift; masks send forbidden entries to +∞+\infty+∞. Reproducibility log (minimum fields): seed; model/revision; tokenizer; prompts; forward map JJJ; transport KKK; masks; λcost\lambda_{ ext{cost}}λcost; kkk; effective dmax⁡d_{\max}dmax; \Lan/\Ran\Lan/\Ran\Lan/\Ran kernel + build flags; hardware/BLAS; e-process updates (et,Mt)(e_t,M_t)(et,Mt); Conformal calibration snapshots.

연구 동기 및 목표

  • 대조적 디코딩이 피팅 트레이닝 없이 대규모 언어 모델의 추론 능력을 향상시킬 수 있는지 평가하는 것.
  • GSM8K와 HellaSwag와 같은 표준 추론 벤치마크에서 대조적 디코딩의 효과성을 조사하는 것.
  • 대조적 디코딩이 체인 오브 토트(Chain-of-Thought) 생성 중에 일반적인 추론 오류인 입력 복사 및 단계 생략을 줄이는지 분석하는 것.
  • 다양한 초보자 모델 아키텍처와 훈련 단계가 대조적 디코딩 성능에 미치는 영향을 탐색하는 것.
  • 대조적 디코딩이 체인 오브 토트 프롬프팅 및 자기 일관성 디코딩 전략과의 호환성을 평가하는 것.

제안 방법

  • 대조적 디코딩은 강력한 전문 모델과 약한 초보자 모델 간의 로짓 점수 차이를 가중치로 처리하여 생성을 안내한다.
  • α 마스크를 적용하여 전문 모델의 낮은 확률 토큰을 걸러내어 높은 신뢰도 예측만을 고려한다.
  • 최종 로짓은 유효한 토큰에 대해 $ s_{CD}^{(i)} = (1+\beta)s_e^{(i)} - \beta s_a^{(i)} $ 로 계산되며, 유효하지 않은 토큰은 $-\infty$ 로 마스킹된다.
  • 초기화 파rameter $\beta$ 는 대조적 페널티의 강도를 제어하며, $\beta \to 0$ 일 때는 그리디 디코딩으로 수렴하고, $\beta \to \infty$ 일 때는 비율 $p_e^{(i)}/p_a^{(i)}$ 의 argmax로 수렴한다.
  • 이 방법은 로짓 공간에서 작동하므로 최소한의 계산 오버헤드로 효율적인 추론이 가능하다.
  • 특히 체인 오브 토트 프롬프팅과 함께 적용되어 추론 흐름의 품질을 향상시킨다.
Figure 1: Contrastive decoding improves reasoning across model scales and reasoning tasks.
Figure 1: Contrastive decoding improves reasoning across model scales and reasoning tasks.

실험 결과

연구 질문

  • RQ1대조적 디코딩은 GSM8K 및 HellaSwag와 같은 표준 벤치마크에서 대규모 언어 모델의 추론 성능을 향상시킬 수 있는가?
  • RQ2초보자 모델의 선택(크기, 훈련 단계)이 대조적 디코딩 성능에 어떤 영향을 미치는가?
  • RQ3대조적 디코딩은 체인 오브 토트 추론 중에 표면적 입력 복사 및 논리적 단계의 완전성 향상에 기여하는가?
  • RQ4대조적 디코딩은 추론 정확도와 생성 품질 측면에서 그리디 디코딩과 핵심 샘플링보다 어떻게 비교되는가?
  • RQ5대조적 디코딩은 자기 일관성 또는 음성 프롬프팅과 효과적으로 조합되어 추론 결과를 추가로 향상시킬 수 있는가?

주요 결과

  • LLaMA-65B에 대조적 디코딩을 적용하면 GSM8K에서 최대 8%p의 절대 성능 향상을 기록하며, LLaMA 2, GPT-3.5, PaLM 2-L을 능가한다.
  • HellaSwag 공공의 추론 벤치마크에서 LLaMA-65B에 대조적 디코딩을 적용하면 LLaMA 2, GPT-3.5, PaLM 2-L을 능가하며, GPT-4 수준의 성능에 가까워진다.
  • 이 방법은 체인 오브 토트 추론에서 입력 복사 및 단계 생략을 줄여 일반적인 추론 오류를 완화하는 것으로 나타났다.
  • 7B 모델을 초보자로 사용할 경우 GSM8K에서 성능이 저하되지만, 7B 모델의 초기 훈련 체크포인트(예: 130B 스텝)를 사용하면 성능 향상이 이루어져 모델의 훈련 단계가 중요함을 시사한다.
  • 음성 프롬프팅을 대조적 디코딩과 조합하면 성능이 악화되어 여러 조정 기법을 조합할 때의 상충 관계가 있음을 시사한다.
  • 장기적인 추론 생성에서 대조적 디코딩은 그리디 디코딩과 핵심 샘플링을 모두 능가하며, LLM 출력 향상의 일반적인 방법으로서의 가능성을 입증한다.
Figure 3: CD accentuates what the expert model has learned that the amateur model has not. Results are taken from greedy decoding with a 65B parameter expert, using $\alpha=0.1$ , $\beta=0.5$ for CD.
Figure 3: CD accentuates what the expert model has learned that the amateur model has not. Results are taken from greedy decoding with a 65B parameter expert, using $\alpha=0.1$ , $\beta=0.5$ for CD.

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

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

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

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