{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/pointer-constrained-text-generation-via","title":"POINTER: Constrained Progressive Text Generation via Insertion-based Generative Pre-training","arxiv_id":"2005.00558","date":"2020-05-01","proceeding":"EMNLP 2020 11","authors":["Yizhe Zhang","Guoyin Wang","Chunyuan Li","Zhe Gan","Chris Brockett","Bill Dolan"],"abstract":"Large-scale pre-trained language models, such as BERT and GPT-2, have achieved excellent performance in language representation learning and free-form text generation. However, these models cannot be directly employed to generate text under specified lexical constraints. To address this challenge, we present POINTER (PrOgressive INsertion-based TransformER), a simple yet novel insertion-based approach for hard-constrained text generation. The proposed method operates by progressively inserting new tokens between existing tokens in a parallel manner. This procedure is recursively applied until a sequence is completed. The resulting coarse-to-fine hierarchy makes the generation process intuitive and interpretable. We pre-train our model with the proposed progressive insertion-based objective on a 12GB Wikipedia dataset, and fine-tune it on downstream hard-constrained generation tasks. Non-autoregressive decoding yields an empirically logarithmic time complexity during inference time. Experimental results on both News and Yelp datasets demonstrate that POINTER achieves state-of-the-art performance on constrained text generation. We released the pre-trained models and the source code to facilitate future research (https://github.com/dreasysnail/POINTER).","url_abs":"https://arxiv.org/abs/2005.00558v2","url_pdf":"https://arxiv.org/pdf/2005.00558v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"pointer-constrained-text-generation-via","repo_url":"https://github.com/dreasysnail/POINTER","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"text-generation","task_name":"Text Generation"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bert","method_name":"BERT"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"cosine-annealing","method_name":"Cosine Annealing"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"discriminative-fine-tuning","method_name":"Discriminative Fine-Tuning"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-2","method_name":"GPT-2"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-cosine-annealing","method_name":"Linear Warmup With Cosine Annealing"},{"method_slug":"linear-warmup-with-linear-decay","method_name":"Linear Warmup With Linear Decay"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"},{"method_slug":"wordpiece","method_name":"WordPiece"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2005.00558","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2005.00558"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dreasysnail/POINTER","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_violates":1,"ran_draft_wrong":5,"ran_honours":1,"unverified":11},"by_repo_kind":{"official":{"samples":18,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"0fe9cf6c00ef56ea","entry":"is_number","repo":"dreasysnail/POINTER","repo_kind":"official","path":"keyword_extraction.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/keyword_extraction.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":2,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0fe9cf6c00ef56ea"}},{"code_sha256_prefix":"0f786c407fb1ee4c","entry":"swish","repo":"dreasysnail/POINTER","repo_kind":"official","path":"pytorch_transformers/modeling_bert.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/pytorch_transformers/modeling_bert.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0f786c407fb1ee4c"}},{"code_sha256_prefix":"35ef111fc00c21b4","entry":"build_tf_to_pytorch_map","repo":"dreasysnail/POINTER","repo_kind":"official","path":"pytorch_transformers/modeling_transfo_xl.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/pytorch_transformers/modeling_transfo_xl.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"35ef111fc00c21b4"}},{"code_sha256_prefix":"8d23fbe2b99b840b","entry":"gelu","repo":"dreasysnail/POINTER","repo_kind":"official","path":"pytorch_transformers/modeling_gpt2.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/pytorch_transformers/modeling_gpt2.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8d23fbe2b99b840b"}},{"code_sha256_prefix":"fdc64f4c72036ae4","entry":"gelu","repo":"dreasysnail/POINTER","repo_kind":"official","path":"pytorch_transformers/modeling_bert.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/pytorch_transformers/modeling_bert.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fdc64f4c72036ae4"}},{"code_sha256_prefix":"d30d6c3098df2c42","entry":"prune_linear_layer","repo":"dreasysnail/POINTER","repo_kind":"official","path":"pytorch_transformers/modeling_utils.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/pytorch_transformers/modeling_utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d30d6c3098df2c42"}},{"code_sha256_prefix":"93228a3eb5c4d179","entry":"sample_logits","repo":"dreasysnail/POINTER","repo_kind":"official","path":"pytorch_transformers/modeling_transfo_xl_utilities.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/pytorch_transformers/modeling_transfo_xl_utilities.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"93228a3eb5c4d179"}},{"code_sha256_prefix":"12ee396a3f687879","entry":"clean_str","repo":"dreasysnail/POINTER","repo_kind":"official","path":"generate_training_data.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/generate_training_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"12ee396a3f687879"}},{"code_sha256_prefix":"98fd1f038e2b39c1","entry":"convert_example_to_features","repo":"dreasysnail/POINTER","repo_kind":"official","path":"inference.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/inference.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"98fd1f038e2b39c1"}},{"code_sha256_prefix":"f5d8d44f65a08b76","entry":"get_masks","repo":"dreasysnail/POINTER","repo_kind":"official","path":"pytorch_transformers/modeling_xlm.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/pytorch_transformers/modeling_xlm.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f5d8d44f65a08b76"}},{"code_sha256_prefix":"03a94dbb436249a3","entry":"load_tf_weights_in_bert","repo":"dreasysnail/POINTER","repo_kind":"official","path":"pytorch_transformers/modeling_bert.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/pytorch_transformers/modeling_bert.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"03a94dbb436249a3"}},{"code_sha256_prefix":"07bb0220eb5b609f","entry":"load_tf_weights_in_gpt2","repo":"dreasysnail/POINTER","repo_kind":"official","path":"pytorch_transformers/modeling_gpt2.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/pytorch_transformers/modeling_gpt2.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"07bb0220eb5b609f"}},{"code_sha256_prefix":"42ee168c3ae12e60","entry":"load_tf_weights_in_openai_gpt","repo":"dreasysnail/POINTER","repo_kind":"official","path":"pytorch_transformers/modeling_openai.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/pytorch_transformers/modeling_openai.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"42ee168c3ae12e60"}},{"code_sha256_prefix":"23d246e59ef9447b","entry":"load_tf_weights_in_transfo_xl","repo":"dreasysnail/POINTER","repo_kind":"official","path":"pytorch_transformers/modeling_transfo_xl.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/pytorch_transformers/modeling_transfo_xl.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"23d246e59ef9447b"}},{"code_sha256_prefix":"7183a17dd79327a8","entry":"prune_conv1d_layer","repo":"dreasysnail/POINTER","repo_kind":"official","path":"pytorch_transformers/modeling_utils.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/pytorch_transformers/modeling_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7183a17dd79327a8"}},{"code_sha256_prefix":"e31093ffc8275cff","entry":"prune_layer","repo":"dreasysnail/POINTER","repo_kind":"official","path":"pytorch_transformers/modeling_utils.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/pytorch_transformers/modeling_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e31093ffc8275cff"}},{"code_sha256_prefix":"ee8b235cc453809b","entry":"top_k_top_p_filtering","repo":"dreasysnail/POINTER","repo_kind":"official","path":"inference.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/inference.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ee8b235cc453809b"}},{"code_sha256_prefix":"2ba7cbe568f877b6","entry":"truncate_seq_pair","repo":"dreasysnail/POINTER","repo_kind":"official","path":"generate_training_data.py","file_url":"https://github.com/dreasysnail/POINTER/blob/HEAD/generate_training_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2ba7cbe568f877b6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}