Papers
Topics
Authors
Recent
Search
2000 character limit reached

CTQWformer: Quantum Walk Transformer

Updated 5 July 2026
  • The paper introduces CTQWformer, a novel graph classification framework that integrates trainable continuous-time quantum walks with Transformer and recurrent modules.
  • It employs a learnable Hamiltonian that generates CTQW propagation signals used both as static biases in self-attention and dynamic inputs in a BiGRU for temporal modeling.
  • Ablation studies demonstrate that the temporal evolution component is crucial for improving classification accuracy, despite the high computational cost of CTQW simulation.

Searching arXiv for the CTQWformer paper and closely related references to ground the article. Search query: CTQWformer continuous-time quantum walks transformer graph classification arXiv (Li et al., 10 May 2026) CTQWformer is a graph classification architecture that combines continuous-time quantum walks (CTQW) with Transformer and recurrent neural components in an end-to-end trainable framework. It is defined for a dataset of graphs G={G1,,GN}\mathcal{G}=\{G_1,\dots,G_N\}, where each Gi=(Vi,Ei)G_i=(V_i,E_i) has node features XiRni×dX_i\in\mathbb{R}^{n_i\times d} and graph label yiy_i, and the learning objective is to map each graph GiG_i to its label yiy_i. The model is motivated by the observation that message-passing GNNs are inherently local and that Graph Transformers, while global, often rely on simple structural encodings and usually treat graph structure statically. CTQWformer addresses both issues by making CTQW trainable and feature-aware, then using CTQW-derived signals both as a static structural bias for self-attention and as a dynamic temporal signal for recurrent modeling (Li et al., 10 May 2026).

1. Problem setting and conceptual motivation

CTQWformer is situated in graph representation learning, specifically in supervised graph classification. The stated motivation is that existing methods have complementary but incomplete strengths. Message-passing GNNs can aggregate local neighborhood information, but increasing depth to capture long-range dependencies causes over-smoothing and optimization issues. Graph Transformers provide global attention, but they often encode structure only via simple positional or structural encodings, tend to emphasize feature similarity in attention while underusing richer structural priors, and usually lack a principled mechanism for modeling dynamic propagation on graphs (Li et al., 10 May 2026).

Continuous-time quantum walks supply the missing inductive bias. In the formulation used by CTQWformer, CTQW is a physically grounded dynamic process governed by the Schrödinger equation, with constructive and destructive interference patterns that encode both local and global structure. This gives a natural mechanism for nonlocal propagation beyond small neighborhoods. The framework therefore aims to make CTQW trainable and feature-aware through a learnable Hamiltonian, then to deploy the resulting quantum-walk statistics in two complementary ways: final-time propagation probabilities become structural biases in a Graph Transformer, while time-evolving probabilities become sequential inputs for a recurrent module (Li et al., 10 May 2026).

The paper explicitly frames these design choices as a hybridization of quantum dynamics with deep graph learning. It also states that CTQWformer is, to the authors’ knowledge, the first hybrid CTQW-based Transformer integrating CTQW-derived structural bias with temporal evolution modeling for graph learning (Li et al., 10 May 2026).

2. Continuous-time quantum walk foundations and the trainable Hamiltonian

For a graph G=(V,E)G=(V,E) with n=Vn=|V|, the Hilbert space is

H=span{1,2,,n},\mathcal{H}=\mathrm{span}\{|1\rangle,|2\rangle,\dots,|n\rangle\},

where i|i\rangle corresponds to node Gi=(Vi,Ei)G_i=(V_i,E_i)0. A quantum state at time Gi=(Vi,Ei)G_i=(V_i,E_i)1 is written as

Gi=(Vi,Ei)G_i=(V_i,E_i)2

with normalization

Gi=(Vi,Ei)G_i=(V_i,E_i)3

Its evolution is governed by

Gi=(Vi,Ei)G_i=(V_i,E_i)4

with solution

Gi=(Vi,Ei)G_i=(V_i,E_i)5

The probability of finding the walker at node Gi=(Vi,Ei)G_i=(V_i,E_i)6 at time Gi=(Vi,Ei)G_i=(V_i,E_i)7 is

Gi=(Vi,Ei)G_i=(V_i,E_i)8

CTQWformer departs from classical CTQW choices such as the adjacency matrix Gi=(Vi,Ei)G_i=(V_i,E_i)9 or Laplacian XiRni×dX_i\in\mathbb{R}^{n_i\times d}0 by learning a feature-aware Laplacian Hamiltonian XiRni×dX_i\in\mathbb{R}^{n_i\times d}1 (Li et al., 10 May 2026).

The construction begins at the edge level. For each edge XiRni×dX_i\in\mathbb{R}^{n_i\times d}2, node features are concatenated:

XiRni×dX_i\in\mathbb{R}^{n_i\times d}3

An edge-weight MLP then defines

XiRni×dX_i\in\mathbb{R}^{n_i\times d}4

where XiRni×dX_i\in\mathbb{R}^{n_i\times d}5 is ReLU and XiRni×dX_i\in\mathbb{R}^{n_i\times d}6 is sigmoid, ensuring XiRni×dX_i\in\mathbb{R}^{n_i\times d}7. These weights form a weighted adjacency matrix XiRni×dX_i\in\mathbb{R}^{n_i\times d}8. To guarantee Hermiticity, CTQWformer symmetrizes the matrix as

XiRni×dX_i\in\mathbb{R}^{n_i\times d}9

and defines the Hamiltonian as the Laplacian

yiy_i0

where yiy_i1 is the degree matrix of yiy_i2 with yiy_i3 (Li et al., 10 May 2026).

This construction has three explicit properties. First, yiy_i4 is Hermitian, which guarantees unitary evolution yiy_i5. Second, it is trainable, because the parameters in the edge MLPs and the initial node embedding MLP are learned jointly with the rest of the architecture. Third, it is feature-aware, because node attributes directly modulate the effective graph operator. A plausible implication is that the induced CTQW dynamics need not coincide with purely topological propagation, but can instead encode task-relevant structural variation conditioned on attributes.

3. Architecture and data flow

CTQWformer consists of three core components: a Quantum Walk Encoder (QWE), a Quantum Walk–Graph Transformer (QWGT), and a Quantum Walk–Graph Recurrent module (QWGR). The QWE builds the trainable Hamiltonian and simulates CTQW over multiple time steps; the QWGT injects final-time CTQW propagation probabilities into self-attention as structural bias; the QWGR models temporal evolution patterns from CTQW-derived sequences with a BiGRU (Li et al., 10 May 2026).

Component Input Function
QWE Graph yiy_i6, node features yiy_i7 Builds yiy_i8 and produces yiy_i9
QWGT Node embeddings, GiG_i0 Adds CTQW structural bias to Transformer attention
QWGR Time series derived from GiG_i1 Encodes temporal evolution with a BiGRU

The forward pipeline is specified step by step. The input graph and node features are first passed to the QWE, which constructs GiG_i2. For time steps GiG_i3, it computes the unitary

GiG_i4

derives the corresponding probability matrices GiG_i5, and stacks them into an evolution tensor

GiG_i6

The QWGT uses the final-time matrix GiG_i7 to build a bias matrix GiG_i8 for attention. The QWGR extracts node-specific sequences from the diagonal of GiG_i9 over time and processes them with a bidirectional GRU. The outputs of QWGT and QWGR are concatenated in a fusion layer, passed through a fusion MLP, and the resulting graph-level representation is broadcast back to nodes. Several CTQWformer layers are stacked. Final node embeddings are then globally mean pooled and sent to a classifier to predict the graph label (Li et al., 10 May 2026).

The layerwise design is notable because it couples node-level refinement with graph-level fusion. This suggests that the model does not merely append an auxiliary CTQW statistic to a standard architecture, but instead uses CTQW information to mediate iterative interaction between structural bias, dynamic evolution, and learned node embeddings.

4. CTQW-derived representations: static bias and temporal evolution

The QWE simulates CTQW for multiple initial states and multiple times. Initial states are all basis states, encoded as the columns of the identity matrix yiy_i0, so the yiy_i1-th column is the delta state yiy_i2 concentrated at node yiy_i3. For each time yiy_i4, the evolved state from initial state yiy_i5 is

yiy_i6

and the node-wise propagation probabilities are

yiy_i7

For a fixed yiy_i8, this yields a probability matrix yiy_i9. Across all G=(V,E)G=(V,E)0 time steps, these form the evolution tensor G=(V,E)G=(V,E)1, which encodes both static connectivity and dynamic patterns such as oscillations and interference (Li et al., 10 May 2026).

The QWGT uses only the final-time CTQW matrix. It first takes

G=(V,E)G=(V,E)2

normalizes each column to make it stochastic, and applies the element-wise transform

G=(V,E)G=(V,E)3

This matrix G=(V,E)G=(V,E)4 is the structural bias. Standard self-attention is

G=(V,E)G=(V,E)5

where G=(V,E)G=(V,E)6 are obtained from node representations. In QWGT, attention scores are modified by G=(V,E)G=(V,E)7 before softmax. The paper notes a minor typesetting issue in the printed formula and states that the intended operation is to add G=(V,E)G=(V,E)8 to the score matrix before softmax. Here, G=(V,E)G=(V,E)9 reflects how strongly a walker starting at node n=Vn=|V|0 ends at node n=Vn=|V|1 at final time n=Vn=|V|2. The result is that attention is biased toward node pairs with strong CTQW connectivity, thereby fusing feature similarity through n=Vn=|V|3 with physically grounded structural relations through n=Vn=|V|4 (Li et al., 10 May 2026).

The QWGR captures the dynamic side. For each node n=Vn=|V|5, it extracts the diagonal sequence

n=Vn=|V|6

which represents the probability that a walker starting at node n=Vn=|V|7 is again at node n=Vn=|V|8 at each time step. This self-return sequence is first linearly projected and then fed into a bidirectional GRU:

n=Vn=|V|9

followed by

H=span{1,2,,n},\mathcal{H}=\mathrm{span}\{|1\rangle,|2\rangle,\dots,|n\rangle\},0

In the diagonal-signal interpretation, the BiGRU captures forward and backward temporal dependencies in oscillatory CTQW behavior, and mean pooling over nodes yields a graph-level dynamic representation (Li et al., 10 May 2026).

The distinction between static and dynamic CTQW features is central. QWGT uses a single final-time slice as a structural prior for attention, whereas QWGR uses the time series itself as a dynamical signature. The ablation results later reported in the paper indicate that temporal modeling is the more decisive component.

5. Training, computational profile, and benchmark results

At each CTQWformer layer H=span{1,2,,n},\mathcal{H}=\mathrm{span}\{|1\rangle,|2\rangle,\dots,|n\rangle\},1, the model starts from node embeddings H=span{1,2,,n},\mathcal{H}=\mathrm{span}\{|1\rangle,|2\rangle,\dots,|n\rangle\},2, computes a graph-level representation from QWGT, computes another graph-level representation from QWGR, concatenates them, and passes the result through a feed-forward fusion network to obtain a unified graph representation. This representation is then broadcast back to nodes to form H=span{1,2,,n},\mathcal{H}=\mathrm{span}\{|1\rangle,|2\rangle,\dots,|n\rangle\},3. After H=span{1,2,,n},\mathcal{H}=\mathrm{span}\{|1\rangle,|2\rangle,\dots,|n\rangle\},4 layers, global mean pooling produces a graph vector H=span{1,2,,n},\mathcal{H}=\mathrm{span}\{|1\rangle,|2\rangle,\dots,|n\rangle\},5, which is passed through a classifier MLP to produce logits H=span{1,2,,n},\mathcal{H}=\mathrm{span}\{|1\rangle,|2\rangle,\dots,|n\rangle\},6. Training uses standard cross-entropy loss,

H=span{1,2,,n},\mathcal{H}=\mathrm{span}\{|1\rangle,|2\rangle,\dots,|n\rangle\},7

and all parameters, including the Hamiltonian-generating MLPs, Transformer, BiGRU, and classifier, are learned jointly via backpropagation through differentiable matrix exponentials. The paper does not introduce explicit extra regularization terms on H=span{1,2,,n},\mathcal{H}=\mathrm{span}\{|1\rangle,|2\rangle,\dots,|n\rangle\},8 beyond structural constraints such as symmetry and sigmoid-bounded weights (Li et al., 10 May 2026).

The dominant computational burden is CTQW simulation. Constructing the Hamiltonian costs H=span{1,2,,n},\mathcal{H}=\mathrm{span}\{|1\rangle,|2\rangle,\dots,|n\rangle\},9 time and i|i\rangle0 memory. Computing i|i\rangle1 typically costs i|i\rangle2, so over i|i\rangle3 time steps the QWE requires i|i\rangle4 time and i|i\rangle5 space for the evolution tensor. The Transformer component contributes i|i\rangle6 time and i|i\rangle7 space, while QWGR contributes i|i\rangle8 time and i|i\rangle9 space. The overall complexity is summarized as

Gi=(Vi,Ei)G_i=(V_i,E_i)00

with memory

Gi=(Vi,Ei)G_i=(V_i,E_i)01

The paper states that for moderate or large graphs the CTQW term Gi=(Vi,Ei)G_i=(V_i,E_i)02 dominates, and that no special approximation for Gi=(Vi,Ei)G_i=(V_i,E_i)03 is assumed in the analysis (Li et al., 10 May 2026).

The experimental setup uses TU benchmark datasets: MUTAG, PTC(MR), PROTEINS, DD, IMDB-B, and IMDB-M. For IMDB-B and IMDB-M, which have no original node features, normalized log-degree is used as the feature; for the other datasets, normalized log-degree is appended to existing features. Training uses 10-fold cross-validation, typically Gi=(Vi,Ei)G_i=(V_i,E_i)04 CTQWformer layers, Gi=(Vi,Ei)G_i=(V_i,E_i)05 time steps, hidden dimension Gi=(Vi,Ei)G_i=(V_i,E_i)06, dropout Gi=(Vi,Ei)G_i=(V_i,E_i)07, Adam with learning rate Gi=(Vi,Ei)G_i=(V_i,E_i)08, and 300 epochs with early stopping. Hyperparameters are slightly tuned per dataset, especially Gi=(Vi,Ei)G_i=(V_i,E_i)09 and Gi=(Vi,Ei)G_i=(V_i,E_i)10 (Li et al., 10 May 2026).

Against graph kernels, CTQWformer achieves the best performance on 5 of 6 datasets. The reported accuracies are Gi=(Vi,Ei)G_i=(V_i,E_i)11 on MUTAG, Gi=(Vi,Ei)G_i=(V_i,E_i)12 on PTC(MR), Gi=(Vi,Ei)G_i=(V_i,E_i)13 on PROTEINS, Gi=(Vi,Ei)G_i=(V_i,E_i)14 on DD, Gi=(Vi,Ei)G_i=(V_i,E_i)15 on IMDB-B, and Gi=(Vi,Ei)G_i=(V_i,E_i)16 on IMDB-M. The only dataset where a listed kernel is higher is IMDB-M, where HAQJSK reaches Gi=(Vi,Ei)G_i=(V_i,E_i)17 (Li et al., 10 May 2026).

Against GNN and Graph Transformer baselines, the picture is mixed but favorable overall. CTQWformer is highest on MUTAG, DD, and IMDB-B; on PTC(MR) it is essentially tied with GRIT, which reports Gi=(Vi,Ei)G_i=(V_i,E_i)18 versus CTQWformer’s Gi=(Vi,Ei)G_i=(V_i,E_i)19; on PROTEINS it is slightly below Graphormer, which reports Gi=(Vi,Ei)G_i=(V_i,E_i)20 versus Gi=(Vi,Ei)G_i=(V_i,E_i)21; and on IMDB-M it is below GraphGPS and GCN. The paper characterizes the model as competitive or superior to strong GNN and graph Transformer baselines, especially on bioinformatics datasets and IMDB-B (Li et al., 10 May 2026).

Ablation studies on MUTAG, PTC(MR), and PROTEINS show that removing QWGR causes the largest drop: on MUTAG performance falls from Gi=(Vi,Ei)G_i=(V_i,E_i)22 to Gi=(Vi,Ei)G_i=(V_i,E_i)23, on PTC(MR) from Gi=(Vi,Ei)G_i=(V_i,E_i)24 to Gi=(Vi,Ei)G_i=(V_i,E_i)25, and on PROTEINS from Gi=(Vi,Ei)G_i=(V_i,E_i)26 to Gi=(Vi,Ei)G_i=(V_i,E_i)27. Removing QWGT also reduces performance, but less severely. The reported interpretation is that temporal modeling of CTQW evolution is crucial, while CTQW-based structural bias is beneficial but less dominant than temporal patterns. Hyperparameter sensitivity studies further indicate that moderate Gi=(Vi,Ei)G_i=(V_i,E_i)28 and shallow depth work best: on MUTAG accuracy peaks at Gi=(Vi,Ei)G_i=(V_i,E_i)29 and Gi=(Vi,Ei)G_i=(V_i,E_i)30, while deeper settings tend to reduce performance, likely because of overfitting or over-smoothing (Li et al., 10 May 2026).

6. Interpretation, limitations, relation to prior work, and terminological ambiguity

The paper’s interpretive claim is that CTQW dynamics encode how probability amplitude propagates globally under interference, thereby revealing multi-path connectivity, spectral properties of the Laplacian-based Hamiltonian, and both local neighborhoods at early times and global structures at later times. Within CTQWformer, the static and dynamic pathways are separated analytically: QWGT uses a final-time bias matrix Gi=(Vi,Ei)G_i=(V_i,E_i)31 that can be viewed as a physically meaningful connectivity prior, while QWGR models node-level temporal oscillations through self-return dynamics. The reported ablations indicate that the temporal component contributes more strongly to classification accuracy, which suggests that the dynamic signature of CTQW contains discriminative information not recoverable from a single structural snapshot (Li et al., 10 May 2026).

The architecture also has an interpretability argument. Since CTQW propagation probabilities Gi=(Vi,Ei)G_i=(V_i,E_i)32 are explicit, high values of Gi=(Vi,Ei)G_i=(V_i,E_i)33 indicate strong dynamic connectivity at time Gi=(Vi,Ei)G_i=(V_i,E_i)34, and diagonal sequences Gi=(Vi,Ei)G_i=(V_i,E_i)35 indicate how “central” or “trapped” a node is across time. The paper does not include visual case studies, but it presents these quantities as inherently interpretable physically meaningful diffusion patterns (Li et al., 10 May 2026).

The principal limitations are also explicit. Scalability is constrained by dense CTQW simulation, since the dominant term is Gi=(Vi,Ei)G_i=(V_i,E_i)36. Performance is sensitive to the number of time steps Gi=(Vi,Ei)G_i=(V_i,E_i)37 and layers Gi=(Vi,Ei)G_i=(V_i,E_i)38, and too-large values can degrade accuracy. The trainable Hamiltonian also depends heavily on node features, and the paper suggests that this contributes to weaker performance on feature-poor datasets such as IMDB-M. Future directions proposed by the authors include more efficient approximations of Gi=(Vi,Ei)G_i=(V_i,E_i)39, exploiting sparsity or low-rank structure of Gi=(Vi,Ei)G_i=(V_i,E_i)40, richer integrations of quantum walk dynamics into GNNs and Transformers, and extending the framework to node classification, link prediction, and dynamic or temporal graphs (Li et al., 10 May 2026).

In relation to prior work, CTQWformer is positioned against two families. The first is quantum-inspired graph learning based on fixed CTQW kernels such as JTQK, QJSK, HAQJSK, and AERK, which use non-trainable similarity measures or separate quantum components. The second is graph Transformer work such as Graphormer, GraphGPS, and GRIT, which encode structure through shortest paths, centrality, random-walk distributions, or related priors. CTQWformer’s novelty claims are threefold: a trainable Hamiltonian Gi=(Vi,Ei)G_i=(V_i,E_i)41 that combines topology and features, a hybrid CTQW-based Transformer in which final-time probabilities bias attention and temporal evolution is modeled by a BiGRU, and an end-to-end architecture that jointly learns CTQW dynamics and task-specific graph representations (Li et al., 10 May 2026).

A possible source of confusion is the term itself. Another paper, on the “convolutional transformer wave function (CTWF),” states that “CTQWformer” is not a term used in that work, but a natural label for a Convolutional Transformer Quantum Wavefunction. That usage refers to a neural quantum state architecture for lattice quantum many-body problems rather than to the CTQW-based graph-classification model described above (Chen et al., 13 Mar 2025). The overlap is therefore terminological rather than methodological. In current arXiv usage represented by these two papers, CTQWformer properly denotes the CTQW-based Transformer for graph classification, while CTWF denotes the convolutional transformer wave function model for variational quantum Monte Carlo and time-dependent variational simulations (Li et al., 10 May 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to CTQWformer.