SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.09336 · 2024

Guidelines for Augmentation Selection in Contrastive Learning for Time Series Classification

arXiv · PDF · Open in the Atlas

Code that ran

3 of 6 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, 1 violated it and 0 have no contract verdict; 2 failures of our instrument; 3 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2407.09336.json · badge: /api/ran/2407.09336.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
dl4mhealth/ts-contrastive-augmentation-recommendation canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
FunctionStatusWhere it lives
Average Ran
ran, violated the contract we drafted
dl4mhealth/ts-contrastive-augmentation-recommendation/ts_arm/utlis.py
pointer only (licence: MIT); the stored copy get_code serves, from InterDigitalInc/CompressAI, is pointer only (licence: BSD-3-Clause-Clear) · get_code("390aec91fdddfcac")
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 InterDigitalInc/CompressAI, and BSD-3-Clause-Clear, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

rank_value Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dl4mhealth/ts-contrastive-augmentation-recommendation/ts_arm/utlis.py
code served (permissive licence) · get_code("7e3a4943e9fbb176")
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 list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - rank_realvalue: used with indexing (rank_realvalue[-1]), iteration (enumerate, for loops)
#   and comparison operations (>, +). Should be a list or array of numeric values.
# - margin: a float that gets multiplied and used in comparisons

# The function expects a sequence of comparable numeric values
rank_realvalue = [0.5, 0.8, 1.2, 1.5, 2.0]

ARGS = {
    "rank_realvalue": rank_realvalue,
    "margin": 0.01
}
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 list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
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
recall_at_k Ran
ran; our contract draft was wrong, not the code
dl4mhealth/ts-contrastive-augmentation-recommendation/ts_arm/utlis.py
code served (permissive licence) · get_code("034fe6931e83e8cb")
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 float, 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 numpy as np

torch.manual_seed(0)

# Analyze the function:
# - actual_list: list of items, used with slicing [:k] and membership testing (in)
# - predicted_list: list of items, used with slicing [:k] and membership testing (in)
# - k: int, used for slicing and comparison

# Simple setup: use lists of integers as items
actual_list = [1, 2, 3, 4, 5]
predicted_list = [2, 3, 5, 6, 7]
k = 3

ARGS = {
    "actual_list": actual_list,
    "predicted_list": predicted_list,
    "k": k
}
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 float, 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
aug_rec_popular Not yet run
unverified (harvested, no recorded run)
dl4mhealth/ts-contrastive-augmentation-recommendation/ts_arm/aug_rec.py
code served (permissive licence) · get_code("7b08705024e43e40")
How it ran

no invocation recorded.

aug_rec_ts Not yet run
unverified (harvested, no recorded run)
dl4mhealth/ts-contrastive-augmentation-recommendation/ts_arm/aug_rec.py
code served (permissive licence) · get_code("0f36ad1f4ac4df60")
How it ran

no invocation recorded.

synth_trend_season Not yet run
unverified (harvested, no recorded run)
dl4mhealth/ts-contrastive-augmentation-recommendation/ts_arm/synth_trend_season.py
code served (permissive licence) · get_code("fccf81177a2e8225")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 5 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
Average 6 other papers
5 dated earlier, 1 later
1611.01704 (2016-11)
End-to-end Optimized Image Compression
1802.01436 (2018-02)
Variational image compression with a scale hyperprior
2011.03029 (2020-11)
CompressAI: a PyTorch library and evaluation platform for end-to-end compression research
and 3 more not named here

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

Self-supervised contrastive learning has become a key technique in deep learning, particularly in time series analysis, due to its ability to learn meaningful representations without explicit supervision. Augmentation is a critical component in contrastive learning, where different augmentations can dramatically impact performance, sometimes influencing accuracy by over 30%. However, the selection of augmentations is predominantly empirical which can be suboptimal, or grid searching that is time-consuming. In this paper, we establish a principled framework for selecting augmentations based on dataset characteristics such as trend and seasonality. Specifically, we construct 12 synthetic datasets incorporating trend, seasonality, and integration weights. We then evaluate the effectiveness of 8 different augmentations across these synthetic datasets, thereby inducing generalizable associations between time series characteristics and augmentation efficiency. Additionally, we evaluated the induced associations across 6 real-world datasets encompassing domains such as activity recognition, disease diagnosis, traffic monitoring, electricity usage, mechanical fault prognosis, and finance. These real-world datasets are diverse, covering a range from 1 to 12 channels, 2 to 10 classes, sequence lengths of 14 to 1280, and data frequencies from 250 Hz to daily intervals. The experimental results show that our proposed trend-seasonality-based augmentation recommendation algorithm can accurately identify the effective augmentations for a given time series dataset, achieving an average Recall@3 of 0.667, outperforming baselines. Our work provides guidance for studies employing contrastive learning in time series analysis, with wide-ranging applications. All the code, datasets, and analysis results will be released at https://github.com/DL4mHealth/TS-Contrastive-Augmentation-Recommendation.

For agents

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

get_harvested_code_for_paper("2407.09336")
get_code_for_paper("2407.09336")
have("2407.09336")

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

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

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

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

Connect an agent — have() is free.