SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.04796 · ICLR · 2025

Local-Prompt: Extensible Local Prompts for Few-Shot Out-of-Distribution Detection

Hongxin Wei, Fanhu Zeng, Zhen Cheng, Fei Zhu, Xu-Yao Zhang

arXiv · PDF · Open in the Atlas

Code that ran

11 of 13 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, 1 violated it and 0 have no contract verdict; 8 failures of our instrument; 2 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/2409.04796.json · badge: /api/ran/2409.04796.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
AuroraZengfh/Local-Prompt canonical (classifier label)
classifier basis: census
11 ran · 2 no recorded run
FunctionStatusWhere it lives
basic_clean Ran
ran; our contract draft was wrong, not the code
AuroraZengfh/Local-Prompt/clip_w_local/simple_tokenizer.py
pointer only (licence: NONE); 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: GitHub detected no licence in this paper's repository, AuroraZengfh/Local-Prompt 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.

fpr_and_fdr_at_recall Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AuroraZengfh/Local-Prompt/utils/detection_util.py
pointer only (licence: NONE); the stored copy get_code serves, from liujunzhuo/FineCops-Ref, is pointer only (licence: NONE) · get_code("3853ecdb6fc74451")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AuroraZengfh/Local-Prompt 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.

getAttMap Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AuroraZengfh/Local-Prompt/utils/grad_cam.py
pointer only (licence: NONE) · get_code("c28216e5027f12a2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AuroraZengfh/Local-Prompt 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_measures Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AuroraZengfh/Local-Prompt/utils/detection_util.py
pointer only (licence: NONE); the stored copy get_code serves, from tmlr-group/SCT, is pointer only (licence: NONE) · get_code("24570af601666d85")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AuroraZengfh/Local-Prompt 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
AuroraZengfh/Local-Prompt/clip_w_local/simple_tokenizer.py
pointer only (licence: NONE) · get_code("d919ae32e5e4e616")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AuroraZengfh/Local-Prompt 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.

load_image Ran
ran, honoured the contract we drafted
AuroraZengfh/Local-Prompt/utils/grad_cam.py
pointer only (licence: NONE) · get_code("7458439441af1cea")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AuroraZengfh/Local-Prompt 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.

normalize Ran
ran, violated the contract we drafted
AuroraZengfh/Local-Prompt/utils/grad_cam.py
pointer only (licence: NONE) · get_code("850654253698ad7e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AuroraZengfh/Local-Prompt 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.

set_ood_loader_ImageNet Ran
ran; our contract draft was wrong, not the code
AuroraZengfh/Local-Prompt/utils/train_eval_util.py
pointer only (licence: NONE) · get_code("fe4e39f3658c298b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AuroraZengfh/Local-Prompt 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.

set_val_loader Ran
ran; our contract draft was wrong, not the code
AuroraZengfh/Local-Prompt/utils/train_eval_util.py
pointer only (licence: NONE) · get_code("1549a4e42b6f3cb3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AuroraZengfh/Local-Prompt 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.

stable_cumsum Ran
ran, honoured the contract we drafted
AuroraZengfh/Local-Prompt/utils/detection_util.py
pointer only (licence: NONE); the stored copy get_code serves, from fanghenshaometeor/ood-kernel-pca-ext, is pointer only (licence: NONE) · get_code("d4acb3120a027622")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AuroraZengfh/Local-Prompt 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
AuroraZengfh/Local-Prompt/clip_w_local/simple_tokenizer.py
pointer only (licence: NONE); 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: GitHub detected no licence in this paper's repository, AuroraZengfh/Local-Prompt 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)
AuroraZengfh/Local-Prompt/clip_w_local/model.py
pointer only (licence: NONE); the stored copy get_code serves, from tmlr-group/SCT, is pointer only (licence: NONE) · get_code("dbbf313e1d3a69ba")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AuroraZengfh/Local-Prompt 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)
AuroraZengfh/Local-Prompt/clip_w_local/clip.py
pointer only (licence: NONE) · get_code("fbf8c0143d9c48e3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AuroraZengfh/Local-Prompt 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 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 8 the same month, 8 later) and 5 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
175 dated earlier, 4 the same month, 71 later, 7 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
154 dated earlier, 4 the same month, 65 later, 7 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
154 dated earlier, 4 the same month, 52 later, 7 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
83 dated earlier, 4 the same month, 25 later, 5 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
54 dated earlier, 3 the same month, 24 later, 6 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
stable_cumsum 29 other papers
21 dated earlier, 2 the same month, 6 later · 1 only as an assembly brick
1911.11132 (2019-11)
Scaling Out-of-Distribution Detection for Real-World Settings
2003.08440 (2020-03)
Synthesize then Compare: Detecting Failures and Anomalies for Semantic Segmentation
2104.08812 (2021-04)
Contrastive Out-of-Distribution Detection for Pretrained Transformers
and 26 more not named here
fpr_and_fdr_at_recall 5 other papers
3 dated earlier, 1 the same month, 1 later
2304.04521 (2023-04)
GL-MCM: Global and Local Maximum Concept Matching for Zero-Shot Out-of-Distribution Detection
2306.01293 (2023-06)
LoCoOp: Few-Shot Out-of-Distribution Detection via Prompt Learning
2306.03715 (2023-06)
Unleashing Mask: Explore the Intrinsic Out-of-Distribution Detection Capability
and 2 more not named here
get_measures 4 other papers
2 dated earlier, 1 the same month, 1 later
2304.04521 (2023-04)
GL-MCM: Global and Local Maximum Concept Matching for Zero-Shot Out-of-Distribution Detection
2306.01293 (2023-06)
LoCoOp: Few-Shot Out-of-Distribution Detection via Prompt Learning
2409.14750 (2024-09)
FineCops-Ref: A new Dataset and Task for Fine-Grained Compositional Referring Expression Comprehension
and 1 more not named here

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

Out-of-Distribution (OOD) detection, aiming to distinguish outliers from known categories, has gained prominence in practical scenarios. Recently, the advent of vision-language models (VLM) has heightened interest in enhancing OOD detection for VLM through few-shot tuning. However, existing methods mainly focus on optimizing global prompts, ignoring refined utilization of local information with regard to outliers. Motivated by this, we freeze global prompts and introduce Local-Prompt, a novel coarse-to-fine tuning paradigm to emphasize regional enhancement with local prompts. Our method comprises two integral components: global prompt guided negative augmentation and local prompt enhanced regional regularization. The former utilizes frozen, coarse global prompts as guiding cues to incorporate negative augmentation, thereby leveraging local outlier knowledge. The latter employs trainable local prompts and a regional regularization to capture local information effectively, aiding in outlier identification. We also propose regional-related metric to empower the enrichment of OOD detection. Moreover, since our approach explores enhancing local prompts only, it can be seamlessly integrated with trained global prompts during inference to boost the performance. Comprehensive experiments demonstrate the effectiveness and potential of our method. Notably, our method reduces average FPR95 by 5.17% against state-of-the-art method in 4-shot tuning on challenging ImageNet-1k dataset, even outperforming 16-shot results of previous methods. Code is released at https://github.com/AuroraZengfh/Local-Prompt.

For agents

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

get_harvested_code_for_paper("2409.04796")
get_code_for_paper("2409.04796")
have("2409.04796")

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

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

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

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

Connect an agent — have() is free.