Quantum Negative Sampling Strategy for Knowledge Graph Embedding with Variational Circuit

Pulak Ranjan Giri, Mori Kurokawa, Kazuhiro SaitoQCE 2023

Introduction

Knowledge Graphs (KGs) represent information as structured triples $(h, r, t)$, where $h$ is the head entity, $r$ is the relation, and $t$ is the tail entity. To leverage this data in machine learning, Knowledge Graph Embedding (KGE) techniques map these entities and relations into a continuous vector space. A critical component of training KGE models is negative sampling—the generation of "fake" triples to help the model distinguish between true and false facts. However, as KGs scale, classical negative sampling becomes a computational bottleneck. This paper proposes a quantum-enhanced strategy using Variational Quantum Circuits (VQCs) to perform negative sampling more efficiently through quantum superposition.

Methodology

The proposed framework utilizes a hybrid quantum-classical approach. Entities are represented as quantum states, and relations are modeled as unitary operators within a Hilbert space of dimension $d = 2^n$, where $n$ is the number of qubits.

Variational Quantum Circuit (VQC)

The model employs a VQC to map entities into the quantum state space. The "truthiness" of a triple is evaluated using a scoring function based on the fidelity (overlap) between the transformed head entity and the target tail entity.

The proposed quantum circuit architecture for Knowledge Graph Embedding.

Quantum Negative Sampling

The core innovation lies in the scoring function designed for negative sampling. Unlike classical methods that evaluate negative triples individually, the quantum approach exploits superposition. By preparing a state that represents a distribution of multiple negative tails, the model can evaluate and learn from multiple "fake" facts simultaneously. This structural difference allows the model to capture complex boundaries in the embedding space more effectively than traditional batching.

Experimental Evaluation

The researchers benchmarked their model using the UMLS (Unified Medical Language Systems) dataset, which consists of 135 entities and 46 relations. The dataset was split into 5,216 training, 652 validation, and 661 test triples.

Results

The performance was measured using standard KGE metrics: Mean Reciprocal Rank (MRR) and Hits@N. The results demonstrate that even with a limited number of qubits, the quantum model achieves competitive performance.

Comparison of the quantum model against classical state-of-the-art methods on the UMLS dataset.

As shown in the table above, the 4-qubit quantum model achieved an MRR of 74.3, closely approaching the performance of the classical NeuralLP model (MRR 77.8). While it currently trails the state-of-the-art ConvE model, the authors highlight that the quantum model's performance scales significantly with the number of qubits. The jump from 2 to 4 qubits provided a substantial boost, suggesting that higher-dimensional quantum simulations could bridge the gap with classical SOTA.

Discussion and Key Insights

A primary advantage of the quantum approach is its scaling complexity. While classical models typically scale polynomially with the embedding dimension ($O(poly(d))$), the quantum model scales logarithmically ($O(poly(\log d))$). This logarithmic scaling suggests a significant potential advantage for high-dimensional data as quantum hardware matures.

However, current limitations include the computational cost of simulating quantum circuits on classical hardware, which restricted the study to 4 qubits. Future work will focus on increasing the qubit count, exploring more expressive circuit architectures, and testing the strategy on larger, more diverse datasets.

Conclusion

This research demonstrates the feasibility of using quantum superposition for negative sampling in KGE. By leveraging VQCs, the proposed model achieves performance levels comparable to established classical methods using only a handful of qubits, paving the way for more efficient knowledge representation in the quantum era.

Summary updated

BibTeX
@inproceedings{giri2023quantum,
  author = {Pulak Ranjan Giri and Mori Kurokawa and Kazuhiro Saito},
  title = {{Quantum Negative Sampling Strategy for Knowledge Graph Embedding with Variational Circuit}},
  booktitle = {QCE},
  year = {2023},
  doi = {10.1109/qce57702.2023.10242},
}
Figure