SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.14435 · 2024

Social Perception of Faces in a Vision-Language Model

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 1 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/2408.14435.json · badge: /api/ran/2408.14435.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
carinahausladen/clip-face-bias canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_img_embedding Ran
ran, honoured the contract we drafted
carinahausladen/clip-face-bias/precalculate_cossims.py
code served (permissive licence) · get_code("b2b31526234dd51b")
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 float, shape (4,) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn

torch.manual_seed(0)

device = 'cpu'

# Create a minimal dataset class that has get_image_by_path method
class MinimalDataset:
    def get_image_by_path(self, img_path: str):
        # Return a dummy PIL-like image (we'll use a tensor and pretend)
        # Actually return something that can be preprocessed
        return torch.randn(3, 224, 224)

# Create a minimal model with encode_image method
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(3 * 224 * 224, 4)
    
    def encode_image(self, img):
        # img shape: (batch, 3, 224, 224)
        batch_size = img.shape[0]
        flattened = img.reshape(batch_size, -1)
        return self.linear(flattened)

# Create a minimal preprocess function
def minimal_preprocess(img):
    # img is a tensor of shape (3, 224, 224)
    # preprocess should return a tensor that can be unsqueezed
    return img / 255.0

# Construct arguments
dataset = MinimalDataset()
img_path = "dummy_path.jpg"
model = MinimalModel()
preprocess = minimal_preprocess

ARGS = {
    "dataset": dataset,
    "img_path": img_path,
    "model": model,
    "preprocess": preprocess
}
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 Tensor, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
fairface_prep Ran
ran; our contract draft was wrong, not the code
carinahausladen/clip-face-bias/analysis/fig_s3+s4+s5.py
code served (permissive licence) · get_code("774c67b16462e923")
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 minimal DataFrame that matches what fairface_prep expects
df_fairface = pd.DataFrame({
    'race': [
        'Asian',
        'East Asian',
        'White',
        'Black',
        'Asian',
        'White'
    ],
    'gender': [
        'Male',
        'Female',
        'Male',
        'Female',
        'Male',
        'Female'
    ],
    'age': [
        '20-30',
        '30-40',
        '40-50',
        '50-60',
        '60-70',
        'more than 70'
    ]
})

ARGS = {
    'df_fairface': df_fairface
}
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
load_and_preprocess_abc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
carinahausladen/clip-face-bias/analysis/_causalface_results_loading_utils.py
code served (permissive licence) · get_code("1765f08cce176997")
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 minimal mock DataFrame that satisfies the function's requirements
agency_pos = ['powerful', 'high-status', 'dominating', 'wealthy', 'confident', 'competitive']
agency_neg = ['powerless', 'low-status', 'dominated', 'poor', 'meek', 'passive']
belief_pos = ['science-oriented', 'alternative', 'liberal', 'modern']
belief_neg = ['religious', 'conventional', 'conservative', 'traditional']
communion_pos = ['trustworthy', 'sincere', 'friendly', 'benevolent', 'likable', 'altruistic']
communion_neg = ['untrustworthy', 'dishonest', 'unfriendly', 'threatening', 'unpleasant', 'egoistic']

all_attributes = agency_pos + agency_neg + belief_pos + belief_neg + communion_pos + communion_neg
all_colnames = [f'cossim_{c}' for c in all_attributes]

# Create a small mock DataFrame with the required columns
mock_data = {col: np.random.rand(3) for col in all_colnames}
mock_df = pd.DataFrame(mock_data)

ARGS = {
    'model': 'test_model',
    'subset': 'test_subset',
    'aggregate': True,
    'df': mock_df
}
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
load_and_preprocess_control Ran
ran, honoured the contract we drafted
carinahausladen/clip-face-bias/analysis/_causalface_results_loading_utils.py
code served (permissive licence) · get_code("dd8a1cc3efeabeb6")
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 os
import tempfile

# Create a temporary directory and mock CSV file
temp_dir = tempfile.mkdtemp()
results_dir = os.path.join(temp_dir, 'results')
model_dir = os.path.join(results_dir, 'test_model')
os.makedirs(model_dir, exist_ok=True)

# Create mock CSV data with the expected columns
control_cols = ['cossim_<blank>', 'cossim_white', 'cossim_black', 'cossim_asian', 'cossim_male', 'cossim_female', 'cossim_young', 'cossim_old']
mock_data = {col: [0.1, 0.2, 0.3] for col in control_cols}
df_mock = pd.DataFrame(mock_data)

# Write the mock CSV file
csv_path = os.path.join(model_dir, 'causalface_test_subset_cossim_control_t2.csv')
df_mock.to_csv(csv_path, index=False)

# Patch the working directory to use our temp directory
os.chdir(temp_dir)

ARGS = {
    'model': 'test_model',
    'subset': 'test_subset'
}
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
load_and_preprocess_scm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
carinahausladen/clip-face-bias/analysis/_causalface_results_loading_utils.py
code served (permissive licence) · get_code("9d80b1515f3a8ec8")
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 minimal DataFrame that satisfies the function's requirements
# The function expects columns for warm and competence attributes
warm_cols = ['cossim_warm', 'cossim_trustworthy', 'cossim_friendly', 'cossim_honest', 'cossim_likable', 'cossim_sincere']
comp_cols = ['cossim_competent', 'cossim_intelligent', 'cossim_skilled', 'cossim_efficient', 'cossim_assertive', 'cossim_confident']

# Create a small DataFrame with synthetic data
data = {}
for col in warm_cols:
    data[col] = np.random.rand(3)
for col in comp_cols:
    data[col] = np.random.rand(3)

df = pd.DataFrame(data)

ARGS = {
    'model': 'test_model',
    'subset': 'test_subset',
    'aggregate': True,
    'df': df
}
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
map_utk_to_fairface_age Ran
ran; our contract draft was wrong, not the code
carinahausladen/clip-face-bias/datasets/utk_face.py
code served (permissive licence) · get_code("fa6b5ffd9c689427")
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 str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

ARGS = {
    'age': 25
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
rgb_to_grayscale Ran
ran, violated the contract we drafted
carinahausladen/clip-face-bias/analysis/fig_s12+s13.py
code served (permissive licence) · get_code("fdd501c092801acb")
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 float, shape (4, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small RGB image with shape (height, width, channels)
# Using distinct dimensions: 4 height, 5 width, 3 RGB channels
rgb_image = np.random.rand(4, 5, 3).astype(np.float32)

ARGS = {
    "rgb_image": rgb_image
}
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 float, shape (4, 5) — shape (4, 5) 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
utkface_prep Ran
ran; our contract draft was wrong, not the code
carinahausladen/clip-face-bias/analysis/fig_s3+s4+s5.py
code served (permissive licence) · get_code("66850b3a326332f9")
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 sample dataframe that matches what utkface_prep expects
np.random.seed(42)

# Generate data with ages >= 20, and ensure some ages have >= 100 samples
ages = []
races = []
genders = []

# Create enough samples for ages 25, 30, 35, 40 with >= 100 samples each
for age in [25, 30, 35, 40]:
    ages.extend([age] * 120)
    races.extend(np.random.choice(['WHITE', 'BLACK', 'ASIAN', 'INDIAN'], 120))
    genders.extend(np.random.choice(['MALE', 'FEMALE'], 120))

# Add some samples from younger ages that will be filtered out
for age in [15, 18]:
    ages.extend([age] * 50)
    races.extend(np.random.choice(['WHITE', 'BLACK'], 50))
    genders.extend(np.random.choice(['MALE', 'FEMALE'], 50))

# Add some ages with < 100 samples that will be filtered out
for age in [50, 55]:
    ages.extend([age] * 50)
    races.extend(np.random.choice(['WHITE', 'BLACK'], 50))
    genders.extend(np.random.choice(['MALE', 'FEMALE'], 50))

df_utkface = pd.DataFrame({
    'age': ages,
    'race': races,
    'gender': genders
})

ARGS = {
    'df_utkface': df_utkface
}
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
preprocess_dataframe_general Not yet run
unverified (harvested, no recorded run)
carinahausladen/clip-face-bias/analysis/fig_s1.py
code served (permissive licence) · get_code("121f9447528bfdda")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

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

Abstract

We explore social perception of human faces in CLIP, a widely used open-source vision-language model. To this end, we compare the similarity in CLIP embeddings between different textual prompts and a set of face images. Our textual prompts are constructed from well-validated social psychology terms denoting social perception. The face images are synthetic and are systematically and independently varied along six dimensions: the legally protected attributes of age, gender, and race, as well as facial expression, lighting, and pose. Independently and systematically manipulating face attributes allows us to study the effect of each on social perception and avoids confounds that can occur in wild-collected data due to uncontrolled systematic correlations between attributes. Thus, our findings are experimental rather than observational. Our main findings are three. First, while CLIP is trained on the widest variety of images and texts, it is able to make fine-grained human-like social judgments on face images. Second, age, gender, and race do systematically impact CLIP's social perception of faces, suggesting an undesirable bias in CLIP vis-a-vis legally protected attributes. Most strikingly, we find a strong pattern of bias concerning the faces of Black women, where CLIP produces extreme values of social perception across different ages and facial expressions. Third, facial expression impacts social perception more than age and lighting as much as age. The last finding predicts that studies that do not control for unprotected visual attributes may reach the wrong conclusions on bias. Our novel method of investigation, which is founded on the social psychology literature and on the experiments involving the manipulation of individual attributes, yields sharper and more reliable observations than previous observational methods and may be applied to study biases in any vision-language model.

For agents

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

get_harvested_code_for_paper("2408.14435")
get_code_for_paper("2408.14435")
have("2408.14435")

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

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

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

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

Connect an agent — have() is free.