HyperAIHyperAI

Command Palette

Search for a command to run...

Outstanding Paper Honorable MentionICLR 2024

딥러닝

Weisfeiler-Lehman을 넘어서: GNN 표현력을 위한 정량적 프레임워크

Bohang Zhang Jingchu Gai Yiheng Du Qiwei Ye Di He Liwei Wang

초록

표현력 있는 그래프 신경망(GNN)의 설계는 그래프 학습 분야의 근본적인 주제이다. 지금까지 GNN의 표현력은 주로 Weisfeiler-Lehman(WL) 계층을 통해 평가되어 왔다. 그러나 이러한 표현력 측정 방법은 본질적으로 거칠고 정성적이며, 실제 요구 사항(예: 하위 구조를 인코딩하는 능력)을 잘 반영하지 못할 수 있다는 뚜렷한 한계를 지닌다. 본 논문에서는 이러한 한계를 모두 해소하기 위해 GNN 아키텍처의 표현력을 정량적으로 연구하는 새로운 프레임워크를 제안한다. 구체적으로, GNN 모델이 호모모피즘 하에서 그래프를 세는 능력을 정량화하는 기본적 표현력 측정 지표인 호모모피즘 표현력(homomorphism expressivity)을 도입한다. 호모모피즘 표현력은 완전하고 실용적인 평가 도구를 제공한다: 완전성은 GNN 모델 간의 직접적인 표현력 비교를 가능하게 하며, 실용성은 서브그래프 세기와 같은 구체적 GNN 능력을 이해할 수 있게 한다. 네 가지 주요 GNN 클래스를 사례 연구로 조사하여, 불변(invariant) 및 동변(equivariant) 설정 모두에 대해 호모모피즘 표현력의 단순하고 통일된 우아한 서술을 유도한다. 본 연구 결과는 일련의 선행 연구에 대한 새로운 통찰을 제공하고, 해당 분야의 서로 다른 세부 영역들의 지형을 통합하며, 여러 미해결 문제들을 해결한다. 실험적으로, 합성 및 실제 작업에 대한 대규모 실험을 통해 본 이론을 검증하였으며, GNN 모델의 실제 성능이 제안된 지표와 잘 부합함을 보인다.

One-sentence Summary

Researchers from Peking University and Beijing Academy of Artificial Intelligence introduce homomorphism expressivity, a quantitative framework that measures GNN expressiveness by counting graphs under homomorphism, overcoming the coarse and qualitative limitations of the Weisfeiler-Lehman hierarchy and unifying expressivity comparisons across both invariant and equivariant architectures.

Key Contributions

  • Homomorphism expressivity is introduced as a quantitative framework for assessing Graph Neural Networks by measuring their ability to count graphs under homomorphism, providing complete expressivity comparisons beyond the qualitative Weisfeiler-Lehman hierarchy.

  • Exact homomorphism expressivity descriptions are derived for four prominent GNN families in invariant and equivariant settings, establishing model hierarchies, graph, node, and edge-level subgraph counting capabilities, and resolving several open questions.

  • Extensive synthetic and real-world experiments support the theoretical results and show that empirical GNN performance correlates with the homomorphism expressivity metric.

Introduction

Graph neural networks are widely used for graph-structured data, but their ability to distinguish different graph structures is often limited. A common way to measure this limitation is the Weisfeiler-Lehman hierarchy, especially the 1-WL bound for message-passing GNNs. However, this yardstick is too coarse for practical models: higher-order methods can be expensive, and 1-WL-based proof results may rely on small example graphs and fail to explain real-world performance. The authors leverage homomorphism counting to study which graph substructures a GNN can encode, and they give precise descriptions of the expressive power of MPNNs, Subgraph GNNs, Local GNNs, and Folklore-type GNNs, along with extensions to node-level, edge-level, and higher-order variants.

Method

The method establishes a unified analytical framework for measuring the expressive power of graph neural network architectures through homomorphism counting. For a graph representation model MMM with representation χGM(⋅)\chi_G^M(\cdot)χGM​(⋅), the core idea is to characterize exactly which substructures are invisible to the model. A graph family FM\mathcal{F}^MFM is defined as a maximal family of labeled graphs such that two graphs receive the same representation if and only if all homomorphism counts from graphs in FM\mathcal{F}^MFM are identical. Formally, the equivalence condition is written as:

χGM(G)=χHM(H)⟺hom(F,G)=hom(F,H)∀F∈FM.\chi_G^M(G)=\chi_H^M(H) \quad\Longleftrightarrow\quad \mathsf{hom}(F,G)=\mathsf{hom}(F,H) \quad \forall F\in\mathcal{F}^M.χGM​(G)=χHM​(H)⟺hom(F,G)=hom(F,H)∀F∈FM.

Maximality means that if a graph FFF is outside FM\mathcal{F}^MFM, there exist graphs GGG and HHH with identical representations under MMM but different homomorphism counts from FFF. This makes FM\mathcal{F}^MFM a complete quantitative expressivity measure. Comparing two models M1M_1M1​ and M2M_2M2​ reduces to comparing families: if FM2⊊FM1\mathcal{F}^{M_2}\subsetneq \mathcal{F}^{M_1}FM2​⊊FM1​, then M1M_1M1​ is strictly more expressive, and the gap is given by the family difference FM1∖FM2\mathcal{F}^{M_1}\setminus \mathcal{F}^{M_2}FM1​∖FM2​.

The central module for deriving these families is a nested ear decomposition framework. For a graph, a decomposition partitions the edge set into simple paths called ears. Initial ears correspond to disjoint starting paths for connected components. Later ears must be nested on earlier ears, meaning one or both endpoints of a new ear attach to an earlier ear, while the interior vertices are new. When both endpoints attach to the same parent ear, the corresponding subpath in the parent ear defines a nested interval. The global structure can be viewed as a forest of ears, where each ear has a parent ear through its nesting relation. Variants of this structure correspond to different model classes:

  • Endpoint-shared nested ear decomposition requires all ears with nonempty nested intervals to share one endpoint.
  • Strong nested ear decomposition requires child intervals of the same parent ear to be nested by inclusion.
  • Almost-strong nested ear decomposition weakens the condition by considering only child intervals of length greater than one.

The organization of ears, parent relationships, and nested intervals is illustrated below.

Using these decomposition variants, the framework gives exact characterizations for major GNN architectures. MPNNs can count forests, Subgraph GNNs correspond to graphs admitting an endpoint-shared nested ear decomposition, Local 2-GNNs correspond to strong nested ear decompositions, Local 2-FGNNs correspond to almost-strong nested ear decompositions, and 2-FGNNs correspond to general nested ear decompositions. An equivalent description for Subgraph GNNs is that a graph belongs to its expressive family if deleting one suitable vertex leaves a forest.

The proof pipeline behind the characterization is itself a modular method. First, an unfolding-tree perspective identifies graph structures whose homomorphism counts determine the model representation, yielding a lower-bound family based on tree decomposition. Second, the decomposition characterization is translated into the nested ear decomposition language, providing a compact description that aligns with practical GNN operations. Third, maximality is shown by constructing graph pairs that remain indistinguishable to the model but differ in homomorphism counts for excluded structures, using connections among tree decomposition, pebble games, and specially constructed indistinguishable graph families.

The framework also extends to node-level and edge-level expressivity. For node-level analysis, the relevant family consists of connected rooted graphs FwF^wFw, where one vertex in FFF is marked and compared against a vertex in the input graph. The representation equivalence becomes

χGM(u)=χHM(v)⟺hom(Fw,Gu)=hom(Fw,Hv)∀Fw∈FnM.\chi_G^M(u)=\chi_H^M(v) \quad\Longleftrightarrow\quad \mathsf{hom}(F^w,G^u)=\mathsf{hom}(F^w,H^v) \quad \forall F^w\in\mathcal{F}_{\mathfrak{n}}^M.χGM​(u)=χHM​(v)⟺hom(Fw,Gu)=hom(Fw,Hv)∀Fw∈FnM​.

For MPNNs, the node-level family is trees. For Subgraph GNNs, a rooted graph is expressible when removing the root leaves a forest. For 2-FGNN-like models, the root must be an endpoint of the first ear in a suitable nested ear decomposition, and the edge-level variant marks two vertices and corresponds to endpoints of the first ear.

The method generalizes naturally to higher-order GNN families. Subgraph kkk-GNNs are characterized by allowing the removal of up to kkk vertices so that the remaining graph is a forest. Local kkk-GNNs require a higher-order analogue of nested ear decomposition. A kkk-order ear is formed from a small core graph of at most kkk vertices together with kkk paths connecting that core to external endpoints. Nested intervals and strong nesting conditions are then defined over these higher-order ears. The shape of these higher-order building blocks and their nested interval structure is shown below.

With these tools, the framework also yields a complete qualitative hierarchy. The base families satisfy strict inclusions:

FMP⊊FSub⊊FL⊊FLF⊊FF.\mathcal{F}^{\mathsf{MP}} \subsetneq \mathcal{F}^{\mathsf{Sub}} \subsetneq \mathcal{F}^{\mathsf{L}} \subsetneq \mathcal{F}^{\mathsf{LF}} \subsetneq \mathcal{F}^{\mathsf{F}}.FMP⊊FSub⊊FL⊊FLF⊊FF.

Higher-order variants expand the picture into an infinite hierarchy. Subgraph kkk-GNNs gain expressivity with kkk, Local kkk-GNNs gain expressivity with kkk, and Local (k+1)(k+1)(k+1)-GNNs lie between kkk-FWL and (k+1)(k+1)(k+1)-FWL. The expressive power of Subgraph kkk-GNNs is generally incomparable with kkk-FWL when k>1k>1k>1, but it is contained within (k+1)(k+1)(k+1)-FWL. The resulting architecture hierarchy is summarized below.

A major application of the framework is subgraph counting. Subgraph counts are not direct homomorphism counts, but they can be expressed as linear combinations of homomorphism counts over homomorphic images of the target pattern. Given a pattern FFF, let Spasm(F)\mathsf{Spasm}(F)Spasm(F) denote its homomorphic images, and let Spasm≠(F)\mathsf{Spasm}^{\neq}(F)Spasm=(F) be a maximal set of pairwise non-isomorphic images. Then for any graph GGG,

sub⁡(F,G)=∑F~∈Spasm≠(F)α(F,F~) hom(F~,G),\operatorname{sub}(F,G) = \sum_{\tilde{F}\in\mathsf{Spasm}^{\neq}(F)} \alpha(F,\tilde{F})\, \mathsf{hom}(\tilde{F},G),sub(F,G)=F~∈Spasm=(F)∑​α(F,F~)hom(F~,G),

where α(F,F~)\alpha(F,\tilde{F})α(F,F~) is a nonzero constant depending only on FFF and F~\tilde{F}F~, not on GGG. Therefore, a model can subgraph-count FFF whenever every homomorphic image F~∈Spasm(F)\tilde{F}\in\mathsf{Spasm}(F)F~∈Spasm(F) lies in its homomorphism expressivity family. Conversely, if some homomorphic image is outside the family, a pair of graphs can be constructed where the model representations agree but the subgraph counts differ. This gives a complete counting criterion at graph, node, and edge levels. The homomorphic-image decomposition for cyclic patterns is illustrated below.

The same characterization also connects to polynomial expressivity. Membership in FM\mathcal{F}^MFM or FnM\mathcal{F}_{\mathfrak{n}}^MFnM​ and FeM\mathcal{F}_{\mathfrak{e}}^MFeM​ determines whether invariant or equivariant graph polynomials associated with patterns or rooted patterns can be computed by the model. This turns the nested ear decomposition framework into a practical tool for reasoning about which structural polynomials are available to different architectures, including standard message passing, subgraph-based, local higher-order, and global higher-order variants.

Experiment

The experiments evaluate MPNN, Subgraph GNN, Local 2‑GNN, and Local 2‑FGNN under matched GIN-based designs to test the proposed homomorphism expressivity theory on synthetic substructure counting, cycle counting, and real-world graph benchmarks. The results show that model capability broadly follows the theoretical hierarchy, with Local 2‑FGNN consistently encoding more structures, counting diverse cycles more effectively, and achieving the strongest performance on practical datasets. Overall, the findings support the conclusion that stronger homomorphism expressivity translates into measurable advantages in both controlled and applied graph learning tasks.

The example characterizes which cycles and paths different GNN architectures can count at graph, node, and edge levels. More expressive models broaden the class of countable structures, with MPNN showing the strongest limitations and Local 2-(F)GNN models showing stronger cycle counting power. MPNN can count only very short simple paths and no cycles at the shown levels Subgraph GNNs and Local 2-(F)GNN models expand cycle and path counting capacity, with Local 2-(F)GNN models consistent with the strongest practical cycle counting performance

The results show that models with stronger local subgraph processing generally achieve lower normalized test error when counting homomorphism information. Local 2-FGNN is consistently accurate across graph-level, node-level, and edge-level tasks, while MPNN fails to capture any tested substructure. Subgraph GNN performs well on some cases but is less stable than Local 2-GNN and Local 2-FGNN, especially on harder substructures. Local 2-FGNN maintains low error across all tested homomorphism counting tasks. MPNN shows substantially worse performance than the subgraph-based models. Local 2-GNN improves over Subgraph GNN and provides more consistent low errors. Performance trends match the expected expressivity ordering among the compared GNN models.

The real-world benchmark results show that models with stronger theoretical expressivity generally achieve better performance on chemical graph tasks. Across the evaluated GNN variants, performance improves as the architecture moves from MPNN to Subgraph GNN and further to Local 2-GNN. Local 2-FGNN attains the best results on all reported tasks, indicating that its expressivity advantage can translate into practical gains. Expressiveness gains correlate with lower benchmark error on ZINC and Alchemy tasks. Local 2-FGNN consistently outperforms MPNN, Subgraph GNN, and Local 2-GNN.

Cycle-counting results show a clear expressive hierarchy among the compared GNN architectures when model size and training budget are matched. MPNN has the largest errors and cannot count edge-level cycles reliably, while Subgraph GNN improves substantially but still struggles with several longer and chordal cycles. Local 2-GNN and Local 2-FGNN achieve consistently lower errors, with Local 2-FGNN showing the strongest overall performance across graph, node, and edge levels. MPNN fails to count cycles effectively at all levels, especially at edge level. Local 2-FGNN achieves the best or near-best cycle counting errors despite comparable computational cost.

The experiments compare GNN architectures across synthetic cycle and path counting, homomorphism counting, and chemical benchmark tasks under matched model size and training budget. They validate that stronger local subgraph processing expands the class of countable structures and improves practical performance. MPNN is the most limited, while Subgraph GNN offers partial gains, and Local 2 GNN and especially Local 2 FGNN consistently count more complex cycles and paths with lower errors. These results show that theoretical expressivity translates into more accurate and stable performance at the graph, node, and edge levels.


AI로 AI 구축

아이디어에서 출시까지 — 무료 AI 코코딩, 즉시 사용 가능한 환경, 최적의 GPU 가격으로 AI 개발을 가속화하세요.

AI 협업 코딩
바로 사용 가능한 GPU
최적의 가격

HyperAI Newsletters

최신 정보 구독하기
한국 시간 매주 월요일 오전 9시 에 이번 주의 최신 업데이트를 메일로 발송합니다
이메일 서비스 제공: MailChimp