SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.04673 · 2022

Neural Prompt Search

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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; 2 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 5 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2206.04673.json · badge: /api/ran/2206.04673.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
ZhangYuanhan-AI/NOAH canonical (classifier label)
classifier basis not recorded on the link
8 ran · 1 no recorded run
FunctionStatusWhere it lives
build_transform Ran
ran; our contract draft was wrong, not the code
ZhangYuanhan-AI/NOAH/lib/datasets.py
code served (permissive licence) · get_code("4352f21759f08de9")
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 Compose. 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
from types import SimpleNamespace

torch.manual_seed(0)

class Args:
    def __init__(self):
        self.no_aug = False
        self.mode = 'train'
        self.input_size = 224
        self.color_jitter = 0.4
        self.aa = 'rand-m9-mstd0.5'
        self.train_interpolation = 'bicubic'
        self.reprob = 0.25
        self.remode = 'pixel'
        self.recount = 2
        self.direct_resize = False
        self.inception = False

args = Args()

ARGS = {
    'is_train': True,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
calc_dropout Ran
ran, honoured the contract we drafted
ZhangYuanhan-AI/NOAH/model/supernet_transformer_prompt.py
pointer only (licence: MIT); the stored copy get_code serves, from liangyn22/mcuformer, is pointer only (licence: NONE) · get_code("72a860a9aff50105")
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 liangyn22/mcuformer, 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.

checkpoint_filter_fn Ran
ran; our contract draft was wrong, not the code
ZhangYuanhan-AI/NOAH/model/supernet_vision_transformer_timm.py
code served (permissive licence) · get_code("6d8a1f8a0697180f")
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 dict. 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
import math

torch.manual_seed(0)

# Build a minimal model that checkpoint_filter_fn expects
class PatchEmbed(nn.Module):
    def __init__(self):
        super().__init__()
        # proj weight shape: (out_channels, in_channels, kernel_h, kernel_w)
        self.proj = nn.Conv2d(3, 16, kernel_size=4, stride=4)
        self.grid_size = [8, 8]  # 64x64 input -> 16x16 patches

class TinyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.patch_embed = PatchEmbed()
        # pos_embed shape: (1, num_patches + num_tokens, embed_dim)
        # 64 patches (8x8 grid) + 1 cls token = 65 tokens
        self.pos_embed = nn.Parameter(torch.randn(1, 65, 12))
        self.num_tokens = 1

model = TinyModel()

# Create a state_dict to pass to checkpoint_filter_fn
state_dict = {
    'model': {
        'patch_embed.proj.weight': torch.randn(16, 3, 4, 4),
        'pos_embed': torch.randn(1, 65, 12),
        'other_param': torch.randn(2, 3),
    }
}

ARGS = {
    'state_dict': state_dict,
    'model': model,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ZhangYuanhan-AI/NOAH/model/utils.py
code served (permissive licence) · get_code("39eace7e2822504f")
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 Tensor, ndim 4, dtype family float, shape (2, 4, 3, 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 torch

torch.manual_seed(0)

# Create a small tensor for testing
# Shape: (batch_size=2, channels=4, height=3, width=3) - 4D tensor
x = torch.randn(2, 4, 3, 3, dtype=torch.float32)

ARGS = {
    "x": x,
    "drop_prob": 0.5,
    "training": True,
}
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 Tensor, ndim 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 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
gelu Ran
ran, honoured the contract we drafted
ZhangYuanhan-AI/NOAH/model/supernet_transformer_prompt.py
pointer only (licence: MIT); the stored copy get_code serves, from liangyn22/mcuformer, is pointer only (licence: NONE) · get_code("08a5be1ffa0676e3")
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 liangyn22/mcuformer, 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.

resize_pos_embed Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ZhangYuanhan-AI/NOAH/model/supernet_vision_transformer_timm.py
code served (permissive licence) · get_code("191b2735955d18f4")
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 3, dtype family float, shape (1, 17, 4) 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
import math

torch.manual_seed(0)

# The function resizes positional embeddings from one shape to another
# posemb: original position embeddings tensor (batch_size, num_tokens, embedding_dim)
# posemb_new: target position embeddings tensor with desired shape
# num_tokens: number of special tokens (like cls token) to preserve
# gs_new: target grid size (height, width) for the spatial part

# Create small test tensors
embedding_dim = 4
num_special_tokens = 1
old_grid_size = 3  # 3x3 = 9 spatial tokens
old_total_tokens = num_special_tokens + (old_grid_size * old_grid_size)  # 1 + 9 = 10

# Original position embedding: (batch=1, num_tokens=10, embedding_dim=4)
posemb = torch.randn(1, old_total_tokens, embedding_dim)

# New position embedding target shape
new_grid_size = 4  # 4x4 = 16 spatial tokens
new_total_tokens = num_special_tokens + (new_grid_size * new_grid_size)  # 1 + 16 = 17
posemb_new = torch.randn(1, new_total_tokens, embedding_dim)

# Grid size for new embedding (4x4 spatial grid)
gs_new = [4, 4]

ARGS = {
    'posemb': posemb,
    'posemb_new': posemb_new,
    'num_tokens': num_special_tokens,
    'gs_new': gs_new,
}
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 3, dtype family float, shape (1, 17, 4) — shape (1, 17, 4) 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
sample_configs Ran
ran on a synthesized input
ZhangYuanhan-AI/NOAH/supernet_engine_prompt.py
code served (permissive licence) · get_code("3f3ae80f9a34d92b")
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 dict. 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 random

random.seed(0)

# The function uses 'choices' dict with the following keys accessed:
# - 'depth': int value
# - 'visual_prompt_depth': list of values to choose from
# - 'lora_depth': list of values to choose from
# - 'adapter_depth': list of values to choose from
# - 'prefix_depth': list of values to choose from
# - 'visual_prompt_dim': list of values to choose from
# - 'lora_dim': list of values to choose from
# - 'adapter_dim': list of values to choose from
# - 'prefix_dim': list of values to choose from
# - 'super_prompt_tuning_dim': int value
# - 'super_adapter_dim': int value
# - 'super_LoRA_dim': int value
# - 'super_prefix_dim': int value

choices = {
    'depth': 4,
    'visual_prompt_depth': [1, 2, 3],
    'lora_depth': [1, 2],
    'adapter_depth': [2, 3],
    'prefix_depth': [1, 2, 3, 4],
    'visual_prompt_dim': [8, 16, 32],
    'lora_dim': [4, 8],
    'adapter_dim': [16, 32],
    'prefix_dim': [4, 8, 16],
    'super_prompt_tuning_dim': 16,
    'super_adapter_dim': 32,
    'super_LoRA_dim': 8,
    'super_prefix_dim': 12,
}

ARGS = {
    'choices': choices,
    'is_visual_prompt_tuning': False,
    'is_adapter': False,
    'is_LoRA': False,
    'is_prefix': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
trunc_normal_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ZhangYuanhan-AI/NOAH/model/utils.py
code served (permissive licence) · get_code("02566da69866c48c")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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
import math

torch.manual_seed(0)

# Create a small tensor to be filled with truncated normal values
tensor = torch.empty(2, 4)

# Define arguments for trunc_normal_
ARGS = {
    'tensor': tensor,
    'mean': 0.0,
    'std': 1.0,
    'a': -2.0,
    'b': 2.0
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
build_dataset Not yet run
unverified (harvested, no recorded run)
ZhangYuanhan-AI/NOAH/lib/datasets.py
code served (permissive licence) · get_code("3d5d962b181c73fb")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 7 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 2 the same month, 7 later) and 2 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
drop_path 224 other papers
45 dated earlier, 5 the same month, 171 later, 2 same year, order not determinable, 1 undated · 38 only as an assembly brick
2003.12039 (2020-03)
RAFT: Recurrent All-Pairs Field Transforms for Optical Flow
2007.09384 (2020-07)
Multi-Scale Positive Sample Refinement for Few-Shot Object Detection
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
and 221 more not named here
trunc_normal_ 160 other papers
39 dated earlier, 1 the same month, 119 later, 1 same year, order not determinable · 36 only as an assembly brick
1911.10194 (2019-11)
Panoptic-DeepLab: A Simple, Strong, and Fast Baseline for Bottom-Up Panoptic Segmentation
2005.10242 (2020-05)
Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere
2007.12911 (2020-07)
Tighter risk certificates for neural networks
and 157 more not named here
checkpoint_filter_fn 37 other papers
6 dated earlier, 30 later, 1 same year, order not determinable · 1 only as an assembly brick
2105.12723 (2021-05)
Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understanding
2112.07658 (2021-12)
AdaViT: Adaptive Tokens for Efficient Vision Transformer
and 34 more not named here
resize_pos_embed 20 other papers
3 dated earlier, 16 later, 1 same year, order not determinable · 1 only as an assembly brick
2105.12723 (2021-05)
Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understanding
2202.07800 (2022-02)
Not All Patches are What You Need: Expediting Vision Transformers via Token Reorganizations
and 17 more not named here
calc_dropout 4 other papers
4 later · 1 only as an assembly brick
2304.14636 (2023-04)
PreNAS: Preferred One-Shot Learning Towards Efficient Neural Architecture Search
2310.16898 (2023-10)
MCUFormer: Deploying Vision Transformers on Microcontrollers with Limited Memory
2312.09059 (2023-12)
Auto-Prox: Training-Free Vision Transformer Architecture Search via Automatic Proxy Discovery
and 1 more not named here
gelu 4 other papers
4 later · 1 only as an assembly brick
2304.14636 (2023-04)
PreNAS: Preferred One-Shot Learning Towards Efficient Neural Architecture Search
2310.16898 (2023-10)
MCUFormer: Deploying Vision Transformers on Microcontrollers with Limited Memory
2312.09059 (2023-12)
Auto-Prox: Training-Free Vision Transformer Architecture Search via Automatic Proxy Discovery
and 1 more not named here
build_transform 1 other paper
1 later
2403.09192 (2024-03)
PYRA: Parallel Yielding Re-Activation for Training-Inference Efficient Task Adaptation

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

The size of vision models has grown exponentially over the last few years, especially after the emergence of Vision Transformer. This has motivated the development of parameter-efficient tuning methods, such as learning adapter layers or visual prompt tokens, which allow a tiny portion of model parameters to be trained whereas the vast majority obtained from pre-training are frozen. However, designing a proper tuning method is non-trivial: one might need to try out a lengthy list of design choices, not to mention that each downstream dataset often requires custom designs. In this paper, we view the existing parameter-efficient tuning methods as "prompt modules" and propose Neural prOmpt seArcH (NOAH), a novel approach that learns, for large vision models, the optimal design of prompt modules through a neural architecture search algorithm, specifically for each downstream dataset. By conducting extensive experiments on over 20 vision datasets, we demonstrate that NOAH (i) is superior to individual prompt modules, (ii) has a good few-shot learning ability, and (iii) is domain-generalizable. The code and models are available at https://github.com/Davidzhangyuanhan/NOAH.

For agents

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

get_harvested_code_for_paper("2206.04673")
get_code_for_paper("2206.04673")
have("2206.04673")

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

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

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

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

Connect an agent — have() is free.