SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.09730 · NeurIPS · 2024

SureMap: Simultaneous mean estimation for single-task and multi-task disaggregated evaluation

Mikhail Khodak, Miroslav Dudík, Lester Mackey, Alexandra Chouldechova

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 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; 4 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2411.09730.json · badge: /api/ran/2411.09730.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
mkhodak/SureMap canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
mkhodak/suremap canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
auc_metric Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mkhodak/SureMap/data.py
code served (permissive licence) · get_code("6291a9974eb0a669")
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 float, ndim 0, dtype family float, shape () 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
from sklearn.metrics import accuracy_score, roc_auc_score

def auc_metric(labels, scores):
    if len(np.unique(labels)) == 1:
        return np.nan
    return roc_auc_score(labels, scores)

# Setup code
np.random.seed(0)

# Create valid arguments for auc_metric
# labels: binary labels (0 or 1)
# scores: prediction scores/probabilities

labels = np.array([0, 1, 1, 0, 1, 0])
scores = np.array([0.1, 0.9, 0.8, 0.2, 0.7, 0.3])

ARGS = {
    "labels": labels,
    "scores": scores
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () 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
error_metric Ran
ran, violated the contract we drafted
mkhodak/SureMap/data.py
code served (permissive licence) · get_code("72d851b4a4bc7f16")
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 float64, ndim 0, 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

# Construct arguments for error_metric function
# The function takes labels and predictions (both should be numpy arrays or array-like)
# and computes the mean absolute error

labels = np.array([1.0, 2.0, 3.0, 4.0])
predictions = np.array([1.1, 2.2, 2.9, 4.1])

ARGS = {
    "labels": labels,
    "predictions": predictions
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
map_estimator Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mkhodak/suremap/suremap.py
code served (permissive licence) · get_code("718ea725b847f654")
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 ndarray, 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 numpy as np
import scipy as sp

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

# Define dimensions
T = 2  # time steps
d = 4  # feature dimension

# Create y: T x d array
y = np.random.randn(T, d).astype(np.float64)

# Create precision: T x d array
precision = np.random.rand(T, d).astype(np.float64) + 0.1

# Create theta: d array
theta = np.random.randn(d).astype(np.float64)

# Create Lambda: d x d array
Lambda = np.random.randn(d, d).astype(np.float64)

# Create cache: list with one element that is a T x d x 1 array
cache = [np.random.randn(T, d, 1).astype(np.float64)]

ARGS = {
    "y": y,
    "precision": precision,
    "theta": theta,
    "Lambda": Lambda,
    "cache": cache,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, scipy — 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, 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
multitask_global Ran
ran, honoured the contract we drafted
mkhodak/SureMap/estimators.py
code served (permissive licence) · get_code("98d6a5ada51a16d4")
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)

class MockMTS:
    """Mock multitask object with required attributes."""
    def __init__(self):
        # unscaled_precision: shape (batch, num_groups)
        self.unscaled_precision = torch.randn(2, 4)
        
        # inverse_variances: shape (batch, num_groups)
        self.inverse_variances = torch.randn(2, 4)
        
        # y: shape (batch, num_groups)
        self.y = torch.randn(2, 4)
        
        # ones: shape (batch, num_groups) - used for broadcasting at the end
        self.ones = torch.ones(2, 4)

mts = MockMTS()

ARGS = {
    "mts": mts,
    "share_sigmas": True,
}
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
naive_estimator Ran
ran, honoured the contract we drafted
mkhodak/SureMap/estimators.py
code served (permissive licence) · get_code("53d5f80a681f9a59")
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

class MTS:
    def __init__(self):
        # Create sample data with shape (5,) for y
        self.y = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
        
        # Create a boolean mask for NaN positions
        self.nan = np.array([False, True, False, True, False])
        
        # Create pooled_estimator with same shape as y
        self.pooled_estimator = np.array([10.0, 20.0, 30.0, 40.0, 50.0])

mts = MTS()

ARGS = {
    "mts": mts
}
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
pooled_estimator Ran
ran; our contract draft was wrong, not the code
mkhodak/SureMap/estimators.py
code served (permissive licence) · get_code("3a374c96c2e77cb6")
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, 1) 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 numpy as np

torch.manual_seed(0)

class MockMTS:
    def __init__(self):
        batch_size = 2
        dim = 4
        
        self.y = torch.randn(batch_size, dim)
        self.normalized_precision = torch.randn(batch_size, dim)
        self.ones = torch.ones(batch_size, 1)
        self.pooled_estimator = torch.randn(batch_size, 1)

mts = MockMTS()
offset = torch.randn(2, 1)

ARGS = {
    "mts": mts,
    "offset": offset
}
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 Tensor, ndim 2, dtype family float, shape (2, 1) — shape (2, 1) 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
rnd_round Ran
ran, honoured the contract we drafted
mkhodak/SureMap/sr.py
code served (permissive licence) · get_code("8fbbd38eadc537a3")
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 int, ndim 0, dtype family int, shape () 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
from sklearn.utils import check_random_state

# Construct arguments for rnd_round
# The function takes:
# - x: a numeric value (float or int) to be stochastically rounded
# - random_state: optional random state for reproducibility

ARGS = {
    "x": 3.7,
    "random_state": 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () 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
split_df Ran
ran; our contract draft was wrong, not the code
mkhodak/SureMap/sr.py
code served (permissive licence) · get_code("bed832ca0b2521d1")
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 pandas as pd
import numpy as np

torch_manual_seed = 0

# Create a sample dataframe with the required columns
np.random.seed(0)
n_rows = 8
df = pd.DataFrame({
    'grp_name': ['A', 'A', 'B', 'B', 'C', 'C', 'D', 'D'],
    'feature_1': np.random.randn(n_rows),
    'feature_2': np.random.randn(n_rows),
    'feature_3': np.random.randn(n_rows),
    'metric_col': np.random.randn(n_rows),
    'y_true': np.random.randint(0, 2, n_rows),
    'y_pred': np.random.rand(n_rows),
})

feature_names = ['feature_1', 'feature_2', 'feature_3']

# Test with metric as None
metric_none = None

# Test with metric as string
metric_str = 'metric_col'

# Test with metric as callable
def custom_metric(y_true, y_pred):
    # Simple accuracy-like metric
    return np.mean(y_true == (y_pred > 0.5))

metric_callable = custom_metric

ARGS = {
    'df': df,
    'metric': metric_callable,
    'feature_names': feature_names,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
stratified_sample Ran
ran, honoured the contract we drafted
mkhodak/SureMap/sr.py
code served (permissive licence) · get_code("9dd7481f5863799b")
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 DataFrame. 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 pandas as pd
from sklearn.utils import check_random_state

# Create a small sample dataframe with a grouping column
np.random.seed(0)
df = pd.DataFrame({
    'grp_name': ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C'],
    'value': np.random.randn(8)
})

ARGS = {
    'df': df,
    'n': 4,
    'stratify_by': 'grp_name',
    'replace': False,
    'train_test': False,
    'random_state': 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
mpi4py_reduce Not yet run
unverified (harvested, no recorded run)
mkhodak/SureMap/data.py
code served (permissive licence) · get_code("e0498520a9ee2924")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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.

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

Disaggregated evaluation-estimation of performance of a machine learning model on different subpopulations-is a core task when assessing performance and group-fairness of AI systems. A key challenge is that evaluation data is scarce, and subpopulations arising from intersections of attributes (e.g., race, sex, age) are often tiny. Today, it is common for multiple clients to procure the same AI model from a model developer, and the task of disaggregated evaluation is faced by each customer individually. This gives rise to what we call the multi-task disaggregated evaluation problem, wherein multiple clients seek to conduct a disaggregated evaluation of a given model in their own data setting (task). In this work we develop a disaggregated evaluation method called SureMap that has high estimation accuracy for both multi-task and single-task disaggregated evaluations of blackbox models. SureMap's efficiency gains come from (1) transforming the problem into structured simultaneous Gaussian mean estimation and (2) incorporating external data, e.g., from the AI system creator or from their other clients. Our method combines maximum a posteriori (MAP) estimation using a well-chosen prior together with cross-validation-free tuning via Stein's unbiased risk estimate (SURE). We evaluate SureMap on disaggregated evaluation tasks in multiple domains, observing significant accuracy improvements over several strong competitors.

For agents

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

get_harvested_code_for_paper("2411.09730")
get_code_for_paper("2411.09730")
have("2411.09730")

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

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

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

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

Connect an agent — have() is free.