SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · aaai_28387 · AAAI · 2024

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

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

Open in the Atlas

Code that ran

4 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 3 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/aaai_28387.json · badge: /api/ran/aaai_28387.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
Vill-Lab/2024-AAAI-HPT canonical (classifier label)
classifier basis: census
4 ran · 3 no recorded run
FunctionStatusWhere it lives
basic_clean Ran
ran; our contract draft was wrong, not the code
Vill-Lab/2024-AAAI-HPT/clip/simple_tokenizer.py
pointer only (licence: MIT); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("98f385d847636a3e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ltpwy/MSCI, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_pairs Ran
ran; our contract draft was wrong, not the code
Vill-Lab/2024-AAAI-HPT/clip/simple_tokenizer.py
code served (permissive licence) · get_code("d919ae32e5e4e616")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned set. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function get_pairs takes a word parameter
# A word is represented as a tuple of symbols (variable-length strings)
# The function iterates through the word and creates pairs of consecutive symbols

word = ("hello", "world", "test")

ARGS = {
    "word": word
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
softmax Ran
ran; our contract draft was wrong, not the code
Vill-Lab/2024-AAAI-HPT/clip/attention.py
pointer only (licence: MIT); the stored copy get_code serves, from Mengxiao-Tian/LAMP, is pointer only (licence: NONE) · get_code("b5d0d43936dc7a5c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Mengxiao-Tian/LAMP, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

whitespace_clean Ran
ran; our contract draft was wrong, not the code
Vill-Lab/2024-AAAI-HPT/clip/simple_tokenizer.py
pointer only (licence: MIT); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("9542161e9640b858")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ltpwy/MSCI, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

build_model Not yet run
unverified (harvested, no recorded run)
Vill-Lab/2024-AAAI-HPT/clip/model.py
pointer only (licence: MIT); the stored copy get_code serves, from Mengxiao-Tian/LAMP, is pointer only (licence: NONE) · get_code("fc48e485e5a826d4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Mengxiao-Tian/LAMP, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load Not yet run
unverified (harvested, no recorded run)
Vill-Lab/2024-AAAI-HPT/clip/clip.py
code served (permissive licence) · get_code("fbf8c0143d9c48e3")
How it ran

no invocation recorded.

multi_head_attention_forward Not yet run
unverified (harvested, no recorded run)
Vill-Lab/2024-AAAI-HPT/clip/attention.py
pointer only (licence: MIT); the stored copy get_code serves, from Mengxiao-Tian/LAMP, is pointer only (licence: NONE) · get_code("440f24d0f7a85c28")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Mengxiao-Tian/LAMP, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 7 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_pairs 258 other papers
108 dated earlier, 50 later, 99 same year, order not determinable, 1 undated · 4 only as an assembly brick
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
1803.01128 (2018-03)
Seq2Sick: Evaluating the Robustness of Sequence-to-Sequence Models with Adversarial Examples
1809.00125 (2018-09)
Simple Fusion: Return of the Language Model
and 255 more not named here
whitespace_clean 231 other papers
90 dated earlier, 45 later, 95 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 228 more not named here
basic_clean 218 other papers
90 dated earlier, 32 later, 95 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 215 more not named here
build_model 119 other papers
54 dated earlier, 18 later, 45 same year, order not determinable, 2 undated
1809.11096 (2018-09)
Large Scale GAN Training for High Fidelity Natural Image Synthesis
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2104.14294 (2021-04)
Emerging Properties in Self-Supervised Vision Transformers
and 116 more not named here
load 88 other papers
33 dated earlier, 17 later, 37 same year, order not determinable, 1 undated
2203.05557 (2022-03)
Conditional Prompt Learning for Vision-Language Models
2206.01986 (2022-06)
Delving into the Openness of CLIP
2207.12819 (2022-07)
S-Prompts Learning with Pre-trained Transformers: An Occam's Razor for Domain Incremental Learning
and 85 more not named here
multi_head_attention_forward 2 other papers
1 dated earlier, 1 later
2312.06323 (2023-12)
Learning Hierarchical Prompt with Structured Linguistic Knowledge for Vision-Language Models
2506.23502 (2025-06)
LLM-enhanced Action-aware Multi-modal Prompt Tuning for Image-Text Matching
softmax 2 other papers
1 dated earlier, 1 later
2312.06323 (2023-12)
Learning Hierarchical Prompt with Structured Linguistic Knowledge for Vision-Language Models
2506.23502 (2025-06)
LLM-enhanced Action-aware Multi-modal Prompt Tuning for Image-Text Matching

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

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

Abstract

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 globallevel 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.

For agents

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

get_harvested_code_for_paper("aaai_28387")
get_code_for_paper("aaai_28387")
have("aaai_28387")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/aaai_28387.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/aaai_28387.svg)](https://syntology.ai/paper/aaai_28387)

Connect an agent — have() is free.