**Example: SGC Model**
```
  sgc_unlearning_baseline.py
  sgc_unlearning_attack.py
  sgc_unlearning_label.py
```
1. **Environment and Data Preparation**
   + Import dependencies: numpy, torch, torch_geometric, sklearn, matplotlib, etc.
   + Set random seed.
   + Load datasets: Cora, Citeseer, and CS.
   + Split train/test set: use `train_test_split` and set `train_mask` and `test_mask`.

2. **Model Definition**
   + SGCNet/SGCNet_scratch: Standard SGC model with two SGConvBatch layers and a fully connected layer. The `forward` and `inference` methods are used for training and inference, respectively.

3. **Training and Inference Process**
   + train from all: Train SGCNet with all training data, obtain `KL_xy_all`, and perform visualization and evaluation.
   + train from scratch: Randomly forget some nodes, retrain SGCNet_scratch, obtain `KL_xy_scratch`, and perform visualization and evaluation.
   + unlearning: Use the SGC_Unlearn model, input the intermediate and final outputs of the all model along with the forgotten nodes, and obtain the output after unlearning.

4. **Loss and Optimization**
   + KL divergence loss: Compare the output distributions before and after unlearning/retraining to measure distribution changes.
   + Classification loss: Cross-entropy loss to ensure classification performance.
   + Combined loss: Multi-objective weighted combination (e.g., `loss = tamma * classification_loss + kamma * (alpha * kl_loss_neighbors + beta * kl_loss_unlearned)`) to optimize unlearning effect.

5. **Evaluation and Visualization**
   + Accuracy/F1-score: Evaluate classification performance on train/test sets for each model.
   + Visualization: Use TSNE for dimensionality reduction and plot scatter plots to show node embedding distributions.
   + KL divergence printout: Print KL divergence between outputs of different models.
   + MIA attack: Evaluate privacy risk of the unlearning model (AUC) via L2 distance of posterior probabilities.

6. **How to Run**
   1. Run the script directly:
      ```
      python sgc_unlearning_attack.py
      ```
      or
      ```
      python sgc_unlearning_baseline.py
      ```
      or
      ```
      python sgc_unlearning_label.py
      ```
   2. The whole process is automated: data loading, model training, unlearning, evaluation, visualization, and result saving.
   3. The terminal will output various metrics and evaluation results, and some scripts will save visualization figures and model outputs.

7. **Differences among the three scripts**
   + sgc_unlearning_attack.py: Standard node unlearning experiment (main method).
   + sgc_unlearning_baseline.py: Baseline experiment (simple unlearning or no label modification).
   + sgc_unlearning_label.py: Label modification unlearning experiment (label withdrawal/corruption).

