{"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/diverse-beam-search-decoding-diverse","title":"Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence Models","arxiv_id":"1610.02424","date":"2016-10-07","proceeding":null,"authors":["Ashwin K. Vijayakumar","Michael Cogswell","Ramprasath R. Selvaraju","Qing Sun","Stefan Lee","David Crandall","Dhruv Batra"],"abstract":"Neural sequence models are widely used to model time-series data. Equally\nubiquitous is the usage of beam search (BS) as an approximate inference\nalgorithm to decode output sequences from these models. BS explores the search\nspace in a greedy left-right fashion retaining only the top-B candidates -\nresulting in sequences that differ only slightly from each other. Producing\nlists of nearly identical sequences is not only computationally wasteful but\nalso typically fails to capture the inherent ambiguity of complex AI tasks. To\novercome this problem, we propose Diverse Beam Search (DBS), an alternative to\nBS that decodes a list of diverse outputs by optimizing for a\ndiversity-augmented objective. We observe that our method finds better top-1\nsolutions by controlling for the exploration and exploitation of the search\nspace - implying that DBS is a better search algorithm. Moreover, these gains\nare achieved with minimal computational or memory over- head as compared to\nbeam search. To demonstrate the broad applicability of our method, we present\nresults on image captioning, machine translation and visual question generation\nusing both standard quantitative metrics and qualitative human studies.\nFurther, we study the role of diversity for image-grounded language generation\ntasks as the complexity of the image changes. We observe that our method\nconsistently outperforms BS and previously proposed techniques for diverse\ndecoding from neural sequence models.","url_abs":"http://arxiv.org/abs/1610.02424v2","url_pdf":"http://arxiv.org/pdf/1610.02424v2.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":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/ashwinkalyan/dbs","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"torch","reach":{"status":"ok"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/StatNLP/ada4asr","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/SunJiamei/LRP-imagecaptioning-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/ahmetustun/fairseq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/bzylich/persona-chatbot","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/cindyxinyiwang/fairseq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/codecaution/evomoe","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/dannigt/fairseq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/facebookresearch/fairseq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/fairseq/fairseq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/formiel/fairseq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/hlt-mt/fbk-fairseq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/hltchkust/cantonese-asr","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/jerinphilip/fairseq-ilmt","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/jungokasai/t2r","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/libeineu/GPKD","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/libeineu/SDT-Training","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/lucylow/En_francais_si_vous_plait-","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/marccanby/bidi_decoding","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/mgaido91/FBK-fairseq-ST","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/raymondhs/fairseq-extensible-mbart","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/sarapapi/fbk-fairseq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/stevezheng23/fairseq_extension","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/utanaka2000/fairseq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diverse-beam-search-decoding-diverse","repo_url":"https://github.com/windweller/PragmaticVQA","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"unanswered"}}],"tasks":[{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"image-captioning","task_name":"Image Captioning"},{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"question-generation","task_name":"Question Generation"},{"task_slug":"question-generation","task_name":"Question-Generation"},{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"time-series","task_name":"Time Series Analysis"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1610.02424","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1610.02424"}},"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/formiel/fairseq","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/fairseq","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/StatNLP/ada4asr","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jungokasai/t2r","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hlt-mt/fbk-fairseq","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/windweller/PragmaticVQA","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lucylow/En_francais_si_vous_plait-","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/libeineu/GPKD","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dannigt/fairseq","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ashwinkalyan/dbs","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jerinphilip/fairseq-ilmt","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/raymondhs/fairseq-extensible-mbart","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mgaido91/FBK-fairseq-ST","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/cindyxinyiwang/fairseq","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/SunJiamei/LRP-imagecaptioning-pytorch","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/stevezheng23/fairseq_extension","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sarapapi/fbk-fairseq","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hltchkust/cantonese-asr","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/marccanby/bidi_decoding","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ahmetustun/fairseq","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/utanaka2000/fairseq","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/codecaution/evomoe","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/fairseq/fairseq","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bzylich/persona-chatbot","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/libeineu/SDT-Training","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran":6,"ran_draft_wrong":1,"unverified":7},"by_repo_kind":{"listed":{"samples":13,"ran":6,"repositories":7}},"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":14,"samples":[{"code_sha256_prefix":"2e69129bbcf930e7","entry":"distributed_init","repo":"fairseq/fairseq","repo_kind":"listed","path":"fairseq/distributed_utils.py","file_url":"https://github.com/fairseq/fairseq/blob/HEAD/fairseq/distributed_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"2e69129bbcf930e7"}},{"code_sha256_prefix":"07969f7041022050","entry":"distributed_init","repo":"jungokasai/t2r","repo_kind":"listed","path":"fairseq/distributed_utils.py","file_url":"https://github.com/jungokasai/t2r/blob/HEAD/fairseq/distributed_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"07969f7041022050"}},{"code_sha256_prefix":"840d9070e4fd8ba6","entry":"find_offsets","repo":"cindyxinyiwang/fairseq","repo_kind":"listed","path":"fairseq/file_chunker_utils.py","file_url":"https://github.com/cindyxinyiwang/fairseq/blob/HEAD/fairseq/file_chunker_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"840d9070e4fd8ba6"}},{"code_sha256_prefix":"90b79fe15491de83","entry":"is_master","repo":"fairseq/fairseq","repo_kind":"listed","path":"fairseq/distributed_utils.py","file_url":"https://github.com/fairseq/fairseq/blob/HEAD/fairseq/distributed_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"90b79fe15491de83"}},{"code_sha256_prefix":"26da4f92ba56e785","entry":"label_smoothed_nll_loss","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"26da4f92ba56e785"}},{"code_sha256_prefix":"82bdf940665aeeb4","entry":"safe_readline","repo":"StatNLP/ada4asr","repo_kind":"listed","path":"fairseq/binarizer.py","file_url":"https://github.com/StatNLP/ada4asr/blob/HEAD/fairseq/binarizer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"82bdf940665aeeb4"}},{"code_sha256_prefix":"9418b43048e4e4ec","entry":"url_to_filename","repo":"ahmetustun/fairseq","repo_kind":"listed","path":"fairseq/file_utils.py","file_url":"https://github.com/ahmetustun/fairseq/blob/HEAD/fairseq/file_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"9418b43048e4e4ec"}},{"code_sha256_prefix":"199e96db5edd0edd","entry":"all_reduce","repo":"StatNLP/ada4asr","repo_kind":"listed","path":"fairseq/distributed_utils.py","file_url":"https://github.com/StatNLP/ada4asr/blob/HEAD/fairseq/distributed_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":false,"mcp_get_code":{"code_sha256":"199e96db5edd0edd"}},{"code_sha256_prefix":"aafdc12f01ab388f","entry":"filename_to_url","repo":"ahmetustun/fairseq","repo_kind":"listed","path":"fairseq/file_utils.py","file_url":"https://github.com/ahmetustun/fairseq/blob/HEAD/fairseq/file_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":false,"mcp_get_code":{"code_sha256":"aafdc12f01ab388f"}},{"code_sha256_prefix":"b1a033619f614e17","entry":"filename_to_url","repo":"stevezheng23/fairseq_extension","repo_kind":"listed","path":"fairseq/file_utils.py","file_url":"https://github.com/stevezheng23/fairseq_extension/blob/HEAD/fairseq/file_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":false,"mcp_get_code":{"code_sha256":"b1a033619f614e17"}},{"code_sha256_prefix":"bf870e076be41d5d","entry":"load_archive_file","repo":"fairseq/fairseq","repo_kind":"listed","path":"fairseq/file_utils.py","file_url":"https://github.com/fairseq/fairseq/blob/HEAD/fairseq/file_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":false,"mcp_get_code":{"code_sha256":"bf870e076be41d5d"}},{"code_sha256_prefix":"5603a04b6103554e","entry":"load_archive_file","repo":"ahmetustun/fairseq","repo_kind":"listed","path":"fairseq/file_utils.py","file_url":"https://github.com/ahmetustun/fairseq/blob/HEAD/fairseq/file_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":false,"mcp_get_code":{"code_sha256":"5603a04b6103554e"}},{"code_sha256_prefix":"bd3fe80662b28bc7","entry":"load_archive_file","repo":"stevezheng23/fairseq_extension","repo_kind":"listed","path":"fairseq/file_utils.py","file_url":"https://github.com/stevezheng23/fairseq_extension/blob/HEAD/fairseq/file_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":false,"mcp_get_code":{"code_sha256":"bd3fe80662b28bc7"}},{"code_sha256_prefix":"0d372aa1e290a613","entry":"load_archive_file","repo":"raymondhs/fairseq-extensible-mbart","repo_kind":"listed","path":"fairseq/file_utils.py","file_url":"https://github.com/raymondhs/fairseq-extensible-mbart/blob/HEAD/fairseq/file_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":false,"mcp_get_code":{"code_sha256":"0d372aa1e290a613"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}