NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Extending graph transformers with quantum computed aggregation

Slimane Thabet, Romain Fouilland, Loic Henriet

TL;DR

This paper introduces GTQC (Graph Transformer with Quantum Correlations), a hybrid graph neural network that replaces standard attention mechanisms with aggregation weights derived from quantum physical simulations. By mapping a graph's topology directly onto qubit interactions, the model extracts multi-body quantum correlations as global structural features that are classically hard to compute, demonstrating improved expressivity on graphs indistinguishable by classical 1-WL tests.

What Problem Does This Paper Address?

Standard Message Passing Neural Networks (MPNNs) face fundamental theoretical and practical bottlenecks:

  1. Limited expressivity: They cannot distinguish non-isomorphic graphs that produce identical colorings under the 1-Weisfeiler-Lehman (1-WL) isomorphism test.
  2. Structural failure modes: They struggle on heterophilic graphs (where connected nodes have different labels) and suffer from oversmoothing (node representations collapse into the same value at depth) and oversquashing (information bottlenecks across graph bottlenecks).

While modern Graph Transformers address these challenges using global structural positional encodings (e.g., Laplacian Eigenmaps), some graph properties require exponentially many parameters or expensive classical computations to approximate. The authors ask: Can physical quantum dynamics naturally generate rich, global topological features that classical architectures miss?

Methods

GTQC integrates quantum Hamiltonian simulation into a standard transformer-style update:

  • Graph-to-Hamiltonian Mapping: Vertices represent qubits, and graph edges define interaction terms (e.g., Ising $\hat{H}_I$, XY $\hat{H}_{XY}$, or Heisenberg XXZ $\hat{H}_{XXZ}$).
  • Parameterized Quantum States: Alternating layers of a single-qubit driver Hamiltonian $\hat{H}_M = \sum X_i$ and the graph Hamiltonian $\hat{H}_G$ evolve an initial state under parameters $\boldsymbol{\theta}$: $$|\psi(\boldsymbol{\theta})\rangle = \prod_{k=1}^p \left( e^{-i \hat{H}_M \theta_k} e^{-i \hat{H}_G t_k} \right) e^{-i \hat{H}_M \theta_0} |\psi_0\rangle$$
  • Two-Body Correlation Matrices: For each node pair $(i, j)$, 9 two-body Pauli expectation values are measured: $$C_{ij} = [\langle Z_i Z_j \rangle, \langle X_i X_j \rangle, \langle Y_i Y_j \rangle, \dots]^T$$
  • Quantum Attention Matrix: Correlation vectors are aggregated via a learnable linear combination $\boldsymbol{\gamma}$ (and optional softmax): $A(\boldsymbol{\theta})_{ij} = \text{softmax}(\boldsymbol{\gamma}^T C_{ij})$.
  • Classical Node Update & Multi-Head Aggregation: Features update classically via $H^{l+1} = \sigma([A(\boldsymbol{\theta}) H^l \parallel H^l] W)$, supportable across multi-head setups.
  • Random Kitchen Sinks Approach (GTQC-random): Because calculating quantum gradients through backpropagation can be noisy and expensive, the authors also propose evaluating attention using fixed, random quantum parameters $\boldsymbol{\theta}$ across multiple heads, updating only classical linear layers.

Datasets

  • GraphCovers: A synthetic benchmark of 6 non-isomorphic 21-node graphs specifically engineered to be indistinguishable by the 1-WL test.
  • Lattice Models: Square, triangular, honeycomb, and kagome lattice subgraphs used to evaluate heterophilic node classification under antiferromagnetic states.
  • QM7 & QM9: Molecular property prediction benchmarks (molecular atomization energies and electronic properties) restricted to graphs $\le 20$ nodes for simulation viability.
  • DBLP_v1: A citation-keyword graph stream parsed into small graphs (2–39 nodes) for binary paper classification (DBDM vs. CVPR).
  • Letter-med: A computer vision benchmark classifying distorted 2D letter drawings represented as graphs.

Key Insights and Ideas

  • Breaking WL-Equivalence Physically: Graphs that completely fool the 1-WL test yield distinct ground states under an Ising Hamiltonian (e.g., one graph possesses ground states with 2 excited qubits, while the other requires 3). Quantum states capture higher-order topological invariants natively.
  • Multi-Particle Random Walks via XY Models: Simulating an XY Hamiltonian natively models hard-core multi-particle quantum random walks across the graph subspace, naturally embedding multi-hop topological pathways.
  • Random Parameters Outperform Trained Circuits: Counterintuitively, GTQC-random often outperformed fully trained GTQC. Bypassing the noisy, non-convex optimization of quantum parameters and treating the quantum state as an expressive, fixed randomized feature map (akin to Random Kitchen Sinks) proved more effective on several tasks.

Key Results

  • GraphCovers (1-WL test): GTQC achieved lower training loss compared to GraphGPS (reaching loss levels below $10^{-2}$ within 500 epochs, where GraphGPS flattened around $10^{-0}$), although both attained 100% training accuracy.
  • QM9 Regression: GTQC-random (breadth 128) outperformed all baselines, cutting the error significantly: $-70.79\%$ relative error compared to standard GTQC, while GAT ($-49.70\%$), GCN ($-47.26\%$), and GraphSAGE ($-59.29\%$) trailed behind.
  • DBLP_v1 Node Classification: GTQC-random achieved an average relative performance boost over GTQC ($-9.41\% \pm 6.80\%$), outperforming standard GCN ($+6.10\%$) and matching GAT and GraphSAGE.
  • Letter-med Failure Case: Quantum models struggled significantly on the Letter-med dataset, lagging far behind classical models (e.g., GraphSAGE was $-86.59\%$ better than GTQC), indicating that quantum correlations do not benefit all graph topologies equally.

Limitations and Future Work

  • Classical Simulation Scaling Limits: Emulating quantum circuits on GPUs restricted experimental graph sizes to $\le 20$ nodes; graphs larger than 21 qubits triggered out-of-memory errors on Nvidia A100 GPUs.
  • Simulation and Hardware Cost: Quantum simulation was compute-intensive (1 epoch of QM9 took 1 hour across 4 $\times$ A100 GPUs).
  • Domain Mismatch: Tasks relying primarily on simple continuous geometric metrics (such as Letter-med) saw poor results from quantum aggregation relative to standard classical message passing.
  • Future Direction: Deploying the method directly on physical neutral-atom quantum processors (e.g., Rydberg atom arrays), which naturally scale past 300 qubits and support programmable geometric Hamiltonian evolution without simulation bottlenecks.

Summary updated

BibTeX
@inproceedings{thabet2023extending,
  author = {Slimane Thabet and Romain Fouilland and Loic Henriet},
  title = {{Extending graph transformers with quantum computed aggregation}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=241s3NHjxc},
}
Figure