Papers › Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representation

Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representation

20 May 2019ACL 2019 7arXiv:1905.08205archive 2025-07-28

Jiaqi Guo, Zecheng Zhan, Yan Gao, Yan Xiao, Jian-Guang Lou, Ting Liu, Dongmei Zhang

We present a neural approach called IRNet for complex and cross-domain Text-to-SQL. IRNet aims to address two challenges: 1) the mismatch between intents expressed in natural language (NL) and the implementation details in SQL; 2) the challenge in predicting columns caused by the large number of out-of-domain words. Instead of end-to-end synthesizing a SQL query, IRNet decomposes the synthesis process into three phases. In the first phase, IRNet performs a schema linking over a question and a database schema. Then, IRNet adopts a grammar-based neural model to synthesize a SemQL query which is an intermediate representation that we design to bridge NL and SQL. Finally, IRNet deterministically infers a SQL query from the synthesized SemQL query with domain knowledge. On the challenging Text-to-SQL benchmark Spider, IRNet achieves 46.7% accuracy, obtaining 19.5% absolute improvement over previous state-of-the-art approaches. At the time of writing, IRNet achieves the first position on the Spider leaderboard.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 20 code samples harvested from 3 repositories linked to this paper: 20 ran (of which 0 constructed an object rather than computing a result; 20 with no instrument failure: 0 honoured, 0 violated, 20 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code; here there are none.

By repository: official repository: 12 samples from 1 repository, 12 ran (12 with no instrument failure; 0 where Syntology's instrument failed); community (archive-listed): 8 samples from 2 repositories, 8 ran (8 with no instrument failure; 0 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-24 and 2026-09-25 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

zhanzecheng/IRNet officialmentioned in papermentioned on GitHubNOASSERTIONSyntology: not harvested report
zhanzecheng/IRNet-1 officialmentioned in papermentioned on GitHubpytorchMITSyntology: 12 samples, 12 ran (0 instrument-failed) · 0 unverified report
brunnurs/valuenet mentioned on GitHubpytorchApache-2.0Syntology: 7 samples, 7 ran (0 instrument-failed) · 0 unverified report
microsoft/IRNet mentioned on GitHubpytorchMITSyntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report
openbotai/nl2sql mentioned on GitHubnot reachable when probed 2026-09-17 — repositories for recent papers often appear after camera-readySyntology: not harvested report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

20 samples harvested: 20 ran (of which 0 constructed an object rather than computing a result; 20 with no instrument failure: 0 honoured, 0 violated, 20 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

20ran

Licence: 12 of the 20 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

zhanzecheng/IRNet-1 official repository 12 samples, 12 ran (0 instrument-failed) · 0 unverified
dot_prod_attention in 5 papers src/models/nn_utils.py ran MIT recorded; this copy not marked cleared · pointer only · d8099e5254807c28 · report fixture: signature h_t:Tensor/2/float, src_encoding:Tensor/3/float, src_encoding_att_linear:Tensor/3/float, mask:Tensor/2/bool · returned tuple · level recorded 2026-09-25
fully_part_header preprocess/utils.py ran MIT recorded; this copy not marked cleared · pointer only · 9c3576f9e3a3fead · report fixture: signature toks:list/1/str, idx:int/0/int, num_toks:int/0/int, header_toks:set/0/? · returned tuple · level recorded 2026-09-25
get_table_colNames src/utils.py ran MIT recorded; this copy not marked cleared · pointer only · 963b51dd3dc75877 · report fixture: signature tab_ids:list/1/int, tab_cols:list/1/list · returned list · level recorded 2026-09-25
group_header preprocess/utils.py ran MIT recorded; this copy not marked cleared · pointer only · 9fb6cf9d7ab4b89e · report fixture: signature toks:list/1/str, idx:int/0/int, num_toks:int/0/int, header_toks:set/0/? · returned tuple · level recorded 2026-09-25
init_config in 12 papers src/args.py ran MIT recorded; this copy not marked cleared · pointer only · b07608731805c76b · report fixture: signature arg_parser:MockArgParser/0/? · returned MockArgParser · level recorded 2026-09-25
length_array_to_mask_tensor src/models/nn_utils.py ran MIT recorded; this copy not marked cleared · pointer only · 8652ad5cc86d0e0c · report fixture: signature length_array:list/1/int, cuda:bool/0/bool, value:list/1/list · returned Tensor · level recorded 2026-09-25
load_dataSets preprocess/utils.py ran MIT recorded; this copy not marked cleared · pointer only · 162d168370fb82c5 · report fixture: signature args:Args/0/? · returned tuple · level recorded 2026-09-25
load_word_emb src/utils.py ran MIT recorded; this copy not marked cleared · pointer only · c455f0c88c1ce239 · report fixture: signature file_name:str/0/str, use_small:bool/0/bool · returned dict · level recorded 2026-09-25
lower_keys in 7 papers src/utils.py ran MIT recorded; this copy not marked cleared · pointer only · c72d53981f7830b8 · report fixture: signature x:dict/0/? · returned dict · level recorded 2026-09-25
pop_front sem2SQL.py ran fingerprinted MIT recorded; this copy not marked cleared · pointer only · 556a6efd5f06ab91 · report fixture: signature array:list/1/int · returned int · level recorded 2026-09-25
split_logical_form sem2SQL.py ran fingerprinted MIT recorded; this copy not marked cleared · pointer only · beb755eade641481 · report fixture: signature lf:str/0/str · returned list · level recorded 2026-09-25
table_dict_to_mask_tensor src/models/nn_utils.py ran MIT recorded; this copy not marked cleared · pointer only · 7e01be511a9ebcf6 · report fixture: signature length_array:ndarray/1/int, table_dict:list/1/list, cuda:bool/0/bool · returned Tensor · level recorded 2026-09-25
brunnurs/valuenet community (archive-listed) 7 samples, 7 ran (0 instrument-failed) · 0 unverified
build_optimizer_encoder src/optimizer.py ran Apache-2.0 (permissive) · cfc906a590c69cbe · report fixture: signature model:callable/0/?, num_train_steps:int/0/int, lr_transformer:float/0/float, lr_connection:float/0/float, lr_base:float/0/float, scheduler_gamma:float/0/float · returned tuple · level recorded 2026-09-24
create_experiment_folder src/utils.py ran Apache-2.0 (permissive) · 6e5bb54df87a72ba · report fixture: signature model_output_dir:str/0/str, name:str/0/str · returned tuple · level recorded 2026-09-24
dot_prod_attention in 5 papers src/neural_network_utils.py ran Apache-2.0 (permissive) · e3de52f6de213f21 · report fixture: signature h_t:Tensor/2/float, src_encoding:Tensor/3/float, src_encoding_att_linear:Tensor/3/float, mask:Tensor/2/int · returned tuple · level recorded 2026-09-24
get_data_loader in 44 papers src/data_loader.py ran Apache-2.0 (permissive) · 055bcd6f75fdf154 · report fixture: signature data_train:DummyDataset/0/?, data_dev:DummyDataset/0/?, batch_size:int/0/int, shuffle_train:bool/0/bool, shuffle_dev:bool/0/bool · returned tuple · level recorded 2026-09-24
load_word_emb src/utils.py ran Apache-2.0 (permissive) · fd6641ead78d10ee · report fixture: signature file_name:str/0/str, use_small:bool/0/bool · returned dict · level recorded 2026-09-24
load_word_emb_binary src/utils.py ran Apache-2.0 (permissive) · 16fad9d730a01050 · report fixture: signature embedding_file_name_w_o_suffix:str/0/str · returned dict · level recorded 2026-09-24
make_edge src/intermediate_representation/graph.py ran Apache-2.0 (permissive) · 47c4fc5b3bd99c76 · report fixture: signature start:int/0/int, entry_column:int/0/int, end:int/0/int, exit_column:int/0/int, cost:int/0/int · returned Edge · level recorded 2026-09-24
microsoft/IRNet community (archive-listed) 1 sample, 1 ran (0 instrument-failed) · 0 unverified
dot_prod_attention in 5 papers src/models/nn_utils.py ran MIT (permissive) · 286d5b153c10befb · report fixture: signature h_t:Tensor/2/float, src_encoding:Tensor/3/float, src_encoding_att_linear:Tensor/3/float, mask:NoneType/0/? · returned tuple · level recorded 2026-09-24

Tasks

Text to SQLText-To-SQL

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections