{"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/knowledge-entropy-decay-during-language-model","title":"Knowledge Entropy Decay during Language Model Pretraining Hinders New Knowledge Acquisition","arxiv_id":"2410.01380","date":"2024-10-02","proceeding":null,"authors":["Jiyeon Kim","Hyunji Lee","Hyowon Cho","Joel Jang","Hyeonbin Hwang","Seungpil Won","Youbin Ahn","Dohaeng Lee","Minjoon Seo"],"abstract":"In this work, we investigate how a model's tendency to broadly integrate its parametric knowledge evolves throughout pretraining, and how this behavior affects overall performance, particularly in terms of knowledge acquisition and forgetting. We introduce the concept of knowledge entropy, which quantifies the range of memory sources the model engages with; high knowledge entropy indicates that the model utilizes a wide range of memory sources, while low knowledge entropy suggests reliance on specific sources with greater certainty. Our analysis reveals a consistent decline in knowledge entropy as pretraining advances. We also find that the decline is closely associated with a reduction in the model's ability to acquire and retain knowledge, leading us to conclude that diminishing knowledge entropy (smaller number of active memory sources) impairs the model's knowledge acquisition and retention capabilities. We find further support for this by demonstrating that increasing the activity of inactive memory sources enhances the model's capacity for knowledge acquisition and retention.","url_abs":"https://arxiv.org/abs/2410.01380v2","url_pdf":"https://arxiv.org/pdf/2410.01380v2.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":"knowledge-entropy-decay-during-language-model","repo_url":"https://github.com/kaistai/knowledge-entropy","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.01380","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.01380"}},"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/kaistAI/Knowledge-Entropy","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kaistai/knowledge-entropy","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_fixture":1,"ran_draft_wrong":5,"ran":1,"unverified":4},"by_repo_kind":{"official":{"samples":11,"ran":7,"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":"30d7eec482ebf6b1","entry":"repeat_kv","repo":"kaistAI/Knowledge-Entropy","repo_kind":"official","path":"analysis/modeling_olmo_hf.py","file_url":"https://github.com/kaistAI/Knowledge-Entropy/blob/HEAD/analysis/modeling_olmo_hf.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"30d7eec482ebf6b1"}},{"code_sha256_prefix":"bac65c3dafaec040","entry":"apply_rotary_pos_emb","repo":"kaistAI/Knowledge-Entropy","repo_kind":"official","path":"analysis/modeling_olmo_hf.py","file_url":"https://github.com/kaistAI/Knowledge-Entropy/blob/HEAD/analysis/modeling_olmo_hf.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bac65c3dafaec040"}},{"code_sha256_prefix":"f9abf6d74699cc1c","entry":"causal_attention_bias","repo":"kaistAI/Knowledge-Entropy","repo_kind":"official","path":"olmo/model.py","file_url":"https://github.com/kaistAI/Knowledge-Entropy/blob/HEAD/olmo/model.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f9abf6d74699cc1c"}},{"code_sha256_prefix":"7d8c6c9d6d724cd8","entry":"custom_collate_fn","repo":"kaistai/knowledge-entropy","repo_kind":"official","path":"analysis/entropy.py","file_url":"https://github.com/kaistai/knowledge-entropy/blob/HEAD/analysis/entropy.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7d8c6c9d6d724cd8"}},{"code_sha256_prefix":"b99eea6376d1e212","entry":"rotate_half","repo":"kaistAI/Knowledge-Entropy","repo_kind":"official","path":"analysis/modeling_olmo_hf.py","file_url":"https://github.com/kaistAI/Knowledge-Entropy/blob/HEAD/analysis/modeling_olmo_hf.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b99eea6376d1e212"}},{"code_sha256_prefix":"c2cbf9a2c81870a8","entry":"turn_into_entropy","repo":"kaistai/knowledge-entropy","repo_kind":"official","path":"analysis/entropy.py","file_url":"https://github.com/kaistai/knowledge-entropy/blob/HEAD/analysis/entropy.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c2cbf9a2c81870a8"}},{"code_sha256_prefix":"48a44512f819bf03","entry":"turn_into_entropy_softmax","repo":"kaistai/knowledge-entropy","repo_kind":"official","path":"analysis/entropy.py","file_url":"https://github.com/kaistai/knowledge-entropy/blob/HEAD/analysis/entropy.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"48a44512f819bf03"}},{"code_sha256_prefix":"f0c3a597e3ccfaf6","entry":"decode_key","repo":"kaistAI/Knowledge-Entropy","repo_kind":"official","path":"olmo/safetensors_util.py","file_url":"https://github.com/kaistAI/Knowledge-Entropy/blob/HEAD/olmo/safetensors_util.py","link_basis":"plan_row","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":"f0c3a597e3ccfaf6"}},{"code_sha256_prefix":"e3246d51c7d7535c","entry":"encode_key","repo":"kaistAI/Knowledge-Entropy","repo_kind":"official","path":"olmo/safetensors_util.py","file_url":"https://github.com/kaistAI/Knowledge-Entropy/blob/HEAD/olmo/safetensors_util.py","link_basis":"plan_row","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":"e3246d51c7d7535c"}},{"code_sha256_prefix":"2a48669b9e6f8a52","entry":"fix_optim_state_dict","repo":"kaistAI/Knowledge-Entropy","repo_kind":"official","path":"olmo/optim.py","file_url":"https://github.com/kaistAI/Knowledge-Entropy/blob/HEAD/olmo/optim.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":"2a48669b9e6f8a52"}},{"code_sha256_prefix":"b593a4bbddcc66c3","entry":"flatten_dict","repo":"kaistAI/Knowledge-Entropy","repo_kind":"official","path":"olmo/safetensors_util.py","file_url":"https://github.com/kaistAI/Knowledge-Entropy/blob/HEAD/olmo/safetensors_util.py","link_basis":"plan_row","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":"b593a4bbddcc66c3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}