SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.02349 · ACL · 2020

TAPAS: Weakly Supervised Table Parsing via Pre-training

Julian Eisenschlos, Jonathan Herzig, Francesco Piccinno, Paweł Nowak, Thomas Üller

arXiv · PDF · Open in the Atlas

Code that ran

14 of 14 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; 2 honoured the contract we drafted, 0 violated it and 10 have no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-21; 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/2004.02349.json · badge: /api/ran/2004.02349.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
kamalkraj/TAPAS-TF2 community (classifier label)
classifier basis not recorded on the link
14 ran · 0 no recorded run
FunctionStatusWhere it lives
convert_to_float Ran
ran, honoured the contract we drafted
kamalkraj/TAPAS-TF2/tapas/utils/text_utils.py
code served (permissive licence) · get_code("86f83c07342e5a39")
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 float, ndim 0, dtype family float, shape () 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 six

# Test cases for convert_to_float function
# The function takes a single parameter 'value' which can be:
# - float
# - int
# - string (with various number formats)

ARGS = {
    "value": "1,234.56"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () 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
flatten Ran
ran on a synthesized input
kamalkraj/TAPAS-TF2/tapas/models/segmented_tensor.py
code served (permissive licence) · get_code("3afaf4fe080fb374")
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 IndexMap. 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 tensorflow as tf

class IndexMap(object):
    """Index grouping entries within a tensor."""

    def __init__(self, indices, num_segments, batch_dims=0):
        """Creates an index.

        Args:
          indices: <int32> Tensor of indices, same shape as `values`.
          num_segments: <int32> Scalar tensor, the number of segments. All elements
            in a batched segmented tensor must have the same number of segments
            (although many segments can be empty).
          batch_dims: Python integer, the number of batch dimensions. The first
            `batch_dims` dimensions of a SegmentedTensor are treated as batch
            dimensions. Segments in different batch elements are always distinct
            even if they have the same index.
        """
        self.indices = tf.convert_to_tensor(indices)
        self.num_segments = tf.convert_to_tensor(num_segments)
        self.batch_dims = batch_dims

    def batch_shape(self):
        return tf.shape(self.indices)[:self.batch_dims]

def flatten(index, name='segmented_flatten'):
    """Flattens a batched index map to a 1d index map.

    This operation relabels the segments to keep batch elements distinct. The k-th
    batch element will have indices shifted by `num_segments` * (k - 1). The
    result is a tensor with `num_segments` multiplied by the number of elements
    in the batch.

    Args:
      index: IndexMap to flatten.
      name: Name for the TensorFlow operation.

    Returns:
      The flattened IndexMap.
    """
    batch_size = tf.reduce_prod(index.batch_shape())
    offset = tf.range(batch_size) * index.num_segments
    offset = tf.reshape(offset, index.batch_shape())
    for _ in range(index.batch_dims, index.indices.shape.rank):
        offset = tf.expand_dims(offset, -1)
    indices = offset + index.indices
    return IndexMap(indices=tf.reshape(indices, [-1]), num_segments=index.num_segments * batch_size, batch_dims=0)

# Create test data
# Batch shape: [2] (2 batch elements)
# Indices shape: [2, 4] (2 batches, 4 indices each)
# num_segments: 3
indices_data = tf.constant([[0, 1, 2, 1], [1, 2, 0, 2]], dtype=tf.int32)
num_segments_data = tf.constant(3, dtype=tf.int32)

# Create IndexMap with batch_dims=1
index_map = IndexMap(
    indices=indices_data,
    num_segments=num_segments_data,
    batch_dims=1
)

ARGS = {
    "index": index_map,
    "name": "segmented_flatten"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type IndexMap — a IndexMap output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a IndexMap 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
gather Ran
ran on a synthesized input
kamalkraj/TAPAS-TF2/tapas/models/segmented_tensor.py
code served (permissive licence) · get_code("5627e0c233b85bf2")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

class IndexMap:
    """Stand-in class for IndexMap with required attributes."""
    def __init__(self, indices, batch_dims):
        self.indices = indices
        self.batch_dims = batch_dims

# Create small example tensors
# values shape: [B1=2, num_segments=4, V1=3]
# This represents batch size 2, with 4 segments, and value dimension 3
values = tf.constant([
    [[1.0, 2.0, 3.0],
     [4.0, 5.0, 6.0],
     [7.0, 8.0, 9.0],
     [10.0, 11.0, 12.0]],
    [[13.0, 14.0, 15.0],
     [16.0, 17.0, 18.0],
     [19.0, 20.0, 21.0],
     [22.0, 23.0, 24.0]]
], dtype=tf.float32)

# index shape: [B1=2, I1=5]
# This represents indices into the 4 segments for each batch element
indices = tf.constant([
    [0, 1, 2, 3, 0],
    [1, 2, 3, 0, 1]
], dtype=tf.int32)

# Create IndexMap with batch_dims=1 (first dimension is batch)
index = IndexMap(indices=indices, batch_dims=1)

ARGS = {
    'values': values,
    'index': index,
    'name': 'segmented_gather'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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: none by the harness; any seed is in the setup block
gelu Ran
ran, honoured the contract we drafted
kamalkraj/TAPAS-TF2/tapas/models/tf_utils.py
code served (permissive licence) · get_code("44a49b752068dd08")
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 EagerTensor, ndim 2, dtype family float, shape (2, 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 math
import tensorflow as tf

# Create a small test tensor
x = tf.constant([[-2.0, -1.0, 0.0, 1.0], [0.5, -0.5, 2.0, -2.0]], dtype=tf.float32)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
get_answer_indexes Ran
ran on a synthesized input
kamalkraj/TAPAS-TF2/tapas/utils/prediction_utils.py
code served (permissive licence) · get_code("2bdc76acdd4efd43")
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 int; 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

torch.manual_seed(0)

# Build a prediction dict that matches what get_answer_indexes expects
prediction = {
    'input_ids': torch.tensor([[101, 2054, 2003, 1045]]),  # batch_size=1, seq_len=4
    'probabilities': torch.tensor([[0.9, 0.2, 0.8, 0.1]]),  # batch_size=1, seq_len=4
    'segment_ids': torch.tensor([[1, 1, 1, 0]]),  # batch_size=1, seq_len=4
    'column_ids': torch.tensor([[1, 2, 3, 0]]),  # batch_size=1, seq_len=4 (0-indexed after -1)
    'row_ids': torch.tensor([[1, 2, 1, 0]]),  # batch_size=1, seq_len=4 (0-indexed after -1)
    'span_indexes': None,
    'span_logits': None,
}

cell_classification_threshold = 0.5

ARGS = {
    'prediction': prediction,
    'cell_classification_threshold': cell_classification_threshold,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
absl, numpy, torch — 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 int — 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
get_correct_powerset Ran
ran on a synthesized input
kamalkraj/TAPAS-TF2/tapas/utils/interpretation_utils.py
code served (permissive licence) · get_code("2f4d3cb79e069b0d")
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 set. 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 itertools

torch.manual_seed(0)

# The function takes:
# - indices: an iterable of indices to create combinations from
# - values: some data that gets passed to is_correct_fn
# - is_correct_fn: a callable that takes (subset, values) and returns bool

# Create simple test data
indices = [0, 1, 2, 3]

# values can be any data structure - let's use a simple dict with tensor data
values = {
    'data': torch.randn(2, 4),
    'labels': torch.tensor([0, 1])
}

# Create a simple is_correct_fn that checks if subset has certain properties
def is_correct_fn(subset, values):
    """
    Example correctness function that returns True for subsets of certain sizes.
    This demonstrates the expected signature: (subset, values) -> bool
    """
    # Simple heuristic: subset is "correct" if it has length >= 2 and sum is even
    return len(subset) >= 2 and sum(subset) % 2 == 0

ARGS = {
    'indices': indices,
    'values': values,
    'is_correct_fn': is_correct_fn
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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_initializer Ran
ran; our contract draft was wrong, not the code
kamalkraj/TAPAS-TF2/tapas/models/modeling.py
code served (permissive licence) · get_code("d05bac24655b6e92")
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 TruncatedNormal. 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 tensorflow as tf

ARGS = {
    "initializer_range": 0.02
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TruncatedNormal — a TruncatedNormal output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TruncatedNormal 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_mean_cell_probs Ran
ran on a synthesized input
kamalkraj/TAPAS-TF2/tapas/utils/prediction_utils.py
code served (permissive licence) · get_code("0d68ef2cc5138081")
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 torch
import numpy as np

torch.manual_seed(0)

# Construct a valid prediction dict for get_mean_cell_probs
# The function expects:
# - prediction['probabilities'][0] -> tensor that can call .numpy()
# - prediction['segment_ids'][0][i] -> tensor that can call .numpy()
# - prediction['column_ids'][0][i] -> tensor that can call .numpy()
# - prediction['row_ids'][0][i] -> tensor that can call .numpy()

# Create tensors with batch size 1 (outer dimension), sequence length 5
batch_size = 1
seq_length = 5

# probabilities: shape (1, 5) - probability for each token
probabilities = torch.tensor([[0.9, 0.8, 0.7, 0.85, 0.95]], dtype=torch.float32)

# segment_ids: shape (1, 5) - segment id for each token (1 means in table)
segment_ids = torch.tensor([[1, 1, 1, 0, 1]], dtype=torch.int32)

# column_ids: shape (1, 5) - column index for each token (1-indexed, so subtract 1 to get 0-indexed)
column_ids = torch.tensor([[1, 2, 1, 3, 2]], dtype=torch.int32)

# row_ids: shape (1, 5) - row index for each token (1-indexed, so subtract 1 to get 0-indexed)
row_ids = torch.tensor([[1, 1, 2, 2, 3]], dtype=torch.int32)

prediction = {
    'probabilities': probabilities,
    'segment_ids': segment_ids,
    'column_ids': column_ids,
    'row_ids': row_ids,
}

ARGS = {
    'prediction': prediction,
}
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 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
is_ordinal Ran
ran on a synthesized input
kamalkraj/TAPAS-TF2/tapas/utils/number_utils.py
code served (permissive licence) · get_code("cfe3053c233813ea")
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 bool, ndim 0, dtype family float, shape () 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 math

_ORDINAL_WORDS = ['zeroth', 'first', 'second', 'third', 'fourth', 'fith', 'sixth', 'seventh', 'eighth', 'ninth', 'tenth', 'eleventh', 'twelfth']

_ORDINAL_SUFFIXES = ['st', 'nd', 'rd', 'th']

_INF = float('INF')

def _parse_number(text):
    """Parses simple cardinal and ordinals numbers."""
    for suffix in _ORDINAL_SUFFIXES:
        if text.endswith(suffix):
            text = text[:-len(suffix)]
            break
    text = text.replace(',', '')
    try:
        value = float(text)
    except ValueError:
        return None
    if math.isnan(value):
        return None
    if value == _INF:
        return None
    return value

def is_ordinal(text):
    if text in _ORDINAL_WORDS:
        return True
    if not _parse_number(text):
        return False
    for suffix in _ORDINAL_SUFFIXES:
        if text.endswith(suffix):
            return True
    return False

# Test cases for the is_ordinal function
ARGS = {
    'text': 'first'
}
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 bool, ndim 0, dtype family float, shape () — shape () 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
pack_inputs Ran
ran on a synthesized input
kamalkraj/TAPAS-TF2/tapas/models/tf_utils.py
code served (permissive licence) · get_code("8c8db6c2cff0952b")
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 tensorflow as tf
import numpy as np

# Create test inputs for pack_inputs function
# The function expects a list of tensors (or None values)

# Create various tensor inputs
tensor1 = tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)
tensor2 = tf.constant([10, 20, 30, 40], dtype=tf.int32)
tensor3 = None  # Test the None case
tensor4 = tf.constant([[[1, 2], [3, 4]]], dtype=tf.int64)

# Create inputs list with mix of tensors and None
inputs_list = [tensor1, tensor2, tensor3, tensor4]

ARGS = {
    "inputs": inputs_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — 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
range_index_map Ran
ran on a synthesized input
kamalkraj/TAPAS-TF2/tapas/models/segmented_tensor.py
code served (permissive licence) · get_code("4617c8d5aef65a35")
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 IndexMap. 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 tensorflow as tf

# Set up seed for reproducibility
tf.random.set_seed(0)

# Define arguments for range_index_map function
batch_shape = tf.constant([2, 3], dtype=tf.int32)  # 2D batch shape
num_segments = tf.constant(4, dtype=tf.int32)      # scalar: 4 segments

ARGS = {
    'batch_shape': batch_shape,
    'num_segments': num_segments,
    'name': 'range_index_map'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type IndexMap — a IndexMap output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a IndexMap 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
swish Ran
ran on a synthesized input
kamalkraj/TAPAS-TF2/tapas/models/tf_utils.py
code served (permissive licence) · get_code("c2414a1393c4800e")
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 EagerTensor, ndim 2, 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 tensorflow as tf
import numpy as np

# Create a small tensor for the features parameter
features = tf.constant([
    [-1.5, 0.0, 1.5, 2.0],
    [0.5, -0.5, 1.0, -2.0]
], dtype=tf.float32)

ARGS = {
    "features": features
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py recorded SymbolicTensor ndim 2, 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
tokenize_string Ran
ran; our contract draft was wrong, not the code
kamalkraj/TAPAS-TF2/tapas/utils/text_utils.py
code served (permissive licence) · get_code("84b82f831409eb64")
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 re

_TOKENIZER = re.compile('\\w+|[^\\w\\s]+', re.UNICODE)

def tokenize_string(x):
    return list(_TOKENIZER.findall(x.lower()))

ARGS = {
    'x': "Hello, World! This is a TEST string."
}
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
wtq_normalize Ran
ran on a synthesized input
kamalkraj/TAPAS-TF2/tapas/utils/text_utils.py
code served (permissive licence) · get_code("a266b518abe797d8")
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 re
import unicodedata
import six

# Test with various input types
ARGS = {
    "x": "Hello World"
}

# Alternative test cases could include:
# "x": 42
# "x": u"Café"
# "x": "Test [1] with footnotes"
# "x": '"quoted text"'
# "x": "Text–with–dashes"
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six — 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 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 4 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 4 later) and 10 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
get_initializer 6 other papers
4 dated earlier, 2 later · 1 only as an assembly brick
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1909.05017 (2019-09)
Question Generation by Transformers
1909.11942 (2019-09)
ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
and 3 more not named here
convert_to_float 2 other papers
2 later
2104.08303 (2021-04)
Capturing Row and Column Semantics in Transformer Based Question Answering over Tables
2306.14321 (2023-06)
ROBUT: A Systematic Study of Table QA Robustness Against Human-Annotated Adversarial Perturbations
gelu 2 other papers
1 dated earlier, 1 later
1909.05017 (2019-09)
Question Generation by Transformers
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
tokenize_string 1 other paper
1 later
2104.08303 (2021-04)
Capturing Row and Column Semantics in Transformer Based Question Answering over Tables

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-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Answering natural language questions over tables is usually seen as a semantic parsing task. To alleviate the collection cost of full logical forms, one popular approach focuses on weak supervision consisting of denotations instead of logical forms. However, training semantic parsers from weak supervision poses difficulties, and in addition, the generated logical forms are only used as an intermediate step prior to retrieving the denotation. In this paper, we present TAPAS, an approach to question answering over tables without generating logical forms. TAPAS trains from weak supervision, and predicts the denotation by selecting table cells and optionally applying a corresponding aggregation operator to such selection. TAPAS extends BERT's architecture to encode tables as input, initializes from an effective joint pre-training of text segments and tables crawled from Wikipedia, and is trained end-to-end. We experiment with three different semantic parsing datasets, and find that TAPAS outperforms or rivals semantic parsing models by improving state-of-the-art accuracy on SQA from 55.1 to 67.2 and performing on par with the state-of-the-art on WIKISQL and WIKITQ, but with a simpler model architecture. We additionally find that transfer learning, which is trivial in our setting, from WIK-ISQL to WIKITQ, yields 48.7 accuracy, 4.2 points above the state-of-the-art.

For agents

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

get_harvested_code_for_paper("2004.02349")
get_code_for_paper("2004.02349")
have("2004.02349")

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

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

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

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

Connect an agent — have() is free.