TLDR: This research paper explores the expressive power of Graph Transformers (GTs) and GPS-networks, two types of machine learning models for graphs, using logical formalisms. It finds that models using real numbers can handle relative global counting, while those using floating-point numbers (more common in practice) gain the ability for absolute global counting due to floating-point arithmetic properties like underflow. The study provides precise logical characterizations for these models, revealing their inherent strengths and limitations.
Graph neural networks (GNNs) have long been the go-to for understanding complex graph data, but they often face challenges when dealing with long-range interactions within a graph. This can lead to issues like “over-squashing” and “over-smoothing,” where information gets lost or blurred across distant nodes. This is where transformers, the powerful architecture behind modern large language models like GPTs, offer a promising alternative. Researchers have recently begun exploring how to integrate the global attention mechanisms of transformers with the local message-passing capabilities of GNNs, aiming to create more robust and expressive graph learning models.
A recent research paper delves deep into the “expressive power” of these innovative hybrid models, specifically focusing on Graph Transformers (GTs) and GPS-networks. Expressive power, in this context, refers to the range of properties or patterns that a machine learning model can accurately learn, identify, or represent within a dataset. The study employs logical formalisms to precisely define and characterize these models, offering invaluable insights into their inherent capabilities and limitations.
The paper investigates two distinct scenarios for these models: a theoretical setting where features are represented using real numbers, and a more practical setting that utilizes floating-point numbers, which are the standard for numerical representation in computer systems. Furthermore, the researchers analyze the impact of different “attention” mechanisms—soft-attention and average hard-attention—which dictate how transformer layers weigh the importance of various parts of the input graph.
In the theoretical realm, using real numbers for features, the study uncovered intriguing connections. When considering properties definable by first-order logic (a fundamental system of logic), GPS-networks demonstrate the same expressive power as “graded modal logic with the global modality” (GML + G). This implies that these models can effectively capture global graph properties, such as determining if a graph contains at least one vertex with a specific label. However, they are unable to perform absolute global counting, meaning they cannot ascertain if a graph contains, for instance, exactly 10 vertices with a particular label. Interestingly, they retain the ability for relative global counting, allowing them to compare counts, such as whether there are more vertices labeled ‘p’ than ‘q’. Pure Graph Transformers (GTs) in this real-number setting exhibit a more limited expressive power, aligning with propositional logic augmented with the global modality (PL + G).
The findings concerning floating-point numbers are particularly significant, as they directly relate to how these models are implemented and behave in real-world applications. Surprisingly, the transition from real numbers to floats introduces a notable shift in expressive power. Float-based GPS-networks are found to be as expressive as GML with the “counting global modality” (GML + GC). This is an “absolute” result, meaning its validity is not contingent on properties being definable in a background logic. This crucial distinction indicates that float-based models *can* perform absolute global counting, a capability that was absent when using real numbers. This unexpected enhancement is attributed to the “underflow phenomenon” inherent in floating-point arithmetic, where very small numbers are rounded down to zero. Similarly, float-based GTs are characterized as being equivalent to PL with the counting global modality (PL + GC).
The research underscores that while real-based GTs are adept at relative global counting, their float-based counterparts, along with GPS-networks, gain the powerful ability to perform absolute global counting. This fundamental difference is vital for practitioners and researchers aiming to understand and predict the behavior of these models in practical scenarios. The paper provides a robust theoretical foundation for these complex machine learning architectures, setting the stage for future investigations into incorporating positional encodings and extending these logical characterizations to broader graph classification tasks.
Also Read:
- Navigating the Mathematical Landscape: LLMs in Formal and Informal Reasoning
- Generative Logic: Automating Mathematical Discovery Through a New Computing Paradigm
To delve deeper into the specifics of this groundbreaking research, you can access the full paper here: Expressive Power of Graph Transformers via Logic.


