## 2 Methodology
### Gaussian Fields and Harmonic Functions  
Suppose there are \(n=l+u\) samples \(\mathbf{x}_{i}\in\mathbb{R}^{D}\) (\(1\leq i\leq n\)), organized in a matrix \(\mathbf{X}=[\mathbf{x}_{1};\mathbf{x}_{2};\cdots;\mathbf{x}_{l};\mathbf{x}_{l+1 };\cdots;\mathbf{x}_{l+u}]\), where \(l\) is the number of labeled samples, \(u\) is the number of unlabeled samples. \(\mathbf{y}_{i}\in\mathbb{R}^{C}\) is the label vector of the \(i\)-th samples, if \(\mathbf{x}_{i}\) belongs to the \(c\)-th class then \(y_{ic}=1\); otherwise \(y_{ic}=0\). Obviously, \(\mathbf{y}_{i}=\mathbf{0}\) means the label of \(\mathbf{x}_{i}\) is unknown (or unlabeled). The target is to predict the labels of \(u\) unlabeled samples. Various semi-supervised classifiers can be used to infer the labels of these \(u\) unlabeled samples [1]. In this paper, we choose GFHF [4] for its simplicity and wide-application. To be self-consistent and to discuss the importance of graph for GSSC methods, the main procedures of GFHF are listed below and more details of GFHF can be found in reference [4]. (1). Construct a weighted \(k\)NN graph \(G\) and let \(\mathbf{W}=[w_{ij}]_{n\times n}\) be the association matrix of \(G\). \(w_{ij}\) is specified as follows:  
\[w_{ij}=\left\{ \begin{array}{l}e^{-\frac{\left\|\mathbf{x}_{i}-\mathbf{x}_{j }\right\|_{2}^{2}}{\sigma^{2}}},\quad\text{if}\quad\mathbf{x}_{j}\in\mathcal{ N}_{k}(\mathbf{x}_{i})\text{ or }\mathbf{x}_{i}\in\mathcal{N}_{k}(\mathbf{x}_{j})\\ 0,\quad\text{otherwise}\end{array} \right. \tag{1}\]  
where \(\sigma\) is a scalar parameter to control the decaying rate of distance between \(\mathbf{x}_{i}\) and \(\mathbf{x}_{j}\), and it is called Gaussian kernel width. \(\mathcal{N}_{k}(\mathbf{x}_{i})\) includes \(k\) nearest neighborhood samples of \(\mathbf{x}_{i}\). \(w_{ij}\) ensures two nearby samples have a large similarity and two faraway samples have a small or zero similarity. (2). GFHF assumes nearby samples having similar labels and propagates the labels of labeled samples in \(G\) to infer the labels of unlabeled samples in \(G\). Particularly, it optimizes the predictive function \(f(\mathbf{x})\in\mathbb{R}^{C}\) on \(n\) samples as follows:  
\[\min_{f}(\infty\sum_{i=1}^{l}(||\mathbf{y}_{i}-f(\mathbf{x}_{i})||_{2}^{2})+ \frac{1}{2}\sum_{i,j=1}^{n}w_{ij}||f(\mathbf{x}_{i})-f(\mathbf{x}_{j})||_{2}^ {2}) \tag{2}\]  
where \(f(\mathbf{x}_{i})\in\mathbb{R}^{C}\) is the predicted likelihood of \(\mathbf{x}_{i}\) with respect to \(C\) classes. To ensure the prediction on the first \(l\) samples be the same with their initial labels, an \(\infty\) weight is assigned to the first term. The second term is to ensure nearby samples having similar predicted likelihoods. Equation (2) can be rewritten as:  
\[\min_{f}(\infty\sum_{i=1}^{l}(||\mathbf{y}_{i}-f(\mathbf{x}_{i})||_{2}^{2})+ \mathbf{f}^{T}\mathbf{L}\mathbf{f}) \tag{3}\]  
where \(\mathbf{f}=[f(\mathbf{x}_{1});f(\mathbf{x}_{2});\cdots;f(\mathbf{x}_{n})]\), \(\mathbf{L}=\mathbf{D}-\mathbf{W}\) is the graph Laplacian matrix [27], \(\mathbf{D}\) is a diagonal matrix with \(\mathbf{D}_{ii}=\sum_{j}\mathbf{W}_{ij}\). (3). To get the harmonic solution of Equation (3), \(\mathbf{W}\) is divided into four blocks as follows:  
\[\mathbf{W}= \begin{bmatrix}\mathbf{W}_{ll}&\mathbf{W}_{lu}\\ \mathbf{W}_{ul}&\mathbf{W}_{uu}\end{bmatrix}  \tag{4}\]  
where \(\mathbf{W}_{ll}\in\mathbb{R}^{l\times l}\) describes the pairwise similarity between the first \(l\) samples, \(\mathbf{W}_{lu}\in\mathbb{R}^{l\times u}\) (or \(\mathbf{W}_{ul}\)) represents the similarity between the first \(l\) labeled samples and \(u\) unlabeled samples, and \(\mathbf{W}_{uu}\in\mathbb{R}^{u\times u}\) captures the similarity between \(u\) unlabeled samples. Suppose \(\mathbf{f}_{u}\in\mathbb{R}^{u\times C}\) be the predicted likelihoodson \(u\) unlabeled samples and \(\mathbf{f}_{l}\in\mathbb{R}^{l\times C}\) be the predictions on the first \(l\) labeled samples.