SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.13401 · 2023

Time is Encoded in the Weights of Finetuned Language Models

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 8 functions out of this paper's own repositories and ran 5 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
KaiNylund/lm-weights-encode-time canonical 5 of 8
FunctionStatusWhere it lives
cos_dist Ran KaiNylund/lm-weights-encode-time/misc_analysis_and_figures/get_time_vec_distances.py
code served (permissive licence) · get_code("6b806dcd989a5d86")
cos_sim Ran KaiNylund/lm-weights-encode-time/misc_analysis_and_figures/get_closest_month_time_vec_combo.py
code served (permissive licence) · get_code("5cf053908b10bc25")
get_indicator_embs Ran KaiNylund/lm-weights-encode-time/misc_analysis_and_figures/get_closest_year_time_vec_combo.py
code served (permissive licence) · get_code("f256d010fc4b6e0f")
l2_dist Ran KaiNylund/lm-weights-encode-time/misc_analysis_and_figures/get_time_vec_distances.py
code served (permissive licence) · get_code("57a097a3a02fb406")
time_less Ran KaiNylund/lm-weights-encode-time/misc_analysis_and_figures/get_time_vec_distances.py
code served (permissive licence) · get_code("6f8530654afebd88")
get_model_flattened_weights Not yet run KaiNylund/lm-weights-encode-time/misc_analysis_and_figures/get_closest_month_time_vec_combo.py
code served (permissive licence) · get_code("65920bba78dddf56")
get_model_flattened_weights Not yet run KaiNylund/lm-weights-encode-time/misc_analysis_and_figures/get_closest_year_time_vec_combo.py
code served (permissive licence) · get_code("5d5cdab39165c79d")
get_model_flattened_weights Not yet run KaiNylund/lm-weights-encode-time/misc_analysis_and_figures/get_time_vec_monthly_projections.py
code served (permissive licence) · get_code("1cbb4247ee981bfc")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2312.13401")
get_code_for_paper("2312.13401")
have("2312.13401")

Connect an agent — have() is free.