SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.17713 · NeurIPS · 2023

Mitigating Source Bias for Fairer Weak Supervision

Frederic Sala, Changho Shin, Dyah Adila, Sonia Cromp

arXiv · PDF · Open in the Atlas

Code that ran

2 of 3 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 0 have no contract verdict; 2 failures of our instrument; 1 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/2303.17713.json · badge: /api/ran/2303.17713.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
sprocketlab/fair-ws canonical (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
FunctionStatusWhere it lives
_find_sbm_mapping_one_direction Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sprocketlab/fair-ws/fairws/sbm.py
code served (permissive licence) · get_code("000830faced04839")
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 1, dtype family int; 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 numpy as np
import ot
import faiss

torch.manual_seed(0)

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

# X: feature matrix, shape (6, 4) - 6 samples, 4 features
X = np.random.randn(6, 4).astype(np.float64)

# A: group assignments, shape (6,) - which group each sample belongs to
A = np.array([0, 0, 0, 1, 1, 1], dtype=np.int32)

# Parameters for the function
src_group = 0  # source group label
dst_group = 1  # destination group label
ot_type = 'linear'  # optimal transport type
k = 1  # number of nearest neighbors

ARGS = {
    'X': X,
    'A': A,
    'src_group': src_group,
    'dst_group': dst_group,
    'ot_type': ot_type,
    'k': k,
    'batch_size': 4,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
faiss, numpy, ot, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family int — no output shape is stated: observe_signature.py could not observe it (import:TypeError)
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
find_sbm_mapping Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sprocketlab/fair-ws/fairws/sbm.py
code served (permissive licence) · get_code("cf5a3d6f4cdec608")
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 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 torch
import numpy as np
import ot
import faiss

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

# Create small sample data
# X: feature matrix with shape (n_samples, n_features)
# A: group assignment array with shape (n_samples,)

n_samples = 8
n_features = 4

X = np.random.randn(n_samples, n_features).astype(np.float64)

# Create group assignments with at least 2 distinct groups
A = np.array([0, 0, 0, 0, 1, 1, 1, 1], dtype=np.int32)

# ot_type can be 'linear', 'sinkhorn', or None
ot_type = 'linear'

ARGS = {
    'X': X,
    'A': A,
    'ot_type': ot_type
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
faiss, numpy, ot, torch — 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
FaissKNN Not yet run
unverified (harvested, no recorded run)
sprocketlab/fair-ws/fairws/sbm.py
code served (permissive licence) · get_code("3f5d6ef2ec6d8f16")
How it ran

no invocation recorded.

Also present in other papers' code

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

Weak supervision enables efficient development of training sets by reducing the need for ground truth labels. However, the techniques that make weak supervision attractive-such as integrating any source of signal to estimate unknown labelsalso entail the danger that the produced pseudolabels are highly biased. Surprisingly, given everyday use and the potential for increased bias, weak supervision has not been studied from the point of view of fairness. We begin such a study, starting with the observation that even when a fair model can be built from a dataset with access to ground-truth labels, the corresponding dataset labeled via weak supervision can be arbitrarily unfair. To address this, we propose and empirically validate a model for source unfairness in weak supervision, then introduce a simple counterfactual fairness-based technique that can mitigate these biases. Theoretically, we show that it is possible for our approach to simultaneously improve both accuracy and fairness-in contrast to standard fairness approaches that suffer from tradeoffs. Empirically, we show that our technique improves accuracy on weak supervision baselines by as much as 32% while reducing demographic parity gap by 82.5%. A simple extension of our method aimed at maximizing performance produces state-of-the-art performance in five out of ten datasets in the WRENCH benchmark.

For agents

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

get_harvested_code_for_paper("2303.17713")
get_code_for_paper("2303.17713")
have("2303.17713")

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

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

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

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

Connect an agent — have() is free.