We introduce $r$-loopy Weisfeiler-Leman ($r$-$\ell{}$WL), a novel hierarchy of graph isomorphism tests and a corresponding GNN framework, $r$-$\ell{}$MPNN, that can count cycles up to length $r + 2$. Most notably, we show that $r$-$\ell{}$WL can count homomorphisms of cactus graphs. This strictly extends classical 1-WL, which can only count homomorphisms of trees and, in fact, is incomparable to $k$-WL for any fixed $k$. We empirically validate the expressive and counting power of the proposed $r$-$\ell{}$MPNN on several synthetic datasets and present state-of-the-art predictive performance on various real-world datasets. The code is available at https://github.com/RPaolino/loopy
翻译:我们提出了 $r$-loopy Weisfeiler-Leman($r$-$\ell{}$WL),一种新颖的图同构测试层次结构及其对应的GNN框架 $r$-$\ell{}$MPNN,能够计数长度至多 $r+2$ 的环。尤为重要的是,我们证明了 $r$-$\ell{}$WL 可以计数仙人掌图的同态数量。这严格扩展了经典的 1-WL(仅能计数树的同态),并且事实上与任意固定 $k$ 的 $k$-WL 不可比较。我们在多个合成数据集上实证验证了所提 $r$-$\ell{}$MPNN 的表达能力和计数能力,并在多个真实世界数据集上展示了最先进的预测性能。代码可通过 https://github.com/RPaolino/loopy 获取。