SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.16725 · NeurIPS · 2023

Category-Extensible Out-of-Distribution Detection via Hierarchical Context Descriptions

Jieping Ye, Kai Liu, Ze Chen, Mingyuan Tao, Zhihang Fu, Sheng Jin, Rongxin Jiang, Chao

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 5 functions out of this paper's own repositories and ran 3 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
alibaba/catex canonical 3 of 5
FunctionStatusWhere it lives
basic_clean Ran alibaba/catex/clip/simple_tokenizer.py
code served (permissive licence) · get_code("98f385d847636a3e")
get_pairs Ran alibaba/catex/clip/simple_tokenizer.py
code served (permissive licence) · get_code("d919ae32e5e4e616")
whitespace_clean Ran alibaba/catex/clip/simple_tokenizer.py
code served (permissive licence) · get_code("9542161e9640b858")
build_model Not yet run alibaba/catex/clip/model.py
code served (permissive licence) · get_code("bbce994c0986f8a3")
load Not yet run alibaba/catex/clip/clip.py
code served (permissive licence) · get_code("fbf8c0143d9c48e3")

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 key to OOD detection has two aspects: generalized feature representation and precise category description. Recently, vision-language models such as CLIP provide significant advances in both two issues, but constructing precise category descriptions is still in its infancy due to the absence of unseen categories. This work introduces two hierarchical contexts, namely perceptual context and spurious context, to carefully describe the precise category boundary through automatic prompt tuning. Specifically, perceptual contexts perceive the inter-category difference (e.g., cats vs apples) for current classification tasks, while spurious contexts further identify spurious (similar but exactly not) OOD samples for every single category (e.g., cats vs panthers, apples vs peaches). The two contexts hierarchically construct the precise description for a certain category, which is, first roughly classifying a sample to the predicted category and then delicately identifying whether it is truly an ID sample or actually OOD. Moreover, the precise descriptions for those categories within the vision-language framework present a novel application: CATegory-EXtensible OOD detection (CATEX). One can efficiently extend the set of recognizable categories by simply merging the hierarchical contexts learned under different sub-task settings. And extensive experiments are conducted to demonstrate CATEX's effectiveness, robustness, and category-extensibility. For instance, CATEX consistently surpasses the rivals by a large margin with several protocols on the challenging ImageNet-1K dataset. In addition, we offer new insights on how to efficiently scale up the prompt engineering in vision-language models to recognize thousands of object categories, as well as how to incorporate large language models (like GPT-3) to boost zero-shot applications. Code is publicly available at https://github.com/alibaba/catex.

For agents

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

get_harvested_code_for_paper("2407.16725")
get_code_for_paper("2407.16725")
have("2407.16725")

Connect an agent — have() is free.