SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2002.06483 · 2020

Face Recognition: Too Bias, or Not Too Bias?

arXiv · PDF · Open in the Atlas

Code that ran

16 of 18 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 16 have no contract verdict; 0 failures of our instrument; 2 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/2002.06483.json · badge: /api/ran/2002.06483.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
visionjo/facerec-bias-bfw canonical (classifier label)
classifier basis: census
16 ran · 2 no recorded run
FunctionStatusWhere it lives
bgr2rgb Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/image.py
code served (permissive licence) · get_code("4d68c7f03f287b5e")
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 3, dtype family int, shape (4, 3, 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 cv2
import numpy as np

# Create a small BGR image (HxWxC format expected by cv2)
# Using distinct dimensions: 4 height, 3 width, 3 channels
im_bgr = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

ARGS = {
    "im_bgr": im_bgr
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (4, 3, 3) — shape (4, 3, 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
calculate_det_curves Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/metrics.py
code served (permissive licence) · get_code("878968bd0490c853")
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 2, 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
from sklearn.metrics import accuracy_score, confusion_matrix, f1_score, precision_score, recall_score, roc_curve

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

# Create small ground truth labels (binary classification)
# Using 8 samples for a small but meaningful dataset
y_true = np.array([1, 0, 1, 1, 0, 0, 1, 0], dtype=int)

# Create corresponding scores (continuous values between 0 and 1)
# These represent confidence scores or probabilities from a classifier
scores = np.array([0.9, 0.1, 0.8, 0.7, 0.2, 0.15, 0.85, 0.05], dtype=float)

ARGS = {
    "y_true": y_true,
    "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 tuple, ndim 2, 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
calculate_tar_and_far_values Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/metrics.py
code served (permissive licence) · get_code("156fe4f51a9630eb")
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 2, 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
from sklearn.metrics import roc_curve

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

# Create small mock data
# y_true: ground truth labels (binary, 1 for match, 0 for no match)
y_true = np.array([0, 1, 1, 0, 1, 0, 1, 1, 0, 0])

# scores: similarity/confidence scores for each pair
# These should be continuous values typically in [0, 1] range
scores = np.array([0.1, 0.9, 0.8, 0.2, 0.85, 0.15, 0.95, 0.88, 0.05, 0.12])

ARGS = {
    "y_true": y_true,
    "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 tuple, ndim 2, 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
draw_det_curve Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/visualization.py
code served (permissive licence) · get_code("431118228153c399")
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 Axes. 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 matplotlib import pyplot as plt

# Create valid FPR and FNR data
# FPR should be increasing, FNR should be decreasing
fpr_data = np.array([1e-5, 1e-4, 1e-3, 0.01, 0.1, 0.5, 1.0])
fnr_data = np.array([0.95, 0.85, 0.70, 0.50, 0.30, 0.10, 0.01])

# Create axes object
fig, ax_obj = plt.subplots()

ARGS = {
    'fpr': fpr_data,
    'fnr': fnr_data,
    'ax': ax_obj,
    'label': 'DET Curve',
    'set_axis_log_x': True,
    'set_axis_log_y': False,
    'scale': 100,
    'title': 'Detection Error Tradeoff',
    'label_x': 'FPR',
    'label_y': 'FNR (%)',
    'ticks_to_use_x': (1e-05, 0.0001, 0.001, 0.01, 0.1, 1.0),
    'ticks_to_use_y': (0.01, 0.03, 0.05, 0.1, 0.2, 0.3, 0.4),
    'fontsize': 24,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Axes — a Axes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Axes 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
encode_attribute_labels Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/preprocessing.py
code served (permissive licence) · get_code("5cc31a609f043060")
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 int, 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.

from pathlib import Path

ARGS = {
    "file_paths": [
        "attribute1/subject1/face1.jpg",
        "attribute1/subject2/face2.jpg",
        "attribute2/subject1/face3.jpg",
        "attribute2/subject3/face4.jpg",
    ]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sklearn — 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 int, 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
encode_ethnicity_labels Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/preprocessing.py
code served (permissive licence) · get_code("5276535170e1111e")
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 int, 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 torch
import numpy as np
from pathlib import Path
from sklearn.preprocessing import LabelEncoder

torch.manual_seed(0)

file_paths = [
    "asian_male/subject_001/face_001.jpg",
    "caucasian_female/subject_002/face_002.jpg",
    "african_male/subject_003/face_003.jpg",
    "asian_female/subject_004/face_004.jpg",
]

ARGS = {
    "file_paths": file_paths
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — 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 int, 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
eval_acc Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/utils.py
code served (permissive licence) · get_code("76a6b0da0557f9d4")
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

torch_manual_seed = 0

# Construct the 'predicts' dictionary with required keys: 'score' and 'label'
# Both need to be numpy arrays or similar structures that support comparison and mean operations

predicts = {
    'score': np.array([0.1, 0.6, 0.3, 0.9]),
    'label': np.array([0, 1, 0, 1])
}

threshold = 0.5

ARGS = {
    'threshold': threshold,
    'predicts': predicts
}
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
exists Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/iotools.py
code served (permissive licence) · get_code("b97469fc5e992338")
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 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 tempfile
from pathlib import Path

# Create a temporary file and directory for testing
with tempfile.TemporaryDirectory() as tmpdir:
    # Create a test file
    test_file = Path(tmpdir) / "test_file.txt"
    test_file.write_text("test content")
    
    # Create a test directory
    test_dir = Path(tmpdir) / "test_dir"
    test_dir.mkdir()
    
    # Define arguments for the exists function
    ARGS = {
        "path": str(test_file)
    }
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
find_best_threshold Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/utils.py
code served (permissive licence) · get_code("123165e61e51bec5")
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

# Create mock predictions dictionary with 'score' and 'label' keys
predicts = {
    'score': np.array([0.1, 0.3, 0.5, 0.7, 0.9]),
    'label': np.array([0, 0, 1, 1, 1])
}

# Create threshold values to test
thresholds = np.array([0.2, 0.4, 0.6, 0.8])

# Import the eval_acc function (already defined in the problem)
def eval_acc(threshold, predicts):
    """Evaluate accuracy at a given threshold"""
    y_predict = (predicts['score'] > threshold).astype(int)
    return (predicts['label'] == y_predict).mean()

ARGS = {
    'thresholds': thresholds,
    'predicts': predicts,
    'function': eval_acc,
    'find_max': True
}
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
find_nearest Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/experiments/calculate_tar_at_far_table.py
code served (permissive licence) · get_code("0bd0953befe9d261")
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

# find_nearest takes two parameters: array and value
# array: should be array-like (list, numpy array, etc.)
# value: a scalar value to find nearest match to

# Create a simple numpy array with some values
test_array = np.array([1.2, 3.5, 7.8, 2.1, 5.9])

# Create a scalar value to search for
test_value = 3.0

ARGS = {
    "array": test_array,
    "value": test_value
}
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
get_acc_per_threshold Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/utils.py
code served (permissive licence) · get_code("641b3317311628d2")
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

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

# Create sample predictions dict with 'score' and 'label' keys
# The function uses predicts['score'] and predicts['label']
num_samples = 10
predicts = {
    'score': np.random.rand(num_samples),  # Random scores between 0 and 1
    'label': np.random.randint(0, 2, num_samples)  # Random binary labels
}

# Create a list of threshold values to test
thresholds = np.array([0.3, 0.5, 0.7])

# Define ARGS mapping all parameters
ARGS = {
    'thresholds': thresholds,
    'predicts': predicts
}
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
get_image_size_from_file Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/image.py
code served (permissive licence) · get_code("76de65e62847c472")
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 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 io
from PIL import Image

# Create a small test image in memory
img = Image.new('RGB', (640, 480), color='red')
img_bytes = io.BytesIO()
img.save(img_bytes, format='PNG')
img_bytes.seek(0)

ARGS = {
    'f_image': img_bytes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — 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 int — 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
gray2jet Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/image.py
code served (permissive licence) · get_code("13588b87db093f1d")
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 3, dtype family int, shape (4, 3, 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 matplotlib.pyplot as plt
import numpy as np

# Create a small grayscale image with values in [0, 1]
img = np.random.rand(4, 3).astype(np.float32)

ARGS = {
    'img': img
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (4, 3, 3) — shape (4, 3, 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
load_features_from_image_list Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/iotools.py
code served (permissive licence) · get_code("48b98e0a0ac84c15")
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 os
import numpy as np
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()
dir_features = os.path.join(temp_dir, "features")
os.makedirs(dir_features, exist_ok=True)

# Create some dummy feature files
li_images = [
    "image1.jpg",
    "subdir/image2.jpg",
    "subdir/nested/image3.jpg"
]

# Create the directory structure and feature files
for img_path in li_images:
    feat_path = img_path.replace('.jpg', '.pkl')
    feat_full_path = os.path.join(dir_features, feat_path)
    os.makedirs(os.path.dirname(feat_full_path), exist_ok=True)
    # Save a numpy array as a .pkl file (simulating feature storage)
    np.save(feat_full_path.replace('.pkl', '.npy'), np.array([1.0, 2.0, 3.0, 4.0]))
    # Rename to .pkl to match expected extension
    os.rename(feat_full_path.replace('.pkl', '.npy'), feat_full_path)

ARGS = {
    'li_images': li_images,
    'dir_features': dir_features,
    'ext_img': 'jpg',
    'ext_feat': 'pkl'
}
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 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
prune_df Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/iotools.py
code served (permissive licence) · get_code("d5fc6eb1e23bc771")
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 warnings

# Create a small sample dataframe with some columns
data = pd.DataFrame({
    'col_a': [1, 2, 3],
    'col_b': [4, 5, 6],
    'col_c': [7, 8, 9],
    'col_d': [10, 11, 12]
})

# Define columns we want to keep
columns_in = ['col_a', 'col_c']

ARGS = {
    'data': data,
    'columns_in': columns_in
}
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 int 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
sum_tp Ran
ran on a synthesized input
visionjo/facerec-bias-bfw/code/facebias/metrics.py
code served (permissive licence) · get_code("fde82d12ea86db65")
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 numpy import greater_equal

torch_seed = 0

# Construct arguments for sum_tp function
# The function takes:
# - threshold: a numeric value to compare against
# - scores: an iterable of numeric values (converted to list internally)
# - op: a comparison operator function (defaults to greater_equal)

threshold = 0.5
scores = np.array([0.3, 0.6, 0.8, 0.2])

ARGS = {
    "threshold": threshold,
    "scores": scores,
    "op": greater_equal
}
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 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_gender_labels Not yet run
unverified (harvested, no recorded run)
visionjo/facerec-bias-bfw/code/facebias/preprocessing.py
code served (permissive licence) · get_code("c8142ddb4579a0cc")
How it ran

no invocation recorded.

generate_roc Not yet run
unverified (harvested, no recorded run)
visionjo/facerec-bias-bfw/code/facebias/visualization.py
code served (permissive licence) · get_code("aa7f2cfee5a79806")
How it ran

no invocation recorded.

Also present in other papers' code

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

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 reveal critical insights into problems of bias in state-of-the-art facial recognition (FR) systems using a novel Balanced Faces In the Wild (BFW) dataset: data balanced for gender and ethnic groups. We show variations in the optimal scoring threshold for face-pairs across different subgroups. Thus, the conventional approach of learning a global threshold for all pairs resulting in performance gaps among subgroups. By learning subgroup-specific thresholds, we not only mitigate problems in performance gaps but also show a notable boost in the overall performance. Furthermore, we do a human evaluation to measure the bias in humans, which supports the hypothesis that such a bias exists in human perception. For the BFW database, source code, and more, visit github.com/visionjo/facerec-bias-bfw.

For agents

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

get_harvested_code_for_paper("2002.06483")
get_code_for_paper("2002.06483")
have("2002.06483")

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

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

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

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

Connect an agent — have() is free.