Adapting Vision-Language Models to Open Classes via Test-Time Prompt Tuning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Gao, Zhengqing, Ao, Xiang, Zhang, Xu-Yao, Liu, Cheng-Lin
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910581994291200
author Gao, Zhengqing
Ao, Xiang
Zhang, Xu-Yao
Liu, Cheng-Lin
author_facet Gao, Zhengqing
Ao, Xiang
Zhang, Xu-Yao
Liu, Cheng-Lin
contents Adapting pre-trained models to open classes is a challenging problem in machine learning. Vision-language models fully explore the knowledge of text modality, demonstrating strong zero-shot recognition performance, which is naturally suited for various open-set problems. More recently, some research focuses on fine-tuning such models to downstream tasks. Prompt tuning methods achieved huge improvements by learning context vectors on few-shot data. However, through the evaluation under open-set adaptation setting with the test data including new classes, we find that there exists a dilemma that learned prompts have worse generalization abilities than hand-crafted prompts. In this paper, we consider combining the advantages of both and come up with a test-time prompt tuning approach, which leverages the maximum concept matching (MCM) scores as dynamic weights to generate an input-conditioned prompt for each image during test. Through extensive experiments on 11 different datasets, we show that our proposed method outperforms all comparison methods on average considering both base and new classes. The code is available at https://github.com/gaozhengqing/TTPT
format Preprint
id arxiv_https___arxiv_org_abs_2408_16486
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Adapting Vision-Language Models to Open Classes via Test-Time Prompt Tuning
Gao, Zhengqing
Ao, Xiang
Zhang, Xu-Yao
Liu, Cheng-Lin
Computer Vision and Pattern Recognition
Adapting pre-trained models to open classes is a challenging problem in machine learning. Vision-language models fully explore the knowledge of text modality, demonstrating strong zero-shot recognition performance, which is naturally suited for various open-set problems. More recently, some research focuses on fine-tuning such models to downstream tasks. Prompt tuning methods achieved huge improvements by learning context vectors on few-shot data. However, through the evaluation under open-set adaptation setting with the test data including new classes, we find that there exists a dilemma that learned prompts have worse generalization abilities than hand-crafted prompts. In this paper, we consider combining the advantages of both and come up with a test-time prompt tuning approach, which leverages the maximum concept matching (MCM) scores as dynamic weights to generate an input-conditioned prompt for each image during test. Through extensive experiments on 11 different datasets, we show that our proposed method outperforms all comparison methods on average considering both base and new classes. The code is available at https://github.com/gaozhengqing/TTPT
title Adapting Vision-Language Models to Open Classes via Test-Time Prompt Tuning
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2408.16486