{"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/from-clozing-to-comprehending-retrofitting","title":"From Cloze to Comprehension: Retrofitting Pre-trained Masked Language Model to Pre-trained Machine Reader","arxiv_id":"2212.04755","date":"2022-12-09","proceeding":null,"authors":["Weiwen Xu","Xin Li","Wenxuan Zhang","Meng Zhou","Wai Lam","Luo Si","Lidong Bing"],"abstract":"We present Pre-trained Machine Reader (PMR), a novel method for retrofitting pre-trained masked language models (MLMs) to pre-trained machine reading comprehension (MRC) models without acquiring labeled data. PMR can resolve the discrepancy between model pre-training and downstream fine-tuning of existing MLMs. To build the proposed PMR, we constructed a large volume of general-purpose and high-quality MRC-style training data by using Wikipedia hyperlinks and designed a Wiki Anchor Extraction task to guide the MRC-style pre-training. Apart from its simplicity, PMR effectively solves extraction tasks, such as Extractive Question Answering and Named Entity Recognition. PMR shows tremendous improvements over existing approaches, especially in low-resource scenarios. When applied to the sequence classification task in the MRC formulation, PMR enables the extraction of high-quality rationales to explain the classification process, thereby providing greater prediction explainability. PMR also has the potential to serve as a unified model for tackling various extraction and classification tasks in the MRC formulation.","url_abs":"https://arxiv.org/abs/2212.04755v3","url_pdf":"https://arxiv.org/pdf/2212.04755v3.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":"from-clozing-to-comprehending-retrofitting","repo_url":"https://github.com/damo-nlp-sg/pmr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"extractive-question-answering","task_name":"Extractive Question-Answering"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"machine-reading-comprehension","task_name":"Machine Reading Comprehension"},{"task_slug":"named-entity-recognition-1","task_name":"Named Entity Recognition"},{"task_slug":"named-entity-recognition-ner","task_name":"Named Entity Recognition (NER)"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"reading-comprehension","task_name":"Reading Comprehension"},{"task_slug":"named-entity-recognition","task_name":"named-entity-recognition"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2212.04755","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2212.04755"}},"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/damo-nlp-sg/pmr","reach":null}],"summary":{"ran":3,"unverified":1},"by_repo_kind":{"official":{"samples":4,"ran":3,"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":4,"samples":[{"code_sha256_prefix":"ee76979b4ef5eaf2","entry":"BERT_PMR","repo":"damo-nlp-sg/pmr","repo_kind":"official","path":"PMR/model.py","file_url":"https://github.com/damo-nlp-sg/pmr/blob/HEAD/PMR/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ee76979b4ef5eaf2"}},{"code_sha256_prefix":"d440b3239eb76afc","entry":"MultiNonLinearProjection","repo":"damo-nlp-sg/pmr","repo_kind":"official","path":"PMR/model.py","file_url":"https://github.com/damo-nlp-sg/pmr/blob/HEAD/PMR/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d440b3239eb76afc"}},{"code_sha256_prefix":"635ed2d514700045","entry":"PMROutput","repo":"damo-nlp-sg/pmr","repo_kind":"official","path":"PMR/model.py","file_url":"https://github.com/damo-nlp-sg/pmr/blob/HEAD/PMR/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"635ed2d514700045"}},{"code_sha256_prefix":"c638a2b1ba183e87","entry":"merge_e2c","repo":"damo-nlp-sg/pmr","repo_kind":"official","path":"preprocessing_PMR/wiki_preprocess_multiprocess.py","file_url":"https://github.com/damo-nlp-sg/pmr/blob/HEAD/preprocessing_PMR/wiki_preprocess_multiprocess.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c638a2b1ba183e87"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}