

Due to its ability to deal well with the features of graph structure (social network, molecular structure), graph neural network (GNN) has recently shown amazing capabilities in many fields (biology, chemistry), which has aroused the attention of a large number of researchers on the operation mechanism of GNN model. In order to apply graph neural network to real environment, the problem of out-of-distribution generalization is solved. The difference of data distribution between training environment and real environment is an urgent problem to be solved. In the present study, from the point of view of data, the input graph data is processed to find the core part and filter out the noise part; From the perspective of model method, the parts related to this task (graph classification) in the model are extracted, so as to improve the accuracy and efficiency of the model. However, while these methods are valid from a theoretical point of view, they are using methods that are too simple to actually cut off the effects of non-causal components. However, the current methods of model Angle are to cut the network directly, without considering the information transfer between the model parameters. To solve these problems, the main work of this paper is to propose a distance-based environment selection method, which enables the backdoor adjustment to be implemented to the maximum extent and ensures the robustness of the model. At the same time, it proposes a way for the network to squeeze information during the clipping process, so that the effect of the model pruning algorithm can be optimized. Reduce the complexity of the model and improve the generalization of the model. The method presented in this paper has been validated on data sets in several biochemical fields, and the best performance has been achieved.