polito.it
Politecnico di Torino (logo)

Self-Supervised ECG Representation Learning for multiple tasks Optimization of a Self-Supervised Learning Approach for ECG Analysis, selecting the best set of transformations to generalize on Multiple Downstream Tasks.

Lorenzo Gregnol

Self-Supervised ECG Representation Learning for multiple tasks Optimization of a Self-Supervised Learning Approach for ECG Analysis, selecting the best set of transformations to generalize on Multiple Downstream Tasks.

Rel. Valentina Agostini. Politecnico di Torino, Corso di laurea magistrale in Ingegneria Biomedica, 2025

Abstract:

Artificial intelligence has demonstrated great potential in the cardiac field, due to its ability to automatically extract complex patterns and achieve high diagnostic accuracy. However, traditional supervised learning relies on large, annotated datasets, which are often time-consuming and costly to obtain, limiting its scalability and broader clinical implementation. To overcome this limitation, Self-Supervised Learning (SSL) has emerged as a more efficient option, learning from unlabeled data while requiring just a minimal number of labeled samples for training.    The goal of this thesis is to optimize a SSL based algorithm to learn robust ECG representations from unlabeled data. Using SimCLR as SSL framework, the main objective is to evaluate the effectiveness of various data augmentation techniques in enabling the model to extract meaningful representations suitable for various downstream tasks, even with limited sized datasets. Specifically, this thesis focuses on emotion recognition and stress detection tasks.  SimCLR exploits data augmentations to generate positive pairs, i.e. two augmented versions of the same ECG are viewed as similar, and negative pairs, i.e. augmented versions of distinct ECGs are treated as dissimilar. This approach enables the model to learn signal representations without the need for labeled data.   The model is composed of an encoder, to extract representations, and a classification head. The encoder employs an XResNet101 1D that is initially pre-trained on almost 900.000 5-seconds unlabeled ECG windows. Six data augmentation techniques (i.e. Gaussian noise, scaling, time warping, crop & resize, time masking, and frequency dropout) are applied at each pre-training epoch with the following approaches: one fixed augmentation (single augmentation), one variable augmentation randomly chosen among all (all augmentation) or one variable augmentation randomly chosen among all except one of them (all minus one augmentation). For each case a different encoder model is pretrained for comparison.    In the second phase, the learnt representations are used to perform three binary classification tasks (i.e. stress detection and valence-arousal evaluation for emotion recognition) on SWELL dataset, which consists of 25 patients, each with three ECG recordings. The model is fine-tuned by adding a simple linear classifier after the encoder and by freezing all the encoder layers except the last residual block. The model's performance is measured using different metrics, including accuracy, F-1 score, precision, and recall and employing k-fold cross-validation for a fair evaluation.  The compared augmentation strategies resulted in different effectiveness across tasks, influencing both performance and variability. ALL - Frequency Dropout provided the best results for stress detection, whereas ALL - Scaling was the best performing for valence and Crop & Resize for arousal. These findings emphasize the influence of task-specific augmentation strategies in the final performance. Future study could apply this approach to other applications, such as rhythm classification, to investigate their influence in cardiac related tasks.

Relatori: Valentina Agostini
Anno accademico: 2024/25
Tipo di pubblicazione: Elettronica
Numero di pagine: 81
Informazioni aggiuntive: Tesi secretata. Fulltext non presente
Soggetti:
Corso di laurea: Corso di laurea magistrale in Ingegneria Biomedica
Classe di laurea: Nuovo ordinamento > Laurea magistrale > LM-21 - INGEGNERIA BIOMEDICA
Ente in cotutela: SUPSI (SVIZZERA)
Aziende collaboratrici: SUPSI
URI: http://webthesis.biblio.polito.it/id/eprint/34846
Modifica (riservato agli operatori) Modifica (riservato agli operatori)