SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.01841 · ICLR · 2024

Making Pre-trained Language Models Great on Tabular Prediction

Jimeng Sun, Bo Zheng, Jintai Chen, Yiheng Zhu, Jiahuan Yan, Jian Wu, Hongxia Xu, Danny Chen

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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 2 have no contract verdict; 2 failures of our instrument; 1 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/2403.01841.json · badge: /api/ran/2403.01841.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
jyansir/tp-berta canonical (classifier label)
classifier basis: classifier_2025
4 ran · 1 no recorded run
FunctionStatusWhere it lives
IntraFeatureAttention Ran
ran on a synthesized input
jyansir/tp-berta/bin/tpberta_modeling.py
code served (permissive licence) · get_code("230557e64812796e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float, shape (2, 1, 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 torch.nn as nn
from types import SimpleNamespace

# Create a minimal config object
config = SimpleNamespace(
    hidden_size=4,
    num_attention_heads=2,
    hidden_dropout_prob=0.1
)

INIT_ARGS = {
    'config': config
}

# For forward pass:
# - x is a tuple of (x_qk, x_v), both shape (batch_size, seq_len, hidden_size)
# - query_mask is shape (batch_size, seq_len) with 1s marking query positions
# - input_ids is shape (batch_size, seq_len)
# - pad_token_id is an int

batch_size = 2
seq_len = 3
hidden_size = 4

# Create tensors
x_qk = torch.randn(batch_size, seq_len, hidden_size)
x_v = torch.randn(batch_size, seq_len, hidden_size)

# query_mask: mark some positions as queries (1s)
# Need at least one query per batch element for valid output
query_mask = torch.tensor([
    [1, 0, 0],
    [0, 1, 0]
], dtype=torch.long)

# input_ids: avoid pad_token_id=1 in most positions
input_ids = torch.tensor([
    [2, 3, 4],
    [2, 3, 4]
], dtype=torch.long)

ARGS = {
    'x': (x_qk, x_v),
    'query_mask': query_mask,
    'input_ids': input_ids,
    'pad_token_id': 1
}

# Construct and call
if __name__ == '__main__':
    from __main__ import IntraFeatureAttention
    
    model = IntraFeatureAttention(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
__main__, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 1, 4) — shape (2, 1, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
TPBertaEmbeddings Ran
ran on a synthesized input
jyansir/tp-berta/bin/tpberta_modeling.py
code served (permissive licence) · get_code("1b322deb5db251fa")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
from transformers import RobertaConfig
from transformers.models.roberta.modeling_roberta import RobertaEmbeddings

# Create a minimal RobertaConfig
config = RobertaConfig(
    vocab_size=100,
    hidden_size=16,
    num_hidden_layers=2,
    num_attention_heads=2,
    intermediate_size=32,
    max_position_embeddings=64,
    type_vocab_size=2,
    hidden_dropout_prob=0.1,
    attention_probs_dropout_prob=0.1,
    position_embedding_type='absolute'
)

INIT_ARGS = {
    'config': config
}

batch_size = 2
seq_length = 5

ARGS = {
    'input_ids': torch.randint(0, config.vocab_size, (batch_size, seq_length)),
    'input_scales': torch.randn(batch_size, seq_length),
    'token_type_ids': torch.randint(0, config.type_vocab_size, (batch_size, seq_length)),
    'position_ids': torch.arange(seq_length).unsqueeze(0).expand(batch_size, -1)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
append_prompt Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jyansir/tp-berta/bin/tpberta_modeling.py
code served (permissive licence) · get_code("f661e5495b08960b")
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) and returned Tensor, ndim 3, dtype family float, shape (2, 8, 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

torch.manual_seed(0)

# Create a small input tensor: batch_size=2, sequence_length=5, embedding_dim=4
x = torch.randn(2, 5, 4)

# Create a prompt tensor: batch_size=1, prompt_length=3, embedding_dim=4
# The function will repeat it to match batch size if needed
prompt = torch.randn(1, 3, 4)

ARGS = {
    "x": x,
    "prompt": prompt,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 3, dtype family float, shape (2, 8, 4) — shape (2, 8, 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
fetch_dataset_list Ran
ran; our contract draft was wrong, not the code
jyansir/tp-berta/scripts/pretrain/pretrain_tpberta.py
code served (permissive licence) · get_code("9289df93f2f908b7")
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) 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 os
import json
import tempfile
from pathlib import Path

# Create a temporary directory with test CSV files
temp_dir = tempfile.mkdtemp()
data_dir = Path(temp_dir)

# Create some test CSV files
csv_files = ['dataset1.csv', 'dataset2.csv', 'dataset3.csv', 'skip_me.csv']
for csv_file in csv_files:
    (data_dir / csv_file).touch()

# Create a skip_datasets.json file
skip_datasets = ['skip']
with open(data_dir / 'skip_datasets.json', 'w') as f:
    json.dump(skip_datasets, f)

ARGS = {
    'data_dir': data_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
TPBerta Not yet run
unverified (harvested, no recorded run)
jyansir/tp-berta/bin/tpberta_modeling.py
code served (permissive licence) · get_code("2e4d8ed31f4b7587")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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 4 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
fetch_dataset_list 1 other paper
1 dated earlier
2307.04308 (2023-07)
Towards Cross-Table Masked Pretraining for Web Data Mining

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 transferability of deep neural networks (DNNs) has made significant progress in image and language processing. However, due to the heterogeneity among tables, such DNN bonus is still far from being well exploited on tabular data prediction (e.g., regression or classification tasks). Condensing knowledge from diverse domains, language models (LMs) possess the capability to comprehend feature names from various tables, potentially serving as versatile learners in transferring knowledge across distinct tables and diverse prediction tasks, but their discrete text representation space is inherently incompatible with numerical feature values in tables. In this paper, we present TP-BERTa, a specifically pre-trained LM for tabular data prediction. Concretely, a novel relative magnitude tokenization converts scalar numerical feature values to finely discrete, high-dimensional tokens, and an intra-feature attention approach integrates feature values with the corresponding feature names. Comprehensive experiments demonstrate that our pre-trained TP-BERTa leads the performance among tabular DNNs and is competitive with Gradient Boosted Decision Tree models in typical tabular data regime.

For agents

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

get_harvested_code_for_paper("2403.01841")
get_code_for_paper("2403.01841")
have("2403.01841")

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

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

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

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

Connect an agent — have() is free.