Skip to main content
QUICK REVIEW

[논문 리뷰] DQ-LoRe: Dual Queries with Low Rank Approximation Re-ranking for In-Context Learning

Jiong Xiong, Zixuan Li|arXiv (Cornell University)|2023. 10. 04.
Context-Aware Activity Recognition SystemsComputer Science인용 수 3
한 줄 요약

DQ-LoRe는 대규모 언어 모델(Large Language Models, LLMs)을 활용해 사고의 사슬(Chain-of-Thought, CoT) 추론을 생성하고, 이를 바탕으로 저랭크 근사(Low-rank approximation, LoRe)를 적용한 검색 모델을 통해 예시들(exemplars)을 재정렬함으로써, 문맥 내 학습을 향상시키는 이중 쿼리 프레임워크를 제안한다. 이 방법은 차원 축소를 통해 중복 정보를 필터링함으로써 예시 선택을 개선하여, 추론 벤치마크에서 GPT-4의 정확도를 94.2%로 끌어올렸으며, 이는 이전 최고 성능 방법 대비 1.7% 향상된 결과이다.

ABSTRACT

Recent advances in natural language processing, primarily propelled by Large Language Models (LLMs), have showcased their remarkable capabilities grounded in in-context learning. A promising avenue for guiding LLMs in intricate reasoning tasks involves the utilization of intermediate reasoning steps within the Chain-of-Thought (CoT) paradigm. Nevertheless, the central challenge lies in the effective selection of exemplars for facilitating in-context learning. In this study, we introduce a framework that leverages Dual Queries and Low-rank approximation Re-ranking (DQ-LoRe) to automatically select exemplars for in-context learning. Dual Queries first query LLM to obtain LLM-generated knowledge such as CoT, then query the retriever to obtain the final exemplars via both question and the knowledge. Moreover, for the second query, LoRe employs dimensionality reduction techniques to refine exemplar selection, ensuring close alignment with the input question's knowledge. Through extensive experiments, we demonstrate that DQ-LoRe significantly outperforms prior state-of-the-art methods in the automatic selection of exemplars for GPT-4, enhancing performance from 92.5% to 94.2%. Our comprehensive analysis further reveals that DQ-LoRe consistently outperforms retrieval-based approaches in terms of both performance and adaptability, especially in scenarios characterized by distribution shifts. DQ-LoRe pushes the boundary of in-context learning and opens up new avenues for addressing complex reasoning challenges. Our code is released at https://github.com/menik1126/DQ-LoRe

연구 동기 및 목표

  • LLMs의 문맥 내 예시 선택 시 발생하는 불안정성과 일반화 가능한 기준의 부재 문제를 해결한다.
  • 질문 유사도를 초과하는 중간 추론 단계(Chain-of-Thought, CoT)를 통합하여 예시 선택을 향상시킨다.
  • 차원 축소를 통해 고차원 임베딩 내 중복을 줄여 예시 간 구별력을 향상시킨다.
  • 분포 이탈 상황에서 예시 선택의 강건성과 적응 가능성을 향상시킨다.
  • LLMs와 검색 모델을 이중 쿼리 파이프라인에 통합한 확장성 있고 효율적인 프레임워크를 개발한다.

제안 방법

  • 이중 쿼리 메커니즘을 사용: 첫 번째 쿼리에서 LLM을 활용해 입력 질문에 대한 사고의 사슬(Chain-of-Thought, CoT) 추론을 생성한다.
  • 입력 질문과 생성된 CoT를 결합하여 검색기용 더 풍부한 쿼리로 구성한다.
  • 결합된 질문-CoT 쿼리를 사용해 더 작은 규모의 검색 모델에 쿼리하여 후보 예시들을 검색한다.
  • 검색된 예시의 임베딩 공간에 저랭크 근사(예: 주성분 분석, PCA)를 적용하여 중복 정보를 필터링한다.
  • 저랭크 표현을 기반으로 예시들을 재정렬하여 입력의 추론 구조와의 일치도를 향상시킨다.
  • 최종 재정렬된 예시들을 LLM에 피드백하여 추론 성능을 향상시킨다.
Figure 1: The overall pipeline of DQ-LoRe. It consists of three parts: Dual Query first query LLM to obtain CoT $y$ , then query the retriever to obtain the final exemplars via both question and LLM-generated knowledge. LoRe leverages PCA to approximate the low-rank embedding of retrieved exemplars,
Figure 1: The overall pipeline of DQ-LoRe. It consists of three parts: Dual Query first query LLM to obtain CoT $y$ , then query the retriever to obtain the final exemplars via both question and LLM-generated knowledge. LoRe leverages PCA to approximate the low-rank embedding of retrieved exemplars,

실험 결과

연구 질문

  • RQ1LLM이 생성한 사고의 사슬(Chain-of-Thought, CoT) 추론을 통합함으로써, 문맥 내 학습에서 예시 검색 품질을 향상시킬 수 있는가?
  • RQ2저랭크 근사를 통한 차원 축소가 의미적으로 유사하지만 논리적으로는 다른 예시들 간의 구별력을 향상시키는 데 효과적인가?
  • RQ3분포 이탈 조건에서 DQ-LoRe는 검색 기반 베이스라인 대비 어떻게 성능을 발휘하는가?
  • RQ4이중 쿼리 메커니즘이 질문 유사도에만 의존하는 것을 줄이고, 소수 예시 프롬프팅에서의 강건성을 향상시키는가?
  • RQ5LoRe 기반 재정렬이 다단계 추론 벤치마크에서 일반화 능력과 성능을 얼마나 향상시키는가?

주요 결과

  • DQ-LoRe는 GPT-4에서 문맥 내 학습 성능을 이전 최고 성능 방법 대비 1.7% 절대 향상시켜 92.5%에서 94.2%로 향상시켰다.
  • 분포 이탈 상황에서도 뛰어난 강건성을 보이며, 검색 기반 베이스라인이 성능이 저하되는 상황에서도 높은 성능을 유지한다.
  • 저랭크 근사(LoRe)는 고차원 임베딩 내 중복을 효과적으로 줄여 예시의 구별력과 선택 품질을 향상시킨다.
  • 이중 쿼리 메커니즘은 LLM이 생성한 추론을 활용함으로써 검색 성능을 크게 향상시키며, 질문 유사도 기반 검색 대비 정확도와 일반화 능력에서 뛰어난 성능을 보인다.
  • DQ-LoRe는 SVAMP 및 GSM8K를 포함한 여러 다단계 추론 벤치마크에서 기존의 검색 기반 접근 방식을 일관되게 능가한다.
  • PCA의 필터링 효과 덕분에, 오염된 상관관계나 단어 공출현 패tern이 포함된 예시 풀에서도 이 프레임워크는 적응 가능하고 효과적이다.
(a) The retriever on SVAMP is trained under the i.i.d. setting and the dimensionality-reduced results after retrieval on SVAMP.
(a) The retriever on SVAMP is trained under the i.i.d. setting and the dimensionality-reduced results after retrieval on SVAMP.

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

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

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

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