Soft Contrastive Learning for Time Series

Seunghan Lee, Taeyoung Park, Kibok Lee
2/12/2026

No official code found. Best implementation: seunghan96/softclt (93 stars, last commit 2024-05-03).

Abstract

Contrastive learning has shown to be effective to learn representations from time series in a self-supervised way. However, contrasting similar time series instances or values from adjacent timestamps within a time series leads to ignore their inherent correlations, which results in deteriorating the quality of learned representations. To address this issue, we propose SoftCLT, a simple yet effective soft contrastive learning strategy for time series. This is achieved by introducing instance-wise and temporal contrastive loss with soft assignments ranging from zero to one. Specifically, we define soft assignments for 1) instance-wise contrastive loss by the distance between time series on the data space, and 2) temporal contrastive loss by the difference of timestamps. SoftCLT is a plug-and-play method for time series contrastive learning that improves the quality of learned representations without bells and whistles. In experiments, we demonstrate that SoftCLT consistently improves the performance in various downstream tasks including classification, semi-supervised learning, transfer learning, and anomaly detection, showing state-of-the-art performance. Code is available at this repository: https://github.com/seunghan96/softclt.

View on arXivView PDF

Code Implementations(1)

seunghan96/softcltCommunity100%
9313Shell, PythonDec 22, 20232 years ago

Similar Papers

Cite this paper

@article{lee2026soft,
  title  = {Soft Contrastive Learning for Time Series},
  author = {Seunghan Lee and Taeyoung Park and Kibok Lee},
  year   = {2026},
  eprint = {2312.16424},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2312.16424},
  journal = {ICLR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.16424.svg)](https://codeofpaper.com/paper/2312.16424)

Discussion