AI바라기의 인공지능

VLM : 논문리뷰 : ALIGNVLM: Bridging Vision and Language Latent Spaces for Multimodal Understanding 본문

논문리뷰

VLM : 논문리뷰 : ALIGNVLM: Bridging Vision and Language Latent Spaces for Multimodal Understanding

AI바라기 2025. 2. 7. 17:16

Overall Summary

ALIGNVLM은 visual features를 LLM text embeddings의 weighted average로 mapping하는 새로운 vision-text alignment method인 ALIGN을 제안하여, 기존 VLMs의 modality misalignment 문제를 해결하고 multimodal document understanding 성능을 향상시켰다. Extensive experiments를 통해 ALIGN의 effectiveness와 robustness를 입증했으며, SOTA VLMs과 비교하여 competitive 또는 superior performance를 달성했다. 향후 더 다양한 domains으로의 generalization 및 contextually-relevant data 활용을 통해 ALIGNVLM의 성능을 더욱 개선할 수 있을 것으로 기대된다. 이 논문은 vision-language alignment 연구 분야에 중요한 기여를 하며, multimodal understanding 분야의 발전에 기여할 수 있다.

 

쉬운 설명: 이 논문은 이미지 속 정보를 컴퓨터가 더 잘 이해할 수 있도록, 이미지가 가진 정보를 컴퓨터가 "아는 단어"들의 조합으로 바꿔주는 새로운 방법(ALIGN)을 제안합니다. 마치 이미지를 컴퓨터가 이해할 수 있는 언어로 "번역"하는 것과 비슷합니다. 이렇게 하면 컴퓨터가 이미지와 텍스트를 더 잘 연결하여 문서 속 이미지처럼 복잡한 정보도 더 정확하게 이해할 수 있습니다.

 

 

ALIGNVLM 논문 학습 노트 (꼼꼼 정리)

Purpose of the Paper

기존 Vision-Language Models (VLMs)에서 visual features를 Large Language Model (LLM)의 embedding space로 효과적으로 mapping하는 데 어려움이 있었음. 특히, multilayer perceptrons (MLPs)와 같은 기존 connector들은 out-of-distribution 또는 noisy input을 생성하여 modality 간 misalignment를 유발하는 문제가 있었음. 본 논문은 이러한 한계를 극복하기 위해, visual features를 LLM text embeddings의 weighted average로 mapping하는 새로운 vision-text alignment method인 ALIGNVLM을 제안함. 이를 통해 linguistic priors를 활용하여 visual features가 LLM이 효과적으로 해석할 수 있는 space 영역에 mapping되도록 함으로써, multimodal understanding, 특히 document understanding task에서의 성능 향상을 목표로 함.

Key Contributions

  • Novel Connector (ALIGN): Vision과 text modalities 간의 representation gap을 해소하는 새로운 connector인 ALIGN을 제안. ALIGN은 visual features를 LLM의 pretrained vocabulary embeddings에 대한 probability distributions로 mapping한 후, 이를 weighted average로 결합하여 visual features를 LLM text space 내에 있도록 constraint함.
  • ALIGNVLM: ALIGN을 활용하여 multimodal document understanding task에서 state-of-the-art performance를 달성하는 Vision-Language Models (ALIGNVLM) 제품군을 도입.
  • Robustness and Effectiveness: 1B에서 8B parameters에 이르는 다양한 model size에서 ALIGN의 robustness와 effectiveness를 입증하는 extensive experiments를 수행.

Novelty:

  • Visual features를 LLM embedding space에 직접 projection하는 대신, LLM의 기존 text embeddings의 convex combination으로 표현하여 linguistic priors를 활용.
  • Out-of-distribution input 및 noise 문제를 완화하고 modality 간 alignment를 개선.

Experimental Highlights

  • Datasets: CC-12M, BigDocs-7.5M, DocDownstream 등 multimodal document understanding datasets 사용.
  • Metrics: DocVQA, InfoVQA, DeepForm, KLC, WTQ, TabFact, ChartQA, TextVQA, TableVQA 등 다양한 benchmarks에 대한 accuracy 측정.
  • Baselines: MLP, Perceiver Resampler, Ovis 등 기존 connector methods 및 LLaVA, Qwen2-VL, DocOwl1.5 등 다양한 VLMs과 비교.
  • Results:
    • ALIGNVLM은 동일한 training configuration에서 다른 connector methods를 능가 (Figure 1, Table 2).
    • ALIGNVLM은 동일한 data regime에서 training된 Base VLM models을 significantly outperform (Table 1).
    • ALIGNVLM은 SOTA Instruct VLMs과 비교하여 competitive performance를 달성, 심지어 더 큰 models (Llama3.2-11B, PixTral-12B)보다 우수한 성능을 보임 (Table 1).
    • ALIGN connector는 noise에 대한 robustness가 높음 (Table 3).
    • ALIGNVLM, VCR benchmark에서 MLP connector Model을 능가하는 성능을 보임(Figure4).

Limitations and Future Work

  • Limitations:
    • ALIGNVLM은 VCR task에서 landmark 이름과 유사한 common words를 혼동하는 경우가 있음 (Figure 5c, 5d). 이는 ALIGNVLM이 vision representations를 vocabulary 내에서 더 common한 tokens에 align하는 경향 때문일 수 있음.
  • Future Work:
    • 더욱 diverse한 instruction-tuning datasets에 대한 training을 통해 document understanding을 넘어 broader domains으로 generalization하는 연구.
    • Contextually-relevant data를 활용하여 ALIGNVLM의 landmark 인식 성능을 개선하는 연구.

 

 

Abstract

visual features를 language embeddings에 정렬하는 것은 vision-language models (VLMs)의 핵심 과제입니다. 이러한 models의 성능은 vision encoder에 의해 생성된 visual features를 LLM과의 공유 embedding 공간으로 매핑하는 동시에 의미적 유사성을 보존하는 좋은 connector를 갖는 것에 달려 있습니다. multilayer perceptrons (MLPs)와 같은 기존 connectors는 종종 out-of-distribution 또는 noisy inputs를 생성하여 modality 간의 misalignment를 초래합니다.

본 연구에서는 visual features를 LLM text embeddings의 가중 평균으로 매핑하는 새로운 vision-text alignment 방법인 ALIGNVLM을 제안합니다.

우리 접근 방식은 LLM에 의해 encoding된 linguistic priors를 활용하여 visual features가 LLM이 효과적으로 해석할 수 있는 공간 영역으로 매핑되도록 합니다. ALIGNVLM은 스캔된 document images가 텍스트 내용에 정확하게 매핑되어야 하는 document understanding tasks에 특히 효과적입니다. 광범위한 실험을 통해 ALIGNVLM이 이전 alignment methods에 비해 state-of-the-art 성능을 달성함을 보여줍니다. 우리는 vision-text feature alignment가 개선되었고 noise에 대한 robustness를 입증하는 추가 분석을 제공합니다.

 

 

 

 

Figure 1: Performance of Different VLM Connectors.

제안된 ALIGN connector는 동일한 training configuration을 사용하는 모든 벤치마크에서 다른 방법들보다 우수한 성능을 보입니다. Radial distance는 최대 점수의 비율이며, 0.7 (검은색 점)에서 잘립니다.

 

 

 

1. Introduction

더보기

Vision-Language Models (VLMs)는 스캔된 문서의 visual 및 textual contents를 모두 해석하는 multimodal document understanding tasks를 위한 강력한 framework로 최근 몇 년 동안 큰 주목을 받았습니다. 이러한 tasks는 invoice parsing, form reading, and document question answering을 포함한 실제 상업 applications에서 흔히 볼 수 있습니다. VLM architectures는 일반적으로 세 가지 components로 구성됩니다.

(i) raw images를 process하는 vision encoder

(ii) 텍스트에 대해 pre-trained된 Large Language Model (LLM)

(iii) vision encoder의 visual features를 LLM의 semantic space로 매핑하는 connector module.

이 pipeline의 핵심 과제는 vision encoder의 continuous feature embeddings을 LLM의 latent space로 효과적으로 매핑하는 동시에 visual concepts의 semantic properties를 보존하는 것입니다. 기존 approaches는 크게 deep fusion과 shallow fusion methods로 분류할 수 있습니다. NVLM, Flamingo, CogVLM, 및 LLama 3.2-Vision과 같은 deep fusion methods는 LLM의 각 layer에 additional cross-attention 및 feed-forward layers를 도입하여 visual 및 textual features를 통합합니다. 이러한 methods는 cross-modal interaction을 강화하는 데 효과적이지만, base LLM에 비해 VLM의 parameter count를 크게 증가시켜 computational overhead가 높아지고 효율성이 저하됩니다.

반면, shallow fusion methods는 multilayer perceptrons (MLPs) 또는 Perceiver Resampler와 같은 attention-based mechanisms를 사용하여 visual features를 vision encoder에서 LLM input embedding space로 projection한 다음, textual prompt의 input embeddings와 concatenate합니다. 이 approach는 deep fusion methods보다 parameter-efficient하고 computationally 가볍지만, projected embeddings이 LLM의 text embeddings에 의해 span되는 영역, 즉 LLM이 이해하도록 pre-trained된 영역 내에 유지되도록 하는 mechanism이 부족합니다. 결과적으로, unconstrained visual features는 out-of-distribution (OOD) 및 noisy inputs를 생성하여 modalities 간의 misalignment를 초래하고 종종 전반적인 performance를 저하시킬 수 있습니다. Ovis와 같은 최근 methods는 vision encoder outputs에서 indexed되고 함께 결합되어 LLM에 대한 visual inputs를 구성하는 별도의 visual embeddings를 도입하여 이러한 문제를 완화하려고 시도합니다. 그러나 이 approach는 massive embedding matrix로 인해 parameter count가 크게 증가하고 LLM의 input latent space와의 alignment를 보장하지 않고 새로운 embedding space를 학습하기 위해 extensive training이 필요합니다.

이러한 limitations를 해결하기 위해 본 논문에서는 visual features를 LLM embedding space로 직접 projection하는 것을 우회하는 새로운 framework인 ALIGNVLM을 소개합니다. 대신, 제안된 connector인 ALIGN은 visual features를 LLM의 기존 pre-trained vocabulary embeddings에 대한 probability distributions로 매핑한 다음, text embeddings의 weighted representation으로 결합합니다. 각 visual feature를 LLM text embeddings의 convex combination으로 제한함으로써, 우리 approach는 LLM의 text space에 이미 encoding된 linguistic priors를 활용합니다. 이렇게 하면 resulting visual features가 LLM의 embedding space의 convex hull 내에 놓이게 되어 noisy 또는 out-of-distribution inputs의 위험이 줄어들고 modalities 간의 alignment가 향상됩니다. 실험 결과는 이 approach가 다양한 document understanding tasks에서 performance를 향상시켜 visual 및 linguistic content를 효과적으로 fusing함으로써 이전 connector methods보다 우수한 성능을 보임을 보여줍니다. 주요 contributions는 다음과 같이 요약됩니다.

  • vision 및 text modalities 간의 representation gap을 해소하기 위한 새로운 connector인 ALIGN을 제안합니다.
  • ALIGN을 활용하여 multimodal document understanding tasks에서 state-of-the-art performance를 달성하는 Vision-Language Models, ALIGNVLM family를 소개합니다.
  • 1B에서 8B parameters에 이르는 다양한 model sizes에서 ALIGN의 robustness와 effectiveness를 입증하는 광범위한 experiments를 수행합니다.

Code와 models는 승인 시 공개될 예정입니다.

 

 

1. Introduction 정리 노트 (AI 연구자 대상)

Problem:

  • 기존 Vision-Language Models (VLMs)에서 visual features를 LLM의 embedding space로 매핑하는 데 어려움이 있음.
  • Shallow fusion 방법 (MLP, Perceiver Resampler)은 computational 효율성은 좋지만, projected embeddings이 LLM이 이해할 수 있는 영역 밖에 존재(Out-of-Distribution, OOD)하여 misalignment 및 성능 저하를 유발할 수 있음.
  • Ovis와 같은 최신 기법은 별도의 visual embeddings를 사용하지만, parameter 수가 크게 증가하고 LLM과의 alignment를 보장하지 못함.

Proposed Solution (ALIGNVLM):

  • 핵심 아이디어: Visual features를 LLM embedding space로 직접 projection하는 대신, pre-trained vocabulary embeddings의 probability distributions로 매핑하고, 이를 weighted representation으로 결합.
  • ALIGN Connector: Visual features를 LLM text embeddings의 convex combination으로 제한하여, linguistic priors 활용 및 OOD 문제 완화.
  • 장점: Modalities 간 alignment 향상, noisy/OOD inputs 감소, 다양한 document understanding tasks에서 성능 향상.

Contributions:

  1. Representation gap을 해소하는 새로운 connector, ALIGN 제안.
  2. ALIGN을 활용하여 multimodal document understanding에서 SOTA 성능을 달성하는 ALIGNVLM 모델군 소개.
  3. 다양한 model size (1B~8B)에서 ALIGN의 robustness와 effectiveness 입증.

Key Takeaway:

ALIGNVLM은 visual features를 LLM text embeddings의 weighted average로 mapping하는 새로운 connector (ALIGN)를 통해, 기존 VLM의 alignment 문제를 해결하고 document understanding tasks에서 성능을 향상시킨 framework.


쉬운 설명:

VLM은 이미지와 텍스트를 함께 이해하는 AI 모델이에요. 그런데 이미지 정보를 텍스트를 이해하는 LLM에게 전달하는 과정이 어려워요. 기존 방법들은 이미지 정보를 LLM이 이해하기 어려운 형태로 전달(OOD)해서 성능이 떨어지는 문제가 있었죠.

ALIGNVLM은 이 문제를 해결하기 위해 새로운 연결 방식(ALIGN)을 사용해요. 이미지 정보를 억지로 LLM 공간에 욱여넣는 대신, LLM이 이미 알고 있는 단어들의 조합으로 표현하는 거죠. 예를 들어, "고양이" 이미지 정보를 "고양이", "귀여운", "동물" 같은 단어들의 조합으로 나타내는 거예요. 이렇게 하면 LLM이 이미지 정보를 더 잘 이해할 수 있고, 결과적으로 전체 모델의 성능이 좋아지는 거죠!

 

 

 

2. Related Work

더보기

2.1. Vision-Language Models

지난 몇 년 동안, Vision-Language Models (VLMs)는 Large Language Models (LLMs)의 발전에 힘입어 놀라운 발전을 이루었습니다. 초기에는 텍스트 understanding 및 generation에서 획기적인 발전을 보여주었으며, 이제 LLM은 visual inputs를 효과적으로 해석하는 데 점점 더 많이 사용되고 있습니다. 이러한 발전은 form reading, document question answering, chart question answering과 같은 tasks를 위한 multimodal document understanding과 같은 다양한 domains에서 real-world applications을 가능하게 했습니다. VLMs는 일반적으로 세 가지 component architecture를 채택합니다.

  • Pretrained vision encoder
  • LLM
  • Connector module

VLM의 핵심 과제는 정확하고 의미 있는 multimodal interpretation을 가능하게 하기 위해 visual features를 LLM의 semantic space와 효과적으로 정렬하는 것입니다.

2.2. Vision-Language Alignment for Multimodal Models

기존 vision-language alignment approaches는 deep fusion과 shallow fusion으로 분류할 수 있습니다. Deep fusion methods는 LLM의 architecture를 수정하고 cross-attention 및 feed-forward layers를 추가하여 visual 및 textual features를 통합합니다. 예를 들어, Flamingo는 Perceiver Resampler를 사용하여 fixed latent embeddings를 사용하여 vision features에 attend하고 gated cross-attention layers를 통해 LLM에 fuse합니다. 유사하게, NVLM은 cross-gated attention을 채택하면서 Perceiver Resampler를 더 간단한 MLP로 대체합니다. CogVLM은 LLM의 모든 layer 내에서 vision modality에 대한 새로운 feed-forward (FFN) 및 QKV layers를 통합하여 이 approach를 확장합니다. 이러한 methods는 cross-modal alignment를 개선하지만 parameter counts와 computational overhead를 크게 증가시켜 효율성을 떨어뜨립니다.

반면에, shallow fusion methods는 LLM의 architecture를 변경하지 않고 visual features를 LLM의 embedding space로 매핑하여 computational 효율성이 더 높습니다. 이러한 methods는 세 가지 주요 유형으로 분류할 수 있습니다.

(1) MLP-based mapping: LLaVA 및 PaliGemma와 같이 multilayer perceptrons (MLP)를 사용하여 visual features를 projection하지만 제약 조건 부족으로 인해 misaligned 또는 noisy features를 생성하는 경우가 많습니다.

(2) Cross-attention mechanisms: BLIP-2는 Q-Former를 사용하는데, 이는 fixed set of latent embeddings를 사용하여 visual features에 cross-attend하지만 여전히 noisy 또는 OOD visual features를 생성할 수 있습니다.

(3) Visual embeddings: Ovis에 의해 도입된 것과 같이 vision encoder의 outputs에 의해 indexed된 embeddings를 사용하여 visual inputs를 생성합니다. 이것은 feature mapping을 regularize하지만 상당한 parameter overhead를 추가하고 새로운 vision embedding space를 생성하여 LLM의 text embedding space와의 misalignment 위험이 있습니다.

Fuyu-8B 및 EVE와 같은 Encoder-free VLMs는 전용 vision encoders를 제거하지만 성능이 저하되는 것으로 나타났습니다.

이와 대조적으로, ALIGNVLM은 vision encoder의 visual features를 LLM의 text embeddings에 대한 probability distributions로 매핑하여 convex combination을 계산하는 데 사용합니다. ALIGNVLM은 LLM의 vocabulary에 encoding된 linguistic priors를 활용하여 visual features가 text embeddings의 convex hull 내에 유지되도록 하여 noisy 또는 out-of-distribution inputs를 완화하고 특히 multimodal document understanding과 같이 joint modalities representation이 필요한 tasks에 대한 alignment를 향상시킵니다.

 

 

2. Related Work 정리 노트 (AI 연구자 대상)

Context: Vision-Language Models (VLMs) 발전과 Alignment 문제

  • LLM의 발전으로 VLMs도 함께 발전, multimodal document understanding 등 다양한 분야에 활용.
  • VLM의 핵심 과제: visual features와 LLM의 semantic space를 잘 정렬(align)하는 것.

Existing Approaches: Deep Fusion vs. Shallow Fusion

  • Deep Fusion:
    • LLM architecture 변경 (cross-attention, feed-forward layers 추가).
    • 예시: Flamingo, NVLM, CogVLM
    • 장점: Cross-modal interaction 강화.
    • 단점: Parameter 수, computational overhead 증가.
  • Shallow Fusion:
    • LLM architecture 변경 없이 visual features를 embedding space로 매핑.
    • 유형:
      1. MLP-based: LLaVA, PaliGemma (misalignment, noisy features 발생 가능).
      2. Cross-attention: BLIP-2 (noisy/OOD features 발생 가능).
      3. Visual Embeddings: Ovis (parameter overhead 증가, LLM과의 misalignment 위험).
    • 장점: Deep fusion보다 computationally 효율적.
    • 단점: Alignment 보장 어려움.
  • Encoder-free VLMs: Fuyu-8B, EVE (성능 저하).

ALIGNVLM's Position:

  • Shallow fusion의 일종이지만, 기존 shallow fusion의 단점 (OOD, misalignment)을 해결하는 새로운 approach.
  • Visual features를 LLM text embeddings의 probability distributions (convex combination)로 매핑.
  • Linguistic prior 활용, alignment 향상.
  • Document understanding처럼 joint representation이 필요한 경우에 ALIGNVLM가 특히 더 효과적

Key Takeaway:

기존 VLM alignment 방법들 (deep/shallow fusion)의 장단점을 분석하고, ALIGNVLM이 shallow fusion의 장점을 유지하면서 단점을 보완하는 새로운 approach임을 강조.


쉬운 설명:

이미지와 텍스트를 모두 이해하는 AI 모델 (VLM)을 만들 때, 이미지 정보(visual features)를 텍스트를 담당하는 LLM에게 잘 전달하는 것이 중요해요.

기존 방법은 크게 두 가지가 있었어요:

  1. Deep Fusion: LLM 자체를 뜯어고쳐서 이미지 정보를 더 잘 받아들이게 하는 방법. (성능은 좋지만, 모델이 너무 무거워짐)
  2. Shallow Fusion: LLM은 그대로 두고, 이미지 정보를 LLM이 이해할 수 있는 형태로 바꿔서 전달하는 방법. (가볍지만, 이미지 정보가 LLM에게 엉뚱하게 전달될 수 있음)

ALIGNVLM은 shallow fusion 방식인데, 기존 shallow fusion의 문제점을 해결했어요. 이미지 정보를 LLM이 이미 알고 있는 단어들의 조합으로 표현해서 전달함으로써, LLM이 이미지 정보를 더 정확하게 이해하도록 돕는 거죠!

 

3. Methodology

더보기

3.1. Model Architecture

Figure 2에 표시된 전체 model architecture는 다음 세 가지 주요 components로 구성됩니다.

(1) Vision Encoder. 서로 다른 aspect ratios의 high-resolution images를 처리하기 위해, 각 input image를 predefined aspect ratios (예 : 1:1, 1:2, ..., 9:1) 중 하나에 따라 여러 tiles로 나눕니다. 이 비율은 coverage ratio를 통해 선택됩니다. 제한된 computational resources로 인해 최대 tile 수를 9로 설정합니다. 각 tile은 14x14 patches로 더 분할되고, vectors로 projection된 다음, SigLip-400M vision encoder에 의해 processed되어 contextual visual features를 추출합니다.

각 tile t ∈ {1, · · · , T}는 Nt개의 patches Pt = {pt,1, · · · , pt,Nt }로 나뉩니다. 여기서 pt,i는 tile t의 i번째 patch입니다. vision encoder는 이러한 patches를 visual feature vectors 집합 Ft = VisionEncoder(Pt), Ft = {ft,1, · · · ,ft,Nt }, ft,i ∈ R^d로 매핑합니다.

마지막으로, 모든 tiles에 대한 feature sets를 단일 output F = concat(F1, F2, · · · , FT)로 concatenate합니다.

(2) ALIGN Module. 이 module은 visual features를 LLM과 정렬합니다. linear layer W1 ∈ R^(D×d)는 먼저 visual features F ∈ R^(T·Nt×d)를 LLM의 token embedding space로 projection합니다. (token 당 하나의 R^D vector). 두 번째 linear layer W2 ∈ R^(V×D) (LLM의 language-model head에서 initialized됨)와 softmax가 뒤따라 LLM의 vocabulary (V tokens)에 대한 probability simplex Pvocab을 생성합니다.

Pvocab = softmax(LayerNorm(W2 LayerNorm(W1F))) (1)

그런 다음 LLM text embeddings Etext ∈ R^(V×D)를 사용하여 weighted sum을 계산합니다.

F'_align = Pvocab^⊤ Etext (2)

마지막으로, F'_align을 tokenized text embeddings와 concatenate하여 LLM input Hinput을 형성합니다.

Hinput = concat(F'_align, Etext(x))

여기서 Etext(x)는 input text x = (x1, · · · , xM)을 tokenizing하고 Etext에서 해당 embeddings를 선택하여 얻습니다.

Etext(x) = (Etext(x1), · · · , Etext(xM)) (3)

(3) Large Language Model. Concatenated vision 및 text vectors, Hinput을 LLM에 공급하면 LLM은 output text를 auto-regressively 생성합니다. 우리 alignment technique의 effectiveness를 입증하기 위해 Llama 3.1 model family를 사용하여 실험합니다. 이 models는 state-of-the-art performance와 permissive licenses를 제공하므로 commercial applications에 적합합니다. 특히 Llama 3.2-1B, Llama 3.2-3B 및 Llama 3.1-8B를 활용합니다.

3.2. Motivation and relation with existing methods

F'_align의 각 R^D representation은 by construction, Etext points의 convex hull로 제한되므로, LLM이 효과적으로 해석할 수 있는 latent space 부분에 visual features가 집중됩니다. 또한, W2를 language model head로 initialization하는 것은 이러한 text tokens의 semantics 일부를 visual tokens로 recycling하는 inductive bias라고 주장합니다. 이는 vision encoder outputs F ∈ R^(T·Nt×d)를 LLM에 공급될 F' ∈ R^(T·Nt×D)로 adapt하기 위해 제안된 과거 methods와 대조됩니다. 여기서 우리는 이러한 대조를 강조하면서 두 가지 examples를 더 자세히 고려합니다.

(1) MLP Connector는 parameters WMLP ∈ R^(D×d) 및 bMLP ∈ R^D를 사용하는 linear projection과 activation function σ (예 : ReLU)를 적용합니다.

F'_MLP = σ(WMLPF + bMLP)

이러한 parameters는 모두 scratch부터 학습되며 text embeddings에 정렬하기 위한 특별한 bias는 없습니다.

(2) Visual Embedding Table은 완전히 새로운 visual embeddings 집합 EVET ∈ R^(K×D)를 도입합니다. 이는 weights WVET ∈ R^(K×d)와 함께 다음을 지정합니다.

F'_VET = softmax(WVET^T F)^⊤ EVET

D < d일 때, W2W1은 WVET의 low-rank version에 해당합니다. 따라서 F'_VET를 얻기 위해서는 학습할 것이 훨씬 더 많고, text embeddings와 정렬하기 위한 명시적인 압력은 없습니다.

3.3. Training Datasets & Stages

모델을 세 단계로 훈련합니다.

Stage 1. 이 단계에서는 ALIGN Module을 훈련하여 visual features를 LLM의 text embeddings에 효과적으로 매핑하는 데 중점을 둡니다. VLM pretraining에 일반적으로 사용되는 대규모 web dataset인 CC-12M dataset을 사용합니다. 이 dataset에는 12M image-text pairs가 포함되어 있습니다. 그러나 broken 또는 unavailable links로 인해 8.1M pairs를 검색했습니다. 이 dataset은 visual features를 LLM의 text embedding space와 정렬하는 데 도움이 됩니다. 이 단계에서는 전체 모델을 훈련합니다. 이 approach는 performance를 개선하고 ALIGN Module의 training을 안정화합니다.

Stage 2. 목표는 OCR, document structure comprehension, in-depth reasoning 및 instruction-following과 같은 model의 document understanding capabilities를 향상시키는 것입니다. multimodal document understanding을 위해 설계된 curated collection of license-permissive datasets인 BigDocs-7.5M dataset을 활용합니다. 이 dataset은 Accountability, Responsibility, and Transparency (ART) principles를 준수하여 commercial applications에 대한 compliance를 보장합니다. Stage 1과 마찬가지로 이 단계에서도 전체 모델을 훈련합니다.

Stage 3. 특히 question answering과 같은 downstream tasks를 위해 model의 instruction-tuning capabilities를 향상시키기 위해 DocDownstream instruction tuning dataset에서 추가로 훈련합니다. 이 단계에서는 vision encoder가 frozen되고 LLM 및 ALIGN module에만 training이 집중됩니다.

 

 

 

 

 

 

Figure 2: ALIGNVLM Model Architecture.

Vision encoder는 image features를 추출하고, 이는 processed되어 LLM embeddings에 대한 probabilities를 생성합니다. weighted average는 이러한 probabilities를 embeddings와 결합하여 vision input vectors를 생성합니다. Text inputs는 tokenized되고, 해당 embeddings는 embedding matrix에서 선택되며, 이는 LLM에 대한 input으로 사용됩니다. Vision layers는 파란색, Text layers는 보라색으로 표시합니다.

 

 

 

 

 

 

3. Methodology 정리 노트 (AI 연구자 대상)

Model Architecture (핵심: ALIGN Module)

  1. Vision Encoder:
    • High-resolution 이미지를 다양한 aspect ratio에 따라 여러 tile로 분할.
    • 각 tile을 14x14 patches로 분할, SigLip-400M으로 visual features 추출.
    • Features를 concatenate하여 최종 visual representation F 생성.
  2. ALIGN Module (핵심):
    • Visual features F를 LLM의 token embedding space로 projection (linear layer W1).
    • LLM의 language-model head로 초기화된 linear layer W2와 softmax를 사용하여 vocabulary에 대한 probability distribution (Pvocab) 생성.
    • Pvocab과 LLM text embeddings (Etext)의 weighted sum으로 F'_align 계산.
    • F'_align을 tokenized text embeddings와 concatenate하여 LLM input (Hinput) 생성.
    • 핵심: Visual Feature을 LLM의 vocab에 대한 확률 분포로 나타낸 다음, Text Embedding의 가중치 조합으로 임베딩.
  3. Large Language Model:
    • Hinput을 받아 auto-regressively text 생성.
    • Llama 3.1 family (1B, 3B, 8B) 사용.

Motivation & Comparison (ALIGN의 차별점)

  • Convex Hull Constraint: F'_align의 representations를 Etext의 convex hull 내에 있도록 제한하여, LLM이 해석 가능한 영역에 visual features를 집중.
  • Inductive Bias: W2를 language model head로 초기화하여 text token semantics를 visual tokens에 재활용.
  • 기존 방법과의 비교:
    • MLP Connector: Alignment을 위한 bias 없음.
    • Visual Embedding Table: Parameter overhead 큼, LLM과의 alignment 보장 X.

Training Stages

  1. Stage 1 (CC-12M): ALIGN Module 훈련 (visual features를 LLM text embeddings에 매핑).
  2. Stage 2 (BigDocs-7.5M): Document understanding 능력 향상 (OCR, structure comprehension, reasoning 등).
  3. Stage 3 (DocDownstream): Instruction-tuning 능력 향상 (question answering 등), vision encoder는 freeze.

Key Takeaway:

ALIGNVLM은 visual features를 LLM text embeddings의 weighted average (convex combination)로 표현하는 ALIGN Module을 통해, 기존 VLM의 alignment 문제를 해결하고, 특히 document understanding에 강점을 가지도록 설계된 모델.


쉬운 설명:

ALIGNVLM 모델은 크게 세 부분으로 이루어져 있어요:

  1. Vision Encoder: 이미지를 잘게 쪼개서 각각의 특징(feature)을 뽑아내는 역할.
  2. ALIGN Module (핵심): 이미지 특징을 LLM이 이해할 수 있는 형태로 바꿔주는 역할.
    • 이미지 특징을 LLM이 아는 단어들의 조합(확률 분포)으로 표현해요.
    • 예를 들어, "고양이" 이미지를 "고양이", "귀여운", "동물" 같은 단어들의 조합으로 나타내는 거죠.
    • 이렇게 하면 LLM이 이미지 정보를 더 잘 이해할 수 있어요.
  3. Large Language Model (LLM): 이미지 정보와 텍스트 정보를 합쳐서 최종 결과(텍스트)를 만들어내는 역할.

ALIGN Module이 왜 중요할까요?

  • 기존 방법들은 이미지 정보를 LLM에게 억지로 전달하는 방식이라 LLM이 이해하기 어려웠어요.
  • ALIGN Module은 이미지 정보를 LLM이 이미 알고 있는 단어들의 조합으로 표현하기 때문에, LLM이 훨씬 더 잘 이해할 수 있어요.

훈련은 어떻게 하나요?

  1. 1단계: ALIGN Module이 이미지 정보를 LLM에게 잘 전달하도록 훈련.
  2. 2단계: 문서 이해 능력을 키우는 훈련 (OCR, 문서 구조 파악 등).
  3. 3단계: 질문에 답하는 능력 등 특정 작업을 잘하도록 훈련.

 

 

 

 

 

1. 이미지 임베딩 생성

2. 텍스트임베딩 생성

3. 이미지 임베딩을 처리할때 중간에 LM head를 이용해서 text 정보쪽으로 유도(?)

4. 그 후 soft max 적용 후 텍스트 임베딩과 가중 평균 합 사용 후 LLM에게 입력.