SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.11930 · 2024

Data Contamination Calibration for Black-box LLMs

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 2 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2405.11930.json · badge: /api/ran/2405.11930.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
yyy01/pac canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
FunctionStatusWhere it lives
calculate_PAC Ran
ran, honoured the contract we drafted
yyy01/pac/attack.py
code served (permissive licence) · get_code("fd610dd8fb030cab")
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 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 copy import deepcopy

# Mock the eda function that's called in calculate_PAC
def eda(prompt, alpha=0.3, num_aug=5):
    """Simple mock EDA function that returns augmented prompts"""
    augmented = [prompt + f" (aug {i})" for i in range(num_aug)]
    return augmented

# Mock the calculate_probs function that's called in calculate_PAC
def calculate_probs(prompt_list, api_key=None, model_engine=None, model_path=None, num_threads=1):
    """Mock function that returns probability lists for each prompt"""
    probs_list = []
    for prompt in prompt_list:
        # Generate mock probabilities for each prompt
        probs = np.random.rand(10).tolist()
        probs_list.append(probs)
    return probs_list

# Inject the mock functions into the module namespace
import sys
current_module = sys.modules[__name__]
current_module.eda = eda
current_module.calculate_probs = calculate_probs

# Create sample prompts
prompt_list = [
    "What is machine learning?",
    "Explain neural networks.",
    "How does backpropagation work?"
]

ARGS = {
    "prompt_list": prompt_list,
    "api_key": None,
    "model_engine": None,
    "model_path": None,
    "N": 5,
    "num_threads": 1
}
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 1, dtype family float — no output shape is stated: observe_signature.py could not observe it (fixture:KeyError)
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_Polarized_Distance Ran
ran; our contract draft was wrong, not the code
yyy01/pac/attack.py
code served (permissive licence) · get_code("37007d7b9cfa2605")
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

np.random.seed(0)

# Create a small probability list
prob_list = np.array([0.1, 0.2, 0.15, 0.05, 0.3, 0.25, 0.08, 0.12, 0.18, 0.22])

ARGS = {
    "prob_list": prob_list.tolist(),
    "ratio_local": 0.3,
    "ratio_far": 0.05
}
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
eda Ran
ran; our contract draft was wrong, not the code
yyy01/pac/src/eda.py
code served (permissive licence) · get_code("f51fad6a89fb6af4")
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, 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 random
from random import shuffle

random.seed(42)

ARGS = {
    "sentence": "the quick brown fox jumps over the lazy dog",
    "alpha": 0.3,
    "num_aug": 5
}
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 list, ndim 1, 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
load_model Ran
ran; our contract draft was wrong, not the code
yyy01/pac/src/prob.py
code served (permissive licence) · get_code("7c19981ce5643620")
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
from unittest.mock import Mock, MagicMock
from transformers import AutoTokenizer, AutoModelForCausalLM

torch.manual_seed(0)

# Create a mock model path string
model_path = "gpt2"

# Since we can't actually download models, we'll mock the functions
# But the function itself calls from_pretrained which would need network access
# So we need to provide what the function expects to work with

# The function calls:
# - AutoModelForCausalLM.from_pretrained(model_path, return_dict=True, device_map='auto')
# - model.eval()
# - AutoTokenizer.from_pretrained(model_path)

# We'll create a minimal mock setup that satisfies the function's usage
class MockModel:
    def __init__(self):
        self.config = Mock()
    
    def eval(self):
        return self
    
    def __call__(self, *args, **kwargs):
        return Mock()

class MockTokenizer:
    def __call__(self, *args, **kwargs):
        return {"input_ids": torch.tensor([[1, 2, 3]])}
    
    def encode(self, text):
        return [1, 2, 3]
    
    def decode(self, ids):
        return "text"

# Patch the AutoModelForCausalLM and AutoTokenizer
original_model_from_pretrained = AutoModelForCausalLM.from_pretrained
original_tokenizer_from_pretrained = AutoTokenizer.from_pretrained

AutoModelForCausalLM.from_pretrained = Mock(return_value=MockModel())
AutoTokenizer.from_pretrained = Mock(return_value=MockTokenizer())

ARGS = {
    "model_path": "gpt2"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, transformers — 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
random_swap Ran
ran; our contract draft was wrong, not the code
yyy01/pac/src/eda.py
pointer only (licence: MIT); the stored copy get_code serves, from vano1205/efficientcl, is pointer only (licence: NONE) · get_code("85f4d7cd22f3b8de")
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 vano1205/efficientcl, 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.

swap_word Ran
ran; our contract draft was wrong, not the code
yyy01/pac/src/eda.py
pointer only (licence: MIT); the stored copy get_code serves, from vano1205/efficientcl, is pointer only (licence: NONE) · get_code("aa17b95c9417dad0")
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 vano1205/efficientcl, 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.

calculate_probs_gpt Not yet run
unverified (harvested, no recorded run)
yyy01/pac/src/prob.py
code served (permissive licence) · get_code("2fdb133f1e97a0fa")
How it ran

no invocation recorded.

calculate_probs_others Not yet run
unverified (harvested, no recorded run)
yyy01/pac/src/prob.py
code served (permissive licence) · get_code("91791888ec81af4d")
How it ran

no invocation recorded.

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, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 6 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
random_swap 4 other papers
3 dated earlier, 1 later · 1 only as an assembly brick
2103.07552 (2021-03)
Few-Shot Text Classification with Triplet Networks, Data Augmentation, and Curriculum Learning
2109.05941 (2021-09)
Efficient Contrastive Learning via Novel Data Augmentation and Curriculum Learning
2310.14577 (2023-10)
DeCrisisMB: Debiased Semi-Supervised Learning for Crisis Tweet Classification via Memory Bank
and 1 more not named here
swap_word 3 other papers
2 dated earlier, 1 later · 1 only as an assembly brick
2103.07552 (2021-03)
Few-Shot Text Classification with Triplet Networks, Data Augmentation, and Curriculum Learning
2109.05941 (2021-09)
Efficient Contrastive Learning via Novel Data Augmentation and Curriculum Learning
2406.17975 (2024-06)
SoK: Membership Inference Attacks on LLMs are Rushing Nowhere (and How to Fix It)

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 rapid advancements of Large Language Models (LLMs) tightly associate with the expansion of the training data size. However, the unchecked ultra-large-scale training sets introduce a series of potential risks like data contamination, i.e. the benchmark data is used for training. In this work, we propose a holistic method named Polarized Augment Calibration (PAC) along with a new to-be-released dataset to detect the contaminated data and diminish the contamination effect. PAC extends the popular MIA (Membership Inference Attack) -- from machine learning community -- by forming a more global target at detecting training data to Clarify invisible training data. As a pioneering work, PAC is very much plug-and-play that can be integrated with most (if not all) current white- and black-box LLMs. By extensive experiments, PAC outperforms existing methods by at least 4.5%, towards data contamination detection on more 4 dataset formats, with more than 10 base LLMs. Besides, our application in real-world scenarios highlights the prominent presence of contamination and related issues.

For agents

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

get_harvested_code_for_paper("2405.11930")
get_code_for_paper("2405.11930")
have("2405.11930")

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

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

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

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

Connect an agent — have() is free.