Papers › From Global to Local: Multi-scale Out-of-distribution Detection

From Global to Local: Multi-scale Out-of-distribution Detection

20 Aug 2023arXiv:2308.10239archive 2025-07-28

Ji Zhang, Lianli Gao, Bingguang Hao, Hao Huang, Jingkuan Song, HengTao Shen

Out-of-distribution (OOD) detection aims to detect "unknown" data whose labels have not been seen during the in-distribution (ID) training process. Recent progress in representation learning gives rise to distance-based OOD detection that recognizes inputs as ID/OOD according to their relative distances to the training data of ID classes. Previous approaches calculate pairwise distances relying only on global image representations, which can be sub-optimal as the inevitable background clutter and intra-class variation may drive image-level representations from the same ID class far apart in a given representation space. In this work, we overcome this challenge by proposing Multi-scale OOD DEtection (MODE), a first framework leveraging both global visual information and local region details of images to maximally benefit OOD detection. Specifically, we first find that existing models pretrained by off-the-shelf cross-entropy or contrastive losses are incompetent to capture valuable local representations for MODE, due to the scale-discrepancy between the ID training and OOD detection processes. To mitigate this issue and encourage locally discriminative representations in ID training, we propose Attention-based Local PropAgation (ALPA), a trainable objective that exploits a cross-attention mechanism to align and highlight the local regions of the target objects for pairwise examples. During test-time OOD detection, a Cross-Scale Decision (CSD) function is further devised on the most discriminative multi-scale representations to distinguish ID/OOD data more faithfully. We demonstrate the effectiveness and flexibility of MODE on several benchmarks -- on average, MODE outperforms the previous state-of-the-art by up to 19.24% in FPR, 2.77% in AUROC. Code is available at https://github.com/JimZAI/MODE-OOD.

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

Code

Syntology Ran 8 of 10 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 1 ran · honoured contract; 3 ran · our draft was wrong; 4 ran with no contract checked.

By repository: official repository: 10 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.

jimzai/mode-ood officialmentioned in paperpytorch 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

10 samples harvested; 8 ran; 1 honoured the contract we drafted; 2 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.

1ran · honoured contract
3ran · our draft was wrong
4ran
2unverified

Licence: 10 of the 10 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 jimzai/mode-ood. “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.

conv3x3 jimzai/mode-ood/models/resnet.py official repository ran · our draft was wrong no licence file found · pointer only · fac5364e2f53c6db · report
get_energy_score jimzai/mode-ood/util/score.py official repository ran · our draft was wrong no licence file found · pointer only · 209469a90d2f8a72 · report
get_lgst_score jimzai/mode-ood/util/score.py official repository ran · our draft was wrong no licence file found · pointer only · 683101b9e3719e85 · report
get_msp_score jimzai/mode-ood/util/score.py official repository ran · honoured contract no licence file found · pointer only · 6126345504c875f7 · report
projector jimzai/mode-ood/models/attention.py official repository ran no licence file found · pointer only · 50f35f73306b91cd · report
resnet18 jimzai/mode-ood/models/resnet_ss.py official repository ran no licence file found · pointer only · 736b93ffffc416ab · report
resnet18 jimzai/mode-ood/models/resnet.py official repository ran no licence file found · pointer only · e7381567b86eedac · report
resnet50 jimzai/mode-ood/models/resnet.py official repository ran no licence file found · pointer only · 57a690473dc3173f · report
get_model jimzai/mode-ood/util/model_loader.py official repository unverified no licence file found · pointer only · 35a7bbf658cac9cd · report
set_loader jimzai/mode-ood/ALPA/main_ce.py official repository unverified no licence file found · pointer only · 2297ed2ca4911b7c · report

Tasks

Out of Distribution (OOD) DetectionOut-of-Distribution DetectionRepresentation Learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

ALIGN

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