## 2 Materials and Methods
### The Proposed Method  
#### 2.2.1 Transformation Inconsistency Augmentation  
For contrastive learning, the construction of positive and negative pairs is mainly based on the design of the augmentation method. The original time series is augmented by two random operations. Usually, the operations are selected from the same augmentation algorithm, such as dropout [11], timestamp masking, and cropping [16], to preserve the  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Dataset** & **\#Train** & **\#Valid** & **\#Test** & **Length** & **\#Channel** & **\#Class** \\ \hline Sleep-EDF & 31,952 & 3551 & 6805 & 3000 & 1 & 5 \\ HAR & 6616 & 736 & 2947 & 128 & 9 & 6 \\ ESR & 8280 & 920 & 2300 & 178 & 1 & 2 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Description of datasets used in our experiments. The train and valid data are randomly divided 10 times with 10-fold validation.  
global temporal information and maintain the original properties for time series. Different augmentations can improve the robustness of the learned representations and reduce the training time for contrastive loss convergence. In this paper, the TIA module is designed in DABFS to learn invariant representations. To obtain more discriminating representations, a tempo-scale strategy is adopted. The scale augmentation lightly scales up the magnitude of the time series with random variations. For temporal augmentation, a permutation-and-jitter strategy is applied, which randomly splits the time series into a set of segments, randomly shuffles segments, and adds random variations. The max segment number \(N_{s}\) is a hyper-parameter. The augmentation operations do not change the dimensions of the time series. The number of segments and parameters of random variations are selected based on previous research on augmentation.  
Given an original time series \(x\in\mathbb{R}^{S}\), the augmentation can be described as \(x^{\rm t}=\mathcal{A}_{t}(x)\) and \(x^{\rm s}=\mathcal{A}_{s}(x)\in\mathbb{R}^{S}\),where \(S\) represents the number of samples. The tempo-scale strategy results in different similarities between the transformed and the original time series. As shown in Figure 1, the transformed time series \(x^{\rm t}\) and \(x^{\rm s}\) are fed into a basic encoder module to extract their high-dimensional space representation, \(z^{\rm t}\) and \(z^{\rm s}\). The encoder adopts a 3-block convolutional architecture as in previous studies. The complexity of the encoder is controlled by hyper-parameters to ensure that representation and generalization capabilities are balanced. The encoding operation is defined as \(\mathbf{Z}=\mathcal{F}_{enc}(x)\), \(\mathbf{Z}=\{z_{i}\in\mathbb{R}^{d},i\leq T\}\), where \(d\) is the feature length of each step and \(T\) is the time steps of each time series representation. Meanwhile, the original time series \(x\) is also encoded as \(z^{\rm u}\) for following bias awareness. The \(z^{\rm s}\), \(z^{\rm t}\), and \(z^{\rm u}\) are fed into DAB-aware Temporal Contrasting module.  
Figure 1: Illustration of the DAB problem: (**A**) Supervised representation learning, where representations are learned using labeled data as the ground truth. (**B**) Traditional self-supervised representation learning. Due to the changes in data distribution caused by data augmentation methods, the representations of real data obtained from a pre-trained encoder deviate from the ground truth, resulting in the DAB problem. (**C**) The proposed self-supervised representation learning approach to mitigate the DAB problem.