# GRNN: Graph-Retraining Neural Network for Semi-Supervised Node Classification
## 4 GRNN: Graph-Retraining Neural Network
### The Smoothing Model  
In the smoothing model, GRNN improves the accuracy of the base prediction by minimizing the global smoothing error over the graph. The key idea is to minimize the objective function over the graph using the graph neural network:  
\[f=\underset{g}{argmin}-\sum_{l\in V}\sum_{r=1}^{q}Y_{lr}\text{lng}(X)_{lr} \tag{9}\]  
There are many unlabeled nodes in \(V(U\subset V)\), which means that \(Y_{U}(Y_{U}\subset Y_{V})\) is unknown. To solve the problem, the unlabeled node-set \(Y_{U}\) is replaced by the prediction label of the graph neural network and the formula is as follows:  
\[f=\underset{g}{argmin}-(\sum_{l\in L_{t}}\sum_{r=1}^{q}Y_{lr}\text{lng}(X)_{lr }+\sum_{l\in(U\cup L_{v})}\sum_{r=1}^{q}S(g(X)_{l})_{r}\text{lng}(X)_{lr}) \tag{10}\]  
where \(S(\centerdot)\) returns the one-hot coding of the index of the vector maximum component (e.g., \(S([0.2,0.3,0.5])=[0,0,1]\)).  
However, \(S(\centerdot)\) in Equation (10) is non-differentiable. Therefore, GRNN calculates the equation through iteration that alternates between a learning procedure and an inference procedure. In the inference procedure, GRNN predicts all node labels using the benchmark neural network as follows:  
\[\widetilde{Y}_{l}^{(0)}=S(g(X)_{l}), \forall l\in V \tag{11}\] \[\widetilde{Y}_{l}^{(k+1)}=S(f^{(k)}(X)_{l}), \forall l\in V \tag{12}\]  
In the learning procedure, GRNN uses the benchmark neural network to train all node features, and the objective is as follows:\[f^{(0)}=\underset{g}{argmin}-\sum_{l\in L_{t}}\sum_{r=1}^{q}\gamma_{lr}\text{ ln}g(X)_{lr} \tag{13}\]  
\[f^{(\bar{k}+1)}=\underset{f^{(\bar{k})}}{argmin}-(\sum_{l\in L_{t}}\sum_{r=1}^{q }\gamma_{lr}\text{ln}f^{(\bar{k})}(X)_{lr}+\sum_{l\in(lU\cup L_{r})}\sum_{r=1}^{ q}\widetilde{Y}_{lr}^{(\bar{k})}\text{ln}f^{(\bar{k})}(X)_{lr}) \tag{14}\]  
Therefore, the loss function is as follows:  
\[\widetilde{\mathcal{L}}(\bar{k})=-(\sum_{l\in L_{t}}\sum_{r=1}^{q}Y_{lr}\text{ ln}f^{(\bar{k})}(X)_{lr}+\sum_{l\in(lU\cup L_{r})}\sum_{r=1}^{q}\widetilde{Y}_{lr}^ {(\bar{k})}\text{ln}f^{(\bar{k})}(X)_{lr}) \tag{15}\]  
where \(\widetilde{\mathcal{L}}(0)=\mathcal{L}\).  
Now, suppose \(F(\bar{k})\) is \(\text{ln}f^{(\bar{k})}(X)\) and show that the iterative loss function is convergent:  
\[\begin{split}\widetilde{\mathcal{L}}(\bar{k}+1)&=- (\sum_{l\in L_{t}}\sum_{r=1}^{q}\gamma_{lr}F(\bar{k}+1)_{lr}+\sum_{l\in(lU\cup L _{r})}\sum_{r=1}^{q}\widetilde{Y}_{lr}^{(\bar{k}+1)}F(\bar{k}+1)_{lr})\\ &\leqslant-(\sum_{l\in L_{t}}\sum_{r=1}^{q}Y_{lr}F(\bar{k})_{lr} +\sum_{l\in(lU\cup L_{r})}\sum_{r=1}^{q}\widetilde{Y}_{lr}^{(\bar{k}+1)}F(\bar{ k})_{lr})\\ &\leqslant-(\sum_{l\in L_{t}}\sum_{r=1}^{q}\gamma_{lr}F(\bar{k}) _{lr}+\sum_{l\in(lU\cup L_{r})}\sum_{r=1}^{q}\widetilde{Y}_{lr}^{(\bar{k})}F( \bar{k})_{lr})=\widetilde{\mathcal{L}}(\bar{k})\end{split} \tag{16}\]  
Additionally, \(\widetilde{\mathcal{L}}(\bar{k})\) is always greater than zero and monotonically decreasing so that \(\widetilde{\mathcal{L}}(\bar{k})\) is convergent, which implies that \(f^{(\bar{k})}\) is convergent to Equation (10).