Introduction
In graph machine learning, node embedding is a foundational task that maps nodes into dense vector spaces while preserving topological relationships. Standard algorithms like DeepWalk and node2vec rely on classical random walks to capture two primary graph properties: homophily (local similarity, captured via Breadth-First Search/BFS) and structural equivalence (role-based similarity, captured via Depth-First Search/DFS). While effective, classical walks propagate slowly. Quantum walks offer a promising alternative due to their quadratically faster propagation, but they naturally favor DFS, often obscuring the local neighborhood details essential for accurate classification.
The QWalkVec Framework
To address this imbalance, the authors propose QWalkVec, a novel node embedding algorithm that leverages quantum walks while maintaining control over the BFS/DFS trade-off. The core innovation lies in the design of node-specific coin operators. By embedding return ($w_p$) and in-out ($w_q$) parameters directly into the quantum coin, the algorithm can steer the walker's probability amplitudes to either revisit local neighborhoods or explore distant structures.
As shown in the methodology, the walk is initialized in a superposition state across all nodes, bypassing classical sampling constraints. For each source node, the probability distribution over a walk length $t$ is recorded in a matrix $\Phi^{v_0}$. These individual representations are then aggregated into a final feature matrix $\Phi$, which serves as the input for downstream classification tasks.
Structural Equivalence and Hub Dynamics
A key insight of this work is that quantum walks inherently act as powerful DFS mechanisms. When a quantum walk is allowed to propagate in superposition, it naturally highlights structurally equivalent hub nodes. This property is particularly useful for identifying the "skeleton" of a graph but requires the aforementioned coin tuning to prevent the loss of local community data.
Experimental Results
QWalkVec was evaluated against DeepWalk and node2vec on several real-world datasets, including the Karate Club, Webkb, and IIPs graphs.
- Superior Accuracy on Hub-Heavy Graphs: QWalkVec achieved 100% accuracy on the Karate Club dataset (Macro $F_1$ score, 80% training ratio), outperforming node2vec (99%) and DeepWalk (96%). On the Webkb dataset, it reached a 39% Macro $F_1$ score, significantly higher than its classical counterparts.
- Faster Convergence: Due to the faster diffusion of quantum walks (where variance $\sigma^2 \sim t^2$), QWalkVec reaches peak performance at significantly shorter walk lengths than classical methods. This validates the theoretical advantage of quantum propagation in capturing graph topology efficiently.
- Performance on Uniform Graphs: On graphs lacking prominent hub structures, such as IIPs, classical node2vec marginally outperformed QWalkVec, suggesting that the quantum advantage is most pronounced in graphs with high structural variance.
Conclusion and Future Work
QWalkVec demonstrates that quantum walks can be successfully adapted for node embedding by using parameterized coin operators to balance local and global search dynamics. While the algorithm shows clear advantages in hub detection and convergence speed, future research is needed to determine the optimal number of quantum measurements ("shots") required for large-scale graphs and to explore its utility in tasks like community detection.
Summary updated