{'fraction_non_alphanumeric': 0.04012561060711793, 'fraction_numerical': 0.012842879381609319, 'mean_word_length': 4.27703420437646, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Weisfeiler and Lehman Go Cellular: CW Networks

Graph Neural Networks (GNNs) are limited in their expressive power, struggle with long-range interactions and lack a principled way to model higher-order structures. These problems can be attributed to the strong coupling between the computational graph and the input graph structure. The recently proposed Message Passing Simplicial Networks naturally decouple these elements by performing message passing on the clique complex of the graph. Nevertheless, these models can be severely constrained by the rigid combinatorial structure of Simplicial Complexes (SCs). In this work, we extend recent theoretical results on SCs to regular Cell Complexes, topological objects that flexibly subsume SCs and graphs. We show that this generalisation provides a powerful set of graph"lifting"transformations, each leading to a unique hierarchical message passing procedure. The resulting methods, which we collectively call CW Networks (CWNs), are strictly more powerful than the WL test and not less powerful than the 3-WL test. In particular, we demonstrate the effectiveness of one such scheme, based on rings, when applied to molecular graph problems. The proposed architecture benefits from provably larger expressivity than commonly used GNNs, principled modelling of higher-order signals and from compressing the distances between nodes. We demonstrate that our model achieves state-of-the-art results on a variety of molecular datasets.


Introduction
The operations performed by message passing Graph Neural Networks (GNNs) emulate the structure of the input graph. While this property has clear computational advantages, it brings with it a series of fundamental limitations. As observed by Xu et al. [74] and Morris et al. [55] the local neighbourhood aggregations used by GNNs are at most as powerful as the Weisfeiler-Lehman (WL) test [71] in distinguishing non-isomorphic graphs. Therefore, GNNs fail to detect certain higer-order meso-scale structures such as cliques or (induced) cycles [2,15], which are particularly important in applications dealing with social and biological networks or molecular graphs. At the same time, many such layers have to be stacked to make long-range interactions in the graph possible. Besides the computational burden this incurs, deep GNNs typically come with additional problems such as over-smoothing [51] and over-squashing [1] of the node representations.
To address these problems, we propose a novel message passing procedure based on (regular) cell complexes, also known as CW complexes 2 , topological objects that form the building block of algebraic topology [38]. When paired with a theoretically-justified "lifting" transformation augmenting the graph with higher-dimensional constructs called "cells", our method results in a multi-dimensional and hierarchical message passing procedure over the input graph. Our approach generalises and subsumes the recently proposed Message Passing Simplicial Networks (MPSNs) [8], which operate on simplicial complexes (SCs), topological generalisations of graphs. However, SCs have a rigid combinatorial structure that significantly limits the range of lifting transformations one could use to meaningfully modulate the message passing procedure. In contrast, we show that cell complexes, which in turn generalise simplicial complexes and come with additional flexibility, allow one to construct new and better ways of decoupling the input and computational graphs.
Main Contributions To summarise, we propose a message passing scheme operating on regular cell complexes. We call this family of models CW Networks (CWNs) and study their expressive power using a cellular version of the WL test. We show that for an entire class of "lifting" transformations CWNs are at least as powerful as the WL test. Furthermore, we prove that for some of the maps in this class, CWNs can be strictly more powerful than WL, Simplicial WL (SWL) and also not less powerful than 3-WL. We also express the fundamental symmetries of these models and show how they can be seen as generalised convolutional operators on cell complexes. Experimentally, we focus our attention on a particular "lifting" map based on induced cycles. When applied to molecular graphs, it leads to an intuitive hierarchical message passing procedure involving the atoms, the bonds between them and the chemical rings of the molecules. We demonstrate that this provably powerful approach obtains state-of-the-art results on popular large-scale molecular graph datasets and other related tasks. To the best of our knowledge, this is the first work proposing a cell complex representation for molecules. Our code is available at https://github.com/twitter-research/cwn.

Background
Definition 1 (Hansen and Ghrist [36]). A regular cell complex ( Figure 1) is a topological space X together with a partition {X σ } σ∈P X of subspaces X σ of X called cells, and such that 1. For each x ∈ X there exists an open neighbordhood of x that intersects finitely many cells. 2. For all σ, τ we have that X τ ∩ X σ = ∅ iff X τ ⊆ X σ , where X σ is the closure of a cell. 3. Every cell is homeomorphic to R n for some n. 4. (Regularity) For every σ ∈ P X there is a homeomorphism φ of a closed ball in R nσ to X σ such that the restriction of φ to the interior of the ball is a homeomorphism onto X σ . We note that by condition (2) the indexing set P X has a poset structure τ ≤ σ ⇔ X τ ⊆ X σ , while condition (4) guarantees that this poset structure encodes all the topological information about X. Thus, we can identify a regular cell complex X with this poset, called face poset of X. We also use τ < σ for the strict version of this partial order.
Intuitively, one constructs a cell complex through a hierarchical gluing procedure. One starts with a set of vertices (0-cells). Then edges (1-cells) are attached to these by gluing the endpoints of closed line segments to them. We have now only described a (multi) graph. However, one can generalise this even further by taking a two-dimensional closed disk and glue its boundary (i.e. a circle) to any simple cycle in the (multi) graph previously built as in Figure 2. While we are generally not concerned with dimensions above two, this can be further generalised by gluing the boundary of n-dimensional balls to certain (n − 1)−cells in the complex.
Consider the examples in Figure 3. The shown sphere is a cell complex obtained from two 0-cells (i.e. vertices), to which two 1-cells (i.e. edges), which form the equator, were attached. The boundary  of two 2-dimensional disks (i.e. the two hemispheres) were glued to the equator to form a sphere. The second example is a tetrahedron with empty interior. It is a particular type of cell complex called a simplicial complex (SC). The only 2-cells it allows are triangle-shaped. More generally, the n-dimensional cells of SCs are n-simplices, which makes them slightly more rigid structures. Figure 4: The CWL colouring procedure for the yellow edge of the cell complex. All cells have been assigned unique colours to aid the visualisation of the adjacencies. Note that the yellow edge aggregates long-range information from the light green edge.
Note that unlike in graphs and simplicial complexes, the sets B(σ, τ ) and C(σ, τ ) can have more than one element. For instance, two (closed) 2-cells might intersect in more than one edge (e.g. the two hemispheres in Figure 3), and conversely, two edges might be on the boundary of the same two 2-cells. This illustrates the more flexible combinatorial structure of cell complexes.
Cellular WL (CWL) We consider CWL, a colour refinement scheme for cell complexes that generalises the Simplicial WL [8] and WL [71] tests. We use c t σ to refer to the colour assigned by CWL to cell σ at iteration t of the algorithm. When the input is a simplicial complex, this recovers the SWL algorithm. A step of the algorithm is graphically depicted in Figure 4 for a single cell. 1. Given a regular cell complex X, all the cells σ are initialised with the same colour. 2. Given the colour c t σ of cell σ at iteration t, we compute the colour of cell σ at the next iteration c t+1 σ by injectively mapping the multi-sets of colours belonging to the adjacent cells of σ using a perfect HASH function: c t+1 σ = HASH c t σ , c t B (σ), c t C (σ), c t ↓ (σ), c t ↑ (σ) . 3. The algorithm stops when a stable colouring is reached. Two cell complexes are considered non-isomorphic if their colour histograms are different. Otherwise, the test is inconclusive.
First, we state the following theorem from Bodnar et al. [8] involving SWL and simplicial complexes. This theorem shows that on simplicial complexes, certain adjacencies can be pruned without affecting the non-isomorphic SCs that can be distinguished. This has important computational implications. Theorem 6. SWL without coboundary and lower-adjacencies has the same expressive power in distinguishing non-isomorphic simplicial complexes as SWL with the complete set of adjacencies.
It is not immediately clear whether an equivalent theorem would also hold for cell complexes. This is because cells, unlike simplices, can have widely different shapes and, as described above, the adjacencies between them take more complicated forms. Nevertheless, we show that a positive result can be obtained. Theorem 7. CWL without coboundary and lower-adjacencies has the same expressive power in distinguishing non-isomorphic cell complexes as CWL with the complete set of adjacencies.
We note this does not mean that the removed adjacencies are completely redundant in practice. Even if they are not needed from a (theoretical) colour refinment perspective, they might still include important inductive biases that make them suitable for certain tasks.
We are now interested in examining various procedures for mapping, or "lifting", graphs into the space of regular cell complexes. Such a procedure can be used to test the isomorphism of two graphs by performing colour refinement on the cell complexes they are mapped to. The hope is that CWL applied to these cell complexes is more powerful than WL applied to the initial graphs. We will later show that for a wide range of transformations, this is indeed the case. We start by rigorously defining what we mean by a "lifting". Definition 8. A cellular lifting map is a function f : G → X from the space of graphs G to the space of regular cell complexes X with the property that two graphs G 1 , G 2 are isomorphic iff the cell complexes f (G 1 ), f (G 2 ) are isomorphic.
This property ensures that testing the isomorphism of the two cell complexes is equivalent to testing the isomorphism in the input graphs. This would not be the case if two non-isomoprhic graphs were mapped to the same cell complex.
Example 9. It can be verified that the function mapping each graph to its clique complex (i.e. every (k + 1)-clique in the graph becomes a k-simplex) is a cellular lifting map.
The clique complex lifting map from Example 9 has been used by Bodnar et al. [8] to show that SWL is strictly more powerful than WL. We restate this result: Theorem 10. SWL with clique complex lifting is strictly more powerful than WL.
A natural question is what other lifting transformations make CWL strictly more powerful than WL? We first describe a space of lifting transformations that make CWL at least as powerful as WL. Definition 11. A lifting map is skeleton-preserving if for any graph G, the 1-skeleton of f (G) and G are isomorphic as (multi) graphs.
Intuitively, skeleton-preserving liftings ensure that the additional structure added by the lifting map comes from attaching cells of dimension at least two to the graph. These mappings keep the 0-cells and 1-cells intact and are, therefore, restricted from making modifications to the input graph structure. An important remark is that for simplicial complexes, attaching simplices based on cliques present in the graph is the only possible skeleton preserving transformation. Once again, this illustrates the limitations of simplicial complexes for adding useful higher-dimensional structures to the graph. Example 12. The function from Example 9 is also skeleton-preserving because the 1-skeleton of the clique complex of a graph is trivially isomorphic to the graph. A lifting function mapping each graph to a multi-graph where each edge is doubled by a parallel edge is not skeleton-preserving ( Figure 5). Figure 5: A graph, its clique complex and the graph with duplicated edges. The first map is skeletonpreserving, while the second is not.
We now show that all the maps in the skeleton-preserving class have the following desirable property: Theorem 13. Let f be a skeleton-preserving lifting map. Then CWL(f ) (i.e. CWL using lifting f ) is at least as powerful as WL in distinguishing non-isomorphic graphs.
To prove that some of these make CWL strictly more powerful than WL, it is sufficient to find a pair of graphs that cannot be distinguished by WL, but can be distinguished by CWL. The following result gives examples of such maps. Definition 14. Let k-CL, k-IC, k-C be the lifting maps attaching cells to all the cliques, induced cycles and simple cycles, respectively, of size at most k. Corollary 15. For all k ≥ 3, CWL(k-CL), CWL(k-IC) and CWL(k-C) are strictly more powerful than WL.
We note that this is not a complete list. For instance, the result can also be extended to combinations of the above or other transformations. We can also relate CWL to the higher-order 3-WL test. Theorem 16. There exists a pair of graphs indistinguishable by 3-WL but distinguishable by CWL(k-CL) with k ≥ 4, CWL(k-IC) with k ≥ 4 and CWL(k-C) with k ≥ 8.
Finally, we conclude this section by showing how CWL can achieve a superior expressive power compared to SWL. This result is proven by Corollary 31 in the Appendix. Theorem 17. Let k-CL ∪ k-IC and k-CL ∪ k-C denote combined liftings attaching cells to the union of the specified substructures. CWL(k 1 -CL ∪ k 2 -IC) and CWL(k 1 -CL ∪ k 2 -C) are strictly more powerful than SWL(k 1 -CL) for all k 2 ≥ 5.

Molecular Message Passing with CW Networks
We now describe CW Networks with an applied focus on molecular graphs to ground the discussion. Therefore, from now on we assume the use of the skeleton-preserving lifting transformation that attaches 2-cells to all the induced cycles (i.e. chordless cycles) in the graph as in Figure 2. This leads to a message passing procedure involving atoms (vertices / 0-cells), the bonds between atoms (edges / 1-cells) and chemical rings (induced cycles / 2-cells). Additionally, in virtue of Theorem 7, we consider only the boundary and upper adjacencies between these cells without sacrificing the expressive power. The equations for the other adjacencies, which we do not use, can be found in Appendix A. We note however, that the theoretical results in this section are general and not particular to these specific choices of adjacencies and lifting transformation.

Molecular Message Passing
The cells in our CW Network receive two types of messages: The first specifies messages from atoms to bonds and from bonds to rings. The second type of message, specifies messages between atoms connected by a bond and messages between bonds that are part of the same ring ( Figure 6). Note that for the second type of adjacency, when two atoms communicate, we include the features of the bond between them. Similarly, when two bonds communicate, we include the features of the ring they communicate through. The update operation takes into account these two types of incoming messages and updates the features of the cells: To obtain a global embedding for a cell complex X from a model with L layers, the readout function takes as input the separate multi-sets of features corresponding to the atoms, bonds and the rings: Expressivity Naturally, the ability of CWNs to distinguish non-isomorphic regular cell complexes is bounded by CWL. Similarly to GNNs and WL, CWNs can also be shown to be as powerful as CWL as long as they are equipped with a sufficient number of layers and the parametric local aggregators they use can learn to be injective. Multiple such multi-set aggregators [20,74] are known to exist and can be directly employed in our model. Theorem 18. CW Networks are at most as powerful as CWL. Additionally, when using injective neighbourhood aggregators and a sufficient number of layers, CWNs are as powerful as CWL.
Corollary 15 states that CWL is strictly more powerful than the standard WL when the lifting procedure attaches 2-cells to induced cycles of size k ≥ 3. As a consequence of Theorem 18, this result also holds for molecular message passing CWNs equipped with injective aggregators. In practice, k is to be considered as a standard hyperparameter, and its choice can either be driven by validation set performance, or by domain knowledge (if available).
Symmetries Given a graph G with adjacency matrix A and feature matrix X, a function f is (node) permutation equivariant if P f (A, X) = f (P AP T , P X), for any permutation matrix P . GNN layers respect this equation, which ensures they compute the same functions up to a permutation (i.e. relabeling) of the nodes. Similarly, it can be shown that CW Networks are equivariant with respect to permutations of the cells and corresponding permutations of the boundary relations σ ≺ τ between cells. We define this notion of equivariance more formally in Appendix C. Theorem 19. CW Network layers are cell permutation equivariant.
Long-Range Interactions Several graph-related tasks require the ability to capture long-range interactions between nodes. For instance, certain molecular properties depend on atoms placed on the opposite sides of a ring [31,60]. As a consequence of the coupling between the input and computational graphs, L message passing operations are necessary in GNNs to let a node receive information from an L-hops distant node. In contrast, our hierarchical message passing scheme requires at most L layers since 2-cells create shortcuts. For example, a constant number of CWN layers (3) is enough to capture dependencies between atoms on the opposite sides of a ring, independently of the ring size. In Section 5.1 we verify this in a controlled scenario. Additional experiments on real world graphs in Section 5.2 confirm that it can achieve state-of-the-art performance with a limited number of layers.
Anisotropic Filters Due to the lack of a canonical ordering between neighbours, many common GNNs use symmetric convolutional kernels, resulting in isotropic filters treating neighbours equally. Recent works have proposed to address this limitation by employing additional structural information [6,10]. CWNs also implicitly achieve this form of anisotropy by integrating information from (b) Failure rates on the SR isomorphism task, the smaller the better (mean and std-error over 5 runs). In parantheses, for each model, the maximum size k of rings lifted to 2-cells. the higher-order cells and their associated substructures into the message passing procedure. For instance, bond features can learn to encode their membership to a ring and also communicate directly with other bonds present in the ring. Consequently, the messages between atoms connected through these bonds are modulated by the presence of the ring as well as by the presence of other nodes and bonds part of that ring.

CWNs as Generalised Convolutions
Our message passing scheme can be seen a (non-linear) generalisation of linear diffusion operators on cell complexes. Recent works [13,25] have introduced convolutional operators on SCs by employing the Hodge Laplacian [63], a generalisation of the graph Laplacian. By leveraging on the cellular Sheaf Laplacian [36], a similar construction can be extended to cell complexes to define cellular convolutional operators. In Appendix D we discuss this approach and show that our cellular message passing scheme subsumes it. This represents a promising avenue for studying CWNs from a spectral perspective, an endeavour we leave for future work.
Computational Complexity When considering cells of a constant maximum dimension and boundary size, the computational complexity of the message passing scheme is linear in the size of the input complex. For the molecular applications we are interested in, the average number of rings per molecule is upper bounded by a small constant (e.g. three for MOLHIV), so the size of the complex is approximately the same as the size of the graph. Therefore, in this setting, the computational complexity of the model is similar to that of message passing GNNs. Separately of this, the one-time preprocessing step of computing the lifting of the graphs should also be considered. The C induced cycles in a graph can be listed in O (|E| + |V |C) polylog |V | time [26]. Again, given that C is upper bounded by a small constant for the molecular datasets of interest in this work, the complexity of the lifting procedure is also almost linear in the size of the graph. A more detailed analysis backed up by wall-clock time experiments is given in Appendix B.

Experiments
In this section we validate the theoretical and empirical properties of our proposed message passing scheme in controlled scenarios as well as in real-world graph classification problems, with a focus on large scale molecular benchmarks. For simplicity, in all experiments we employ a model which stacks CWN layers with local aggregators as in GIN [74]. We name our architecture "Cell Isomorphism Network" (CIN). 0-cells are always endowed with the original node features; higher-dimensional cells are populated in a benchmark specific manner. See Appendix E for details on feature initialisation, message passing and readout operations, hyperparameters, implementation and benchmark statistics.

Synthetic Benchmarks
CSL Circular Skip Link dataset was first introduced in [57] and has been recently adopted as a reference benchmark to test the expressivity of GNNs [24]. It consists of 150 4-regular graphs from 10 different isomorphism classes, which we need to predict. Unsolvable by the WL test and message passing approaches [14,57], we use it to validate the expressive power of CWNs. We follow the same evaluation setting as Dwivedi et al.
[24]: 5-fold cross validation procedure and 20 different random weight initialisations. For our model, we set the maximum ring size k = 8. In Table 1 we follow the common practice on this dataset and report the mean, minimum and maximum test accuracy obtained by CIN over the 100 runs, along with the results by the baselines presented in Dwivedi et al. [24]. MP-GNNs, that is classic message passing GNNs (GAT [69], MoNet [54], GIN [74], etc.), and RingGNN [14] perform as random guessers. In contrast, our model is able to identify the isomorphism class of each test graph in every run while featuring only a fraction of the computational complexity of 3WLGNN, the best performing reference baseline [24,53].
SR Similarly to Bodnar et al. [8] and [10], we consider Strongly Regular graphs within the same family as hard examples of non-isomorphic graphs we seek to distinguish. Any pair of graphs within the same family cannot provably be distinguished by 3-WL test [8,10]. We reproduce the same experimental setting of Bodnar et al. [8]. In particular, we consider 9 distinct SR families 3 and run our model untrained on the cell complex lifting of each graph, with k = 4, 5, 6. 0-cells (nodes) are initialised with a constant unitary signal, while 1and 2-cells are initialised with the sum of the contained 0-cells. We additionally run an MLP baseline with sum readout to appreciate the contribution of message passing. We report the percentage of non-distinguished pairs in Figure 7b. Contrary to 3-WL, both CIN and the MLP baseline are able to distinguish many pairs across all families, with better performance attained for larger k. For k = 6, we observed CIN to disambiguate all pairs in all families (0.0% failure rate). Despite the strong results achieved by the baseline, we found CIN to always distinguish a larger number of non-isomorphic pairs for the same values of k, this confirming the importance of cellular message passing.
RingTransfer In order to empirically validate the ability of CIN to capture long-range node dependencies, we additionally design a third synthetic benchmark dubbed as 'RingTransfer'. Graphs in this dataset are chordless cycles (rings) of size k. In each graph we mark two special nodes as target and source, always placed at distance k 2 . The task is for target to output the one-hot encoded label assigned to source. All other nodes in the ring are assigned a unitary constant feature vector. A model has to learn to transfer the information contained in source to the opposite side of the ring, where target resides. We initialise 1and 2-dimensional cells with a null signal. In Figure 7a we show the performance of a 3-layer CIN as a function of the ring size k, along with that of GIN [74] baselines equipped with k 2 stacked layers. We observe that our model learns to solve the task with only 3 computational steps, independent of k. As for GIN, we observed degradation in the performance for k ≥ 24, up to complete failure. We hypothesise this to be due to the difficulties of training such a deep GNN (≥ 12 layers). We further verify the (theoretically expected) failure of GIN (not included) when endowed with less than k 2 layers.

Real-World Graph Benchmarks
TUD We test our model on 8 TUDataset benchmarks [56] with small and medium sizes from biology (PROTEINS [9,23]), chemistry (i.e. molecules -MUTAG [45,61], PTC, NCI1 and NCI109 [70]) to social networks (IMDB-B, IMDB-M, RDT-B). We consider induced cycle of size up to k = 6 for our graph lifting procedure. We initialise node (and 0-cell) features as described in Xu et al. [74], and higher dimensional cells by averaging or summing the features of the included 0-cells. The training setting and evaluation procedure follow those in Xu et al. [74]. We report the results in Table 2. CIN compares more than favourably with the baselines, displaying strong empirical performance on all benchmarks. The mean accuracy of CIN ranks top on four out of eight datasets.  On the remaining datasets, CIN achieves the second place. We observe that the best results are on datasets from the biological and chemical domains, where rings play a relevant role.
ZINC We study the effectiveness of cellular message passing on larger scale molecular benchmarks from the ZINC database [68]. ZINC (12k graphs) and ZINC-FULL (250k graphs) [24, 33, 43, 75] are two graph regression task datasets for drug constrained solubility prediction. In these experiments, we consider rings up to size k = 18. We follow the training and evaluation procedures in [24]. Our experiments encompass different scenarios, examine the impact of ablating edge features and of constraining the parameter budget of the architecture to 100k. All results are illustrated in Table 3 where we also include the results for ZINC-FULL obtained by the same exact architectures. Our model exhibits particularly strong performance on these benchmarks: it attains state-of-the-art results on both the two dataset variants, outperforming other models by a significant margin. CIN attains strong results even when constrained by the parameter budget. It still achieves state-of-the-art performance on ZINC and is on-par with the best unconstrained baseline under edge-feature ablation.

Mol-HIV
We additionally test our model on the molecular ogbg-molhiv dataset from the Open Graph Benchmark [40] (41k graphs). The task is to predict the capacity of compounds to inhibit HIV replication. Rings of size up to k = 6 are considered as 2-cells. We take the architecture in [27] as reference and replicate the same hyperparameter setting in our model, including the use of only 2 message passing layers. We report the mean of test ROC-AUC metrics at the epoch of best validation performance for 10 random weight initialisations. Similarly to ZINC, we experiment with a "small" model whose number of parameters is constrained in the order of 100k.

Related Work, Discussion and Conclusion
Cell complex models Recent works have proposed the generalisation of GNNs to simplicial complexes [13,25,32,35]. All these simplicial methods are subsumed by the model in Bodnar et al. [8], which CWNs in turn subsume. To the best of our knowledge, Hajij et al.
[34] is the only other example of message passing on cell complexes, but this work does not study the expressive power of the proposed scheme, neither it experimentally validates its performance. In contrast, our work comprehensively characterises the expressiveness of cellular message passing, and introduces a theoretically grounded and empirically effective framework to apply it on graph structured data in a way to address several limitations of standard Graph Neural Networks.
Molecular substructures A few other works have extended GNNs to account for molecular substructures. Junction Trees (JT), which conveniently represent singletons, bonds and rings as supernodes in a tree, have been used in molecular graph generation [43,44]. JTs are also used in the recent work of Fey et al. [27], who employs them to design a hierarchical message passing scheme based on the tree structure. However, this hierarchy has a different configuration than the one cell complexes provide. Information about cycles is also used in GSNs [10] to augment the node features, but the model retains the usual message passing procedure of GNNs. These last two models are of particular relevance to the present work, since they utilise information about chemical rings. It is important to remark that CWNs compare favourably with both of them in all our benchmarks.
Higher-order GNNs A related line of work has studied lifting graphs into k-dimensional tensor representations that can be processed by provably expressive k-GNNs [4,52,53]. With higher values of k, these models achieve higher-expressivity, but due to the computational complexity this incurs, values of k ≥ 3 are of little use in practice. Therefore, unlike CWNs, these models cannot explicitly represent in practice chemical rings of common sizes (e.g. five or six). Furthermore, by being upper-bounded by 3-WL, the 2-GNN models cannot count the number of induced cycles of size greater than four (see Appendix A for details). In contrast, CWNs can easily count these important chemical substructures through the readout operation it performs on the 2-cells.
Limitations The main limitations of the model are of computational nature. While the computational complexity of the message passing procedure and its preprocessing step is suitable for molecular and geometric graphs, the number of rings (and more generally simple cycles) in general graphs can be exponential in the number of nodes. In that case, one has to resort to smaller 2-cells like triangles, which can be found efficiently in general graphs. Moreover, one has to typically use weights specific for each dimension of the cell complex, increasing the number of parameters compared to GNNs. However, we have shown that our model can compensate this increase with a reduced number of layers and still achieve state-of-the-art results on some of the molecular benchmarks.
From a theoretical point of view, this work is concerned only with regular cell complexes. Adopting this restriction is useful from multiple perspectives: regular cell complexes are easier to analyse, their combinatorial structure completely describes their topology and convolutions can be defined on them through the Sheaf Laplacian (see Appendix D). Nonetheless, some of our theoretical results could be extended to non-regular complexes, which could be obtained by lifting transformations not studied in this work, such as attaching 2-cells to paths in the graph. We leave addressing non-regular complexes and their trade-offs to future developments of this work.
Societal Impacts Most of our paper is theoretical in nature and we do not see immediate direct negative societal impacts. Within the scope of social network applications, we do not yet have sufficient evidence of performance improvement on related benchmarks to justify obvious adoption in such a domain. In contrast, the empirical performance on molecular benchmarks suggests it may have a positive impact on applications of immediate interest in pharmaceutics, such as drug discovery [30].
Conclusion We have proposed a provably powerful message passing procedure on cell complexes motivated by a novel colour refinement algorithm to test their isomorphism. This allows us to consider flexible lifting operations on graphs to implement more expressive architectures which benefit from decoupling the computational and input graphs. Our methods show excellent performance on diverse synthetic and real-world molecular benchmarks.

A.1 Cellular WL Results
In this section, we assume basic familiarity with the WL test and its higher-order variants. For an introduction to these topics, we refer the reader to the survey of Sato [62]. We begin by introducing a few useful concepts. Definition 20. A cellular colouring is a map c that maps a cell complex X and one of its cells σ to a colour from a fixed colour palette. We denote this colour by c X σ . Definition 21. Let X, Y be two regular cell complexes and c a cellular colouring. We say that X, Y are c-similar, denoted by c X = c Y , if the number of cells in X coloured with a given colour equals the number of cells in Y with the same colour. Otherwise, we have c X = c Y .
We emphasise that in this paper we are interested only in colourings c with the property that any two isomorphic cell complexes are c-similar. Definition 22. A cellular colouring c refines a cellular colouring d, denoted by c d, if for all cell complexes X and Y and all σ ∈ P X and τ ∈ P Y , c Additionally, if d c, we say the two colourings are equivalent and we represent it by c ≡ d.
We state the following result from Bodnar et al. [8] about simplicial colourings, which we translate here directly to cell complexes. The proof is however, identical, and we refer the reader to their work for that. Proposition 23. Let X, Y be any regular cellular complexes with A ⊆ P X and B ⊆ P Y . Consider two cellular colourings c, d such that c d.
This last result implies that if c refines d, then c can distinguish all the non-isomorphic cell complexes that d can distinguish. We say that the colouring c is at least as powerful as the colouring d.
In contrast to simplicial complexes, cell complexes have a more flexible structure. The main complication compared to the proofs in Bodnar et al. [8] is that cells can have a variable number of lower-dimensional cells on their boundary. It is therefore useful in many proofs, to separate the cells into buckets containing cells with the same boundary size. The following result helps us do that. Proposition 25. Let c t be the CWL colouring at iteration t. For all cells σ, τ in any cell complexes X and Y , if |B(σ)| = |B(τ )|, then for any t > 0 we have c t σ = c t τ .
Proof. If σ and τ have boundaries of different sizes, then c 1 B (σ) = c 1 B (τ ), which immediately implies c t σ = c t τ for all t > 0.
Next, we show that one can drop the co-boundary adjacencies without sacrificing expressive power.
Proof. Let a t denote the colouring produced by CWL using the general version and b t the colouring produced using the restricted version at iteration t. It can be verified that a t b t because it considers the additional c t B (σ) colours in the refinement rule. We now prove b t+1 a t by induction. Note that to take advantage of Proposition 25, we shift the time-step by one (i.e. we use b t+1 as opposed to b t ).
The base case holds since a 0 assigns the same colour to all the cells. Suppose b t+2 σ = b t+2 τ for any two cells σ and τ from any cell complexes X and Y , respectively. Then we know that b t+1 The goal is to show that this also implies that b t+1 By Proposition 25, cells with different boundary sizes have different colours. Therefore, we can partition these two multi-sets by the size of the cell boundaries, while preserving the equality between these sub-multisets. Therefore, for each n ∈ N: and |B(δ τ )| = n}}. Let γ be an arbitrary cell. Then for each cell δ γ ∈ C(γ), γ exchanges messages with all the other boundary cells of δ γ . Therefore, the colour of each δ γ with |B(δ γ )| = n shows up with a multiplicity of n − 1 in the tuples of b t+1 ↑ (γ). Eliminating n − 2 of these repeated colours for all δ σ and δ τ : {{b t+1 δσ | δ σ ∈ C(σ) and |B(δ σ )| = n}} = {{b t+1 δτ | δ τ ∈ C(τ ) and |B(δ τ )| = n}}. Merging these in a single multi-set gives the colours of the co-boundary cells: The following theorem shows that we can further prune the CWL update rule by removing the colours associated with the lower adjacencies. The structure of the proof is similar to the one in Bodnar et al. [8], with the main difference being in the proof of Proposition 27.
Proof of Theorem 7. Let b t denote the colouring of CWL using and a t the colouring of CWL using the rule HASH a t σ , a t B (σ), a t ↓ (σ), a t ↑ (σ) from Lemma 26. Trivially a t b t because of the additional argument c t ↓ (σ) in the update rule. We prove b 2t+1 a t by induction. As before, the addition by one in 2t + 1 is to allow us to apply Proposition 25 in the induction step. The multiplication by 2 is due to the fact that the information transmitted through the lower adjacencies in one step is propagated in two steps through the boundary adjacencies. For all cell complexes X and all cells δ in P X , consider the collection of multi-sets A X indexed by δ: We are interested in the size of these multi-sets for some specific cells δ. To that end, for each cell γ ∈ P X , we define the multi-set: We know that C X (σ) = C Y (τ ) since the sum of the elements of C X (σ), which gives the number of tuples (C 0 , C 1 ) in b 2t+1 ↓ (σ), is greater than the sum of the elements of C Y (τ ), which gives the number of tuples (C 0 , C 1 ) in b 2t+1 ↓ (τ ). We prove this contradicts our hypothesis that b 2t+3 Proposition 27. For all regular cell complexes X, Y and all σ ∈ P X , τ ∈ P Y , if C X (σ) = C Y (τ ), Proof. Given a cell complex X and a cell δ ∈ P X , consider the cellular colouring c X δ = |A X (δ)|. The idea of the proof is to show that b 2t+2 c, which allows us to use Proposition 23 for the multi-sets C X (σ) and C Y (τ ).
Let δ 1 , δ 2 be two arbitrary cells from any regular cell complexes X, Y such that c X δ1 = c Y δ2 . Assume without loss of generality that |A X (δ 1 )| > |A Y (δ 2 )|. Two cases can be distinguished for this inequality. In the first case, b 2t+1 δ2 = C 1 , which implies |A X (δ 1 )| > |A Y (δ 2 )| = 0 and, therefore, b 2t+1 Figure 8: (Left) A pair of non-isomorphic graphs indistinguishable by WL, but distinguishable by CWL with a clique complex, ring or cycle-based lifting. (Right) A pair of non-isomorphic molecular graphs (Decalin and Bicyclopentyl) indistinguishable by WL but distinguishable by CWL with a ring-based or cycle-based lifting. The node colours show the stable colouring reached by WL.
In the second case, b 2t+1 δ2 = C 1 , which implies |A X (δ 1 )| > |A Y (δ 2 )| ≥ 0 and b 2t+1 δ1 = C 1 . Then, the difference in the size of the multi-sets is made by the number of times C 0 shows up in A X (δ 1 ) and A Y (δ 2 ), respectively. By Proposition 25, all k-cells γ with k > 0 and b 2t+1 γ = C 0 must have a fixed boundary size |B(γ)| = n. Because each cell δ ∈ B(γ) is upper adjacent with every other cell in B(γ), b 2t+1 γ appears n − 1 times in the tuples inside b 2t+1 ↑ (δ). Additionally, note that since the cell complex is regular, self-loops are not allowed and, therefore, n > 1.
Applying this to δ 1 and δ 2 , C 0 shows up |A X (δ 1 )|×(n−1) times in b 2t+1 The results obtained for the two cases prove b 2t+2 c.
Applying Proposition 23 for the multi-sets C X (σ) and C Y (τ ), we obtain two non-equal multi-sets: Since these two multi-sets are used in the colour updating rule, b 2t+3 := c G,t v ) at the same time step t.
Because f (G) (1) and G are isomorphic as graphs and WL is invariant under isomorphism, a f (G) (1) ,t = c G,t . It follows that for all graphs G 1 , G 2 ∈ G, if c G1,t = c G2,t then a f (G1) (1) ,t = f (G2) (1) ,t . Let b t be the CWL colouring of the 0-cells at iteration t. The goal is to show that for all regular cell complexes X, Y ∈ f (G), b t a t . By transitivity and combined with Corollary 24, it follows that if The base case trivially holds. Let σ, τ be two 0-cells in X ∈ f (G) and Y ∈ f (G), respectively such that b t+1 (σ) = b t+1 (τ ). Since 0-cells have only upper adjacencies, the equality implies that b t σ = b t τ and b t ↑ (σ) = b t ↑ (τ ). The latter multi-set equality further implies Equivalently, for 0-cells of a cell complex whose 1-skeleton is a graph (i.e. not a multi-graph), this can be rewritten as {{b t δσ | δ σ ∈ N ↑ (σ)}} = {{b t δτ | δ τ ∈ N ↑ (τ )}}. By the induction hypothesis we have a t σ = a t τ and {{a t δσ | δ σ ∈ N ↑ (σ)}} = {{a t δτ | δ τ ∈ N ↑ (τ )}}.
These equalities imply a t+1 (σ) = a t+1 (τ ). Proof of Corollary 15. Due to Theorem 13, it is sufficient to find some examples of non-isomorphic graph pairs that WL cannot distinguish, but CWL can with the given lifting transformations. Figure 8 includes such examples. Based on Proposition 25, CWL can distinguish these graphs since it can count the number of substructures (e.g. triangles, rings, cycles) that the lifting is based on.
The next proposition shows that CWL can identify cells that are n-simplices. Proposition 28 (Simplex Identification). Let X, Y be regular cell complexes and σ ∈ P X , τ ∈ P Y two cells. Denote by c t the CWL colouring at iteration t. Suppose σ is an n-simplex and τ is not. Then c t (σ) = c t (τ ) for all t ≥ n + 1.
Proof. The base case holds since c 1 σ = c 1 τ if σ is a vertex and τ is a cell of another dimension. This is because σ has no boundary adjacencies, while τ does.
Suppose the statement holds for n-simplices. Then, an (n + 1)-simplex can be identified by having n + 2 n-simplices on its boundary. By Proposition 25, the colour of σ encodes the boundary size. Furthermore, by the induction hypothesis c n+1 B (σ) encodes the fact that the boundary cells are n-simplices.
Proof of Theorem 16. The sub-results of the theorem can be proven by finding pairs of graphs from the same family of Strongly Regular Graphs that can be distinguished by CWL with the corresponding lifting transformations. Graphs in this family are provably indistinguishable by the higher-order 3-WL test [8].
Ring-based lifting We can show that there is a pair of SR graphs in the same family with a different number of induced cycles of a certain size. We include such an example in Figure 9. The two graphs differ in the number of 4-, 5-, 6and 8-rings (see Table 4), which indirectly proves 3-WL cannot count induced cycles of these sizes. It is also natural to conjecture that 3-WL cannot count induced cycles of size strictly larger than 3. In contrast, CWL(4-IC) is sufficient to distinguish these two graphs.
Clique complex lifting We can leverage on the same example: the graph on the right does not possess 4-cliques, contrary to the graph on the left (one such example is marked in blue). This proves that 3-WL cannot count cliques of size 4. As shown by Bodnar et al. [8], this result immediately implies that SWL (and consequently CWL) with a clique complex lifting is not less powerful than 3-WL.
Cycle-based lifting To prove the result for this lifting transformation we leverage on a result by Arvind et al. [2], who show that 2-Folklore WL (which is equivalent to 3-WL [62]) cannot count subgraph cycles of size strictly larger than 7. Table 4 illustrates this for the same example as above. Since CWL can count the number of 8-cycles when the lifting transformation k-C with k ≥ 8 is used (see Proposition 25), this proves the result.
We note that while the proof above is purely based on substructure counts, the superior expressive power of CWL is very likely not limited to counting the substructures involved in the lifting transformation. We have seen evidence in favour of this claim in the SR experiment in Section 5, where message passing layers reduced the failure rate.
Next, we prove a statement comparing Simplicial WL and CWL. This will later be used to show that CWNs are strictly more powerful than MPSNs when a lifting transformation based on the clique complex and rings is used. Definition 29. A subset L of a cell complex X is called a subcomplex if it is a union of cells of X containing the closures of these cells.
Theorem 30. Let f : G → X be a skeleton-preserving transformation such that for any graph G, the clique complex of G is a subcomplex of f (G). Then CWL(f ) is at least as powerful as SWL using the clique complex lifting at distinguishing non-isomorphic graphs.
Proof. Let c t be the simplicial colouring performed by SWL. We can extend it into a cellular colouring a t defined as follows: where L is the maximal simplicial complex that is a subcomplex of X and is a special colour assigned to the cells that are not simplices. Let h : G → X be the clique-complex lifting map. Then, it is easy to see that for all graphs G 1 , G 2 ∈ G, if c h(G1),t = c h(G2),t , then a f (G1),t = a f (G2),t . Let b t be the CWL colouring map at iteration t. We aim to show that b t+n+1 a t by using Proposition 28. Then, by transitivity and using Corollary 23, if c h(G1),t = c h(G2),t , then b f (G1),t+n+1 = b f (G2),t+n+1 .
Let n be the maximum dimension of the cells used by the lifting transformation f . As usual, the base case holds at initialisation since a 0 assigns the same colour to all the cells. Let σ, τ be two cells from the regular cell complexes X, Y ∈ f (G). When σ and τ are not simplices, then a t σ = a t τ = . Suppose σ and τ are both simplices and b t+n+2 . Since σ and τ are simplices, their boundary cells are also lower-dimensional simplices, so by induction hypothesis, a t B (σ) = a t B (τ ). Let us consider the equality between the colours involving the upper adjacent cells. By expanding the definition we have: Generally, not all of these adjacencies involve simplices. For instance, a 2-simplex could incident to a general 3-cell. However, by Proposition 28 this equality must still hold if we restrict the multi-sets to the colour of those cells that are simplices: ) | δ 1 ∈ N ↑ (σ), δ 2 ∈ C(σ, δ 1 ), and δ 1 , δ 2 are simplices}} ) | δ 1 ∈ N ↑ (τ ), δ 2 ∈ C(τ, δ 1 ), and δ 1 , δ 2 are simplices}}.
Proof. The second pair of graphs from Figure 8 cannot be distinguished by SWL(k 1 -CL) because it has no cliques greater than two, but it can be distinguished by CWL with the liftings above because of the different number of (induced) cycles.

A.2 CW Network Proof
Proof of Theorem 18. Let c t denote the colouring of CWL at iteration t and h t the colouring (i.e. features) produced by a CW-Network as described in Section 4. Without loss of generality (Theorem 7), we use only boundary and upper adjacencies for both methods.
To show CWNs are at most as powerful as CWL, we must show c t h t . Again, we show this by induction. For a CWN with L layers we assume h t = h L for all t > L. Let σ, τ be two cells with Otherwise, h t+1 is given by Equation 1 involving the update function U , the aggregate function AGG and the message functions M B , M ↑ . Given that the inputs passed to these functions are equal for σ and τ , h t+1 σ = h t+1 τ . We now prove that CWNs can be as powerful as CWL. Suppose the aggregation from Equation 1 is injective and the model is equipped with a number of layers L sufficient to guarantee the convergence of the colouring. Then, we show that h t c t . Let σ, τ be two cells with h t+1 The consequence of this result is that CWNs inherit all the properties of CWL. We summarise these in the following Corollary. Corollary 32. CWNs have the following properties: 1. They are at least as powerful as the WL test when using skeleton-preserving lifting transformations.
2. They are strictly more powerful than the WL test when using the lifting maps from Corollary 15.
3. They are not less powerful than 3-WL when using the lifting transformations from Theorem 16. 4. They are at least as powerful as MPSNs using the clique complex lifting [8] when using a lifting transformation whose output complexes have the clique complex as a subcomplex.
5. They are strictly more powerful than MPSNs when using a transformation attaching cells to cliques and rings/cycles. In particular, CWNs using rings are strictly more powerful than MPSNs using a lifting based on triangles (i.e. 2-simplices), since triangles are rings of size 3.
The latter point regarding triangles is important because Bodnar et al. [8] do not use simplices of dimension higher than two in practice.

A.3 Equations for Other Adjacencies
For completeness, we include in this section the equations for the co-boundary and lower adjacent messages.
Together with the adjacencies described in the main text, the update rule takes the form As mentioned before, even though these adjacencies are redundant from a colour refinement perspective when the others are used, they might still be employed in other combinations that preserve the expressive power of the test. Additionally, for certain applications, they might still encode important inductive biases.

B Computational Analysis
Let X be a d-dimensional regular cell complex. For an arbitrary p-cell σ with boundary size k, the number of ↑-messages between the (p − 1)-cells on its boundary is 2 * k 2 and the number of B-messages it receives is k. Let B p be the maximum boundary size of a p-cell in X and S p the number of p-cells. The computational complexity of our message passing scheme is thus O d p=1 B p S p + 2 * Bp 2 S p . For instance, consider the skeleton-preserving lifting based on induced cycles. There, the dimension of the complex is d = 2 and we have B 0 = 0, B 1 = 2, and B 2 equals the size of the maximum induced cycle considered. For all practical purposes, we can consider d and B p as fixed constants. Then the complexity can be rewritten as Θ d p=1 S p . This is optimal because the complexity is linear in the size of the cell complex and a linear time is required to read the cell complex.  In practice, we observed the empirical training runtimes to be contained, even on the largest benchmarks. We performed timing analyses on ZINC and ZINC-FULL, measuring the time required to complete one training epoch and a full performance evaluation on train, validation and test sets. We report the runtimes in Tables 5 and 6 the runtimes measured for our best performing CIN and CIN-small models and by GIN baselines with, approximately, the same number of parameters. We observe that the evaluation runtimes are relatively comparable to those of GIN models and that the difference decreases significantly at inference time (i.e. no backprop). The training runtimes are significantly reduced on CIN-small architectures, which always perform on-par or even better than state-of-the-art baselines, regardless of the imposed parameter budget (see Table 3). These experiments where run over an NVIDIA ® Tesla V100 GPU device on an Amazon Web Services (AWS) Elastic Cloud (EC) 2 p3.16xlarge instance.
Other than the computational complexity of message passing we need to consider the (one-off) complexity pertaining the graph lifting procedures. Lifting procedures that are more likely to find immediate practical applications involve clique, cycle and induced cycle listing. For cliques, we refer readers to Bodnar et al. [8], where the authors report theoretical results regarding clique-listing complexity and the practical impact of employing specialised topological data analysis libraries.
As for cycle-based liftings, specialised cycle-listing algorithms exist. The algorithm in Birmelé et al. [7] is able to list all simple cycles in a graph in O(m + c∈C(G) |c|), where m is the number of edges, C(G) is the set of simple cycles in graph G and |c| is the size of the cycle. As for induced cycles, the algorithm presented in Ferreira et al.
[26] has a listing time ofÕ(m + nC), with n and C being the number of nodes and induced cycles, respectively. In certain types of graphs, a better complexity can be obtained. In the case of planar graphs, Chiba and Nishizeki [16] show linear time complexity to list triangles and quadratic complexity for 4-rings. This is very important because almost all molecules are planar in a graph-theoretic sense [66] as a direct consequence of the chemical implications of Kuratowski's theorem [49]. However, we are not aware of any improved bounds for finding general induced cycles in planar graphs. Finally, we remind the reader that molecular rings can also be listed from the junction tree representation [27,43], obtained by specialised molecular libraries such as RDKit [50]. In our experiments, we implemented a lifting procedure based on the generic substructure matching algorithm exposed by the graph-tool Python library, which internally employs VF2 [19] to perform subgraph isomorphism. Noticing that the lifting procedure is embarrassingly parallel w.r.t. the independent graphs in a dataset, we easily parallelised the procedure via Python's Joblib library. On molecular benchmarks we observed the effective time required by preprocessing routines to always be modest compared to the training times. In Table 7 we report the wall clock runtimes, averaged over 5 runs, to lift all the graphs in the largest datasets amongst our benchmarks: ZINC, Mol-HIV and ZINC-FULL. The analysis has been conducted considering rings up to size 18 and by varying the number of parallel processing jobs on a server with an Intel ® Xeon E5-2686 v4 processor with 64 vCPUs. It is possible to observe that the empirical lifting runtime scales linearly with the number of jobs in the range [1,16], and that such a simple parallelisation scheme dramatically reduces the preprocessing time on all datasets. When employing 32 parallel jobs, less than 19 seconds are required to preproceess the whole ZINC dataset, only 1 minute is required for Mol-HIV, and we needed slightly more than 6 minutes to lift all the 250k graphs in ZINC-FULL. We remark once more that these experiments have been conducted with a generic subgraph matching algorithm, and that even more parsimonious computation would be possible by using optimised ring-listing routines.

C Symmetries
In line with a recent effort in Geometric Deep Learning to understand different models through the lens of symmetry [12], we aim here to give a description of the underlying equivariance properties of CW Networks.
First, let us define the following matrix representation of the boundary relation from Definition 3. Definition 33. Let X be a regular cell complex with S k denoting the number of cells in dimension k.
The k-th unsigned boundary matrix B k ∈ R S k−1 ×S k of X is given by B k (i, j) = 1 if σ i ≺ σ j and 0, otherwise.
Let X be a regular cell complex of dimension n with boundary matrices B = (B 1 , . . . , B n ) and feature matrices X = (X 0 , X 1 , . . . , X n ) for the cells of different dimensions. Additionally, consider a sequence of permutation matrices P = (P 0 , . . . , P n ). Denote by PX = (P 0 X 0 , . . . , P n X n ) and PBP T = (P 0 B 1 P T 1 , . . . , P n−1 B n P T n ). Definition 34. A function f mapping (X, B) → X = (X 0 , . . . , X n ) with the property that Pf (X, B) = f (PX, PBP T ) for any P is called cell permutation equivariant.
Proof of Theorem 19. Definition 34 is similar to the (simplex) permutation equivariance definition from Bodnar et al. [8], with the subtle difference that the boundary matrices now have a more flexible structure in the case of cell complexes. The high-level idea is to see that all the adjacency matrices used by CWNs (i.e. B k , B k+1 , B k B k , B k+1 B k+1 ) are permuted accordingly by the permutation matrices in P. Therefore, CWNs layers computes the same function up to a permutation of the cells. The proof follows a similar logic to to the one in Bodnar et al. [8] for simplicial networks, and we refer the reader to their work for a detailed proof.
It is common in algebraic topology and differential geometry to equip the incidence relation σ ≺ τ with additional structure that makes it a signed incidence relation. Definition 35 (Hansen and Ghrist [36]). A signed incidence relation on P X is a map [· : ·] : P X × P X → {0, ±1} with the properties: 1. If [σ : τ ] = 0, then σ ≺ τ .

For any
This signed incidence relation can be be encoded by the signed incidence (boundary) matrices of X. We define these below: Definition 36. Let X be a regular cell complex with a signed incidence relation [· : ·]. Let S k denote the number of cells in dimension k. The k-th signed boundary matrix The difference with respect to the unsigned boundary matrices is that the non-zero values of the matrix can be ±1, not just 1. This can be used to define a notion of orientation equivariance for CW Networks. This ensures that when changing the orientation of the cell complex X (i.e. changing [· : ·]) one computes the same function up to that change in orientation.
Let X be a regular cell complex of dimension n described by the signed boundary matrices B = (B 1 , . . . , B n ) and feature matrices X = (X 0 , X 1 , . . . , X n ) for the cells of different dimensions. Additionally, consider a sequence of diagonal matrices T = (T 0 , . . . , T n ) with values in ±1. Additionally, let T 0 = I. Denote by TX = (T 0 X 0 , . . . , T n X n ) and TBT = (T 0 B 1 T 1 , . . . , T n−1 B n T n ). Definition 37. A function f mapping (X, B) → X = (X 0 , . . . , X n ) with the property that Tf (X, B) = f (TX, TBT) for any T is called orientation equivariant.
Making CWNs orientation equivariant requires imposing additional constraints on the layers of the model. This proceeds similarly to MPSNs [8]. Since applications involving oriented simplicial complexes are out of the scope of this work, we refer the reader to Bodnar et al. [8] for an intuition of how this can be extended to cell complexes.

D Sheaves, Laplacians and Convolutions
It is useful on cell complexes to derive a Laplacian operator based on cellular sheaves [36], since many interesting Laplacians, such as the (normalised) graph Laplacian [17], the Hodge Laplacian [63] and the connection Laplacian [67] can be obtained as particular cases. Intuitively, a cellular sheaf is a construction that assigns a vector space to each cell in the complex and a (linear) map for each face relation in the complex σ ≤ τ . Additionally, these linear maps must satisfy some compositionality constraints imposed by the structure of P X .

D.1 Sheaf Laplacian
Definition 38. Let (X, P X ) be a regular cell complex, and denote by Hilb K the class of Hilbert spaces over a field K. A weighted cellular sheaf F is given by the assignment together with a bounded linear map F σ≤τ : F(σ) → F(τ ) for any σ ≤ τ .
Given Hilbert spaces V and W and a bounded linear map T : V → W , the adjoint of T is the unique bounded linear map T : W → V satisfying that for all v ∈ V and all w ∈ W : . be a chain complex of Hilbert spaces. The Hodge Laplacian is the graded linear map defined in degree k as ∆ k : . is the complex of cochains of a weighted cellular sheaf F, the Hodge Laplacian is called the sheaf Laplacian of X.
In particular, the Hodge Laplacian of a cell complex can be obtained by considering the constant weighted cellular sheaf with a standard inner product. That is the cellular sheaf where F(σ) = R and the restriction maps F σ≤τ = id. A normalised version of it can also be obtained by carefully adjusting the inner products associated with each F(σ). This normalisation is always possible for finite cell complexes (see Hansen and Ghrist [36] for details). This is very useful because finding normalised versions of Hodge Laplacians is not trivial and even on simplicial complexes [63], the process of constructing one can be quite involved.

D.2 Convolutional Operators
One can use the general sheaf Laplacian to define linear, local diffusion operators which, in the GNN literature, are broadly addressed as 'convolutional'. Diffusion operators built from the standard graph Laplacian have been employed in several graph neural network architectures [22,47]. Recent works [13,25] have introduced convolutional operators on SCs by employing the Hodge Laplacian [63], interpreted as a generalisation of the graph Laplacian. As for cell complexes, here we focus, for simplicity, on the case of a constant sheaf with a standard inner product in R n . Then, the matrix representations of δ k and (δ k ) * are the signed incidence matrices B T k and B k , respectively. Therefore, the Hodge Laplacian can be written in matrix form as . A convenient way to define a convolutional operator on cochains is by designing a learnable filter parameterised as a polynomial of the Hodge Laplacian. This approach has been already adopted on graphs using the standard graph Laplacian [22] or more general sheaf Laplacians [37], and also on simplicial complexes [25]. The advantage of this approach is that of retaining a connection with spectral constructions [22, 25] while not requiring any explicit diagonalisation of the operator itself. A polynomial convolutional filter of this kind, when applied to the p-cells of a d-cell complex, would take the form where H t is a matrix gathering p-cell representations at layer t, W t+1 r are learnable parameters, and ψ summarises the application of a bias term and a non-linearity.
Proof of Theorem 19. While the structure of the boundary matrices is more flexible in a cell complex than in a simplicial complex, algebraically, the proof is very similar to the proof showing MPSNs generalise simplicial convolutions in Bodnar et al. [8]. We offer here a high-level view of the proof and refer the reader to Appendix C of their paper for a detailed version.
For a generic p-cell σ, and r > 0, the application of the r-power of the Hodge Laplacian effectively induces an information flow from a generalised notion of r-upper and r-lower adjacent p-cells, i.e. p-cells τ such that there exists a sequence of upper-(respectively, lower-) adjacent p-cells [γ 0 , γ 1 , . . . , γ r ] such that γ 0 = σ, γ r = τ . Therefore, the convolution described above is easily interpreted in terms of a cellular message passing scheme which only exchanges ↑and ↓-messages. Intuitively, the upper-and lower-message functions would share their parameters W t+1 r and compute messages by linearly projecting the representations of upper-and lower-adjacent cells (ignoring any information in shared (co)boudaries). Such messages would then be aggregated by summation into an overall message, taken as input by an update function parameterised by ψ and W t+1 0 . A formal derivation of how the equation (3) is rewritten in terms of cellular message passing would closely follow the one provided in Bodnar et al. [8] for SCs, and we therefore refer readers to Section C of such work.
Normalised versions of the aforementioned Hodge Laplacian can be used to design a model in the spirit of the popular Graph Convolutional Network of Kipf and Welling [47]. To this aim, one could resort to normalised sheaves as suggested in [36]. Additionally, one could explicitly make use of the (co)boundary operators defined in Section C to let information flow from lower-and higherdimensional cells contained in cell (co)boundaries, effectively extending the Simplicial Convolutional Networks recently introduced in Bunch et al. [13]. We defer these research directions to future developments of this work.

E.1 Used Code Assets
The model has been implemented in PyTorch

E.2 Used Computer Resources
All experiments were run on NVIDIA ® GPUs. Experiments on SR, Mol-HIV and molecular TUDatasets were run on Tesla V100 GPUs with 5,120 CUDA cores and 16GB GPU memory on a p3.16xlarge Amazon Web Services (AWS) Elastic Cloud (EC) 2 instance. Experiments on the social TUDatasets were run on the same GPU devices but with 32GB HBM2 memory mounted on an HPC cluster. All remaining experiments, that is CSL, RingTransfer and ZINC, were run on a machine with TITAN Xp GPUs with 12GB GPU memory and an Intel ® Xeon ® CPU E5-2630 v4 @ 2.20GHz CPU.

E.3 Model
In all cases, we apply our model to the 2-dimensional cell complexes obtained by ring-lifting the original graphs, i.e. we consider nodes and edges as 0and 1-cells, and each induced cycle of size up to k as a 2-cell. 0-cell are always endowed with the original node features or learnt node embeddings, if the benchmark prescribes so. The way higher dimensional cells are assigned features depend on the specific benchmark.
Throughout all experiments, we employ cellular message passing layers which update the representation of p-cell σ as follows: Here, indicates concatenation, MLP t B,p , MLP t ↑,p are 2-Layer Perceptrons and MLP t U,p , MLP t M,p consist of a dense layer followed by a non-linearity. We neglect messages from cofaces and downadjacent cells consistently with Theorem 7. We name an architecture which stacks L layers of this form as 'Cell Isomorphism Network' (CIN). Readout operations are performed as follows. First, for p ∈ 0, 1, 2, we compute the joint representation h p of the cells at dimension p by applying a mean or sum readout operation. Then, for complex K, we compute an overall representation h K = p=0,1,2 MLP R,p h p , where each MLP R,p is parameterised as a single dense layer followed by a non-linearity. Complex-wise predictions are obtained by a final dense layer preceded by dropout. All MLP layers internally apply Batch Normalization [42] and ReLU activations, unless otherwise specified. All training procedures are performed with the Adam optimiser [46].

E.4 Additional experimental details
CSL Each of the 150 4-regular graphs in the CSL dataset comprises N = 48 nodes and is characterized by skip number parameter C ∈ C = {2, 3, 4, 5, 6, 9, 11, 12, 13, 16}. Parameters N and C determine the isomorphism class G N,C of each graph, which we seek to predict. The number of possible classes is |C| = 10. We employ the same stratified dataset folds in Dwivedi et al. [24]. Consistently with the adopted reference procedure, 0-cells share the same learnt embedding, while 1and 2-cells are endowed with the sum of the embeddings of the included 0-cells. As for the optimisation procedure, we set the batch size to 12 and the initial learning rate of 5e-4. which is halved whenever the validation performance does not improve after a patience value of 20. The training is early stopped as soon as it falls below 1e-6, at which step we measure the model test accuracy. The size of hidden layers in our model is set to 160 and we stack 3 cellular message passing layers. In this benchmark, we replace Batch Normalisation with Layer Normalization [5], as the former wsa observed to produce instabilities in the optimisation procedure. At each dimension, cell embeddings are readout via averaging.
SR These experiments are run in double floating point precision and with untrained models. We initialise the cell complexes associated with SR graph by populating 0-cells with constant, scalar, unitary signal, and 1and 2-dimensional cells with the sum of the contained 0-cells. Complexes are embedded in a 16-dimensional space and, coherently with Bodnar et al. [8] and Bouritsas et al. [10], if the L 2 -distance between the embeddings of two complexes is larger than = 0.01, we deem the corresponding graphs to be non-isomorphic. We confirmed the validity of the chosen threshold by numerically verifying that, under the described experimental setting, each SR graph in our datasets is deemed isomorphic w.r.t. a counterpart obtained by randomly permuting its nodes. We run a CIN model with 3 cellular message passing layers, whose hidden layers comprise 16 units. At each dimension, cell embeddings are readout via summation. As the number of induced cycles of a certain size may be enough to tell apart non-isomorphic SR graphs (see Table 4), an MLP with sum readouts represents a strong baseline, which we additionally run. Such a model applies non-linear dense layers at each cell dimension, and then performs readout operations as in CIN. We set the size of hidden layers to 256, while the final complex embeddings are embedded in a 16-dimensional space as in our model. Both approaches are equipped with ELU nonlinearities [18].
RingTransfer This benchmark dataset comprises 5, 000 training graphs. Each graph is randomly associated with one of the 5 independent labels, which are also assigned as node features to source nodes. Labels are unifomly represented. On this benchmark we run a CIN model with 3 stacked message passing layers, independently on the ring size. The hidden size of the layers is set to 64 and we do not apply Batch Normalisation. Differently than in the other benchmarks, we do not need to perform readout operations to compute complex-wise embeddings; instead, we simply take the representation of the 0-cell corresponding to node target at the last layer of the architecture and use it to predict the label of source. GIN models have always k 2 standard message passing layers with hidden size 64. The models are trained with an initial learning rate of 10 −3 , decayed by a factor of 0.5 and a patience of 5 epochs. The training is stopped when the learning rate drops below 10 −5 .
TUD Amongst the datasets from this benchmarking suite: the task in MUTAG is to recognise mutagenic molecular compounds for potentially marketable drug [45,61]; the one in PTC is to recognise the chemical compounds according to carcinogenicity on rodents [39,48]; PROTEINS is about to categorising proteins into enzyme and non-enzyme structures [9,23]; NCI1 and NCI109 deal with identifying chemical compounds against the activity of non-small lung cancer and ovarian cancer cells, respectively [70]; REDDIT-BINARY or RDT-B is a social network dataset where the task is to predict whether a graph belongs to a question-answer-based community or a discussionbased community. On these datasets, we followed the approach in Xu et al. [74], which prescribes to run a 10-fold cross-validation procedure and report the maximum of the average validation accuracy across folds. Consistently with such work, we train our model starting from an initial learning rate which is decayed after a fixed amount of epochs and we apply cell-readout operations on the multiscale representations obtained by a Jumping Knowledge scheme [73] by performing averaging or summation depending on the dataset, still in accordance with Xu et al. [74]. We ran a grid-search to tune batch size, hidden dimension, dropout rate, initial learning rate along with its decay steps and strengths, feature initialisation strategy of higher-dimensional cells (mean vs. sum), inclusion of coboundary features in ↑-messages, number of layers and the dropout position (immediately after readout on cells ("cell read.") or the final readout on the complex ("comp read.")). We report the hyperparameter configurations in Table 8. We finally report that we did not employ Batch Normalization layers in RDT-B since they were observed to produce severe instabilities in the training procedure.
ZINC The ZINC benchmarks dataset have been constructed by the ZINC database provided by the Irwin and Shoichet Laboratories in the Department of Pharmaceutical Chemistry at the University of California, San Francisco (UCSF) [68]. Each graph represents a molecule, with node features indicating the atom type and edge features the type of chemical bond between two atoms. Graph targets correspond to the penalised water-octanol partition coefficient -logP [33]. In these experiments, rings up to size k = 18 are mapped to 2-cells, and are assigned feature values as the sum of the learnable atom embeddings for the included 0-cells (nodes). 1-cells are assigned learnable bond embeddings if edge-features are considered, otherwise we apply the same policy employed for 2-cells. We employ the same predefined training, validation and test splits as in Dwivedi et al. [24], and train our model by minimising the the Mean Absolute Error (MAE) loss on the train targets. As prescribed by the benchmark, the optimisation procedure employs a batch size of 128 and a dynamic learning rate which starts from 10 −3 and is halved whenever the validation loss does not improve after a patience value we set to 20. The training is early stopped as soon as it falls below 10 −5 . We repeat the training with 10 different weight initialisations and report the mean of the test MAEs at the time of early stopping. In accordance with the best performing baselines, our CIN model does not use any dropout, and stacks 4 message passing layers with hidden size 128. In order to enforce the parameter budget we reduce the size of hidden layers to 48 and only perform 2 message passing layers. At each dimension, cell embeddings are readout via summation.
Mol-HIV This dataset comprises 41127 molecular graphs associated with a binary label representing their capacity to inhibit HIV replication. The benchmark provides predefined train, validation and test sets based on the "scaffold splitting" procedure, which separates molecules based on their two-dimensional structural frameworks [40]. As in ZINC, graphs are attributed at the level of nodes and edges, and we directly employ the atom and bond embedding layers provided by the benchmarking platform 6

E.5 Ablation study on ZINC
We end this section by reporting the results of an ablation study we conducted on the ZINC dataset to appreciate the contribution of including rings. In Table 9 we show the average test MAE for two additional CIN models: "CIN No-Rings small" and "CIN No-Rings", which differ from their original counterparts in that they neglect 2-cells when performing message passing. In these experiments we always make use of edge features and use the same hyperparameters as our original CIN model. Table 9: ZINC Ablation with edge features. The ablation shows the benefits of integrating rings into the message passing procedure.