Papers › Learning Hierarchical Prompt with Structured Linguistic Knowledge for Vision-Language Models

Learning Hierarchical Prompt with Structured Linguistic Knowledge for Vision-Language Models

11 Dec 2023arXiv:2312.06323archive 2025-07-28

Yubin Wang, Xinyang Jiang, De Cheng, Dongsheng Li, Cairong Zhao

Prompt learning has become a prevalent strategy for adapting vision-language foundation models to downstream tasks. As large language models (LLMs) have emerged, recent studies have explored the use of category-related descriptions as input to enhance prompt effectiveness. Nevertheless, conventional descriptions fall short of structured information that effectively represents the interconnections among entities or attributes linked to a particular category. To address this limitation and prioritize harnessing structured knowledge, this paper advocates for leveraging LLMs to build a graph for each description to model the entities and attributes describing the category, as well as their correlations. Preexisting prompt tuning methods exhibit inadequacies in managing this structured knowledge. Consequently, we propose a novel approach called Hierarchical Prompt Tuning (HPT), which enables simultaneous modeling of both structured and conventional linguistic knowledge. Specifically, we introduce a relationship-guided attention module to capture pair-wise associations among entities and attributes for low-level prompt learning. In addition, by incorporating high-level and global-level prompts modeling overall semantics, the proposed hierarchical structure forges cross-level interlinks and empowers the model to handle more complex and long-term relationships. Extensive experiments demonstrate that our HPT shows strong effectiveness and generalizes much better than existing SOTA methods. Our code is available at https://github.com/Vill-Lab/2024-AAAI-HPT.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2312.06323")

Code

Syntology Ran 3 of 7 code samples harvested from 1 repository linked to this paper; 4 have no recorded run. Of those that ran: 3 ran · our draft was wrong.

By repository: official repository: 7 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

vill-lab/2024-aaai-hpt officialmentioned in papermentioned on GitHubpytorchMIT report
ThomasWangY/2024-AAAI-HPT mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

7 samples harvested; 3 ran; 0 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · our draft was wrong
4unverified

Licence: 0 of the 7 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from vill-lab/2024-aaai-hpt. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

basic_clean vill-lab/2024-aaai-hpt/clip/simple_tokenizer.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 98f385d847636a3e · report
get_pairs vill-lab/2024-aaai-hpt/clip/simple_tokenizer.py official repository ran · our draft was wrong MIT (permissive) · d919ae32e5e4e616 · report
whitespace_clean vill-lab/2024-aaai-hpt/clip/simple_tokenizer.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 9542161e9640b858 · report
build_model vill-lab/2024-aaai-hpt/clip/model.py official repository unverified MIT (permissive) · fc48e485e5a826d4 · report
load vill-lab/2024-aaai-hpt/clip/clip.py official repository unverified MIT (permissive) · fbf8c0143d9c48e3 · report
multi_head_attention_forward vill-lab/2024-aaai-hpt/clip/attention.py official repository unverified MIT (permissive) · 440f24d0f7a85c28 · report
softmax vill-lab/2024-aaai-hpt/clip/attention.py official repository unverified MIT (permissive) · b5d0d43936dc7a5c · report

Tasks

Prompt EngineeringPrompt Learning

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Prompt Engineering Caltech-101 HPT Harmonic mean 96.65 #5 of 14 Archive leaderboard report
Prompt Engineering DTD HPT Harmonic mean 72.16 #7 of 14 Archive leaderboard report
Prompt Engineering EuroSAT HPT Harmonic mean 84.82 #8 of 14 Archive leaderboard report
Prompt Engineering FGVC-Aircraft HPT Harmonic mean 40.28 #6 of 14 Archive leaderboard report
Prompt Engineering Food-101 HPT Harmonic mean 91.01 #11 of 13 Archive leaderboard report
Prompt Engineering ImageNet HPT Harmonic mean 74.17 #7 of 15 Archive leaderboard report
Prompt Engineering ImageNet V2 HPT Top-1 accuracy % 65.25 #2 of 8 Archive leaderboard report
Prompt Engineering ImageNet-A HPT Top-1 accuracy % 50.85 #6 of 9 Archive leaderboard report
Prompt Engineering ImageNet-R HPT Top-1 accuracy % 77.38 #6 of 9 Archive leaderboard report
Prompt Engineering ImageNet-S HPT Top-1 accuracy % 49.36 #4 of 9 Archive leaderboard report
Prompt Engineering Oxford 102 Flower HPT Harmonic mean 87.16 #2 of 14 Archive leaderboard report
Prompt Engineering Oxford-IIIT Pet Dataset HPT Harmonic mean 96.71 #5 of 14 Archive leaderboard report
Prompt Engineering SUN397 HPT Harmonic mean 80.88 #7 of 14 Archive leaderboard report
Prompt Engineering Stanford Cars HPT Harmonic mean 75.57 #9 of 14 Archive leaderboard report
Prompt Engineering UCF101 HPT Harmonic mean 83.16 #6 of 14 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections