Skip to main content
QUICK REVIEW

[논문 리뷰] LLMs are Also Effective Embedding Models: An In-depth Overview

Chongyang Tao, Tao Shen|arXiv (Cornell University)|2024. 12. 17.
Financial Distress and Bankruptcy Prediction인용 수 4
한 줄 요약

이 종합 검토는 대규모 언어 모델(Large Language Models, LLMs)이 전통적인 인코더 중심 모델(BERT 등)을 능가하는 강력한 임bedding 모델로 매우 효과적임을 밝히며, 최적화된 프롬프트 설계를 통한 직접 프롬프팅과 아키텍처, 학습 목표, 데이터 구성 등에 기반한 데이터 중심 미세조정이라는 두 가지 주요 접근 방식을 통해 이를 달성한다. 주요 기여는 검색, 분류, RAG 작업 전반에서 뛰어난 성능을 보이는 밀집형 일반 목적 임베딩으로 LLM을 활용하기 위한 종합적인 프레임워크를 제공하는 것이다.

ABSTRACT

Large language models (LLMs) have revolutionized natural language processing by achieving state-of-the-art performance across various tasks. Recently, their effectiveness as embedding models has gained attention, marking a paradigm shift from traditional encoder-only models like ELMo and BERT to decoder-only, large-scale LLMs such as GPT, LLaMA, and Mistral. This survey provides an in-depth overview of this transition, beginning with foundational techniques before the LLM era, followed by LLM-based embedding models through two main strategies to derive embeddings from LLMs. 1) Direct prompting: We mainly discuss the prompt designs and the underlying rationale for deriving competitive embeddings. 2) Data-centric tuning: We cover extensive aspects that affect tuning an embedding model, including model architecture, training objectives, data constructions, etc. Upon the above, we also cover advanced methods for producing embeddings from longer texts, multilingual, code, cross-modal data, as well as reasoning-aware and other domain-specific scenarios. Furthermore, we discuss factors affecting choices of embedding models, such as performance/efficiency comparisons, dense vs sparse embeddings, pooling strategies, and scaling law. Lastly, the survey highlights the limitations and challenges in adapting LLMs for embeddings, including cross-task embedding quality, trade-offs between efficiency and accuracy, low-resource, long-context, data bias, robustness, etc. This survey serves as a valuable resource for researchers and practitioners by synthesizing current advancements, highlighting key challenges, and offering a comprehensive framework for future work aimed at enhancing the effectiveness and efficiency of LLMs as embedding models.

연구 동기 및 목표

  • 기존의 인코더 중심 모델(BERT 등)에서 디코더 중심 LLM(GPT, LLaMA 등)으로의 패러다임 전환을 분석하여 효과적인 임베딩 모델로의 전환을 다룬다.
  • 프롬프트 설계와 데이터 중심 적응 전략에 중점을 두어, 미세조정이 필요 없는 및 미세조정이 필요한 LLM 기반 임베딩 방법을 체계적으로 비교한다.
  • 다양한 환경에서 LLM 기반 임베딩의 효율성, 정확도, 강건성 간의 상충 관계를 평가한다.
  • 저자원 환경 적응, 적대적 공격에 대한 취약성, 사전 훈련 목표와 임베딩 목표 간의 불일치와 같은 열린 과제를 규명한다.

제안 방법

  • LLM 기반 임베딩 방법을 두 가지 주요 전략으로 분류한다: 직접 프롬프팅과 데이터 중심 미세조정.
  • fine-tuning 없이도 고품질 임베딩을 유도할 수 있는 프롬프트 엔지니어링 기법(예: 지시 미세조정, 대비 프롬프팅)을 분석한다.
  • 모델 아키텍처 선택, 손실 함수(예: 대비 손실), 데이터 구성 방법(예: 합성 데이터, 검색 증강 데이터)을 검토하여 효과적인 미세조정을 위한 전략을 제시한다.
  • 임베딩 품질과 최종 작업 성능에 미치는 영향을 분석하기 위해 풀링 전략(예: 평균 풀링, CLS, [CLS])을 검토한다.
  • LLM 기반 임베딩 시스템에서의 스케일링 법칙과 효율성-정확도 상충 관계를 평가한다.
  • 장문의 컨텍스트, 다국어, 다중 모odal 임베딩 생성을 위한 고급 기법을 논의한다.
Figure 1: Illustration of direct prompting or tuning LLMs as embedding models.
Figure 1: Illustration of direct prompting or tuning LLMs as embedding models.

실험 결과

연구 질문

  • RQ1LLM은 전통적인 인코더 중심 모델(BERT 등)과 비교해 어떻게 효과적인 의미 임베딩을 생성하는가?
  • RQ2LLM에서 미세조정 없이도 고품질 임베딩을 도출하기 위한 가장 효과적인 프롬프팅 전략은 무엇인가?
  • RQ3아키텍처, 목표, 데이터 정제를 통한 데이터 중심 미세조정이 LLM 기반 임베딩 성능을 어떻게 향상시키는가?
  • RQ4저자원, 장문의 컨텍스트, 다국어 도메인에 적응하는 데 있어 주요 과제는 무엇인가?
  • RQ5LLM 기반 임베딩을 어떻게 적대적 공격과 분포 변화에 대해 강건하게 만들 수 있는가?

주요 결과

  • GPT, LLaMA, Mistral 등의 LLM은 수조 개의 토큰에 걸쳐 광범위하게 사전 훈련되고 컨텍스트 모델링 능력이 뛰어나 임베딩 작업에서 최고 성능을 기록한다.
  • 철저하게 설계된 지시를 통한 직접 프롬프팅은 비용이 많이 드는 미세조정이 필요 없이도 미세조정된 모델 수준의 경쟁력 있는 임베딩을 생성할 수 있다.
  • 대비 손실과 정제된 데이터를 포함한 데이터 중심 미세조정은 특히 검색 및 분류 작업의 최종 성능 향상에 있어 임베딩 품질을 크게 향상시킨다.
  • 평균 풀링과 [CLS]-기반 풀링 간에는 성능에 명확한 차이가 있으며, 일반화 성능 측면에서 평균 풀링이 종종 뛰어나다.
  • 저자원 도메인에서는 데이터 부족과 도메인 이동으로 인해 사전 훈련된 모델이 도메인 특화 미세조정 없이도 일반화 성능이 떨어진다.
  • 적대적 공격에 대한 강건성은 여전히 중요한 한계로, 작은 입력 변형이 임베딩을 근본적으로 변화시켜 보안 민감도가 높은 실세계 응용 분야의 배포를 위협할 수 있다.
Figure 3: The performance trend of models with varying sizes on MTEB benchmark, based on results from Muennighoff et al. ( 2022 ) .
Figure 3: The performance trend of models with varying sizes on MTEB benchmark, based on results from Muennighoff et al. ( 2022 ) .

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

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

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

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