{"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/time-is-encoded-in-the-weights-of-finetuned","title":"Time is Encoded in the Weights of Finetuned Language Models","arxiv_id":"2312.13401","date":"2023-12-20","proceeding":null,"authors":["Kai Nylund","Suchin Gururangan","Noah A. Smith"],"abstract":"We present time vectors, a simple tool to customize language models to new time periods. Time vectors are created by finetuning a language model on data from a single time (e.g., a year or month), and then subtracting the weights of the original pretrained model. This vector specifies a direction in weight space that, as our experiments show, improves performance on text from that time period. Time vectors specialized to adjacent time periods appear to be positioned closer together in a manifold. Using this structure, we interpolate between time vectors to induce new models that perform better on intervening and future time periods, without any additional training. We demonstrate the consistency of our findings across different tasks, domains, model sizes, and time scales. Our results suggest that time is encoded in the weight space of finetuned models.","url_abs":"https://arxiv.org/abs/2312.13401v2","url_pdf":"https://arxiv.org/pdf/2312.13401v2.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":"time-is-encoded-in-the-weights-of-finetuned","repo_url":"https://github.com/KaiNylund/lm-weights-encode-time","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2312.13401","atlas_url":"https://app.syntology.ai/?focus=2312.13401","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2312.13401"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/KaiNylund/lm-weights-encode-time","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":5,"unverified":3},"by_repo_kind":{"official":{"samples":8,"ran":5,"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":"6b806dcd989a5d86","entry":"cos_dist","repo":"KaiNylund/lm-weights-encode-time","repo_kind":"official","path":"misc_analysis_and_figures/get_time_vec_distances.py","file_url":"https://github.com/KaiNylund/lm-weights-encode-time/blob/HEAD/misc_analysis_and_figures/get_time_vec_distances.py","link_basis":"first_harvest_node","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":"6b806dcd989a5d86"}},{"code_sha256_prefix":"5cf053908b10bc25","entry":"cos_sim","repo":"KaiNylund/lm-weights-encode-time","repo_kind":"official","path":"misc_analysis_and_figures/get_closest_month_time_vec_combo.py","file_url":"https://github.com/KaiNylund/lm-weights-encode-time/blob/HEAD/misc_analysis_and_figures/get_closest_month_time_vec_combo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5cf053908b10bc25"}},{"code_sha256_prefix":"f256d010fc4b6e0f","entry":"get_indicator_embs","repo":"KaiNylund/lm-weights-encode-time","repo_kind":"official","path":"misc_analysis_and_figures/get_closest_year_time_vec_combo.py","file_url":"https://github.com/KaiNylund/lm-weights-encode-time/blob/HEAD/misc_analysis_and_figures/get_closest_year_time_vec_combo.py","link_basis":"first_harvest_node","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":"f256d010fc4b6e0f"}},{"code_sha256_prefix":"57a097a3a02fb406","entry":"l2_dist","repo":"KaiNylund/lm-weights-encode-time","repo_kind":"official","path":"misc_analysis_and_figures/get_time_vec_distances.py","file_url":"https://github.com/KaiNylund/lm-weights-encode-time/blob/HEAD/misc_analysis_and_figures/get_time_vec_distances.py","link_basis":"first_harvest_node","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":"57a097a3a02fb406"}},{"code_sha256_prefix":"6f8530654afebd88","entry":"time_less","repo":"KaiNylund/lm-weights-encode-time","repo_kind":"official","path":"misc_analysis_and_figures/get_time_vec_distances.py","file_url":"https://github.com/KaiNylund/lm-weights-encode-time/blob/HEAD/misc_analysis_and_figures/get_time_vec_distances.py","link_basis":"first_harvest_node","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":"6f8530654afebd88"}},{"code_sha256_prefix":"65920bba78dddf56","entry":"get_model_flattened_weights","repo":"KaiNylund/lm-weights-encode-time","repo_kind":"official","path":"misc_analysis_and_figures/get_closest_month_time_vec_combo.py","file_url":"https://github.com/KaiNylund/lm-weights-encode-time/blob/HEAD/misc_analysis_and_figures/get_closest_month_time_vec_combo.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":"65920bba78dddf56"}},{"code_sha256_prefix":"5d5cdab39165c79d","entry":"get_model_flattened_weights","repo":"KaiNylund/lm-weights-encode-time","repo_kind":"official","path":"misc_analysis_and_figures/get_closest_year_time_vec_combo.py","file_url":"https://github.com/KaiNylund/lm-weights-encode-time/blob/HEAD/misc_analysis_and_figures/get_closest_year_time_vec_combo.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":"5d5cdab39165c79d"}},{"code_sha256_prefix":"1cbb4247ee981bfc","entry":"get_model_flattened_weights","repo":"KaiNylund/lm-weights-encode-time","repo_kind":"official","path":"misc_analysis_and_figures/get_time_vec_monthly_projections.py","file_url":"https://github.com/KaiNylund/lm-weights-encode-time/blob/HEAD/misc_analysis_and_figures/get_time_vec_monthly_projections.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":"1cbb4247ee981bfc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}