Improving Out-of-Distribution Generalization in Graphs via Hierarchical Semantic Environments

Yinhua Piao, Sangseon Lee, Yijingxiu Lu, Sun Kim
2/9/2026

No official code found. Best implementation: qkrdmsghk/GOODHSE (13 stars, last commit 2025-04-17).

Abstract

Out-of-distribution (OOD) generalization in the graph domain is challenging due to complex distribution shifts and a lack of environmental contexts. Recent methods attempt to enhance graph OOD generalization by generating flat environments. However, such flat environments come with inherent limitations to capture more complex data distributions. Considering the DrugOOD dataset, which contains diverse training environments (e.g., scaffold, size, etc.), flat contexts cannot sufficiently address its high heterogeneity. Thus, a new challenge is posed to generate more seman-tically enriched environments to enhance graph invariant learning for handling distribution shifts. In this paper, we propose a novel approach to generate hierarchical seman-tic environments for each graph. Firstly, given an input graph, we explicitly extract variant subgraphs from the in-put graph to generate proxy predictions on local environ-ments. Then, stochastic attention mechanisms are employed to re-extract the subgraphs for regenerating global environ-ments in a hierarchical manner. In addition, we introduce a new learning objective that guides our model to learn the diversity of environments within the same hierarchy while maintaining consistency across different hierarchies. This approach enables our model to consider the relationships between environments and facilitates robust graph invariant learning. Extensive experiments on real-world graph data have demonstrated the effectiveness of our framework. Par-ticularly, in the challenging dataset DrugOOD, our method achieves up to 1.29% and 2.83% improvement over the best baselines on IC50 and EC50 prediction tasks, respectively.

View on arXivView PDF

Code Implementations(1)

qkrdmsghk/GOODHSECommunity100%

[CVPR 2024] Improving out-of-distribution generalization in graphs via hierarchical semantic environments

134Shell, PythonMay 16, 20241 years ago
graphmoleculeood-generalization

Similar Papers

Cite this paper

@article{piao2026improving,
  title  = {Improving Out-of-Distribution Generalization in Graphs via Hierarchical Semantic Environments},
  author = {Yinhua Piao and Sangseon Lee and Yijingxiu Lu and Sun Kim},
  year   = {2026},
  eprint = {2403.01773},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2403.01773},
  journal = {CVPR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.01773.svg)](https://codeofpaper.com/paper/2403.01773)

Discussion