eMargin: Revisiting Contrastive Learning with Margin-Based Separation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Shamba, Abdul-Kazeem, Bach, Kerstin, Taylor, Gavin
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918098781601792
author Shamba, Abdul-Kazeem
Bach, Kerstin
Taylor, Gavin
author_facet Shamba, Abdul-Kazeem
Bach, Kerstin
Taylor, Gavin
contents We revisit previous contrastive learning frameworks to investigate the effect of introducing an adaptive margin into the contrastive loss function for time series representation learning. Specifically, we explore whether an adaptive margin (eMargin), adjusted based on a predefined similarity threshold, can improve the separation between adjacent but dissimilar time steps and subsequently lead to better performance in downstream tasks. Our study evaluates the impact of this modification on clustering performance and classification in three benchmark datasets. Our findings, however, indicate that achieving high scores on unsupervised clustering metrics does not necessarily imply that the learned embeddings are meaningful or effective in downstream tasks. To be specific, eMargin added to InfoNCE consistently outperforms state-of-the-art baselines in unsupervised clustering metrics, but struggles to achieve competitive results in downstream classification with linear probing. The source code is publicly available at https://github.com/sfi-norwai/eMargin.
format Preprint
id arxiv_https___arxiv_org_abs_2507_14828
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle eMargin: Revisiting Contrastive Learning with Margin-Based Separation
Shamba, Abdul-Kazeem
Bach, Kerstin
Taylor, Gavin
Machine Learning
Artificial Intelligence
We revisit previous contrastive learning frameworks to investigate the effect of introducing an adaptive margin into the contrastive loss function for time series representation learning. Specifically, we explore whether an adaptive margin (eMargin), adjusted based on a predefined similarity threshold, can improve the separation between adjacent but dissimilar time steps and subsequently lead to better performance in downstream tasks. Our study evaluates the impact of this modification on clustering performance and classification in three benchmark datasets. Our findings, however, indicate that achieving high scores on unsupervised clustering metrics does not necessarily imply that the learned embeddings are meaningful or effective in downstream tasks. To be specific, eMargin added to InfoNCE consistently outperforms state-of-the-art baselines in unsupervised clustering metrics, but struggles to achieve competitive results in downstream classification with linear probing. The source code is publicly available at https://github.com/sfi-norwai/eMargin.
title eMargin: Revisiting Contrastive Learning with Margin-Based Separation
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2507.14828