Papers › SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient

SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient

18 Sep 2016arXiv:1609.05473archive 2025-07-28

Lantao Yu, Wei-Nan Zhang, Jun Wang, Yong Yu

As a new way of training generative models, Generative Adversarial Nets (GAN) that uses a discriminative model to guide the training of the generative model has enjoyed considerable success in generating real-valued data. However, it has limitations when the goal is for generating sequences of discrete tokens. A major reason lies in that the discrete outputs from the generative model make it difficult to pass the gradient update from the discriminative model to the generative model. Also, the discriminative model can only assess a complete sequence, while for a partially generated sequence, it is non-trivial to balance its current score and the future one once the entire sequence has been generated. In this paper, we propose a sequence generation framework, called SeqGAN, to solve the problems. Modeling the data generator as a stochastic policy in reinforcement learning (RL), SeqGAN bypasses the generator differentiation problem by directly performing gradient policy update. The RL reward signal comes from the GAN discriminator judged on a complete sequence, and is passed back to the intermediate state-action steps using Monte Carlo search. Extensive experiments on synthetic data and real-world tasks demonstrate significant improvements over strong baselines.

PaperPDFCodeCode 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

The archive's official repository (LantaoYu/SeqGAN) was not harvested; the 21 samples below come from 7 community repositories.

Syntology 21 code samples harvested from 7 repositories linked to this paper: 14 ran (of which 0 constructed an object rather than computing a result; 12 with no instrument failure: 7 honoured, 1 violated, 4 with no contract checked; 2 where Syntology's instrument failed) · 7 unverified. Where Syntology's instrument failed: 2 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 21 samples from 7 repositories, 14 ran (12 with no instrument failure; 2 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.

No sample is linked to this paper from 2 of its repositories that Syntology harvested for other papers:

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

23 repositories listed; official and paper-mentioned ones first.

LantaoYu/SeqGAN officialmentioned in papermentioned on GitHubtfSyntology: not harvested report
AWLyrics/SeqGAN_Poem mentioned on GitHubtfSyntology: 2 samples, 2 ran (0 instrument-failed) · 0 unverified report
Anjaney1999/image-captioning-seqgan mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Show, Attend and Tell: Neural Image Caption Generation with Visual Attention (arXiv:1502.03044; that paper's own run record: 58 ran (of which 0 constructed an object rather than computing a result; 45 with no instrument failure: 3 honoured, 0 violated, 42 with no contract checked; 13 where Syntology's instrument failed) · 26 unverified); nothing checks that they implement this paper's method. report
Bayesian-Razor/papernotes mentioned on GitHubMITSyntology: not harvested report
GuyTevet/SeqGAN-eval mentioned on GitHubtfSyntology: 3 samples, 2 ran (1 instrument-failed) · 1 unverified report
LiangqunLu/DLForChatbot mentioned on GitHubSyntology: not harvested report
TalkToTheGAN/REGAN mentioned on GitHubpytorchSyntology: not harvested report
TobeyYang/S2S_Temp mentioned on GitHubpytorchApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Learning Neural Templates for Text Generation (arXiv:1808.10122; that paper's own run record: 7 ran (of which 0 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 0 violated, 7 with no contract checked; 0 where Syntology's instrument failed) · 5 unverified); nothing checks that they implement this paper's method. report
bgenchel/MusicalSeqGAN mentioned on GitHubpytorchSyntology: not harvested report
bgenchel/Reinforcement-Learning-for-Music-Generation mentioned on GitHubpytorchSyntology: not harvested report
chaneeh/SeqGAN_experiment mentioned on GitHubtfSyntology: not harvested report
chung771026/Implement-seqGAN-with-Keras mentioned on GitHubMITSyntology: not harvested report
desire2020/RankGAN mentioned on GitHubtfSyntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report
lina2360/HiSeqGan mentioned on GitHubtfSyntology: not harvested report
medtray/SeqGAN-vs-MLE-vs-PG-BLEU-vs-ScheduleSampling mentioned on GitHubpytorchSyntology: 5 samples, 1 ran (1 instrument-failed) · 4 unverified report
project-basileus/multitype-sequence-generation-by-tlstm-gan mentioned on GitHubtfMITSyntology: 6 samples, 4 ran (0 instrument-failed) · 2 unverified report
rupes438/CodeGen mentioned on GitHubSyntology: 2 samples, 2 ran (0 instrument-failed) · 0 unverified report
suhoy901/SeqGAN mentioned on GitHubpytorchSyntology: not harvested report
vedantc6/SeqGAN mentioned on GitHubtfSyntology: 2 samples, 2 ran (0 instrument-failed) · 0 unverified report
willspag/SeqGan mentioned on GitHubtfApache-2.0Syntology: not harvested report
yuanfeisiyuetian/seqgan-modbusTCP mentioned on GitHubtfSyntology: not harvested report
L0SG/seqgan-music tfSyntology: not harvested report
suragnair/seqGAN pytorchSyntology: 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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

21 samples harvested: 14 ran (of which 0 constructed an object rather than computing a result; 12 with no instrument failure: 7 honoured, 1 violated, 4 with no contract checked; 2 where Syntology's instrument failed) · 7 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.

7ran · honoured contract
1ran · violated contract
2ran · our draft was wrong
4ran
7unverified

Licence: 13 of the 21 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 7 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”. For 1 sample that ran, the graph records a signature this page does not show: an argument's recorded type or element kind is a printout of an object in Syntology's harness (such as a mock object, a class or a pandas printout), not the type of an input, so it does not describe the call's shape. “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.

AWLyrics/SeqGAN_Poem community (archive-listed) 2 samples, 2 ran (0 instrument-failed) · 0 unverified
pre_train_epoch seq_gan.py ran · honoured contract no licence file found · pointer only · 2f4e665c16f88075 · report fixture: signature sess:MockSession/0/?, trainable_model:callable/0/?, data_loader:DataLoader/0/? · returned float64 · level recorded 2026-09-22
pre_train_epoch_v2 seq_gan.py ran · violated contract no licence file found · pointer only · 96e62562bcc4ec1b · report fixture: signature sess:MockSession/0/?, trainable_model:callable/0/?, data_loader:DataLoader/0/? · returned float64 · level recorded 2026-09-22
GuyTevet/SeqGAN-eval community (archive-listed) 3 samples, 2 ran (1 instrument-failed) · 1 unverified
create_real_data_dict sequence_gan.py ran · our draft was wrong no licence file found · pointer only · 3f30492d9d21c9de · report fixture: signature data_file:str/0/str, dict_file:str/0/str, token_type:str/0/str · returned tuple · level recorded 2026-09-22
pre_train_epoch sequence_gan.py ran · honoured contract no licence file found · pointer only · b101ab100e14737c · report fixture: signature sess:MockSession/0/?, trainable_model:callable/0/?, data_loader:DataLoader/0/?, lr:float/0/float · returned float64 · level recorded 2026-09-22
target_loss in 5 papers sequence_gan.py unverified no licence file found · pointer only · 3715a5e4aecc4849 · report
desire2020/RankGAN community (archive-listed) 1 sample, 1 ran (0 instrument-failed) · 0 unverified
pre_train_epoch sequence_gan.py ran · honoured contract no licence file found · pointer only · aa4db51897e50f7a · report fixture: returned float64 · level recorded 2026-09-22
medtray/SeqGAN-vs-MLE-vs-PG-BLEU-vs-ScheduleSampling community (archive-listed) 5 samples, 1 ran (1 instrument-failed) · 4 unverified
get_word seq_gan_real_data.py ran · our draft was wrong no licence file found · pointer only · 7000645c309cf316 · report fixture: signature s:int/0/int, idx_to_words:dict/0/? · returned str · level recorded 2026-09-22
eval_epoch in 13 papers seq_gan_different_disc.py unverified no licence file found · pointer only · b3ce81cc1e76607b · report
eval_epoch in 13 papers seq_gan_real_data.py unverified no licence file found · pointer only · f677dc5ff6c9c370 · report
train_epoch in 71 papers seq_gan_different_disc.py unverified no licence file found · pointer only · 65a0b336d24a2e2a · report
train_epoch in 71 papers seq_gan_real_data.py unverified no licence file found · pointer only · ee1e503421fb53db · report
project-basileus/multitype-sequence-generation-by-tlstm-gan community (archive-listed) 6 samples, 4 ran (0 instrument-failed) · 2 unverified
create_dataset in 47 papers sgtlstm/utils.py ran MIT (permissive) · 8df2bb8e4b4e31f3 · report fixture: signature features:ndarray/2/float, labels:ndarray/1/int, batch_size:int/0/int, epochs:int/0/int, buffer_size:int/0/int · returned _BatchDataset · level recorded 2026-09-26
load_fixed_length_sequence_from_pickle sgtlstm/utils.py ran MIT (permissive) · bbbbe8176df8559a · report fixture: signature pickle_file_path:str/0/str, to_timedelta:bool/0/bool, end_token:int/0/int · returned tuple · level recorded 2026-09-26
recover_timedelta_to_timestamp sgtlstm/utils.py ran fingerprinted MIT (permissive) · f89e786b42200ca5 · report fixture: signature time_seq:list/1/float · returned list · level recorded 2026-09-26
zcore_norm sgtlstm/SeqGan.py ran MIT (permissive) · 4e78bccb2a14902a · report fixture: returned tuple · level recorded 2026-09-26
apply_mean_std sgtlstm/SeqGan.py unverified MIT (permissive) · 882605693d737cfd · report
get_mean_std in 17 papers sgtlstm/SeqGan.py unverified MIT (permissive) · 468186920a536265 · report
rupes438/CodeGen community (archive-listed) 2 samples, 2 ran (0 instrument-failed) · 0 unverified
pre_train_epoch SeqGAN_3/sequence_gan_main.py ran · honoured contract no licence file found · pointer only · d742e892dc2e5813 · report fixture: signature sess:MockSession/0/?, trainable_model:callable/0/?, data_loader:DataLoader/0/? · returned float64 · level recorded 2026-09-22
target_loss in 5 papers SeqGAN_3/sequence_gan_main.py ran · honoured contract no licence file found · pointer only · 336fb3340370addd · report fixture: signature sess:MockSession/0/?, target_lstm:callable/0/?, data_loader:MockDataLoader/0/? · returned float32 · level recorded 2026-09-22
vedantc6/SeqGAN community (archive-listed) 2 samples, 2 ran (0 instrument-failed) · 0 unverified
pre_train_epoch seqGAN.py ran · honoured contract MIT (permissive) · 3a13afabc045cbd8 · report fixture: signature sess:MockSession/0/?, trainable_model:callable/0/?, data_loader:DataLoader/0/? · returned float64 · level recorded 2026-09-22
target_loss in 5 papers seqGAN.py ran · honoured contract MIT (permissive) · 4b1acb7daafe3443 · report fixture: signature sess:MockSession/0/?, target_lstm:MockTargetLSTM/0/?, data_loader:MockDataLoader/0/? · returned float64 · level recorded 2026-09-22

Tasks

Reinforcement LearningReinforcement Learning (RL)Text Generation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Text Generation COCO Captions SeqGAN BLEU-2 0.831 #5 of 5 Archive leaderboard report
Text Generation COCO Captions SeqGAN BLEU-3 0.642 #5 of 5 Archive leaderboard report
Text Generation COCO Captions SeqGAN BLEU-4 0.521 #5 of 5 Archive leaderboard report
Text Generation COCO Captions SeqGAN BLEU-5 0.427 #5 of 5 Archive leaderboard report
Text Generation Chinese Poems SeqGAN BLEU-2 0.738 #2 of 3 Archive leaderboard report
Text Generation EMNLP2017 WMT SeqGAN BLEU-2 0.859 #4 of 5 Archive leaderboard report
Text Generation EMNLP2017 WMT SeqGAN BLEU-3 0.6015 #4 of 5 Archive leaderboard report
Text Generation EMNLP2017 WMT SeqGAN BLEU-4 0.4541 #4 of 5 Archive leaderboard report
Text Generation EMNLP2017 WMT SeqGAN BLEU-5 0.4498 #4 of 5 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Convolution

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