{"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/rethinking-reflection-in-pre-training","title":"Rethinking Reflection in Pre-Training","arxiv_id":"2504.04022","date":"2025-04-05","proceeding":null,"authors":["Essential AI",":","Darsh J Shah","Peter Rushton","Somanshu Singla","Mohit Parmar","Kurt Smith","Yash Vanjani","Ashish Vaswani","Adarsh Chaluvaraju","Andrew Hojel","Andrew Ma","Anil Thomas","Anthony Polloreno","Ashish Tanwer","Burhan Drak Sibai","Divya S Mansingka","Divya Shivaprasad","Ishaan Shah","Karl Stratos","Khoi Nguyen","Michael Callahan","Michael Pust","Mrinal Iyer","Philip Monk","Platon Mazarakis","Ritvik Kapila","Saurabh Srivastava","Tim Romanski"],"abstract":"A language model's ability to reflect on its own reasoning provides a key advantage for solving complex problems. While most recent research has focused on how this ability develops during reinforcement learning, we show that it actually begins to emerge much earlier - during the model's pre-training. To study this, we introduce deliberate errors into chains-of-thought and test whether the model can still arrive at the correct answer by recognizing and correcting these mistakes. By tracking performance across different stages of pre-training, we observe that this self-correcting ability appears early and improves steadily over time. For instance, an OLMo2-7B model pre-trained on 4 trillion tokens displays self-correction on our six self-reflection tasks.","url_abs":"https://arxiv.org/abs/2504.04022v1","url_pdf":"https://arxiv.org/pdf/2504.04022v1.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":"rethinking-reflection-in-pre-training","repo_url":"https://github.com/Essential-AI/reflection","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2504.04022","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2504.04022"}},"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/Essential-AI/reflection","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":12},"by_repo_kind":{"official":{"samples":12,"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":"82ae48da7fcb7018","entry":"answer_in_string","repo":"Essential-AI/reflection","repo_kind":"official","path":"tasks/triviaqa_adv/preprocess.py","file_url":"https://github.com/Essential-AI/reflection/blob/HEAD/tasks/triviaqa_adv/preprocess.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":true,"mcp_get_code":{"code_sha256":"82ae48da7fcb7018"}},{"code_sha256_prefix":"7f310ddc714b0ca6","entry":"create_olmo_consolidated_plot","repo":"Essential-AI/reflection","repo_kind":"official","path":"results/plot_results.py","file_url":"https://github.com/Essential-AI/reflection/blob/HEAD/results/plot_results.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":true,"mcp_get_code":{"code_sha256":"7f310ddc714b0ca6"}},{"code_sha256_prefix":"97fdc71e82dddfcd","entry":"doc_to_target","repo":"Essential-AI/reflection","repo_kind":"official","path":"tasks/bbh_adv/_utils.py","file_url":"https://github.com/Essential-AI/reflection/blob/HEAD/tasks/bbh_adv/_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":true,"mcp_get_code":{"code_sha256":"97fdc71e82dddfcd"}},{"code_sha256_prefix":"3de260f5b0a4efe5","entry":"doc_to_target","repo":"Essential-AI/reflection","repo_kind":"official","path":"tasks/gsm8k-platinum_adv/preprocess_gsm8k-platinum_adv.py","file_url":"https://github.com/Essential-AI/reflection/blob/HEAD/tasks/gsm8k-platinum_adv/preprocess_gsm8k-platinum_adv.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":true,"mcp_get_code":{"code_sha256":"3de260f5b0a4efe5"}},{"code_sha256_prefix":"e120c0ae5f3c53dc","entry":"doc_to_text","repo":"Essential-AI/reflection","repo_kind":"official","path":"tasks/bbh_adv/_utils.py","file_url":"https://github.com/Essential-AI/reflection/blob/HEAD/tasks/bbh_adv/_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":true,"mcp_get_code":{"code_sha256":"e120c0ae5f3c53dc"}},{"code_sha256_prefix":"f1f7920ca55dcbef","entry":"doc_to_text","repo":"Essential-AI/reflection","repo_kind":"official","path":"tasks/gsm8k-platinum_adv/preprocess_gsm8k-platinum_adv.py","file_url":"https://github.com/Essential-AI/reflection/blob/HEAD/tasks/gsm8k-platinum_adv/preprocess_gsm8k-platinum_adv.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":true,"mcp_get_code":{"code_sha256":"f1f7920ca55dcbef"}},{"code_sha256_prefix":"b304d3198fbed9b4","entry":"doc_to_text","repo":"Essential-AI/reflection","repo_kind":"official","path":"tasks/triviaqa_adv/preprocess.py","file_url":"https://github.com/Essential-AI/reflection/blob/HEAD/tasks/triviaqa_adv/preprocess.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":true,"mcp_get_code":{"code_sha256":"b304d3198fbed9b4"}},{"code_sha256_prefix":"6e4bd898334a1efd","entry":"parse_prediction","repo":"Essential-AI/reflection","repo_kind":"official","path":"tasks/cruxeval_i_adv/utils.py","file_url":"https://github.com/Essential-AI/reflection/blob/HEAD/tasks/cruxeval_i_adv/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":true,"mcp_get_code":{"code_sha256":"6e4bd898334a1efd"}},{"code_sha256_prefix":"d1de549b64358608","entry":"parse_prediction","repo":"Essential-AI/reflection","repo_kind":"official","path":"tasks/cruxeval_o_adv/utils.py","file_url":"https://github.com/Essential-AI/reflection/blob/HEAD/tasks/cruxeval_o_adv/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":true,"mcp_get_code":{"code_sha256":"d1de549b64358608"}},{"code_sha256_prefix":"a4d1baddfe680367","entry":"parse_reference","repo":"Essential-AI/reflection","repo_kind":"official","path":"tasks/cruxeval_i_adv/utils.py","file_url":"https://github.com/Essential-AI/reflection/blob/HEAD/tasks/cruxeval_i_adv/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":true,"mcp_get_code":{"code_sha256":"a4d1baddfe680367"}},{"code_sha256_prefix":"1a7350c092246e7e","entry":"process_results","repo":"Essential-AI/reflection","repo_kind":"official","path":"tasks/triviaqa_adv/preprocess.py","file_url":"https://github.com/Essential-AI/reflection/blob/HEAD/tasks/triviaqa_adv/preprocess.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":true,"mcp_get_code":{"code_sha256":"1a7350c092246e7e"}},{"code_sha256_prefix":"af21a1bbfd13ff00","entry":"run_pass_fail_code","repo":"Essential-AI/reflection","repo_kind":"official","path":"tasks/cruxeval_i_adv/utils.py","file_url":"https://github.com/Essential-AI/reflection/blob/HEAD/tasks/cruxeval_i_adv/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":true,"mcp_get_code":{"code_sha256":"af21a1bbfd13ff00"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}