BGE M3-Embedding: Multi-Lingual, Multi-Functionality, Multi-Granularity Text Embeddings Through Self
Overview
BAAI๋ผ๋ ์ค๊ตญ AI ์ฐ๊ตฌ์์์ ๋ง๋ embedding model
M3๋ ๋ค์๊ณผ ๊ฐ์ 3๊ฐ์ง ํน์ง์
Multi-Linguality : 100๊ฐ ์ด์์ ์ธ์ด
Multi-Functionality: 3๊ฐ์ง retrieval ๋ฐฉ์์ ๊ฐ์ด ์ ๊ณต
Multi-Granularity : ์งง๊ณ , ๊ธด ๋ฌธ์ฅ(์ต๋ 8192 ํ ํฐ) ์์๋ ์ ์๋ํจ
์ค์ ์คํ๊ฒฐ๊ณผ ํ๊ตญ์ด์์๋ ์ข์ ์ฑ๋ฅ
์์ง Training์ฝ๋๋ ๊ณต๊ฐ๋์ง ์์.
Introduction
IR(Information Retrieval)์ ์ฌ์ฉ๋๋ Embedding ๋ชจ๋ธ์ ๋ง์ด ์ฐ๊ตฌ๊ฐ ๋จ.
ํ์ง๋ง ๋ค์๊ณผ ๊ฐ์ ํ๊ณ์ ์ ๊ฐ์ง๊ณ ์์
1) embedding ๋ชจ๋ธ์ ๋๋ถ๋ถ ์์ด์์๋ง ์๋
2) ์ค์ง 1๊ฐ retrieval task์๋ง ๋ง์ถฐ ํ์ต์ด ์งํ๋จ. (ํ์ง๋ง ์ค์ ์์ ์ฌ๋ฌ๊ฐ ์ฌ์ฉํด์ผํ ์๋ ์์)
3) long-document retreiver ๊ฑฐ์ ์์
๋ค์๊ณผ ๊ฐ์ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๊ธฐ ์ํด์ M3-Embedding์ ์ ์ํจ

Multi-Linguality
100๊ฐ ์ด์ ์ธ์ด๋ฅผ ์ง์
๋ํ ํ๊ตญ์ด๋ก ๋์ด์๋ ๋ฌธ์์ค์ ์์ด๋ก ์ง๋ฌธํด์ ๊ฒ์๋ ๊ฐ๋ฅ
Multi-Functionality
์๋ ๋ค ๊ฐ๊ฐ ํ์ต๋๊ณ , ์ถํ์ ๊ฐ์ด hybrid ๋ฐฉ์์ผ๋ก ์ฌ์ฉํ๋ ๊ฒ์ ๋ฐฉ์์ ๋ค ์ฌ์ฉํ ์ ์์.
๊ฐ๊ฐ ๊ฒ์๋ฐฉ์์ background์์ ์์ธํ ์ค๋ช
Self-knowledge distillation ๋ฐฉ์์ผ๋ก ๊ฐ 3๊ฐ์ง ํจ์์์ ๋์จ score๋ฅผ ํตํฉํด์ ํ์ฉํจ
Multi-Granularity
์ต๋ 8192 ํ ํฐ๊น์ง ๋๋ฆผ, ์ด๋ฅผ ์ํด batching strategy๋ฅผ ์ต์ ํ ํจ
๋ํ ๋ฌธ์ฅ, ๋ฌธ๋จ ๋จ์์์ ๋ชจ๋ ์ฑ๋ฅ์ด ์ข์
Background
Dense Retrieval

๋ค์๊ณผ ๊ฐ์ด ์ฌ์ ํ๋ จ๋ Encoder(Bert, Roberta)๋ฅผ ๊ฐ์ง๊ณ ์๋ฒ ๋ฉ์ ํ์ฉํด์ ์ ์ฌ๋๋ฅผ ๊ตฌํจ
์ด๋ ๊ฐ ์ง๋ฌธ๊ณผ ๋ฌธ๋จ์ [CLS] ํ ํฐ์ ์๋ฒ ๋ฉ(hidden state) ๊ฐ ์ฌ์ฉ
Sparse Retrieval
๊ฐ ๋จ์ด(token) Term ์์ฒด์ ์ง์คํ๋ ๋ฐฉ๋ฒ
๋ฅ๋ฌ๋ ์ฌ์ฉ์ ์๋ BM25๋ฅผ ๊ฐ์ฅ ๋ง์ด ์ฌ์ฉ
์ธ์ฝ๋ ๋ชจ๋ธ์ ํ์ฉํ๋ค๋ฉด ๋ค์๊ณผ ๊ฐ์ด ์ฌ์ฉ๋ ์ ์์.
๊ฐ๊ฐ ํ ํฐ์ ์๋ฒ ๋ฉ(hidden state)๋ฅผ ํ์ฉํ์ฌ ๊ตฌํ๋ ๋ฐฉ๋ฒ

Multi-Vec Retrieval
ํฌ๊ฒ ๋๊ฐ์ง ๊ฐ๋๋ก ๋๋ ๋ณผ์ ์์
Dense vector์ ๋ค๋ฅด๊ฒ [CLS] ํ ํฐ์ด ์๋ ๋ชจ๋ ํ ํฐ ์๋ฒ ๋ฉ์ ํฉ์ณ์ ํ์ฉํ๋๊ฒ

๋ค์ํ๊ฒ passage, ์ง๋ฌธ์ ๋ณํ์์ผ vector๋ฅผ ์ฌ๋ฌ๊ฐ ๋ง๋ค์ด์ ํ์ฉํ๋ ๊ฒ
์ง๋ฌธ: ์ ์ฌ์ง๋ฌธ ๋ง๋ค๊ธฐ๋ก ํด์ ์ง๋ฌธ ์๋ฒ ๋ฉ ํ๊ท ๊ตฌํด์ ํ์ฉ
passage: ๋ฌธ์์์ฝ, ์งง์ ๋ฌธ์ฅ ๋ฑ๋ฑ์ ํด์ passage ์๋ฒ ๋ฉ ํ๊ท ๊ตฌํด์ ํ์ฉ ๋ฑ๋ฑ
๋ฐ์ ์์) HyDe

Method(M3-Embedding)
Query q๊ฐ ์ฃผ์ด์ก์ ๋ Corpus์์ ๊ฐ์ฅ ๊ด๋ จ์๋ ๋ฌธ์ d๋ฅผ ์ฐพ์์ค๋ ๊ฒ
์ด๋ q์ D์ ์ธ์ด๋ ๋ฌ๋ผ๋ ๊ฐ๋ฅ
Data Curation

MultiLongDoc๋ ์ง์ ์์ฑํ ๋ฐ์ดํฐ ์ ์ผ๋ก 'GPT3.5' ํ์ฉ
You are a curious AI assistant, please generate one specific and valuable question based on the following text. The generated question should revolve around the core content of this text, and avoid using pronouns (e.g., โthisโ). Note that you should generate only one question, without including additional content:โ.
Hybrid Retrieval
๋ค์ 3๊ฐ์ง์ score๋ฅผ ํฉ์ณ์ ๋ ์ข์ score๋ฅผ ์ป๋๋ค ์ด๊ฒ ๊ธฐ๋ณธ ํฌ์ธํธ
Dense
CLS ํ ํฐ์ hidden state๋ฅผ normalized ํ ๊ฐ ํ์ฉ
์ ์ฌ๋ ์ค์ฝ์ด๋ ๋ด์ ํ์ฉ
Sparce(Lexical)
๊ฐ ํ ํฐ์ weight ๊ฐ ํ์ฉ
๋ hidden state๋ฅผ float๋ก ๋ณํ์ํค๋ mapping matrix
์ ์ฌ๋ ์ค์ฝ์ด๋ joint importance of the co-existed terms๋ฅผ ํ์ฉ
Multi-vector
Dense vector์ extension์ผ๋ก ์ ์ฒด output embedding์ ํ์ฉํจ
๋ leranable projection matrix
์ ์ฌ๋๋ ๋ค์๊ณผ ๊ฐ์ด ๊ตฌํจ (๋ด์ ํ์ฉ)
Self-Knowledge Distillation
์๊น ๋ค๋ฅธ ๋ฐฉ์์ผ๋ก ์ป์ ์ค์ฝ์ด๋ฅผ ๋จ์ํ sum-up ๋ฐฉ์์ผ๋ก ํฉ์นจ
๊ทธ ํ ๋ก์ค๊ฐ๋ ์ด 3๊ฐ์ง๋ฅผ ํฉ์ณ์ ๋ง๋ค์ด์ ํ์ต์ ํ์ฉ (์ฌ๊ธฐ์ ๊ธฐ๋ณธ ๋ก์ค๊ฐ์ธ InfoNCE loss๋ฅผ ๊ฐ์ด ์ฌ์ฉ)
ํ์ต์ ํฌ๊ฒ ๋๋จ๊ณ๋ก ์งํ
1๋จ๊ณ Unsupervised data๋ก pre-trained
2๋จ๊ณ Supervised data๋ก ์์ 3๊ฐ์ง๋ฅผ loss๋ก ํ์ฉํด์ ํ๋ จ

Efficient Batching


Result
Main Result

Ablation Study

Last updated
