SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1703.04887 · 2017

Improving Neural Machine Translation with Conditional Sequence Generative Adversarial Nets

arXiv · PDF · Open in the Atlas

Code that ran

2 of 6 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; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 1 failure of our instrument; 4 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/1703.04887.json · badge: /api/ran/1703.04887.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
ZhenYangIACAS/NMT_GAN canonical (classifier label)
classifier basis: census
2 ran · 4 no recorded run
FunctionStatusWhere it lives
average_gradients Ran
ran; our contract draft was wrong, not the code
ZhenYangIACAS/NMT_GAN/model.py
code served (permissive licence) · get_code("8a792606b6037ff1")
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. 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 tensorflow as tf
import numpy as np

# Set random seeds for reproducibility
tf.random.set_seed(0)
np.random.seed(0)

# Create a small model variable to use in gradients
var1 = tf.Variable(tf.random.normal([4, 3]), dtype=tf.float32)
var2 = tf.Variable(tf.random.normal([5, 2]), dtype=tf.float32)

# Create gradient tensors for tower 1
grad1_var1 = tf.random.normal([4, 3], dtype=tf.float32)
grad1_var2 = tf.random.normal([5, 2], dtype=tf.float32)

# Create gradient tensors for tower 2
grad2_var1 = tf.random.normal([4, 3], dtype=tf.float32)
grad2_var2 = tf.random.normal([5, 2], dtype=tf.float32)

# Build tower_grads: List of lists of (gradient, variable) tuples
# Outer list: one entry per tower
# Inner list: one (grad, var) pair per variable
tower_grads = [
    [(grad1_var1, var1), (grad1_var2, var2)],
    [(grad2_var1, var1), (grad2_var2, var2)]
]

ARGS = {
    'tower_grads': tower_grads
}
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 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
fopen Ran
ran on a synthesized input
ZhenYangIACAS/NMT_GAN/RNNsearch_GAN/data_iterator.py
code served (permissive licence) · get_code("171953963fb4d022")
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 TextIOWrapper. 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 gzip
import tempfile
import os

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

# Create a test text file
test_file = os.path.join(temp_dir, "test.txt")
with open(test_file, 'w') as f:
    f.write("test content")

# Create a test gzip file
test_gz_file = os.path.join(temp_dir, "test.txt.gz")
with gzip.open(test_gz_file, 'wt') as f:
    f.write("gzipped content")

# Define arguments for the fopen function
ARGS = {
    'filename': test_file,
    'mode': 'r'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 TextIOWrapper — a TextIOWrapper 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
highway Not yet run
unverified (harvested, no recorded run)
ZhenYangIACAS/NMT_GAN/RNNsearch_GAN/cnn_discriminator.py
code served (permissive licence) · get_code("aa88418f16724f53")
How it ran

no invocation recorded.

highway Not yet run
unverified (harvested, no recorded run)
ZhenYangIACAS/NMT_GAN/cnn_discriminator.py
code served (permissive licence) · get_code("514afdc5423e2594")
How it ran

no invocation recorded.

linear Not yet run
unverified (harvested, no recorded run)
ZhenYangIACAS/NMT_GAN/cnn_discriminator.py
code served (permissive licence) · get_code("df83ac62de18c5b7")
How it ran

no invocation recorded.

split_tensor Not yet run
unverified (harvested, no recorded run)
ZhenYangIACAS/NMT_GAN/model.py
code served (permissive licence) · get_code("68a80d72ec5220a8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 4 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
fopen 3 other papers
2 dated earlier, 1 later
1603.06147 (2016-03)
A Character-Level Decoder without Explicit Segmentation for Neural Machine Translation
1610.03017 (2016-10)
Fully Character-Level Neural Machine Translation without Explicit Segmentation
1805.01252 (2018-05)
Improving a Neural Semantic Parser by Counterfactual Learning from Human Bandit Feedback
average_gradients 1 other paper
1 later
1808.08583 (2018-08)
Semi-Autoregressive Neural Machine Translation

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

This paper proposes an approach for applying GANs to NMT. We build a conditional sequence generative adversarial net which comprises of two adversarial sub models, a generator and a discriminator. The generator aims to generate sentences which are hard to be discriminated from human-translated sentences (i.e., the golden target sentences), And the discriminator makes efforts to discriminate the machine-generated sentences from human-translated ones. The two sub models play a mini-max game and achieve the win-win situation when they reach a Nash Equilibrium. Additionally, the static sentence-level BLEU is utilized as the reinforced objective for the generator, which biases the generation towards high BLEU points. During training, both the dynamic discriminator and the static BLEU objective are employed to evaluate the generated sentences and feedback the evaluations to guide the learning of the generator. Experimental results show that the proposed model consistently outperforms the traditional RNNSearch and the newly emerged state-of-the-art Transformer on English-German and Chinese-English translation tasks.

For agents

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

get_harvested_code_for_paper("1703.04887")
get_code_for_paper("1703.04887")
have("1703.04887")

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

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

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

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

Connect an agent — have() is free.