{"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/generating-diverse-numbers-of-diverse","title":"One Size Does Not Fit All: Generating and Evaluating Variable Number of Keyphrases","arxiv_id":"1810.05241","date":"2018-10-11","proceeding":"ACL 2020 6","authors":["Xingdi Yuan","Tong Wang","Rui Meng","Khushboo Thaker","Peter Brusilovsky","Daqing He","Adam Trischler"],"abstract":"Different texts shall by nature correspond to different number of keyphrases. This desideratum is largely missing from existing neural keyphrase generation models. In this study, we address this problem from both modeling and evaluation perspectives. We first propose a recurrent generative model that generates multiple keyphrases as delimiter-separated sequences. Generation diversity is further enhanced with two novel techniques by manipulating decoder hidden states. In contrast to previous approaches, our model is capable of generating diverse keyphrases and controlling number of outputs. We further propose two evaluation metrics tailored towards the variable-number generation. We also introduce a new dataset StackEx that expands beyond the only existing genre (i.e., academic writing) in keyphrase generation tasks. With both previous and new evaluation metrics, our model outperforms strong baselines on all datasets.","url_abs":"https://arxiv.org/abs/1810.05241v4","url_pdf":"https://arxiv.org/pdf/1810.05241v4.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":"generating-diverse-numbers-of-diverse","repo_url":"https://github.com/memray/OpenNMT-kpg-release","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"all","task_name":"All"},{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"keyphrase-generation","task_name":"Keyphrase Generation"}],"methods":[],"datasets_introduced":[{"slug":"stackex","name":"STACKEX","full_name":"STACKEX"}],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1810.05241","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1810.05241"}},"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/memray/OpenNMT-kpg-release","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":6},"by_repo_kind":{"official":{"samples":6,"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":"df1510f43e187231","entry":"average_models","repo":"memray/OpenNMT-kpg-release","repo_kind":"official","path":"onmt/bin/average_models.py","file_url":"https://github.com/memray/OpenNMT-kpg-release/blob/HEAD/onmt/bin/average_models.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":"df1510f43e187231"}},{"code_sha256_prefix":"e47d1a4e477699f8","entry":"baseline_pred_loader","repo":"memray/OpenNMT-kpg-release","repo_kind":"official","path":"kp_evaluate.py","file_url":"https://github.com/memray/OpenNMT-kpg-release/blob/HEAD/kp_evaluate.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":"e47d1a4e477699f8"}},{"code_sha256_prefix":"a7400d7c2f3b1eea","entry":"get_ctranslate2_model_spec","repo":"memray/OpenNMT-kpg-release","repo_kind":"official","path":"onmt/bin/release_model.py","file_url":"https://github.com/memray/OpenNMT-kpg-release/blob/HEAD/onmt/bin/release_model.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":"a7400d7c2f3b1eea"}},{"code_sha256_prefix":"049b4bcce7af7550","entry":"kp_results_to_str","repo":"memray/OpenNMT-kpg-release","repo_kind":"official","path":"kp_evaluate.py","file_url":"https://github.com/memray/OpenNMT-kpg-release/blob/HEAD/kp_evaluate.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":"049b4bcce7af7550"}},{"code_sha256_prefix":"04f73d793cecec06","entry":"scan_new_checkpoints","repo":"memray/OpenNMT-kpg-release","repo_kind":"official","path":"kp_gen_eval.py","file_url":"https://github.com/memray/OpenNMT-kpg-release/blob/HEAD/kp_gen_eval.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":"04f73d793cecec06"}},{"code_sha256_prefix":"9ad8afa6c8870f3d","entry":"scan_predictions","repo":"memray/OpenNMT-kpg-release","repo_kind":"official","path":"kp_gen_eval_transfer.py","file_url":"https://github.com/memray/OpenNMT-kpg-release/blob/HEAD/kp_gen_eval_transfer.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":"9ad8afa6c8870f3d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}