SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.04608 · ICML · 2025

WATCH: Adaptive Monitoring for AI Deployments via Weighted-Conformal Martingales

Anqi Liu, Xing Han, Suchi Saria, Drew Prinster

arXiv · PDF · Open in the Atlas

Code that ran

3 of 24 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; 0 honoured the contract we drafted, 1 violated it and 1 has no contract verdict; 1 failure of our instrument; 21 no recorded run), measured 2026-11-23; 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/2505.04608.json · badge: /api/ran/2505.04608.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
aaronhan223/watch canonical (classifier label)
classifier basis not recorded on the link
1 ran · 20 no recorded run
aaronhan223/wtr marked official in Papers with Code
Papers with Code archive
2 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_p_values Ran
ran, violated the contract we drafted
aaronhan223/wtr/src/p_values.py
code served (permissive licence) · get_code("1036ba3a48cac196")
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 (5,) 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 numpy as np

np.random.seed(0)

# The function takes conformity_scores as input
# It expects a sequence (list or array) of numeric values
# The function iterates through indices and performs comparisons and arithmetic operations
# on the conformity scores

# Create a small array of conformity scores for testing
conformity_scores = np.array([0.1, 0.3, 0.2, 0.5, 0.4])

ARGS = {
    "conformity_scores": conformity_scores
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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 (5,) — shape (5,) 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
calculate_p_values_and_quantiles Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aaronhan223/wtr/src/p_values.py
code served (permissive licence) · get_code("52fbf28f44e10714")
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, 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 numpy as np

# Set random seed for reproducibility
np.random.seed(42)

# Create small conformity scores array
conformity_scores = np.array([0.5, 1.2, 0.8, 1.5, 0.3])

# Define alpha parameter for quantile calculation
alpha = 0.1

# Define cs_type parameter
cs_type = 'abs'

# Construct ARGS dict with all parameters
ARGS = {
    'conformity_scores': conformity_scores,
    'alpha': alpha,
    'cs_type': cs_type
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple 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
train_one_epoch Ran
ran on a synthesized input
aaronhan223/watch/src/main_mnist_cifar.py
code served (permissive licence) · get_code("e224e4494d78ef17")
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, ndim 1, 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 torch
import torch.nn as nn
import torch.optim as optim

torch.manual_seed(0)

# Build a minimal model that works with the function
class SimpleModel(nn.Module):
    def __init__(self, num_classes=3):
        super().__init__()
        self.fc = nn.Linear(4, num_classes)
    
    def forward(self, x):
        return self.fc(x)

model = SimpleModel(num_classes=3)

device = 'cpu'

# Create a minimal train_loader as a list of (images, labels) tuples
# batch_size=2, input_dim=4, num_classes=3
train_loader = [
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
]

optimizer = optim.SGD(model.parameters(), lr=0.01)

ARGS = {
    'model': model,
    'device': device,
    'train_loader': train_loader,
    'optimizer': optimizer,
}
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, ndim 1, dtype family float — a tuple 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
ResNet20 Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/resnet.py
code served (permissive licence) · get_code("24e257d88b978945")
How it ran

no invocation recorded.

ResNet32 Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/resnet.py
code served (permissive licence) · get_code("d6c9d2e6d30cf13c")
How it ran

no invocation recorded.

brier_scores Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/podkopaev_ramdas/tests.py
code served (permissive licence) · get_code("3fe446beed24ab8f")
How it ran

no invocation recorded.

calculate_weighted_p_values_and_quantiles Not yet run
unverified (harvested, no recorded run)
aaronhan223/wtr/src/p_values.py
code served (permissive licence) · get_code("5085978d4817f000")
How it ran

no invocation recorded.

cusum_procedure Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/martingales.py
code served (permissive licence) · get_code("1e117d22b7948cfc")
How it ran

no invocation recorded.

effective_sample_size_est Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/utils.py
code served (permissive licence) · get_code("f7f73cf99f559888")
How it ran

no invocation recorded.

eval_loss_prob Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/main_mnist_cifar.py
code served (permissive licence) · get_code("8e67a8dac730d3c1")
How it ran

no invocation recorded.

evaluate Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/main_mnist_cifar.py
code served (permissive licence) · get_code("920241d05b739b86")
How it ran

no invocation recorded.

fit Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/main_pod_ram.py
code served (permissive licence) · get_code("3dcf309104240174")
How it ran

no invocation recorded.

get_meps_data Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/utils.py
code served (permissive licence) · get_code("2a5d22e9de647d4d")
How it ran

no invocation recorded.

hoeffding_ci_lower_limit Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/podkopaev_ramdas/concentrations.py
code served (permissive licence) · get_code("e3886065919c0b20")
How it ran

no invocation recorded.

hoeffding_ci_upper_limit Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/podkopaev_ramdas/concentrations.py
code served (permissive licence) · get_code("bf57bb6d7f52d5f9")
How it ran

no invocation recorded.

logistic_regression_weight_est Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/p_values.py
code served (permissive licence) · get_code("75e33f5c90046614")
How it ran

no invocation recorded.

misclas_losses Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/podkopaev_ramdas/tests.py
code served (permissive licence) · get_code("3616d89ef8f11c25")
How it ran

no invocation recorded.

phi_h Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/podkopaev_ramdas/concentrations.py
code served (permissive licence) · get_code("4987abbabf98f992")
How it ran

no invocation recorded.

podkopaev_ramdas_algorithm1 Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/podkopaev_ramdas/baseline_alg.py
code served (permissive licence) · get_code("d5786e025273c2db")
How it ran

no invocation recorded.

podkopaev_ramdas_changepoint_detection Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/podkopaev_ramdas/baseline_alg.py
code served (permissive licence) · get_code("c00e01fba06c1cf4")
How it ran

no invocation recorded.

random_forest_weight_est Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/p_values.py
code served (permissive licence) · get_code("0a2eccd55a3473c8")
How it ran

no invocation recorded.

shiryaev_roberts_procedure Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/martingales.py
code served (permissive licence) · get_code("eee24789b6e59613")
How it ran

no invocation recorded.

top_label_brier_scores Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/podkopaev_ramdas/tests.py
code served (permissive licence) · get_code("0eba4f72b27f3a5d")
How it ran

no invocation recorded.

ville_procedure Not yet run
unverified (harvested, no recorded run)
aaronhan223/watch/src/martingales.py
code served (permissive licence) · get_code("0c6a35aaa8280481")
How it ran

no invocation recorded.

Also present in other papers' code

Of 24 samples lifted from this paper's linked repositories, 24 carry a function identity and 0 do not. Of the 24 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 23 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
logistic_regression_weight_est 1 other paper
1 dated earlier
2207.10716 (2022-07)
JAWS: Auditing Predictive Uncertainty Under Covariate Shift

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

Responsibly deploying artificial intelligence (AI) / machine learning (ML) systems in high-stakes settings arguably requires not only proof of system reliability, but also continual, post-deployment monitoring to quickly detect and address any unsafe behavior. Methods for nonparametric sequential testing-especially conformal test martingales (CTMs) and anytime-valid inferenceoffer promising tools for this monitoring task. However, existing approaches are restricted to monitoring limited hypothesis classes or "alarm criteria" (e.g., detecting data shifts that violate certain exchangeability or IID assumptions), do not allow for online adaptation in response to shifts, and/or cannot diagnose the cause of degradation or alarm. In this paper, we address these limitations by proposing a weighted generalization of conformal test martingales (WCTMs), which lay a theoretical foundation for online monitoring for any unexpected changepoints in the data distribution while controlling false-alarms. For practical applications, we propose specific WCTM algorithms that adapt online to mild covariate shifts (in the marginal input distribution), quickly detect harmful shifts, and diagnose those harmful shifts as concept shifts (in the conditional label distribution) or extreme (out-of-support) covariate shifts that cannot be easily adapted to. On real-world datasets, we demonstrate improved performance relative to state-of-the-art baselines.

For agents

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

get_harvested_code_for_paper("2505.04608")
get_code_for_paper("2505.04608")
have("2505.04608")

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

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

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

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

Connect an agent — have() is free.