Papers › Sequence-to-Sequence Learning with Latent Neural Grammars

Sequence-to-Sequence Learning with Latent Neural Grammars

2 Sep 2021NeurIPS 2021 12arXiv:2109.01135archive 2025-07-28

Yoon Kim

Sequence-to-sequence learning with neural networks has become the de facto standard for sequence prediction tasks. This approach typically models the local distribution over the next word with a powerful neural network that can condition on arbitrary context. While flexible and performant, these models often require large datasets for training and can fail spectacularly on benchmarks designed to test for compositional generalization. This work explores an alternative, hierarchical approach to sequence-to-sequence learning with quasi-synchronous grammars, where each node in the target tree is transduced by a node in the source tree. Both the source and target trees are treated as latent and induced during training. We develop a neural parameterization of the grammar which enables parameter sharing over the combinatorial space of derivation rules without the need for manual feature engineering. We apply this latent neural grammar to various domains -- a diagnostic language navigation task designed to test for compositional generalization (SCAN), style transfer, and small-scale machine translation -- and find that it performs respectably compared to standard baselines.

PaperPDFConference PDFCodeCode Syntology ran

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

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2109.01135")

Code

Syntology Ran 2 of 9 code samples harvested from 2 repositories linked to this paper; 7 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong.

By repository: official repository: 2 samples from 1 repository, 2 ran; found in paper text by Syntology: 7 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

yoonkim/neural-qcfg officialmentioned in papermentioned on GitHubpytorch 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

9 samples harvested; 2 ran; 1 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · our draft was wrong
7unverified

Licence: 2 of the 9 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (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 from a repository marked official are listed first. 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 four 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; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). 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.

eval yoonkim/neural-qcfg/train_scan.py official repository ran · honoured contract no licence file found · pointer only · aa6ca10cb935fd60 · report
get_data yoonkim/neural-qcfg/train_scan.py official repository ran · our draft was wrong no licence file found · pointer only · 1e93c709a6443925 · report
clip_gradient_norms yli1/CGPS/simple_model.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 7c681c304ce98b5e · report
filter yli1/CGPS/adj_data_generator.py found in paper text by Syntology unverified Apache-2.0 (permissive) · eebdf51e5b834f99 · report
filter_actions yli1/CGPS/attention_visualization.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 313e5178bdef7bfc · report
filter_words yli1/CGPS/attention_visualization.py found in paper text by Syntology unverified Apache-2.0 (permissive) · efe28f7dd3f19e7f · report
get_data_generator yli1/CGPS/data_generator.py found in paper text by Syntology unverified Apache-2.0 (permissive) · d7a865546b1fb0ce · report
get_sample yli1/CGPS/adj_data_generator.py found in paper text by Syntology unverified Apache-2.0 (permissive) · ad335e7ef703cc26 · report
get_voc_full yli1/CGPS/adj_data_generator.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 6f3676e93255b14c · report

Tasks

DiagnosticFeature EngineeringMachine TranslationStyle TransferTranslation

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