SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.01197 · ICLR · 2022

VOS: Learning What You Don't Know by Virtual Outlier Synthesis

Yixuan Li, Xuefeng Du, Zhaoning Wang, Mu Cai

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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; 5 failures of our instrument; 0 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/2202.01197.json · badge: /api/ran/2202.01197.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
deeplearning-wisc/vos canonical (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
FunctionStatusWhere it lives
ODIN Ran
ran; our contract draft was wrong, not the code
deeplearning-wisc/vos/classification/utils/score_calculation.py
code served (permissive licence) · get_code("17bbd961aaf86569")
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 ndarray, ndim 2, dtype family float, shape (2, 3) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from torch.autograd import Variable
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Build a minimal model that takes input and produces outputs
class SimpleModel(nn.Module):
    def __init__(self, input_dim, num_classes):
        super(SimpleModel, self).__init__()
        self.fc = nn.Linear(input_dim, num_classes)
    
    def forward(self, x):
        return self.fc(x)

# Create model
model = SimpleModel(input_dim=4, num_classes=3)

# Create input tensor with requires_grad=True for backward pass
batch_size = 2
input_dim = 4
num_classes = 3
inputs = Variable(torch.randn(batch_size, input_dim), requires_grad=True)

# Create outputs from model
outputs = model(inputs)

# Parameters for ODIN function
temper = 1.0
noiseMagnitude1 = 0.1

ARGS = {
    "inputs": inputs,
    "outputs": outputs,
    "model": model,
    "temper": temper,
    "noiseMagnitude1": noiseMagnitude1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
fpr_and_fdr_at_recall Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
deeplearning-wisc/vos/metric_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from HaoyueBaiZJU/aha, is pointer only (licence: NONE) · get_code("1134ab62338793e2")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from HaoyueBaiZJU/aha, 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_Mahalanobis_score Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
deeplearning-wisc/vos/classification/utils/score_calculation.py
code served (permissive licence) · get_code("24f5b40495bb542e")
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 ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import torch.nn as nn
import numpy as np
from torch.utils.data import DataLoader, TensorDataset

torch.manual_seed(0)

# Create a small model with intermediate_forward method
class SimpleModel(nn.Module):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.conv1 = nn.Conv2d(3, 8, kernel_size=3, padding=1)
        self.conv2 = nn.Conv2d(8, 16, kernel_size=3, padding=1)
        self.fc = nn.Linear(16 * 4 * 4, 10)
    
    def intermediate_forward(self, x, layer_index):
        if layer_index == 0:
            x = self.conv1(x)
            return x
        elif layer_index == 1:
            x = self.conv1(x)
            x = self.conv2(x)
            return x
        else:
            x = self.conv1(x)
            x = self.conv2(x)
            x = x.view(x.size(0), -1)
            return x
    
    def forward(self, x):
        x = self.conv1(x)
        x = self.conv2(x)
        x = x.view(x.size(0), -1)
        x = self.fc(x)
        return x

model = SimpleModel()

# Create a small test loader (batch_size=2, 3-channel images 4x4)
data = torch.randn(4, 3, 4, 4)
targets = torch.tensor([0, 1, 0, 1])
dataset = TensorDataset(data, targets)
test_loader = DataLoader(dataset, batch_size=2, shuffle=False)

# Number of classes
num_classes = 2

# Create sample means for each layer
# Layer 0 output: (batch=2, channels=8) -> after view and mean: (2, 8)
# Layer 1 output: (batch=2, channels=16) -> after view and mean: (2, 16)
layer_index = 1
feature_dim = 16

sample_mean = {}
sample_mean[0] = torch.randn(num_classes, 8)
sample_mean[1] = torch.randn(num_classes, feature_dim)

# Create precision matrices (inverse covariance)
precision = {}
precision[0] = torch.randn(8, 8)
precision[1] = torch.randn(feature_dim, feature_dim)

# Other parameters
magnitude = 0.002
num_batches = 2
in_dist = False

ARGS = {
    'model': model,
    'test_loader': test_loader,
    'num_classes': num_classes,
    'sample_mean': sample_mean,
    'precision': precision,
    'layer_index': layer_index,
    'magnitude': magnitude,
    'num_batches': num_batches,
    'in_dist': in_dist
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) 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_measures Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
deeplearning-wisc/vos/metric_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from HaoyueBaiZJU/aha, is pointer only (licence: NONE) · get_code("9b1abfca5a67be06")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from HaoyueBaiZJU/aha, 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_ood_scores_odin Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
deeplearning-wisc/vos/classification/utils/score_calculation.py
code served (permissive licence) · get_code("3ad01de2f86dccba")
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 ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Create a simple model
class SimpleNet(nn.Module):
    def __init__(self):
        super(SimpleNet, self).__init__()
        self.fc = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.fc(x)

# Create model instance
net = SimpleNet()
net.eval()

# Create a simple data loader (list of batches)
# Each batch is (data, target)
data1 = torch.randn(2, 4)
target1 = torch.tensor([0, 1])
data2 = torch.randn(2, 4)
target2 = torch.tensor([2, 0])
loader = [(data1, target1), (data2, target2)]

# Define parameters
bs = 2  # batch size
ood_num_examples = 4
T = 1.0  # temperature
noise = 0.1  # noise magnitude
in_dist = False

ARGS = {
    'loader': loader,
    'net': net,
    'bs': bs,
    'ood_num_examples': ood_num_examples,
    'T': T,
    'noise': noise,
    'in_dist': in_dist
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) 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
stable_cumsum Ran
ran, honoured the contract we drafted
deeplearning-wisc/vos/metric_utils.py
pointer only (licence: Apache-2.0); 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 (Apache-2.0), 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 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 6 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 4 the same month, 6 later) and 0 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
6 dated earlier, 1 the same month, 21 later, 1 same year, order not determinable · 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
get_measures 5 other papers
5 later
Wilson_SAFE_Sensitivity-Aware_Features_for_Out-of-Distribution_Object_Detection_ICCV_2023_paper (2023 (year only))
SAFE: Sensitivity-Aware Features for Out-of-Distribution Object Detection
2302.07106 (2023-02)
Normalizing Flow based Feature Synthesis for Outlier-Aware Object Detection
2405.18635 (2024-05)
When and How Does In-Distribution Label Help Out-of-Distribution Detection?
and 2 more not named here
fpr_and_fdr_at_recall 4 other papers
4 later
Wilson_SAFE_Sensitivity-Aware_Features_for_Out-of-Distribution_Object_Detection_ICCV_2023_paper (2023 (year only))
SAFE: Sensitivity-Aware Features for Out-of-Distribution Object Detection
2405.18635 (2024-05)
When and How Does In-Distribution Label Help Out-of-Distribution Detection?
2409.17504 (2024-09)
HaloScope: Harnessing Unlabeled LLM Generations for Hallucination Detection
and 1 more not named here
ODIN 3 other papers
1 the same month, 1 later, 1 same year, order not determinable
aaai_20752 (2022 (year only))
Provable Guarantees for Understanding Out-of-Distribution Detection
2202.03299 (2022-02)
Training OOD Detectors in their Natural Habitats
2409.18205 (2024-09)
Bridging OOD Detection and Generalization: A Graph-Theoretic View
get_ood_scores_odin 3 other papers
1 the same month, 1 later, 1 same year, order not determinable
aaai_20752 (2022 (year only))
Provable Guarantees for Understanding Out-of-Distribution Detection
2202.03299 (2022-02)
Training OOD Detectors in their Natural Habitats
2409.18205 (2024-09)
Bridging OOD Detection and Generalization: A Graph-Theoretic View
get_Mahalanobis_score 2 other papers
1 the same month, 1 later
2202.03299 (2022-02)
Training OOD Detectors in their Natural Habitats
2409.18205 (2024-09)
Bridging OOD Detection and Generalization: A Graph-Theoretic View

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

Out-of-distribution (OOD) detection has received much attention lately due to its importance in the safe deployment of neural networks. One of the key challenges is that models lack supervision signals from unknown data, and as a result, can produce overconfident predictions on OOD data. Previous approaches rely on real outlier datasets for model regularization, which can be costly and sometimes infeasible to obtain in practice. In this paper, we present VOS, a novel framework for OOD detection by adaptively synthesizing virtual outliers that can meaningfully regularize the model's decision boundary during training. Specifically, VOS samples virtual outliers from the low-likelihood region of the class-conditional distribution estimated in the feature space. Alongside, we introduce a novel unknownaware training objective, which contrastively shapes the uncertainty space between the ID data and synthesized outlier data. VOS achieves competitive performance on both object detection and image classification models, reducing the FPR95 by up to 9.36% compared to the previous best method on object detectors. Code is available at https://github.com/deeplearning-wisc/vos.

For agents

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

get_harvested_code_for_paper("2202.01197")
get_code_for_paper("2202.01197")
have("2202.01197")

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

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

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

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

Connect an agent — have() is free.