Papers › LAPT: Label-driven Automated Prompt Tuning for OOD Detection with Vision-Language Models

LAPT: Label-driven Automated Prompt Tuning for OOD Detection with Vision-Language Models

12 Jul 2024arXiv:2407.08966archive 2025-07-28

Yabin Zhang, Wenjie Zhu, Chenhang He, Lei Zhang

Out-of-distribution (OOD) detection is crucial for model reliability, as it identifies samples from unknown classes and reduces errors due to unexpected inputs. Vision-Language Models (VLMs) such as CLIP are emerging as powerful tools for OOD detection by integrating multi-modal information. However, the practical application of such systems is challenged by manual prompt engineering, which demands domain expertise and is sensitive to linguistic nuances. In this paper, we introduce Label-driven Automated Prompt Tuning (LAPT), a novel approach to OOD detection that reduces the need for manual prompt engineering. We develop distribution-aware prompts with in-distribution (ID) class names and negative labels mined automatically. Training samples linked to these class labels are collected autonomously via image synthesis and retrieval methods, allowing for prompt learning without manual effort. We utilize a simple cross-entropy loss for prompt optimization, with cross-modal and cross-distribution mixing strategies to reduce image noise and explore the intermediate space between distributions, respectively. The LAPT framework operates autonomously, requiring only ID class names as input and eliminating the need for manual intervention. With extensive experiments, LAPT consistently outperforms manually crafted prompts, setting a new standard for OOD detection. Moreover, LAPT not only enhances the distinction between ID and OOD samples, but also improves the ID classification accuracy and strengthens the generalization robustness to covariate shifts, resulting in outstanding performance in challenging full-spectrum OOD detection tasks. Codes are available at \url{https://github.com/YBZh/LAPT}.

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="2407.08966")

Code

Syntology Ran 8 of 17 code samples harvested from 1 repository linked to this paper; 9 have no recorded run. Of those that ran: 2 ran · violated contract; 3 ran · our draft was wrong; 1 ran · fixture could not drive it; 2 ran with no contract checked.

By repository: community (archive-listed): 17 samples from 1 repository, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

ybzh/lapt officialmentioned in papermentioned on GitHubMIT report
ybzh/openood-vlm mentioned on GitHubpytorchMIT 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

17 samples harvested; 8 ran; 0 honoured the contract we drafted; 9 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.

2ran · violated contract
3ran · our draft was wrong
1ran · fixture could not drive it
2ran
9unverified

Licence: 0 of the 17 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 ybzh/openood-vlm. “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.

ash_b ybzh/openood-vlm/openood/networks/ash_net.py community (archive-listed) ran · fixture could not drive it fingerprinted MIT (permissive) · 3bde09574ad009e3 · report
ash_p ybzh/openood-vlm/openood/networks/ash_net.py community (archive-listed) ran fingerprinted MIT (permissive) · e66910fd66299eb9 · report
ash_s ybzh/openood-vlm/openood/networks/ash_net.py community (archive-listed) ran fingerprinted MIT (permissive) · 5b873af1f2983f2d · report
conv1x1 ybzh/openood-vlm/openood/networks/bit.py community (archive-listed) ran · our draft was wrong MIT (permissive) · ee80cf467065076b · report
conv3x3 ybzh/openood-vlm/openood/networks/bit.py community (archive-listed) ran · our draft was wrong MIT (permissive) · f01b8d3901f0b289 · report
rew_ce ybzh/openood-vlm/openood/losses/reweight.py community (archive-listed) ran · violated contract MIT (permissive) · d8339d591bbd7f52 · report
soft_cross_entropy ybzh/openood-vlm/openood/losses/sce.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 61492b343324d2ea · report
tf2th ybzh/openood-vlm/openood/networks/bit.py community (archive-listed) ran · violated contract fingerprinted MIT (permissive) · 7023eb86801bb3a3 · report
Deduplication ybzh/openood-vlm/openood/datasets/wordnet_prepare_via_clip.py community (archive-listed) unverified MIT (permissive) · c351a5c8ce3da3d8 · report
Discriminator32 ybzh/openood-vlm/openood/networks/arpl_net.py community (archive-listed) unverified MIT (permissive) · 3cce4936256bdc33 · report
Generator ybzh/openood-vlm/openood/networks/arpl_net.py community (archive-listed) unverified MIT (permissive) · 797cd0913159403b · report
Generator32 ybzh/openood-vlm/openood/networks/arpl_net.py community (archive-listed) unverified MIT (permissive) · 893f424fd19a9b6c · report
create_window ybzh/openood-vlm/openood/losses/ssim.py community (archive-listed) unverified MIT (permissive) · 45b6edb2cf78cda2 · report
gaussian ybzh/openood-vlm/openood/losses/ssim.py community (archive-listed) unverified MIT (permissive) · e2424ce033ba3a0f · report
loss_function ybzh/openood-vlm/openood/losses/rd4ad_loss.py community (archive-listed) unverified MIT (permissive) · 4c1d0e3674921db5 · report
rew_sce ybzh/openood-vlm/openood/losses/reweight.py community (archive-listed) unverified MIT (permissive) · e1014da2309b3946 · report
ssim ybzh/openood-vlm/openood/losses/ssim.py community (archive-listed) unverified MIT (permissive) · d1619ad1bb7ea0f7 · report

Tasks

Image GenerationOut of Distribution (OOD) DetectionPrompt EngineeringPrompt Learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

CLIP

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