## 3 The Proposed Method
### Self-Supervised Learning Task
\begin{table}
\begin{tabular}{l l c} \hline \hline
**Manipulation** & **Parameter** & **Index** \\ \hline Color jitter & \(FactorSaturation\in[0,2.0],FactorHue\in[-0.5,0.5]\) & 1 \\ RGB color rescaling & \(ScalingFactors\in[0,2.0]\) & 2 \\ Gaussian blurring & \(KernelSize=(3,3),\)\(Sigma\in[0.1,5.0]\) & 3 \\ Random Gaussian noise & \(Mean=0,\)\(StandardDeviation=20.0\) & 4 \\ Sharpness enhancement & \(EnhanceFactor\in[1.0,4.0]\) & 5 \\ Histogram equalization & \(-\) & 6 \\ Pixel value quantization & \(NumberBits\in\{2,3,4,5,6,7\}\) & 7 \\ Gamma correction & \(CorrectionFactor\in[0,2.0]\) & 8 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Manipulation operations considered in the proposed self-supervised method, the specifications about their parameters, and their indices in the multi-class classification pretext task. The implementation of these manipulations was partially based on PyTorch. task. A more effective, and also more challenging, pretext task is the _multi-class classification task_ of authentic images and their eight modified versions obtained after applying the eight manipulations listed in Table 1. The success in this multi-class classification task requires learning more sophisticated and discriminative representations, not only capable of classifying between NIs and their modified versions, but also able to accurately predict the type of manipulation of each modified image. Similar observations were mentioned in [38], where the authors found that the multi-class classification of a number of rotation angles of an image was a more effective pretext task than the simple binary classification between original un-rotated images and any rotated ones. Therefore, in our self-supervised pretext task there were in total 9 classes of training samples, i.e., the NI (with ground-truth label 0) and modified images corresponding to the eight kinds of manipulations (with ground-truth label in the set of \(\{1,2,\ldots,8\}\), as shown in the last column of Table 1). Training images of different classes for the 9-class pretext task were generated dynamically. For each image \(x_{i}\) in a batch of NIs drawn from the ImageNet dataset [49] (for the sake of simplicity, and with a little abuse of notation, we omit the batch index), a pseudo-random number \(y_{i}\) was drawn from the uniform distribution on the set of \(\{0,1,2,\ldots,8\}\), and then a training sample \(\hat{x}_{i}\) was constructed for the pretext task as:  
\[\hat{x}_{i}=\left\{ \begin{array}{ll}x_{i}&\text{if }y_{i}=0,\\ MP_{y_{i}}(x_{i})&\text{if }y_{i}\in\{1,2,\ldots,8\}.\end{array} \right. \tag{1}\]  
In the above equation, \(MP_{y_{i}}(. )\) stands for the manipulation indexed by \(y_{i}\) (as mentioned above, the indices of manipulations are given in the last column of Table 1) with randomly drawn parameters, if any. It can be seen that with the dynamic sample generation procedure of Equation (1) and with a large number of NIs (which was the case in our pretext task training), we could ensure that the considered 9-class classification problem was well balanced. Usually, a balanced problem facilitates the learning and implementation, but it is possible that an unbalanced self-supervised learning problem would be more beneficial for downstream tasks, e.g., during the learning process we could dynamically generate more samples for difficult manipulations with a higher training/validation error. In the future we plan to carry out studies to get better understanding and make improvements regarding this point. It can be seen that \(y_{i}\in\{0,1,2,\ldots,8\}\) was, in fact, the ground-truth label of the generated sample \(\hat{x}_{i}\). We can also observe that the self-supervised labels \(y_{i}\) were generated automatically and dynamically _without_ any effort in terms of human manual labeling.