SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.30258 · 2026

KnowsTFM: Knowledge-Informed Fine-Tuning of Small Tabular Foundation Models

Nikola Simidjievski, Mateja Jamnik, Xiangjian Jiang, Boshko Koloski, Blaž Škrlj, Senja Pollak

arXiv · PDF · Open in the Atlas

Code that ran

9 of 18 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 2 failures of our instrument; 9 no recorded run), measured 2026-11-23; 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/2606.30258.json · badge: /api/ran/2606.30258.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
sherbold/autorank canonical (classifier label)
classifier basis: census
0 ran · 6 no recorded run
automl/TFM-Playground community
Papers with Code archive
9 ran · 3 no recorded run
FunctionStatusWhere it lives
Decoder Ran
ran on a synthesized input
automl/TFM-Playground/tfmplayground/interface.py
code served (permissive licence) · get_code("ad9bb81ac0233792")
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, 5, 3) 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.functional as F
from torch import nn

class Decoder(nn.Module):

    def __init__(self, embedding_size: int, mlp_hidden_size: int, num_outputs: int):
        """Initializes the linear layers for use in the forward"""
        super().__init__()
        self.linear1 = nn.Linear(embedding_size, mlp_hidden_size)
        self.linear2 = nn.Linear(mlp_hidden_size, num_outputs)

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        """
        Applies an MLP to the embeddings to get the logits

        Args:
            x: (torch.Tensor) a tensor of shape (batch_size, num_rows, embedding_size)
        Returns:
            (torch.Tensor) a tensor of shape (batch_size, num_rows, num_outputs)
        """
        return self.linear2(F.gelu(self.linear1(x)))


INIT_ARGS = {
    'embedding_size': 4,
    'mlp_hidden_size': 8,
    'num_outputs': 3,
}

ARGS = {
    'x': torch.randn(2, 5, 4),
}

decoder = Decoder(**INIT_ARGS)
output = decoder(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Expected shape: (2, 5, 3)")
assert output.shape == (2, 5, 3), f"Shape mismatch: got {output.shape}"
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 5, 3) — shape (2, 5, 3) 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)
FeatureEncoder Ran
ran on a synthesized input
automl/TFM-Playground/tfmplayground/interface.py
code served (permissive licence) · get_code("b910b63be328402b")
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 4, 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

# INIT_ARGS for FeatureEncoder.__init__
INIT_ARGS = {
    'embedding_size': 8
}

# ARGS for FeatureEncoder.forward
batch_size = 2
num_rows = 10
num_features = 5
train_test_split_index = 6

x = torch.randn(batch_size, num_rows, num_features)

ARGS = {
    'x': x,
    'train_test_split_index': train_test_split_index
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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)
TargetEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
automl/TFM-Playground/tfmplayground/interface.py
code served (permissive licence) · get_code("c73b4796b70336b9")
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 an instance of its own class, TargetEncoder: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn

torch.manual_seed(0)

class TargetEncoder(nn.Module):

    def __init__(self, embedding_size: int):
        """Creates the linear layer that we will use to embed our targets."""
        super().__init__()
        self.linear_layer = nn.Linear(1, embedding_size)

    def forward(self, y_train: torch.Tensor, num_rows: int) -> torch.Tensor:
        """
        Pads up y_train to the full length of y using the mean per dataset and then embeds it using a linear layer

        Args:
            y_train: (torch.Tensor) a tensor of shape (batch_size, num_train_datapoints, 1)
            num_rows: (int) the full length of y
        Returns:
            (torch.Tensor) a tensor of shape (batch_size, num_rows, 1, embedding_size), representing
                           the embeddings of the targets
        """
        mean = torch.mean(y_train, axis=1, keepdim=True)
        padding = mean.repeat(1, num_rows - y_train.shape[1], 1)
        y = torch.cat([y_train, padding], dim=1)
        y = y.unsqueeze(-1)
        return self.linear_layer(y)


encoder = TargetEncoder(embedding_size=4)

y_train = torch.randn(2, 3, 1)
num_rows = 5

ARGS = {
    "embedding_size": 4,
}
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 TargetEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TargetEncoder 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
TransformerEncoderLayer Ran
ran on a synthesized input · constructed an object; no result was computed
automl/TFM-Playground/tfmplayground/interface.py
code served (permissive licence) · get_code("19718d01dfd3f3c5")
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 an instance of its own class, TransformerEncoderLayer: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
from torch.nn.modules.transformer import LayerNorm, Linear, MultiheadAttention

torch.manual_seed(0)

# Define arguments for TransformerEncoderLayer.__init__
ARGS = {
    "embedding_size": 8,
    "nhead": 2,
    "mlp_hidden_size": 16,
    "layer_norm_eps": 1e-05,
    "batch_first": True,
    "device": None,
    "dtype": None,
}
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 TransformerEncoderLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TransformerEncoderLayer 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_default_device Ran
ran on a synthesized input
automl/TFM-Playground/tfmplayground/interface.py
code served (permissive licence) · get_code("fbe87b5d365297a4")
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. 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 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)

# This function takes no parameters, so ARGS is an empty dict
ARGS = {}
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 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
get_feature_preprocessor Ran
ran; our contract draft was wrong, not the code
automl/TFM-Playground/tfmplayground/interface.py
code served (permissive licence) · get_code("d3b725f252a6c8c2")
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 ColumnTransformer. 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
import pandas as pd
from sklearn.compose import ColumnTransformer
from sklearn.impute import SimpleImputer
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import FunctionTransformer, OrdinalEncoder

# Create a small dataset with mixed numeric and categorical features
# 2 rows, 4 columns: 2 numeric, 2 categorical
data = {
    'num_col1': [1.0, 2.5],
    'num_col2': [3.0, np.nan],
    'cat_col1': ['a', 'b'],
    'cat_col2': ['x', 'y']
}

X = pd.DataFrame(data)

ARGS = {
    'X': X
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ColumnTransformer — a ColumnTransformer output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ColumnTransformer 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
memory_chunking Ran
ran; our contract draft was wrong, not the code
automl/TFM-Playground/tfmplayground/interface.py
code served (permissive licence) · get_code("9118675a724e51b4")
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 function. 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 math
import warnings
from collections.abc import Callable

torch.manual_seed(0)

def memory_chunking(num_mem_chunks: int) -> callable:
    """
    This decorator will split the first dimension of the input into chunks and apply the wrapped function
    to each chunk separately.
    Args:
        num_mem_chunks: (int) Number of chunks to split the input into, higher values use less memory but are slower.
                          Needs to be set to 1 during training to disable chunking and get correct gradients.
    """

    def decorator(func: Callable[[torch.Tensor], torch.Tensor]) -> Callable[[torch.Tensor], torch.Tensor]:

        def wrapper(x: torch.Tensor) -> torch.Tensor:
            if num_mem_chunks <= 1 or x.shape[0] == 0:
                return func(x)
            elif torch.is_grad_enabled():
                warnings.warn('Memory chunking is disabled since gradient computation is enabled to avoid incorrect gradients. Please use `with torch.no_grad():` during inference to enable chunking.', stacklevel=2)
                return func(x)
            chunk_size = max(1, math.ceil(x.shape[0] / num_mem_chunks))
            for x_split in torch.split(x, split_size_or_sections=chunk_size, dim=0):
                x_split[:] = func(x_split)
            return x
        return wrapper
    return decorator


# Create a simple test function that the decorator will wrap
def simple_func(x: torch.Tensor) -> torch.Tensor:
    """A simple function that applies a transformation to the input tensor."""
    return x * 2.0


ARGS = {
    "num_mem_chunks": 2
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
to_numeric Ran
ran, honoured the contract we drafted
automl/TFM-Playground/tfmplayground/interface.py
code served (permissive licence) · get_code("54455a5aa0782cf7")
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, shape (6,) 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 pandas as pd
import numpy as np

# The function takes a pandas Series (or DataFrame column)
# and applies pd.to_numeric with errors='coerce', then converts to numpy
# We need to pass an object x that has .apply() method and returns something with .to_numpy()

# Create a simple pandas Series with mixed numeric and non-numeric strings
x = pd.Series(['1', '2.5', 'invalid', '4', None, '6.7'])

ARGS = {
    'x': x
}
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 ndarray, ndim 1, dtype family float, shape (6,) — shape (6,) 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
to_pandas Ran
ran, honoured the contract we drafted
automl/TFM-Playground/tfmplayground/interface.py
code served (permissive licence) · get_code("9dc2885a379ecd43")
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

torch_seed = 0

# Analyze the function:
# - to_pandas(x) takes one parameter 'x'
# - It checks if x is already a pd.DataFrame
# - If not, it converts x to pd.DataFrame via pd.DataFrame(x)
# - If already DataFrame, returns it as-is

# We need to provide a value for 'x' that can be converted to a DataFrame
# Valid inputs to pd.DataFrame include: dict, list of lists, numpy array, etc.

# Create a simple numpy array that pd.DataFrame can consume
x_value = np.array([[1, 2, 3, 4],
                    [5, 6, 7, 8]])

ARGS = {
    "x": x_value
}
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 int 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
NanoTabPFNClassifier Not yet run
unverified (harvested, no recorded run)
automl/TFM-Playground/tfmplayground/interface.py
code served (permissive licence) · get_code("ff7f2aac8666d59f")
How it ran

no invocation recorded.

NanoTabPFNModel Not yet run
unverified (harvested, no recorded run)
automl/TFM-Playground/tfmplayground/interface.py
code served (permissive licence) · get_code("a3f03d029b7d3e1a")
How it ran

no invocation recorded.

autorank Not yet run
unverified (harvested, no recorded run)
sherbold/autorank/autorank/autorank.py
code served (permissive licence) · get_code("3aab250e4038f2cf")
How it ran

no invocation recorded.

create_report Not yet run
unverified (harvested, no recorded run)
sherbold/autorank/autorank/autorank.py
code served (permissive licence) · get_code("0ef55240706a974a")
How it ran

no invocation recorded.

init_model_from_state_dict_file Not yet run
unverified (harvested, no recorded run)
automl/TFM-Playground/tfmplayground/interface.py
code served (permissive licence) · get_code("4ca132d539ceb603")
How it ran

no invocation recorded.

plot_stats Not yet run
unverified (harvested, no recorded run)
sherbold/autorank/autorank/autorank.py
code served (permissive licence) · get_code("3684ef470a3695a4")
How it ran

no invocation recorded.

rank_multiple_nonparametric Not yet run
unverified (harvested, no recorded run)
sherbold/autorank/autorank/_util.py
code served (permissive licence) · get_code("b79aea7b20975420")
How it ran

no invocation recorded.

rank_multiple_normal_homoscedastic Not yet run
unverified (harvested, no recorded run)
sherbold/autorank/autorank/_util.py
code served (permissive licence) · get_code("52e5a9122fc741cf")
How it ran

no invocation recorded.

rank_two Not yet run
unverified (harvested, no recorded run)
sherbold/autorank/autorank/_util.py
code served (permissive licence) · get_code("27ee4b12fa3728b3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 16 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
Decoder
brick of this paper's assembly: helper
1 other paper
1 later
2608.14211 (2026-08)
Training Fair Tabular Foundation Models
TargetEncoder
brick of this paper's assembly: helper
1 other paper
1 later
2608.14211 (2026-08)
Training Fair Tabular Foundation Models

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

Tabular foundation models have advanced deep learning for tabular data by delivering strong default performance across many small and medium tasks. Yet in niche domains, where data is scarce, high-dimensional, and shifted from the pretraining distribution, they may still fail to outperform carefully designed domain-specific methods. Many such domains also provide curated relational knowledge in the form of knowledge graphs and knowledge banks, but how to use this knowledge to improve and steer small specialist tabular foundation models remains unclear. We address this problem through Knowledge-informed fine-tuning of small Tabular Foundation Models (KnowsTFM). Specifically, we study nanoscale TabPFN-and TabICL-style variants, pretrained under controlled synthetic prior families and adapted using two complementary mechanisms: structural attention priors derived from knowledge graphs and parameter-efficient low-rank updates. We show that injecting domain-specific structural knowledge during fine-tuning yields meaningful gains over vanilla variants in specialist settings, whereas gains on general-domain tasks are marginal. We further observe that continual fine-tuning of frontier models can trigger collapse of pretrained knowledge and mechanisms.

For agents

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

get_harvested_code_for_paper("2606.30258")
get_code_for_paper("2606.30258")
have("2606.30258")

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

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

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

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

Connect an agent — have() is free.