SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.06879 · 2020

Active Sampling for Min-Max Fairness

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 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, 0 violated it and 4 have no contract verdict; 0 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/2006.06879.json · badge: /api/ran/2006.06879.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
amazon-research/active-sampling-for-minmax-fairness canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
FunctionStatusWhere it lives
algorithm_3 Ran
ran on a synthesized input
amazon-research/active-sampling-for-minmax-fairness/algorithms/algorithm_3.py
code served (permissive licence) · get_code("ec524753054d77fb")
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)
np.random.seed(0)

# Create small synthetic dataset
n_samples = 10
n_features = 4
n_groups = 2

# Features: shape (10, 4)
X = np.random.randn(n_samples, n_features).astype(np.float32)

# Labels: binary classification (0 or 1)
label = np.random.randint(0, 2, n_samples).astype(np.int64)

# Protected attribute: group membership (0 or 1)
protected_attribute = np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1]).astype(np.int64)

# Ensure both groups have at least one sample
assert len(np.where(protected_attribute == 0)[0]) > 0
assert len(np.where(protected_attribute == 1)[0]) > 0

ARGS = {
    'X': X,
    'label': label,
    'protected_attribute': protected_attribute,
    'number_of_groups': n_groups,
    'initial_size': 1,
    'regularization_parameter': 0.01,
    'nr_iterations': 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — 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
compute_error Ran
ran on a synthesized input
amazon-research/active-sampling-for-minmax-fairness/algorithms/utils.py
code served (permissive licence) · get_code("49e9fc8141d285e5")
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

# Construct valid arguments for compute_error
# The function expects:
# - y_true: array of true labels
# - y_pred: array of predicted labels
# - prot_attr: array of protected attribute group assignments
# - nr_of_groups: integer number of groups

# Create sample data
np.random.seed(0)

# True labels: binary classification (0 or 1)
y_true = np.array([0, 1, 1, 0, 1, 1])

# Predicted labels: binary classification (0 or 1)
y_pred = np.array([0, 1, 0, 0, 1, 0])

# Protected attribute: group assignments (0, 1, or 2)
prot_attr = np.array([0, 0, 1, 1, 2, 2])

# Number of groups
nr_of_groups = 3

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "prot_attr": prot_attr,
    "nr_of_groups": nr_of_groups
}
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 — 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
compute_logistic_loss Ran
ran on a synthesized input
amazon-research/active-sampling-for-minmax-fairness/algorithms/utils.py
code served (permissive licence) · get_code("8032b5bfa85fbf5c")
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
from sklearn.metrics import log_loss

np.random.seed(0)

# Set up arguments for compute_logistic_loss
# y_true: binary labels (0 or 1)
y_true = np.array([0, 1, 0, 1, 1, 0])

# prob_pred: predicted probabilities for positive class
prob_pred = np.array([0.1, 0.9, 0.2, 0.8, 0.7, 0.3])

# prot_attr: protected attribute group assignments (integers from 0 to nr_of_groups-1)
prot_attr = np.array([0, 0, 1, 1, 2, 2])

# nr_of_groups: number of distinct groups
nr_of_groups = 3

ARGS = {
    "y_true": y_true,
    "prob_pred": prob_pred,
    "prot_attr": prot_attr,
    "nr_of_groups": nr_of_groups
}
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 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
expit_b Ran
ran on a synthesized input
amazon-research/active-sampling-for-minmax-fairness/algorithms/utils.py
code served (permissive licence) · get_code("7465410c35c5dc89")
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. 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

# Create small test arrays for x and b
# x: input values with both positive and negative numbers
x = np.array([-2.0, -0.5, 0.5, 2.0])

# b: parameter array, same shape as x, with values in [0, 1]
b = np.array([0.2, 0.3, 0.4, 0.5])

ARGS = {
    "x": x,
    "b": b,
}
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 (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

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 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 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.

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

We propose simple active sampling and reweighting strategies for optimizing min-max fairness that can be applied to any classification or regression model learned via loss minimization. The key intuition behind our approach is to use at each timestep a datapoint from the group that is worst off under the current model for updating the model. The ease of implementation and the generality of our robust formulation make it an attractive option for improving model performance on disadvantaged groups. For convex learning problems, such as linear or logistic regression, we provide a fine-grained analysis, proving the rate of convergence to a min-max fair solution.

For agents

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

get_harvested_code_for_paper("2006.06879")
get_code_for_paper("2006.06879")
have("2006.06879")

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

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

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

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

Connect an agent — have() is free.