SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.16432 · NeurIPS · 2024

Fair Bilevel Neural Network (FairBiNN): On Balancing fairness and accuracy via Stackelberg Equilibrium

Ali Yalabadi, Mehdi Yazdani-Jahromi, Aida Tayebi, Ozlem Garibay, Amirarsalan Rajabi, Ivan Garibay

arXiv · PDF · Open in the Atlas

Code that ran

16 of 20 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 9 failures of our instrument; 4 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2410.16432.json · badge: /api/ran/2410.16432.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
yazdanimehdi/FairBiNN canonical (classifier label)
classifier basis: census
10 ran · 3 no recorded run
yazdanimehdi/fairbinn canonical (classifier label)
classifier basis: classifier_2025
3 ran · 1 no recorded run
yazdanimehdi/Distraction_Fairness community
Papers with Code archive
3 ran · 0 no recorded run
FunctionStatusWhere it lives
get_pareto_front Ran
ran; our contract draft was wrong, not the code
yazdanimehdi/fairbinn/train_tabular.py
code served (permissive licence) · get_code("c499ae6c68741884")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T02:47:54Z). 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 typing

def domination(x1, x2):
    if x1[0] > x2[0] and x1[1] < x2[1]:
        return True
    if x1[0] >= x2[0] and x1[1] < x2[1]:
        return True
    if x1[0] > x2[0] and x1[1] <= x2[1]:
        return True
    return False

def get_pareto_front(arr, x_dominates_y: typing.Callable=domination):
    pareto_front = []
    for i in arr:
        for j in arr:
            if x_dominates_y(j, i):
                break
        else:
            pareto_front.append(i)
    return pareto_front

# Setup code
torch.manual_seed(0)

# Create a small array of 2D points for testing
# Each point is [x, y] where we want to maximize x and minimize y
arr = [
    [1.0, 5.0],
    [2.0, 3.0],
    [3.0, 4.0],
    [1.5, 6.0],
]

ARGS = {
    "arr": arr,
    "x_dominates_y": domination,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, 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
AttributeClassifier Ran
ran on a synthesized input · constructed an object; no result was computed
yazdanimehdi/Distraction_Fairness/model.py
pointer only (licence: NONE) · get_code("1c46dba6b6061aaa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yazdanimehdi/Distraction_Fairness when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

AttributeClassifierAblation Ran
ran on a synthesized input · constructed an object; no result was computed
yazdanimehdi/fairbinn/models/tabular.py
code served (permissive licence) · get_code("1efa65eedfc30d0f")
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 an instance of its own class, AttributeClassifierAblation: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'dataset': 'Adult',
    'accuracy_layers': (14, 64, 32, 1),
    'fairness_layers': (32, 32, 32, 32),
    'fairness_layers_position': 3,
    'fairness_layer_mode': 'linear'
}
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 AttributeClassifierAblation — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a AttributeClassifierAblation 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
MultiHeadAttention Ran
ran on a synthesized input · constructed an object; no result was computed
yazdanimehdi/Distraction_Fairness/model.py
pointer only (licence: NONE) · get_code("687fd6594c87ed5b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yazdanimehdi/Distraction_Fairness when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

demographic_parity_difference_soft Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yazdanimehdi/FairBiNN/metrics.py
code served (permissive licence) · get_code("91a155461a8b47ea")
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 numpy as np

torch.manual_seed(0)

# Create sample data for demographic_parity_difference_soft
# y: binary labels (shape: [batch_size])
# c: demographic group indicators (shape: [batch_size])
# y_hat: predicted probabilities (shape: [batch_size, 1])

batch_size = 8

# Binary labels
y = torch.tensor([0, 1, 1, 0, 1, 0, 1, 1], dtype=torch.float32)

# Demographic groups (values in {0, 1})
c = torch.tensor([0, 0, 1, 1, 0, 1, 0, 1], dtype=torch.long)

# Predicted probabilities (shape: [batch_size, 1])
y_hat = torch.rand(batch_size, 1)

ARGS = {
    "y": y,
    "c": c,
    "y_hat": y_hat
}
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 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
demographic_parity_ratio_soft Ran
ran on a synthesized input
yazdanimehdi/FairBiNN/metrics.py
code served (permissive licence) · get_code("42d9f9502b5a309f")
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 numpy as np

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

# Create sample data
# y: binary labels (0 or 1)
n_samples = 10
y = np.array([0, 1, 0, 1, 1, 0, 1, 0, 1, 0])

# c: demographic attribute with 2 distinct values
c = np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1])

# y_hat: probability predictions for binary classification
# Shape must be (n_samples, 2) where column 1 is P(y=1)
y_hat = np.array([
    [0.8, 0.2],
    [0.3, 0.7],
    [0.9, 0.1],
    [0.2, 0.8],
    [0.4, 0.6],
    [0.7, 0.3],
    [0.1, 0.9],
    [0.6, 0.4],
    [0.25, 0.75],
    [0.85, 0.15]
])

ARGS = {
    "y": y,
    "c": c,
    "y_hat": y_hat
}
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 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
domination Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yazdanimehdi/fairbinn/train_tabular.py
code served (permissive licence) · get_code("296c6f442ab98eb3")
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 bool, 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

torch.manual_seed(0)

# The function takes two arguments x1 and x2
# It accesses x1[0], x1[1], x2[0], x2[1]
# So x1 and x2 need to be indexable sequences with at least 2 elements
# Based on the logic, they appear to be coordinate pairs or similar 2-element sequences

x1 = [5, 2]
x2 = [3, 4]

ARGS = {
    "x1": x1,
    "x2": x2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
education_func Ran
ran, honoured the contract we drafted
yazdanimehdi/FairBiNN/data_loading/load_adult.py
code served (permissive licence) · get_code("949a08f0162e758d")
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 torch
import numpy as np

torch.manual_seed(0)

# The function takes a single parameter 'x' which is a string representing an education level
# It maps education strings to integer codes
# Valid inputs are: 'Masters', '9th', 'Some-college', 'Assoc-acdm', 'HS-grad', '11th', 
# 'Bachelors', '10th', 'Assoc-voc', '7th-8th', '5th-6th', '12th', 'Doctorate', 'Prof-school', 'Preschool'

ARGS = {
    'x': 'Masters'
}
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 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
encode_onehot Ran
ran; our contract draft was wrong, not the code
yazdanimehdi/FairBiNN/utils.py
code served (permissive licence) · get_code("19be62d06f0eec5f")
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 2, dtype family int, shape (5, 3) 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

# The function encode_onehot takes labels as input
# It expects labels to be an iterable of class labels
# The function creates one-hot encodings for each label

# Create a simple list of labels
labels = [0, 1, 2, 0, 1]

ARGS = {
    "labels": labels
}
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 2, dtype family int, shape (5, 3) — shape (5, 3) 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
fwd_pass Ran
ran; our contract draft was wrong, not the code
yazdanimehdi/FairBiNN/models/vision.py
code served (permissive licence) · get_code("b5e02eb6ccb5958c")
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 torch.nn as nn

torch.manual_seed(0)

# Define a simple model that takes input and outputs predictions
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, x):
        return self.linear(x)

# Define a custom criterion for differential privacy
class DPCriterion(nn.Module):
    def forward(self, y_true, y_pred, sens):
        return torch.mean((y_true - y_pred) ** 2) / sens

# Define a standard accuracy criterion
class AccCriterion(nn.Module):
    def forward(self, y_pred, y_true):
        return torch.mean((y_pred - y_true) ** 2)

# Create instances
model = SimpleModel()
criterion_dp = DPCriterion()
criterion_acc = AccCriterion()
optimizer_dp = torch.optim.SGD(model.parameters(), lr=0.01)
optimizer_acc = torch.optim.SGD(model.parameters(), lr=0.01)

# Create small sample data
x = [[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]]  # batch size 2, dim 4
y_l = [0.5, 1.5]  # batch size 2
sens = 0.1  # sensitivity parameter for DP

ARGS = {
    'x': x,
    'sens': sens,
    'y_l': y_l,
    'criterion_dp': criterion_dp,
    'criterion_acc': criterion_acc,
    'optimizer_dp': optimizer_dp,
    'optimizer_acc': optimizer_acc,
    'model': model
}
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 — 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
gather_labels Ran
ran; our contract draft was wrong, not the code
yazdanimehdi/FairBiNN/data_loading/load_health.py
code served (permissive licence) · get_code("45506eb048d6e3a1")
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. 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 a 2D numpy array with mixed types (strings and numbers)
# Shape: (4, 3) - 4 rows, 3 columns
# Column 0: strings
# Column 1: strings
# Column 2: numbers
df = np.array([
    ["cat", "red", 1.5],
    ["dog", "blue", 2.5],
    ["cat", "red", 3.5],
    ["bird", "green", 4.5]
], dtype=object)

ARGS = {
    "df": df
}
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 list — a list 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
load_data Ran
ran; our contract draft was wrong, not the code
yazdanimehdi/FairBiNN/utils.py
code served (permissive licence) · get_code("ba042693993b4109")
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
import scipy.sparse as sp
import torch
import tempfile
import os

torch.manual_seed(0)

# Create temporary directory and mock data files
temp_dir = tempfile.mkdtemp()

# Create mock .content file
# Format: id feature1 feature2 ... featureN label
content_data = []
num_samples = 100
num_features = 10
labels_list = ['class_a', 'class_b', 'class_c']

for i in range(num_samples):
    sample_id = i
    features = [np.random.rand() for _ in range(num_features)]
    label = labels_list[i % 3]
    row = [str(sample_id)] + [str(f) for f in features] + [label]
    content_data.append('\t'.join(row))

content_file = os.path.join(temp_dir, 'cora.content')
with open(content_file, 'w') as f:
    f.write('\n'.join(content_data))

# Create mock .cites file
# Format: citing_id cited_id
cites_data = []
for i in range(50):
    citing_id = np.random.randint(0, num_samples)
    cited_id = np.random.randint(0, num_samples)
    if citing_id != cited_id:
        cites_data.append(f'{citing_id}\t{cited_id}')

cites_file = os.path.join(temp_dir, 'cora.cites')
with open(cites_file, 'w') as f:
    f.write('\n'.join(cites_data))

ARGS = {
    'path': temp_dir + '/',
    'dataset': 'cora'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — 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
load_pokec Ran
ran; our contract draft was wrong, not the code
yazdanimehdi/FairBiNN/utils.py
code served (permissive licence) · get_code("5ec0c9199119dc47")
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
import scipy.sparse as sp
import torch
import os
import pandas as pd
import tempfile

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

# Create a temporary directory for dataset files
tmpdir = tempfile.mkdtemp()

# Create a small mock pokec dataset CSV
n_samples = 50
n_features = 8

# Create feature matrix with user_id, some features, sens_attr, and predict_attr
data = {
    'user_id': np.arange(n_samples),
}

# Add feature columns
for i in range(n_features):
    data[f'feature_{i}'] = np.random.randint(0, 5, n_samples)

# Add sensitive attribute
data['gender'] = np.random.choice([0, 1], n_samples)

# Add prediction target
data['region'] = np.random.choice([0, 1], n_samples)

df = pd.DataFrame(data)
csv_path = os.path.join(tmpdir, 'pokec.csv')
df.to_csv(csv_path, index=False)

# Create a mock relationships file
n_edges = 30
edges = np.random.randint(0, n_samples, size=(n_edges, 2))
edges_path = os.path.join(tmpdir, 'pokec_relationship.txt')
np.savetxt(edges_path, edges, fmt='%d')

ARGS = {
    'dataset': 'pokec',
    'sens_attr': 'gender',
    'predict_attr': 'region',
    'path': tmpdir + '/',
    'label_number': 1000,
    'sens_number': 500,
    'seed': 19,
    'test_idx': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, scipy, torch — 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
marital_func Ran
ran, honoured the contract we drafted
yazdanimehdi/FairBiNN/data_loading/load_adult.py
code served (permissive licence) · get_code("75fabfad2b5e38a5")
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 torch

torch.manual_seed(0)

# The function takes a single parameter 'x' which should be a string
# representing a marital status. The function maps different marital status
# strings to integer codes.

ARGS = {
    'x': 'Married-civ-spouse'
}
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 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
scaled_dot_product Ran
ran; our contract draft was wrong, not the code
yazdanimehdi/Distraction_Fairness/model.py
pointer only (licence: NONE) · get_code("3590e425c7c27d55")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yazdanimehdi/Distraction_Fairness when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

work_func Ran
ran, honoured the contract we drafted
yazdanimehdi/FairBiNN/data_loading/load_adult.py
code served (permissive licence) · get_code("aaed6266b7af872f")
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 torch

torch.manual_seed(0)

ARGS = {
    'x': 'Private'
}
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 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
dataset_construction Not yet run
unverified (harvested, no recorded run)
yazdanimehdi/FairBiNN/models/vision.py
code served (permissive licence) · get_code("8247882e107084b3")
How it ran

no invocation recorded.

fair_metric Not yet run
unverified (harvested, no recorded run)
yazdanimehdi/FairBiNN/train_graph.py
pointer only (licence: MIT); the stored copy get_code serves, from EnyanDai/FairGNN, is pointer only (licence: NONE) · get_code("2177e2a3db468eee")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from EnyanDai/FairGNN, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

fwd_pass Not yet run
unverified (harvested, no recorded run)
yazdanimehdi/fairbinn/train_tabular.py
code served (permissive licence) · get_code("b15f7a302a6462cc")
How it ran

no invocation recorded.

test_func Not yet run
unverified (harvested, no recorded run)
yazdanimehdi/FairBiNN/models/vision.py
code served (permissive licence) · get_code("b3e810bc6ecacc34")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 18 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
scaled_dot_product
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2201.09948 (2022-01)
ReLSO: A Transformer-based Model for Latent Space Optimization and Generation of Proteins
2402.19009 (2024-02)
Unified Generation, Reconstruction, and Representation: Generalized Diffusion with Adaptive Latent Encoding-Decoding
fair_metric 1 other paper
1 dated earlier
2009.01454 (2020-09)
Say No to the Discrimination: Learning Fair Graph Neural Networks with Limited Sensitive Attribute Information

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

The persistent challenge of bias in machine learning models necessitates robust solutions to ensure parity and equal treatment across diverse groups, particularly in classification tasks. Current methods for mitigating bias often result in information loss and an inadequate balance between accuracy and fairness. To address this, we propose a novel methodology grounded in bilevel optimization principles. Our deep learning-based approach concurrently optimizes for both accuracy and fairness objectives, and under certain assumptions, achieving proven Pareto optimal solutions while mitigating bias in the trained model. Theoretical analysis indicates that the upper bound on the loss incurred by this method is less than or equal to the loss of the Lagrangian approach, which involves adding a regularization term to the loss function. We demonstrate the efficacy of our model primarily on tabular datasets such as UCI Adult and Heritage Health. When benchmarked against state-of-the-art fairness methods, our model exhibits superior performance, advancing fairness-aware machine learning solutions and bridging the accuracy-fairness gap. The implementation of FairBiNN is available on https://github.com/yazdanimehdi/FairBiNN.

For agents

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

get_harvested_code_for_paper("2410.16432")
get_code_for_paper("2410.16432")
have("2410.16432")

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

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

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

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

Connect an agent — have() is free.