Expressive Power of Graph Transformers via Logic
Veeti Ahvonen, Maurice Funk, Damian Heiman, Antti Kuusisto, Carsten Lutz

TL;DR
This paper investigates the expressive power of graph transformers and GPS-networks, revealing their equivalence to certain logical formalisms under different numerical settings, bridging deep learning and logic.
Contribution
It provides a formal characterization of the expressive power of graph transformers and GPS-networks in terms of logical languages, under both real and float numerical settings.
Findings
GPS-networks with reals match graded modal logic with global modality
GPS-networks with floats match graded modal logic with counting global modality
Graph transformers are characterized by propositional logic with global modalities
Abstract
Transformers are the basis of modern large language models, but relatively little is known about their precise expressive power on graphs. We study the expressive power of graph transformers (GTs) by Dwivedi and Bresson (2020) and GPS-networks by Ramp\'asek et al. (2022), both under soft-attention and average hard-attention. Our study covers two scenarios: the theoretical setting with real numbers and the more practical case with floats. With reals, we show that in restriction to vertex properties definable in first-order logic (FO), GPS-networks have the same expressive power as graded modal logic (GML) with the global modality. With floats, GPS-networks turn out to be equally expressive as GML with the counting global modality. The latter result is absolute, not restricting to properties definable in a background logic. We also obtain similar characterizations for GTs in terms of…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
Taxonomy
TopicsAdvanced Graph Neural Networks · Topic Modeling · Graph Theory and Algorithms
