SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · Wu_ProTeCt_Prompt_Tuning_for_Taxonomic_Open_Set_Classification_CVPR_2024_paper · CVPR · 2024

ProTeCt: Prompt Tuning for Taxonomic Open Set Classification

Chih-Hui Ho, Nuno Vasconcelos, Tz-Ying Wu

Code that ran

6 of 10 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 4 have no contract verdict; 2 failures of our instrument; 4 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/Wu_ProTeCt_Prompt_Tuning_for_Taxonomic_Open_Set_Classification_CVPR_2024_paper.json · badge: /api/ran/Wu_ProTeCt_Prompt_Tuning_for_Taxonomic_Open_Set_Classification_CVPR_2024_paper.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
gina9726/ProTeCt canonical (classifier label)
classifier basis: census
6 ran · 4 no recorded run
FunctionStatusWhere it lives
bin_accuracy Ran
ran on a synthesized input
gina9726/ProTeCt/metrics.py
code served (permissive licence) · get_code("5c74f3d4d8de1709")
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, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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)

# Create small binary classification output (batch_size=2, single output per sample)
output = torch.tensor([[0.8], [0.3]], dtype=torch.float32)

# Create corresponding binary targets (batch_size=2)
target = torch.tensor([[1], [0]], dtype=torch.long)

ARGS = {
    "output": output,
    "target": target,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
conv3x3 Ran
ran; our contract draft was wrong, not the code
gina9726/ProTeCt/models/resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
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 lixiaotong97/DSU, 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.

multilabel_accuracy Ran
ran on a synthesized input
gina9726/ProTeCt/metrics.py
code served (permissive licence) · get_code("19396769960257b8")
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, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

# multilabel_accuracy expects:
# - all_pred: array-like of predictions (binary/class labels)
# - all_label: array-like of ground truth labels
# Both should have shape (batch_size, num_labels) for multilabel classification

# The function converts inputs to arrays, compares them element-wise,
# multiplies by 1 to convert bool to int, takes product across labels (axis=1),
# then computes mean accuracy across instances.

# Create small test data: batch_size=2, num_labels=4
batch_size = 2
num_labels = 4

# Predictions: shape (2, 4) - binary predictions for each label
all_pred = np.array([
    [1, 0, 1, 0],
    [1, 1, 0, 1]
], dtype=int)

# Ground truth labels: shape (2, 4) - binary labels for each instance
all_label = np.array([
    [1, 0, 1, 0],
    [1, 1, 1, 0]
], dtype=int)

ARGS = {
    "all_pred": all_pred,
    "all_label": all_label
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
percls_accuracy Ran
ran on a synthesized input
gina9726/ProTeCt/metrics.py
code served (permissive licence) · get_code("14ccaddf12f0d88e")
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, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (3,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 numpy as np

# Create sample predictions and labels
# The function expects array-like objects of predictions and labels
# where predictions are class indices and labels are ground truth class indices

all_pred = np.array([0, 1, 0, 1, 2, 2, 1, 0])
all_label = np.array([0, 1, 0, 2, 2, 2, 1, 0])
num_class = 3

ARGS = {
    "all_pred": all_pred,
    "all_label": all_label,
    "num_class": num_class
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (3,) — shape (3,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
resnet10 Ran
ran on a synthesized input
gina9726/ProTeCt/models/resnet.py
code served (permissive licence) · get_code("443ac1f13d5be170")
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, through the batch API) and returned ResNet. 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
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'pretrained': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
resnet18 Ran
ran; our contract draft was wrong, not the code
gina9726/ProTeCt/models/resnet.py
code served (permissive licence) · get_code("68f6f193ddf345ff")
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, through the batch API) and returned ResNet. 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
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'pretrained': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
build_model Not yet run
unverified (harvested, no recorded run)
gina9726/ProTeCt/models/maple_model.py
code served (permissive licence) · get_code("48ac2bd4dcbfb717")
How it ran

no invocation recorded.

build_model Not yet run
unverified (harvested, no recorded run)
gina9726/ProTeCt/models/model.py
code served (permissive licence) · get_code("39e6b23b55f376ea")
How it ran

no invocation recorded.

load Not yet run
unverified (harvested, no recorded run)
gina9726/ProTeCt/models/maple_clip.py
code served (permissive licence) · get_code("fbf8c0143d9c48e3")
How it ran

no invocation recorded.

load Not yet run
unverified (harvested, no recorded run)
gina9726/ProTeCt/models/clip.py
code served (permissive licence) · get_code("412a341011ed7bc6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 0 the same month, 6 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
conv3x3 686 other papers
548 dated earlier, 28 later, 110 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
resnet18 89 other papers
72 dated earlier, 4 later, 13 same year, order not determinable
1705.09759 (2017-05)
CASENet: Deep Category-Aware Semantic Edge Detection
1801.07698 (2018-01)
ArcFace: Additive Angular Margin Loss for Deep Face Recognition
1803.00839 (2018-03)
Pose-Robust Face Recognition via Deep Residual Equivariant Mapping
and 86 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
build_model 53 other papers
17 dated earlier, 12 later, 24 same year, order not determinable
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2210.01115 (2022-10)
LASP: Text-to-Text Optimization for Language-Aware Soft Prompting of Vision & Language Models
2211.09552 (2022-11)
UniFormerV2: Spatiotemporal Learning by Arming Image ViTs with Video UniFormer
and 50 more not named here
build_model 30 other papers
9 dated earlier, 8 later, 13 same year, order not determinable
2210.03117 (2022-10)
MaPLe: Multi-modal Prompt Learning
2212.03640 (2022-12)
Fine-tuned CLIP Models are Efficient Video Learners
2304.04704 (2023-04)
Prompt Pre-Training with Twenty-Thousand Classes for Open-Vocabulary Visual Recognition
and 27 more not named here
load 23 other papers
8 dated earlier, 2 later, 12 same year, order not determinable, 1 undated
2208.05318 (2022-08)
Generative Action Description Prompts for Skeleton-based Action Recognition
2210.01115 (2022-10)
LASP: Text-to-Text Optimization for Language-Aware Soft Prompting of Vision & Language Models
2212.04501 (2022-12)
Learning Video Representations from Large Language Models
and 20 more not named here
bin_accuracy 1 other paper
1 dated earlier
2306.02240 (2023-06)
ProTeCt: Prompt Tuning for Taxonomic Open Set Classification
multilabel_accuracy 1 other paper
1 dated earlier
2306.02240 (2023-06)
ProTeCt: Prompt Tuning for Taxonomic Open Set Classification
percls_accuracy 1 other paper
1 dated earlier
2306.02240 (2023-06)
ProTeCt: Prompt Tuning for Taxonomic Open Set Classification
resnet10 1 other paper
1 dated earlier
2306.02240 (2023-06)
ProTeCt: Prompt Tuning for Taxonomic Open Set Classification

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

Visual-language foundation models, like CLIP, learn generalized representations that enable zero-shot open-set classification. Few-shot adaptation methods, based on prompt tuning, have been shown to further improve performance on downstream datasets. However, these methods do not fare well in the taxonomic open set (TOS) setting, where the classifier is asked to make prediction from label set across different levels of semantic granularity. Frequently, they infer incorrect labels at coarser taxonomic class levels, even when the inference at the leaf level (original class labels) is correct. To address this problem, we propose a prompt tuning technique that calibrates the hierarchical consistency of model predictions. A set of metrics of hierarchical consistency, the Hierarchical Consistent Accuracy (HCA) and the Mean Treecut Accuracy (MTA), are first proposed to evaluate TOS model performance. A new Prompt Tuning for Hierarchical Consistency (ProTeCt) technique is then proposed to calibrate classification across label set granularities. Results show that ProTeCt can be combined with existing prompt tuning methods to significantly improve TOS classification without degrading the leaf level classification performance. The code is available at https://github.com/gina9726/ProTeCt.

For agents

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

get_harvested_code_for_paper("Wu_ProTeCt_Prompt_Tuning_for_Taxonomic_Open_Set_Classification_CVPR_2024_paper")
get_code_for_paper("Wu_ProTeCt_Prompt_Tuning_for_Taxonomic_Open_Set_Classification_CVPR_2024_paper")
have("Wu_ProTeCt_Prompt_Tuning_for_Taxonomic_Open_Set_Classification_CVPR_2024_paper")

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

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

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

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

Connect an agent — have() is free.