{"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/unsupervised-representation-learning-for-time-1","title":"Unsupervised Representation Learning for Time Series with Temporal Neighborhood Coding","arxiv_id":"2106.00750","date":"2021-06-01","proceeding":"ICLR 2021 1","authors":["Sana Tonekaboni","Danny Eytan","Anna Goldenberg"],"abstract":"Time series are often complex and rich in information but sparsely labeled and therefore challenging to model. In this paper, we propose a self-supervised framework for learning generalizable representations for non-stationary time series. Our approach, called Temporal Neighborhood Coding (TNC), takes advantage of the local smoothness of a signal's generative process to define neighborhoods in time with stationary properties. Using a debiased contrastive objective, our framework learns time series representations by ensuring that in the encoding space, the distribution of signals from within a neighborhood is distinguishable from the distribution of non-neighboring signals. Our motivation stems from the medical field, where the ability to model the dynamic nature of time series data is especially valuable for identifying, tracking, and predicting the underlying patients' latent states in settings where labeling data is practically impossible. We compare our method to recently developed unsupervised representation learning approaches and demonstrate superior performance on clustering and classification tasks for multiple datasets.","url_abs":"https://arxiv.org/abs/2106.00750v1","url_pdf":"https://arxiv.org/pdf/2106.00750v1.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":"unsupervised-representation-learning-for-time-1","repo_url":"https://github.com/sanatonek/TNC_representation_learning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"unsupervised-representation-learning-for-time-1","repo_url":"https://github.com/uzi0espil/research-papers-implementation/tree/master/Temporal%20Neighborhood%20Coding","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"tf","reach":null}],"tasks":[{"task_slug":"clustering","task_name":"Clustering"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series","task_name":"Time Series Analysis"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2106.00750","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.00750"}},"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/uzi0espil/research-papers-implementation/tree/master/Temporal%20Neighborhood%20Coding","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sanatonek/TNC_representation_learning","reach":null}],"summary":{"ran":1,"ran_draft_wrong":2,"unverified":2},"by_repo_kind":{"official":{"samples":5,"ran":3,"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":5,"samples":[{"code_sha256_prefix":"3caf68def47c9a9a","entry":"Discriminator","repo":"sanatonek/TNC_representation_learning","repo_kind":"official","path":"tnc/tnc.py","file_url":"https://github.com/sanatonek/TNC_representation_learning/blob/HEAD/tnc/tnc.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3caf68def47c9a9a"}},{"code_sha256_prefix":"7570690ba4eb75cd","entry":"epoch_run","repo":"sanatonek/TNC_representation_learning","repo_kind":"official","path":"evaluations/classification_test.py","file_url":"https://github.com/sanatonek/TNC_representation_learning/blob/HEAD/evaluations/classification_test.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7570690ba4eb75cd"}},{"code_sha256_prefix":"ca66bc1c92b3a9af","entry":"epoch_run_encoder","repo":"sanatonek/TNC_representation_learning","repo_kind":"official","path":"evaluations/classification_test.py","file_url":"https://github.com/sanatonek/TNC_representation_learning/blob/HEAD/evaluations/classification_test.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ca66bc1c92b3a9af"}},{"code_sha256_prefix":"dd7795062caef86d","entry":"epoch_run","repo":"sanatonek/TNC_representation_learning","repo_kind":"official","path":"tnc/tnc.py","file_url":"https://github.com/sanatonek/TNC_representation_learning/blob/HEAD/tnc/tnc.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dd7795062caef86d"}},{"code_sha256_prefix":"9df5dcf82ee3b90c","entry":"train","repo":"sanatonek/TNC_representation_learning","repo_kind":"official","path":"evaluations/classification_test.py","file_url":"https://github.com/sanatonek/TNC_representation_learning/blob/HEAD/evaluations/classification_test.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9df5dcf82ee3b90c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}