{"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/retromae-2-duplex-masked-auto-encoder-for-pre","title":"RetroMAE-2: Duplex Masked Auto-Encoder For Pre-Training Retrieval-Oriented Language Models","arxiv_id":"2305.02564","date":"2023-05-04","proceeding":null,"authors":["Shitao Xiao","Zheng Liu","Yingxia Shao","Zhao Cao"],"abstract":"To better support information retrieval tasks such as web search and open-domain question answering, growing effort is made to develop retrieval-oriented language models, e.g., RetroMAE and many others. Most of the existing works focus on improving the semantic representation capability for the contextualized embedding of the [CLS] token. However, recent study shows that the ordinary tokens besides [CLS] may provide extra information, which help to produce a better representation effect. As such, it's necessary to extend the current methods where all contextualized embeddings can be jointly pre-trained for the retrieval tasks. In this work, we propose a novel pre-training method called Duplex Masked Auto-Encoder, a.k.a. DupMAE. It is designed to improve the quality of semantic representation where all contextualized embeddings of the pre-trained model can be leveraged. It takes advantage of two complementary auto-encoding tasks: one reconstructs the input sentence on top of the [CLS] embedding; the other one predicts the bag-of-words feature of the input sentence based on the ordinary tokens' embeddings. The two tasks are jointly conducted to train a unified encoder, where the whole contextualized embeddings are aggregated in a compact way to produce the final semantic representation. DupMAE is simple but empirically competitive: it substantially improves the pre-trained model's representation capability and transferability, where superior retrieval performances can be achieved on popular benchmarks, like MS MARCO and BEIR.","url_abs":"https://arxiv.org/abs/2305.02564v1","url_pdf":"https://arxiv.org/pdf/2305.02564v1.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":"retromae-2-duplex-masked-auto-encoder-for-pre","repo_url":"https://github.com/staoxiao/retromae","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"information-retrieval","task_name":"Information Retrieval"},{"task_slug":"open-domain-question-answering","task_name":"Open-Domain Question Answering"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"sentence","task_name":"Sentence"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.02564","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.02564"}},"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":"deterministic:regex_extraction","url":"https://github.com/staoxiao/RetroMAE","reach":{"status":"ok","spdx":"Apache-2.0"}}],"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":"8b646294f965fe2a","entry":"read_id","repo":"staoxiao/RetroMAE","repo_kind":"official","path":"src/bi_encoder/faiss_retriever.py","file_url":"https://github.com/staoxiao/RetroMAE/blob/HEAD/src/bi_encoder/faiss_retriever.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":"8b646294f965fe2a"}},{"code_sha256_prefix":"41d49088046e4038","entry":"read_mapping_id","repo":"staoxiao/RetroMAE","repo_kind":"official","path":"src/bi_encoder/data.py","file_url":"https://github.com/staoxiao/RetroMAE/blob/HEAD/src/bi_encoder/data.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":"41d49088046e4038"}},{"code_sha256_prefix":"0db74f850789223f","entry":"read_neg_file","repo":"staoxiao/RetroMAE","repo_kind":"official","path":"src/bi_encoder/data.py","file_url":"https://github.com/staoxiao/RetroMAE/blob/HEAD/src/bi_encoder/data.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":"0db74f850789223f"}},{"code_sha256_prefix":"dbf7c90691ac3536","entry":"read_train_file","repo":"staoxiao/RetroMAE","repo_kind":"official","path":"src/bi_encoder/data.py","file_url":"https://github.com/staoxiao/RetroMAE/blob/HEAD/src/bi_encoder/data.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":"dbf7c90691ac3536"}},{"code_sha256_prefix":"d2919b967ea69ff6","entry":"search_queries","repo":"staoxiao/RetroMAE","repo_kind":"official","path":"src/bi_encoder/faiss_retriever.py","file_url":"https://github.com/staoxiao/RetroMAE/blob/HEAD/src/bi_encoder/faiss_retriever.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":"d2919b967ea69ff6"}},{"code_sha256_prefix":"26f423cdf9e4ed58","entry":"to_dict","repo":"staoxiao/RetroMAE","repo_kind":"official","path":"src/colbert/arguments.py","file_url":"https://github.com/staoxiao/RetroMAE/blob/HEAD/src/colbert/arguments.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":"26f423cdf9e4ed58"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}