{"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/bert-qe-contextualized-query-expansion-for","title":"BERT-QE: Contextualized Query Expansion for Document Re-ranking","arxiv_id":"2009.07258","date":"2020-09-15","proceeding":"Findings of the Association for Computational Linguistics 2020","authors":["Zhi Zheng","Kai Hui","Ben He","Xianpei Han","Le Sun","Andrew Yates"],"abstract":"Query expansion aims to mitigate the mismatch between the language used in a query and in a document. However, query expansion methods can suffer from introducing non-relevant information when expanding the query. To bridge this gap, inspired by recent advances in applying contextualized models like BERT to the document retrieval task, this paper proposes a novel query expansion model that leverages the strength of the BERT model to select relevant document chunks for expansion. In evaluation on the standard TREC Robust04 and GOV2 test collections, the proposed BERT-QE model significantly outperforms BERT-Large models.","url_abs":"https://arxiv.org/abs/2009.07258v2","url_pdf":"https://arxiv.org/pdf/2009.07258v2.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":"bert-qe-contextualized-query-expansion-for","repo_url":"https://github.com/zh-zheng/BERT-QE","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":null}],"tasks":[{"task_slug":"re-ranking","task_name":"Re-Ranking"},{"task_slug":"retrieval","task_name":"Retrieval"}],"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":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"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=2009.07258","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2009.07258"}},"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/zh-zheng/BERT-QE","reach":null}],"summary":{"ran_draft_wrong":2,"unverified":9},"by_repo_kind":{"official":{"samples":11,"ran":2,"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":"aa38fe3f4ecdfc3b","entry":"get_activation","repo":"zh-zheng/BERT-QE","repo_kind":"official","path":"functions.py","file_url":"https://github.com/zh-zheng/BERT-QE/blob/HEAD/functions.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"aa38fe3f4ecdfc3b"}},{"code_sha256_prefix":"3ac12e42a0d45740","entry":"get_shape_list","repo":"zh-zheng/BERT-QE","repo_kind":"official","path":"functions.py","file_url":"https://github.com/zh-zheng/BERT-QE/blob/HEAD/functions.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3ac12e42a0d45740"}},{"code_sha256_prefix":"d1820cb4dd9e6cb4","entry":"BertModel","repo":"zh-zheng/BERT-QE","repo_kind":"official","path":"functions.py","file_url":"https://github.com/zh-zheng/BERT-QE/blob/HEAD/functions.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":"d1820cb4dd9e6cb4"}},{"code_sha256_prefix":"102fa92b948d0383","entry":"assert_rank","repo":"zh-zheng/BERT-QE","repo_kind":"official","path":"functions.py","file_url":"https://github.com/zh-zheng/BERT-QE/blob/HEAD/functions.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":"102fa92b948d0383"}},{"code_sha256_prefix":"19d5694b63733ac3","entry":"attention_layer","repo":"zh-zheng/BERT-QE","repo_kind":"official","path":"functions.py","file_url":"https://github.com/zh-zheng/BERT-QE/blob/HEAD/functions.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":"19d5694b63733ac3"}},{"code_sha256_prefix":"b38d014af8b95484","entry":"create_attention_mask_from_input_mask","repo":"zh-zheng/BERT-QE","repo_kind":"official","path":"functions.py","file_url":"https://github.com/zh-zheng/BERT-QE/blob/HEAD/functions.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":"b38d014af8b95484"}},{"code_sha256_prefix":"cb45bcc0e0e03684","entry":"create_model","repo":"zh-zheng/BERT-QE","repo_kind":"official","path":"functions.py","file_url":"https://github.com/zh-zheng/BERT-QE/blob/HEAD/functions.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":"cb45bcc0e0e03684"}},{"code_sha256_prefix":"04726082484ff643","entry":"embedding_lookup","repo":"zh-zheng/BERT-QE","repo_kind":"official","path":"functions.py","file_url":"https://github.com/zh-zheng/BERT-QE/blob/HEAD/functions.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":"04726082484ff643"}},{"code_sha256_prefix":"7d98d29cc0d2a7f3","entry":"embedding_postprocessor","repo":"zh-zheng/BERT-QE","repo_kind":"official","path":"functions.py","file_url":"https://github.com/zh-zheng/BERT-QE/blob/HEAD/functions.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":"7d98d29cc0d2a7f3"}},{"code_sha256_prefix":"965eee140c1b3230","entry":"reshape_from_matrix","repo":"zh-zheng/BERT-QE","repo_kind":"official","path":"functions.py","file_url":"https://github.com/zh-zheng/BERT-QE/blob/HEAD/functions.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":"965eee140c1b3230"}},{"code_sha256_prefix":"5b85e1462c909ec8","entry":"transformer_model","repo":"zh-zheng/BERT-QE","repo_kind":"official","path":"functions.py","file_url":"https://github.com/zh-zheng/BERT-QE/blob/HEAD/functions.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":"5b85e1462c909ec8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}