SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.10466 · 2021

TS2Vec: Towards Universal Representation of Time Series

arXiv · PDF · Open in the Atlas

Code that ran

15 of 23 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 2 violated it and 3 have no contract verdict; 10 failures of our instrument; 8 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2106.10466.json · badge: /api/ran/2106.10466.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
zhihanyue/ts2vec canonical (classifier label)
classifier basis: census
13 ran · 5 no recorded run
xingyu617/SimTS_Representation_Learning extension (classifier label)
classifier basis: classifier_2025
2 ran · 3 no recorded run
FunctionStatusWhere it lives
cal_metrics Ran
ran; our contract draft was wrong, not the code
xingyu617/SimTS_Representation_Learning/tasks/forecasting.py
code served (permissive licence) · get_code("a4750195b8805692")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import torch

torch.manual_seed(0)

# Construct simple prediction and target arrays for cal_metrics
# The function computes MSE and MAE by element-wise operations
pred = np.array([[1.0, 2.0, 3.0, 4.0],
                  [5.0, 6.0, 7.0, 8.0]])

target = np.array([[1.1, 1.9, 3.2, 3.8],
                    [5.2, 5.8, 7.1, 7.9]])

ARGS = {
    'pred': pred,
    'target': target
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
fit_knn Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhihanyue/ts2vec/tasks/_eval_protocols.py
pointer only (licence: MIT); the stored copy get_code serves, from KoheiObata/MoST, is pointer only (licence: NONE) · get_code("befe203f4fa96ee5")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from KoheiObata/MoST, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

fit_svm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhihanyue/ts2vec/tasks/_eval_protocols.py
code served (permissive licence) · get_code("c62d56549152cab0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned SVC. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from sklearn.svm import SVC
from sklearn.model_selection import GridSearchCV, train_test_split

# Create small sample data
np.random.seed(0)

# Create features: 60 samples, 4 features
features = np.random.randn(60, 4).astype(np.float32)

# Create labels: 3 classes, balanced
y = np.array([0] * 20 + [1] * 20 + [2] * 20)

ARGS = {
    'features': features,
    'y': y,
    'MAX_SAMPLES': 10000
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SVC — a SVC output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SVC output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_binomial_mask Ran
ran, violated the contract we drafted
zhihanyue/ts2vec/models/encoder.py
pointer only (licence: MIT); the stored copy get_code serves, from AslanDing/AutoTCL, is pointer only (licence: NONE) · get_code("fd10054ec4772b80")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from AslanDing/AutoTCL, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_continuous_mask Ran
ran, violated the contract we drafted
zhihanyue/ts2vec/models/encoder.py
pointer only (licence: MIT); the stored copy get_code serves, from AslanDing/AutoTCL, is pointer only (licence: NONE) · get_code("acda587a1d1be3bf")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from AslanDing/AutoTCL, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_range_proba Ran
ran on a synthesized input
zhihanyue/ts2vec/tasks/anomaly_detection.py
code served (permissive licence) · get_code("9e3f8a516d6d6bda")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family int, shape (10,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Analyze the function to understand what it needs:
# - predict: array-like of predictions (0s and 1s)
# - label: array-like of labels (0s and 1s) with same length as predict
# - delay: int parameter (default 7)

# The function uses:
# - label[1:] and label[:-1] for slicing
# - np.where() on label differences
# - Indexing into predict and label with ranges
# - Checking if 1 is in slices of predict
# - Setting values in new_predict array

# Create simple test data
predict = np.array([0, 1, 0, 1, 0, 0, 1, 1, 0, 0])
label = np.array([0, 0, 0, 1, 1, 1, 0, 0, 0, 0])
delay = 7

ARGS = {
    "predict": predict,
    "label": label,
    "delay": delay
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (10,) — shape (10,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
hierarchical_contrastive_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhihanyue/ts2vec/models/losses.py
code served (permissive licence) · get_code("50140c8208c033ca")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for z1 and z2
# Shape: (batch_size, time_steps, feature_dim)
# Using batch=2, time_steps=4, feature_dim=3 for distinct dimensions
z1 = torch.randn(2, 4, 3)
z2 = torch.randn(2, 4, 3)

# Set up parameters
alpha = 0.5
temporal_unit = 0

ARGS = {
    "z1": z1,
    "z2": z2,
    "alpha": alpha,
    "temporal_unit": temporal_unit,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
instance_contrastive_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhihanyue/ts2vec/models/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from sfi-norwai/Di-COT, is pointer only (licence: NONE) · get_code("c2f2651c9a2df200")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from sfi-norwai/Di-COT, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_UCR Ran
ran on a synthesized input
zhihanyue/ts2vec/datautils.py
code served (permissive licence) · get_code("589ba3938a15e163")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import numpy as np
import pandas as pd
import tempfile
import shutil

# Create a temporary directory structure for UCR datasets
temp_dir = tempfile.mkdtemp()
ucr_dir = os.path.join(temp_dir, 'datasets', 'UCR')
os.makedirs(ucr_dir, exist_ok=True)

# Create a test dataset directory
dataset_name = 'GunPoint'
dataset_dir = os.path.join(ucr_dir, dataset_name)
os.makedirs(dataset_dir, exist_ok=True)

# Create mock TRAIN.tsv file
train_data = [
    ['1'] + ['0.1', '0.2', '0.3', '0.4'],
    ['1'] + ['0.2', '0.3', '0.4', '0.5'],
    ['2'] + ['0.5', '0.6', '0.7', '0.8'],
]
train_df = pd.DataFrame(train_data)
train_file = os.path.join(dataset_dir, f'{dataset_name}_TRAIN.tsv')
train_df.to_csv(train_file, sep='\t', header=False, index=False)

# Create mock TEST.tsv file
test_data = [
    ['1'] + ['0.15', '0.25', '0.35', '0.45'],
    ['2'] + ['0.55', '0.65', '0.75', '0.85'],
]
test_df = pd.DataFrame(test_data)
test_file = os.path.join(dataset_dir, f'{dataset_name}_TEST.tsv')
test_df.to_csv(test_file, sep='\t', header=False, index=False)

# Change to temp directory so relative paths work
original_dir = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'dataset': dataset_name,
}

# Clean up will happen after function execution
# Store original_dir and temp_dir for reference if needed
_cleanup_info = (original_dir, temp_dir)
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_forecast_npy Ran
ran on a synthesized input
zhihanyue/ts2vec/datautils.py
code served (permissive licence) · get_code("ee0abcf391ea662f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from sklearn.preprocessing import StandardScaler, MinMaxScaler
import tempfile
import os

# Create a temporary directory and a mock dataset file
temp_dir = tempfile.mkdtemp()
datasets_dir = os.path.join(temp_dir, 'datasets')
os.makedirs(datasets_dir, exist_ok=True)

# Create a small mock .npy file with shape (100, 5) - 100 time steps, 5 features
mock_data = np.random.randn(100, 5).astype(np.float32)
mock_file_path = os.path.join(datasets_dir, 'test_forecast.npy')
np.save(mock_file_path, mock_data)

# Patch the datasets path for the function to find our mock file
import sys
original_cwd = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'name': 'test_forecast',
    'univar': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pad_nan_to_target Ran
ran; our contract draft was wrong, not the code
zhihanyue/ts2vec/utils.py
code served (permissive licence) · get_code("5254eb44ce12370e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 2, dtype family float, shape (8, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small float array with shape (5, 3)
array = np.array([
    [1.0, 2.0, 3.0],
    [4.0, 5.0, 6.0],
    [7.0, 8.0, 9.0],
    [10.0, 11.0, 12.0],
    [13.0, 14.0, 15.0]
], dtype=np.float32)

ARGS = {
    "array": array,
    "target_length": 8,
    "axis": 0,
    "both_side": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (8, 3) — shape (8, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pkl_load Ran
ran; our contract draft was wrong, not the code
zhihanyue/ts2vec/utils.py
code served (permissive licence) · get_code("645d1fdb1dc0e80c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pickle
import tempfile
import os

# Create a temporary pickle file with some test data
test_data = {
    'key1': 'value1',
    'key2': [1, 2, 3],
    'key3': {'nested': 'dict'}
}

# Create a temporary file and write pickle data to it
temp_file = tempfile.NamedTemporaryFile(mode='wb', delete=False, suffix='.pkl')
pickle.dump(test_data, temp_file)
temp_file.close()

# Store the filename for use in ARGS
pickle_filename = temp_file.name

ARGS = {
    'name': pickle_filename
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
segment Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xingyu617/SimTS_Representation_Learning/simts.py
code served (permissive licence) · get_code("c11f79ab12e7b749")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Construct valid arguments for the segment function
# The function expects:
# - x: a 3D tensor with shape (B, T, num_elem)
# - overlap: a parameter (though it's not used in the function body)

# Create a small 3D tensor
# B=2 (batch size), T=8 (time/sequence length), num_elem=4 (number of elements)
# Note: T should be divisible by B for the function to work correctly
x = torch.randn(2, 8, 4)

# overlap parameter - not used in the function but required
overlap = 0

ARGS = {
    "x": x,
    "overlap": overlap
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 4) — shape (2, 4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
temporal_contrastive_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhihanyue/ts2vec/models/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from sfi-norwai/Di-COT, is pointer only (licence: NONE) · get_code("72ddf2810ea340c7")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from sfi-norwai/Di-COT, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

torch_pad_nan Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhihanyue/ts2vec/utils.py
code served (permissive licence) · get_code("79783deb10f33397")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (5, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import torch

torch.manual_seed(0)

# Create a small tensor to pad
arr = torch.randn(2, 4)

# Define arguments for torch_pad_nan
ARGS = {
    "arr": arr,
    "left": 1,
    "right": 2,
    "dim": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (5, 4) — shape (5, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
eval_ad_result Not yet run
unverified (harvested, no recorded run)
zhihanyue/ts2vec/tasks/anomaly_detection.py
code served (permissive licence) · get_code("47121228bf8548c3")
How it ran

no invocation recorded.

eval_classification Not yet run
unverified (harvested, no recorded run)
xingyu617/SimTS_Representation_Learning/tasks/classification.py
code served (permissive licence) · get_code("ab1fea29d1c61d99")
How it ran

no invocation recorded.

eval_classification Not yet run
unverified (harvested, no recorded run)
zhihanyue/ts2vec/tasks/classification.py
code served (permissive licence) · get_code("9fefe06e6c5ec2ba")
How it ran

no invocation recorded.

eval_forecasting Not yet run
unverified (harvested, no recorded run)
xingyu617/SimTS_Representation_Learning/tasks/forecasting.py
code served (permissive licence) · get_code("119ba424fe985113")
How it ran

no invocation recorded.

fit_lr Not yet run
unverified (harvested, no recorded run)
zhihanyue/ts2vec/tasks/_eval_protocols.py
pointer only (licence: MIT); the stored copy get_code serves, from KoheiObata/MoST, is pointer only (licence: NONE) · get_code("2309c20a08ac1773")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from KoheiObata/MoST, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

generate_pred_samples Not yet run
unverified (harvested, no recorded run)
xingyu617/SimTS_Representation_Learning/tasks/forecasting.py
code served (permissive licence) · get_code("63e193a1a856ae88")
How it ran

no invocation recorded.

load_UEA Not yet run
unverified (harvested, no recorded run)
zhihanyue/ts2vec/datautils.py
code served (permissive licence) · get_code("017c065ca560f687")
How it ran

no invocation recorded.

reconstruct_label Not yet run
unverified (harvested, no recorded run)
zhihanyue/ts2vec/tasks/anomaly_detection.py
code served (permissive licence) · get_code("a537f33988462d8c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 23 samples lifted from this paper's linked repositories, 23 carry a function identity and 0 do not. Of the 23 distinct functions with an identity, 14 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 3 the same month, 14 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
generate_binomial_mask 9 other papers
9 later · 3 only as an assembly brick
2202.01575 (2022-02)
CoST: Contrastive Learning of Disentangled Seasonal-Trend Representations for Time Series Forecasting
2306.12086 (2023-06)
What Constitutes Good Contrastive Learning in Time-Series Forecasting?
2309.03755 (2023-09)
TSGBench: Time Series Generation Benchmark
and 6 more not named here
generate_continuous_mask 8 other papers
8 later · 3 only as an assembly brick
2202.01575 (2022-02)
CoST: Contrastive Learning of Disentangled Seasonal-Trend Representations for Time Series Forecasting
2309.03755 (2023-09)
TSGBench: Time Series Generation Benchmark
2309.12659 (2023-09)
OneNet: Enhancing Time Series Forecasting Models under Concept Drift by Online Ensembling
and 5 more not named here
pad_nan_to_target 7 other papers
7 later · 1 only as an assembly brick
2202.01575 (2022-02)
CoST: Contrastive Learning of Disentangled Seasonal-Trend Representations for Time Series Forecasting
2310.04486 (2023-10)
T-Rep: Representation Learning for Time Series using Time-Embeddings
2310.14017 (2023-10)
Contrast Everything: A Hierarchical Contrastive Framework for Medical Time-Series
and 4 more not named here
pkl_load 6 other papers
6 later
2202.01575 (2022-02)
CoST: Contrastive Learning of Disentangled Seasonal-Trend Representations for Time Series Forecasting
2311.11235 (2023-11)
Unraveling the "Anomaly" in Time Series Anomaly Detection: A Self-supervised Tri-domain Solution
2312.15709 (2023-12)
TimesURL: Self-supervised Contrastive Learning for Universal Time Series Representation Learning
and 3 more not named here
torch_pad_nan 6 other papers
6 later
2202.01575 (2022-02)
CoST: Contrastive Learning of Disentangled Seasonal-Trend Representations for Time Series Forecasting
2310.14017 (2023-10)
Contrast Everything: A Hierarchical Contrastive Framework for Medical Time-Series
2312.15709 (2023-12)
TimesURL: Self-supervised Contrastive Learning for Universal Time Series Representation Learning
and 3 more not named here
instance_contrastive_loss 3 other papers
1 the same month, 2 later · 2 only as an assembly brick
2106.14112 (2021-06)
Time-Series Representation Learning via Temporal and Contextual Contrasting
2310.14017 (2023-10)
Contrast Everything: A Hierarchical Contrastive Framework for Medical Time-Series
2605.21241 (2026-05)
Divide and Contrast: Learning Robust Temporal Features without Augmentation
temporal_contrastive_loss 3 other papers
1 the same month, 2 later · 2 only as an assembly brick
2106.14112 (2021-06)
Time-Series Representation Learning via Temporal and Contextual Contrasting
2310.14017 (2023-10)
Contrast Everything: A Hierarchical Contrastive Framework for Medical Time-Series
2605.21241 (2026-05)
Divide and Contrast: Learning Robust Temporal Features without Augmentation
cal_metrics 2 other papers
2 later
2202.01575 (2022-02)
CoST: Contrastive Learning of Disentangled Seasonal-Trend Representations for Time Series Forecasting
2602.23663 (2026-02)
Disentangled Mode-Specific Representations for Tensor Time Series via Contrastive Learning
fit_knn 2 other papers
2 later
2310.14017 (2023-10)
Contrast Everything: A Hierarchical Contrastive Framework for Medical Time-Series
2602.23663 (2026-02)
Disentangled Mode-Specific Representations for Tensor Time Series via Contrastive Learning
fit_lr 2 other papers
2 later
2310.14017 (2023-10)
Contrast Everything: A Hierarchical Contrastive Framework for Medical Time-Series
2602.23663 (2026-02)
Disentangled Mode-Specific Representations for Tensor Time Series via Contrastive Learning
generate_pred_samples 2 other papers
2 later
2202.01575 (2022-02)
CoST: Contrastive Learning of Disentangled Seasonal-Trend Representations for Time Series Forecasting
2602.23663 (2026-02)
Disentangled Mode-Specific Representations for Tensor Time Series via Contrastive Learning
hierarchical_contrastive_loss 2 other papers
1 the same month, 1 later · 1 only as an assembly brick
2106.14112 (2021-06)
Time-Series Representation Learning via Temporal and Contextual Contrasting
2310.14017 (2023-10)
Contrast Everything: A Hierarchical Contrastive Framework for Medical Time-Series
fit_svm 1 other paper
1 later
2310.14017 (2023-10)
Contrast Everything: A Hierarchical Contrastive Framework for Medical Time-Series
load_forecast_npy 1 other paper
1 later
2202.01575 (2022-02)
CoST: Contrastive Learning of Disentangled Seasonal-Trend Representations for Time Series Forecasting

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

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

Abstract

This paper presents TS2Vec, a universal framework for learning representations of time series in an arbitrary semantic level. Unlike existing methods, TS2Vec performs contrastive learning in a hierarchical way over augmented context views, which enables a robust contextual representation for each timestamp. Furthermore, to obtain the representation of an arbitrary sub-sequence in the time series, we can apply a simple aggregation over the representations of corresponding timestamps. We conduct extensive experiments on time series classification tasks to evaluate the quality of time series representations. As a result, TS2Vec achieves significant improvement over existing SOTAs of unsupervised time series representation on 125 UCR datasets and 29 UEA datasets. The learned timestamp-level representations also achieve superior results in time series forecasting and anomaly detection tasks. A linear regression trained on top of the learned representations outperforms previous SOTAs of time series forecasting. Furthermore, we present a simple way to apply the learned representations for unsupervised anomaly detection, which establishes SOTA results in the literature. The source code is publicly available at https://github.com/yuezhihan/ts2vec.

For agents

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

get_harvested_code_for_paper("2106.10466")
get_code_for_paper("2106.10466")
have("2106.10466")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2106.10466.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2106.10466.svg)](https://syntology.ai/paper/2106.10466)

Connect an agent — have() is free.