SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.18055 · 2024

Visual Data Diagnosis and Debiasing with Concept Graphs

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 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; 8 failures of our instrument; 0 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/2409.18055.json · badge: /api/ran/2409.18055.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
rwchakra/conbias canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_clique_values Ran
ran; our contract draft was wrong, not the code
rwchakra/conbias/src/make_cliques.py
code served (permissive licence) · get_code("581fce689d688527")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import numpy as np

# Create a small matrix with numeric values
# The function accesses matrix.loc[row, col] for pairs of clique members
# We need a DataFrame with numeric indices and float values
data = {
    0: {1: 100.0, 2: 200.0, 3: 300.0},
    1: {0: 100.0, 2: 150.0, 3: 250.0},
    2: {0: 200.0, 1: 150.0, 3: 175.0},
    3: {0: 300.0, 1: 250.0, 2: 175.0},
}
matrix = pd.DataFrame(data)

# Create cliques - lists/tuples of node indices
# The function will sort them and compute min value across all pairwise edges
cliques = [
    [0, 1, 2],
    [1, 2, 3],
    [0, 1],
    [0, 1, 2],  # Duplicate to test deduplication
]

ARGS = {
    "cliques": cliques,
    "matrix": matrix,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
filter_cliques_by_percentile Ran
ran; our contract draft was wrong, not the code
rwchakra/conbias/src/make_cliques.py
code served (permissive licence) · get_code("7f1086a06a38a87f")
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

# Construct clique_values: a dict mapping cliques to their values
# The function treats keys as cliques and values as numeric scores
clique_values = {
    ('node1', 'node2'): 15.5,
    ('node3', 'node4'): 22.3,
    ('node5', 'node6'): 8.2,
    ('node7', 'node8'): 35.1,
    ('node9', 'node10'): 12.7,
}

# percentile_threshold: a percentile value between 0 and 100
percentile_threshold = 50

ARGS = {
    'clique_values': clique_values,
    'percentile_threshold': percentile_threshold,
}
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
load_cocogb Ran
ran; our contract draft was wrong, not the code
rwchakra/conbias/src/dataloaders.py
code served (permissive licence) · get_code("4b09585add499174")
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 os
import pandas as pd
import torch
import numpy as np
from torch.utils.data import Dataset, DataLoader
from torchvision.io import read_image
import torchvision.transforms as transforms
from torchvision.transforms import ToPILImage, autoaugment
from PIL import Image
import tempfile

torch.manual_seed(0)

# Create a temporary directory for mock images
temp_dir = tempfile.mkdtemp()

# Create mock image files
def create_mock_image(path):
    """Create a simple mock image file"""
    img = Image.new('RGB', (256, 256), color='red')
    img.save(path)

# Create sample metadata
metadata_records = []
for i in range(10):
    img_filename = f'image_{i}.png'
    img_path = os.path.join(temp_dir, img_filename)
    create_mock_image(img_path)
    
    split = i % 3  # 0: train, 1: val, 2: test
    metadata_records.append({
        'img_filename': img_filename,
        'y': i % 2,  # Binary label
        'place': f'place_{i % 3}',
        'split': split
    })

metadata_df = pd.DataFrame(metadata_records)

# Save metadata CSV
metadata_csv_path = os.path.join(temp_dir, 'metadata_v1.csv')
metadata_df.to_csv(metadata_csv_path, index=False)

# Define ARGS dictionary
ARGS = {
    'data_dir': temp_dir,
    'filename': 'metadata_v1.csv',
    'batch_size': 2,
    'num_workers': 0,
    'shuffle': True,
    'augmentation': False,
    'method': 'base',
    'additional_filename': 'additional_metadata_coco.csv',
    'num_samples': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, pandas, torch, torchvision — 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
load_raw_data Ran
ran; our contract draft was wrong, not the code
rwchakra/conbias/src/cutmix_proc.py
code served (permissive licence) · get_code("d6b38b5a55c98fc9")
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 DataLoader. 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 tempfile
import shutil
from PIL import Image
import numpy as np

# Create a temporary directory with fake image data
temp_dir = tempfile.mkdtemp()
class_dir = os.path.join(temp_dir, "class_a")
os.makedirs(class_dir, exist_ok=True)

# Create a few small dummy images
for i in range(3):
    img_array = np.random.randint(0, 256, (32, 32, 3), dtype=np.uint8)
    img = Image.fromarray(img_array)
    img.save(os.path.join(class_dir, f"image_{i}.jpg"))

ARGS = {
    "data_dir": temp_dir,
    "batch_size": 2,
    "n_workers": 0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
load_waterbirds Ran
ran; our contract draft was wrong, not the code
rwchakra/conbias/src/dataloaders.py
code served (permissive licence) · get_code("aea5a3b4ff08ee0e")
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 os
import tempfile
import pandas as pd
import numpy as np
from PIL import Image
import torch

# Create a temporary directory to serve as data_dir
temp_dir = tempfile.mkdtemp()

# Create a subdirectory for images
img_dir = temp_dir

# Create dummy image files
def create_dummy_image(path):
    img = Image.new('RGB', (256, 256), color='red')
    img.save(path)

# Create metadata CSV
num_samples_per_split = 10
img_filenames = []
splits = []
labels = []
places = []

for split_idx in range(3):  # splits: 0=train, 1=val, 2=test
    for i in range(num_samples_per_split):
        img_idx = split_idx * num_samples_per_split + i
        img_name = f'image_{img_idx}.jpg'
        img_path = os.path.join(img_dir, img_name)
        create_dummy_image(img_path)
        
        img_filenames.append(img_name)
        splits.append(split_idx)
        labels.append(i % 2)  # Alternate between 0 and 1
        places.append(f'place_{i % 3}')

metadata_df = pd.DataFrame({
    'img_filename': img_filenames,
    'split': splits,
    'y': labels,
    'place': places
})

metadata_path = os.path.join(temp_dir, 'metadata.csv')
metadata_df.to_csv(metadata_path, index=False)

ARGS = {
    'data_dir': temp_dir,
    'filename': 'metadata.csv',
    'batch_size': 2,
    'num_workers': 0,
    'shuffle': True,
    'augmentation': False,
    'method': 'base',
    'additional_filename': 'additional_metadata.csv'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, pandas, torch, torchvision — 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
rand_bbox Ran
ran; our contract draft was wrong, not the code
rwchakra/conbias/src/cutmix_proc.py
pointer only (licence: MIT); the stored copy get_code serves, from psandovalsegura/learn-from-unlearnable, is pointer only (licence: NONE) · get_code("0756a99508caf42c")
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 psandovalsegura/learn-from-unlearnable, 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. A run is recorded.

remove_class_names Ran
ran; our contract draft was wrong, not the code
rwchakra/conbias/src/make_cliques.py
code served (permissive licence) · get_code("6bb25299699ce1f4")
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 numpy as np

# Analyzing the function:
# - remove_class_names takes two parameters: cliques_lb and cliques_wb
# - Both are iterable sequences (used with len() and indexing)
# - Each element is a tuple containing items that can be compared with strings
# - cliques_lb elements should contain 'man' strings to be filtered
# - cliques_wb elements should contain 'woman' strings to be filtered

# Create sample cliques for cliques_lb with 'man' items
cliques_lb = [
    ('man', 'person', 'adult'),
    ('man', 'child'),
    ('person', 'adult'),
]

# Create sample cliques for cliques_wb with 'woman' items
cliques_wb = [
    ('woman', 'person', 'adult'),
    ('woman', 'child'),
    ('person', 'adult'),
]

ARGS = {
    'cliques_lb': cliques_lb,
    'cliques_wb': cliques_wb,
}
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 — 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
sample_images Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
rwchakra/conbias/src/dataloaders.py
code served (permissive licence) · get_code("7a6549645839c35c")
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 small DataFrame with binary classification data
np.random.seed(42)
n_samples = 1000

df = pd.DataFrame({
    'y': np.random.randint(0, 2, n_samples),
    'feature_1': np.random.randn(n_samples),
    'feature_2': np.random.randn(n_samples),
    'feature_3': np.random.randn(n_samples)
})

ARGS = {
    'df': df,
    'k': 400
}
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

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 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, 1 later) and 7 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
rand_bbox 8 other papers
5 dated earlier, 3 later
2112.00412 (2021-12)
The Majority Can Help The Minority: Context-rich Minority Oversampling for Long-tailed Classification
2305.19254 (2023-05)
What Can We Learn from Unlearnable Datasets?
2312.08939 (2023-12)
EAT: Towards Long-Tailed Out-of-Distribution Detection
and 5 more not named here

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

The widespread success of deep learning models today is owed to the curation of extensive datasets significant in size and complexity. However, such models frequently pick up inherent biases in the data during the training process, leading to unreliable predictions. Diagnosing and debiasing datasets is thus a necessity to ensure reliable model performance. In this paper, we present ConBias, a novel framework for diagnosing and mitigating Concept co-occurrence Biases in visual datasets. ConBias represents visual datasets as knowledge graphs of concepts, enabling meticulous analysis of spurious concept co-occurrences to uncover concept imbalances across the whole dataset. Moreover, we show that by employing a novel clique-based concept balancing strategy, we can mitigate these imbalances, leading to enhanced performance on downstream tasks. Extensive experiments show that data augmentation based on a balanced concept distribution augmented by Conbias improves generalization performance across multiple datasets compared to state-of-the-art methods.

For agents

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

get_harvested_code_for_paper("2409.18055")
get_code_for_paper("2409.18055")
have("2409.18055")

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

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

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

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

Connect an agent — have() is free.