Language Does Matter for Cross-Domain Few-Shot Visual Feature Enhancement 논문 리뷰

김준형·2026년 6월 28일

딥러닝 논문 리뷰

목록 보기
29/33

Abstract
Cross-domain few-shot image interpretation (CD-FSII)은 target domain의 제한된 labeled sample을 이용해 pre-trained visual feature model을 fine-tuning하는 방식으로 크게 발전해 왔다. 그러나 심각한 cross-domain distribution discrepancy와, 객체의 다양한 visual appearance variation과 제한된 annotation 사이의 본질적인 충돌로 인해, 기존의 순수 visual feature representation은 transfer가 어려운 shortcut pattern에 갇히게 된다. 그 결과 cross-domain generalization 능력이 저하된다. 이러한 문제를 완화하기 위해, 본 논문은 단순하지만 효과적인 cross-modal visual feature enhancement framework를 제안하며, 주요 기여는 다음 세 가지이다.

① 특정 target image adaptation을 위해, pre-trained visual feature model을 조절하는 데 image attribute의 linguistic description을 도입한다. 구체적으로, image-level attribute, 예를 들어 개별 이미지 내 객체의 appearance와 domain-level attribute, 예를 들어 dataset의 전반적인 style 및 background characteristic을 각각 pre-trained image captioning model과 large language model (LLM)을 사용하여 추출하고, 이를 통해 포괄적인 linguistic characterization을 구성한다.

② image attribute의 linguistic description을 visual feature representation에 자연스럽게 삽입하기 위해 lightweight residual cross-attention scheme을 개발한다. 이를 통해 cross-domain에서 transferable한 high-level semantic characteristic을 포착하는 데 있어 순수 visual cue만 사용하는 방식의 한계를 보완한다.

③ 제안하는 framework는 task-agnostic하며, off-the-shelf pre-trained visual feature model과 자연스럽게 통합될 수 있다. 또한 image classification, semantic segmentation, object detection을 포함한 여러 CD-FSII benchmark에서 기존 state-of-the-art method들보다 우수한 generalization performance를 보인다. 코드는 https://github.com/SivanXT/LDM-CDFSL 에 공개되어 있다.

Introduction
Cross-domain few-shot image interpretation은 제한된 annotated data와 뚜렷한 distribution divergence를 가지는 target domain에서 image classification, semantic segmentation, object detection과 같은 task를 모델이 수행할 수 있도록 하는 것을 목표로 한다. 최근 연구들은 target domain의 제한된 labeled sample을 사용하여 pre-trained visual feature model을 fine-tuning하는 데 초점을 맞추고 있다. 이러한 접근법은 source domain의 대규모 dataset으로 pre-training된 모델에 내재된 지식을 활용하며, 최소한의 supervision만으로도 새롭고 이전에 보지 못한 domain에 generalization할 수 있도록 한다.

그러나 color, texture, resolution과 같은 low-level image trait부터 object composition, visual style, background context와 같은 high-level semantic configuration에 이르기까지, 큰 domain discrepancy는 pre-trained visual feature model의 adaptability에 상당한 어려움을 준다. 이러한 모델들은 일반적으로 source-domain data에 최적화되어 있기 때문에, 새롭고 구조적으로 다른 target domain의 visual characteristic과 잘 정렬되지 못하는 경우가 많다. 또한 visual appearance의 큰 variation은 모델이 효과적으로 generalization하는 능력을 더욱 어렵게 만든다. labeled data가 부족한 few-shot scenario에서는 adaptation process가 더욱 제한되며, 모델의 semantic representation을 다시 조정하기에 충분한 guidance를 제공하지 못한다. 그 결과 모델은 제한된 support set 안에서는 contextually relevant하지만 unseen query data에는 generalization되지 않는 피상적인 visual correlation, 즉 “shortcut pattern”에 의존하는 경향을 보인다. 이러한 얕은 cue에 과도하게 의존하면 모델은 rigid하고 non-transferable한 feature space에 갇히게 되며, robust하고 domain-invariant한 representation을 학습하는 능력이 저해된다. 핵심적인 object property를 포착하는 semantically grounded feature와 달리, 이러한 shortcut pattern은 취약하고 context-dependent하며, domain 간 효과적인 generalization에 필수적인 high-level semantics를 transfer하지 못한다.

이 문제를 완화하기 위해, 본 논문은 세 가지 핵심 측면에서 기여하는 단순하지만 효과적인 cross-modal visual feature enhancement framework를 제안한다.

① pre-trained visual feature model이 특정 target domain에 adaptation되도록 guiding하기 위해 image attribute의 linguistic description을 통합하는 새로운 방법을 도입한다. 이는 image-level attribute, 예를 들어 개별 이미지 내 object appearance와 domain-level attribute, 예를 들어 dataset의 전반적인 style 및 background type을 모두 활용함으로써 이루어진다. 구체적으로, target-domain few-shot task의 각 이미지에 대해 pre-trained image-to-caption model을 사용하여 image-level attribute에 대한 상세한 description을 생성하고, 이를 통해 visual appearance에 대한 이해를 풍부하게 한다. domain-level attribute를 구성하기 위해서는 target domain에 대한 structured description을 ChatGPT에 제공하고, predefined template에 기반한 응답을 생성하도록 한다. 이렇게 생성된 text는 해당 domain의 전반적인 characteristic을 포착한다. 이후 image-level description과 domain-level description을 fusion한 뒤, frozen CLIP text encoder를 사용하여 encode함으로써 semantic representation을 추출한다.

② 이러한 linguistic description을 visual feature representation에 자연스럽게 embed하기 위해 lightweight residual cross-attention mechanism을 설계한다. 이 접근법은 domain 간 transferable한 high-level semantics를 포착하는 데 어려움을 겪는, 순수 visual cue에만 의존하는 방식의 한계를 보완한다. linguistic information을 통합함으로써 모델은 domain-specific semantic variation을 더 풍부하게 이해하게 되고, 결과적으로 새로운 target domain에 대한 generalization 능력이 향상된다.

③ 이 framework는 task-agnostic하기 때문에 off-the-shelf pre-trained visual feature model과 자연스럽게 통합될 수 있다. 이러한 범용성 덕분에 image classification, semantic segmentation, object detection을 포함한 다양한 visual task에 최소한의 수정만으로 적용할 수 있다. 또한 이 framework는 computationally efficient하며, training time과 learnable parameter 수를 아주 적게만 증가시킨다. 다양하고 challenging한 cross-domain few-shot benchmark에서의 광범위한 평가 결과, 본 방법은 현재의 state-of-the-art (SoTA) approach들을 일관되게 능가하며 classification, segmentation, detection task 전반에서 강한 generalization capability를 보임을 확인하였다. 또한 본 논문의 주장을 뒷받침하기 위해 extensive quantitative analysis와 qualitative analysis를 수행하였다.

본 연구의 contribution은 다음과 같이 요약된다.

① 특정 target image adaptation을 위해 pre-trained visual feature model을 조절하도록 image attribute의 linguistic description을 도입하는 새로운 cross-modal visual feature enhancement framework를 제안한다.

② image attribute의 linguistic description을 visual feature representation에 자연스럽게 embed하기 위한 단순하지만 효과적인 residual cross-attention scheme을 개발하며, 이를 통해 cross-domain transferable high-level semantic characteristic을 포착하는 데 있어 순수 visual cue의 한계를 보완한다.

③ 본 방법은 task-agnostic하고 plug-and-play 방식이며 efficient하고, 여러 benchmark에서 SoTA performance를 보인다.

Related Work
실제 환경에서 few-shot learner는 domain shift를 자주 마주하게 된다. 이때 well-labeled source-domain image는 데이터가 부족하고 annotation 비용이 큰 target domain과 상당히 다르다. 이를 해결하기 위해 최근 연구들은 제한된 support data를 활용한 task-specific fine-tuning에 집중해 왔다. 대표적인 접근으로는 task-specific classifier를 fine-tuning하는 방법, feature transformation layer를 adaptation하는 방법, support set 기반 adapter를 도입하는 방법 등이 있다. 또한 domain generalization을 보완하기 위한 방법들도 연구되었다. 예를 들어 domain-style bias를 제거하기 위한 adversarial training, fine-tuning을 안정화하기 위한 새로운 normalization strategy, overfitting을 줄이기 위한 효율적인 linear transformation, source-domain interference를 완화하기 위한 ViT class token의 random re-initialization 등이 있다. 최근에는 prompt-based fine-tuning도 큰 관심을 받고 있다. Zhuo et al.은 CLIP으로부터 semantic knowledge를 distillation하기 위해 visual prompt를 학습하는 방법을 제안했으며, Wu et al.은 adaptive feature modulation을 위해 support-set information을 learnable prompt에 통합하였다. 이러한 발전에도 불구하고, 기존 fine-tuning technique들은 주로 support set 내의 피상적인 appearance variation을 포착하는 제한된 visual cue에 의존하며, domain adaptation과 관련된 명시적인 semantic guidance가 부족하다. 이를 해결하기 위해, 본 논문은 domain adaptation 과정에서 pre-trained visual feature model을 더 잘 조절하기 위해 image attribute의 linguistic description을 활용하는 단순하지만 효과적인 cross-modal visual feature enhancement framework를 제안한다.

이전 연구들에서도 CD-FSII를 향상시키기 위해 textual modality knowledge를 활용하는 방식을 탐구해 왔지만, 이들은 주로 multimodal fusion을 통해 semantically enriched prototype을 구성하는 데 초점을 맞춘다. 예를 들어 Han et al.은 few-shot task의 class label을 textual description으로 간주하고, CLIP을 사용하여 class-level text prototype을 encoding한 뒤 이를 visual prototype과 fusion하였다. 마찬가지로 Shangguan et al. 은 robust class prototype을 구축하기 위해 text-visual fusion을 사용하였다. 이와 달리, 본 연구는 image attribute의 linguistic description을 visual feature representation 안에 embedding하는 데 초점을 맞춘다. 이를 통해 cross-domain에서 transferable한 high-level semantic characteristic을 포착하는 데 있어 순수 visual cue만 사용하는 방식의 한계를 보완한다.

Methodology

ⓐ Overview
본 연구는 cross-domain few-shot learning을 위한 단순하지만 효과적인 cross-modal visual feature enhancement framework를 제안한다. 이 framework에서는 image attribute에 대한 linguistic description을 활용하여 pre-trained visual feature model이 target domain에 adaptation되도록 guiding한다. 이 framework는 standard few-shot fine-tuning pipeline에 두 가지 새로운 module을 통합한다. 하나는 Attribute Generator (AG)이고, 다른 하나는 Feature Refiner (FR)이다. AG module은 각 이미지에 대해 두 가지 source로부터 semantic attribute를 추출한다. 첫 번째는 pre-trained image captioning model이 생성하는 image-level attribute, 예를 들어 object appearance이고, 두 번째는 large language model을 통해 얻는 domain-level attribute, 예를 들어 전체 style과 background characteristic이다. 이러한 attribute들은 결합되어 visual content에 대한 포괄적인 linguistic representation을 구성한다. FR module은 lightweight residual cross-attention mechanism을 사용하여 이러한 linguistic description을 visual feature representation에 자연스럽게 embed한다. 이를 통해 domain 간 transferable한 high-level semantics를 포착하는 데 있어 순수 visual cue만 사용하는 방식의 한계를 해결한다. 이후 refined feature는 task-specific prediction head, 예를 들어 classifier, segmenter, detector로 전달되며, prediction과 해당 ground-truth label 사이의 loss를 최소화하는 방식으로 model이 fine-tuning된다. inference 단계에서는 각 query image에 대해서도 support image와 동일한 방식으로 domain-prior knowledge를 구성하고, 이에 따라 visual feature를 refine한 뒤 task head에 입력하여 최종 prediction을 수행한다.

ⓑ Attribute Generator
제안하는 Attribute Generator는 few-shot task의 각 이미지에 대해 customized semantic attributes knowledge를 구성하는 것을 목표로 한다. 이는 서로 보완적인 두 요소, 즉 image-level attribute와 domain-level attribute로 구성된다. Target-domain few-shot task의 이미지가 주어지면, pre-trained image-to-caption model을 사용하여 해당 이미지의 image-level attribute를 생성한다. 이 attribute는 image content에 대한 detailed contextual description을 제공한다. 이러한 description은 task-relevant visual cue에 대한 모델의 집중을 강화함으로써 spurious correlation의 부정적인 영향을 완화하는 데 도움을 준다. 반면 domain-level attribute는 target domain 내 모든 이미지가 공유하는 intrinsic characteristic을 포착하며, high-level domain semantics를 표현하는 데 있어 순수 visual feature의 한계를 보완하는 domain-specific semantic knowledge를 제공한다. domain-level attribute를 구성하기 위해, target domain에 대한 structured description을 ChatGPT에 입력으로 제공하고, predefined template에 기반한 응답을 생성하도록 prompt한다. 마지막으로 두 수준의 attribute를 통합한 뒤, frozen CLIP text encoder를 사용해 encoding하여 해당 linguistic representation을 얻는다. 수식적으로, few-shot task TT의 이미지 XX에 대한 domain-prior knowledge는 flanguagef_{language}로 나타낸다.

ⓒ Feature Refiner
제안하는 Feature Refiner는 image attribute의 linguistic description을 visual feature representation에 자연스럽게 embed하기 위해 단순하지만 효과적인 residual cross-attention scheme을 개발한다. 이를 통해 cross-domain에서 transferable한 high-level semantic characteristic을 포착하는 데 있어 순수 visual cue의 한계를 보완할 수 있다. 구체적으로, few-shot task TT의 이미지 XX에 대해 먼저 source-domain pre-trained model FθF_{\theta}를 적용하여 visual feature를 추출한다. 이는 fvisionRh×w×dvf_{vision} \in \mathbb{R}^{h \times w \times d_v}로 표현되며, 여기서 h×wh \times w는 spatial dimension을, dvd_v는 feature dimension을 의미한다. 이 과정은 다음과 같이 표현된다.

fvision=Fθ(X)f_{vision} = F_{\theta}(X)

여기서 θ\theta는 source-domain pre-trained model FθF_{\theta}의 parameter를 의미한다. 동시에, 제안하는 Attribute Generator를 통해 해당 linguistic representation flanguagef_{language}를 얻으며, 여기서 flanguageR1×dpf_{language} \in \mathbb{R}^{1 \times d_p}이고, dpd_p는 그 feature dimension이다.

이후 image attribute의 linguistic description을 visual feature representation에 embed함으로써 visual feature를 refine한다. 구체적으로, fvisionf_{vision}flanguagef_{language}를 learnable projection matrix인 WqRdv×dkW_q \in \mathbb{R}^{d_v \times d_k}, WkRdp×dkW_k \in \mathbb{R}^{d_p \times d_k}, WvRdp×dkW_v \in \mathbb{R}^{d_p \times d_k}를 사용하여 dimension dkd_k를 갖는 shared latent space로 project한다. 이는 다음과 같다.

Q=fvisionWq, K=flanguageWk, V=flanguageWvQ = f_{vision}W_q,\ K = f_{language}W_k,\ V = f_{language}W_v

여기서 QRh×w×dkQ \in \mathbb{R}^{h \times w \times d_k}는 visual feature로부터 얻은 query vector를 의미하며, KR1×dkK \in \mathbb{R}^{1 \times d_k}VR1×dkV \in \mathbb{R}^{1 \times d_k}는 domain-language knowledge로부터 얻은 key vector와 value vector이다. 여기서 dkd_kQQ, KK, VV에 대한 multi-layer perceptron (MLP) output의 dimensionality를 의미한다. 그다음 QQKK의 scaled dot-product로 attention score ARh×w×1A \in \mathbb{R}^{h \times w \times 1}를 계산한다.

A=QKTdkA = \frac{QK^T}{\sqrt{d_k}}

여기서 dk\sqrt{d_k}는 fine-tuning 과정에서 gradient를 안정화하는 scaling factor이다. attention weight α\alphaAA에 Softmax function을 적용하여 얻는다.

α=Softmax(A)\alpha = \text{Softmax}(A)

마지막으로 value vector VV의 weighted sum을 계산하여 visual feature를 refine한다. 원래의 visual information을 보존하기 위해, learnable matrix WrRdv×dkW_r \in \mathbb{R}^{d_v \times d_k}를 통해 fvisionf_{vision}을 동일한 latent space로 project하고 residual connection을 도입한다.

frefined=αV+fvisionWrf_{refined} = \alpha V + f_{vision}W_r

refined feature frefinedRh×w×dkf_{refined} \in \mathbb{R}^{h \times w \times d_k}는 language knowledge와 visual feature를 효과적으로 통합한다. 이 mechanism은 domain 간 transferable한 high-level semantics를 포착하는 데 어려움을 겪는, visual cue에만 의존하는 방식의 한계를 보완한다. linguistic information을 통합함으로써, 모델은 domain-specific semantic variation을 더 잘 인식하고 일반화할 수 있게 된다.

ⓓ Few-shot Fine-tuning
본 논문은 support set TST_S를 사용하여 few-shot fine-tuning을 수행한다. 각 support image XSX_S에 대해, 먼저 제안하는 Attribute Generator를 사용하여 해당 linguistic representation을 얻는다. 이후 image attribute의 linguistic description을 visual feature에 embed함으로써 visual feature를 refine하며, 이를 통해 cross-domain에서 transferable한 high-level semantic characteristic을 포착하는 데 있어 순수 visual cue의 한계를 보완할 수 있다. 그다음 refined support feature는 prediction을 위해 task-specific head, 예를 들어 classifier, segmenter, detector에 입력된다. 마지막으로 predicted logit과 해당 ground truth label을 기반으로 loss를 계산하고, 이를 통해 모든 learnable parameter의 fine-tuning을 guiding한다. 이 계산 과정은 다음과 같이 형식적으로 표현된다.

L=XS,YSTSLoss(Gϕ(frefined),YS)L = \sum_{{X_S, Y_S} \in T_S}\text{Loss}(G_{\phi}(f_{refined}), Y_S)

여기서 GϕG_{\phi}는 task-specific head를 의미하며, ϕ\phi는 그 learnable parameter를 나타낸다. YSY_S는 support image XSX_S에 대한 ground truth를 의미하고, Loss()\text{Loss}(\cdot)는 cross-entropy 또는 mean squared error와 같은 task-specific loss를 의미한다.

ⓔ Query Inference
query image XQTQX_Q \in T_Q가 주어졌다고 하자. 여기서 TQT_Q는 few-shot task TT의 query set을 의미한다. 먼저 Attribute Generator를 적용하여 query image에 대응되는 linguistic representation을 얻는다. 이후 이 knowledge를 사용하여 XQX_Q의 visual feature를 refine하고, 이를 통해 cross-domain transferable high-level semantic information을 포착할 수 있도록 한다. refined query feature는 이후 prediction을 위해 task-specific head에 입력된다. 마지막으로 predicted score를 ground truth와 비교하여 few-shot task TT에서의 model performance를 평가한다. 특히, 전체 query set을 unsupervised manner로 활용하는 transductive inference와 달리, 본 방법은 각 query를 자기 자신의 semantic attribute만 사용해 독립적으로 refine하는 inductive inference를 수행하며, CD-FSL evaluation protocol을 엄격히 따른다.

ⓕ Theoretical Analysis
information bottleneck (IB) 관점에서, linguistic knowledge의 도입은 redundant information을 압축하는 것과 task-relevant semantics를 보존하는 것 사이의 trade-off를 최적화함으로써 cross-domain generalization을 향상시킨다. XX를 input image, ZZ를 intermediate representation, YY를 target label이라고 하자. IB는 mutual information I(X;Z)I(X;Z)를 최소화하는 동시에 I(Z;Y)I(Z;Y)를 최대화하는 것을 목표로 하며, 다음과 같이 정식화된다.

LIB=I(X;Z)βI(Z;Y)L_{IB} = I(X;Z) - \beta I(Z;Y)

여기서 β\beta는 이 trade-off의 균형을 조절한다.

본 framework에서 refined visual feature frefinedf_{refined}는 intermediate representation ZZ의 역할을 한다. Attention mechanism을 통해 linguistic knowledge flanguagef_{language}를 embed함으로써, frefinedf_{refined}XX 내의 shortcut visual cue에 대한 의존을 줄여 I(X;Z)I(X;Z)를 최소화한다. 동시에 ZZ에 domain-specific semantic knowledge를 풍부하게 추가하여 I(Z;Y)I(Z;Y)를 최대화하고, YY와 더 잘 align되도록 한다. I(X;Z)I(X;Z)의 감소는 intermediate representation의 entropy H(Z)H(Z)를 낮춤으로써 이루어진다. I(X;Z)=H(Z)H(ZX)I(X;Z) = H(Z) - H(Z|X)이고, ZZ는 일반적으로 XX의 deterministic function이므로 H(ZX)H(Z|X)는 보통 작다. 따라서 I(X;Z)I(X;Z)를 최소화하는 것은 주로 H(Z)H(Z)를 줄이는 것과 관련된다. 이러한 H(Z)H(Z)의 감소는 hypothesis space를 단순화하고, 더 낮은 Rademacher complexity와 더 tight한 generalization bound로 이어진다. 따라서 본 framework는 IB principle과 정렬됨으로써, ZZ가 task-relevant information은 유지하면서 redundant detail은 버리도록 한다. 결과적으로 cross-domain generalization performance가 향상된다. 이러한 theoretical insight는 extreme CD-FSL task에서 visual feature를 향상시키는 데 linguistic knowledge가 효과적임을 뒷받침한다.

Conclusion
본 연구는 few-shot scenario에서 pre-trained visual model의 cross-domain generalization을 향상시키기 위한 단순하지만 효과적인 cross-modal framework를 제안한다. image-level attribute와 domain-level attribute에 대한 linguistic description을 통합함으로써, 이 framework는 visual feature를 semantically meaningful하고 domain-relevant한 information으로 풍부하게 만들며, target task에 대한 adaptability를 향상시킨다. 본 방법은 다양한 benchmark 전반에서 강한 generalization 성능을 달성한다.

profile
김준형

0개의 댓글