SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.20461 · 2026

Data Bias Mitigation under Coverage Constraints & The Price of Fairness

Bruno Scarone, Alfredo Viola, Renée Miller

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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; 8 failures of our instrument; 2 no recorded run), measured 2026-11-24; 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/2606.20461.json · badge: /api/ran/2606.20461.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
bscarone/data-bias-coverage canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
df_to_grouplabel_dict Ran
ran; our contract draft was wrong, not the code
bscarone/data-bias-coverage/dataframe_sketches.py
code served (permissive licence) · get_code("af06697f4418e8e3")
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 dict. 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

# Create a sample DataFrame with multiple attribute columns and a count column
df = pd.DataFrame({
    'category': ['A', 'B', 'A', 'C'],
    'subcategory': ['X', 'Y', 'X', 'Z'],
    'region': ['North', 'South', 'North', 'East'],
    'count': [10, 20, 15, 5]
})

ARGS = {
    'df': df,
    'count_col': 'count'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
dict_to_dataframe Ran
ran; our contract draft was wrong, not the code
bscarone/data-bias-coverage/dataframe_sketches.py
code served (permissive licence) · get_code("3585b2e6b09cd9b3")
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 pandas as pd

# Analyze the function: dict_to_dataframe expects a dictionary where:
# - keys are iterables of (field, field_value) tuples
# - values are counts (typically numbers)
# The function iterates over key-value pairs, unpacks each key as tuples,
# builds a row dict, adds the count, and creates a DataFrame

# Create a valid data_dict matching the expected structure
data_dict = {
    (('name', 'Alice'), ('age', 30), ('city', 'NYC')): 5,
    (('name', 'Bob'), ('age', 25), ('city', 'LA')): 3,
    (('name', 'Charlie'), ('age', 35), ('city', 'SF')): 7,
}

ARGS = {
    'data_dict': data_dict,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
generate_sketch Ran
ran; our contract draft was wrong, not the code
bscarone/data-bias-coverage/dataframe_sketches.py
code served (permissive licence) · get_code("ad34af77404d9010")
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 pandas as pd
import numpy as np

# Create a simple DataFrame with some data and NaN values
data = {
    'category': ['A', 'B', 'A', 'B', 'A', np.nan],
    'value': [1, 2, 1, 2, 1, 2],
    'group': ['X', 'Y', 'X', 'Y', 'X', 'Y']
}
df = pd.DataFrame(data)

ARGS = {
    'df': df,
    'columns': None,
    'count_col': 'count',
    'sort': True
}
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 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
get_group_counts Ran
ran; our contract draft was wrong, not the code
bscarone/data-bias-coverage/bias_coverage_utils.py
code served (permissive licence) · get_code("31f200d8d43e4968")
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 dict. 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

# Create a small test DataFrame with sensitive attributes and a label
np.random.seed(0)
df = pd.DataFrame({
    'sex': ['M', 'F', 'M', 'F', 'M', 'F'],
    'race': ['W', 'B', 'W', 'B', 'W', 'B'],
    'outcome': [0, 1, 1, 0, 1, 0]
})

ARGS = {
    'df': df,
    'sensitive_attrs': ['sex', 'race'],
    'label_attr': 'outcome'
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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_grouplabels Ran
ran; our contract draft was wrong, not the code
bscarone/data-bias-coverage/bias_coverage_utils.py
code served (permissive licence) · get_code("f903c9949d5122c7")
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 list, ndim 3, 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 pandas as pd
import numpy as np

# Create a small DataFrame with sensitive attributes and a label
df = pd.DataFrame({
    'sex': ['M', 'F', 'M', 'F'],
    'race': ['W', 'B', 'W', 'B'],
    'age_group': ['young', 'old', 'young', 'old'],
    'outcome': [0, 1, 1, 0]
})

# Define arguments for get_grouplabels
ARGS = {
    'df': df,
    'sensitive_attrs': ['sex', 'race'],
    'label_attr': 'outcome'
}
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 list, ndim 3, dtype family float — a list 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
get_groups Ran
ran; our contract draft was wrong, not the code
bscarone/data-bias-coverage/bias_coverage_utils.py
code served (permissive licence) · get_code("7fce169d428880e9")
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 list, ndim 3, 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 pandas as pd
import numpy as np

# Create a small DataFrame with sensitive attributes
df = pd.DataFrame({
    'sex': ['M', 'F', 'M', 'F'],
    'race': ['W', 'B', 'W', 'B'],
    'age': [25, 30, 35, 40]
})

# Define sensitive attributes to use for grouping
sensitive_attrs = ['sex', 'race']

ARGS = {
    'df': df,
    'sensitive_attrs': sensitive_attrs
}
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 list, ndim 3, dtype family float — a list 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
get_max_bias Ran
ran; our contract draft was wrong, not the code
bscarone/data-bias-coverage/bias_closed_form.py
code served (permissive licence) · get_code("8f1a8e38e2159340")
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 pandas as pd
import tempfile
import os

# Create a temporary CSV file with bias data
csv_content = """group,label,bias
group_a,label_1,0.45
group_b,label_2,0.72
group_c,label_3,0.38
group_a*,label_4,0.55
group_b*,label_5,0.68
"""

# Write to a temporary file
temp_dir = tempfile.gettempdir()
csv_path = os.path.join(temp_dir, "bias_data.csv")
with open(csv_path, 'w') as f:
    f.write(csv_content)

ARGS = {
    'csv_path': csv_path,
    'column': 'bias',
    'intersectional_only': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
get_model Ran
ran; our contract draft was wrong, not the code
bscarone/data-bias-coverage/ml_models.py
code served (permissive licence) · get_code("b14da7d4bee1596c")
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 LogisticRegression. 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.linear_model import LogisticRegression
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier, AdaBoostClassifier, ExtraTreesClassifier
from sklearn.svm import SVC
from sklearn.dummy import DummyClassifier

MODELS = {
    'dummy': DummyClassifier(strategy='most_frequent'),
    'logistic_regression': LogisticRegression(max_iter=1000),
    'random_forest': RandomForestClassifier(n_estimators=100, random_state=42),
    'gradient_boosting': GradientBoostingClassifier(n_estimators=100, random_state=42),
    'svm': SVC(kernel='rbf', probability=True, random_state=42),
    'adaboost': AdaBoostClassifier(n_estimators=100, random_state=42),
    'extra_trees': ExtraTreesClassifier(n_estimators=100, random_state=42)
}

def get_model(name: str):
    """Return a fresh clone of the model (so it can be refit)."""
    from sklearn.base import clone
    if name not in MODELS:
        raise ValueError(f'Unknown model: {name}. Available: {list(MODELS.keys())}')
    return clone(MODELS[name])

ARGS = {
    'name': 'logistic_regression'
}
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 LogisticRegression — a LogisticRegression output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LogisticRegression 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
uniform_bias Ran
ran, honoured the contract we drafted
bscarone/data-bias-coverage/bias_closed_form.py
code served (permissive licence) · get_code("1c4de82e86ae6997")
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 torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - n: int, used in division (n >= y, n >= s)
# - y: int, used in division (y >= sy)
# - s: int, used in division (s >= sy)
# - sy: int, used in division
# - Constraints: n >= y and n >= s and (y >= sy) and (s >= sy)
# - The function computes: 1 - (sy/s) / (y/n)

# Build valid arguments satisfying all constraints
n = 100
y = 50
s = 80
sy = 25

# Verify constraints
assert n >= y and n >= s and (y >= sy) and (s >= sy)

ARGS = {
    'n': n,
    'y': y,
    's': s,
    'sy': sy
}
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 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
group_key Not yet run
unverified (harvested, no recorded run)
bscarone/data-bias-coverage/bias_coverage_ilp.py
code served (permissive licence) · get_code("c065e48294dcb0ea")
How it ran

no invocation recorded.

grouplabel_key Not yet run
unverified (harvested, no recorded run)
bscarone/data-bias-coverage/bias_coverage_ilp.py
code served (permissive licence) · get_code("174cd0acad40fb69")
How it ran

no invocation recorded.

Also present in other papers' code

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

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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Machine learning models have been shown to exhibit discriminatory outcomes or degraded performance for individuals at the intersection of multiple sensitive attributes, such as race and gender. This stems in part from two interrelated challenges: the lack of principled measures for quantifying bias (potentially intersectional), and insufficient representation of intersectional subgroups in training data. We extend a recent bias mitigation framework to incorporate coverage constraints that enforce sufficient representation across groups, including intersectional subgroups. Since achieving exactly zero bias for all groups may not be data efficient (meaning it may require large amounts of data), our solution trades small approximation errors in bias for greater data efficiency while satisfying coverage constraints. We also formulate bias mitigation as an integer linear program that optimizes over all mitigation strategies, and characterize the price of fairness, the minimum data modification cost, as a function of fairness tolerance. This is essential both for legal compliance, where regulations may mandate specific fairness thresholds, and for data governance, enabling practitioners to make informed trade-offs between bias reduction and data modification (particularly, data purchasing) costs. We evaluate our techniques on publicly available datasets, demonstrating that bias mitigation via our framework preserves predictive accuracy across multiple classifiers, and that coverage constraints, while motivated by statistical considerations, are essential for preserving downstream ML performance.

For agents

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

get_harvested_code_for_paper("2606.20461")
get_code_for_paper("2606.20461")
have("2606.20461")

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

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

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

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

Connect an agent — have() is free.