SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2001.01941 · NeurIPS · 2020

Paraphrase Generation with Latent Bag of Words

Yao Fu, Yansong Feng, John Cunningham

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 12 functions out of this paper's own repositories and ran 5 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
FranxYao/dgm_latent_bow canonical 5 of 12
FunctionStatusWhere it lives
bow_gumbel_topk_sampling Ran FranxYao/dgm_latent_bow/src/latent_bow.py
code served (permissive licence) · get_code("b3fdc49d516e7dda")
bow_train_monitor Ran FranxYao/dgm_latent_bow/src/bow_seq2seq.py
code served (permissive licence) · get_code("85ee561c589cb9a2")
build_batch_seq2seq_bow2seq Ran FranxYao/dgm_latent_bow/src/data_utils.py
code served (permissive licence) · get_code("e42494b8d6d09a29")
get_vocab Ran FranxYao/dgm_latent_bow/src/nlp_pipeline.py
code served (permissive licence) · get_code("b6b052efd0a759e4")
normalize Ran FranxYao/dgm_latent_bow/src/nlp_pipeline.py
code served (permissive licence) · get_code("c00c6e76fd620389")
attention Not yet run FranxYao/dgm_latent_bow/src/decoder.py
code served (permissive licence) · get_code("2754ede201877c8e")
decoding_infer Not yet run FranxYao/dgm_latent_bow/src/decoder.py
code served (permissive licence) · get_code("0ca9c17bf3f15cbd")
enc_loss_fn Not yet run FranxYao/dgm_latent_bow/src/bow_seq2seq.py
code served (permissive licence) · get_code("f6d2f2fefbd4ee2b")
mscoco_read_json Not yet run FranxYao/dgm_latent_bow/src/data_utils.py
code served (permissive licence) · get_code("73a470177e69f9cc")
multi_source_attention Not yet run FranxYao/dgm_latent_bow/src/decoder.py
code served (permissive licence) · get_code("623afac14847f448")
nll_loss Not yet run FranxYao/dgm_latent_bow/src/bow_seq2seq.py
code served (permissive licence) · get_code("9a8e1721a125fdd2")
quora_read Not yet run FranxYao/dgm_latent_bow/src/data_utils.py
code served (permissive licence) · get_code("00693a7aa1f73c16")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Paraphrase generation is a longstanding important problem in natural language processing. In addition, recent progress in deep generative models has shown promising results on discrete latent variables for text generation. Inspired by variational autoencoders with discrete latent structures, in this work, we propose a latent bag of words (BOW) model for paraphrase generation. We ground the semantics of a discrete latent variable by the BOW from the target sentences. We use this latent variable to build a fully differentiable content planning and surface realization model. Specifically, we use source words to predict their neighbors and model the target BOW with a mixture of softmax. We use Gumbel top-k reparameterization to perform differentiable subset sampling from the predicted BOW distribution. We retrieve the sampled word embeddings and use them to augment the decoder and guide its generation search space. Our latent BOW model not only enhances the decoder, but also exhibits clear interpretability. We show the model interpretability with regard to (i) unsupervised learning of word neighbors (ii) the step-by-step generation procedure. Extensive experiments demonstrate the transparent and effective generation process of this model. 1

For agents

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

get_harvested_code_for_paper("2001.01941")
get_code_for_paper("2001.01941")
have("2001.01941")

Connect an agent — have() is free.