SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1809.05255 · 2018

SQL-to-Text Generation with Graph-to-Sequence Model

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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 5 have no contract verdict; 0 failures of our instrument; 1 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/1809.05255.json · badge: /api/ran/1809.05255.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
IBM/SQL-to-Text canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
batch Ran
ran on a synthesized input
IBM/SQL-to-Text/Graph2Seq-master/main/helpers.py
code served (permissive licence) · get_code("fe5a62319b44915c")
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 numpy as np

# Create sample inputs: list of sentences (integer lists)
# Each sentence is a list of integers (token IDs)
inputs = [
    [1, 2, 3],           # sequence of length 3
    [4, 5],              # sequence of length 2
    [6, 7, 8, 9]         # sequence of length 4
]

# max_sequence_length can be None (will use max from inputs) or an integer
max_sequence_length = None

ARGS = {
    "inputs": inputs,
    "max_sequence_length": max_sequence_length
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
cons_batch_graph Ran
ran on a synthesized input
IBM/SQL-to-Text/Graph2Seq-master/main/data_collector.py
code served (permissive licence) · get_code("4341bd2e76ed19d1")
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 minimal graph structures that match what cons_batch_graph expects
# Each graph needs: 'g_ids', 'g_adj', 'g_ids_features'

graph1 = {
    'g_ids': ['0', '1', '2'],
    'g_adj': {
        '0': ['1'],
        '1': ['2'],
        '2': []
    },
    'g_ids_features': {
        '0': torch.randn(4),
        '1': torch.randn(4),
        '2': torch.randn(4)
    }
}

graph2 = {
    'g_ids': ['0', '1'],
    'g_adj': {
        '0': ['1'],
        '1': []
    },
    'g_ids_features': {
        '0': torch.randn(4),
        '1': torch.randn(4)
    }
}

graphs = [graph1, graph2]

ARGS = {
    'graphs': graphs
}
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
cosine_distance Ran
ran on a synthesized input
IBM/SQL-to-Text/Graph2Seq-master/main/layer_utils.py
code served (permissive licence) · get_code("d38de6c77953b59d")
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 1, dtype family float, shape (2,) 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

# Create small test tensors for y1 and y2
# Shape: (batch_size=2, embedding_dim=4)
y1_data = np.array([
    [1.0, 0.0, 0.0, 0.0],
    [0.0, 1.0, 0.0, 0.0]
], dtype=np.float32)

y2_data = np.array([
    [1.0, 0.0, 0.0, 0.0],
    [0.0, 1.0, 0.0, 0.0]
], dtype=np.float32)

y1 = tf.constant(y1_data)
y2 = tf.constant(y2_data)

ARGS = {
    "y1": y1,
    "y2": y2,
    "cosine_norm": True,
    "eps": 1e-06
}
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 1, dtype family float, shape (2,) — shape (2,) 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
dropout_layer Ran
ran on a synthesized input
IBM/SQL-to-Text/Graph2Seq-master/main/layer_utils.py
code served (permissive licence) · get_code("5880ee955c15a36d")
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 tensorflow as tf
import numpy as np

# Create a small input tensor (batch_size=2, feature_dim=4)
input_reps = tf.constant(np.random.randn(2, 4).astype(np.float32))

# Set dropout rate
dropout_rate = 0.5

# Set training mode
is_training = True

# Construct the arguments dictionary
ARGS = {
    "input_reps": input_reps,
    "dropout_rate": dropout_rate,
    "is_training": is_training,
}
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, 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
evaluate Ran
ran on a synthesized input
IBM/SQL-to-Text/Graph2Seq-master/main/evaluator.py
code served (permissive licence) · get_code("4dde04be7ce0578e")
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 torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - type: a string that is compared to 'acc'
# - golds: a list of sequences (each element is iterable, joined with spaces)
# - preds: a list of sequences (each element is iterable, joined with spaces)
# - The function compares string representations of golds and preds

# Create small test data
golds = [
    ['hello', 'world'],
    ['foo', 'bar', 'baz'],
    ['test'],
]

preds = [
    ['hello', 'world'],
    ['foo', 'bar'],
    ['test'],
]

type_arg = 'acc'

ARGS = {
    'type': type_arg,
    'golds': golds,
    'preds': preds,
}
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 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
get_layer_uid Ran
ran, honoured the contract we drafted
IBM/SQL-to-Text/Graph2Seq-master/main/layers.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from thumlp/tensorgcn, is pointer only (licence: NONE) · get_code("b82968db452628fd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from thumlp/tensorgcn, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

my_lstm_layer Not yet run
unverified (harvested, no recorded run)
IBM/SQL-to-Text/Graph2Seq-master/main/layer_utils.py
code served (permissive licence) · get_code("73d006716b76680e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 2 later) and 0 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_layer_uid 33 other papers
9 dated earlier, 24 later · 5 only as an assembly brick
1603.08861 (2016-03)
Revisiting Semi-Supervised Learning with Graph Embeddings
1606.09375 (2016-06)
Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering
1609.02907 (2016-09)
Semi-Supervised Classification with Graph Convolutional Networks
and 30 more not named here
cons_batch_graph 3 other papers
2 dated earlier, 1 later
1804.00823 (2018-04)
Graph2Seq: Graph to Sequence Learning with Attention-based Neural Networks
1808.07624 (2018-08)
Exploiting Rich Syntactic Information for Semantic Parsing with Graph-to-Sequence Model
2004.13781 (2020-04)
Graph-to-Tree Neural Networks for Learning Structured Input-Output Translation with Applications to Semantic Parsing and Math Word Problem
batch 2 other papers
2 dated earlier
1804.00823 (2018-04)
Graph2Seq: Graph to Sequence Learning with Attention-based Neural Networks
1808.07624 (2018-08)
Exploiting Rich Syntactic Information for Semantic Parsing with Graph-to-Sequence Model
cosine_distance 2 other papers
2 dated earlier
1804.00823 (2018-04)
Graph2Seq: Graph to Sequence Learning with Attention-based Neural Networks
1808.07624 (2018-08)
Exploiting Rich Syntactic Information for Semantic Parsing with Graph-to-Sequence Model
dropout_layer 2 other papers
2 dated earlier
1804.00823 (2018-04)
Graph2Seq: Graph to Sequence Learning with Attention-based Neural Networks
1808.07624 (2018-08)
Exploiting Rich Syntactic Information for Semantic Parsing with Graph-to-Sequence Model
evaluate 2 other papers
2 dated earlier
1804.00823 (2018-04)
Graph2Seq: Graph to Sequence Learning with Attention-based Neural Networks
1808.07624 (2018-08)
Exploiting Rich Syntactic Information for Semantic Parsing with Graph-to-Sequence Model
my_lstm_layer 2 other papers
2 dated earlier
1804.00823 (2018-04)
Graph2Seq: Graph to Sequence Learning with Attention-based Neural Networks
1808.07624 (2018-08)
Exploiting Rich Syntactic Information for Semantic Parsing with Graph-to-Sequence Model

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

Previous work approaches the SQL-to-text generation task using vanilla Seq2Seq models, which may not fully capture the inherent graph-structured information in SQL query. In this paper, we first introduce a strategy to represent the SQL query as a directed graph and then employ a graph-to-sequence model to encode the global structure information into node embeddings. This model can effectively learn the correlation between the SQL query pattern and its interpretation. Experimental results on the WikiSQL dataset and Stackoverflow dataset show that our model significantly outperforms the Seq2Seq and Tree2Seq baselines, achieving the state-of-the-art performance.

For agents

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

get_harvested_code_for_paper("1809.05255")
get_code_for_paper("1809.05255")
have("1809.05255")

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

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

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

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

Connect an agent — have() is free.