SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.07517 · 2022

On the Usefulness of Deep Ensemble Diversity for Out-of-Distribution Detection

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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 4 have no contract verdict; 3 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2207.07517.json · badge: /api/ran/2207.07517.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
guoxoug/ens-div-ood-detect canonical (classifier label)
classifier basis not recorded on the link
8 ran · 1 no recorded run
FunctionStatusWhere it lives
conv1x1 Ran
ran; our contract draft was wrong, not the code
guoxoug/ens-div-ood-detect/models/resnet.py
code served (permissive licence) · get_code("d9def42110729a85")
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) and returned Conv2d. The image it ran in was not recorded. If your copy returns the same type 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 torch
import torch.nn as nn

torch.manual_seed(0)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
conv3x3 Ran
ran; our contract draft was wrong, not the code
guoxoug/ens-div-ood-detect/models/resnet.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from medaitech/scrd4ad, is pointer only (licence: NONE) · get_code("600ff2c45e0de056")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from medaitech/scrd4ad, 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.

default_flist_reader Ran
ran; our contract draft was wrong, not the code
guoxoug/ens-div-ood-detect/utils/data_utils.py
code served (permissive licence) · get_code("64fc75cbc3ced233")
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 list, ndim 2, 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 tempfile
import os

# Create a temporary file with test data in the expected format
temp_dir = tempfile.mkdtemp()
flist_path = os.path.join(temp_dir, "test_flist.txt")

# Write test data to the file
with open(flist_path, 'w') as f:
    f.write("/path/to/image1.jpg 0\n")
    f.write("/path/to/image2.png 1\n")
    f.write("/path/to/image3.jpg 2\n")
    f.write("/path/to/image4.jpg\n")  # Test case without label

ARGS = {
    "flist": flist_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list 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
default_loader Ran
ran, honoured the contract we drafted
guoxoug/ens-div-ood-detect/utils/data_utils.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from xlgsyzp/cvpt, is pointer only (licence: NONE) · get_code("ac269a0e4b8d946e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from xlgsyzp/cvpt, 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.

entropy Ran
ran on a synthesized input
guoxoug/ens-div-ood-detect/utils/eval_utils.py
code served (permissive licence) · get_code("46d8ea7b571ec1ba")
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 Tensor, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 torch

torch.manual_seed(0)

# Create a valid probability distribution tensor
# Shape: (batch_size=2, num_classes=4)
# Values sum to 1 along dim=-1
probs = torch.tensor([
    [0.4, 0.3, 0.2, 0.1],
    [0.25, 0.25, 0.25, 0.25]
], dtype=torch.float32)

ARGS = {
    "probs": probs,
    "dim": -1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
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
get_metric_name Ran
ran on a synthesized input
guoxoug/ens-div-ood-detect/utils/eval_utils.py
code served (permissive licence) · get_code("481900e43fe90647")
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 str. The image it ran in was not recorded. If your copy returns the same type 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 torch

torch.manual_seed(0)

METRIC_NAME_MAPPING = {'confidence': 'MSP', 'entropy': '$\\mathcal{H}$', 'ens_entropy': '$Ens. \\mathcal{H}$', 'energy': 'Energy', 'KU': 'MI', 'DU': 'Av. $\\mathcal{H}$', 'av_energy': 'Av. Energy'}

def get_metric_name(unc):
    if unc in METRIC_NAME_MAPPING:
        return METRIC_NAME_MAPPING[unc]
    else:
        return unc

ARGS = {
    'unc': 'confidence'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
get_preprocessing_transforms Ran
ran on a synthesized input
guoxoug/ens-div-ood-detect/utils/data_utils.py
code served (permissive licence) · get_code("13864a077ca4f976")
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 dict. The image it ran in was not recorded. If your copy returns the same type 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 torch
import torchvision as tv
from torchvision.transforms.functional import InterpolationMode

torch.manual_seed(0)

IMAGENET_TRANSFORMS = {'train': tv.transforms.Compose([tv.transforms.RandomResizedCrop(224), tv.transforms.RandomHorizontalFlip(), tv.transforms.ToTensor()]), 'test': tv.transforms.Compose([tv.transforms.Resize(256), tv.transforms.CenterCrop(224), tv.transforms.ToTensor()]), 'norm': tv.transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])}

COLORECTAL_TRANSFORMS = {'train': None, 'test': tv.transforms.Compose([tv.transforms.Resize(224, interpolation=InterpolationMode.LANCZOS), tv.transforms.ToTensor()]), 'norm': tv.transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])}

DATASET_NAME_TRANSFORM_MAPPING = {'imagenet': IMAGENET_TRANSFORMS, 'imagenet200': IMAGENET_TRANSFORMS, 'imagenet-o': IMAGENET_TRANSFORMS, 'caltech256': IMAGENET_TRANSFORMS, 'near-imagenet200': IMAGENET_TRANSFORMS, 'inaturalist': IMAGENET_TRANSFORMS, 'imagenet-noise': IMAGENET_TRANSFORMS, 'colorectal': COLORECTAL_TRANSFORMS, 'colonoscopy': IMAGENET_TRANSFORMS, 'openimage-o': IMAGENET_TRANSFORMS, 'textures': IMAGENET_TRANSFORMS}

ARGS = {
    'dataset_name': 'imagenet',
    'id_dataset_name': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
uncertainties Ran
ran on a synthesized input
guoxoug/ens-div-ood-detect/utils/eval_utils.py
code served (permissive licence) · get_code("d887b48b137852bb")
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 dict. The image it ran in was not recorded. If your copy returns the same type 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 torch

torch.manual_seed(0)

# Test case 1: non-ensemble mode
logits_single = torch.randn(2, 4, dtype=torch.float32)
features_single = torch.randn(2, 8, dtype=torch.float32)

# Test case 2: ensemble mode
logits_ensemble = torch.randn(3, 2, 4, dtype=torch.float32)  # (ensemble_size, batch, num_classes)
features_ensemble = torch.randn(3, 2, 8, dtype=torch.float32)

ARGS = {
    "logits": logits_single,
    "features": features_single,
    "ensemble": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
mean_std_format Not yet run
unverified (harvested, no recorded run)
guoxoug/ens-div-ood-detect/ens_table.py
code served (permissive licence) · get_code("c9347e56c1749c1e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 5 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 the same month, 5 later) and 4 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
conv1x1 431 other papers
194 dated earlier, 5 the same month, 220 later, 11 same year, order not determinable, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
conv3x3 111 other papers
22 dated earlier, 4 the same month, 84 later, 1 same year, order not determinable · 6 only as an assembly brick
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1806.01531 (2018-06)
Deep Mixture of Experts via Shallow Embedding
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
and 108 more not named here
default_loader 27 other papers
16 dated earlier, 11 later
1710.03463 (2017-10)
Learning to Generalize: Meta-Learning for Domain Generalization
1803.08669 (2018-03)
Pyramid Stereo Matching Network
1810.11408 (2018-10)
Anytime Stereo Image Depth Estimation on Mobile Devices
and 24 more not named here
default_flist_reader 1 other paper
1 later
Liu_GEN_Pushing_the_Limits_of_Softmax-Based_Out-of-Distribution_Detection_CVPR_2023_paper (2023 (year only))
GEN: Pushing the Limits of Softmax-Based Out-of-Distribution Detection
entropy 1 other paper
1 later
2504.07092 (2025-04)
Are We Done with Object-Centric Learning?

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

The ability to detect Out-of-Distribution (OOD) data is important in safety-critical applications of deep learning. The aim is to separate In-Distribution (ID) data drawn from the training distribution from OOD data using a measure of uncertainty extracted from a deep neural network. Deep Ensembles are a well-established method of improving the quality of uncertainty estimates produced by deep neural networks, and have been shown to have superior OOD detection performance compared to single models. An existing intuition in the literature is that the diversity of Deep Ensemble predictions indicates distributional shift, and so measures of diversity such as Mutual Information (MI) should be used for OOD detection. We show experimentally that this intuition is not valid on ImageNet-scale OOD detection -- using MI leads to 30-40% worse %FPR@95 compared to single-model entropy on some OOD datasets. We suggest an alternative explanation for Deep Ensembles' better OOD detection performance -- OOD detection is binary classification and we are ensembling diverse classifiers. As such we show that practically, even better OOD detection performance can be achieved for Deep Ensembles by averaging task-specific detection scores such as Energy over the ensemble.

For agents

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

get_harvested_code_for_paper("2207.07517")
get_code_for_paper("2207.07517")
have("2207.07517")

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

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

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

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

Connect an agent — have() is free.