SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.06209 · 2024

Elephants Never Forget: Memorization and Learning of Tabular Data in Large Language Models

arXiv · PDF · Open in the Atlas

Code that ran

11 of 11 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; 11 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/2404.06209.json · badge: /api/ran/2404.06209.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
interpretml/llm-tabular-memorization-checker canonical (classifier label)
classifier basis: census
11 ran · 0 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
interpretml/llm-tabular-memorization-checker/colm-2024-paper-code/statutils.py
code served (permissive licence) · get_code("16ba085a47db0f85")
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 small sample data for labels and predictions
labels = np.array([0, 1, 1, 0, 1, 0, 1, 1])
predictions = np.array([0, 1, 1, 0, 0, 0, 1, 1])

ARGS = {
    'labels': labels,
    'predictions': predictions,
    'verbose': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, sklearn — 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
apply_transform Ran
ran; our contract draft was wrong, not the code
interpretml/llm-tabular-memorization-checker/tabmemcheck/datasets/load.py
code served (permissive licence) · get_code("6bd8df53f13381fc")
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
import copy

# Define transformation functions to register
def scale_transform(values, scale_factor=1.0, seed=None):
    """Scale values by a factor"""
    if seed is not None:
        np.random.seed(seed)
    return values * scale_factor

def add_noise_transform(values, noise_level=0.1, seed=None):
    """Add Gaussian noise to values"""
    if seed is not None:
        np.random.seed(seed)
    noise = np.random.normal(0, noise_level, size=values.shape)
    return values + noise

def clip_transform(values, min_val=0, max_val=1, seed=None):
    """Clip values to a range"""
    return np.clip(values, min_val, max_val)

# Create a sample DataFrame
df = pd.DataFrame({
    'feature_a': np.array([1.0, 2.0, 3.0, 4.0]),
    'feature_b': np.array([0.1, 0.2, 0.3, 0.4]),
    'feature_c': np.array([10.0, 20.0, 30.0, 40.0])
})

# Create methods register
methods_register = {
    'scale': scale_transform,
    'add_noise': add_noise_transform,
    'clip': clip_transform
}

# Create a transformation schedule
schedule = [
    {
        'name': 'feature_a',
        'type': 'scale',
        'scale_factor': 2.0
    },
    {
        'name': ['feature_b', 'feature_c'],
        'type': 'add_noise',
        'noise_level': 0.05
    },
    {
        'name': 'feature_c',
        'type': 'clip',
        'min_val': 5.0,
        'max_val': 35.0
    }
]

ARGS = {
    'df': df,
    'schedule': schedule,
    'methods_register': methods_register,
    'seed': 42
}
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
claude_setup Ran
ran; our contract draft was wrong, not the code
interpretml/llm-tabular-memorization-checker/tabmemcheck/llm.py
code served (permissive licence) · get_code("c2b405b9b0e0b6f9")
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 ClaudeAnthropicLLM. 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

# Mock the anthropic module since we can't make real API calls
class MockMessage:
    def __init__(self, text):
        self.content = [type('obj', (object,), {'text': text})]

class MockMessages:
    def create(self, **kwargs):
        return MockMessage("Mock response from Claude")

class MockAnthropic:
    def __init__(self, api_key=None):
        self.api_key = api_key
        self.messages = MockMessages()

# Monkey-patch the anthropic module
import sys
anthropic_module = type(sys)('anthropic')
anthropic_module.Anthropic = MockAnthropic
sys.modules['anthropic'] = anthropic_module

# Set up environment for the function
os.environ['ANTHROPIC_API_KEY'] = 'test-api-key-12345'

# Define arguments for claude_setup
ARGS = {
    'model': 'claude-3-sonnet-20240229',
    'api_key': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
anthropic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ClaudeAnthropicLLM — a ClaudeAnthropicLLM output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ClaudeAnthropicLLM 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
fit_logistic_regression_cv Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
interpretml/llm-tabular-memorization-checker/colm-2024-paper-code/statutils.py
code served (permissive licence) · get_code("c98c5fd398edb05e")
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 Pipeline. 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 sklearn.preprocessing import StandardScaler
from sklearn.pipeline import Pipeline
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import StratifiedKFold, RandomizedSearchCV, train_test_split
from scipy.stats import uniform

# Create small synthetic data
np.random.seed(42)
n_samples = 20
n_features = 4

X_train = np.random.randn(n_samples, n_features).astype(np.float32)
y_train = np.random.randint(0, 2, n_samples).astype(np.float32)

ARGS = {
    'X_train': X_train,
    'y_train': y_train,
    'num_splits': 5,
    'scoring': 'accuracy',
    'random_state': 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Pipeline — a Pipeline output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Pipeline output the recorded ndim 1 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
format_data_point Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
interpretml/llm-tabular-memorization-checker/colm-2024-paper-code/tabular_queries.py
code served (permissive licence) · get_code("2691ff2e5953d672")
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 numpy as np

# Construct valid arguments for format_data_point
x = np.array([0.35, 0.82, 0.33, -1.30])
feature_names = ['X1', 'X2', 'X3', 'X4']
optional_features = {'X3'}
add_if_then = True

ARGS = {
    'x': x,
    'feature_names': feature_names,
    'optional_features': optional_features,
    'add_if_then': add_if_then
}
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 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
gemini_setup Ran
ran; our contract draft was wrong, not the code
interpretml/llm-tabular-memorization-checker/tabmemcheck/llm.py
code served (permissive licence) · get_code("cce4367cc3f4f2d0")
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 GoogleGeminiLLM. 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
from unittest.mock import Mock, MagicMock, patch

# Mock the google.generativeai module since we can't actually use it
mock_genai = MagicMock()
mock_response = Mock()
mock_response.text = "This is a mock response from Gemini"
mock_genai.GenerativeModel.return_value.generate_content.return_value = mock_response
mock_genai.types.GenerationConfig = Mock(return_value={})

import sys
sys.modules['google'] = MagicMock()
sys.modules['google.generativeai'] = mock_genai

# Set up environment variable for API key
os.environ['GEMINI_API_KEY'] = 'test_api_key_12345'

# Define arguments for gemini_setup function
ARGS = {
    'model': 'gemini-pro',
    'api_key': 'test_api_key_12345'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
google — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GoogleGeminiLLM — a GoogleGeminiLLM output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GoogleGeminiLLM 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
get_dataset_name Ran
ran; our contract draft was wrong, not the code
interpretml/llm-tabular-memorization-checker/tabmemcheck/utils.py
code served (permissive licence) · get_code("671a4a5cd18f9f00")
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 os

def get_dataset_name(csv_file):
    """Returns the name of the dataset."""
    return os.path.splitext(os.path.basename(csv_file))[0]

ARGS = {
    "csv_file": "/path/to/my_dataset.csv"
}
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 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
openai_setup Ran
ran; our contract draft was wrong, not the code
interpretml/llm-tabular-memorization-checker/tabmemcheck/llm.py
code served (permissive licence) · get_code("cbcb22e2d695eba2")
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 OpenAILLM. 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
from unittest.mock import MagicMock, patch
from openai import OpenAI, AzureOpenAI

# Set up environment variables
os.environ['OPENAI_API_KEY'] = 'sk-test-key-12345'
os.environ['OPENAI_API_ORG'] = 'org-test-12345'
os.environ['AZURE_OPENAI_ENDPOINT'] = 'https://test.openai.azure.com/'
os.environ['AZURE_OPENAI_KEY'] = 'azure-test-key-12345'
os.environ['AZURE_OPENAI_VERSION'] = '2023-05-15'

# Mock the OpenAI client to avoid actual API calls
mock_openai_client = MagicMock(spec=OpenAI)
mock_azure_client = MagicMock(spec=AzureOpenAI)

ARGS = {
    'model': 'gpt-3.5-turbo-0613',
    'azure': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, tenacity — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OpenAILLM — a OpenAILLM output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OpenAILLM 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
rename_and_recode Ran
ran; our contract draft was wrong, not the code
interpretml/llm-tabular-memorization-checker/tabmemcheck/datasets/load.py
code served (permissive licence) · get_code("f9c04ea44364990e")
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 with features to rename and recode
df = pd.DataFrame({
    'age': [1, 2, 1, 2, 1],
    'gender': ['M', 'F', 'M', 'F', 'M'],
    'income': [10, 20, 10, 30, 20]
})

# Dictionary mapping old column names to new column names
rename = {
    'age': 'age_years',
    'gender': 'sex'
}

# Dictionary mapping feature names to their recode mappings
recode = {
    'age': {1: 'young', 2: 'old'},
    'gender': {'M': 'Male', 'F': 'Female'}
}

ARGS = {
    'df': df,
    'rename': rename,
    'recode': recode
}
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
roc_auc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
interpretml/llm-tabular-memorization-checker/colm-2024-paper-code/statutils.py
code served (permissive licence) · get_code("be58358dc4b19f7d")
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 small binary classification data
np.random.seed(0)
n_samples = 10

# Labels: binary (0 or 1)
labels = np.random.randint(0, 2, size=n_samples)

# Predictions: probabilities between 0 and 1
predictions = np.random.rand(n_samples)

ARGS = {
    'labels': labels,
    'predictions': predictions,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, sklearn — 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
string_strip Ran
ran; our contract draft was wrong, not the code
interpretml/llm-tabular-memorization-checker/tabmemcheck/analysis.py
code served (permissive licence) · get_code("1f6b41345e9e24f0")
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 pandas as pd
import numpy as np

# Test case 1: DataFrame input
df_input = pd.DataFrame({
    'col1': ['  hello  ', '  world  '],
    'col2': ['  foo  ', '  bar  ']
})

# Test case 2: Series input
series_input = pd.Series(['  test  ', '  data  '])

# Test case 3: String input
string_input = '  strip me  '

# Create ARGS dict - the function takes one parameter 'x'
# We'll use the string input as the primary test case
ARGS = {
    'x': string_input
}
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 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

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 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 11 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

While many have shown how Large Language Models (LLMs) can be applied to a diverse set of tasks, the critical issues of data contamination and memorization are often glossed over. In this work, we address this concern for tabular data. Specifically, we introduce a variety of different techniques to assess whether a language model has seen a tabular dataset during training. This investigation reveals that LLMs have memorized many popular tabular datasets verbatim. We then compare the few-shot learning performance of LLMs on datasets that were seen during training to the performance on datasets released after training. We find that LLMs perform better on datasets seen during training, indicating that memorization leads to overfitting. At the same time, LLMs show non-trivial performance on novel datasets and are surprisingly robust to data transformations. We then investigate the in-context statistical learning abilities of LLMs. While LLMs are significantly better than random at solving statistical classification problems, the sample efficiency of few-shot learning lags behind traditional statistical learning algorithms, especially as the dimension of the problem increases. This suggests that much of the observed few-shot performance on novel real-world datasets is due to the LLM's world knowledge. Overall, our results highlight the importance of testing whether an LLM has seen an evaluation dataset during pre-training. We release the https://github.com/interpretml/LLM-Tabular-Memorization-Checker Python package to test LLMs for memorization of tabular datasets.

For agents

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

get_harvested_code_for_paper("2404.06209")
get_code_for_paper("2404.06209")
have("2404.06209")

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

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

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

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

Connect an agent — have() is free.