SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.04398 · ICLR · 2024

Chain-of-Table: Evolving Tables in the Reasoning Chain for Table Understanding

Chun-Liang Li, Chen-Yu Lee, Julian Eisenschlos, Tomas Pfister, Zilong Wang, Hao Zhang, Zifeng Wang, Jingbo Shang, Vincent Perot, Lesly Miculicich, Yasuhisa Fujii, Alej Rank

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 2 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/2401.04398.json · badge: /api/ran/2401.04398.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
google-research/chain-of-table community
Papers with Code archive
6 ran · 2 no recorded run
FunctionStatusWhere it lives
get_act_func Ran
ran; our contract draft was wrong, not the code
google-research/chain-of-table/utils/chain.py
code served (permissive licence) · get_code("45acaa0c0daeb958")
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 copy

def get_act_func(name):
    try:
        return eval(f'{name}_act')
    except:

        def _default_act(table_text, *args, **kwargs):
            return copy.deepcopy(table_text)
        if 'query' not in name:
            print('Unknown operation: ', name)
        return _default_act


ARGS = {
    'name': 'unknown_operation'
}
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 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
get_all_operation_names Ran
ran; our contract draft was wrong, not the code
google-research/chain-of-table/utils/chain.py
code served (permissive licence) · get_code("4f44bc316c51d136")
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

def get_all_operation_names(string):
    operation_names = []
    parts = string.split('->')
    for part in parts:
        part = part.strip()
        if part == '<END>':
            operation_names.append('<END>')
        else:
            res = re.findall('f_(.*?)\\(.*\\)', part)
            if res:
                operation_names.append(res[0])
    return operation_names

# The function takes a single parameter: string
# It parses the string by splitting on '->', then looks for patterns like 'f_<name>(...)'
# We need to construct a valid string that demonstrates the function's behavior

ARGS = {
    'string': 'f_add(x, y) -> f_multiply(a, b) -> <END>'
}
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
get_operation_name Ran
ran; our contract draft was wrong, not the code
google-research/chain-of-table/utils/chain.py
code served (permissive licence) · get_code("12b7d0b6f145ce34")
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

def get_operation_name(string):
    res = re.findall('f_(.*?)\\(.*\\)', string)[0]
    return res

# The function takes a single parameter 'string' and uses re.findall to extract
# operation names from strings matching the pattern 'f_<name>(...)'
# We need to provide a valid string that matches this pattern.

ARGS = {
    'string': 'f_conv2d(input, weight)'
}
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
get_table_info Ran
ran; our contract draft was wrong, not the code
google-research/chain-of-table/utils/chain.py
code served (permissive licence) · get_code("300d8824cd24e444")
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 copy

def get_act_func(name):
    try:
        return eval(f'{name}_act')
    except:
        def _default_act(table_text, *args, **kwargs):
            return copy.deepcopy(table_text)
        if 'query' not in name:
            print('Unknown operation: ', name)
        return _default_act

def get_table_info(sample, skip_op=[], first_n_op=None):
    table_text = sample['table_text']
    chain = sample['chain']
    if first_n_op is not None:
        chain = chain[:first_n_op]
    table_info = {'table_text': table_text, 'act_chain': []}
    for operation in chain:
        operation_name = operation['operation_name']
        act_func = get_act_func(operation_name)
        table_info = act_func(table_info, operation, skip_op=skip_op)
    return table_info

ARGS = {
    'sample': {
        'table_text': 'Name | Age\nAlice | 30\nBob | 25',
        'chain': [
            {'operation_name': 'filter', 'params': {'column': 'Age', 'value': 25}},
            {'operation_name': 'select', 'params': {'columns': ['Name']}},
        ]
    },
    'skip_op': [],
    'first_n_op': None
}
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 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
table2df Ran
ran; our contract draft was wrong, not the code
google-research/chain-of-table/utils/chain.py
code served (permissive licence) · get_code("1a98c777eabd7e23")
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

# Construct valid arguments for table2df
table_text = [
    ['Name', 'Age', 'City', 'Score'],  # header
    ['Alice', 25, 'NYC', 95],
    ['Bob', 30, 'LA', 87],
    ['Charlie', 28, 'Chicago', 92],
    ['Diana', 26, 'Boston', 88],
    ['Eve', 29, 'Seattle', 91],
]

ARGS = {
    'table_text': table_text,
    'num_rows': 100,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
table2string Ran
ran; our contract draft was wrong, not the code
google-research/chain-of-table/utils/chain.py
code served (permissive licence) · get_code("3f48a6cd327ba279")
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

# Construct table_text: a list where first element is header, rest are data rows
header = ['Name', 'Age', 'City', 'Salary']
rows = [
    ['Alice', 30, 'New York', 75000],
    ['Bob', 25, 'Los Angeles', 65000],
    ['Charlie', 35, 'Chicago', 85000],
    ['Diana', 28, 'Houston', 70000],
    ['Eve', 32, 'Phoenix', 80000],
]
table_text = [header] + rows

ARGS = {
    'table_text': table_text,
    'num_rows': 100,
    'caption': 'Employee Data Summary'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
dynamic_chain_exec_one_sample Not yet run
unverified (harvested, no recorded run)
google-research/chain-of-table/utils/chain.py
code served (permissive licence) · get_code("3dd6e932075d3fbc")
How it ran

no invocation recorded.

generate_prompt_for_next_step Not yet run
unverified (harvested, no recorded run)
google-research/chain-of-table/utils/chain.py
code served (permissive licence) · get_code("841fa5034671ee1b")
How it ran

no invocation recorded.

Also present in other papers' code

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

Table-based reasoning with large language models (LLMs) is a promising direction to tackle many table understanding tasks, such as table-based question answering and fact verification. Compared with generic reasoning, table-based reasoning requires the extraction of underlying semantics from both free-form questions and semi-structured tabular data. Chain-of-Thought and its similar approaches incorporate the reasoning chain in the form of textual context, but it is still an open question how to effectively leverage tabular data in the reasoning chain. We propose the CHAIN-OF-TABLE framework, where tabular data is explicitly used in the reasoning chain as a proxy for intermediate thoughts. Specifically, we guide LLMs using in-context learning to iteratively generate operations and update the table to represent a tabular reasoning chain. LLMs can therefore dynamically plan the next operation based on the results of the previous ones. This continuous evolution of the table forms a chain, showing the reasoning process for a given tabular problem. The chain carries structured information of the intermediate results, enabling more accurate and reliable predictions. CHAIN-OF-TABLE achieves new state-of-the-art performance on WikiTQ, FeTaQA, and TabFact benchmarks across multiple LLM choices.

For agents

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

get_harvested_code_for_paper("2401.04398")
get_code_for_paper("2401.04398")
have("2401.04398")

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

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

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

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

Connect an agent — have() is free.