{"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/reinforcement-learning-based-graph-to","title":"Reinforcement Learning Based Graph-to-Sequence Model for Natural Question Generation","arxiv_id":"1908.04942","date":"2019-08-14","proceeding":"ICLR 2020 1","authors":["Yu Chen","Lingfei Wu","Mohammed J. Zaki"],"abstract":"Natural question generation (QG) aims to generate questions from a passage and an answer. Previous works on QG either (i) ignore the rich structure information hidden in text, (ii) solely rely on cross-entropy loss that leads to issues like exposure bias and inconsistency between train/test measurement, or (iii) fail to fully exploit the answer information. To address these limitations, in this paper, we propose a reinforcement learning (RL) based graph-to-sequence (Graph2Seq) model for QG. Our model consists of a Graph2Seq generator with a novel Bidirectional Gated Graph Neural Network based encoder to embed the passage, and a hybrid evaluator with a mixed objective combining both cross-entropy and RL losses to ensure the generation of syntactically and semantically valid text. We also introduce an effective Deep Alignment Network for incorporating the answer information into the passage at both the word and contextual levels. Our model is end-to-end trainable and achieves new state-of-the-art scores, outperforming existing methods by a significant margin on the standard SQuAD benchmark.","url_abs":"https://arxiv.org/abs/1908.04942v4","url_pdf":"https://arxiv.org/pdf/1908.04942v4.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":"reinforcement-learning-based-graph-to","repo_url":"https://github.com/hugochan/RL-based-Graph2Seq-for-NQG","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"},{"task_slug":"graph-to-sequence","task_name":"Graph-to-Sequence"},{"task_slug":"question-generation","task_name":"Question Generation"},{"task_slug":"question-generation","task_name":"Question-Generation"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"},{"task_slug":null,"task_name":"valid"}],"methods":[{"method_slug":"graph-neural-network","method_name":"Graph Neural Network"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1908.04942","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1908.04942"}},"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/hugochan/RL-based-Graph2Seq-for-NQG","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":10},"by_repo_kind":{"official":{"samples":10,"ran":0,"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":"dbbab18dfe1739f9","entry":"convert_text_to_bert_features","repo":"hugochan/RL-based-Graph2Seq-for-NQG","repo_kind":"official","path":"src/core/utils/bert_utils.py","file_url":"https://github.com/hugochan/RL-based-Graph2Seq-for-NQG/blob/HEAD/src/core/utils/bert_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"dbbab18dfe1739f9"}},{"code_sha256_prefix":"246147b86724e625","entry":"dev_batch","repo":"hugochan/RL-based-Graph2Seq-for-NQG","repo_kind":"official","path":"src/core/model.py","file_url":"https://github.com/hugochan/RL-based-Graph2Seq-for-NQG/blob/HEAD/src/core/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"246147b86724e625"}},{"code_sha256_prefix":"90744bd46d234211","entry":"dropout","repo":"hugochan/RL-based-Graph2Seq-for-NQG","repo_kind":"official","path":"src/core/layers/common.py","file_url":"https://github.com/hugochan/RL-based-Graph2Seq-for-NQG/blob/HEAD/src/core/layers/common.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"90744bd46d234211"}},{"code_sha256_prefix":"8179c77e202fa384","entry":"extract_bert_hidden_states","repo":"hugochan/RL-based-Graph2Seq-for-NQG","repo_kind":"official","path":"src/core/utils/bert_utils.py","file_url":"https://github.com/hugochan/RL-based-Graph2Seq-for-NQG/blob/HEAD/src/core/utils/bert_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8179c77e202fa384"}},{"code_sha256_prefix":"198b12358dd1545e","entry":"extract_sent_dep_tree","repo":"hugochan/RL-based-Graph2Seq-for-NQG","repo_kind":"official","path":"src/annotate_graphs.py","file_url":"https://github.com/hugochan/RL-based-Graph2Seq-for-NQG/blob/HEAD/src/annotate_graphs.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"198b12358dd1545e"}},{"code_sha256_prefix":"2988ee69e45e3e36","entry":"prepare_datasets","repo":"hugochan/RL-based-Graph2Seq-for-NQG","repo_kind":"official","path":"src/core/utils/data_utils.py","file_url":"https://github.com/hugochan/RL-based-Graph2Seq-for-NQG/blob/HEAD/src/core/utils/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2988ee69e45e3e36"}},{"code_sha256_prefix":"5c4103a76e1ea7ee","entry":"read_all_GenerationDatasets","repo":"hugochan/RL-based-Graph2Seq-for-NQG","repo_kind":"official","path":"src/core/utils/data_utils.py","file_url":"https://github.com/hugochan/RL-based-Graph2Seq-for-NQG/blob/HEAD/src/core/utils/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5c4103a76e1ea7ee"}},{"code_sha256_prefix":"5cfc39a70aa4f147","entry":"test_batch","repo":"hugochan/RL-based-Graph2Seq-for-NQG","repo_kind":"official","path":"src/core/model.py","file_url":"https://github.com/hugochan/RL-based-Graph2Seq-for-NQG/blob/HEAD/src/core/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5cfc39a70aa4f147"}},{"code_sha256_prefix":"38eb8ab78cd2933d","entry":"train_batch","repo":"hugochan/RL-based-Graph2Seq-for-NQG","repo_kind":"official","path":"src/core/model.py","file_url":"https://github.com/hugochan/RL-based-Graph2Seq-for-NQG/blob/HEAD/src/core/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"38eb8ab78cd2933d"}},{"code_sha256_prefix":"b19d07186e0f9476","entry":"vectorize_input","repo":"hugochan/RL-based-Graph2Seq-for-NQG","repo_kind":"official","path":"src/core/utils/data_utils.py","file_url":"https://github.com/hugochan/RL-based-Graph2Seq-for-NQG/blob/HEAD/src/core/utils/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b19d07186e0f9476"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}