As a dedicated quantum device, Ising machines could solve large-scale binary optimization problems in milliseconds. There is emerging interest in utilizing Ising machines to train feedforward neural networks due to the prosperity of generative artificial intelligence. However, existing methods can only train single-layer feedforward networks because of the complex nonlinear network topology. This paper proposes an Ising learning algorithm to train quantized neural network (QNN), by incorporating two essential techinques, namely binary representation of topological network and order reduction of loss function. As far as we know, this is the first algorithm to train multi-layer feedforward networks on Ising machines, providing an alternative to gradient-based backpropagation. Firstly, training QNN is formulated as a quadratic constrained binary optimization (QCBO) problem by representing neuron connection and activation function as equality constraints. All quantized variables are encoded by binary bits based on binary encoding protocol. Secondly, QCBO is converted to a quadratic unconstrained binary optimization (QUBO) problem, that can be efficiently solved on Ising machines. The conversion leverages both penalty function and Rosenberg order reduction, who together eliminate equality constraints and reduce high-order loss function into a quadratic one. With some assumptions, theoretical analysis shows the space complexity of our algorithm is $\mathcal{O}(H^2L + HLN\log H)$, quantifying the required number of Ising spins. Finally, the algorithm effectiveness is validated with a simulated Ising machine on MNIST dataset. After annealing 700 ms, the classification accuracy achieves 98.3%. Among 100 runs, the success probability of finding the optimal solution is 72%. Along with the increasing number of spins on Ising machine, our algorithm has the potential to train deeper neural networks.
翻译:作为专用量子设备,伊辛机能在毫秒级解决大规模二元优化问题。随着生成式人工智能的蓬勃发展,利用伊辛机训练前馈神经网络逐渐引起学界关注。然而,由于复杂的非线性网络拓扑结构,现有方法仅能训练单层前馈网络。本文提出一种伊辛学习算法用于训练量化神经网络(QNN),该算法融合了两项关键技术:拓扑网络的二进制表示与损失函数的降阶处理。据我们所知,这是首个能在伊辛机上训练多层前馈网络的算法,为基于梯度的反向传播提供了替代方案。首先,通过将神经元连接与激活函数编码为等式约束,训练QNN被建模为二次约束二元优化(QCBO)问题。基于二进制编码协议,所有量化变量均用二进制比特表示。其次,将QCBO转化为伊辛机可高效求解的二次无约束二元优化(QUBO)问题。该转化同时利用惩罚函数与Rosenberg降阶法,二者协同消除等式约束并将高阶损失函数降为二次形式。在特定假设条件下,理论分析表明该算法的空间复杂度为$\mathcal{O}(H^2L + HLN\log H)$,这量化了所需伊辛自旋数量。最后,在MNIST数据集上通过模拟伊辛机验证了算法有效性。经过700毫秒退火后,分类准确率达98.3%;在100次运行中,找到最优解的成功概率为72%。随着伊辛机自旋数量的增加,该算法有望训练更深层神经网络。