Skip to main content
Back

Georgia Tech Fixes Directed Graph AI Blind Spot With Multi-q Magnetic Laplacian

A new positional encoding for directed graphs uses multiple magnetic Laplacians to provably capture bidirectional walk structure that prior methods miss.

Pro

  • New Multi-q Magnetic Laplacian PE provably captures bidirectional walk profiles that existing directed graph encodings cannot.
  • Using multiple potential factors q acts like sampling Fourier frequencies to invert phase mixtures on directed walks.
  • First basis-invariant, stable neural architecture for complex eigenvectors, generalizing SPE from real to complex domain.
  • Cuts distance-prediction RMSE by 66 percent on average and improves sorting network satisfiability F1 to 91.27.
  • Consistent gains across Open Circuit Benchmark and high-level synthesis for FPGA resource prediction.
  • Code, dataset generators, and reproducing scripts released at Graph-COM/Multi-q-Maglap.

Graph transformers and graph neural networks lean heavily on positional encodings to tell nodes apart, and for undirected graphs the Laplacian eigenvector trick has been the workhorse for years. Directed graphs, which show up in circuit design, program analysis, and neural architecture search, have been stuck with awkward workarounds. A paper accepted to ICLR from Georgia Tech researchers Yinan Huang, Haoyu Wang, and Pan Li now offers a clean fix, along with a proof that it actually captures the structural information the old methods were missing.

The paper introduces Multi-q Magnetic Laplacian PE, an extension of the existing magnetic Laplacian encoding that simply uses several potential values at once. That small change is enough to provably reconstruct what the authors call the walk profile of a directed graph, and it delivers consistent gains across synthetic distance tasks, sorting network satisfiability, and real circuit benchmarks.

The blind spot in directed graph encodings

On undirected graphs, counting walks of increasing length between two nodes gives you a rich fingerprint of their spatial relationship, including things like shortest path distance and resistance distance. On directed graphs, the picture is messier because edges carry direction, and important motifs mix forward and backward hops.

Understanding reachability, liveness, and common subexpressions requires analyzing whether walks between nodes have edges pointing in the same or reverse directions. Logical patterns like common predecessors (X to Y, Z to Y) or feed-forward loops in biological networks depend on being able to see these bidirectional relationships. The authors formalize this with a notion they call the walk profile: the number of length-m bidirectional walks with exact k forward and m-k backward edges.

The trouble is that existing directed PEs cannot recover this profile. The paper proves a negative result: there exist graphs with adjacency matrices and node pairs such that Mag-PE matches on both graphs, but the walk profiles differ. The same failure applies to symmetrized Laplacian PE (which is just magnetic Laplacian at q=0) and to SVD-based PE.

Why one q is not enough

The magnetic Laplacian encodes edge direction by attaching a complex phase to each directed edge, controlled by a scalar potential q. Powers of this complex adjacency matrix accumulate phase along a walk, and the total phase depends on how many edges point forward versus backward. The issue is that the accumulated phase shifts over all bidirectional walks by Magnetic Laplacian cannot uniquely determine the number of walks when you only observe one value of q. Different mixes of forward and backward edges can cancel out to give identical readings.

The fix is essentially a Fourier argument. If q behaves like a frequency, sampling enough distinct frequencies lets you invert the phase mixture and recover the counts. Formally, if you want to recover walk profiles up to length L, you need roughly L/2 + 1 different potentials. The authors show that using ceiling of L/2 plus 1 many q's simultaneously makes the problem well-posed and allows it to uniquely determine the walk profile of length at most L. The concatenation of eigenvectors across these q values becomes the new node encoding.

Handling complex eigenvectors without instability

There is a second, less advertised contribution that matters in practice. Eigendecomposition is not unique, and this ambiguity has been a known headache for Laplacian PEs in the real domain. In the complex domain used by magnetic Laplacians it gets worse: even without duplicated eigenvalues, eigenvectors associated with each q exhibit their own symmetry (if v is an eigenvector, v times e to the i theta for any theta is also an eigenvector), exacerbating the ambiguity and stability issues even further.

The paper generalizes the existing SPE stability framework to complex vectors, treating real and imaginary projections of the spectral operator through permutation-equivariant MLPs and a GIN aggregator. The result is the first work to propose the usage of complex PEs in a stable way, and their ablations show it is the ingredient that unlocks the benefits of Multi-q Mag-PE. Naive concatenation and SignNet both leave a lot of accuracy on the table.

What the numbers look like

On distance prediction over Erdos-Renyi random graphs, Multi-q Mag-PE with SPE dominates. For predicting the length-4 walk profile on directed acyclic graphs the test RMSE drops to 0.002 versus 0.043 for the best single-q magnetic Laplacian and 0.326 for symmetrized Laplacian. Shortest path distance on regular directed graphs drops from 1.533 (best single q) to 0.546. On average, the test RMSE of Multi-q Magnetic Laplacian gets reduced by 66 percent compared to the one uses naive concatenation.

Sorting network satisfiability is where the generalization story gets interesting. Networks are trained on lengths 7 to 11 and tested on lengths 13 to 16. Multi-q Mag-PE with SPE hits 91.27 F1 versus 86.86 for the best single q, and the gap widens as the test-time sorting network grows longer. Single q performs equally on length-13 samples but degrades on longer inputs.

On the Open Circuit Benchmark and a high-level synthesis dataset for FPGA resource prediction, gains are smaller but consistent across five targets (Gain, bandwidth, phase margin, DSP usage, LUT usage) and across four backbones (undirected GIN, bidirected GIN, and their SAT transformer variants).

The cost and where to be careful

Nothing is free. Running multiple magnetic Laplacians means multiple eigendecompositions and a larger PE input dimension. In practice:

  • Preprocessing time is negligible compared to training, according to the runtime evaluation.
  • Typically, the actual runtime of Q=5 is about twice of the runtime when Q=1.
  • You have to pick the number of q values based on how long the walks you care about are; too few and the linear system is underdetermined.
  • Naively concatenating complex PEs into node features throws away most of the benefit. The stable framework is not optional.

The authors also note that walk profiles could be computed directly as features, but their dimension grows quadratically with walk length and they are inherently node-pair features, so a multi-q PE with top-K eigenvectors is usually a better tradeoff.

When to reach for it

If you are building models over directed acyclic graphs like program traces, HLS intermediate representations, or analog circuits, and you have been symmetrizing the graph to get Laplacian PEs to work, this is the drop-in upgrade. It is also relevant for graph transformers where attention benefits from position-aware bias but the direction of edges carries semantic weight. The official implementation is on GitHub with scripts for the distance, sorting, and circuit benchmarks in the paper, and the model code plugs into GIN and SAT backbones without much surgery.