{"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/190407094","title":"CEDR: Contextualized Embeddings for Document Ranking","arxiv_id":"1904.07094","date":"2019-04-15","proceeding":null,"authors":["Sean MacAvaney","Andrew Yates","Arman Cohan","Nazli Goharian"],"abstract":"Although considerable attention has been given to neural ranking architectures recently, far less attention has been paid to the term representations that are used as input to these models. In this work, we investigate how two pretrained contextualized language models (ELMo and BERT) can be utilized for ad-hoc document ranking. Through experiments on TREC benchmarks, we find that several existing neural ranking architectures can benefit from the additional context provided by contextualized language models. Furthermore, we propose a joint approach that incorporates BERT's classification vector into existing neural models and show that it outperforms state-of-the-art ad-hoc ranking baselines. We call this joint approach CEDR (Contextualized Embeddings for Document Ranking). We also address practical challenges in using these models for ranking, including the maximum input length imposed by BERT and runtime performance impacts of contextualized language models.","url_abs":"https://arxiv.org/abs/1904.07094v3","url_pdf":"https://arxiv.org/pdf/1904.07094v3.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":"190407094","repo_url":"https://github.com/Georgetown-IR-Lab/cedr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"190407094","repo_url":"https://github.com/Georgetown-IR-Lab/contextualized-reps-for-ranking","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"190407094","repo_url":"https://github.com/Crysitna/CEDR_tpu","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"190407094","repo_url":"https://github.com/Georgetown-IR-Lab/curricula-neural-ir","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"190407094","repo_url":"https://github.com/TikaToka/CapstoneSpring","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"190407094","repo_url":"https://github.com/crystina-z/CEDR_tpu","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"190407094","repo_url":"https://github.com/ssun32/clirmatrix_cedr","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"ad-hoc-information-retrieval","task_name":"Ad-Hoc Information Retrieval"},{"task_slug":"document-ranking","task_name":"Document Ranking"},{"task_slug":"classification","task_name":"General Classification"}],"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":[{"leaderboard":"/sota/ad-hoc-information-retrieval-on-trec-robust04","task":"Ad-Hoc Information Retrieval","dataset":"TREC Robust04","model":"CEDR-KNRM","rank_in_archive_order":3,"of":21,"metrics":{"P@20":"0.4667","nDCG@20":"0.5381"},"uses_additional_data":false},{"leaderboard":"/sota/ad-hoc-information-retrieval-on-trec-robust04","task":"Ad-Hoc Information Retrieval","dataset":"TREC Robust04","model":"Vanilla BERT","rank_in_archive_order":8,"of":21,"metrics":{"P@20":"0.4042","nDCG@20":"0.4541"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1904.07094","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1904.07094"}},"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/ssun32/clirmatrix_cedr","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Georgetown-IR-Lab/contextualized-reps-for-ranking","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/crystina-z/CEDR_tpu","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Georgetown-IR-Lab/cedr","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Georgetown-IR-Lab/curricula-neural-ir","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/TikaToka/CapstoneSpring","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Crysitna/CEDR_tpu","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":2,"unverified":5},"by_repo_kind":{"official":{"samples":6,"ran":1,"repositories":1},"listed":{"samples":1,"ran":1,"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":"b2840eb2211dadb4","entry":"subbatch","repo":"Crysitna/CEDR_tpu","repo_kind":"listed","path":"modeling_util.py","file_url":"https://github.com/Crysitna/CEDR_tpu/blob/HEAD/modeling_util.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b2840eb2211dadb4"}},{"code_sha256_prefix":"bb05ea380c1dec92","entry":"un_subbatch","repo":"Georgetown-IR-Lab/cedr","repo_kind":"official","path":"cedr/modeling_util.py","file_url":"https://github.com/Georgetown-IR-Lab/cedr/blob/HEAD/cedr/modeling_util.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":true,"mcp_get_code":{"code_sha256":"bb05ea380c1dec92"}},{"code_sha256_prefix":"edba46a99a939d85","entry":"indri_doc_extractor","repo":"Georgetown-IR-Lab/cedr","repo_kind":"official","path":"cedr/extract_docs_from_index.py","file_url":"https://github.com/Georgetown-IR-Lab/cedr/blob/HEAD/cedr/extract_docs_from_index.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":"edba46a99a939d85"}},{"code_sha256_prefix":"f4cf6112e0ec013c","entry":"lucene_doc_extractor","repo":"Georgetown-IR-Lab/cedr","repo_kind":"official","path":"cedr/extract_docs_from_index.py","file_url":"https://github.com/Georgetown-IR-Lab/cedr/blob/HEAD/cedr/extract_docs_from_index.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":"f4cf6112e0ec013c"}},{"code_sha256_prefix":"0b0ad78a7bebbc0e","entry":"read_datafiles","repo":"Georgetown-IR-Lab/cedr","repo_kind":"official","path":"cedr/data.py","file_url":"https://github.com/Georgetown-IR-Lab/cedr/blob/HEAD/cedr/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":"0b0ad78a7bebbc0e"}},{"code_sha256_prefix":"870ed1f39049bc26","entry":"read_qrels_dict","repo":"Georgetown-IR-Lab/cedr","repo_kind":"official","path":"cedr/data.py","file_url":"https://github.com/Georgetown-IR-Lab/cedr/blob/HEAD/cedr/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":"870ed1f39049bc26"}},{"code_sha256_prefix":"025beb6eeb8f3e37","entry":"read_run_dict","repo":"Georgetown-IR-Lab/cedr","repo_kind":"official","path":"cedr/data.py","file_url":"https://github.com/Georgetown-IR-Lab/cedr/blob/HEAD/cedr/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":"025beb6eeb8f3e37"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}