Recent studies have focused on improving out-of-distribution generalization of Graph Neural Networks (GNNs) in real-world scenarios.A new method called PrunE has been proposed to address OOD challenges by eliminating spurious edges in graphs.PrunE uses two regularization terms to prune spurious edges and retain the invariant subgraph for better OOD generalization.Theoretical analysis and experiments have shown that PrunE outperforms previous methods in achieving superior OOD performance.