This paper considers the semantic consistency of the latent space between the visual patch and linguistic label domains and introduces the conditional transport (CT) theory to bridge the acknowledged gap.
We find that by formulating the multi-label classification as a CT problem, we can exploit the interactions between the image and label efficiently by minimizing the bidirectional CT cost.
Specifically, after feeding the images and textual labels into the modality-specific encoders, we view each image as a mixture of patch embeddings and a mixture of label embeddings, which capture the local region features and the class prototypes, respectively.
CT is then employed to learn and align those two semantic sets by defining the forward and backward navigators
Importantly, the defined navigators in CT distance model the similarities between patches and labels, which provides an interpretable tool to visualize the learned prototypes.
Method
Now we present the details of our proposed PatchCT, which aligns visual Patch and textual label domains under CT - framework for multi-label image classification.
As shown in Fig. 2, PatchCT consists of four components, the visual P set, the textual label Q set, the adaptive layer, and the CT distance between P and Q,
P set over patch embeddings
보통 전통적인 CT 셋팅은 각 point를 동등하게 취급하는 경우가 많다. (e.g., θi는 N개의 지점에 대한 uniform distribution)
하지만 multi-label tasks에서는 few key patches만이 final prediction에 contribute하기 때문에 uniform distribution은 잘 맞지 않는다. 이에 PatchCT는 다음과 같이 sparse and label guided θi를 정의한다.
Ei ∈ Rd×N 및 L ∈ Rd×M은 각각 xi의 패치 임베딩 행렬 및 라벨 임베딩 행렬임.
yˆi는 normalized label vector로, oi는 label-aware representation of xi를 의미하며 ground-truth label과 가까운 semantics를 가지는 core patch를 선택하는 데 사용된다.
TopK(·, k)는 similarity score에 기반하여 상위 k개의 패치를 1로 마스크하고, 나머지 패치에 대해 0으로 만드는 sparsity operation이다.
이렇게 patch embedding matrix Ei와 그때의 weights θi가 있으면, PatchCT는 visual set에 대해 discrete distribution Pi를 얻게 된다.
Pi는 local patch에 대한 detailed visual features를 얻기 때문에 downstream multi-label task에 이점을 제공:
(2)의 θi는 Pi의 희소성을 보장하며, 이는 PatchCT의 계산 비용을 줄이고 PatchCT의 해석 가능성을 강화하는 데 유용하다.
Introduced label-aware selection strategy를 통해 Pi가 core patches에 더 집중하기 때문에 더욱 discriminative features를 만들 수 있음.
Q set over textual label embeddings
여기서는 A photo of {label} prompt를 써서 M개의 class에 해당하는 문장을 만든다.
Qi가 textual representation으로 ground-truth label features를 얻음을 의미한다.
BERT같은 pre-trained text encoder를 쓰게 되면 1) the textual semantics for each label, 2) the correlations
among labels, which help to improve the identification of label representations 를 캡쳐할 수 있다.
요약
PatchCT는 multiclass classification task를 Conditional Transport 문제로 간주하고, visual patch 및 text label 임베딩에 대해 2개의 discrete distribution Pi, Qi를 생성한다. 이 두 representation은 semantic consistency를 공유하지만 서로 다른 support를 갖는다.
PatchCT의 주요 아이디어 중 하나는 multi-class classfication을 위해 P와 Q의 bidirectional CT distance를 최소화하여 vision-text modality를 align 하는 것이다.
objective function
최종 objective function은 layer-wise CT distance의 합으 구성됨.
Layer-Wise CT distance
이미지 xi에 대해 두 discrete distribution Pi, Qi는 두 가지 다른 도메인에서의 semantic representation이다.
PatchCT는 Pi와 Qi의 CT 거리를 최소화하여 semantic gap을 극복한다. (두 모달리티 간 deep ineteractions를 만들고 더 잘 align 할 수 있음)
각 layer에서 CT distance를 greedy하게 최소화하는 Layer-wise CT distance를 통해 두 모달리티 간 deep interaction을 가능케 함.
여기서 l은 레이어의 인덱스이며, θ(l)i는 식 2에 의해 해당 레이어 l의 패치 임베딩 행렬 및 label-aware 임베딩을 대체하여 계산됩니다. 방정식 1의 cost matrix C(l)은 cosine distance로 계산됨.
Asymmetric loss
label 불균형 문제를 효과적으로 다루기 위해 ASL loss를 채택했다. (focal loss의 변형임)
최종 loss는 다음과 같이 구성됨
즉 첫번째 항은 두 도메인 별 인코더의 각 layer에 해당하는 vision-text 모달리티 간의 align을 수행하고, 두 번째 항은 multi-class classification에 대한 supervised information을 주는 부분이다.
Abstract
Method
Now we present the details of our proposed PatchCT, which aligns visual Patch and textual label domains under CT - framework for multi-label image classification. As shown in Fig. 2, PatchCT consists of four components, the visual P set, the textual label Q set, the adaptive layer, and the CT distance between P and Q,
P set over patch embeddings
보통 전통적인 CT 셋팅은 각 point를 동등하게 취급하는 경우가 많다. (e.g., θi는 N개의 지점에 대한 uniform distribution)
하지만 multi-label tasks에서는 few key patches만이 final prediction에 contribute하기 때문에 uniform distribution은 잘 맞지 않는다. 이에 PatchCT는 다음과 같이 sparse and label guided θi를 정의한다.![image](https://github.com/sy00n/DL_paper_review/assets/67910856/9aff528e-f3f3-45c7-b3cf-cd9aac50e489)
Ei ∈ Rd×N 및 L ∈ Rd×M은 각각 xi의 패치 임베딩 행렬 및 라벨 임베딩 행렬임.
yˆi는 normalized label vector로, oi는 label-aware representation of xi를 의미하며 ground-truth label과 가까운 semantics를 가지는 core patch를 선택하는 데 사용된다.
TopK(·, k)는 similarity score에 기반하여 상위 k개의 패치를 1로 마스크하고, 나머지 패치에 대해 0으로 만드는 sparsity operation이다.
이렇게 patch embedding matrix Ei와 그때의 weights θi가 있으면, PatchCT는 visual set에 대해 discrete distribution Pi를 얻게 된다.
Pi는 local patch에 대한 detailed visual features를 얻기 때문에 downstream multi-label task에 이점을 제공:
Q set over textual label embeddings
여기서는 A photo of {label} prompt를 써서 M개의 class에 해당하는 문장을 만든다.
Qi가 textual representation으로 ground-truth label features를 얻음을 의미한다.
BERT같은 pre-trained text encoder를 쓰게 되면 1) the textual semantics for each label, 2) the correlations
among labels, which help to improve the identification of label representations 를 캡쳐할 수 있다.
요약
PatchCT는 multiclass classification task를 Conditional Transport 문제로 간주하고, visual patch 및 text label 임베딩에 대해 2개의 discrete distribution Pi, Qi를 생성한다. 이 두 representation은 semantic consistency를 공유하지만 서로 다른 support를 갖는다. PatchCT의 주요 아이디어 중 하나는 multi-class classfication을 위해 P와 Q의 bidirectional CT distance를 최소화하여 vision-text modality를 align 하는 것이다.
objective function
Layer-Wise CT distance
Asymmetric loss