Original: S CALING

Original:  U P G RAPH H OMOMORPHISM F EATURES WITH E FFICIENT D ATA S TRUCTURES
Revised: S CALING U P G RAPH H OMOMORPHISM F EATURES WITH E FFICIENT D ATA S TRUCTURES

Original: Anonymous authors

Original: Paper under double-blind review

Original: A BSTRACT
Revised: A BSTRACT

Original: Typical datasets used in graph classiﬁcation tasks only contain a few thousand graphs which rarely exceed hundreds of nodes.
Revised: Typical datasets used in graph classiﬁcation tasks only contain a few thousand graphs which rarely exceed hundreds of nodes.

Original: Graph homomorphism densities are permutation-invariant features that can be directly computed from graph data, and their approximation scales naturally to large graphs.
Revised: Graph homomorphism densities are permutation-invariant features that can be directly computed from graph data, and their approximation scales naturally to large graphs.

Original: We propose the use of efﬁcient data structures for approximate set membership in the context of a sampling algorithm for graph homomorphism density which enables the use of largescale datasets containing larger graphs.
Revised: We propose the use of efﬁcient data structures for approximate set membership in the context of a sampling algorithm for graph homomorphism density which enables the use of largescale datasets containing larger graphs.

Original: To validate our ﬁndings, we compare this method with existing approaches used for graph homomorphism features in synthetic experiments.
Revised: To validate our ﬁndings, we compare this method with existing approaches used for graph homomorphism features in synthetic experiments

Original:  I NTRODUCTION
Revised:  I NTRODUCTION

Original: In current machine learning research focused on graph classiﬁcation methods, experiments are conducted on a handful of small, well-documented, datasets which most often are graphs representing molecules as studied in biochemistry applications or graphs representing users and their interactions obtained from social network analysis.
Revised: In current machine learning research focused on graph classiﬁcation methods, experiments are conducted on a handful of small, well-documented, datasets which most often are graphs representing molecules as studied in biochemistry applications or graphs representing users and their interactions obtained from social network analysis.

Original: Unlike modern datasets used in mature application domains of machine learning such as computer vision with the ImageNet database (14.2M images, 20K categories)
Revised: Unlike modern datasets used in mature application domains of machine learning such as computer vision with the ImageNet database (14.2M images, 20K categories)

Original: (Deng et al., 2009) or natural language processing with large Wikipedia corpora (40B characters) (Guo et al., 2020), the datasets commonly used in graph classiﬁcation, such as those referenced in the TUDataset collection (Morris et al., 2020), are small.
Revised: (Deng et al., 2009) or natural language processing with large Wikipedia corpora (40B characters) (Guo et al., 2020), the datasets commonly used in graph classiﬁcation, such as those referenced in the TUDataset collection (Morris et al., 2020), are small.

Original: For example, biochemistry datasets such as NCI1, ENZYMES, PROTEINS, D&D (Wale et al., 2008; Borgwardt et al., 2005; Dobson & Doig, 2003) or social network datasets such as COLLAB, REDDIT-BINARY, or 
Revised: For example, biochemistry datasets such as NCI1, ENZYMES, PROTEINS, D&D (Wale et al., 2008; Borgwardt et al., 2005; Dobson & Doig, 2003) or social network datasets such as COLLAB, REDDIT-BINARY, or IMDBBINARY (Yanardag & Vishwanathan, 2015) contain no more

Original: IMDB-BINARY (Yanardag & Vishwanathan, 2015) contain no more than  thousands of graphs, each being no larger than a few hundred nodes.
Revised: than a few thousands of graphs, each being no larger than a few hundred nodes.

Original: Recent work on creating larger datasets has been undertaken with the Open Graph Benchmark (Hu et al., 2020) offering signiﬁcantly larger datasets (100K molecules) which however contain similarly small graphs.
Revised: Recent work on creating larger datasets has been undertaken with the Open Graph Benchmark (Hu et al., 2020) offering signiﬁcantly larger datasets (100K molecules) which however contain similarly small graphs.

Original: Small datasets cause many practical problems: (1) they penalize machine learning models that require large training data (2) they make cross-validation difﬁcult since validation and test sets become too small to carry enough statistical power (3) they make it impossible to study model scaling with additional data or larger data.
Revised: Small datasets cause many practical problems: (1) they penalize machine learning models that require large training data (2) they make cross-validation difﬁcult since validation and test sets become too small to carry enough statistical power (3) they make it impossible to study model scaling with additional data or larger data.

Original: In graph classiﬁcation tasks in particular, small datasets cast doubt on the ability of models to generalize to larger graphs with similar structure.
Revised: In graph classiﬁcation tasks in particular, small datasets cast doubt on the ability of models to generalize to larger graphs with similar structure.

Original: Current models for graph classiﬁcation use either computed features e.g. all approaches commonly found in graph kernels or learned features obtained by a variety of graph neural network architectures (Wu et al., 2020).
Revised: Current models for graph classiﬁcation use either computed features e.g. all approaches commonly found in graph kernels or learned features obtained by a variety of graph neural network architectures (Wu et al., 2020).

Original: Graph kernels, because of their inherently quadratic nature, have rarely been studied at scale, save for a few that admit clever reformulations (Kriege et al., 2020).
Revised: Graph kernels, because of their inherently quadratic nature, have rarely been studied at scale, save for a few that admit clever reformulations (Kriege et al., 2020).

Original: On the other hand, many graph neural networks have been trained on large artiﬁcial graph datasets such as direct conversion of MNIST or CIFAR10 images into graphs (Dwivedi et al., 2020).
Revised: On the other hand, many graph neural networks have been trained on large artiﬁcial graph datasets such as direct conversion of MNIST or CIFAR10 images into graphs (Dwivedi et al., 2020).

Original: However, these graphs retain geometric properties such as locality that make them qualitatively different from data that is inherently topological such as social networks for example.
Revised: However, these graphs retain geometric properties such as locality that make them qualitatively different from data that is inherently topological such as social networks for example.

Original: This paper attempts to make graph classiﬁcation possible at scale with large datasets containing graphs of all sizes.
Revised: This paper attempts to make graph classiﬁcation possible at scale with large datasets containing graphs of all sizes.

Original: For this we focus on: (1) using homomorphism statistics as base topological feature descriptors for graphs, (2) leveraging efﬁcient approximations available for homomorphism densities, and (3) identifying the adequate data structures to obtain a highly scalable implementation.
Revised: For this we focus on: (1) using homomorphism statistics as base topological feature descriptors for graphs, (2) leveraging efﬁcient approximations available for homomorphism densities, and (3) identifying the adequate data structures to obtain a highly scalable implementation.

Original:  G RAPH H OMOMORPHISM  F EATURES
Revised:  G RAPH H OMOMORPHISM S TATISTICS ARE F EATURE D ESCRIPTORS

Original: Graph homomorphisms are mappings from the node set of a pattern graph F to the node set of a target graph G  that preserve adjacency, i.e. all edges uv ∈ E ( F ) are mapped to edges f ( u ) f ( v ) ∈ E ( G ) .
Revised: A graph morphism is a mapping from the node set of a pattern graph F to the node set of a target graph G . Graph morphisms that preserve adjacency, i.e. all edges uv ∈ E ( F ) are mapped to edges f ( u ) f ( v ) ∈ E ( G ) , are called homomorphisms.

Revised: Graph homomorphisms that also preserve non-adjacency are called isomorphisms.

Original: In essence, homomorphisms from F to G  express  the presence of F in G in a weaker way than subgraph isomorphisms, but they are also signiﬁcantly easier to compute, especially if approximation is allowed.
Revised: We write that G 1 ∼ = G 2 if and only if there exists an isomorphism between G 1 and G 2 . This is a natural way to express that two graphs are identical up to a permutation. The existence of an homomorphism indicates the presence of a given pattern in a graph in a weaker sense that an isomorphism does. To obtain a global understanding of a graph it can be interesting to count how many patterns are present, which gives rise to the problem of ﬁnding the number of homomorphism from F to G which is denoted hom( F, G ) also called homomorphism number.

Revised: This intuition is formalized by a theorem of Lov´asz which shows that, by combining homomorphism statistics from multiple pattern graphs, it is possible to uniquely identify graphs up to isomorphism.

Revised: We write hom F ( G ) =

Revised: (hom( F, G ))

Revised: F ∈F to gather multiple homomorphism numbers from pattern graphs into a single vector which can be thought of as a feature descriptor.

Original: In particular for a pattern F with k nodes, l edges, and treewidth parameter tw( F ) (ranging from 1 for trees to k − 1for k -cliques) anda graph G  with  nnodes, it is possible to compute exactly the number of homomorphisms from F to G in time
Revised: Theorem 1. (Lov´asz (1967)) Given two undirected graphs G 1 and G 2 with at most n nodes. Denoting by G n the set of all simple graphs with at most n nodes, we have:

Revised: [Equation]

Revised: This theorem has been extended to show that graphs whose hom -vectors are close in the sense of a vector norm are also close in terms of cut-distance (Lov ´ asz, 2012).

Revised: In practice, if we want to distinguish graphs from a dataset, it is not necessary to look at all their homomorphism statistics like in Theorem 1.

Revised: Instead, a few patterns carry most of the information which is similar to graphlet kernels which use subgraph isomorphism statistics (Shervashidze et al., 2009).

Revised: This is a fortunate situation considering the computational complexity of problems related to homomorphisms.

Revised: Despite homomorphisms being less demanding than isomorphisms, the task of ﬁnding an homomorphism from a pattern to a graph is already NP-hard from being related to clique-ﬁnding.

Revised: In terms of computational complexity, computing hom( F, G ) is #P-hard which is the equivalent of NP-hardness for counting problems.

Revised: However, there are cases where it is possible to count homomorphisms efﬁciently.

Revised: Indeed, D ´ ıaz et al.

Revised: (2002) give a slice-wise polynomial algorithm parameterized by tw( F ) the treewidth of the pattern graph F with a runtime of O (tw( F ) · kn tw( F )+1 ) .

Revised: Note that tw( F ) ranges from a minimum of 1 for trees to values such as k for k -by- k grids to a maximum of n −for a complete graph on n nodes.

Revised: This turns out to be the best possible algorithm which matches computational complexity lower bounds established by Grohe (2007).

Revised: Furthermore, even if we relax our assumptions and allow for a multiplicative approximation of hom( F, G ) , the problem remains as difﬁcult as counting homomorphisms exactly (Bulatov & ˇZivn ´ y, 2020).

Revised: Following this line of work, NT & Maehara (2020) have introduced the GHC framework based on homomorphism numbers where the family of patterns F is an hyper-parameter.

Revised: They compute exact homomorphism numbers relative to patterns that have low treewidth and use the resulting permutation-invariant vector embeddings as input to traditional classiﬁers.

Revised: Their approach has been found to be competitive with both direct embeddings used in combination with graph kernel methods as well as learned graph embeddings obtained via message-passing graph neural networks and has provably high representational power.

Original: O (tw( F ) · kn tw( F )+1 ) (D´ıaz et al., 2002).
Revised: The situation is identical for the homomorphism density t ( F, G ) which is a normalized number of homomorphisms from F to G deﬁned as follows: t ( F, G ) = hom( F, G ) /n k where n and k are the number of nodes of G and F respectively.

Revised: Homomorphism densities are as difﬁcult to compute exactly and it is similarly hard to obtain multiplicative approximations of them.

Revised:  S GHD: S AMPLE G RAPH H OMOMORPHISM D ENSITY

Revised: The only remaining way to work around the limitations established by previous results in computational complexity is to relax even further the problem and allow additive approximation.

Original: Furthermore, a sampling argumentallows to compute an ε -additive approximation of the homomorphism density, i.e. the probability for a random morphism to be an homomorphism, in time O (cid:0) ( k log n + l ) · ε − 2 log δ − 1 (cid:1) , which is achieved by Algorithm 1.
Revised: By interpreting homomorphism density as being the probability for a random graph morphism to be an homomorphism, it is possible to use a sampling argument to compute an ε -additive approximation of the homomorphism density t ( F, G ) in time O (cid:0) ( k log n + l ) · ε − 2 log δ − 1 (cid:1) . This is achieved by Algorithm 1 which we call sGHD for sample graph homomorphism density.

Original: Algorithm
Revised: The sGHD algorithm operates by computing an empirical mean: the ﬁrst step consists in generating graph morphisms uniformly at random. The second step consists in computing the ratio of homomorphisms in the sample. Each morphism can be seen as a coin ﬂip landing on heads when the morphism is an homomorphism and tails otherwise. In essence the sGHD algorithm is estimating the bias of that coin.

Revised: Applying Chernoff bounds gives use a conservative guarantee that O ( ε − 2 log δ − 1 ) random morphisms will sufﬁce to compute an ε -additive approximation.

Original: Require:
Revised: Require:

Original: G an undirected graph on n nodes, F a pattern graph on k nodes and l edges, ε > 0 the requested additive precision, 1 − δ ∈ (0 , 1) the desired conﬁdence.
Revised: G an undirected graph on n nodes, F a pattern graph on k nodes and l edges, ε > 0 the requested additive precision, 1 − δ ∈ (0 , 1) the desired conﬁdence.

Original: Ensure: ¯ t such that P ( | t ( F, G ) − ¯ t | > ε ) ≤ δ 1: N ← O ( ε − 2 log δ − 1 ) 2: for i = 1 to N do 3: f i ∼ ( U (0 , n − 1))
Revised: Ensure: ¯ t such that P ( | t ( F, G ) − ¯ t | > ε ) ≤ δ 1: N ← O ( ε − 2 log δ − 1 ) 2: for i = 1 to N do 3: f i ∼ ( U (0 , n − 1))

Original: [ k ] 4: end for 5: ¯ t ← 1 N (cid:80) Ni =1 (cid:81) uv ∈ E ( F ) 1 E ( G ) ( f i ( u ) f i ( v )) 6: return ¯ t
Revised: [ k ] 4: end for 5: ¯ t ← 1 N (cid:80) Ni =1 (cid:81) uv ∈ E ( F ) 1 E ( G ) ( f i ( u ) f i ( v )) 6: return ¯ t

Original: Among graph embeddings obtained via direct computation, graph homomorphism statistics display several desirable properties.

Original: First, graph homomorphism numbers and densities are naturally permutation-invariant embeddings.

Original: These quantities enjoy a rich theory developed by Lov´asz (2012) who proved that arbitrary pairs of graphs can be distinguished solely through the homomorphism statistics relative to all pattern subgraphs smaller than either graph.

Original: However, in the context of graph classiﬁcation, the goal is to distinguish real-life graphs which share common structure.

Original: This additional information invites us to hope that such graphs can be distinguished by considering homomorphism statistics relative to signiﬁcantly fewer patterns in a similar way to graphlet kernels which use subgraph isomorphism instead (Shervashidze et al., 2009).

Original: Following this idea, NT & Maehara (2020) have introduced a framework based on homomorphism numbers where the family of patterns is an hyper-parameter.

Original: They compute homomorphism numbers relative to these patterns and use the resulting vector embeddings as input to traditional classiﬁers.

Original: Their approach has been found to be competitive with both direct embeddings used in combination with graph kernel methods as well as learned graph embeddings obtained via message-passing graph neural networks and has provably high representational power.

Original: It is possible to extend the approach of NT & Maehara to  homomorphism densities with no signiﬁcant loss in classiﬁcation accuracy.
Revised: It is possible to extend the approach of NT & Maehara to approximate homomorphism densities with no signiﬁcant loss in classiﬁcation accuracy.

Original: The main advantage comes from the inherent scalability of Algorithm 1 which does not depend on the size of the target graph G outside of the initial pseudo-random number generation required to sample morphisms uniformly at random. 
Revised: The main advantage comes from the inherent scalability of Algorithm 1 which does not depend on the size of the target graph G outside of the initial pseudorandom number generation required to sample morphisms uniformly at random. Furthermore, the algorithm does not depend on the treewidth of F .

Original: Due to the efﬁciency of PRNG implementations, the practical running time of Algorithm 1 amounts to O (cid:0) | E ( F ) | ε − 2 log δ − 1 (cid:1) which is close to constant for small pattern graphs and ﬁxed precision.
Revised: Due to the efﬁciency of PRNG implementations, the practical running time of Algorithm 1 amounts to O (cid:0) | E ( F ) | ε − 2 log δ − 1 (cid:1) which is close to constant for small pattern graphs and ﬁxed precision.

Original: While Algorithm 1 is already efﬁcient, we propose to speed up the computation of the homomorphism test implemented via the expression (cid:80)Ni =1 (cid:81) uv ∈ E ( F ) 1 E ( G ) ( f i ( u ) f
Revised: While Algorithm 1 is already efﬁcient, we propose to speed up the computation of the homomorphism test implemented via the expression (cid:80)

Original:  i ( v )) by focusing on membership queries for the target graph G .
Revised: Ni =1 (cid:81) uv ∈ E ( F ) 1 E ( G ) ( f i ( u ) f i ( v )) by focusing on membership queries for the target graph G .

Original:  A PPROXIMATE M EMBERSHIP
Revised:  A PPROXIMATE M EMBERSHIP

Original: The problem of set membership is one of the fundamental building blocks in the study of data structures.
Revised: The problem of set membership is one of the fundamental building blocks in the study of data structures.

Original: A wealth of data structures and algorithms provide various trade-offs and guarantees going from sequential search in an unsorted array, to tries, and hash tables.
Revised: A wealth of data structures and algorithms provide various trade-offs and guarantees going from sequential search in an unsorted array, to tries, and hash tables.

Original: Of particular note is perfect hashing which allows for constant-time set membership queries at the cost of linear space (the space required to represent a perfect hashing function is proportional to the size of the set).
Revised: Of particular note is perfect hashing which allows for constant-time set membership queries at the cost of linear space (the space required to represent a perfect hashing function is proportional to the size of the set).

Original: In some way, this space complexity is optimal and cannot be improved upon.
Revised: In some way, this space complexity is optimal and cannot be improved upon.

Original: Surprisingly, a simple probabilistic data structure, the Bloom ﬁlter (Bloom, 1970), allows to implement set membership close to this optimal space complexity.
Revised: Surprisingly, a simple probabilistic data structure, the Bloom ﬁlter (Bloom, 1970), allows to implement set membership close to this optimal space complexity.

Original: Each element of the set is represented by no more than a dozen of bits and the membership query is realized in constant time by applying a few hash functions to the element to be queried.
Revised: Each element of the set is represented by no more than a dozen of bits and the membership query is realized in constant time by applying a few hash functions to the element to be queried.

Original: Bloom ﬁlters are implemented via a array of bits which are ﬁlled at indices corresponding to the outputs of the different hash functions.
Revised: Bloom ﬁlters are implemented via an array of bits which are ﬁlled at indices corresponding to the outputs of the different hash functions.

Original: The randomness of this data structure is solely contained in the choice of hash functions and is perfectly deterministic once the hash functions have been chosen.
Revised: The randomness of this data structure is solely contained in the choice of hash functions and is perfectly deterministic once the hash functions have been chosen.

Original: Bloom ﬁlters alleviate the need to store the elements themselves unlike e.g. hash tables and other traditional data structures.
Revised: Bloom ﬁlters alleviate the need to store the elements themselves unlike e.g. hash tables and other traditional data structures.

Original: This convenience in the speciﬁc context of the set membership problem comes at the cost of a false positive rate.
Revised: This convenience in the speciﬁc context of the set membership problem comes at the cost of a false positive rate.

Original: Indeed, when a Bloom ﬁlter returns that an element is not in the set, that answer is always truthful.
Revised: Indeed, when a Bloom ﬁlter returns that an element is not in the set, that answer is always truthful.

Original: However a positive answer does not guarantee that the element is actually in the set.
Revised: However a positive answer does not guarantee that the element is actually in the set.

Original: With regards to computing the sample homomorphism density, each graph G can thus be compressed into a Bloom ﬁlter containing information about its edges.
Revised: With regards to computing the sample homomorphism density, each graph G can thus be compressed into a Bloom ﬁlter containing information about its edges.

Original: In practice this means that each edge, usually represented by a pair of unsigned integers each coded over 32, 64, or 128 bits is compressed down to a constant dozen of bits, regardless of the number of nodes of G .
Revised: In practice this means that each edge, usually represented by a pair of unsigned integers each coded over 32, 64, or 128 bits is compressed [Figure] n [Figure]

Revised: unn i ng ti m e ( m s )

Original:  Furthermore, each homomorphism test corresponds to computing grouped queries which must all return true.
Revised: GHC with homlib impl. of D´ıaz et al. sGHD ( ε = 5 × 10 − 3 ) with adjacency list sGHD ( ε = 5 × 10 − 3 ) with Bloom ﬁlter sGHD ( ε = 1 × 10 − 2 ) with Bloom ﬁlter down to a constant dozen of bits, regardless of the number of nodes of G . Furthermore, each homomorphism test corresponds to computing grouped queries which must all return true.

Original: Since the queries are independent, this implies a lower false positive rate for the grouped query than its constituent queries.
Revised: Since the queries are independent, this implies a lower false positive rate for the grouped query than its constituent queries.

Original: Finally, the Bloom ﬁlter associated with G is constructed once as a read-only data structure which can be queried repeatedly in parallel when computing the sample homomorphism density of G with regards to queries representing the edge set of some pattern graph F .
Revised: Finally, the Bloom ﬁlter associated with G is constructed once as a read-only data structure which can be queried repeatedly in parallel when computing the sample homomorphism density of G with regards to queries representing the edge set of some pattern graph F .

Original: There exists many variants of the Bloom ﬁlter which may support less operations or instead display additional properties.
Revised: There exist many variants of the Bloom ﬁlter which may support less operations or instead display additional properties.

Original: We note in particular cuckoo ﬁlters (Fan et al., 2014) which leverage the properties of cuckoo hashing to lower the number of memory accesses required for each membership query.
Revised: We note in particular cuckoo ﬁlters (Fan et al., 2014) which leverage the properties of cuckoo hashing to lower the number of memory accesses required for each membership query.

Original: More recently, XOR ﬁlters (Graf & Lemire, 2020), have been proposed to focus entirely on the set membership problem from the point of view of a static set which does not change over time.
Revised: More recently, XOR ﬁlters (Graf & Lemire, 2020), have been proposed to focus entirely on the set membership problem from the point of view of a static set which does not change over time.

Original: This specialization allows for a lower amount of bits per key which enables faster querying than most alternatives, albeit at the cost of a slower construction.
Revised: This specialization allows for a lower amount of bits per key which enables faster querying than most alternatives, albeit at the cost of a slower construction.

Original:  E XPERIMENTAL E VALUATION
Revised:  E XPERIMENTAL E VALUATION

Original: We describe experiments which attempt to compare two currently available approaches to compute graph homomorphism features.
Revised: We describe experiments which attempt to compare two currently available approaches to compute graph homomorphism features.

Original: The ﬁrst method is the C++ implementation of the algorithm of D ´ ıaz et al.
Revised: The ﬁrst method is the C++ implementation of the algorithm of D ´ ıaz et al.

Original: given by the homlib library of NT & Maehara (2020).
Revised: given by the homlib library of NT & Maehara (2020).

Original: This algorithm includes a tree decomposition routine together with a dynamic programming algorithm to compute homomorphism numbers.
Revised: This algorithm includes a tree decomposition routine together with a dynamic programming algorithm to compute homomorphism numbers.

Original: Obtaining homomorphism densities is done by dividing by n k which is the cardinality of all morphisms from a pattern graph F with k nodes to a target graph G with n nodes.
Revised: Obtaining homomorphism densities is done by dividing by n k which is the cardinality of all morphisms from a pattern graph F with k nodes to a target graph G with n nodes.

Original: The second method is our implementation of Algorithm 1 with two variants: exact edge membership queries to an adjacency list and approximate queries to a Bloom ﬁlter representing the edge set of G .
Revised: The second method is our implementation of Algorithm 1 with two variants: exact edge membership queries to an adjacency list and approximate queries to a Bloom ﬁlter representing the edge set of G .

Original: Our implementation is written in the Rust programming language (Matsakis & Klock, 2014) and will be made available as a library at a later date.
Revised: Our implementation is written in the Rust programming language (Matsakis & Klock, 2014) and will be made available as a library at a later date.

Original: Our experiments use Erd˝os-R´enyi random graphs G ( n, p ) to control the presence of subgraphs via the edge density p .
Revised: Our experiments use Erd˝os-R´enyi random graphs G ( n, p ) to control the presence of subgraphs via the edge density p .

Original: This allows us to manipulate the target homomomorphism density for many small pattern graphs.
Revised: This allows us to manipulate the target homomomorphism density for many small pattern graphs.

Original: Furthermore, this method allows us to generate families of graphs of varying sizes which retain common properties.
Revised: Furthermore, this method allows us to generate families of graphs of varying sizes which retain common properties.

Original: The homlib library implements graphs via adjacency  and as such demonstrates great performance on smaller graphs.
Revised: The homlib library implements graphs using adjacency lists and as such demonstrates great performance on smaller graphs.

Original: However, its running time is highly dependent on the density of the target graph.
Revised: However, its running time is highly dependent on the density of the target graph.

Original: Consider for example a random graph G (1000 , 9 × 10 − 3 ) (disconnected w.h.p.) which contains very few triangles, for which homlib computes an exact triangle density of 7 . 9 × 10 − 7 in only 8ms.
Revised: Consider for example a random graph G (1000 , 9 × 10 − 3 ) (disconnected w.h.p.) which contains very few triangles, for which homlib computes an exact triangle density of 7 . 9 × 10 −in only 8ms.

Original: The running time drastically increases to 102ms for G (1000 , 4 × 10 − 2 ) (connected w.h.p.) which has a notably larger density of 6 . 4 × 10 − 5 .
Revised: The running time drastically increases to 102ms for G (1000 , 4 × 10 − 2 ) (connected w.h.p.) which has a notably larger density of 6 . 4 × 10 − 5 .

Original: More importantly, the running time of homlib scales linearly with the size of G as shown in Figure 1.
Revised: More importantly, the running time of homlib scales linearly with the size of G as shown in Figure 1.

Original: Surprisingly, increasing the treewidth parameter of the pattern graph F , from triangle to K 5 the complete graph over 5 nodes, incurs at most a linear increase in the running time which does not match the worst-case time complexity.[Figure] n [Figure]
Revised: Surprisingly, increasing the treewidth parameter of the pattern graph F , from triangle to K 5 the complete graph over 5 nodes, incurs at most a linear increase in the running time which does not match the worst-case time complexity.

Original: unn i ng ti m e ( m s ) homlib implementation of (D´ıaz et al., 2002)

Original: Algorithm 1 ( ε = 5 × 10 − 3 ) with adjacency list Algorithm 1 ( ε = 5 × 10 − 3 ) with Bloom ﬁlter Algorithm 1 ( ε = 1 × 10 − 2 ) with Bloom ﬁlter For the sample homomorphism density implementation of Algorithm 1 we set a requested additive error of ± 1 × 10 − 2 (this is not 1% error) and ± 5 × 10 − 3 with 95% conﬁdence, i.e. no more than 5% of the sample densities exceed the error bound.
Revised: For the sample homomorphism density implementation of Algorithm 1 we set a requested additive error of ± 1 × 10 − 2 (this is not 1% error) and ± 5 × 10 − 3 with 95% conﬁdence, i.e. no more than 5% of the sample densities exceed the error bound.

Original: In practice it is clear this theoretical error bound is extremely conservative.
Revised: In practice it is clear this theoretical error bound is extremely conservative.

Original: For example if we consider a graph G (400 , 0 . 05) with approximatelyedges, the exact triangle homomorphism density is 1 .
Revised: For example if we consider a graph G (400 , 0 . 05) with approximatelyedges, the exact triangle homomorphism density is 1 .

Original: 26 × 10 − 4 which should be well below a “detection threshold” of ± 1 × 10 − 2 .
Revised: 26 × 10 − 4 which should be well below the “detection threshold” of ± 1 × 10 − 2 obtained by the Chernoff bounds.

Original: However, the sample homomorphism density correctly identiﬁes the order of magnitude with a sample density of 1 .
Revised: However, the sample homomorphism density correctly identiﬁes the order of magnitude with a sample density of 1 .

Original: 94 × 10 − 4 .
Revised: 94 × 10 − 4 .

Original: In the case of our implementation of Algorithm 1 using Bloom ﬁlters we select a 1% false positive rate.
Revised: In the case of our implementation of Algorithm 1 using Bloom ﬁlters we select a 1% false positive rate.

Original: Compared to the standard implementation, the Bloom ﬁlter variant seems entirely agnostic to the size of G .
Revised: Compared to the standard implementation, the Bloom ﬁlter variant seems entirely agnostic to the size of G .

Original: Surprisingly, we observe a behavior that is comparable to homlib in the sense that lower density is associated with shorter running time.
Revised: Surprisingly, we observe a behavior that is comparable to homlib in the sense that lower density is associated with shorter running time.

Original: We notice that low density in the target graph results in a higher frequency of negative membership queries which short-circuit the entire group query.
Revised: We notice that low density in the target graph results in a higher frequency of negative membership queries which short-circuit the entire group query.

Original: As described by its theoretical time complexity, the most important factor inﬂuencing the running time of Algorithm 1 is the requested additive error ε .
Revised: As described by its theoretical time complexity, the most important factor inﬂuencing the running time of Algorithm 1 is the requested additive error ε .

Original: Figure 1 reveals that a ﬁxed additive error of ε = ± 1 × 10 − 2 results in running times ranging from 30ms to 60ms while raising the precision to ε = ±
Revised: Figure 1 reveals that a ﬁxed additive error of ε = ± 1 × 10 − 2 results in running times ranging from 30ms to 60ms while raising the precision to ε = ±

Original: 5 × 10 − 3 increases the running time to values ranging from 100ms to 200ms.
Revised: 5 × 10 − 3 increases the running time to values ranging from 100ms to 200ms.

Original: We underline that this additional cost is needed when the target density becomes small.
Revised: We underline that this additional cost is needed when the target density becomes small.

Original: For example, the triangle homomorphism density of a random graph G ( n, log 2 n ) with n = 10 5 is 2 .
Revised: For example, the triangle homomorphism density of a random graph G ( n, log 2 n ) with n = 10 5 is 2 .

Original: 1 × 10 −which cannot be detected (the sample density is 0) with a precision of ε = ± 1 × 10 − 2 .
Revised: 1 × 10 −which cannot be detected (the sample density is 0) with a precision of ε = ± 1 × 10 − 2 .

Original: However, a slightly better precision with ε = ± 5 × 10 − 3 gives a coarse approximation of this value which is “only” off by 2 orders of magnitude.
Revised: However, a slightly better precision with ε = ± 5 × 10 − 3 gives a coarse approximation of this value which is “only” off by 2 orders of magnitude.

Original: This detection threshold can also be used as an implicit ﬁlter discarding low-frequency patterns.
Revised: This detection threshold can also be used as an implicit ﬁlter discarding low-frequency patterns.

Original: Finally, we observe like with homlib that the size of F has very little impact on the running time.
Revised: Finally, we observe like with homlib that the size of F has very little impact on the running time.

Original: We have conducted additional experiments with cuckoo ﬁlters and XOR ﬁlters which reproduce the known tradeoffs between fast ﬁlter construction and fast ﬁlter querying.
Revised: We have conducted additional experiments with cuckoo ﬁlters and XOR ﬁlters which reproduce the known tradeoffs between fast ﬁlter construction and fast ﬁlter querying.

Original: However the cuckoo ﬁlter implementation we have tested was slower approximately by 10% to 20% on both construction and querying than Bloom ﬁlters while XOR ﬁlters were up to 30% faster than Bloom ﬁlters at the cost of more than double the construction time.
Revised: However the cuckoo ﬁlter implementation we have tested was slower approximately by 10% to 20% on both construction and querying than Bloom ﬁlters while XOR ﬁlters were up to 30% faster than Bloom ﬁlters at the cost of more than double the construction time.

Original:  C ONCLUSION
Revised:  C ONCLUSION

Original: We propose the use of approximate set membership data structures to scale up the computation of sample graph homomorphism densities and demonstrate in experiments that this approach is scalable and appropriate for graphs of varying connectivity.
Revised: We propose the use of approximate set membership data structures to scale up the computation of sample graph homomorphism densities and demonstrate in experiments that this approach is scalable and appropriate for graphs of varying connectivity.

Original: In particular, this paves the way towards on-demand feature generation in the context of feature representation learning where the family of patterns is the representation to be learned.
Revised: In particular, this paves the way towards on-demand feature generation in the context of feature representation learning where the family of patterns is the representation to be learned.

Original: More generally, this approach enables the use of much larger datasets containing larger and more diverse graphs in graph classiﬁcation tasks.
Revised: More generally, this approach enables the use of much larger datasets containing larger and more diverse graphs in graph classiﬁcation tasks.

Original: We hope that this efﬁcient method for feature generation encourages the creation of larger datasets which would contribute to the study of machine learning models for graph classiﬁcation at scale. 
Revised: We hope that this efﬁcient method for feature generation encourages the creation of larger datasets which would contribute to the study of machine learning models for graph classiﬁcation at scale. A CKNOWLEDGMENTS

Revised: This work was supported by the ANR project STAP (ANR-17-CE23-0021).

Revised: FY acknowledges the support of the ANR as part of the “Investissements d’avenir” program, reference ANR-19-P3IA0001 (PRAIRIE 3IA Institute).