diff --git a/docs/docfile/tutorial/t_robust.rst b/docs/docfile/tutorial/t_robust.rst index a25615c..8aaaa7b 100644 --- a/docs/docfile/tutorial/t_robust.rst +++ b/docs/docfile/tutorial/t_robust.rst @@ -1,27 +1,31 @@ .. _robust: -Robust Model -============ - -We provides a series of defense methods that aim to enhance the robustness of GNNs. +Graph Robustness +========================== -Requirements ------------- +Graph robustness is an important research direction in the field of graph representation learning in recent years, +and we have integrated graph robustness-related algorithms in AutoGL, which can be easily used in conjunction with other modules. -During the evaluation, the adversarial attacks on graph are performed by DeepRobust from MSU, please install it by +Preliminaries +----------- +In AutoGL, we divide the algorithms for graph robustness into three categories, which are placed in different modules for implementation. +Robust graph feature engineering aims to generate robust graph features in the data pre-processing phase to enhance the robustness of downstream tasks. +Robust graph neural networks, on the other hand, are designed at the model level to ensure the robustness of the model during the training process. +Robust graph neural network architecture search aims to search for a robust graph neural network architecture. +Each of these three types of graph robustness algorithms will be described in the following sections. -.. code-block:: bash +Robust Graph Feature Engineering +----------- - git clone https://github.com/DSE-MSU/DeepRobust.git - cd DeepRobust - python setup.py install +We provide structure engineering methods to enhance robustness, please refer to `preprocessing` part for more information. -To better plugin GNNGuard to AutoGL, we slightly revised some functions in geometric. Please use the file ``AutoGL/autogl/module/model/pyg/robust/nn/conv/gcn_conv.py`` we provided to replace the corresponding file in the installed geometric folder (for example, the folder path could be `/home/username/.local/lib/python3.5/site-packages/torch_geometric/nn/conv/`). +Robust Model +----------- -*Note:* Don't forget to backup all the original files when you replacing anything, in case you need them at other places! +We provides a series of defense methods that aim to enhance the robustness of GNNs. Building GNNGuard Module ------------------------- +>>>>>>>>>>>>>>>>>>> Firstly, load pre-attacked graph data: @@ -81,7 +85,7 @@ Thirdly, train defense model GNNGuard on poinsed graph: Robust Graph Neural Architecture Search --------------------------------------- -Robust Graph Neural Architecture Search aims to search for adversarial robust Graph Neural Networks under attack. +Robust Graph Neural Architecture Search aims to search for adversarial robust Graph Neural Networks under attacks. In AutoGL, this module is the code realization of G-RNA. Specifically, we design a robust search space for the message-passing mechanism by adding the adjacency mask operations into the search space, @@ -191,8 +195,6 @@ Next, search for best robust architecture. trainer = solver.graph_model_list[0] trainer.device = device - - After getting the best architecture, we could evaluate on clean/perturbed graph data. .. code-block:: python @@ -233,4 +235,4 @@ After getting the best architecture, we could evaluate on clean/perturbed graph ## test searched model on perturbed data data = dataset[0].cpu() dataset[0] = metattack(data).to(device) - ptb_acc = test_from_data(trainer, dataset) \ No newline at end of file + ptb_acc = test_from_data(trainer, dataset) diff --git a/docs/docfile/tutorial_cn/t_robust.rst b/docs/docfile/tutorial_cn/t_robust.rst index bf2697f..cd2763a 100644 --- a/docs/docfile/tutorial_cn/t_robust.rst +++ b/docs/docfile/tutorial_cn/t_robust.rst @@ -1,12 +1,33 @@ -.. _robust: +.. _robust_cn: -鲁棒模型 -========================== +图鲁棒性 +============================ + +图鲁棒性是近年图机器学习领域重要的研究方向,我们在AutoGL中集成了图鲁棒性相关算法,可以方便地与其他模块结合使用。 + +背景知识 +------------ + +(介绍对抗攻击、鲁棒问题的定义等,可以适当引一些paper) + +在AutoGL中,我们将图鲁棒性的算法分为三类,放在不同的模块中实现。 +鲁棒图特征工程旨在数据预处理阶段生成鲁棒的图特征,增强下游任务的鲁棒性。 +鲁棒图神经网络则是通过模型层面的设计,以在训练过程中确保模型的鲁棒性。 +鲁棒图神经网络架构搜索旨在搜索出一个鲁棒的图神经网络架构。 +下文中将分别介绍这三类图鲁棒性算法。 + +鲁棒图特征工程 +--------------------- + +我们提供了图结构特征工程的系列方法来提高鲁棒性,请参考`预处理`部分获取更多信息。 + +鲁棒图神经网络 +--------------------- 我们提供了一系列的防御方法,旨在增强图神经网络的鲁棒性。 生成并训练 GNNGuard 模型 ------------------------------- +>>>>>>>>>>>>>>>>>>> 首先,加载预先攻击的图数据: