SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.09987 · 2024

OneChart: Purify the Chart Structural Extraction via One Auxiliary Token

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 2 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.09987.json · badge: /api/ran/2404.09987.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
lingyvkong/onechart canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
complete_json_string Ran
ran; our contract draft was wrong, not the code
lingyvkong/onechart/ChartSE_eval/eval_ChartSE.py
code served (permissive licence) · get_code("3ffd5ea2dccfd432")
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 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 json

# Analyze the function: complete_json_string takes a json_str parameter
# and performs string operations on it (count, concatenation)
# It doesn't actually parse JSON, just manipulates braces

# Test case 1: Incomplete JSON with missing closing braces
json_str_incomplete = '{"name": "test", "value": 42'

ARGS = {
    "json_str": json_str_incomplete
}
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 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
list_json_value Ran
ran, honoured the contract we drafted
lingyvkong/onechart/OneChart_code/vary/demo/run_opt_v1.py
code served (permissive licence) · get_code("6e67edf8cb7fb946")
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 re

def list_json_value(json_dict):
    rst_str = []
    sort_flag = True
    try:
        for key, value in json_dict.items():
            if isinstance(value, dict):
                decimal_out = list_json_value(value)
                rst_str = rst_str + decimal_out
                sort_flag = False
            elif isinstance(value, list):
                return []
            elif isinstance(value, float) or isinstance(value, int):
                rst_str.append(value)
            else:
                value = re.sub('\\(\\d+\\)|\\[\\d+\\]', '', value)
                num_value = re.sub('[^\\d.-]', '', str(value))
                if num_value not in ['-', '*', 'none', 'None', '']:
                    rst_str.append(float(num_value))
    except Exception as e:
        print(f'Error: {e}')
        print(json_dict)
        return []
    return rst_str


# Test case 1: Simple dict with numeric values
test_dict_1 = {
    "a": 42,
    "b": 3.14,
    "c": "value_123",
    "d": "text(1)[2]_456"
}

# Test case 2: Nested dict
test_dict_2 = {
    "outer": {
        "inner": 99,
        "text": "data_789"
    },
    "value": 2.71
}

# Test case 3: Dict with list (should return empty)
test_dict_3 = {
    "key": [1, 2, 3]
}

# Test case 4: Mixed types
test_dict_4 = {
    "int_val": 10,
    "float_val": 5.5,
    "string_val": "result_42",
    "nested": {
        "deep": 100,
        "text": "score(0)_88.5"
    }
}

ARGS = {
    "json_dict": test_dict_1
}
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
norm_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lingyvkong/onechart/OneChart_code/vary/demo/run_opt_v1.py
code served (permissive licence) · get_code("54b3eec5169bd031")
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 numpy as np

# The function norm_ takes a list and normalizes it using min-max scaling
# It expects: rst_list - a list of numeric values

# Create a simple list of numbers to normalize
rst_list = [1.0, 2.5, 3.7, 5.2, 1.1]

ARGS = {
    "rst_list": rst_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — 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

Also present in other papers' code

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

Chart parsing poses a significant challenge due to the diversity of styles, values, texts, and so forth. Even advanced large vision-language models (LVLMs) with billions of parameters struggle to handle such tasks satisfactorily. To address this, we propose OneChart: a reliable agent specifically devised for the structural extraction of chart information. Similar to popular LVLMs, OneChart incorporates an autoregressive main body. Uniquely, to enhance the reliability of the numerical parts of the output, we introduce an auxiliary token placed at the beginning of the total tokens along with an additional decoder. The numerically optimized (auxiliary) token allows subsequent tokens for chart parsing to capture enhanced numerical features through causal attention. Furthermore, with the aid of the auxiliary token, we have devised a self-evaluation mechanism that enables the model to gauge the reliability of its chart parsing results by providing confidence scores for the generated content. Compared to current state-of-the-art (SOTA) chart parsing models, e.g., DePlot, ChartVLM, ChartAst, OneChart significantly outperforms in Average Precision (AP) for chart structural extraction across multiple public benchmarks, despite enjoying only 0.2 billion parameters. Moreover, as a chart parsing agent, it also brings 10%+ accuracy gains for the popular LVLM (LLaVA-1.6) in the downstream ChartQA benchmark.

For agents

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

get_harvested_code_for_paper("2404.09987")
get_code_for_paper("2404.09987")
have("2404.09987")

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

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

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

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

Connect an agent — have() is free.