Quantum algorithms for hedging and the learning of Ising models

Patrick Rebentrost, Yassine Hamoudi, Maharshi Ray, Xin Wang, Siyi Yang, Miklós SánthaPhysical 2021 · DOI

Abstract

A paradigmatic algorithm for online learning is the Hedge algorithm by Freund and Schapire. An allocation into different strategies is chosen for multiple rounds and each round incurs corresponding losses for each strategy. The algorithm obtains a favorable guarantee for the total losses even in an adversarial situation. This work presents quantum algorithms for such online learning in an oracular setting. For $T$ time steps and $N$ strategies, we exhibit run times of about $O\left(\mathrm{poly}(T)\sqrt{N}\right)$ for estimating the losses and for betting on individual strategies by sampling. In addition, we discuss a quantum analog of the Sparsitron, a machine learning algorithm based on the Hedge algorithm. The quantum algorithm inherits the provable learning guarantees from the classical algorithm and exhibits polynomial speedups. The speedups may find relevance in finance, for example, for hedging risks, and machine learning, for example, for learning generalized linear models or Ising models.

Introduction

In online learning, the Hedge algorithm serves as a foundational method for decision-making under uncertainty. Consider a scenario where an agent allocates wealth across $N$ different strategies over $T$ rounds. Each round, the agent observes losses and updates their strategy weights accordingly. Classically, updating and storing these weights requires $O(N)$ operations per round, which becomes a significant bottleneck as the number of strategies or features grows.

This research addresses this scalability issue by introducing quantum algorithms for online learning. Beyond hedging, the authors apply these techniques to the Inverse Ising Problem—learning the interaction strengths of a physical system from samples. While classical approaches for this problem typically scale quadratically with the number of variables ($O(N^2)$), the proposed quantum methods offer a path toward more efficient high-dimensional optimization.

Quantum Methods for Online Learning

The core contribution involves translating classical "multiplicative weight update" (MWU) routines into a quantum framework using an oracular setting. The algorithms assume access to quantum oracles that provide loss information in superposition, avoiding the need to explicitly write down the full $N$-dimensional weight vector.

The Quantum Hedge Algorithm

The quantum version of the Hedge algorithm leverages Quantum Amplitude Estimation (QAE) and Quantum Minimum Finding. QAE is used to estimate the total loss of a portfolio and to sample from the updated probability distribution. Minimum finding ensures numerical stability during weight rescaling, preventing the "loss" of signal as weights diminish exponentially.

Algorithm for online learning with transaction costs, showing deterministic and sampled flags.

The Quantum Sparsitron

The authors also develop a quantum variant of the Sparsitron, a sparse learner for Generalized Linear Models (GLMs). Instead of explicit weight storage, the quantum Sparsitron maintains inner product estimates and utilizes them to prepare quantum states representing the model.

Sparsitron algorithm with risk approximation, illustrating the iterative update and sampling structure.

Key Insights

  • Passive vs. Active Learning: The paper distinguishes between "passive" estimation (calculating potential losses) and "active" betting (sampling a strategy for execution). Both processes achieve a $\sqrt{N}$ speedup.
  • Avoiding the $O(N)$ Bottleneck: By tracking the history of losses rather than the weight vector itself, the quantum computer reconstructs weight properties on-the-fly via state preparation.
  • Dimension-Precision Trade-off: While the quantum algorithms significantly improve scaling with respect to the dimension $N$, they often exhibit higher sensitivity to the number of rounds $T$ and the precision parameter $\epsilon$. This makes them ideal for "wide" problems with many features.

Results and Complexity Analysis

The quantum algorithms provide polynomial speedups across several domains:

  • Hedge Algorithm: Achieves a runtime of approximately $\tilde{O}(T^2 \sqrt{N})$, a quadratic improvement over the classical $O(TN)$.
  • Sparsitron: The Quantum Sparsitron reaches a complexity of $\tilde{O}(\frac{\sqrt{N}}{\epsilon^7})$, compared to the classical approximate version's $\tilde{O}(\frac{N}{\epsilon^2} + \frac{1}{\epsilon^6})$.
  • Ising Models: Learning an $N$-variable Ising model is reduced to $\tilde{O}(N^{1.5})$, improving upon the best classical bound of $O(N^2)$.

Limitations and Future Outlook

Despite the theoretical speedups, several hurdles remain for practical implementation. The reliance on efficient quantum oracles or QRAM is a potential bottleneck. Furthermore, the speedups are polynomial rather than exponential, implying that high-fault-tolerant quantum hardware will be necessary to realize these gains. Future research may focus on optimizing the $\epsilon$ dependency and adapting these algorithms for the constraints of near-term quantum devices.

Summary updated

BibTeX
@inproceedings{rebentrost2021quantum,
  author = {Patrick Rebentrost and Yassine Hamoudi and Maharshi Ray and Xin Wang and Siyi Yang and Miklós Sántha},
  title = {{Quantum algorithms for hedging and the learning of Ising models}},
  booktitle = {Physical},
  year = {2021},
  doi = {10.1103/physreva.103.012418},
}
Figure