이 논문은 hierarchical OT(Optimal Transport)를 통해 multiple modality를 통합하고 token-level alignments를 수행하는 novel prompt tuning famework임
Prompt-level OT는 image, language domain에서 class의 diverse semantics를 학습하며, token-level OT는 토큰 임베딩 간의 fine-grained alignments를 수행
Few-shot classification, dataset transfer learning, domain generalization에서도 실험을 진행함
Abstract
이전 연구들은 주로 single mode(only one prompt for each modality), holistic level(image or sentence) semantic alignmnet에 초점을 두어서 sample diversity를 캡쳐하지 못하고 sub-optimal prompt discovery하는 결과를 보였다.
이러한 한계를 다루기 위해 본 논문에서는 multi-mode token-level tuning framework를 제안해서 optimal transportation을 사용해서 학습하고 modalities간에 prompt token을 align한다.
특히 아래 두 사실을 기반으로 함.
1) multi-mode prompts discovery, which guarantees diverse semantic representations.
2) token-level alignment, which helps explore fine-grained similarity.
Consequently, the similarity can be calculated as a hierarchical transportation problem between the modality-specific sets.
Introduction
PVLs(pre-trained vision language models)에 대한 optimal prompt를 찾는 것은 쉽지 않다. 일반적으로 textual/visual modality 간의 intricate semantic alignment가 필요하다.
TPT(textual)와 VPT(visual)를 결합하는 multi-modal prompt를 함께 학습하는 연구들이 있었음(MaPLe, Unified vision and language prompt learning).
하지만 이 연구들은 주로 single-mode prompt discovery에만 집중하고 있으며, 즉, 한 모달리티에 대해 하나의 prompt 만 사용하고 있으며 이는 하나의 클래스를 대표하기에 충분하지 않을 수 있다.
또 이미지와 레이블을 global features만으로 표현하는 것은 target object의 local region features를 상실할 수 있기 때문에 sub-obtimal classification 결과를 만들게 된다.
이를 위해 본 연구는 multi-modal multi-model prompt를 학습하기 위해 prompt 및 token-level optimal transport를 구축하는 comprehensive prompt tuning framework를 제안한다.
Modality-specific encoder에 multiple prompts를 피드시키고 나서 prompt-level OT는 각각의 이미지를 visual prompt space에서 discrete distribution P로, 각 레이블을 textual prompt space에서 discrete distribution Q로 모델링한다. 그렇게 되면 classification task는 P와 Q 사이의 거리를 측정하는 문제가 된다.
Global prompt-level features와 함께 patch(or token) embeddings는 target object에 대한 local region features를 캡쳐한다.
Method
직관적으로, 인간은 하나의 class에 대해 색, 레이아웃, 모양 등과 같은 sufficient semantic features와 같은 다양한 컨셉을 학습할 수 있다.
이로부터 영감을 받아서, 본 연구의 목표는 M개의 visual prompts와 N개의 textual prompts를 동시에 학습하는 것이다.
prompt-level OT는 각 이미지와 레이블에 대해 M-차원의 visual space -> discrete distributions P으로, N-차원의 textual space -> discrete distributions Q으로 모델링한다.
prompts output을 하나의 point로 표현하지 않고 (e.g., global features z and h) CLIP에서의 token-level knowledge를 distill한다.
Prompt-level Optimal Transport
M개 그룹의 visual prompts, N개 그룹의 textual prompts가 있으면, (여기서는 한 이미지에 대해 텍스트랑 이미지 프롬프트 개수가 각각 다를 수 있음) 두 empirical distribution P,Q로 모델링 할 수 있다.
eq 3d은 가중치를 uniform distribution으로 모델링함.
이로서 이미지와 레이블 간의 거리를 코사인 유사성을 사용하여 이미지와 레이블을 각각 single point으로 나타내고 거리를 측정하는 방식에서 벗어나 multi-mode features를 mine해서 class concepts를 얻는다. 이로써 더 나은 표현을 얻게 된다.
식 4는 P와 Q 간의 최적 운송 거리를 계산하는 함수이다. 즉, 이미지와 레이블 간 거리를 정의하는 방법이 entropy-regularized prompt-level OT 문제로 공식화된다. 여기서 OT는 두 분포 사이의 최적의 매칭을 찾는 문제임.
T는 m-th visual prompt로부터 n-th textual prompt로의 transposed probability를 측정한다. 따라서 식 4는 P와 Q 사이의 expected transport cost을 추정하며, 이는 곧 이미지와 라벨 간의 유사성을 계산하는 과정임.
Cost matrix C는 이미지와 텍스트 간 transport cost를 의미한다. 직관적으로 생각해보면 두 프롬프트 간 transport cost가 클수록 transport probability가 낮아질 것.
Token-level Optimal Transport
prompt-level representation만 고려하게 되면 detailed token-level features를 캡쳐하기에 한계가 있을 수 있다. (image내의 다양한 패치들이 다양한 local region features를 캡쳐할 수 있기 때문)
Token-level OT를 도입해서 이미지 아웃풋 x와 텍스트 아웃풋 y를 토큰 임베딩 공간에서 discrete distribution으로 모델링한다.
이미지 패치(x)와 텍스트 토큰(y) 사이의 총 Transport costs을 나타내며, Transport plan(ˆT)은 j번째 이미지 패치가 l번째 토큰 특성으로 얼마나 전송될 가능성이 있는지를 제공하여 token-level features를 align한다.
최종적으로 prompt와 token-level features를 함께 고려하는 combined cost matrix C_mn을 설계했는데, 앞 항은prompt-level features간 cosine distance, 뒤에 항은 token-level embedding 간 OT distance이다.
이미지에 대한 레이블 예측은 이전 연구처럼 수행하는데 Q_K는 클래스 레이블 K의 여러 text prompt를 포함하는 discrete uniform distribution으로 볼 수 있으며 분류 결과를 향상시킨다.
위와 같은 방식에 의해 Prompt-level OT에서 학습 transport plan T가 M visual and N textual features과의 fine-grained matching을 할 수 있어서 최종적으로 detaied allignments를 가능하게 하고 더 나은 representation을 얻을 수 있다.
제안된 ALIGN 모델은 모든 파라미터를 미분 가능한 Sinkhorn 알고리즘을 통해 최적화함으로써 end-to-end로 학습함.
Abstract
Consequently, the similarity can be calculated as a hierarchical transportation problem between the modality-specific sets.
Introduction
PVLs(pre-trained vision language models)에 대한 optimal prompt를 찾는 것은 쉽지 않다. 일반적으로 textual/visual modality 간의 intricate semantic alignment가 필요하다.
이를 위해 본 연구는 multi-modal multi-model prompt를 학습하기 위해 prompt 및 token-level optimal transport를 구축하는 comprehensive prompt tuning framework를 제안한다.
Modality-specific encoder에 multiple prompts를 피드시키고 나서 prompt-level OT는 각각의 이미지를 visual prompt space에서 discrete distribution P로, 각 레이블을 textual prompt space에서 discrete distribution Q로 모델링한다. 그렇게 되면 classification task는 P와 Q 사이의 거리를 측정하는 문제가 된다.
Global prompt-level features와 함께 patch(or token) embeddings는 target object에 대한 local region features를 캡쳐한다.
Method
Prompt-level Optimal Transport
M개 그룹의 visual prompts, N개 그룹의 textual prompts가 있으면, (여기서는 한 이미지에 대해 텍스트랑 이미지 프롬프트 개수가 각각 다를 수 있음) 두 empirical distribution P,Q로 모델링 할 수 있다.![image](https://github.com/sy00n/DL_paper_review/assets/67910856/f8200fb2-4dd7-418c-827c-f904bfba9dab)
Token-level Optimal Transport
Experiments