Graphettes: Lookup and Sampling of Induced Subgraphs
- Graphettes are small induced subgraphs that generalize graphlets by including both connected and disconnected patterns for uniform analysis.
- The framework uses a precomputed lookup table to map every labeled graphette to a canonical representative, ensuring constant-time identification.
- It scales sampling-based network analysis by efficiently determining node orbit identities and structural roles in large graphs.
Graphettes are small induced subgraphs of a larger simple undirected graph in which connectivity is not required. In the formulation introduced in "Graphettes: Constant-time determination of graphlet and orbit identity including (possibly disconnected) graphlets up to size 8" (Hassan et al., 2017), a -graphette is the induced subgraph on any -node subset of a graph ; graphlets are precisely those graphettes that are connected. The central contribution of this framework is a full precomputed mapping, for all , from every labeled undirected graphette to a canonical representative together with the permutation to canonical form and the automorphism orbits of the canonical graphette, so that the graphette type and the orbit identity of each node in a sampled -set can be determined in constant time with respect to the size of the host graph (Hassan et al., 2017).
1. Definitions and conceptual scope
The underlying objects are simple undirected graphs. For a graph , the induced subgraph on a node subset has node set and edge set
A graphlet is a small connected induced subgraph of a larger graph. A graphette generalizes this notion by dropping the connectivity requirement: given a graph on 0 nodes, a 1-graphette is a not necessarily connected induced subgraph 2 on any set of 3 nodes of 4 (Hassan et al., 2017).
This distinction matters operationally. Uniformly sampled 5-node subsets in sparse graphs often induce disconnected patterns, so a framework restricted to connected graphlets discards many sampled node sets or requires a connectivity filter. Graphettes instead treat all induced 6-node patterns uniformly. In this sense, graphlets are a special case inside a strictly larger induced-subgraph family.
The 2017 paper also fixes the representation-theoretic perspective needed for rapid lookup. Two graphettes are isomorphic if there exists a bijection 7 on their node sets such that
8
for all 9. For a graphette 0, the paper uses 1 for the set of all same-size graphs isomorphic to 2. This is the equivalence class under node relabeling. The lookup-based method works by enumerating all labeled graphs on 3 nodes, grouping them into such isomorphism classes, and selecting one canonical representative per class.
A recurrent misconception is that graphettes merely rename graphlets. The formalism is broader: graphlets are connected induced subgraphs, whereas graphettes include disconnected induced subgraphs as well. Another common misunderstanding concerns the phrase “constant time.” In this literature, it means constant with respect to 4 and 5 for fixed 6, after precomputation; it does not mean that no adjacency work or preprocessing is required.
2. Encoding, enumeration, and canonical graphettes
A labeled undirected graph on 7 nodes has
8
possible edges, hence
9
possible labeled graphettes. The representation used in the paper is the lower triangular part of the adjacency matrix, encoded as a bit vector of length 0. Interpreting this bit vector as a nonnegative integer yields a direct table index (Hassan et al., 2017).
The canonical graphette 1 is defined as the lowest-numbered bitvector among all isomorphs of 2. Equivalently,
3
where 4 is the integer encoded by the lower-triangle bitvector. This gives a unique identifier for each non-isomorphic graphette on 5 nodes.
For 6, the number of canonical graphettes 7 is 8. The total numbers of orbit types across all canonical graphettes of each size are 9. At 0, the raw labeled search space contains 1 graphs, which collapse to 2 canonical graphettes and 3 orbit types (Hassan et al., 2017).
These counts include connected and disconnected patterns. That is the critical combinatorial enlargement relative to classical graphlet tables, which count only connected isomorphism classes. The paper notes that the 4 sequence matches OEIS A000088, confirming that the canonicals correspond to all unlabeled graphs on 5 nodes, not only connected ones.
3. Precomputation and lookup-table construction
For each 6, the precomputation phase produces three linked objects: a mapping from every labeled 7-node graph to its canonical representative, the permutation sending the given labeling to the canonical labeling, and the automorphism orbits of each canonical graphette (Hassan et al., 2017).
The construction proceeds by scanning every bitvector 8. Each 9 is interpreted as a graphette 0. If 1 is isomorphic to a previously discovered canonical graphette, the table stores the canonical ID and the relabeling permutation. Otherwise, 2 becomes the first discovered member of a new isomorphism class and is declared canonical.
Isomorphism testing uses a degree-distribution filter followed by explicit permutation checking constrained by degrees. If two candidate graphettes have different degree distributions, they are not isomorphic. If the degree distributions agree, the algorithm enumerates only permutations that map nodes to nodes of the same degree and checks whether the permuted adjacency matrix matches. Each such matrix comparison costs 3, and the worst-case cost per comparison is 4. The resulting upper bound for building the table is
5
This is feasible for 6 on a single core, and the 7 case is parallelized via what the paper calls “sifting for canonicals.” The bitvector space is partitioned into disjoint subsets, each processed independently to produce temporary canonical graphettes and temporary mappings. A global merge then identifies isomorphic temporary canonicals and remaps them to the globally lowest-numbered representative. For 8, the reported cost was about 9 CPU-weeks on 0 cores, corresponding to about one week of wall time (Hassan et al., 2017).
The storage design is compact enough for in-memory use. For 1, the canonical graphette ID fits in 2 bits, the orbit ID fits in 3 bits, and one additional bit can encode connected versus disconnected status, so each lookup entry fits in a 4-bit integer. For 5, the full table occupies about 6 MB.
4. Automorphisms, cycles, and orbit identity
An automorphism of a graphette 7 is an isomorphism from 8 to itself, that is, a permutation 9 of 0 such that
1
for all 2. The automorphism group 3 acts on the node set, and this action partitions nodes into automorphism orbits. In the graphette framework, graphlet orbits are extended verbatim from connected graphlets to possibly disconnected graphettes (Hassan et al., 2017).
The paper defines an orbit 4 by two conditions. First, 5 is invariant under every automorphism. Second, the group action is transitive on 6: for any 7, there exists an automorphism 8 and integer 9 such that 0. From this, every node belongs to exactly one orbit, and the orbits form a partition of the node set.
Orbit computation is derived from permutation cycles. For an automorphism 1, the cycle of a node 2 is
3
where 4 is the smallest positive integer with 5. Each cycle lies entirely בתוך a single orbit, and the full orbit partition can be obtained by merging cycles across all automorphisms.
The implementation is brute-force but bounded by the small 6. For each canonical graphette, the method enumerates all permutations, prunes those that map a node to a node of different degree, and tests whether the permuted adjacency equals the original adjacency. The paper also notes that an automorphism of a graph is also an automorphism of its complement, which can help in some cases. Once the automorphism set is known, all cycles are collected, and nodes sharing cycles are merged by a coloring procedure into final orbit classes (Hassan et al., 2017).
Orbit identity is the mechanism that turns pattern recognition into structural role recognition. In graphlet analysis, this is what distinguishes, for example, the center of a star from its leaves. The graphette formulation preserves this role-sensitive analysis even when the induced pattern is disconnected.
5. Constant-time identification in large graphs and sampling-based use
After precomputation, runtime use is straightforward. Given a 7-node subset 8, one forms the induced subgraph, encodes its lower-triangle adjacency bitvector 9, interprets 0 as an integer, and performs a table lookup. The lookup returns the canonical graphette ID and, through auxiliary metadata, the permutation that maps the observed labeling to the canonical labeling (Hassan et al., 2017).
Node orbit identity is then recovered by composing this permutation with the orbit partition of the canonical graphette. If canonical node 1 lies in orbit 2, and the permutation maps observed position 3 to canonical position 4, then node 5 inherits orbit label 6. For fixed 7, the per-sample cost is the 8 construction of the bitvector plus a single constant-time lookup and a small amount of permutation bookkeeping. The paper therefore characterizes graphette and orbit determination as constant time with respect to the size of the ambient graph.
The intended use is sampling rather than exhaustive enumeration. The paper explicitly motivates graphettes as a way to aid statistical sampling of graphlets up to size 9 from large networks, because exact graphlet counting is already unacceptably expensive on existing large networks and becomes worse as networks grow in size and density. Several sampling schemes are discussed: uniform node sampling, local search around a node such as BFS or random walk, and edge-based sampling with local expansion. These schemes trade off bias and efficiency, and the paper does not prescribe a single universal strategy (Hassan et al., 2017).
Repeated sampling of 00 01-sets yields empirical estimates of the distribution of graphettes and graphlets across 02, and of node-level orbit participation. The resulting feature at node 03 is a graphette orbit degree vector whose 04-th component counts how many sampled graphettes place 05 in orbit 06. These are estimates rather than exact counts, but the method shifts the computational bottleneck from exhaustive subgraph enumeration to the controllable choice of sample size.
A second misconception is therefore that graphettes are chiefly an exact counting algorithm. The paper’s emphasis is different: exact enumeration is the expensive baseline, whereas the lookup machinery is designed to make large-scale sampling practical.
6. Context, related developments, and limitations
The graphette formalism sits within the broader graphlet literature associated with graphlet degree vectors, network comparison, and network alignment. Earlier work used connected graphlets and automorphism orbits to characterize local topology, while later exact counting methods exploited orbit counting equations to accelerate enumeration. The graphette contribution is to generalize the pattern space to disconnected induced subgraphs and to replace per-instance isomorphism reasoning with a reusable precomputed canonicalization table (Hassan et al., 2017).
Its practical scope is bounded by the size of the lookup universe. The table approach is feasible for 07, but the combinatorial growth is severe beyond that point. The data block reports that 08 would require 09 labeled graphs and approximately 10 GB of memory for a full lookup table, while 11 would require approximately 12 TB. The method is also restricted to simple undirected, unweighted, unlabeled graphs. Directed graphs, edge weights, and node labels would require extensions to the encoding and canonicalization machinery. The paper further leaves open a systematic analysis of sampling bias, convergence rate, and the relative quality of different sampling schemes (Hassan et al., 2017).
Two subsequent lines of work clarify how the original idea relates to later graph research. First, "Heterogeneous Graphlets" generalizes graphlets to heterogeneous networks via typed graphlets, defined as small typed induced subgraphs; this extends graphlet analysis along the type dimension, whereas graphettes extend it along the connectivity dimension by admitting disconnected induced subgraphs (Rossi et al., 2020). Second, "Flowette: Flow Matching with Graphette Priors for Graph Generation" reuses the word graphette for a different object: a probabilistic family 13 built from a graphon, a sparsity sequence, and a graph edit function, used as a structural prior in generative modeling (Wijesinghe et al., 27 Feb 2026). A plausible implication is that the term now has two distinct technical senses in the literature: one denoting small induced subgraphs for canonical lookup and sampling, and another denoting graphon-based generative priors with controlled structural edits.
Within its original 2017 sense, graphettes are best understood as a graphlet-style framework optimized for scalable approximate analysis. Their distinctive contribution is not a new induced-subgraph concept in isolation, but the combination of that concept with canonical labeling, automorphism-orbit computation, and a static lookup structure that makes repeated subgraph identification effectively independent of the size of the host network (Hassan et al., 2017).