SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.05047 · NeurIPS · 2025

Reliably Detecting Model Failures in Deployment Without Labels

Rahul Krishnan, Viet Nguyen, Changjian Shui, Vijay Giri, Siddharth Arya, Amol Verma, Fahad Razak

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 6 failures of our instrument; 3 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/2506.05047.json · badge: /api/ran/2506.05047.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
teivng/d3m canonical (classifier label)
classifier basis: classifier_2025
5 ran · 2 no recorded run
fengliu90/DK-for-TST community
Papers with Code archive
2 ran · 1 no recorded run
a7b23/H-Divergence community
Papers with Code archive
2 ran · 0 no recorded run
FunctionStatusWhere it lives
D3MBayesianMonitor Ran
ran on a synthesized input · constructed an object; no result was computed
teivng/d3m/d3m/monitors/bayesian_monitor.py
code served (permissive licence) · get_code("31b4c586b6c8ab9b")
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 an instance of its own class, D3MBayesianMonitor: the run constructed the object and did not call it, so no result was computed. 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 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 Dataset, DataLoader
from dataclasses import dataclass
from typing import Tuple

torch.manual_seed(0)

# Define a minimal concrete model that satisfies D3MAbstractModel interface
class MinimalD3MModel(nn.Module):
    def __init__(self, input_dim=4, hidden_dim=8, num_classes=3):
        super().__init__()
        self.fc1 = nn.Linear(input_dim, hidden_dim)
        self.fc2 = nn.Linear(hidden_dim, num_classes)
        
    def get_features(self, x):
        """Returns activations before last layer"""
        return torch.relu(self.fc1(x))
    
    def forward(self, x):
        """Full forward pass"""
        features = self.get_features(x)
        return self.fc2(features)
    
    def get_last_layer(self):
        """Returns the last layer"""
        return self.fc2

# Define a minimal concrete dataset
class MinimalDataset(Dataset):
    def __init__(self, num_samples=10, input_dim=4, num_classes=3):
        self.num_samples = num_samples
        self.input_dim = input_dim
        self.num_classes = num_classes
        self.data = torch.randn(num_samples, input_dim)
        self.labels = torch.randint(0, num_classes, (num_samples,))
    
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, idx):
        return self.data[idx], self.labels[idx]

# Define TrainConfig
@dataclass
class TrainConfig:
    disagreement_epochs: int = 2
    disagreement_optimizer: str = "torch.optim.AdamW"
    disagreement_wd: float = 0.0
    disagreement_lr: float = 0.001
    disagreement_batch_size: int = 2
    disagreement_alpha: float = 0.5
    num_epochs: int = 2
    batch_size: int = 2
    lr: float = 0.001
    wd: float = 0.0
    optimizer: str = "torch.optim.AdamW"
    num_workers: int = 0
    pin_memory: bool = False
    clip_val: float = 1.0
    val_freq: int = 1

# Create instances
model = MinimalD3MModel(input_dim=4, hidden_dim=8, num_classes=3)
trainset = MinimalDataset(num_samples=10, input_dim=4, num_classes=3)
valset = MinimalDataset(num_samples=6, input_dim=4, num_classes=3)
train_cfg = TrainConfig()
device = torch.device('cpu')

ARGS = {
    'model': model,
    'trainset': trainset,
    'valset': valset,
    'train_cfg': train_cfg,
    'device': device,
    'verbose': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm, wandb — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type D3MBayesianMonitor — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a D3MBayesianMonitor 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
JSV_Gaussian Ran
ran; our contract draft was wrong, not the code
a7b23/H-Divergence/utils.py
pointer only (licence: NONE) · get_code("9351e8786754a459")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, a7b23/H-Divergence 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.

JSV_Gaussian_u Ran
ran; our contract draft was wrong, not the code
a7b23/H-Divergence/utils.py
pointer only (licence: NONE) · get_code("a42e81244edb9510")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, a7b23/H-Divergence 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.

MMDu Ran
ran; our contract draft was wrong, not the code
fengliu90/DK-for-TST/utils.py
code served (permissive licence) · get_code("b2fd0117a1785dcf")
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. 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)

# Create small tensors with distinct sizes
# Fea and Fea_org should have the same shape: (total_samples, feature_dim)
# We'll use 4 total samples (2 from class X, 2 from class Y) with 3 features
total_samples = 4
feature_dim = 3
len_s = 2  # First 2 samples are X, remaining 2 are Y

# Create feature tensors
Fea = torch.randn(total_samples, feature_dim)
Fea_org = torch.randn(total_samples, feature_dim)

# Define parameters
sigma = 1.0
sigma0 = 0.1
epsilon = 1e-10
is_smooth = True
is_var_computed = True
use_1sample_U = True

ARGS = {
    "Fea": Fea,
    "len_s": len_s,
    "Fea_org": Fea_org,
    "sigma": sigma,
    "sigma0": sigma0,
    "epsilon": epsilon,
    "is_smooth": is_smooth,
    "is_var_computed": is_var_computed,
    "use_1sample_U": use_1sample_U,
}
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 tuple — a tuple output has no array shape of its own; none is 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
TrainConfig Ran
ran on a synthesized input · constructed an object; no result was computed
teivng/d3m/d3m/monitors/bayesian_monitor.py
code served (permissive licence) · get_code("e31bb08debb2367d")
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 an instance of its own class, TrainConfig: the run constructed the object and did not call it, so no result was computed. 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
from dataclasses import dataclass
from pprint import pprint

torch.manual_seed(0)

ARGS = {
    'disagreement_epochs': 5,
    'disagreement_optimizer': 'adam',
    'disagreement_wd': 0.0001,
    'disagreement_lr': 0.001,
    'disagreement_batch_size': 32,
    'disagreement_alpha': 0.5,
    'num_epochs': 10,
    'batch_size': 16,
    'lr': 0.01,
    'wd': 0.0005,
    'optimizer': 'sgd',
    'num_workers': 2,
    'pin_memory': True,
    'clip_val': 1.0,
    'val_freq': 2,
}
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 TrainConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TrainConfig 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_class_from_string Ran
ran; our contract draft was wrong, not the code
teivng/d3m/d3m/monitors/bayesian_monitor.py
code served (permissive licence) · get_code("24c4d57d39e03345")
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 type. 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
import torch.optim as optim

torch.manual_seed(0)

# The function takes a class_string parameter and uses rsplit, __import__, and getattr
# to dynamically import and return a class. We need to provide valid class strings
# that can be imported from standard libraries.

ARGS = {
    "class_string": "torch.optim.AdamW"
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
mmd2_permutations Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
fengliu90/DK-for-TST/utils.py
code served (permissive licence) · get_code("123d5b309dfd538f")
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. 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 numpy as np

torch.manual_seed(0)

# The function expects:
# - K: a kernel matrix (2D tensor or array-like)
# - n_X: number of samples in X (int)
# - permutations: number of permutations (int, default 500)

# Create a small kernel matrix
# For n_X samples from X and n_Y samples from Y, we need K of shape (n_X + n_Y, n_X + n_Y)
n_X = 3
n_Y = 3
n_total = n_X + n_Y

# Create a valid kernel matrix (symmetric, positive semi-definite)
# Simple approach: create a random matrix and make it symmetric PSD
K_random = torch.randn(n_total, n_total)
K = (K_random + K_random.T) / 2  # Make symmetric
K = K @ K.T  # Make positive semi-definite

ARGS = {
    'K': K,
    'n_X': n_X,
    'permutations': 10
}
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 tuple — a tuple output has no array shape of its own; none is 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
sample_from_dataset Ran
ran; our contract draft was wrong, not the code
teivng/d3m/d3m/monitors/bayesian_monitor.py
code served (permissive licence) · get_code("9fcb4375a26ac02b")
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. 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 numpy as np
import torch
from torch.utils.data import Dataset

torch.manual_seed(0)
np.random.seed(0)

class SimpleDataset(Dataset):
    def __init__(self, num_samples=10, data_dim=4):
        self.num_samples = num_samples
        self.data_dim = data_dim
        self.data = torch.randn(num_samples, data_dim)
        self.labels = torch.randint(0, 2, (num_samples,))
    
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, idx):
        return (self.data[idx], self.labels[idx])

dataset = SimpleDataset(num_samples=10, data_dim=4)

ARGS = {
    "n_samples": 2,
    "dataset": dataset,
    "replace": True
}
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 tuple — a tuple output has no array shape of its own; none is 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
temperature_scaling Ran
ran, honoured the contract we drafted
teivng/d3m/d3m/monitors/bayesian_monitor.py
code served (permissive licence) · get_code("6688a7f57e8828e0")
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 2, dtype family float, shape (2, 4) 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
import torch.nn as nn

torch.manual_seed(0)

# Create small logits tensor (batch_size=2, num_classes=4)
logits = torch.randn(2, 4)

# Create a small positive temperature value
temperature = 0.7

ARGS = {
    "logits": logits,
    "temperature": temperature,
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
D3MAbstractModel Not yet run
unverified (harvested, no recorded run)
teivng/d3m/d3m/monitors/bayesian_monitor.py
code served (permissive licence) · get_code("745669490b50fd4f")
How it ran

no invocation recorded.

D3MMonitor Not yet run
unverified (harvested, no recorded run)
teivng/d3m/d3m/monitors/bayesian_monitor.py
code served (permissive licence) · get_code("99a9a8040630f606")
How it ran

no invocation recorded.

TST_MMD_u Not yet run
unverified (harvested, no recorded run)
fengliu90/DK-for-TST/utils.py
code served (permissive licence) · get_code("ec24b4387148fe67")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 11 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
MMDu
brick of this paper's assembly: model
1 other paper
1 dated earlier
2306.08777 (2023-06)
MMD-FUSE: Learning and Combining Kernels for Two-Sample Testing Without Data Splitting

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

The distribution of data changes over time; models operating in dynamic environments need retraining. But knowing when to retrain, without access to labels, is an open challenge since some, but not all shifts degrade model performance. This paper formalizes and addresses the problem of post-deployment deterioration (PDD) monitoring. We propose D3M, a practical and efficient monitoring algorithm based on the disagreement of predictive models, achieving low false positive rates under non-deteriorating shifts and provides sample complexity bounds for high true positive rates under deteriorating shifts. Empirical results on both standard benchmark and a real-world large-scale internal medicine dataset demonstrate the effectiveness of the framework and highlight its viability as an alert mechanism for high-stakes machine learning pipelines.

For agents

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

get_harvested_code_for_paper("2506.05047")
get_code_for_paper("2506.05047")
have("2506.05047")

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

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

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

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

Connect an agent — have() is free.