cs.CLMar 11, 2026

Instruction set for the representation of graphs

Authors: Ezequiel Lopez-Rubio, Mario Pascual-Gonzalez

Organizations: Department of Computer Languages and Computer Science, University of Málaga, Bulevar Louis Pasteur, 35, 29071 Málaga, Spain · ITIS Software. Universidad de Málaga. C/ Arquitecto Francisco Peñalosa 18, 29010, Málaga, Spain

Abstract

We present IsalGraph, a method for representing the structure of any finite, simple graph as a compact string over a nine-character instruction alphabet. The encoding is executed by a small virtual machine comprising a sparse graph, a circular doubly-linked list (CDLL) of graph-node references, and two traversal pointers. Instructions either move a pointer through the CDLL or insert a node or edge into the graph. A key design property is that every string over the alphabet decodes to a valid graph, with no invalid states reachable. A greedy GraphToString algorithm encodes any connected graph into a string in time polynomial in the number of nodes; an exhaustive-backtracking variant produces a canonical string by selecting the lexicographically smallest shortest string across all starting nodes and all valid traversal orders. We evaluate the representation on five real-world graph benchmark datasets (IAM Letter LOW/MED/HIGH, LINUX, and AIDS) and show that the Levenshtein distance between IsalGraph strings correlates strongly with graph edit distance (GED). Together, these properties make IsalGraph strings a compact, isomorphism-invariant, and language-model-compatible sequential encoding of graph structure, with direct applications in graph similarity search, graph generation, and graph-conditioned language modelling

Figures & tables

Explore similar work

Jul 11, 2026

Instruction Set and Language for Hypergraphs

We present IsalHG, a method for representing the structure of any finite, connected hypergraph of bounded hyperedge arity as a string over a compact instruction alphabet ΣHGΣ_{\mathrm{HG}}. The encoding is executed by a small virtual machine comprising a sparse hypergraph, a circular doubly-linked list (CDLL) of node references, and kk traversal pointers, where kk bounds the hyperedge arity. Instructions either move a pointer through the CDLL or insert a hyperedge, optionally together with new nodes, into the hypergraph. Every string over ΣHGΣ_{\mathrm{HG}} decodes to a valid hypergraph; the alphabet is closed. A greedy HypergraphToString (h2s) algorithm encodes any connected hypergraph into a string; a backtracking variant seeded at nodes of lexicographically maximal structural tuple produces a canonical string w∗w^{*}, which we conjecture to be a complete isomorphism invariant. Canonical-string equality then decides hypergraph isomorphism natively, without the standard reduction to the Levi incidence graph followed by a graph-isomorphism engine. We verify the round-trip property s2h(h2s(H))≅Hs2h(h2s(H)) \cong H on 150 connected random uniform hypergraphs and on named combinatorial designs, and we benchmark the canonical algorithm against the three practically available exact baselines -- nauty, Traces, and bliss operating on the 2-coloured Levi graph -- across a (n,c)(n, c) grid with ten seeds per cell. All four methods agree on every one of 600 isomorphism verdicts, consistent with the completeness conjecture. On wall-clock time the Levi baselines dominate every tested cell by three to five orders of magnitude (geometric-mean ratio 311×311\times to 117,672×117{,}672\times), which we report as measured. We contribute the representation framework, a conjecture of canonical completeness, and the first native-versus-Levi benchmark for hypergraph isomorphism.
Feb 24, 2026

DRESS: A Continuous Framework for Structural Graph Refinement

We introduce DRESS, a deterministic, parameter-free framework that iteratively refines the structural similarity of edges in a graph to produce a canonical fingerprint: a real-valued edge vector, obtained by converging a non-linear dynamical system to its unique fixed point. The fingerprint is isomorphism-invariant by construction, numerically stable (strictly bounded, precision-preserving, and mathematically well-posed), fast and embarrassingly parallel to compute: DRESS total runtime is O(I⋅m⋅dmax⁡)\mathcal{O}(I \cdot m \cdot d_{\max}) for II iterations to convergence, and convergence is guaranteed by Birkhoff contraction. We generalize the original equation to Motif-DRESS (arbitrary structural motifs) and Generalized-DRESS (abstract aggregation template), and introduce ΔΔ-DRESS, which runs DRESS on each vertex-deleted subgraph to boost expressiveness. ΔΔ-DRESS empirically separates all 7,983 graphs in a comprehensive Strongly Regular Graph benchmark, and on the tested CFI instances (k=0,1,2,3k = 0,1,2,3), kk-deletion (ΔkΔ^k-DRESS) empirically matches the (k+2)(k{+}2)-WL boundary.
Mar 19, 2026

Breaking Hard Isomorphism Benchmarks with DRESS

DRESS is a deterministic, parameter-free framework for structural graph refinement that iteratively refines the structural similarity of edges in a graph to produce a canonical fingerprint: a real-valued edge vector, obtained by converging a nonlinear dynamical system to its unique fixed point. ΔΔ-DRESS is a member of the DRESS family of graph fingerprints that applies a single level of vertex deletion. We test it on a benchmark of 51,813 distinct graphs across 34 hard families, including the complete Spence collection of strongly regular graphs (43,703 SRGs, 12 families), four additional SRG families (8,015 graphs), and 18 classical hard constructions (102 family entries corresponding to 99 distinct graphs). ΔΔ-DRESS produces unique fingerprints in 33 of 34 benchmark families at k=1k=1, resolving all but one within-family collision among over 576 million non-isomorphic pairs. One genuine collision exists at deletion depth k=1k=1, between two vertex-transitive SRGs in SRG(40,12,2,4), which is resolved by a single-step fallback to Δ2Δ^2-DRESS. For every family with pairwise-comparable full sorted-multiset fingerprints, the minimum observed separation margin remains at least 137×ε137 \times ε, confirming that the reported separations are numerically robust and not artifacts of the convergence threshold. We also show that ΔΔ-DRESS separates the Rook L2(4)L_2(4)/Shrikhande pair, proving it escapes the theoretical boundary of 3-WL. The method runs in O(n⋅I⋅m⋅dmax⁡)\mathcal{O}(n \cdot I \cdot m \cdot d_{\max}) time per graph.