SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.01253 · ICLR · 2023

PLOT: PROMPT LEARNING WITH OPTIMAL TRANS-PORT FOR VISION-LANGUAGE MODELS

Kun Zhang, Yongming Rao, Xiangchen Song, Weiran Yao, Guangyi Chen, Xinyue Li

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 4 functions out of this paper's own repositories and ran 1 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
CHENGY12/PLOT canonical 1 of 4
FunctionStatusWhere it lives
Sinkhorn Ran CHENGY12/PLOT/plot-adapter/utils.py
code served (permissive licence) · get_code("9ba2e45e5b1df7f4")
build_model Not yet run CHENGY12/PLOT/plot-adapter/clip/model.py
code served (permissive licence) · get_code("3edbe74ea6fa20f4")
cls_acc Not yet run CHENGY12/PLOT/plot-adapter/utils.py
code served (permissive licence) · get_code("f2a0a5061e7c204e")
tip_plot Not yet run CHENGY12/PLOT/plot-adapter/utils.py
code served (permissive licence) · get_code("2e6576048297f5a4")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

With the increasing attention to large vision-language models such as CLIP, there has been a significant amount of effort dedicated to building efficient prompts. Unlike conventional methods of only learning one single prompt, we propose to learn multiple comprehensive prompts to describe diverse characteristics of categories such as intrinsic attributes or extrinsic contexts. However, directly matching each prompt to the same visual feature is problematic, as it pushes the prompts to converge to one point. To solve this problem, we propose to apply optimal transport to match the vision and text modalities. Specifically, we first model images and the categories with visual and textual feature sets. Then, we apply a two-stage optimization strategy to learn the prompts. In the inner loop, we optimize the optimal transport distance to align visual features and prompts by the Sinkhorn algorithm, while in the outer loop, we learn the prompts by this distance from the supervised data. Extensive experiments are conducted on the few-shot recognition task and the improvement demonstrates the superiority of our method. The code is available at https://github.com/CHENGY12/PLOT.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2210.01253")
get_code_for_paper("2210.01253")
have("2210.01253")

Connect an agent — have() is free.