Signal Dice Similarity Coefficient

A Structure-Aware Metric for Semantic Signal Representation Learning
Jeyoung Lee, Hochul Kang
Department of Digital Media Engineering
The Catholic University of Korea


Figure 2. our proposed methods, a structure-aware metric function for time series elf-supervised representation learning

Abstract

LINK Drive

We propose the Signal Dice Similarity Coefficient (SDSC), a structure-aware metric function for time series self-supervised representation learning. Most Self-Supervised Learning (SSL) methods for signals commonly adopt distance-based objectives such as mean squared error (MSE), which are sensitive to amplitude, invariant to waveform polarity, and unbounded in scale. These properties hinder semantic alignment and reduce interpretability. SDSC addresses this by quantifying structural agreement between temporal signals based on the intersection of signed amplitudes, derived from the Dice Similarity Coefficient (DSC). Although SDSC is defined as a structure-aware metric, it can be used as a loss by subtracting from 1 and applying a differentiable approximation of the Heaviside function for gradient-based optimization. A hybrid loss formulation is also proposed to combine SDSC with MSE, improving stability and preserving amplitude where necessary. Experiments on forecasting and classification benchmarks demonstrate that SDSC-based pre-training achieves comparable or improved performance over MSE, particularly in in-domain and low-resource scenarios. The results suggest that structural fidelity in signal representations enhances the semantic representation quality, supporting the consideration of structure-aware metrics as viable alternatives to conventional distance-based methods.


MSE vs SDSC Example

Figure 1_a. Inverted Example
Inverted : MSE=0.0200, SDSC=0.0000
Figure 1_b. Scaled Example
Scaled 0.5x : MSE=0.1249, SDSC=0.6667
Scaled 2x : MSE=0.4995, SDSC=0.6667
Figure 1_c. Constant Zero Exmaple
Zero : MSE=0.4995, SDSC=0.0000
Scaled 2x : MSE=0.4995, SDSC=0.6667
Figure 1_c. Shifted, Noise Example
Shifted ± 1: MSE=1.0000, SDSC=0.3887
Noise : MSE=0.5062, SDSC=0.1137

Although numerically favorable, the output is structurally misaligned and functionally misleading. Such insensitivity to signal semantics is particularly problematic for physiological data like EEG or ECG, where subtle structural components often carry diagnostic significance. Therefore, exclusive reliance on amplitude-centric metrics may lead to semantically incorrect reconstructions.

Definition of SDSC

The SDSC extends DSC's concept to the signal domain by interpreting the area under the curve as a proxy for the waveform structure.

$$ S(t) = E(t) \cdot R(t) $$ $$ M(t) = \frac{ (|E(t)| + |R(t)|) - (|E(t)| - |R(t)|) }{2} $$ $$ SDSC(E(t), R(t)) = \frac{ 2 \cdot \int H(S(t)) \cdot M(t) \, dt }{ \int (E(t) + R(t)) \, dt} $$

The objective in signal representation learning is to maximize SDSC toward 1. However, directly computing SDSC via integration is infeasible in practice, as realworld signals, such as EEG, lack known analytical expressions. To address this, a discrete approximation is adopted.

$$ SDSC(E(t), R(t)) \approx \frac{ 2 \cdot \sum H(S(s)) \cdot M(s) }{ \sum (E(s) + R(s)) } $$

Since the SDSC score is bounded in [0, 1], we can define the loss as 1 − SDSC(·).

$$ \mathcal{L}_{sdsc} = 1 - SDSC(E(S), R(S)) $$

However, the use of the Heaviside step function in the SDSC introduces discontinuities, which can negatively affect the stability of training. To enable stable gradient-based optimization, a smooth approximation of the Heaviside function is introduced. The following sigmoid-based formulation is used, with a sharpness parameter α.

$$ \hat{H}(x) = \frac{1}{1 + e^{-\alpha x}} \quad $$ $$ SDSC(E(t), R(t)) \approx \frac{ 2 \cdot \sum \hat{H}(S(s)) \cdot M(s) }{ \sum (E(s) + R(s)) } $$

Live DEMO

Signal Dice Similarity Coefficient : A Structure-Aware Metric for Semantic Signal Representation Learning