arXiv:2609.11736quant-phSep 2026

Manuscript Offprint

arXiv:2609.11736

Learning structural balance of graphs from quantum spectral features

Stefano Scali, Oleksandr Kyriienko

Stefano Scali 1,∗^{1,*} and Oleksandr Kyriienko 2^{2}

1^{1}Department of Physics and Astronomy, University of Exeter, Exeter EX4 4QL, UK

2^{2}School of Mathematical and Physical Sciences, University of Sheffield, Sheffield S10 2TN, UK

We develop a quantum approach to spectral feature extraction from the density of states (DOS) of a problem-dependent Hamiltonian, and apply it to machine learning on signed graphs. We propose to embed a signed graph as an Ising model instance with positive and negative interactions, and use the standardized moments of the Ising DOS as features for learning. We show that these moments count signed closed walks, are switching-invariant, and are size-free by construction. As a benchmark, we target learning the frustration index, an NP-hard measure of structural balance that can be labeled exactly at moderate size. At zero field, the models can be sampled classically, allowing the quantum extraction procedure to be certified against exact ground truth. We propose DOS-QPE, a phase estimation on a purified maximally mixed probe, which samples the spectral density with orders of magnitude fewer shots than Hadamard test-based trace sampling and feeds the resulting features directly into classically trained models. On 1.4×1051.4 \times 10^5 labeled graphs the exact DOS determines the frustration index, and five moments recover it with a mean error of 0.4, well below one sign flip. Beyond zero field, the underlying trace-estimation problem is DQC1-complete, providing access to spectral features for which no efficient classical sampling method is known. Our work opens routes towards quantum applications in social network balance analysis, spin-glass studies, correlation clustering, and protein-interaction networks.

I. INTRODUCTION

Machine learning models for graphs rely on informative features, and spectral features are among the most effective. The spectra of adjacency and Laplacian operators summarize connectivity in a permutation-invariant way and underpin graph kernels and spectral embeddings [1]. Spectral convolutions built on the graph Laplacian power graph neural networks [2, 3], leading modularity eigenvectors enable community detection [4, 5], and combinatorial Laplacian spectra encode Betti numbers in topological data analysis [6–8]. A recurring object is the density of states (DOS), a global, basis-invariant spectral summary that quantum protocols can estimate directly without diagonalization [7, 9].

One direction that has received much less attention is that of signed graphs. Here every edge carries a positive or negative label, describing systems built on antagonistic pairwise relations: alliances and rivalries in social networks [10–12], correlation structures of financial assets [13], and quenched couplings of spin glasses [14–16]. A signed graph G is balanced when every cycle contains an even number of negative edges, and the frustration index L(G)L(\mathcal{G}) measures the distance from balance: the minimum number of edge signs one has to flip to reach it. Computing L is NP-hard [15, 17], since it generalizes MAXCUT, which one recovers when all edges are negative. Integer programming solves moderate instances exactly [18], and signed-graph problems have recently drawn attention from the quantum side [19–22]. However, spectral feature sets designed for signed graphs remain scarce [23], even though the sign structure is precisely where quantities like structural balance reside.

Here, we develop a DOS-based quantum feature extraction and learning approach for signed graphs [Fig. 1]. The signed graph is embedded as an Ising Hamiltonian, closely related to Hamiltonian-based encodings for other graph problems [24, 25]. The relevant features are represented by the standardized moments of the Hamiltonian DOS. This construction matches the symmetry of the problem. The moments count signed closed walks through an exact combinatorial identity and are invariant under switching, the gauge transformation that preserves the frustration index. We benchmark the developed approach on the frustration index itself. Although NP-hard in the worst case, it can be labeled exactly at moderate sizes, allowing every prediction to be scored against ground truth. Across a dataset of 1.4×1051.4 \times 10^{5} exactly labeled graphs, the exact DOS determines L, with no two graphs sharing a density of states while differing in frustration index. A regressor using five moments recovers L with a mean absolute error below 0.4 sign flips at n = 12 vertices across seventeen classes, while edge and triangle counting incurs twice the error on the same splits. The standardized moments are size-free, allowing the model to transfer across graph sizes and from synthetic ensembles to real-world signed networks.

We highlight that the required features can be extracted natively on quantum hardware, providing access to the DOS without diagonalization. To this end, we simulate two quantum feature extraction routes. The first is a near-term approach that samples the trace of time evolution through Hadamard tests [7]. The second, introduced here as DOS-QPE, targets early fault-tolerant devices and applies quantum phase estimation (QPE) to a purified maximally mixed probe, so that each shot samples directly from the spectral density. Ref. [9] formalizes the corresponding estimation theory and extends the probe beyond maximal mixing. We show that DOS-QPE

Figure

Figure 1. The DOS feature pipeline for signed graphs. A signed graph G\mathcal{G} (positive edges solid, negative edges dashed) is encoded in its native Ising Hamiltonian, Eq. (6). The density of states of HH is sampled by either arm of the pipeline: classically, by exact enumeration or Monte Carlo over uniform vertex 2-colorings (Proposition 1), or on quantum hardware, by trace sampling or by the DOS-QPE circuit of Fig. 5. Five spectral moments of the sampled density form the feature vector ϕ(G)\phi(\mathcal{G}) of Eq. (3), which is switching-invariant and size-free by construction and feeds a classically trained model; we benchmark on the frustration index L(G)L(\mathcal{G}), for which exact labels are available.

reaches the noiseless-feature ceiling with orders of magnitude fewer shots than trace sampling and allows its output to be used directly by classically trained models without retraining. At zero field, the pipeline can also be simulated classically. We prove that the DOS is sampleable with one edge-list pass per draw (Proposition 1), allowing feature generation at arbitrary graph size while certifying the quantum routes against exact ground truth. For general dynamics, estimation of the normalized trace of the evolution is complete for the one-clean-qubit class (DQC1) [26, 27] and is therefore believed to be classically intractable, while the same feature extraction remains available on quantum hardware. We also show that the choice of encoding is essential: the line-graph (spin-ice) alternative is switching-blind, with a spectrum that carries no sign information (Appendix A).