  Recently, graph neural networks (GNNs) have been successfully applied to
predicting molecular properties, which is one of the most classical
cheminformatics tasks with various applications. Despite their effectiveness,
we empirically observe that training a single GNN model for diverse molecules
with distinct structural patterns limits its prediction performance. In this
paper, motivated by this observation, we propose TopExpert to leverage
topology-specific prediction models (referred to as experts), each of which is
responsible for each molecular group sharing similar topological semantics.
That is, each expert learns topology-specific discriminative features while
being trained with its corresponding topological group. To tackle the key
challenge of grouping molecules by their topological patterns, we introduce a
clustering-based gating module that assigns an input molecule into one of the
clusters and further optimizes the gating module with two different types of
self-supervision: topological semantics induced by GNNs and molecular
scaffolds, respectively. Extensive experiments demonstrate that TopExpert has
boosted the performance for molecular property prediction and also achieved
better generalization for new molecules with unseen scaffolds than baselines.
The code is available at https://github.com/kimsu55/ToxExpert.
