Image encoder의 representation
을 Large Language Model
의 input으로 사용하기 위해, Image encoder의 representation
을 align 하기 위한 연구 ( 부가적으로, Image encoder의 representation
자체를 language aware하게 학습하는 방법 자체도 contribution)Image Encoder
와 Large Language Model
이 있을 때, 이 둘을 그대로 살리면서 -> Vision-Language pretraining
을 수행하는 "Generic and efficient(계산 효율적, 학습 파라미터 수 엄청 줄임)"한 방법 제시Querying Transformer
(Q-former)을 도입하여 2단게로 학습하였는데 (백문이 불여일견, 아래 그림 3장을 보는게 전부다.)Image Encoder
로부터, text와 가장 관련있는 visual representation을 Q-former가 배우는 단계LLM
을 활용해서, Q-Former의 output visual representation
이, LLM이 해석가능 하도록 학습시키는 단계Querying Transformer
(Q-former) 로 극복함자연어 지시 명령 input을 따르는, image-to-text 생성
능력을 모델이 갖추게됨!Image Encoder
로부터, vision-language representation learning
을 수행LLM
을 활용해서, Vision-to-Language generative learning
을 수행Q-Former의 output visual representation
이, LLM이 해석가능 하도록 학습시키는 단계input 이미지 해상도에 상관없이, 이미지로부터 고정된 개수의 output features를 추출합니다.
Q-former은 2개의 transformer submodule로 구성됩니다. (같은 self attention layer을 공유합니다.)
우리는 Q-former을 로 초기화한 후, 학습시킵니다.
Image Encoder
로부터, vision-language representation learning
을 수행hard negative mining strategy
를 사용하여 -> informative negative pairs를 생성LLM
을 활용해서, Vision-to-Language generative learning
을 수행Q-Former의 output visual representation
이, LLM가 이해할 수 있는 형식으로 시각 정보를 요약/전달 하는 방식을 학습시키는 단계 (어떤 식으로 Query를 뽑아야 LLM이 쉽게 문장을 생성할 수 있는가?)Q-former이 생성한 query embeddings
를 input text embeddings 앞에 추가합니다.Q-former이 생성한 query embeddings
가 이미 언어와 관련된 이미지 특징을 잘 추출한 상태이기 때문에,“Recent LLMs can perform in-context learning given few-shot examples. However, our experiments with BLIP-2 do not observe an improved VQA performance when providing the LLM with in-context VQA examples.”
“We attribute the lack of in-context learning capability to our pre-training dataset, which only contains a single image-text pair per sample. The LLMs cannot learn from it the correlation among multiple image-text pairs in a single sequence.”
예시 간 연결성 파악
흐름(Sequence)을 통한 규칙 학습
연속 맥락(Context)
샘플 간 맥락이 단절
복수의 예시로부터 규칙 추론 불가
시퀀스 구조(Interleaving)
(가) 단일 샘플(현재 BLIP-2)
Input 시퀀스 #1: [이미지1 + 텍스트1]
(모델 처리 후 끝)
Input 시퀀스 #2: [이미지2 + 텍스트2]
(모델 처리 후 끝)
...
(나) Interleaved 샘플(이상적 In-context 구성)
Input 시퀀스:
[이미지1, 질문1, 답1, 이미지2, 질문2, 답2, ..., 이미지N, 질문N, 답N]
-> 한 번의 입력에서 여러 예시를 순서대로 접함
-> "아, 질문 형태와 답변 간 관계가 이런 식으로 바뀌는구나..." 등 패턴을 추론
“The same observation is also reported in the Flamingo paper, which uses a close-sourced interleaved image and text dataset (M3W) with multiple image-text pairs per sequence. We aim to create a similar dataset in future work.”
Flamingo 논문에서도 비슷한 문제 인지
다중 이미지-텍스트 쌍이 한 시퀀스에 들어있어야
in-context learning이 잘 이루어진다고 주장합니다. 향후 과제
여러 개의 이미지-텍스트 쌍을 한 시퀀스에 배치해
in-context learning을 제대로 지원하는 방향을 모색 중이라는 뜻입니다.