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 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="1609.05473")

Code

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

By repository: community (archive-listed): 21 samples from 7 repositories, 10 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

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

LantaoYu/SeqGAN officialmentioned in papermentioned on GitHubtf report
AWLyrics/SeqGAN_Poem mentioned on GitHubtf report
Anjaney1999/image-captioning-seqgan mentioned on GitHubpytorch report
Bayesian-Razor/papernotes mentioned on GitHubMIT report
GuyTevet/SeqGAN-eval mentioned on GitHubtf report
LiangqunLu/DLForChatbot mentioned on GitHub report
TalkToTheGAN/REGAN mentioned on GitHubpytorch report
TobeyYang/S2S_Temp mentioned on GitHubpytorchApache-2.0 report
bgenchel/MusicalSeqGAN mentioned on GitHubpytorch report
chaneeh/SeqGAN_experiment mentioned on GitHubtf report
desire2020/RankGAN mentioned on GitHubtf report
lina2360/HiSeqGan mentioned on GitHubtf report
rupes438/CodeGen mentioned on GitHub report
suhoy901/SeqGAN mentioned on GitHubpytorch report
vedantc6/SeqGAN mentioned on GitHubtf report
willspag/SeqGan mentioned on GitHubtfApache-2.0 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

21 samples harvested; 10 ran; 7 honoured the contract we drafted; 11 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.

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

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; 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.

create_real_data_dict GuyTevet/SeqGAN-eval/sequence_gan.py community (archive-listed) ran · our draft was wrong no licence file found · pointer only · 3f30492d9d21c9de · report
get_word medtray/SeqGAN-vs-MLE-vs-PG-BLEU-vs-ScheduleSampling/seq_gan_real_data.py community (archive-listed) ran · our draft was wrong no licence file found · pointer only · 7000645c309cf316 · report
pre_train_epoch GuyTevet/SeqGAN-eval/sequence_gan.py community (archive-listed) ran · honoured contract no licence file found · pointer only · b101ab100e14737c · report
pre_train_epoch rupes438/CodeGen/SeqGAN_3/sequence_gan_main.py community (archive-listed) ran · honoured contract no licence file found · pointer only · d742e892dc2e5813 · report
pre_train_epoch AWLyrics/SeqGAN_Poem/seq_gan.py community (archive-listed) ran · honoured contract no licence file found · pointer only · 2f4e665c16f88075 · report
pre_train_epoch desire2020/RankGAN/sequence_gan.py community (archive-listed) ran · honoured contract no licence file found · pointer only · aa4db51897e50f7a · report
pre_train_epoch vedantc6/SeqGAN/seqGAN.py community (archive-listed) ran · honoured contract MIT (permissive) · 3a13afabc045cbd8 · report
pre_train_epoch_v2 AWLyrics/SeqGAN_Poem/seq_gan.py community (archive-listed) ran · violated contract no licence file found · pointer only · 96e62562bcc4ec1b · report
target_loss rupes438/CodeGen/SeqGAN_3/sequence_gan_main.py community (archive-listed) ran · honoured contract no licence file found · pointer only · 336fb3340370addd · report
target_loss vedantc6/SeqGAN/seqGAN.py community (archive-listed) ran · honoured contract MIT (permissive) · 4b1acb7daafe3443 · report
apply_mean_std project-basileus/multitype-sequence-generation-by-tlstm-gan/sgtlstm/SeqGan.py community (archive-listed) unverified MIT (permissive) · 882605693d737cfd · report
create_dataset project-basileus/multitype-sequence-generation-by-tlstm-gan/sgtlstm/utils.py community (archive-listed) unverified MIT (permissive) · 8df2bb8e4b4e31f3 · report
eval_epoch medtray/SeqGAN-vs-MLE-vs-PG-BLEU-vs-ScheduleSampling/seq_gan_different_disc.py community (archive-listed) unverified no licence file found · pointer only · b3ce81cc1e76607b · report
eval_epoch medtray/SeqGAN-vs-MLE-vs-PG-BLEU-vs-ScheduleSampling/seq_gan_real_data.py community (archive-listed) unverified no licence file found · pointer only · f677dc5ff6c9c370 · report
get_mean_std project-basileus/multitype-sequence-generation-by-tlstm-gan/sgtlstm/SeqGan.py community (archive-listed) unverified MIT (permissive) · 468186920a536265 · report
load_fixed_length_sequence_from_pickle project-basileus/multitype-sequence-generation-by-tlstm-gan/sgtlstm/utils.py community (archive-listed) unverified MIT (permissive) · bbbbe8176df8559a · report
recover_timedelta_to_timestamp project-basileus/multitype-sequence-generation-by-tlstm-gan/sgtlstm/utils.py community (archive-listed) unverified MIT (permissive) · f89e786b42200ca5 · report
target_loss GuyTevet/SeqGAN-eval/sequence_gan.py community (archive-listed) unverified no licence file found · pointer only · 3715a5e4aecc4849 · report
train_epoch medtray/SeqGAN-vs-MLE-vs-PG-BLEU-vs-ScheduleSampling/seq_gan_different_disc.py community (archive-listed) unverified no licence file found · pointer only · 65a0b336d24a2e2a · report
train_epoch medtray/SeqGAN-vs-MLE-vs-PG-BLEU-vs-ScheduleSampling/seq_gan_real_data.py community (archive-listed) unverified no licence file found · pointer only · ee1e503421fb53db · report
zcore_norm project-basileus/multitype-sequence-generation-by-tlstm-gan/sgtlstm/SeqGan.py community (archive-listed) unverified MIT (permissive) · 4e78bccb2a14902a · report

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