Small quantum classifiers are being tried on problems where the rare class is what matters, such as loan defaults, toxic compounds and tumor patches. The quantity people report on these problems is a ranking metric, AUC: the chance that a randomly chosen positive example scores above a randomly chosen negative one. No published quantum classifier in this space trains for AUC. It trains with ordinary per-example losses and computes AUC afterwards. We argue this mismatch is worse on quantum hardware than on classical hardware, for a specific reason. On a quantum device, every forward pass and every gradient costs repeated measurements of the circuit (called "shots"), so the real training budget is total shots. A shot budget forces very small batches. AUC is defined over positive–negative pairs, and a batch of four examples drawn from data with 15% positives often contains no positive at all, so batch-level AUC estimates are exactly where they break down.
The proposal is to train parameterized quantum circuits directly for AUC using the classical primal–dual reformulation. That reformulation turns the pairwise objective into a sum over single examples plus a few scalar "dual" variables, which a classical computer tracks as running class-conditional statistics. With this rewriting, one example per step is enough. It also exposes the gradient's variance class by class, which lets us derive a class-aware rule for how many shots each example should receive. The method has three parts: the quantum circuit updates its angles, the classical computer holds the duals, and a shot allocator spends measurements where the gradient variance actually lives. We will test whether this beats the obvious alternative, which is to train with cross-entropy, recalibrate the output, and read AUC off the scores, when both approaches get the same total number of shots.
Core Claim
Under a fixed shot budget on imbalanced data, a single-example primal–dual AUC trainer with class-aware shot allocation reaches higher test AUC per shot than three alternatives: cross-entropy or square-loss training followed by recalibration, mini-batch pairwise AUC losses, and uniform shot allocation. We make no claim that quantum classifiers beat classical ones. The question is how to train a quantum classifier for the metric people actually report, given that shots are the currency.
What exists and what is missing
The classical side supplies the method. Fast Stochastic AUC Maximization with O(1/n)-Convergence Rate (FSAUC) rewrites the square-loss AUC surrogate as a saddle-point problem that can be solved from a stream of single examples at an $O(1/n)$ rate. Variance Reduced Stochastic Proximal Algorithm for AUC Maximization (VRSPAM) adds variance-reduction anchors in the style of the stochastic variance-reduced gradient method (SVRG) and obtains linear convergence for strongly convex models. Federated Deep AUC Maximization for Hetergeneous Data with a Constant Communication Complexity shows that keeping the dual statistics separate from the model parameters survives non-convex models and split computation. We reuse the saddle-point form from these papers. All three assume that the model's output on an example can be computed exactly. On a quantum device the output is only an estimate from finite shots, and our work starts from that difference.
On the quantum side, several papers motivate the gap without closing it. Histopathological Cancer Detection Using Hybrid Quantum Computing feeds ResNet18 features into a variational circuit and reports AUC of about 0.93 on a subset of the PCam tumor-patch dataset. Hybrid Quantum-Classical Neural Networks for Few-Shot Credit Risk Assessment trains a 3-feature circuit on 279 loans, 14.6% of which defaulted, and reports AUC. Both train with cross-entropy or squared error and treat AUC only as a score computed afterwards. QCS-ADME changes only how candidate circuits are scored before training, by class-weighting a circuit-quality measure. That paper also serves as a warning: on HIA_Hou and BBB_Martins its class-weighted score correlated positively with test loss, which the authors attribute to minority-class label noise. We take this as a caution that pushing weight onto rare examples can amplify noise, and our allocation rule has to be checked against it.
Two further lines constrain the design. Barren plateaus in quantum neural network training landscapes shows that gradient variance in randomly initialized deep circuits shrinks like $2^{-n}$ in the number of qubits $n$. This keeps us to shallow circuits on 3–8 qubits, where the gradient signal is not already buried in shot noise. Quantum Speedups for Minimax Optimization and Beyond proves query speedups for saddle-point problems, but only with fault-tolerant function oracles. It never mentions AUC and cannot run on current devices, so it shares a formulation with our work but not a method.
Research Program
The circuit produces a score $h_\theta(x)\in[-1,1]$, the measured expectation of one qubit, where $\theta$ are the gate angles. Let $p$ be the fraction of positive examples. The square-loss AUC surrogate used by FSAUC can be written as a sum over single examples:
$$\min_{\theta,a,b}\max_{\alpha}\ \mathbb{E}\big[(1-p)(h-a)^2\mathbb{1}_{y=1} + p(h-b)^2\mathbb{1}_{y=-1} + 2(1+\alpha)\big(p\,h\,\mathbb{1}_{y=-1}-(1-p)\,h\,\mathbb{1}_{y=1}\big) - p(1-p)\alpha^2\big].$$
Here $h=h_\theta(x)$. At the optimum, $a$ and $b$ equal the mean scores of the positive and negative classes, and $\alpha$ tracks the gap between those means. The classical computer holds $(a,b,\alpha)$ and updates them cheaply. The quantum device supplies two things for each example: a score estimate, and a gradient $\partial h/\partial\theta$ estimated with the parameter-shift rule, which evaluates the circuit at two shifted angles per parameter. The full gradient is a scalar coefficient $c(x,y)=\partial F/\partial h$ multiplied by $\partial h/\partial\theta$. We measure the coefficient and the gradient with independent shots, because reusing the same shots would bias the product.
The shot allocation rule follows from this structure. Positives have coefficients proportional to $1-p$ and negatives proportional to $p$. Suppose we minimize the summed gradient variance $\sum_i c_i^2\sigma_i^2/M_i$, where $M_i$ is the number of shots given to example $i$ and $\sigma_i^2=1-h_i^2$ is the per-shot measurement variance, subject to a fixed expected shot budget. Solving with a Lagrange multiplier gives
$$M_i \propto |c_i|\,\sigma_i,$$
which is the standard optimal-allocation rule from survey sampling. At $p=0.146$, as in the credit data, this gives a positive example roughly $(1-p)/p\approx 5.8$ times the shots of a negative one, before accounting for how close each score already is to its class mean. We will build this allocator, study its interaction with the label-noise failure seen in QCS-ADME, and test one natural extension of Gap 3 from the classical literature. That extension is a variance-reduced version with SVRG-style anchors. Our prediction is that its advantage disappears once the gradient variance falls to the level set by shot noise, and we will locate that crossover empirically as a function of shots per step.
Everything runs first on simulators with shot noise and realistic noise models: depolarizing gate noise and readout error at levels matched to published superconducting devices. We keep the circuit family fixed to data re-uploading layers with trainable two-qubit gates, following QMLP, so that the training method is the only thing that varies. If simulation results are positive, we will run a small confirmation on hardware using the credit task, the only one in the file with a published hardware result.
Baselines
The naive reference point is the setup existing papers use: a circuit trained with cross-entropy under uniform shots, scored by AUC on held-out data. On the credit task, Hybrid Quantum-Classical Neural Networks for Few-Shot Credit Risk Assessment reports AUC 0.852 ± 0.027 across 10 cross-validation partitions in simulation and 0.88 on the ScQ-P21 processor. We reproduce it with their 3-feature reduction and their 10-fold splits.
The strongest competitor is the two-stage "plug-in" approach. The classical theory behind it comes from Narasimhan et al., Koyejo et al., Kotlowski and Dembczynski et al., which show that minimizing a strongly proper loss such as cross-entropy bounds the loss on the target metric, so no special training is needed. We give it every advantage: cross-entropy training, a learned classical affine readout (Platt scaling) to absorb noise that shrinks or shifts outputs, class-balanced sampling, and its own tuning budget. It is the strongest competitor because AUC depends only on the ordering of scores, so a well-trained probability model should already rank well. To beat it, our method must reach higher mean test AUC at equal total shots, with the gap larger than the fold-to-fold standard deviation, on at least two of the three tabular tasks. Reaching the same AUC with clearly fewer shots also counts.
A third baseline is a mini-batch pairwise loss that sums a squared-hinge penalty over the positive–negative pairs within each batch, run at the same shot budget. This isolates whether the single-example rewriting matters.
Two ablations isolate the key ingredients: the primal–dual trainer with uniform shots, which removes the allocator, and the allocator applied to cross-entropy, which tests whether the benefit belongs to the allocation rule rather than the objective. As a classical ceiling, we train logistic regression and a small MLP with FSAUC on the same reduced features. For code correctness, we rerun the classical VRSPAM setting on ijcnn1, where that paper reports AUC 0.9750. All methods share identical splits, the same number of hyperparameter configurations, and the same total shot count, including shots spent on validation.
Why not just…?
Why not just train with cross-entropy and read AUC off the scores? This is the real threat. The plug-in theory says it should work asymptotically, and a learned affine readout absorbs the global contraction of outputs that depolarizing and readout noise cause. Our case against it is specific to small budgets. Under a shot budget, cross-entropy spends measurements equally on majority-class examples it already classifies confidently, while AUC's gradient concentrates on the minority class. Cross-entropy with class-aware shots is included as an ablation. If that combination matches our method, we will report that the benefit comes from shot allocation and not from the AUC objective.
Why not just reweight or oversample the minority class? Reweighting changes which examples the loss emphasizes. It does not change the fact that the loss is per-example rather than pairwise, and QCS-ADME found that minority weighting can track label noise instead of signal. Class-balanced sampling is already folded into the plug-in baseline. We also check directly whether our allocator degrades when 10% of minority labels are flipped, since that is the failure mode QCS-ADME reported.
Why not just use a classical model? On 3 to 8 features a classical model may well win, and we report that ceiling openly. The contribution concerns how quantum classifiers should be trained for the metrics that are reported for them. It becomes irrelevant only if quantum classifiers themselves are, and that question sits outside this proposal.
Proposed Experiments
We run four tasks. The first is the credit-default set: 279 loans, 3 features, 14.6% positives. The second and third are TDC BBB_Martins and HIA_Hou, using MACCS-key fingerprints reduced to 8 features by PCA. On BBB_Martins, circuits selected by QCS-ADME reach PR-AUC ≈ 92%, and we report PR-AUC alongside AUC. The fourth is PCam with frozen ResNet18 features reduced to 8 dimensions, used as a check at larger sample size; the PCam hybrid paper reports AUC ≈ 0.93, though under different reduction and budget choices, so it is context rather than a matched target.
The central output is a curve of test AUC against total shots, spanning roughly $10^5$ to $10^8$ shots, for every method, both without noise and under two noise levels. Three checks decide the outcome. First, the primal–dual trainer with the allocator must dominate the calibrated plug-in curve at low budgets on the credit and BBB tasks. Second, uniform-shot primal–dual training must fall between the two, which would confirm that the allocation rule carries part of the gain. Third, the variance-reduced version should improve on plain primal–dual training only while shots per step are large enough that sampling variance, and not measurement noise, dominates the gradient. Our derivation predicts where that crossover lies, and we will compare the observed crossover against it. If the first check fails, we will conclude that the plug-in approach is the right way to train quantum classifiers for AUC, and the shot-budget analysis stands as the main result.
References
- Fast Stochastic AUC Maximization with O(1/n)-Convergence Rate
- Variance Reduced Stochastic Proximal Algorithm for AUC Maximization
- Federated Deep AUC Maximization for Hetergeneous Data with a Constant Communication Complexity
- Histopathological Cancer Detection Using Hybrid Quantum Computing
- Hybrid Quantum-Classical Neural Networks for Few-Shot Credit Risk Assessment
- QCS-ADME: Quantum circuit search for drug property prediction with imbalanced data and regression adaptation
- Barren plateaus in quantum neural network training landscapes
- Quantum Speedups for Minimax Optimization and Beyond
- QMLP: An Error-Tolerant Nonlinear Quantum MLP Architecture using Parameterized Two-Qubit Gates
- On the Statistical Consistency of Plug-in Classifiers for Non-decomposable Performance Measures
- Consistent Multilabel Classification
- Consistent optimization of AMS by logistic loss minimization
- Surrogate regret bounds for generalized classification performance metrics