Teng Wang1 2, Wenhao Jinag3, Zhichao Lu1, Feng Zheng1, Rang Cheng1, Chengguo Yin3, Ping Luo2
1Department of Computer Science and Engineering, Southern University of Science and Technology 2Department of Computer Science, The University of Hong Kong 3Data Platform, Tencent
Abstract
- 기존의 vision-and-language pre-training (VLP) 방법들은 paired image-text dataset 에 의존하지만, 그 것들은 가공이 어렵고 human labor 가 많이 필요하다.
- 이 논문은 Large-scale text-only corpora 와 image-only corpora 의 데이터로부터, cross-modal CutMix (CMC) 라는 augmentation 방법을 통해 unpaired data 로 학습하는 방법을 소개한다. 이 방법은 위의 그림처럼 자연어 문장 속의 visually-grounded words 를 이미지 패치로 바꾸어 multi-modal sentence 로 만드는 방법이다. CMC augmentation 방법을 통해 aligned pair 가 적은 data 의 scarcity 를 극복 가능하고, token-level 의 denoising 이 향상된다.
- 추가적으로, VLMIXer 라는 새로운 contrastive learning 방법을 소개한다.
Introduction
현재 많은 Vision-and-Language pre-training (VLP) 태스크들은 MSCOCO, Visual Genome 같은 manually-labeled and well-aligned dataset 들과 high-capacity transformer model 을 통해 학습된다. 이 transformer 의 학습에서, (1) global-level 에서는 pre-training loss 로 사용되는 image-text matching loss 를 통해 alignment 를 학습하고, (2) instance-level 에서는 self-attention layer 가 두 modality 의 input token 들의 fine-grained interaction 을 학습한다. 그러나 이러한 well-aligned dataset 에 대해 모델의 성능은 이미 saturated 되었고, 이보다는 weakly-aligned pair 를 학습하여 모델을 scale-up 하려는 시도가 존재해왔다. 한 Unsupervised VLP (U-Visual BERT) 에서는 stand-alone image and text corpus 로 multi-modal representation 을 학습한다.
그러나 기존 연구에서는 image-tag 를 두 modality 를 연결(bridge)하기 위한 intermediate representation 으로 활용하는데, 이는 complex image 에는 적절하지 않다는 점을 지적한다. 또 이러한 방법으로는 NLVR, image-text retrieval 같은 fine-grained alignment 에 의존하는 downstream task 에 취약하다는 단점이 있다.
이 연구에서는 cross-modal CutMix (CMC) 방법을 통해 “multi-modal sentence” 를 생성하여 이를 해결한다. 그림의 방법처럼 image patch gallary 로 부터 자연어 문장의 visual-grounded word 를 patch 로 바꾸어 multimodal transformer 의 input 으로 넣어주면, 기존의 mask-then-predict 방법으로 token-level alignment 학습이 가능하다. 또 추가적으로, 두 모달리티의 효과적인 instance-level alignment 를 위한 contrastive learning framework 를 제안한다. 이는 multimodal sentence 와 그에 해당하는 text sentence 를 같은 semantic correspondance 문장들로 생각하여 가깝게하고, 그렇지 않은 negative sample 들을 멀게한다. 이를 통해 instance-level image-text alingment 학습을 효과적으로 수행할 수 있다.
Related Works
기존의 방법들은 위의 그림에서 A.B.C 에 해당하는데, A.B 에 해당하는 Vision-and-Language 학습 방법은 image-text pair를 필요로 한다. 간단하게(Vinalla) multimodal input 을 다루는 A. 방법과 다르게 B. Oscar style 은 tag anchor를 활용한다. C. 의 U-Visual BERT 에서는 text 와 image pair 가 아닌 unpaired set 으로도 학습이 가능하다. 하지만, U-Visual BERT 는 텍스트에 해당하는 image-tag 만을 활용하기 때문에, visual region 과 linguistic cue 사이의 interaction 을 볼 수 없고, explicit 한 matching supervision(tag) 가 없을 경우 alignment 학습이 불가능하다는 단점이 있다고 지적한다. 논문에서 제안하는 VLMIxer 의 경우, patch tag 를 통해 첫 번째 문제점을 해결할 수 있고, contrastive loss 를 이용하여 tag 가 없는 두 번째 경우도 해결 가능하다.
VLMixer Pre-training
VLMIxer 는 두 가지 parallel pre-training branch 를 갖는데, 하나는 Visually-Aided Language Pre-training (VALP) 이고, 다른 하나는 Tag-Aided Visual Pre-training (TAVP) 이다. VALP 는 Cross-Modal Cutmix (CMC) 를 활용하고, TAVP는 image-only dataset 에서 image 만 주어질 때, image tag 를 text modality 로 하여 U-Visual BERT 와 같은 방법으로 학습을 진행한다.
Cross-Modal CutMix
Patch gallaery
image-only dataset 에서 off-the-shelf concept(patch) detector (ex. Faster RCNN) 를 활용하여 visual patch gallery 를 구성한다. w 는 concept label, c 는 confidence score 이다. 그리고 concept 주변의 “contextual concept” 을 추가적으로 저장한다. i-th concept 과 그에 해당하는 각 j-th contextual concept 들을 통해 다음 식과 같이 gallery 가 구성된다.
CutMix visual patches into sentence
CMC 의 각 word token 은 patcdh x_q with q ~ Norm({P_i}) 로 바뀐다. 식에서, G_i 는 i-th concept 의 “contextual concept” 들이고, 식을 해석하면, 자연어 문장의 워드 토큰에 대하여 diversity 를 위해 patch gallery 속의 concept 들을 그 각 주변의 contextual concept 을 고려한 확률을 부여한 뒤 normalize 하여 q 라는 확률을 부여한 뒤, q-distribution 에서 patch x_q 를 뽑는다 는 것이다. 이후, word token 이 x_q patch 로 바뀌는 것은 r_cmc 확률을 통해 결정된다.
K-shot CMC.
Divesity 를 위하여 r_cmc 확률을 통해 patch 로 바뀌는 과정을 K 번 반복하여 K 개의 concept 을 patch 활용한다. 따라서 최종적인 multimodal token 으로 이뤄진 문장은 아래와 같다.
Visually-Aided Language Pre-training (VALP)
Backbone 은 Vaswani Transformer 이며, Masekd Language Modeling (MLM) 과 cross-modal contrastive Loss (CMCL) 가 활용된다.
Masked language modeling (MLM).
MLM 의 방법은 기존의 BERT 와 유사하다. 15% 의 확률로 Mask 된다.
Cross-modal contrastive learning (CMCL).
Unpaired VLP 에서 contrastive loss 를 구성하기 위해, multimodal sentence S_M 과 그에 해당하는 바뀌기 전의 자연어 문장 T_M 에 대해 matching 되는 것을 positive sample, 그렇지 않은 것을 negative sample 로 하여 아래와 같이 contrastive loss 를 구성한다. f 는 [CLS] token 의 cosine similarity 이다.
Tag-Aided Visual Pre-training (TAVP)
TAVP 는 visual-only data 로 부터 multi-modal knowledge 를 추출하기 위해 활용된다. TAVP는 image-only dataset 에서 image 만 주어질 때, image-tag 를 text modality 로 하여 U-Visual BERT 와 같은 방법으로 학습을 진행한다. Oscar 와 같이 15% 확률을 통한 Mask-tehn-predict pre-training 을 통해 loss 를 구성한다.
최종적인 Loss 는 아래와 같다.
Experiments
Fair 한 비교를 위해 unpaired vision-and-language task 로의 진행을 위해 alignment information 없이 paired dataset 에 대해 성능 검증을 한다. Pre-training dataset 은 아래와 같다.
Comparison with State-of-the-Art Methods
Ablation Studies on pre-training objectives
Ablation of Cross-modal CutMix
Ablation study of the contrastive learning methods and data augmentations All models are pre-trained on COCO.
Downstream performance using different number of concepts in the patch gallery
Conclusion
*quoted from the paper
- We propose cross-modal CutMix to construct a multimodal representation to bridge the images and texts, guiding the model to learn cross-modal alignment at the token level.
- We propose cross-modal contrastive learning upon CMC to facilitate instance-level alignments between unpaired images and texts, where semantically similar instances are pulled closer and dissimilar instances are pushed away.
- Extensive experiments on diverse downstream tasks show that our approach achieves superior performance over previous unpaired VLP methods.