We introduce -loopy Weisfeiler-Leman (-WL), a novel hierarchy of graph isomorphism tests and a corresponding GNN framework, -MPNN, that can count cycles up to length . Most notably, we show that -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 -WL for any fixed . We empirically validate the expressive and counting power of the proposed -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
View on arXiv