Skip to main content
QUICK REVIEW

[Paper Review] Enumerating Unique Computational Graphs via an Iterative Graph Invariant

Chris Ying|arXiv (Cornell University)|Feb 17, 2019
Advanced Graph Theory ResearchComputer Science4 references7 citations
TL;DR

This paper proposes an iterative graph hashing algorithm that computes a graph invariant for colored directed acyclic graphs (DAGs), enabling efficient enumeration of unique computational graphs up to isomorphism. By iteratively refining vertex hashes based on neighborhood structure and colors, the method achieves high accuracy in distinguishing non-isomorphic graphs, though it fails on certain symmetric counterexamples. The approach enables exact isomorphism detection in constrained neural architecture search workloads.

ABSTRACT

In this report, we describe a novel graph invariant for computational graphs (colored directed acylic graphs) and how we used it to generate all distinct computational graphs up to isomorphism for small graphs. The algorithm iteratively applies isomorphism-invariant operations, which take into account the graph structure and coloring, and outputs a fixed-length hash that is identical for all isomorphic computational graphs. While the algorithm cannot perfectly distinguish all pairs of non-isomorphic computational graphs, we suggest that it may be useful as a heuristic for comparing graphs.

Motivation & Objective

  • To develop an efficient method for identifying isomorphic computational graphs in neural architecture search.
  • To address the challenge of enumerating distinct computational graphs up to isomorphism, where graphs represent operations on tensors with colored vertices.
  • To design a graph invariant that is computationally efficient and effective for directed acyclic graphs with vertex colorings.
  • To verify the method's accuracy in distinguishing non-isomorphic graphs within a constrained search space for neural network design.

Proposed method

  • The algorithm initializes vertex hashes using in-degree, out-degree, and vertex color.
  • It iteratively updates each vertex's hash using the sorted hashes of its in- and out-neighbors, combined with its current hash.
  • The final graph hash is computed by sorting and hashing the final list of vertex hashes, ensuring invariance under isomorphism.
  • The method uses MD5 for fixed-length hashing and applies lexicographic sorting of neighbor hashes to maintain consistency.
  • Graph enumeration is performed via canonical ordering, pruning graphs not on a path from input to output vertex.
  • A canonical representative is selected for each unique hash, ensuring one graph per isomorphism class.

Experimental results

Research questions

  • RQ1Can an iterative graph invariant be designed that effectively distinguishes non-isomorphic colored DAGs in neural architecture search?
  • RQ2To what extent does the proposed hashing method preserve isomorphism invariance while remaining computationally efficient?
  • RQ3What are the limitations of the method in distinguishing non-isomorphic graphs with symmetric structures?
  • RQ4How effective is the method in enumerating unique computational graphs up to isomorphism for small-scale neural network architectures?
  • RQ5Can the method be extended to eliminate false positives in isomorphism detection without exponential growth in computation?

Key findings

  • The iterative graph hashing algorithm computes a true graph invariant, ensuring isomorphic graphs always produce the same hash.
  • The method correctly identifies all isomorphism classes in a constrained search space (up to 7 vertices, 9 edges, 3 colors), verified via exhaustive permutation testing.
  • Despite its invariance, the algorithm fails to distinguish certain non-isomorphic graphs, such as symmetric bipartite DAGs with uniform degrees and colors.
  • An adversarial counterexample with 10 vertices and 16 edges demonstrates that the method can produce identical hashes for non-isomorphic graphs when vertex partitions have identical degree and color distributions.
  • The method achieves exact isomorphism detection in the target use-case, as verified by testing all permutations of graphs with duplicate hashes.
  • Future improvements could replace MD5 with string concatenation to eliminate hash collisions, preserving invariance while increasing precision.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.