This paper explores a novel intersection between deep learning and quantum computing: training Binary Neural Networks (BNNs) using Quantum Annealing (QA). By reformulating the training of BNNs as a discrete optimization problem, the authors move away from standard heuristic gradient-based methods and toward a formulation that can be solved directly on current quantum hardware.
TL;DR
The authors propose the first formulation for training Binary Neural Networks as a Quadratic Unconstrained Binary Optimization (QUBO) problem. This allows BNNs to be trained directly on quantum annealers like the D-Wave Advantage, bypassing the need for the "straight-through estimators" typically used to make discrete networks differentiable.
What Problem Does This Paper Address?
Standard neural networks use high-precision floating-point weights. BNNs, which use weights and activations constrained to $\{-1, 1\}$, are highly efficient for edge devices but notoriously difficult to train. Because the sign function used in BNNs is non-differentiable, researchers usually rely on "tricks" like smoothing the activation functions or using "straight-through estimators" to apply Stochastic Gradient Descent (SGD).
These heuristics mean we aren't optimizing the true binary problem. Since BNN training is fundamentally a discrete, combinatorial optimization problem—which is NP-hard—the authors ask: Can we use the unique properties of quantum annealers to solve this discrete problem directly?
Methods
The core contribution is the mathematical mapping of BNN training into a QUBO framework, the native "language" of quantum annealers.
- QCBO Formulation: They first frame the training as a Quadratically Constrained Binary Optimization (QCBO) problem, where the goal is to minimize a 0-1 loss function subject to the constraints of the BNN architecture.
- Penalty Method: To convert these constraints into a single QUBO objective, they use penalty terms.
- XNOR Logic: Element-wise multiplications ($W \cdot y$) are handled by representing them as XNOR gates, which are then converted into quadratic penalties.
- Summation and Nonlinearity: To handle the summation and sign function at each neuron, the authors use a "counting" method. They introduce ancillary (extra) bits to represent the sum in base-two, allowing the highest bit to act as the "sign" output.
- Embedding: Because physical quantum chips have specific connectivity (like the D-Wave Pegasus topology), the authors use "minor embedding" to map their logical QUBO onto the physical qubits.
Datasets
The authors evaluate their approach using the UCI "Adult" dataset, a standard binary classification benchmark. Due to the limited capacity of current quantum hardware, they sampled tiny subsets:
- Type A: 3 input attributes, 4 data points.
- Type B: 3 input attributes, 8 data points.
- The BNNs used were small two-layer architectures (e.g., 3 inputs, 3 hidden neurons, 1 output).
Key Insights and Ideas
- Direct Optimization: Unlike classical training which "fakes" continuity to use gradients, this method treats the BNN as a physical system of interacting spins.
- Logarithmic Scaling of Ancilla Bits: A key technical "aha" is that the number of extra bits needed for the summation/nonlinearity only scales logarithmically with the input size of the layer ($\log_2 N$), making the formulation relatively efficient in terms of variable growth.
- Hardware as the Bottleneck: The paper highlights a stark reality: even a "tiny" BNN with 7 inputs and 7 neurons requires nearly 3,000 physical qubits on a D-Wave Advantage due to the complexity of the interconnections (as seen in Figure 1 above).
Key Results
The authors compared Quantum Annealing (QA) against classical Branch-and-Bound (BnB) and Simulated Annealing (SA).
- Runtime Scaling: As expected, the classical exact solver (BnB) showed exponential growth in runtime as the number of variables increased. In contrast, the QA execution time remained nearly constant (~100ms) for the instances tested.
- Solution Quality: On the QUBO formulation, classical solvers reached the global optimum (zero distance to ground truth). On the physical quantum hardware (eQUBO), the solutions were close to the ground truth but not always perfect, likely due to thermal noise and hardware precision limits.
Limitations and Future Work
- Capacity: Current quantum annealers can only fit very small BNNs. The authors note that the Pegasus architecture is almost fully utilized by a network with just 7 hidden neurons and a batch size of 8.
- One-Shot vs. Online Training: The current formulation is "one-shot" (training on the whole dataset at once). To scale to larger datasets, the authors suggest developing "online" or incremental training versions where the QUBO is updated batch-by-batch.
- Precision and Noise: Physical annealers are susceptible to noise, which can lead to sub-optimal solutions. Future work involves optimizing the formulation to be more robust to these hardware imperfections.
Summary updated