betaFeedback

WorksComputer Science

Constant-Depth Rational-Weight GNNs and their Connection to Schanuel's Conjecture

Abstract

A landmark result states that the expressive power of graph neural networks (GNNs) is bounded from above by the 1-dimensional Weisfeiler-Leman (1-WL) test. We ask whether a constant-depth GNN can match the expressive power of 1-WL while using only rational weights. We prove that this is the case when Schanuel's conjecture, a famous open problem from transcendental number theory, is taken to be true. Our GNN construction works even with integer weights, and more generally with a broad range of rational weights. As the activation function, it may use logistic sigmoid, hyperbolic tangent, or related functions. It is uniform across all graph sizes. We also prove a partial converse: if a GNN with exponentiation, hyperbolic sine or hyperbolic cosine as activation matches the expressive power of the 1-WL test in a slightly more expressive setting where graphs may contain certain auxiliary vertices, then this implies Schanuel's conjecture restricted to the numbers that arise in computations of the GNN. We also conduct experiments showing that the constructed GNNs indeed match the 1-WL test.

Introduction

A fundamental result in the theory of graph neural networks (GNNs) is that their expressive power is bounded from above by the 1-dimensional Weisfeiler-Leman (1-WL) test, in a version also known as color refinement; see Xu et al. [21]; Morris et al. [17]. In particular, if two vertices, or two graphs, cannot be distinguished by 1-WL, then they cannot be distinguished by a standard message-passing GNN either. Apart from motivating a lot of research on how to break the 1-WL barrier, this raises the converse question: to what extent can GNNs actually attain the 1-WL upper bound? This question has been answered in several different ways.

It was shown in Xu et al. [21] that GNNs of constant depth LL match the expressive power of LL-round 1-WL when the aggregation and combination functions, as well as the graph-level readout, are injective. They instantiate this in an architecture called graph isomorphism networks (GINs) where combination function are represented as feedforward neural networks (FNNs) with ReLU activation. A more economic construction was proposed in Aamand et al. [1]. An important caveat to these results is that they are non-uniform, that is, the construction of the GNN depends on the maximum size of the input graphs. A uniform result was obtained by Bravo et al. [4], refining a result by Amir et al. [2]. Their construction works with any non-polynomial analytic activation function, such as logistic sigmoid, and yields GNNs of internal dimension 1, that is, embeddings associate vertices with real numbers rather than with vectors of reals. While, remarkably, Bravo et al. show that in an LL-layer GNN almost every choice of real-valued weights suffices to match LL-round 1-WL, they do not establish that rational, or more generally finitely representable, weights suffice. It is interesting to contrast this with the result of Khalife & Basu [11] which states that it is impossible for a constant-depth GNN with a piecewise polynomial activation function such as ReLU to match the expressive power of even 2-round 1-WL.

A complementary result was recently obtained by Rosenbluth & Grohe [18]. They show that recurrent GNNs with rational, finite-precision weights and ReLU activation can attain the 1-WL limit. That is, there is a recurrent GNN that distinguishes two vertices, or graphs, if and only if some number of 1-WL rounds is able to distinguish them. Note that recurrence significantly changes the game: allowing the number of GNN iterations to depend on the input makes it possible to simulate message-passing algorithms, potentially using a non-constant number of iterations for each round of the 1-WL algorithm. When working with fixed-depth GNNs, in contrast, a single round of 1-WL must be simulated by only a constant number of GNN layers.

These results leave open a natural question, addressed in this article: Can a constant-depth GNN uniformly match the expressive power of 1-WL while using only rational weights? We answer this question conditionally on Schanuel’s conjecture, a famous unsolved problem in transcendental number theory. Assuming the conjecture, we show that for a broad class of activation functions, including logistic sigmoid, hyperbolic tangent and the exponential function exe^x, LL-layer GNNs with rational weights can uniformly match the LL-round 1-WL test, both at the vertex and at the graph level. Like all results discussed above, we use sum aggregation. Our construction yields GNNs of internal dimension 1 and works even with very simple weights: we may use self-weight 1, aggregation-weight 2, and bias 0 in every message-passing layer. This also resolves, under Schanuel’s conjecture, an open question from Bravo et al. [4] concerning the use of common weights in every layer. More generally, our construction applies to a broad range of rational weight choices, just as the result of Bravo et al. [4] applies to almost every choice of real-valued weights. The appearance of Schanuel’s conjecture can be understood from the arithmetic of sum aggregation. If the scalar embeddings at a given layer are linearly independent over Q\mathbb{Q}, then their sum uniquely encodes any finite multiset. To iterate this argument, the activation function must produce embeddings that are again linearly independent over Q\mathbb{Q}. Consider the basic case of exponential activation exe^x. If a1,…,ana_1,\ldots,a_n are embeddings and m1,…,mnm_1,\ldots,m_n are their multiplicities in a multiset, then em1a1+⋯+mnan=(ea1)m1⋯(ean)mne^{m_1a_1+\cdots+m_na_n}=(e^{a_1})^{m_1}\cdots(e^{a_n})^{m_n}. Thus, different multisets naturally give rise to different monomials in the exponentials of the previous embeddings. Schanuel’s conjecture provides the transcendence properties needed to ensure that these new values have the required independence.

Our connection to transcendental number theory also has a partial converse. In the slightly more expressive setting of graphs with a certain kind of auxiliary vertices akin to virtual nodes Gilmer et al. [6]; ); Hu et al. [9], we prove that the existence of an LL-layer GNN with exponentiation, sinh or cosh activation (and scalar embeddings on the final level) that attains the expressive power of LL-round 1-WL implies the restriction of Schanuel’s conjecture to the numbers that arise in its computation. This indicates that the connection between Schanuel’s conjecture and GNN expressivity goes in both directions rather than being a mere artifact of our proof technique.

We complement our theoretical results with experiments. We evaluate GNNs of the form used in our construction, including simple configurations with integer weights, and observe that they indeed match the distinctions made by 1-WL.

Related Work. There has been a lot of work on extending the expressive power of GNNs beyond 1-WL, using, e.g. homomorphism counts of pattern graphs Barceló et al. [3]; Maehara & NT [15], random node initializations Abboud et al. (2021), positional distance encodings Li et al. [14] and mechanisms inspired by higher-dimensional Weisfeiler-Leman tests Maron et al. [16]; ); Morris et al. [17]. Regarding Bravo et al. [4] and Rosenbluth & Grohe [18], we only add some minor clarifications over what was already said above. The results in Bravo et al. [4] concern graph distinguishability, but analogous results for the vertex level can easily be derived from their proofs. The same is true for Xu et al. [21]. In contrast, Rosenbluth & Grohe [18] have explicit results for the vertex level and for the graph level, on connected graphs. These are subject to the assumption that the graph size is provided as part of the initial embedding at every vertex. Additional results on the graph level neither need this assumption nor connectedness, but require GNNs that have additional global aggregation in every iteration. Our results also contrast those of Khalife & Tonelli-Cueto [12] which imply that GNNs with ReLU activation can express first-order properties that cannot be expressed by any GNN activated by logistic sigmoid or hyperbolic tangent. Together with our results, assuming Schanuel’s conjecture, this suggests that while logistic sigmoid can be more powerful than ReLU for exact distinguishability, ReLU can be more powerful than sigmoid for classification with a fixed margin. Indeed, the results in Khalife & Tonelli-Cueto [12] require a uniform margin that separates the embeddings on positive and negative instances, whereas our notion of distinguishability only requires these outputs to be distinct. Schanuel’s conjecture has also been used in previous work on machine learning. Assuming the conjecture, training Hankala et al. [8] and verification Isac et al. [10] have been shown to be decidable for FNNs with sigmoid activation. Note that these results concern computability rather than expressive power. We are not aware of previous results connecting Schanuel’s conjecture to the expressive power of neural network architectures.

Preliminaries

Abstract Algebra. We use N\mathbb{N}, Z\mathbb{Z}, Q\mathbb{Q}, Q‾\overline{\mathbb{Q}}, R\mathbb{R}, C\mathbb{C} to denote natural, integer, rational, algebraic, real and complex numbers respectively. By Q≥0\mathbb{Q}_{\geq0} we reference non-negative rationals. We recall that an algebraic number is a real number that is a root of a non-zero polynomial in one variable with rational coefficients. For a vector vˉ\bar{v}, we use vˉ[i]\bar{v}[i] to denote its ii-th component. We also recall that a field consists of an underlying set FF and two binary operations ++, ⋅:F×F→F\cdot: F \times F \to F, subject to additional conditions. As customary, we denote a field by its underlying set, e.g. Q\mathbb{Q} is used for the field of rational numbers with the usual addition and multiplication operations.

For two fields EE and FF, we say that EE is a field extension of FF, denoted E/FE/F, if F⊆EF \subseteq E and the additive and multiplicative operations of EE, when restricted to F×FF \times F, are exactly the additive and multiplicative operations of FF. For instance, R\mathbb{R} is a field extension of Q\mathbb{Q}. For a field extension E/FE/F and S⊆ES \subseteq E, we denote by F(S)F(S) the field generated by FF and SS, that is, the smallest subfield GG of EE such that S⊆GS \subseteq G and G/FG/F. For instance, Q(2)={a+b2∣a,b∈Q}\mathbb{Q}(\sqrt{2}) = \{a+b\sqrt{2} \mid a,b \in\mathbb{Q}\} is the smallest subfield of R\mathbb{R} containing both Q\mathbb{Q} and 2\sqrt{2}. Since F(S)F(S) is a field, P(s)Q(s)∈F(S)\frac{P(s)}{Q(s)} \in F(S) for all polynomials P(x)P(x) and Q(x)Q(x) over FF and all s∈Ss \in S with Q(s)≠0Q(s) \ne0. This relates to a family of generated fields used later in this article, namely, for any positive integer κ\kappa,

Q(e1/κ)={P(e1/κ)Q(e1/κ) | P(x),Q(x) polynomials over Q, Q(e1/κ)≠0}.\mathbb{Q}(e^{1/\kappa}) = \left\{\frac{P(e^{1/\kappa})}{Q(e^{1/\kappa})} \,\middle|\, P(x), Q(x)\text{ polynomials over }\mathbb{Q},\ Q(e^{1/\kappa}) \ne0\right\}.

A field extension E/FE/F is finitely generated if there is a finite S⊆ES \subseteq E such that E=F(S)E = F(S). Clearly, Q(2)\mathbb{Q}(\sqrt{2}) and Q(e1/κ)\mathbb{Q}(e^{1/\kappa}) are finitely generated.

Let E/FE/F be a field extension and S={s1,…,sn}⊂ES = \{s_1,\ldots,s_n\} \subset E. Then SS is linearly independent over FF if a1s1+⋯+ansn=0a_1s_1+\cdots+a_ns_n = 0 in EE only if a1=⋯=an=0a_1=\cdots=a_n=0, for all a1,…,an∈Fa_1,\ldots,a_n \in F. For instance, {1,2}\{1,\sqrt{2}\} is linearly independent over Q\mathbb{Q}. Similarly, SS is algebraically independent over FF if there is no non-zero polynomial P(x1,…,xn)P(x_1,\ldots,x_n) with coefficients in FF that satisfies P(s1,…,sn)=0P(s_1,\ldots,s_n)=0. For instance, {2}\{\sqrt{2}\} is not algebraically independent over Q\mathbb{Q} since 2\sqrt{2} is a root of x2−2x^2-2. In contrast, {π}\{\pi\} is algebraically independent over Q\mathbb{Q} since π\pi is transcendental. A transcendence basis of a field extension E/FE/F is a subset of EE, maximal w.r.t. set inclusion, that is algebraically independent over FF. For example, {π}\{\pi\} is a transcendence basis of Q(π)/Q\mathbb{Q}(\pi)/\mathbb{Q}. It is known that all transcendence bases share the same cardinality, see Clader & Ross [5]. It is thus meaningful to define the transcendence degree of E/FE/F, denoted trdeg⁡F(E)\operatorname{trdeg}_F(E), as the cardinality of any transcendence basis of E/FE/F. Thus trdeg⁡Q(Q(π))=1\operatorname{trdeg}_{\mathbb{Q}}(\mathbb{Q}(\pi))=1 and trdeg⁡Q(Q(2))=0\operatorname{trdeg}_{\mathbb{Q}}(\mathbb{Q}(\sqrt{2}))=0. A field extension E/FE/F is algebraic if trdeg⁡F(E)=0\operatorname{trdeg}_F(E)=0. Hence Q(2)/Q\mathbb{Q}(\sqrt{2})/\mathbb{Q} is algebraic.

The following consequence of Corollary 6.31 of Clader & Ross [5] will be useful.

Lemma 1. Let E/FE/F be a finitely generated field extension and let S⊆ES \subseteq E. If E/F(S)E/F(S) is algebraic and trdeg⁡F(E)≥∣S∣\operatorname{trdeg}_F(E) \geq|S|, then SS is algebraically independent over FF.

Proof. Suppose that SS is algebraically dependent over FF, and let T⊂ST \subset S be maximal algebraically independent over FF. Then ∣T∣<∣S∣|T| < |S|, and F(S)/F(T)F(S)/F(T) is algebraic. Since E/F(S)E/F(S) is algebraic, so is E/F(T)E/F(T). Point 1 of Corollary 6.31 of Clader & Ross [5] states that if E/FE/F is finitely generated and E/F(T)E/F(T) is algebraic, then trdeg⁡F(E)≤∣T∣\operatorname{trdeg}_F(E) \leq|T|. Consequently, trdeg⁡F(E)≤∣T∣<∣S∣\operatorname{trdeg}_F(E) \leq|T| < |S|, contradicting trdeg⁡F(E)≥∣S∣\operatorname{trdeg}_F(E) \geq|S|.

A classical result from transcendental number theory provides an important way of obtaining algebraically independent numbers, from Weierstrass [20].

References

  1. [1]Anders Aamand, Justin Chen, Piotr Indyk, Shyam Narayanan, Ronitt Rubinfeld, Nicholas Schiefer, Sandeep Silwal, and Tal Wagner. Exponentially improving the complexity of simulating the weisfeiler-lehman test with graph neural networks. In S. Koyebo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh (eds.), Advances in Neural Information Processing Systems, volume 35, pp. 27333–27346. Curran Associates, Inc., 2022. doi: 10.52202/068431-1982. URL https://proceedings.neurips.cc/paper_files/paper/2022/file/af0ad514b9cda46bd49e14ee11e2672f-Paper_Conference.pdf. Ralph Abboud, İsmail İlkan Ceylan, Martin Grohe, and Thomas Lukasiėwicz. The surprising power of graph neural networks with random node initialization. In Zhi-Hua Zhou (ed.), Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, IJCAI-21, pp. 2112–2118. International Joint Conferences on Artificial Intelligence Organization, 2021. doi: 10.24963/ijcai.2021/291. URL https://doi.org/10.24963/ijcai.2021/291. Main Track.
  2. [2]Tal Amir, Steven Gortler, Ilai Avni, Ravina Ravina, and Nadav Dym. Neural injective functions for multisets, measures and graphs via a finite witness theorem. In A. Oh, T. Naumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine (eds.), Advances in Neural Information Processing Systems, volume 36, pp. 42516–42551. Curran Associates, Inc., 2023. doi: 10.52202/075280-1845. URL https://proceedings.neurips.cc/paper_files/paper/2023/file/84b6e6f7cc7b7751e9aaac0da74f755a-Paper-Conference.pdf.DOI
  3. [3]Pablo Barceló, Floris Geerts, Juan Reutter, and Maksimilian Ryschkov. Graph neural networks with local graph parameters. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan (eds.), Advances in Neural Information Processing Systems, volume 34, pp. 25280–25293. Curran Associates, Inc., 2021. URL https://proceedings.neurips.cc/paper_files/paper/2021/file/d4d8d1ac7e00e9105775a6b660dd3cbb-Paper.pdf.arxiv.org/abs/2106.06707
  4. [4]César Bravo, Alexander Kozachinskiy, and Cristobal Rojas. On dimensionality of feature vectors in MPNNs. In Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp (eds.), Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 4472–4481. PMLR, 21–27 Jul 2024. URL https://proceedings.mlr.press/v235/bravo24a.html.arxiv.org/abs/2402.03966
  5. [5]Emily Clader and Dustin Ross. Beginning in Algebraic Geometry. Undergraduate Texts in Mathematics. Springer, 2025. ISBN 978-3-031-88819-9. doi: 10.1007/978-3-031-88819-9.DOI
  6. [6]Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural message passing for quantum chemistry. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pp. 1263–1272. PMLR, 2017.arxiv.org/abs/1704.01212
  7. [7]Martin Grohe. The logic of graph neural networks. In 2021 36th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), pp. 1–17, 2021. doi: 10.1109/LICS52264.2021.9470677.DOI
  8. [8]Teemu Hankala, Miika Hannula, Juha Kontinen, and Jonni Virtema. Complexity of neural network training and ETR: extensions with effectively continuous functions. In Michael J. Wooldridge, Jennifer G. Dy, and Sriraam Natarajan (eds.), Thirty-Eighth AAAI Conference on Artificial Intelligence, AAAI 2024, Thirty-Sixth Conference on Innovative Applications of Artificial Intelligence, IAAI 2024, Fourteenth Symposium on Educational Advances in Artificial Intelligence, EAAI 2024, February 20-27, 2024, Vancouver, Canada, pp. 12278–12285. AAAI Press, 2024. doi: 10.1609/AAAI.V38I11.29118. URL https://doi.org/10.1609/aaai.v38i11.29118.
  9. [9]Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, and Jure Leskovec. Open graph benchmark: Datasets for machine learning on graphs. In Advances in Neural Information Processing Systems, volume 33, pp. 22118–22133, 2020.arxiv.org/abs/2005.00687
  10. [10]Omri Isac, Yoni Zohar, Clark Barrett, and Guy Katz. DNN Verification, Reachability, and the Exponential Function Problem. In Guillermo A. Pérez and Jean-François Raskin (eds.), 34th International Conference on Concurrency Theory (CONCUR 2023), volume 279 of Leibniz International Proceedings in Informatics (LIPIcs), pp. 26:1–26:18, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. ISBN 978-3-95977-299-0. doi: 10.4230/LIPIcs.CONCUR.2023.26. URL https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CONCUR.2023.26.DOI
  11. [11]Sammy Khalife and Amitabh Basu. On the power of graph neural networks and the role of the activation function. SIAM Journal on Applied Algebra and Geometry, 10(2):350–365, 2026. doi: 10.1137/24M1659704. URL https://doi.org/10.1137/24M1659704.
  12. [12]Sammy Khalife and Josué Tonelli-Cueto. Is uniform expressivity too restrictive? towards efficient expressivity of GNNs. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=lsvGqR6OTf.
  13. [13]Serge Lang. Introduction to Transcendental Numbers. Addison-Wesley, Reading, MA, 1966.
  14. [14]Pan Li, Yanbang Wang, Hongwei Wang, and Jure Leskovec. Distance encoding: Design provably more powerful neural networks for graph representation learning. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 4465–4478. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/file/2f73168bf3656f697507752ec592c437-Paper.pdf.
  15. [15]Takanori Maehara and Hoang NT. Deep homomorphism networks. In A. Globerson, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. Tomczak, and C. Zhang (eds.), Advances in Neural Information Processing Systems, volume 37, pp. 56076–56107. Curran Associates, Inc., 2024. doi: 10.52202/079017-1784. URL https://proceedings.neurips.cc/paper_files/paper/2024/file/65f54fdf62cd5614dc5715ae7ece4ef6-Paper-Conference.pdf.DOI
  16. [16]Haggai Maron, Heli Ben-Hamu, Hadar Serviansky, and Yaron Lipman. Provably powerful graph networks. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett (eds.), Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. URL https://proceedings.neurips.cc/paper_files/paper/2019/file/bb04f0f7eceae4aae62035497da1387-Paper.pdf.arxiv.org/abs/1905.11136
  17. [17]Christopher Morris, Martin Ritzert, Matthias Fey, William L. Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and leman go neural: Higher-order graph neural networks. In Proceedings of the Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, pp. 4602–4609. AAAI Press, 2019. doi: 10.1609/AAAI.V33I01.33014602. URL https://doi.org/10.1609/aaai.v33i01.33014602.
  18. [18]Eran Rosenbluth and Martin Grohe. Repetition makes perfect: Recurrent graph neural networks match message passing limit. In Sven Koenig, Chad Jenkins, and Matthew E. Taylor (eds.), Fortieth AAAI Conference on Artificial Intelligence, Thirty-Eighth Conference on Innovative Applications of Artificial Intelligence, Sixteenth Symposium on Educational Advances in Artificial Intelligence, AAAI 2026, Singapore, January 20-27, 2026, pp. 25168–25175. AAAI Press, 2026. doi: 10.1609/AAAI.V40I30.39707. URL https://doi.org/10.1609/aaai.v40i30.39707.
  19. [19]Oleg Verbitsky and Maksim Zhukovskii. Canonical labeling of sparse random graphs. In 42nd International Symposium on Theoretical Aspects of Computer Science (STACS 2025), volume 327 of Leibniz International Proceedings in Informatics (LIPIcs), pp. 75:1–75:20, Dagstuhl, Germany, 2025. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. ISBN 978-3-95977-365-2. doi: 10.4230/LIPIcs.STACS.2025.75. URL https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.STACS.2025.75.DOI
  20. [20]Karl Weierstrass. Zu Lindemann’s Abhandlung: “über die Ludolph’sche Zahl”. Sitzungsberichte der Königlich Preussischen Akademie der Wissenschaften zu Berlin, pp. 1067–1085, 1885.
  21. [21]Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=ryGs6iA5Km.arxiv.org/abs/1810.00826

Paper details

vlnc:W_gt7ffemq
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

ChatGPT-5.6 Sol (Max), an AI coding agent, GPT-5.6 Sol (bare)

View statement
Looking for related papers…
Contents