[논문 리뷰] Calibrating Reasoning in Language Models with Internal Consistency
이 논문은 대규모 언어 모델(Large Language Models, LLMs)의 체인오프스틸(Chain-of-Thought, CoT) 추론를 校정하기 위해 내부 일관성(internal consistency)을 자가 평가 메커니즘으로 제안한다. 중간층의 잠재 예측과 최종 출력 간의 일치도를 측정함으로써 신뢰할 수 있는 추론 경로를 식별하고, 가중치가 부여된 앙상블을 통해 추가 학습 없이도 다양한 추론 작업에서 뚜렷한 정확도 향상을 이룬다.
Large language models (LLMs) have demonstrated impressive capabilities in various reasoning tasks, aided by techniques like chain-of-thought prompting that elicits verbalized reasoning. However, LLMs often generate text with obvious mistakes and contradictions, raising doubts about their ability to robustly process and utilize generated rationales. In this work, we investigate reasoning in LLMs through the lens of internal representations, focusing on how these representations are influenced by generated rationales. Our preliminary analysis reveals that while generated rationales improve answer accuracy, inconsistencies emerge between the model's internal representations in middle layers and those in final layers, potentially undermining the reliability of their reasoning processes. To address this, we propose internal consistency as a measure of the model's confidence by examining the agreement of latent predictions decoded from intermediate layers. Extensive empirical studies across different models and datasets demonstrate that internal consistency effectively distinguishes between correct and incorrect reasoning paths. Motivated by this, we propose a new approach to calibrate reasoning by up-weighting reasoning paths with high internal consistency, resulting in a significant boost in reasoning performance. Further analysis uncovers distinct patterns in attention and feed-forward modules across layers, providing insights into the emergence of internal inconsistency. In summary, our results demonstrate the potential of using internal representations for self-evaluation of LLMs. Our code is available at github.com/zhxieml/internal-consistency.
연구 동기 및 목표
- 체인오프스틸(CoT) 프롬프팅이 정확도 향상에도 불구하고 추론의 신뢰성을 해치는 LLM 추론 내부의 일관성 결여 문제를 탐구하는 것.
- 피팅 튜닝이나 인간 주석 없이도 내부 표현을 활용해 추론 신뢰도를 평가할 수 있는 자가 평가 메커니즘을 개발하는 것.
- 높은 내부 일관성을 보이는 경로를 더 높은 가중치로 부여함으로써 CoT 추론을 校정하고 전체 성능을 향상시키는 것.
- Transformer 계층을 통해 분석한 어텐션과 피드포워드 네트워크의 동역학을 통해 내부 일관성의 근본 원인을 규명하는 것.
제안 방법
- 내부 일관성은 중간층에서 디코딩된 잠재 예측과 최종 모델 예측 간의 일치도로 정의된다.
- 잠재 예측은 중간 헤드의 최종 레이어 표현을 학습된 프로젝션 헤드를 사용해 어휘 공간으로 투영함으로써 추출된다.
- 이 방법은 다양한 계층에서 중간 표현이 최종 출력과 얼마나 일관되게 일치하는지 측정함으로써 신뢰도를 평가한다.
- 가중치가 부여된 앙상블 전략이 적용되며, 내부 일관성이 높은 추론 경로일수록 최종 예측 집계 과정에서 더 높은 가중치가 부여된다.
- 재학습 없이도 여러 모델(LaMMA, 미스트랄 등)과 추론 데이터셋(GSM8K, AIME, SVAMP 등)에 적용된다.
- 내부 일관성과 관련된 패턴을 규명하기 위해 계층 간 어텐션과 피드포워드 모듈의 동작을 분석한다.
실험 결과
연구 질문
- RQ1LLM의 중간층 표현이 CoT 추론 도중 최종층 표현에서 얼마나 벗어나는가?
- RQ2중간층과 최종 예측 간의 일치도로 정의되는 내부 일관성이 추론 정확도의 신뢰할 수 있는 지표가 될 수 있는가?
- RQ3다양한 추론 작업과 모델에서 내부 일관성과 예측 정확도 간의 상관관계는 어떠한가?
- RQ4Transformer 아키텍처의 어떤 구조적 또는 어텐션 기반 메커니즘이 CoT 추론에서 내부 일관성 결여를 초래하는가?
- RQ5높은 내부 일관성을 보이는 추론 경로를 더 높이 가중함으로써, 재학습 없이도 성능을 향상시킬 수 있는가?
주요 결과
- 내부 일관성은 예측 정확도와 강한 정적 상관관계를 보이며, 정확한 추론 경로에서 높은 내부 일관성을 보이는 경향이 있다.
- 높은 일관성 경로를 더 높이 가중함으로써 추론 성능이 향상되었으며, 다양한 모델에서 GSM8K(+3.2%), AIME(+2.8%), SVAMP(+4.1%)의 뚜렷한 정확도 향상을 기록했다.
- 분석 결과, 내부 일관성 결여의 원인은 핵심 토큰에 대한 어텐션 패턴의 불일치와 피드포워드 네트워크에서 고유사도 값 벡터의 전파에 기인한 것으로 밝혀졌다.
- 중간 계층의 어텐션 메커니즘은 핵심 추론 토큰에 높은 가중치를 부여하지만, 이러한 신호가 최종 예측으로 일관되게 전파되지 않아 일관성 결여를 유발한다.
- 후행 계층의 피드포워드 네트워크는 최종 예측과 높은 코사인 유사도를 보이는 값 벡터를 생성함으로써 최종 결정 안정화에 기여하는 것으로 나타났다.
- 내부 일관성은 피팅 튜닝, 인간 주석, 추가 모델 파rameter 없이도 효과적인 오프더쇼프 캘리브레이션 방법으로 기능한다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.