Diffusion model generation method and image data augmentation method based on light quantum platform
By constructing a diffusion model based on a photonic quantum platform and utilizing a photonic quantum noise reduction model and Gaussian noise processing, the problem of low computational efficiency in existing diffusion models is solved, and efficient image data generation and augmentation are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2026-03-13
AI Technical Summary
Existing diffusion models are computationally intensive and inefficient on quantum optical platforms, and there is a lack of effective solutions.
A diffusion model based on a photonic quantum platform is constructed. Noise addition and reduction are performed through a photonic quantum noise reduction model and Gaussian noise processing, including a combination of R-gate and BS gate. Gradient descent is then used to optimize the training model parameters.
It achieves fast, efficient, and reliable diffusion model generation, improving the diversity and quality of image data.
Smart Images

Figure CN121660001A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of optical quantum technology, specifically relating to a diffusion model generation method and an image data augmentation method based on an optical quantum platform. Background Technology
[0002] Quantum physics refers to the research field of quantum physics and quantum information science related to photons. It involves using photons as quantum carriers of information and exploring the quantum properties of photons and their interactions with other systems. In the field of quantum physics, researchers are dedicated to utilizing the quantum properties of photons for applications such as quantum computing, quantum communication, and quantum sensing.
[0003] Generative models are a class of machine learning models that aim to learn the probability distribution of data and use that distribution to generate new sample data. Examples include Generative Adversarial Models (GANs), which improve the quality of generated images through adversarial training between the generator and discriminator; and Variational Autoencoders (VAEs), which provide a probability-based generative model capable of effectively modeling and inferring data. However, these models also have many problems, such as the mode collapse problem common in GANs, and the possibility that VAEs' generated samples may be blurry or lack detail due to the relaxation of the variational lower bound.
[0004] To overcome these problems, researchers have proposed a diffusion model. The diffusion model overcomes the instability issue in GAN training through a noise-based generation process, and demonstrates better generation quality than traditional GANs in high-resolution image generation tasks. Furthermore, the diffusion model introduces random noise into the generation process, which is unique in each generation, thus improving sample diversity compared to the many repetitive samples generated by VAEs.
[0005] However, at present, there is a lack of diffusion models based on photonic quantum platforms; this will result in existing diffusion models having drawbacks such as high computational cost and low computational efficiency. Summary of the Invention
[0006] One of the objectives of this invention is to provide a diffusion model generation method based on an optical quantum platform that is fast, efficient, and reliable.
[0007] The second objective of this invention is to provide an image data augmentation method that includes the aforementioned diffusion model generation method based on a photonic quantum platform.
[0008] The diffusion model generation method based on a photonic quantum platform provided by this invention includes the following steps:
[0009] S1. Determine the original input image, set the full Gaussian noise data and the number of noise processing times;
[0010] S2. Based on the data set in step S1, the original input image is subjected to noise processing to obtain a completely Gaussian noise image;
[0011] S3. Construct a noise reduction model based on photons;
[0012] S4. Input the completely Gaussian noise image obtained in step S2 into the denoising model constructed in step S3, and train the constructed denoising model based on the results obtained in step S2 and the output results of the denoising model to obtain the trained denoising model.
[0013] S5. Combine the noise addition process and the trained noise reduction model to form a diffusion model, thus completing the generation of the diffusion model based on the photonic quantum platform.
[0014] Step S1, which involves determining the original input image and setting the complete Gaussian noise data and the number of noise processing iterations, specifically includes the following steps:
[0015] Determine the original input image;
[0016] Use the pixel value matrix of the original input image as the initial state. ;
[0017] Set to full Gaussian noise Complete Gaussian noise The corresponding parameters are expressed as follows ;
[0018] Set the number of noise processing times to The noise processing includes noise addition and noise reduction, with the number of noise addition cycles set to [number missing]. Noise reduction times: .
[0019] Step S2, which involves adding noise to the original input image based on the data set in step S1 to obtain a completely Gaussian noise image, specifically includes the following steps:
[0020] The following formula is used to add noise to the original input image:
[0021] In the formula This represents the final state obtained after the nth noise addition process. The parameters are set. and It increases with the number of noise addition processes; This is the final state obtained after the (n-1)th noise addition process.
[0022] Step S3, which involves constructing a noise reduction model based on photons, specifically includes the following steps:
[0023] The constructed photon-based denoising model includes m R gates and m BS gates;
[0024] The photonic quantum-based noise reduction model includes m input lines;
[0025] The input of the first input line is processed through the first R gate connected in series to obtain the output of the first R gate;
[0026] The input of the j-th input line is connected to the second input segment of the (j-1)-th BS gate; simultaneously, the output of the (j-1)-th R gate is connected to the first input segment of the (j-1)-th BS gate; the first output of the (j-1)-th BS gate is directly connected to the input of the output BS gate, and the second output of the (j-1)-th BS gate is connected to the input of the j-th R gate; j is the channel number, and ;
[0027] The output of the nth R gate is directly connected to the input of the output BS gate;
[0028] The BS gate at the output end has m inputs and m outputs, and the output of the BS gate at the output end is the output of the constructed denoising model based on photons.
[0029] The R gate is used to perform phase rotation on the state of a single optical mode; the BS gate is used to split and mix two optical modes.
[0030] The matrix representation of an R-gate is as follows:
[0031] In the formula The rotation angle of the revolving door; i is the imaginary unit;
[0032] The matrix representation of a BS gate is as follows:
[0033] In the formula This represents the ratio of transmittance to reflectance of the BS door.
[0034] Step S4 involves inputting the completely Gaussian noise image obtained in step S2 into the denoising model constructed in step S3, and training the constructed denoising model based on the results obtained in step S2 and the output of the denoising model. Specifically, this includes the following steps:
[0035] In sequence Input into the denoising model constructed in step S3; k is the number of training iterations. ;
[0036] The output state of the noise reduction model is measured to obtain the output result of the noise reduction model. ;
[0037] The loss function value is calculated using the following formula:
[0038] In the formula This is the function for calculating the mean square error;
[0039] The gradient descent optimizer is used to optimize the parameters in the noise reduction model. Training is performed; during training, the updated parameters are calculated using the following formula. :
[0040] In the formula Indicates the updated parameters ; The set learning rate; Let be the gradient of the loss function, and ;
[0041] Repeat this step until All data is input into the denoising model and the corresponding training process is completed. Training ends.
[0042] The present invention also provides an image data augmentation method including the aforementioned diffusion model generation method based on a photonic quantum platform, comprising the following steps:
[0043] A. Acquire the target image data to be augmented;
[0044] B. Using the target image data obtained in step A as the input image, process it using the diffusion model generated by the diffusion model generation method based on the optical quantum platform, and obtain the processing result;
[0045] C. Use the obtained processing result as the data augmentation result of the target image data to complete the image data augmentation.
[0046] The diffusion model generation method and image data augmentation method based on the photonic quantum platform provided by this invention not only realizes the generation of diffusion models based on the photonic quantum platform and the corresponding image data augmentation by constructing and training a denoising model based on the photonic quantum platform and combining it with a Gaussian noise addition process, but also achieves faster computation speed, higher computational efficiency and higher reliability. Attached Figure Description
[0047] Figure 1 This is a schematic diagram of the method flow for generating the diffusion model of the present invention.
[0048] Figure 2 This is a schematic diagram of the structure of the noise reduction model constructed in the diffusion model generation method of the present invention.
[0049] Figure 3 This is a schematic diagram of the process flow of the image data augmentation method of the present invention.
[0050] Figure 4 This is a schematic diagram illustrating the effect of the image data augmentation method of the present invention. Detailed Implementation
[0051] like Figure 1 The diagram shows a flowchart of the diffusion model generation method of the present invention: This diffusion model generation method based on a photonic quantum platform disclosed in the present invention includes the following steps:
[0052] S1. Determine the original input image, and set the full Gaussian noise data and the number of noise processing iterations; specifically, this includes the following steps:
[0053] Determine the original input image;
[0054] Use the pixel value matrix of the original input image as the initial state. ;
[0055] Set to full Gaussian noise Complete Gaussian noise The corresponding parameters are expressed as follows ;
[0056] Set the number of noise processing times to The noise processing includes noise addition and noise reduction, with the number of noise addition cycles set to [number missing]. Noise reduction times: ;
[0057] S2. Based on the data set in step S1, noise is added to the original input image to obtain a completely Gaussian noise image; specifically, the following steps are included:
[0058] The following formula is used to add noise to the original input image:
[0059] In the formula This represents the final state obtained after the nth noise addition process. The parameters are set. and The noise level increases with the number of noise addition processes, which means that as the number of noise addition processes increases, the feature information of the original image is gradually lost, and the image feature information is gradually replaced by noise until it finally becomes noise. This represents the final state obtained after the (n-1)th noise addition process; as a preferred solution, The value is ;
[0060] Since it is impossible to directly obtain any intermediate state from the initial state based on the above formula, intermediate parameters are set. for Then we get And thus obtain ,in For noise parameters, and ;
[0061] S3. Construct a noise reduction model based on photons; specifically including the following steps:
[0062] The constructed photonic quantum-based denoising model comprises m R-gates (Rotation gates) and m BS-gates (BeamSplitter gates), with the structure as follows: Figure 2 As shown;
[0063] The photonic quantum-based noise reduction model includes m input lines;
[0064] The input of the first input line is processed through the first R gate connected in series to obtain the output of the first R gate;
[0065] The input of the j-th input line is connected to the second input segment of the (j-1)-th BS gate; simultaneously, the output of the (j-1)-th R gate is connected to the first input segment of the (j-1)-th BS gate; the first output of the (j-1)-th BS gate is directly connected to the input of the output BS gate, and the second output of the (j-1)-th BS gate is connected to the input of the j-th R gate; j is the channel number, and ;
[0066] The output of the nth R gate is directly connected to the input of the output BS gate;
[0067] The BS gate at the output end has m inputs and m outputs, and the output of the BS gate at the output end is the output of the constructed denoising model based on photons.
[0068] The R gate is used to perform phase rotation on the state of a single optical mode; the BS gate is used to split and mix two optical modes, that is, to split the input light into two parts or to mix the two optical modes together.
[0069] The matrix representation of an R-gate is as follows:
[0070] In the formula The rotation angle of the revolving door; i is the imaginary unit;
[0071] The matrix representation of a BS gate is as follows:
[0072] In the formula The ratio of transmittance to reflectance of the BS door;
[0073] S4. Input the completely Gaussian noise image obtained in step S2 into the denoising model constructed in step S3, and train the constructed denoising model based on the results obtained in step S2 and the output results of the denoising model to obtain the trained denoising model; specifically including the following steps:
[0074] In sequence Input into the denoising model constructed in step S3; k is the number of training iterations. ;
[0075] The output state of the noise reduction model is measured to obtain the output result of the noise reduction model. ;
[0076] The loss function value is calculated using the following formula:
[0077] In the formula This is the function for calculating the mean square error;
[0078] The gradient descent optimizer is used to optimize the parameters in the noise reduction model. Training is performed; during training, the updated parameters are calculated using the following formula. :
[0079] In the formula Indicates the updated parameters ; The set learning rate; Let be the gradient of the loss function, and Among them, the parameters in the noise reduction model This includes the gate parameters for R-gates and BS gates;
[0080] Repeat this step until All data is input into the noise reduction model and the corresponding training process is completed. Training ends.
[0081] S5. Combine the noise addition process and the trained noise reduction model to form a diffusion model, thus completing the generation of the diffusion model based on the photonic quantum platform.
[0082] like Figure 3 The above is a schematic diagram of the image data augmentation method of the present invention: The image data augmentation method disclosed in this invention, which includes the diffusion model generation method based on the photonic quantum platform, includes the following steps:
[0083] A. Acquire the target image data to be augmented;
[0084] B. Using the target image data obtained in step A as the input image, process it using the diffusion model generated by the diffusion model generation method based on the optical quantum platform, and obtain the processing result;
[0085] C. Use the obtained processing result as the data augmentation result of the target image data to complete the image data augmentation.
[0086] The effects of the image data augmentation method of the present invention are as follows: Figure 4 As shown; Figure 4 The first line in the text describes the process of adding noise to image data. Figure 4 The second row in the diagram shows the denoising effect of the denoising model. Finally, an augmented image of the image data can be obtained, which has a certain similarity to the original image, but is not exactly the same, in order to achieve image data augmentation.
[0087] The optical quantum circuit of this invention fully utilizes the characteristics of multiphoton interference and superposition, enabling large-scale computational tasks to be completed in parallel at one time, thereby significantly reducing the computation time of the denoising process. Under the same number of training parameters, the method of this invention exhibits a better denoising effect. This invention provides a new solution for improving the training efficiency of denoising diffusion models and promotes the exploration of the application of optical quantum computing in the field of machine learning.
Claims
1. A method for generating diffusion models based on a photonic quantum platform, comprising the following steps: S1. Determine the original input image, set the full Gaussian noise data and the number of noise processing times; S2. Based on the data set in step S1, the original input image is subjected to noise processing to obtain a completely Gaussian noise image; S3. Construct a noise reduction model based on photons; S4. Input the completely Gaussian noise image obtained in step S2 into the denoising model constructed in step S3, and train the constructed denoising model based on the results obtained in step S2 and the output results of the denoising model to obtain the trained denoising model. S5. Combine the noise addition process and the trained noise reduction model to form a diffusion model, thus completing the generation of the diffusion model based on the photonic quantum platform.
2. The diffusion model generation method based on a photonic quantum platform according to claim 1, characterized in that... Step S1, which involves determining the original input image and setting the complete Gaussian noise data and the number of noise processing iterations, specifically includes the following steps: Determine the original input image; Use the pixel value matrix of the original input image as the initial state. ; Set to full Gaussian noise Complete Gaussian noise The corresponding parameters are expressed as follows ; Set the number of noise processing times to The noise processing includes noise addition and noise reduction, with the number of noise addition cycles set to [number missing]. Noise reduction times: .
3. The diffusion model generation method based on a photonic quantum platform according to claim 2, characterized in that... Step S2, which involves adding noise to the original input image based on the data set in step S1 to obtain a completely Gaussian noise image, specifically includes the following steps: The following formula is used to add noise to the original input image: In the formula This represents the final state obtained after the nth noise addition process. The parameters are set. and It increases with the number of noise addition processes; This is the final state obtained after the (n-1)th noise addition process.
4. The diffusion model generation method based on a photonic quantum platform according to claim 3, characterized in that... Step S3, which involves constructing a noise reduction model based on photons, specifically includes the following steps: The constructed photon-based denoising model includes m R gates and m BS gates; The photonic quantum-based noise reduction model includes m input lines; The input of the first input line is processed through the first R gate connected in series to obtain the output of the first R gate; The input of the j-th input line is connected to the second input segment of the (j-1)-th BS gate; simultaneously, the output of the (j-1)-th R gate is connected to the first input segment of the (j-1)-th BS gate; the first output of the (j-1)-th BS gate is directly connected to the input of the output BS gate, and the second output of the (j-1)-th BS gate is connected to the input of the j-th R gate; j is the channel number, and ; The output of the nth R gate is directly connected to the input of the output BS gate; The BS gate at the output end has m inputs and m outputs, and the output of the BS gate at the output end is the output of the constructed denoising model based on photons. The R gate is used to perform phase rotation on the state of a single optical mode; the BS gate is used to split and mix two optical modes. The matrix representation of an R-gate is as follows: In the formula The rotation angle of the revolving door; i is the imaginary unit; The matrix representation of a BS gate is as follows: In the formula This represents the ratio of transmittance to reflectance of the BS door.
5. The diffusion model generation method based on a photonic quantum platform according to claim 4, characterized in that... Step S4 involves inputting the completely Gaussian noise image obtained in step S2 into the denoising model constructed in step S3, and training the constructed denoising model based on the results obtained in step S2 and the output of the denoising model. Specifically, this includes the following steps: Input them into the noise reduction model constructed in step S3 in sequence; k is the number of training iterations. ; The output state of the noise reduction model is measured to obtain the output result of the noise reduction model. ; The loss function value is calculated using the following formula: In the formula This is the function for calculating the mean square error; The gradient descent optimizer is used to optimize the parameters in the noise reduction model. Training is performed; during training, the updated parameters are calculated using the following formula. : In the formula Indicates the updated parameters ; The set learning rate; Let be the gradient of the loss function, and ; Repeat this step until All data is input into the denoising model and the corresponding training process is completed. Training ends.
6. An image data augmentation method comprising the diffusion model generation method based on a photonic quantum platform as described in any one of claims 1 to 5, comprising the following steps: A. Acquire the target image data to be augmented; B. Using the target image data obtained in step A as the input image, process it using the diffusion model generated by the diffusion model generation method based on the photonic quantum platform as described in any one of claims 1 to 5 to obtain the processing result; C. Use the obtained processing result as the data augmentation result of the target image data to complete the image data augmentation.