{"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/time2vec-learning-a-vector-representation-of","title":"Time2Vec: Learning a Vector Representation of Time","arxiv_id":"1907.05321","date":"2019-07-11","proceeding":null,"authors":["Seyed Mehran Kazemi","Rishab Goel","Sepehr Eghbali","Janahan Ramanan","Jaspreet Sahota","Sanjay Thakur","Stella Wu","Cathal Smyth","Pascal Poupart","Marcus Brubaker"],"abstract":"Time is an important feature in many applications involving events that occur synchronously and/or asynchronously. To effectively consume time information, recent studies have focused on designing new architectures. In this paper, we take an orthogonal but complementary approach by providing a model-agnostic vector representation for time, called Time2Vec, that can be easily imported into many existing and future architectures and improve their performances. We show on a range of models and problems that replacing the notion of time with its Time2Vec representation improves the performance of the final model.","url_abs":"https://arxiv.org/abs/1907.05321v1","url_pdf":"https://arxiv.org/pdf/1907.05321v1.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":"time2vec-learning-a-vector-representation-of","repo_url":"https://github.com/avinashbarnwal/Time2Vec","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"time2vec-learning-a-vector-representation-of","repo_url":"https://github.com/email81227/Time2Vec-TensorFlow2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"time2vec-learning-a-vector-representation-of","repo_url":"https://github.com/eyangs/transferNILM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"time2vec-learning-a-vector-representation-of","repo_url":"https://github.com/ojus1/Date2Vec","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"time2vec-learning-a-vector-representation-of","repo_url":"https://github.com/ojus1/Time2Vec-PyTorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"time2vec-learning-a-vector-representation-of","repo_url":"https://github.com/virtualspark/time2vec_ethereum","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1907.05321","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1907.05321"}},"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/eyangs/transferNILM","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/avinashbarnwal/Time2Vec","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/email81227/Time2Vec-TensorFlow2","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/virtualspark/time2vec_ethereum","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ojus1/Date2Vec","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ojus1/Time2Vec-PyTorch","reach":null}],"summary":{"ran_fixture":1,"unverified":6},"by_repo_kind":{"listed":{"samples":7,"ran":1,"repositories":3}},"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":"e4bdfc21bb19cabb","entry":"t2v","repo":"ojus1/Time2Vec-PyTorch","repo_kind":"listed","path":"periodic_activations.py","file_url":"https://github.com/ojus1/Time2Vec-PyTorch/blob/HEAD/periodic_activations.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e4bdfc21bb19cabb"}},{"code_sha256_prefix":"0938fbba8de62928","entry":"general_lstm","repo":"email81227/Time2Vec-TensorFlow2","repo_kind":"listed","path":"Time2Vec/models.py","file_url":"https://github.com/email81227/Time2Vec-TensorFlow2/blob/HEAD/Time2Vec/models.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":"0938fbba8de62928"}},{"code_sha256_prefix":"376ce8b641e072e3","entry":"get_FN","repo":"eyangs/transferNILM","repo_kind":"listed","path":"nilm_metric.py","file_url":"https://github.com/eyangs/transferNILM/blob/HEAD/nilm_metric.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":"376ce8b641e072e3"}},{"code_sha256_prefix":"3296b6a7c143557f","entry":"get_FP","repo":"eyangs/transferNILM","repo_kind":"listed","path":"nilm_metric.py","file_url":"https://github.com/eyangs/transferNILM/blob/HEAD/nilm_metric.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":"3296b6a7c143557f"}},{"code_sha256_prefix":"567d6001f05c80ee","entry":"get_TP","repo":"eyangs/transferNILM","repo_kind":"listed","path":"nilm_metric.py","file_url":"https://github.com/eyangs/transferNILM/blob/HEAD/nilm_metric.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":"567d6001f05c80ee"}},{"code_sha256_prefix":"82a028fb3cb5f091","entry":"load_dataframe","repo":"eyangs/transferNILM","repo_kind":"listed","path":"dataset_management/functions.py","file_url":"https://github.com/eyangs/transferNILM/blob/HEAD/dataset_management/functions.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":"82a028fb3cb5f091"}},{"code_sha256_prefix":"fa3722ff1a8f007b","entry":"seq2point","repo":"eyangs/transferNILM","repo_kind":"listed","path":"model_structure.py","file_url":"https://github.com/eyangs/transferNILM/blob/HEAD/model_structure.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":"fa3722ff1a8f007b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}