SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.09444 · 2019

Retrieving Sequential Information for Non-Autoregressive Neural Machine Translation

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; 1 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 1 failure 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/1906.09444.json · badge: /api/ran/1906.09444.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
ictnlp/RSI-NAT canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
ictnlp/BoN-NAT reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
data_path Ran
ran on a synthesized input
ictnlp/RSI-NAT/data.py
code served (permissive licence) · get_code("b44c24125bdf93e4")
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 torch

ARGS = {
    'dataset': 'iwslt-ende'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — 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
grad_reverse Ran
ran, honoured the contract we drafted
ictnlp/RSI-NAT/model.py
code served (permissive licence) · get_code("2a7e189196f18f84")
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 Tensor, 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 torch
import torch.nn as nn
from torch.autograd import Variable, Function

torch.manual_seed(0)

# The grad_reverse function takes a single parameter x
# Looking at the function body:
# - x is passed to GradReverse.apply(x)
# - In forward, x.view_as(x) is called, so x must be a tensor
# - In backward, grad_output.neg() is called on the gradient

# Create a small tensor to pass as input
x = torch.randn(2, 4, requires_grad=True)

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, 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
minibatch_same_length Ran
ran on a synthesized input
ictnlp/RSI-NAT/mscoco.py
code served (permissive licence) · get_code("4bff5338e4ef661f")
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 2, dtype family int; 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
from collections import OrderedDict

# Construct test data for minibatch_same_length
# The function groups indices by their corresponding lengths and creates minibatches

# Create a lengths array with some repeated values
# For example, sequences of length 5 (3 of them), length 10 (2 of them), length 15 (4 of them)
lengths = np.array([5, 5, 5, 10, 10, 15, 15, 15, 15], dtype=int)

# batch_size parameter - determines how many samples per minibatch
batch_size = 4

ARGS = {
    "lengths": lengths,
    "batch_size": batch_size,
}
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 list, ndim 2, dtype family int — 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
n_grams Ran
ran on a synthesized input
ictnlp/RSI-NAT/utils.py
code served (permissive licence) · get_code("cc3ed7ce8522c650")
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, 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 torch

# Construct valid arguments for n_grams function
# The function takes a list of words and extracts n-grams (1-gram through 4-gram)

list_words = ["the", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"]

ARGS = {
    "list_words": list_words
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
process_json Ran
ran on a synthesized input
ictnlp/RSI-NAT/mscoco.py
code served (permissive licence) · get_code("e78e0b040c6b7e43")
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 os
import json
import tempfile

# Create a temporary directory for test data
temp_dir = tempfile.mkdtemp()

# Create test annotation file
test_annotations = [
    {
        "img_name": "train2014_000001",
        "bpes": ["hello world", "foo bar baz", "a b c d e f g h"]
    },
    {
        "img_name": "val2014_000002",
        "bpes": ["test", "another phrase here"]
    }
]

ann_file_name = "annotations.json"
ann_file_path = os.path.join(temp_dir, ann_file_name)

with open(ann_file_path, 'w') as f:
    json.dump(test_annotations, f)

# Create dummy feature directories
train_features_dir = os.path.join(temp_dir, 'train2014_features')
val_features_dir = os.path.join(temp_dir, 'val2014_features')
os.makedirs(train_features_dir, exist_ok=True)
os.makedirs(val_features_dir, exist_ok=True)

# Create dummy .npy files
import numpy as np
np.save(os.path.join(train_features_dir, 'train2014_000001.npy'), np.zeros((10,)))
np.save(os.path.join(val_features_dir, 'val2014_000002.npy'), np.zeros((10,)))

ARGS = {
    "dataPath": temp_dir,
    "annFile": ann_file_name,
    "max_len": 5,
    "size": None
}
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
shape Ran
ran; our contract draft was wrong, not the code
ictnlp/BoN-NAT/model.py
code served (permissive licence) · get_code("a6838819df62aca0")
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. 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)

# Analyze the function:
# - targets: indexed with slicing [begin:end], elements converted to strings
# - target_lens: iterated over to get length values
# Both should be indexable/iterable

# Create sample data
targets = torch.tensor([0, 1, 2, 3, 4, 5, 6, 7], dtype=torch.long)
target_lens = [3, 2, 3]  # Three sequences of lengths 3, 2, 3

ARGS = {
    "targets": targets,
    "target_lens": target_lens
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
corpus_bleu Not yet run
unverified (harvested, no recorded run)
ictnlp/RSI-NAT/utils.py
code served (permissive licence) · get_code("d626355467ac1f72")
How it ran

no invocation recorded.

sentence_bleu Not yet run
unverified (harvested, no recorded run)
ictnlp/RSI-NAT/utils.py
code served (permissive licence) · get_code("f9bb445f6ed4ce91")
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, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 7 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
grad_reverse 9 other papers
3 dated earlier, 6 later
1711.05139 (2017-11)
XGAN: Unsupervised Image-to-Image Translation for Many-to-Many Mappings
1802.06901 (2018-02)
Deterministic Non-Autoregressive Neural Sequence Modeling by Iterative Refinement
1812.10352 (2018-12)
Learning Not to Learn: Training Deep Neural Networks with Biased Data
and 6 more not named here

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

Non-Autoregressive Transformer (NAT) aims to accelerate the Transformer model through discarding the autoregressive mechanism and generating target words independently, which fails to exploit the target sequential information. Over-translation and under-translation errors often occur for the above reason, especially in the long sentence translation scenario. In this paper, we propose two approaches to retrieve the target sequential information for NAT to enhance its translation ability while preserving the fast-decoding property. Firstly, we propose a sequence-level training method based on a novel reinforcement algorithm for NAT (Reinforce-NAT) to reduce the variance and stabilize the training procedure. Secondly, we propose an innovative Transformer decoder named FS-decoder to fuse the target sequential information into the top layer of the decoder. Experimental results on three translation tasks show that the Reinforce-NAT surpasses the baseline NAT system by a significant margin on BLEU without decelerating the decoding speed and the FS-decoder achieves comparable translation performance to the autoregressive Transformer with considerable speedup.

For agents

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

get_harvested_code_for_paper("1906.09444")
get_code_for_paper("1906.09444")
have("1906.09444")

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

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

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

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

Connect an agent — have() is free.