SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2507.09795 · ICCV · 2025

NegRefine: Refining Negative Label-Based Zero-Shot OOD Detection

Ke Wang, Pulei Xiong, Amirhossein Ansari

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2507.09795.json · badge: /api/ran/2507.09795.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
ah-ansari/NegRefine canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
FunctionStatusWhere it lives
fpr_and_fdr_at_recall Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ah-ansari/NegRefine/src/ood_evaluate.py
pointer only (licence: MIT); the stored copy get_code serves, from fanghenshaometeor/ood-kernel-pca-ext, is pointer only (licence: NONE) · get_code("e1dfe697d81dc165")
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 fanghenshaometeor/ood-kernel-pca-ext, 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_measures Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ah-ansari/NegRefine/src/ood_evaluate.py
code served (permissive licence) · get_code("eb35900e6df54ced")
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 tuple, ndim 1, 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

# Set random seed for reproducibility
np.random.seed(0)

# Create small example arrays for in_examples and out_examples
# These should be 1D arrays of scores
in_examples = np.array([0.9, 0.85, 0.88, 0.92], dtype=np.float32)
out_examples = np.array([0.3, 0.2, 0.15, 0.25], dtype=np.float32)

ARGS = {
    "in_examples": in_examples,
    "out_examples": out_examples,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
stable_cumsum Ran
ran, honoured the contract we drafted
ah-ansari/NegRefine/src/ood_evaluate.py
pointer only (licence: MIT); 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: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from fanghenshaometeor/ood-kernel-pca-ext, 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.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 1 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
stable_cumsum 29 other papers
29 dated earlier · 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 3 other papers
3 dated earlier
2310.14227 (2023-10)
Revisiting Deep Ensemble for Out-of-Distribution Detection: A Loss Landscape Perspective
2402.02949 (2024-02)
Kernel PCA for Out-of-Distribution Detection
2505.15284 (2025-05)
Kernel PCA for out-of-Distribution Detection: Non-Linear Kernel Selection and Approximation.

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

Repositories linked to this paper

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

Abstract

Recent advancements in Vision-Language Models like CLIP have enabled zero-shot OOD detection by leveraging both image and textual label information. Among these, negative label-based methods such as NegLabel and CSP have shown promising results by utilizing a lexicon of words to define negative labels for distinguishing OOD samples. However, these methods suffer from detecting indistribution samples as OOD due to negative labels that are subcategories of in-distribution labels or proper nouns. They also face limitations in handling images that match multiple in-distribution and negative labels. We propose NegRefine, a novel negative label refinement framework for zero-shot OOD detection. By introducing a filtering mechanism to exclude subcategory labels and proper nouns from the negative label set and incorporating a multi-matchingaware scoring function that dynamically adjusts the contributions of multiple labels matching an image, NegRefine ensures a more robust separation between in-distribution and OOD samples. We evaluate NegRefine on large-scale benchmarks, including ImageNet-1K. The code is available at https://github.com/ah-ansari/NegRefine.

For agents

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

get_harvested_code_for_paper("2507.09795")
get_code_for_paper("2507.09795")
have("2507.09795")

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

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

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

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

Connect an agent — have() is free.