Coherent ising machine and model parameter optimization method and device thereof, medium and product

By combining evolutionary optimization algorithms with the coherent Ising machine, an initial training population is constructed and iteratively updated to determine the optimal parameter combination. This solves the problem of low efficiency of the coherent Ising machine in machine learning model training and achieves efficient model parameter optimization.

CN120745864BActive Publication Date: 2025-11-18CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511254410.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-03
Publication Date
2025-11-18
Estimated Expiration
2045-09-03

AI Technical Summary

Technical Problem

In existing technologies, coherent Ising machines cannot be applied to parameter optimization of machine learning models due to the discontinuity and non-differentiability of quantum states, resulting in low training efficiency.

Method used

An evolutionary optimization algorithm combined with a coherent Ising machine is used to construct an initial training population, iteratively update the quantum neural network instance using the evolutionary optimization algorithm to determine the optimal parameter combination, and optimize the model parameters by leveraging the parallel computing advantage of the coherent Ising machine.

Benefits of technology

This method enables efficient solution of optimal model parameters on a coherent Ising machine, improving model training efficiency, avoiding the limitations of the discontinuity and nondifferentiability of quantum states, and enhancing the speed and efficiency of model training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120745864B_ABST
    Figure CN120745864B_ABST
Patent Text Reader

Abstract

The application discloses a coherent Ising machine and a model parameter optimization method and device thereof, a medium and a product. The method comprises the following steps: constructing an initial training population; the initial training population comprises a plurality of quantum neural network (QNN) instances configured with different parameter combinations; based on an evolutionary optimization algorithm, the initial training population is iteratively updated to obtain a target training population corresponding to a convergence condition; the optimal QNN instance in the target training population is determined, and the parameter combination of the optimal QNN instance is obtained. Embodiments of the application aim at the non-continuity and non-differentiability of the quantum state of the coherent Ising machine, and propose a solution combining a population evolutionary optimization algorithm and the characteristics of the coherent Ising machine: the parameters of the discrete QNN instances in the training population are iteratively updated based on the evolutionary optimization algorithm, and the optimal parameter combination is efficiently solved by simultaneously utilizing the parallel computing advantage of the coherent Ising machine, so that the model training efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of quantum neural networks, and in particular to a coherent Ising machine and a model parameter optimization method and device thereof, a medium and a product. BACKGROUND

[0002] A coherent Ising machine (CIM) is a quantum analog machine based on quantum optics principles, which simulates a quantum spin system through a degenerate optical parametric oscillator (DOPO) network, uses the superposition and coherence of quantum states, and explores a large number of candidate solutions in parallel, and can efficiently solve combinatorial optimization problems.

[0003] At present, machine learning models usually use gradient descent algorithm and other technologies for training. The gradient descent algorithm calculates the gradient result based on the continuity of the model parameter space and the differentiability of the loss function, and iteratively optimizes the model parameters based on the gradient result. However, quantum states are discrete in nature and the transition of quantum states is discontinuous, and the probabilistic collapse of quantum states makes it impossible to describe state conversion with a continuous and differentiable function. Therefore, due to the non-continuity and non-differentiability of quantum states, the coherent Ising machine is not used for model parameter optimization in related technologies. SUMMARY

[0004] Therefore, the embodiments of the present application provide a coherent Ising machine and a model parameter optimization method and device thereof, a medium and a product, aiming to realize model parameter optimization using a coherent Ising machine and improve model training efficiency.

[0005] The technical solutions of the embodiments of the present application are implemented as follows:

[0006] In a first aspect, the embodiments of the present application provide a model parameter optimization method applied to a coherent Ising machine, and the method comprises:

[0007] An initial training population is constructed, and the initial training population comprises a plurality of quantum neural network (QNN) instances configured with different parameter combinations;

[0008] An evolutionary optimization (EOA) algorithm is used to iteratively update the initial training population to obtain a target training population that meets a convergence condition;

[0009] An optimal QNN instance in the target training population is determined, and a parameter combination of the optimal QNN instance is obtained.

[0010] In the scheme, the initial training population is iteratively updated based on the evolutionary optimization algorithm to obtain a target training population when a convergence condition is reached, including:

[0011] The fitness results of each QNN instance in the current training population are calculated, and it is determined whether a convergence condition is reached;

[0012] If not, the training population is updated based on the fitness results of each QNN instance in the training population using an evolutionary optimization algorithm, and the step of calculating the fitness results of each QNN instance in the current training population is returned;

[0013] If yes, the current training population is determined as the target training population;

[0014] The optimal QNN instance in the target training population is determined, including:

[0015] The QNN instance with the highest fitness result in the target training population is determined as the optimal QNN instance.

[0016] In the scheme, the fitness results of each QNN instance in the current training population are calculated, including:

[0017] An fitness evaluation model and a target function model of a training task are obtained;

[0018] After the quantum state conversion of the training sample, each QNN instance in the current training population is input to obtain the prediction results output by each QNN instance;

[0019] The prediction results output by each QNN instance are input into the target function model to obtain the target function results of each QNN instance;

[0020] The target function results of each QNN instance are input into the fitness evaluation model to obtain the fitness results of each QNN instance.

[0021] In the scheme, the method further includes:

[0022] Based on a self-play strategy, a competitive QNN instance participating in a competitive task is determined from the training population;

[0023] The competitive task is performed to obtain the fitness adjustment amount of the competitive QNN instance;

[0024] The target function results of each QNN instance are input into the fitness evaluation model to obtain the fitness results of each QNN instance, including:

[0025] The target function results of the QNN instance are input into the fitness evaluation model to obtain the initial results output by the fitness evaluation model;

[0026] If the QNN instance is the competing QNN instance, then the fitness result of the QNN instance is obtained based on the initial result of the QNN instance and the fitness adjustment amount;

[0027] If the QNN instance is not a competing QNN instance, then the initial result of the QNN instance is determined as the fitness result of the QNN instance.

[0028] In the above scheme, the step of performing the competition task to obtain the fitness adjustment amount of the competing QNN instance includes:

[0029] Obtain the competitive benefit function model;

[0030] Based on the prediction results output by the competing QNN instance, calculate the task performance metrics of the competing QNN instance;

[0031] Calculate the similarity between the competing QNN instances based on the quantum states of each of the competing QNN instances;

[0032] The task performance metrics and corresponding similarities of the competing QNN instances are input into the competing reward function model to obtain the fitness adjustment amount of the competing QNN instances.

[0033] In the above scheme, constructing the initial training population includes:

[0034] Build a specified number of QNN instances;

[0035] Based on the initialization rules, different parameter combinations are assigned to each QNN instance, and after generating the quantum state of each QNN instance, the initial training population is obtained.

[0036] The initialization rules include: classic random initialization rules or uniform distribution rules.

[0037] In the above scheme, updating the training population using an evolutionary optimization algorithm based on the fitness results of each QNN instance in the training population includes at least one of the following:

[0038] Delete QNN instances in the training population whose fitness results are lower than a set fitness threshold;

[0039] Perform a crossover operation on two target QNN instances in the training population to construct a child QNN instance, and add the child QNN instance to the training population;

[0040] Add perturbation to the parameters of the target QNN instance in the training population to construct a mutated QNN instance, and add the mutated QNN instance to the training population;

[0041] wherein the target QNN instance comprises a QNN instance whose fitness result is higher than or equal to a set fitness threshold.

[0042] In a second aspect, an embodiment of the present application provides a model parameter optimization device applied to a coherent Ising machine, the device comprising:

[0043] a construction module configured to construct an initial training population, wherein the initial training population comprises a plurality of QNN instances configured with different parameter combinations;

[0044] an iterative updating module configured to perform iterative updating on the initial training population based on an evolutionary optimization algorithm to obtain a target training population corresponding to a convergence condition;

[0045] a determination module configured to determine an optimal QNN instance in the target training population and obtain a parameter combination of the optimal QNN instance.

[0046] In a third aspect, an embodiment of the present application provides a coherent Ising machine, comprising a processor and a memory for storing a computer program capable of running on the processor, wherein the processor is configured to run the computer program to perform the steps of the method according to the first aspect.

[0047] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method according to the first aspect.

[0048] In a fifth aspect, an embodiment of the present application provides a computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to the first aspect.

[0049] The technical scheme provided by the embodiments of the present application is applied to a coherent Ising machine, an initial training population is constructed, the initial training population comprises a plurality of QNN instances configured with different parameter combinations, iterative updating is performed on the initial training population based on an evolutionary optimization algorithm to obtain a target training population corresponding to a convergence condition, and an optimal QNN instance in the target training population is determined and a parameter combination of the optimal QNN instance is obtained. In this way, the embodiments of the present application propose a solution combining a population evolutionary optimization algorithm and characteristics of a coherent Ising machine to solve the problems of non-continuity and non-differentiability of a quantum state of a coherent Ising machine, that is, iterative updating is performed on parameters of discrete QNN instances in a training population based on an evolutionary optimization algorithm, and an optimal parameter combination is efficiently solved by using parallel computing advantages of a coherent Ising machine, thereby improving model training efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0050] Figure 1 A flowchart of a model training optimization method according to an embodiment of the present application is shown in FIG. 1.

[0051] Figure 2 A flowchart of steps of an evolutionary optimization algorithm is shown in FIG. 2.

[0052] Figure 3 A structural diagram of a model training optimization device according to an embodiment of the present application is shown in FIG. 3.

[0053] Figure 4 A structural diagram of a model coherent Ising machine according to an embodiment of the present application is shown in FIG. 4. DETAILED DESCRIPTION

[0054] The present application will be further described below in conjunction with the accompanying drawings and embodiments.

[0055] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

[0057] An embodiment of the present application provides a model parameter optimization method applied to a coherent Ising machine, as shown in FIG. 1, which includes the following steps. Figure 1

[0058] Step 101, constructing an initial training population.

[0059] The initial training population includes a plurality of QNN instances configured with different parameter combinations.

[0060] Step 102, based on an evolutionary optimization algorithm, iteratively updating the initial training population to obtain a target training population corresponding to a convergence condition.

[0061] Step 103, determining an optimal QNN instance in the target training population and obtaining a parameter combination of the optimal QNN instance.

[0062] Here, the QNN instance is a model that combines quantum computing and neural networks, replacing classical bits in traditional neural networks with quantum bits as basic information units. The core is to use quantum operations such as quantum superposition, entanglement, and quantum gates to construct quantum neurons and network structures. The QNN instance can be applied to a coherent Ising machine.

[0063] ​Here, the coherent Ising machine is a quantum simulator based on the principle of quantum optics, simulating a quantum spin system through a degenerate optical parametric oscillator network, exploring a large number of candidate solutions in parallel using the superposition and coherence of quantum states; specifically, in the coherent Ising machine, the coupling between spins is globally parallel interaction, and the state update of each spin is directly affected by all other spins, without waiting for a serial step, and a global state update can be completed in microseconds to milliseconds, so the coherent Ising machine is usually used for efficiently solving combinatorial optimization problems.

[0064] It should be noted that although the parallel search capability of the coherent Ising machine has obvious computing power improvement compared to the serial search capability of the classical computer, in the related art, the coherent Ising machine is usually not applied to the field of machine learning model training, and the specific reason is that: currently, the model training of the classical computer usually adopts the gradient descent algorithm, and in the training process, a loss function for measuring the gap between the predicted value and the true value needs to be defined, and the gradient of the model parameter with respect to the loss function is calculated to determine the trend and amplitude of the parameter optimization adjustment, that is, in the gradient descent algorithm, the loss function is required to be continuous and differentiable, and the model parameter needs to be searched for the optimal solution in the continuous parameter space according to the loss function; while the quantum state of the coherent Ising machine can only take discrete values such as ±1 of Ising spin and integer state of photon number, and cannot take values in the continuous parameter interval as the classical model parameter, and based on the discreteness of the quantum state, the state change of the quantum state cannot be represented by a continuous differentiable function, therefore, due to the non-continuity and non-differentiability of the quantum state of the coherent Ising machine, the coherent Ising machine cannot be applied to the classical optimization algorithm such as gradient descent.

[0065] It should be noted that in view of the non-continuity and non-differentiability of the quantum state of the coherent Ising machine, the embodiment of the present application provides a technical solution combining the evolutionary optimization algorithm and the characteristics of the coherent Ising machine, so that the coherent Ising machine can be used to optimize the parameters of the deep learning model, and the parallel search capability of the coherent Ising machine can be used to improve the model training efficiency.

[0066] Here, the evolutionary optimization algorithm is a kind of random optimization method simulating the biological evolution theory, and the core idea is to simulate the biological evolution process of "natural selection, genetic variation" to find the optimal solution. Specifically, for example, Figure 2As shown, the basic flow of the evolutionary optimization algorithm generally includes the steps of initializing a population, evaluating fitness, selection operation, genetic operation, iterative updating, and obtaining an optimal solution. In the step of initializing a population, a population including a plurality of individuals is initialized, each individual representing a random candidate solution. In the step of evaluating fitness, the degree of goodness of the candidate solution as a processing task is evaluated by calculating the fitness of each individual. In the steps of selection operation and genetic operation, the individuals with low fitness are eliminated from the population by simulating the biological evolution process of "natural selection and genetic variation", while new individuals are generated and added to the population to maintain the diversity of candidate solutions in the population. By repeatedly performing the above steps of evaluating fitness, selection operation and genetic operation, the population is continuously iteratively updated, and finally the optimal solution is obtained after the population converges.

[0067] Here, when using the evolutionary optimization algorithm to optimize the model parameters, various candidate model parameter combinations are used as individuals in the population, and the optimal individual obtained after the population converges corresponds to the final optimized model parameter combination.

[0068] It can be understood that the evolutionary optimization algorithm is based on population iteration to search for an optimal solution, only the fitness of individuals in the population needs to be evaluated, the fitness of individuals is a discrete quantity, and there is no need to calculate the gradient or rely on the differentiability of the function. Moreover, the evolutionary optimization algorithm searches for an optimal solution in a discrete solution space, and the population iteration process is essentially deleting or adding discrete solutions in the discrete solution space. In the process of searching for an optimal solution, there is no optimization of solutions in a continuous solution space, and therefore, even if the non-continuity and non-differentiability of the quantum state of the coherent Ising machine conflict with the characteristics of the gradient descent algorithm, in the embodiments of the present application, the coherent Ising machine uses the evolutionary optimization algorithm to quickly calculate the QNN instance corresponding to the optimal model parameter combination, thereby achieving the technical effect of model parameter optimization.

[0069] In addition, the evolutionary optimization algorithm achieves global optimization through population diversity, and the coherent Ising machine can simultaneously process the evaluation tasks of all individuals in the population. Compared with using a classical computer to execute the evolutionary optimization algorithm, using the coherent Ising machine to execute the evolutionary optimization algorithm not only avoids the limitations of the non-continuity and non-differentiability of the quantum state of the coherent Ising machine, but also greatly improves the iteration efficiency of the evolutionary optimization algorithm.

[0070] The model parameter optimization method applied to the coherent Ising machine in the embodiments of the present application will be described in detail below.

[0071] Exemplarily, an initial training population is constructed, including: constructing a certain number of QNN instances; and assigning different parameter combinations to each QNN instance based on a set initialization rule, generating the quantum state of each QNN instance, and obtaining the initial training population.

[0072] Here, each QNN instance is taken as an individual in the training population, and in the embodiments of the present application, the structure and parameters of the QNN instance are encoded by a quantum state.

[0073] Here, the structure of the QNN instance refers to the connection mode of the quantum neurons, the type and arrangement order of the quantum gates, and is used to determine the processing mode of the QNN instance for the input quantum state; in some embodiments, the QNN instances in the training population have the same structure.

[0074] Here, the parameters of the QNN instance are adjustable variables, which are equivalent to the weights in the classical neural network model, that is, the process of model parameter optimization in the embodiments of the present application is essentially a process of searching for the optimal combination of QNN instance parameters in the training population.

[0075] Here, since the parameter combination of the optimal QNN instance determined by the embodiments of the present application is finally applied to the machine learning model for performing the actual task, the structure of the QNN instance is determined based on the machine learning model for performing the actual task.

[0076] Here, after generating the QNN instance, different parameter combinations are assigned to each QNN instance in the initial training population based on a set initialization rule; in order to ensure the individual diversity of the initial training population, the set initialization rule includes but is not limited to: a classical random initialization rule or a uniform distribution rule.

[0077] Here, the classical random initialization rule (Classical Random Initialization) is an assignment rule for randomly selecting values within a predetermined parameter range based on a random number generator; the uniform distribution rule is an assignment rule for generating parameters in accordance with the equal selection probability of each value within the parameter range; it should be noted that the embodiments of the present application do not make specific limitations on the training population initialization method.

[0078] Here, after assigning different parameter combinations to each QNN instance, a training population composed of a set number of QNN instances is obtained; wherein the i-th QNN instance in the training population is represented by a quantum state , which is specifically shown as follows:

[0079]

[0080] wherein, is a weight coefficient, is a ground state.

[0081] Exemplarily, based on the evolutionary optimization algorithm, the initial training population is iteratively updated to obtain a corresponding target training population when a convergence condition is reached, including: calculating the fitness results of each QNN instance in the current training population, and determining whether the convergence condition is reached; if not, updating the training population based on the fitness results of each QNN instance in the training population using the evolutionary optimization algorithm, and returning to the step of calculating the fitness results of each QNN instance in the current training population; if yes, determining the current training population as the target training population.

[0082] Here, the convergence condition is a pre-set condition for stopping iteration, and the training population is updated iteratively based on the evolutionary optimization algorithm each time. After the iteration is completed, it is determined whether the convergence condition is reached. If the convergence condition is reached, the iteration is stopped, and the current training population is taken as the target training population after convergence; if the convergence condition is not reached, the next training population update is performed.

[0083] In some embodiments, the convergence condition includes but is not limited to: reaching a set number of iterations, or the change amplitude of the fitness result being lower than a set amplitude threshold.

[0084] Here, the fitness result is a measure of the degree of adaptation of an individual (i.e., a QNN instance) to the current training task. The higher the fitness result of the QNN instance, the closer the parameter combination of the QNN instance to the optimal parameter combination.

[0085] Here, updating the training population specifically refers to updating part of the QNN instances in the training population; the evolutionary optimization algorithm is used to update the training population, i.e., the fitness results of the QNN instances are used as reference quantities for updating the training population, the QNN instances with higher fitness results in the training population are retained, and the QNN instances with lower fitness results in the training population are eliminated, so that the training population gradually converges to the optimal parameter combination with continuous iteration.

[0086] Exemplarily, the optimal QNN instance in the target training population is determined, including: determining the QNN instance with the highest fitness result in the target training population as the optimal QNN instance.

[0087] It can be understood that after the convergence condition is reached, the coherent Ising machine stops iteratively updating the training population, and outputs the QNN instance with the highest fitness result in the current training population and its parameter combination. The parameter combination of the optimal QNN instance can be applied to the machine learning model for performing actual tasks as the model parameters after optimization is completed.

[0088] Exemplarily, the fitness results of the QNN instances in the current training population are calculated, including: obtaining a fitness evaluation model and a target function model of the training task; inputting each QNN instance in the current training population after quantum state conversion of the training sample to obtain the prediction result output by each QNN instance; inputting the prediction result output by each QNN instance into the target function model respectively to obtain the target function result of each QNN instance; and inputting the target function result of each QNN instance into the fitness evaluation model to obtain the fitness result of each QNN instance.

[0089] Here, the training sample carries a real label corresponding to the expected value, which is used for comparison with the prediction result output by the QNN instance.

[0090] It should be noted that, since the obtained training sample is usually classical data (i.e., data processed on a classical computer), before inputting the training sample as input data into the QNN instance, the sample data needs to be subjected to quantum state conversion such as ground state encoding and angle encoding to map the sample data into a superposition state or a coherent state of a quantum.

[0091] In an example, after inputting the training sample into the QNN instance, the prediction result output by the QNN instance is as shown in the following formula:

[0092]

[0093] wherein, is the quantum state of the i-th QNN instance, is the parameter is the constructed evolution operator.

[0094] Here, before performing the fitness evaluation step, the target function model of the current training task needs to be constructed in advance, which can be determined based on the expected target of the current training task, such as classification accuracy or regression error; in an example, the expected target of the training task is to minimize the error, and the constructed target function model is as shown in the following formula:

[0095]

[0096] wherein, is the target function result of the i-th QNN instance, is the prediction result output by the i-th QNN instance based on the j-th training sample, is the real label corresponding to the j-th training sample, and M is the number of training samples.

[0097] Here, before performing the evaluating fitness step, a fitness evaluation model for the current training task needs to be constructed in advance, which is determined based on the expected target of the current training task and supports discrete value input; in an example, the fitness evaluation model is as shown in the following formula:

[0098]

[0099] wherein, is an initial result of representing fitness of the i-th QNN instance, in some embodiments, the initial result is a final fitness result of the i-th QNN instance; N is the number of QNN instances in the training population.

[0100] It can be understood that the input and output in the above-mentioned evaluating fitness step are both discrete values, so the step can be performed on a coherent Ising machine, and the fitness result of the corresponding evolutionary optimization algorithm based on the coherent Ising machine can greatly improve the calculation efficiency.

[0101] Illustratively, based on the fitness results of the QNN instances in the training population, the training population is updated using an evolutionary optimization algorithm, including at least one of the following: deleting a QNN instance in the training population whose fitness result is lower than a set fitness threshold; performing a crossover operation on two target QNN instances in the training population, constructing a child QNN instance, and adding the child QNN instance to the training population; adding a disturbance amount to the parameters of a target QNN instance in the training population, constructing a mutated QNN instance, and adding the mutated QNN instance to the training population; wherein the target QNN instance includes a QNN instance whose fitness result is higher than or equal to the set fitness threshold.

[0102] It can be understood that deleting a QNN instance in the training population whose fitness result is less than the set fitness threshold is a selection (elimination) operation step of the evolutionary optimization algorithm; performing a crossover operation on two target QNN instances in the training population, constructing a child QNN instance, and adding the child QNN instance to the training population is a crossover operation step of the evolutionary optimization algorithm; adding a disturbance amount to the parameters of a target QNN instance in the training population, constructing a mutated QNN instance, and adding the mutated QNN instance to the training population is a genetic operation step of the evolutionary optimization algorithm; in some embodiments, based on the fitness results of the QNN instances in the training population, the training population is updated using an evolutionary optimization algorithm, including the above-mentioned selection operation step, crossover operation step, and genetic operation step.

[0103] It can be understood that after obtaining the fitness results of each QNN instance in the current training population, each QNN instance in the training population is sorted based on the order from high to low of the fitness results, and the QNN instances with fitness results lower than the set fitness threshold are deleted from the training population, that is, the QNN instances with lower adaptation degree to the current training task are eliminated, and the parameter combinations of the eliminated QNN instances deviate greatly from the optimal parameter combination.

[0104] Here, the set fitness threshold can be a pre-set fixed value, or a dynamic fitness value obtained based on the sorting results of the QNN instances and the fitness results of each QNN instance.

[0105] It can be understood that in order to add QNN instances with new parameter combinations to the training population and make the training population converge to the optimal parameters after continuous iteration, embodiments of the present application randomly select two QNN instances from the target QNN instances as parent QNN instances, perform crossover operation on the two parent QNN instances, and add the child QNN instance constructed by the crossover operation to the training population; wherein the parameters of the child QNN instance are determined based on the following formula:

[0106]

[0107] wherein, is the parameter of the child QNN instance, and is the parameter of the parent QNN instance, is the crossover ratio coefficient.

[0108] It can be understood that in order to add QNN instances with new parameter combinations to the training population and make the training population converge to the optimal parameters after continuous iteration, embodiments of the present application randomly select one QNN instance from the target QNN instances and add a disturbance amount to the parameters of the QNN instance, construct a mutated QNN instance and add the mutated QNN instance to the training population; in some embodiments, the target QNN instance used to construct the mutated QNN instance includes: a newly constructed child QNN instance and / or a target QNN instance not used to construct the child QNN instance.

[0109] Here, the parameters of the mutated QNN instance obtained based on the newly constructed child QNN instance can be determined based on the following formula:

[0110]

[0111] wherein, is the parameter of the mutated QNN instance, is the disturbance amount, and the disturbance amount is normally distributed.

[0112] In some embodiments, based on the fitness results of the QNN instances in the training population, after a certain amount of deletion, crossover and addition perturbations are performed on the QNN instances in the training population, an updated training population is obtained, wherein the updated training population includes a set number of QNN instances, and each QNN instance is configured with a different parameter combination.

[0113] It can be understood that, after the QNN instances with fitness results lower than the set fitness threshold are deleted from the training population, in order to ensure the individual diversity of the training population, the embodiments of the present application will also construct new QNN instances through crossover operation and / or mutation operation and add them to the training population to be deleted, so that the number of QNN instances in the training population is maintained at the set number set in the population initialization step after each iteration.

[0114] In some embodiments, the method further includes: based on the self-play strategy, determining, from the training population, a competition QNN instance participating in a competition task; and performing the competition task to obtain a fitness adjustment amount of the competition QNN instance.

[0115] Correspondingly, inputting the objective function results of each QNN instance into the fitness evaluation model to obtain the fitness results of each QNN instance includes: inputting the objective function results of the QNN instance into the fitness evaluation model to obtain an initial result output by the fitness evaluation model; if the QNN instance is a competition QNN instance, obtaining the fitness result of the QNN instance based on the initial result of the QNN instance and the fitness adjustment amount; and if the QNN instance is not a competition QNN instance, determining the initial result of the QNN instance as the fitness result of the QNN instance.

[0116] It should be noted that, in order to further improve the model parameter optimization effect, under the framework of the Ising machine + evolutionary optimization algorithm, the embodiments of the present application also introduce a self-play (Self-play) strategy to improve the generalization ability.

[0117] Here, the self-play strategy is also called a self-play mechanism, which is an iterative learning paradigm. By letting the individuals in the population be opponents of each other, they compete and interact in a specific task through random pairing, so that the disadvantaged individuals in the competition need to optimize their performance to avoid elimination, and the dominant individuals also need to iterate to cope with the evolution of the opponent, thereby continuously improving the overall adaptability and task performance of the population.

[0118] It can be understood that, in the framework of the coherent Ising machine + evolutionary optimization algorithm + self-game strategy of the embodiments of the present application, a double-driving mechanism of "competition + evolution" is formed, wherein the evolutionary optimization algorithm realizes population iteration through selection operation, crossover operation and mutation operation, the self-game strategy provides accurate selection basis for population iteration, and the competition score based on the self-game strategy can be used as an adjustment amount of fitness to adjust the initial result representing fitness output by the fitness evaluation model, so as to avoid the optimal individual search from falling into local optimum and improve the ability of the population to solve complex tasks.

[0119] Here, before the embodiments of the present application update the current training population, the number of competition tasks based on the self-game strategy this time and the QNN instances participating in the competition tasks are determined, wherein the competition QNN instances participating in each competition task are two QNN instances randomly selected from the training population.

[0120] Here, since only part of the QNN instances in the training population participate in the competition task this time, the rest of the QNN instances do not participate in the competition task this time, therefore, for the competition QNN instances participating in the competition task this time, the initial result output by the fitness evaluation model needs to be adjusted by the fitness adjustment amount based on the competition score to obtain the fitness result of the QNN instance for comparison with the set fitness threshold; for the competition QNN instances not participating in the competition task this time, the initial result output by the fitness evaluation model is directly used as the fitness result of the QNN instance for comparison with the set fitness threshold.

[0121] Exemplarily, performing the competition task to obtain the fitness adjustment amount of the competition QNN instance includes: obtaining a competition payoff function model; calculating the task performance index of the competition QNN instance based on the prediction result output by the competition QNN instance; calculating the similarity between the competition QNN instances based on the quantum states of the competition QNN instances; inputting the task performance index of the competition QNN instance and the corresponding similarity into the competition payoff function model to obtain the fitness adjustment amount of the competition QNN instance.

[0122] Here, the step of performing the competition task based on the self-game strategy needs to obtain the task performance index of each competition QNN instance, the similarity between the competition QNN instances and the competition payoff function model based on interaction.

[0123] The task performance indicator is similar to the objective function result, is also obtained based on the prediction result output by the competitive QNN instance, and is determined with an expected target of the current training task; for example, if the current task is a classification task, the prediction result output by the QNN instance is a predicted classification result, the task performance indicator representing the classification accuracy is obtained by comparing each predicted classification result with a real label representing the actual classification and counting the comparison result, and the predicted classification result and the real label are input into the objective function model to obtain the quantitative objective function result representing the classification error.

[0124] Here, the similarity between the competitive QNN instances is specifically an inner product measure similarity between quantum states, as shown in the following formula:

[0125]

[0126] wherein, is the quantum state between the i-th and j-th QNN instances participating in the competitive task, and the closer the similarity is to 1, the more similar the quantum state and the parameter strategy of the competitive QNN instance participating in the competitive task are.

[0127] It can be understood that the higher the similarity between the QNN instances in the training population is, the more likely it is to fall into a local optimum, and therefore, the similarity between the competitive QNN instances can be used as a kind of punishment mechanism to adjust the fitness result of the competitive QNN instance, so as to ensure that the QNN instance with too high similarity is eliminated when the training population is iteratively updated.

[0128] Here, when the step of performing the competitive task based on the self-game strategy is performed, a competitive benefit function model based on interaction needs to be constructed in advance; the competitive benefit function model provides a reward and punishment mechanism for the fitness result, and the competitive QNN instance participating in the competitive task inputs the task performance indicator representing the performance of the training task into the competitive benefit function model to obtain the competitive score of the competitive QNN instance, i.e., the fitness adjustment amount for adjusting the initial result.

[0129] Here, the competitive benefit function model of the embodiment of the present application is specifically shown in the following formula:

[0130]

[0131] wherein, is the quantum state of the i-th and j-th QNN instances participating in the competitive task, is the competitive score, i.e., the fitness adjustment amount, is the task performance indicator of the i-th QNN instance, and is a hyperparameter, is used to control the reward weight, The larger the advantage QNN instance gets the more obvious the competitive score benefit is in the competition task. for controlling the penalty weight, The larger the degree of down-regulation of the fitness result of the QNN instance with high similarity is.

[0132] Here, after obtaining the fitness adjustment amount of the competing QNN instance, the fitness result of the competing QNN instance is calculated, which is specifically shown in the following formula:

[0133]

[0134] wherein, is the adjusted fitness result of the i-th QNN instance, is a learning rate for controlling the degree of influence of the competition score on the fitness result.

[0135] In some embodiments, based on the initial result of the QNN instance and the fitness adjustment amount, the fitness result of the QNN instance is obtained, including: based on the fitness adjustment amount of the QNN instance, adjusting the initial result, and then performing normalization processing to obtain the fitness result of the QNN instance.

[0136] Here, the method of normalization processing is specifically shown in the following formula:

[0137]

[0138] wherein, is the i-th QNN instance of the i-th QNN instance after normalization processing, used to indicate the iterative update of the training population.

[0139] It can be understood that based on the normalization processing, the total fitness of the training population is 1.

[0140] In order to implement the method of the embodiments of the present application, the embodiments of the present application also provide an image rendering device, which corresponds to the image rendering method described above, and each step in the image rendering method embodiment is fully applicable to the device embodiment.

[0141] As Figure 3 shown, the model parameter optimization device of the embodiments of the present application is applied to a coherent Ising machine, and the device includes a construction module 301, an iterative update module 302, and a determination module 303. The construction module 301 is used to construct an initial training population; the initial training population includes a plurality of QNN instances configured with different parameter combinations; the iterative update module 302 is used to perform iterative update on the initial training population based on an evolutionary optimization algorithm to obtain a target training population corresponding to a convergence condition; and the determination module 303 is used to determine an optimal QNN instance in the target training population and obtain a parameter combination of the optimal QNN instance.

[0142] In some embodiments, the iterative updating module 302 is specifically configured to: calculate the fitness results of the QNN instances in the current training population, and determine whether a convergence condition is reached; if not, update the training population based on the fitness results of the QNN instances in the training population, and return to the step of calculating the fitness results of the QNN instances in the current training population; and if yes, determine the current training population as the target training population.

[0143] In some embodiments, the determining module 303 is specifically configured to: determine the QNN instance with the highest fitness result in the target training population as the optimal QNN instance.

[0144] In some embodiments, the iterative updating module 302 is specifically configured to: obtain a fitness evaluation model and a target function model of the training task; input the training samples into the QNN instances in the current training population after quantum state conversion, to obtain the prediction results output by the QNN instances; input the prediction results output by the QNN instances into the target function model respectively, to obtain the target function results of the QNN instances; and input the target function results of the QNN instances into the fitness evaluation model, to obtain the fitness results of the QNN instances.

[0145] In some embodiments, the iterative updating module 302 is further configured to: determine the competitive QNN instances participating in the competition task from the training population based on a self-game strategy; and perform the competition task to obtain the fitness adjustment amount of the competitive QNN instances.

[0146] In some embodiments, the iterative updating module 302 is specifically configured to: input the target function result of the QNN instance into the fitness evaluation model to obtain an initial result output by the fitness evaluation model; if the QNN instance is a competitive QNN instance, obtain the fitness result of the QNN instance based on the initial result of the QNN instance and the fitness adjustment amount; and if the QNN instance is not a competitive QNN instance, determine the initial result of the QNN instance as the fitness result of the QNN instance.

[0147] In some embodiments, the iterative updating module 302 is specifically configured to: obtain a competition benefit function model; calculate the task performance indicators of the competitive QNN instances based on the prediction results output by the competitive QNN instances; calculate the similarities of the competitive QNN instances based on the quantum states of the competitive QNN instances; and input the task performance indicators and the similarities of the competitive QNN instances into the competition benefit function model, to obtain the fitness adjustment amount of the competitive QNN instances.

[0148] In some embodiments, the constructing module 301 is specifically configured to: construct a plurality of QNN instances;

[0149] The initial training population is obtained after the quantum state of each QNN instance is generated based on a set initialization rule, wherein the set initialization rule includes a classical random initialization rule or a uniform distribution rule.

[0150] In some embodiments, the iterative updating module 302 is specifically configured to: delete a QNN instance with a fitness result lower than a set fitness threshold from the training population; and / or perform a crossover operation on two target QNN instances in the training population, construct a child QNN instance, and add the child QNN instance to the training population; and / or add a perturbation to the parameters of a target QNN instance in the training population, construct a mutated QNN instance, and add the mutated QNN instance to the training population; wherein the target QNN instance includes a QNN instance with a fitness result higher than or equal to the set fitness threshold.

[0151] It should be noted that the model parameter optimization apparatus provided in the above embodiments is only used as an example for the division of the above program modules during model parameter optimization. In actual applications, the above processing can be completed by different program modules according to needs, that is, the internal structure of the apparatus is divided into different program modules to complete all or part of the above-described processing. In addition, the model parameter optimization apparatus and the model parameter optimization method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is described in detail in the method embodiments, which will not be repeated here.

[0152] Based on the hardware implementation of the above program modules, and in order to implement the model parameter optimization method of the embodiments of the present application, the embodiments of the present application further provide a coherent Ising machine, as shown in Figure 4 The coherent Ising machine 400 includes at least one processor 401, a memory 402, a user interface 403, and at least one network interface 404. The various components in the coherent Ising machine 400 are coupled together by a bus system 405. It can be understood that the bus system 405 is used to realize the connection and communication between the components. The bus system 405 includes not only a data bus, but also a power bus, a control bus, and a status signal bus. However, for the sake of clarity, all the buses are marked as the bus system 405 in Figure 4 .

[0153] The user interface 403 can include a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touchpad, or a touch screen, etc.

[0154] The memory 402 in the embodiments of the present application is used to store various types of data to support the operation of the coherent Ising machine 400. Examples of these data include any computer programs used to operate on the coherent Ising machine 400.

[0155] The model parameter optimization method disclosed by the embodiments of the present application can be applied to the processor 401 or implemented by the processor 401. The processor 401 can be an integrated circuit chip with a signal processing capability. In the implementation process, the steps of the model parameter optimization method can be completed by the integrated logic circuit or the instruction in the form of software in the processor 401. The processor 401 mentioned above can be a general processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 401 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiments of the present application, the hardware decoding processor can be directly embodied to execute the steps, or the hardware and software modules in the decoding processor can be combined to execute the steps. The software module can be located in the storage medium, and the storage medium is located in the memory 402. The processor 401 reads the information in the memory 402, and in combination with the hardware, the steps of the model parameter optimization method provided in the embodiments of the present application are completed.

[0156] In the exemplary embodiments, the Ising machine 400 can be implemented by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), FPGAs, general-purpose processors, controllers, micro controllers (MCUs), microprocessors (Microprocessors), or other electronic elements, for executing the aforementioned model parameter optimization method.

[0157] It can be appreciated that the memory 402 can be volatile memory or nonvolatile memory, and can also include both volatile and nonvolatile memory. Where the memory is nonvolatile, it can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), EEPROM, ferroelectric random access memory (FRAM), flash memory, a magnetic storage memory, an optical storage memory, or a compact disc read-only memory (CD-ROM); the magnetic storage memory can be a disk memory or a tape memory. Where the memory is volatile, it can be random access memory (RAM), used as an external cache memory. By way of example and not limitation, many forms of RAM can be used, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), SyncLink dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM). The memory 402 described in the embodiments of the present application is intended to include, without being limited to, these and any other suitable types of memory.

[0158] In an example embodiment, the embodiments of the present application also provide a storage medium, specifically a computer storage medium, for example, a memory 402 storing a computer program executable by the processor 401 of the coherent Ising machine 400 to perform the steps of the model parameter optimization method of the embodiments of the present application. The computer readable storage medium can be a ROM, a PROM, an EPROM, an EEPROM, a Flash memory, a magnetic surface memory, an optical disc, or a CD-ROM memory, etc.

[0159] In an example embodiment, the embodiments of the present application also provide a computer program product comprising a computer program executable by the processor 401 of the coherent Ising machine 400 to perform the steps of the method of the embodiments of the present application.

[0160] It should be noted that "first", "second", etc. are used to distinguish similar objects, and do not necessarily mean a specific order or sequence.

[0161] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0162] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for optimizing model parameters, characterized in that, Applied to a coherent Ising machine, the method includes: Construct an initial training population; the initial training population includes multiple quantum neural network (QNN) instances with different parameter combinations. Based on the evolutionary optimization algorithm, the initial training population is iteratively updated to obtain the target training population that meets the convergence condition. Determine the optimal QNN instance in the target training population and obtain the parameter combination of the optimal QNN instance; The step of iteratively updating the initial training population based on an evolutionary optimization algorithm to obtain the target training population that reaches the convergence condition includes: Calculate the fitness results of each QNN instance in the current training population and determine whether the convergence condition has been met. If not, then based on the fitness results of each QNN instance in the training population, the training population is updated using an evolutionary optimization algorithm, and the step of calculating the fitness results of each QNN instance in the current training population is returned. If so, then the current training population is determined as the target training population.

2. The method according to claim 1, characterized in that, Determining the optimal QNN instance in the target training population includes: The QNN instance with the highest fitness result in the target training population is determined as the optimal QNN instance.

3. The method according to claim 2, characterized in that, The calculation of the fitness results of each QNN instance in the current training population includes: Obtain the fitness evaluation model and the objective function model for the training task; After performing quantum state transformation on the training samples, they are input into each QNN instance in the current training population to obtain the prediction results output by each QNN instance. The prediction results output by each QNN instance are input into the objective function model to obtain the objective function results of each QNN instance; The objective function results of each QNN instance are input into the fitness evaluation model to obtain the fitness results of each QNN instance.

4. The method according to claim 3, characterized in that, The method further includes: Based on the self-game strategy, competitive QNN instances participating in the competitive task are determined from the training population. Perform the competition task to obtain the fitness adjustment amount of the competing QNN instance; The step of inputting the objective function results of each QNN instance into the fitness evaluation model to obtain the fitness results of each QNN instance includes: The objective function result of the QNN instance is input into the fitness evaluation model to obtain the initial result output by the fitness evaluation model; If the QNN instance is the competing QNN instance, then the fitness result of the QNN instance is obtained based on the initial result of the QNN instance and the fitness adjustment amount; If the QNN instance is not a competing QNN instance, then the initial result of the QNN instance is determined as the fitness result of the QNN instance.

5. The method according to claim 4, characterized in that, The process of performing the competition task to obtain the fitness adjustment amount of the competing QNN instance includes: Obtain the competitive benefit function model; Based on the prediction results output by the competing QNN instance, calculate the task performance metrics of the competing QNN instance; Calculate the similarity between the competing QNN instances based on the quantum states of each of the competing QNN instances; The task performance metrics and corresponding similarities of the competing QNN instances are input into the competing reward function model to obtain the fitness adjustment amount of the competing QNN instances.

6. The method according to any one of claims 1-5, characterized in that, The construction of the initial training population includes: Build a specified number of QNN instances; Based on the initialization rules, different parameter combinations are assigned to each QNN instance, and after generating the quantum state of each QNN instance, the initial training population is obtained. The initialization rules include: classic random initialization rules or uniform distribution rules.

7. The method according to any one of claims 2-5, characterized in that, The step of updating the training population using an evolutionary optimization algorithm based on the fitness results of each QNN instance in the training population includes at least one of the following: Delete QNN instances in the training population whose fitness results are lower than a set fitness threshold; Perform a crossover operation on two target QNN instances in the training population to construct a child QNN instance, and add the child QNN instance to the training population; Add perturbation to the parameters of the target QNN instance in the training population to construct a mutated QNN instance, and add the mutated QNN instance to the training population; The target QNN instance includes QNN instances whose fitness results are higher than or equal to a set fitness threshold.

8. A model parameter optimization device, characterized in that, Applied to a coherent Ising machine, the apparatus includes: A construction module is used to construct an initial training population; the initial training population includes multiple QNN instances configured with different parameter combinations; The iterative update module is used to iteratively update the initial training population based on the evolutionary optimization algorithm to obtain the target training population when the convergence condition is met. The determination module is used to determine the optimal QNN instance in the target training population and obtain the parameter combination of the optimal QNN instance; Specifically, the iterative update module is used to: calculate the fitness result of each QNN instance in the current training population and determine whether the convergence condition has been met; if not, based on the fitness result of each QNN instance in the training population, update the training population using an evolutionary optimization algorithm and return the step of calculating the fitness result of each QNN instance in the current training population; if yes, determine the current training population as the target training population.

9. A coherent Ising machine, characterized in that, The coherent Ising machine includes: a processor and a memory for storing a computer program capable of running on the processor, wherein the processor, when running the computer program, performs the steps of the method according to any one of claims 1-7.

10. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1-7.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Multilayer feedforward neural network training method for Isin machine

    CN117313819A