Out-of-Distribution Detection in Hybrid Quantum Models Using Energy Scores and Measurement Uncertainty

Andi Muhammad Sadat
Faculty of Economics and Business, Universitas Negeri Jakarta, Indonesia
Cokki Cokki
Postgraduate Program in Management Science, Tarumanagara University, Indonesia

Hybrid quantum–classical models deployed in open-world settings require reliable out-of-distribution detection under finite-shot measurement noise, where identical inputs can induce materially different logits across repeated circuit executions. This study evaluates three scoring rules, namely softmax confidence, energy scoring, and uncertainty-aware energy scoring, using a consistent validation-threshold protocol and multi-source OOD testing. Across three OOD shift families, uncertainty-aware energy achieved source-wise AUROC values of 0.953 (semantic shift), 0.942 (corruption shift), and 0.936 (background shift), compared with 0.941, 0.923, and 0.916 for energy-only scoring, and 0.902, 0.884, and 0.864 for softmax confidence. Aggregated over sources, uncertainty-aware energy reached AUROC 0.944 and AUPR 0.931, reducing FPR95 to 0.152, while energy-only produced AUROC 0.927, AUPR 0.914, and FPR95 0.193, and softmax yielded AUROC 0.883, AUPR 0.861, and FPR95 0.279. In-distribution classification remained stable with accuracy 0.898–0.902 across scoring variants, indicating that detection gains were not driven by degraded classification performance. Measurement-budget analysis shows that uncertainty-aware scoring substantially improves low-shot reliability. At 64 shots per observable, energy-only achieved AUROC 0.894 with FPR95 0.251, whereas uncertainty-aware energy reached AUROC 0.929 with FPR95 0.171, while the energy-score dispersion decreased monotonically from 0.42 at 64 shots to 0.17 at 1024 shots. As shot budgets increased, energy-only performance improved, but uncertainty-aware energy retained a consistent advantage, indicating that variance penalization improves score ordering, not only score variance. Architecture ablations further identify a practical expressivity–stability tradeoff: an intermediate-scale circuit (8 qubits, depth 6, brickwork entanglement) attained AUROC 0.949 with FPR95 0.149 and in-distribution accuracy 0.903, whereas further scaling (10 qubits, depth 6) produced AUROC 0.946 with higher FPR95 0.154 and increased score dispersion. Calibration behavior improved concurrently, with ECE reduced from 0.061 (softmax) to 0.044 (energy) and 0.036 (uncertainty-aware energy), supporting more stable operating points under threshold transfer. These findings demonstrate that integrating measurement uncertainty into energy-based scoring provides a robust control mechanism for hybrid quantum OOD detection, particularly under constrained shot budgets and measurement noise.

Muhammad Sadat, A., & Cokki, C. (2026). Out-of-Distribution Detection in Hybrid Quantum Models Using Energy Scores and Measurement Uncertainty . Journal of Quantum Artificial Intelligence, 1(3), 267–287. https://doi.org/10.63913/jqai.v1i3.18
Views 88
PDF Downloads 45
Dimensions Citations

Citation data is supplied by Dimensions. New or unindexed publications may not yet have citation metrics.

References are not available for this article.