A photonic computing solver for solving linear systems of equations

By designing a photonic computing solver and implementing the gradient descent algorithm using the forward and backward computing modules of a photonic chip, the computational requirements of photonic chips in solving linear equations are solved, achieving high-speed and low-power solution performance, applicable to multiple scientific and engineering computing fields.

CN115543012BActive Publication Date: 2026-04-28UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UNIV OF ELECTRONICS SCI & TECH OF CHINA
Filing Date
2022-09-20
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing technologies cannot effectively utilize photonic chips to perform forward and backward computations of linear equation systems, and cannot meet the ever-increasing computational demands, especially in solving large-scale linear equation systems.

Method used

Design a photonic computing solver that uses forward and backward computing modules on the same chip to implement different computational tasks in the gradient descent algorithm. Solve the linear equation system through a photonic matrix-vector multiplication computation module and a control module. Use a photonic chip to perform gradient calculation and iteratively approach the optimal solution step by step.

Benefits of technology

It achieves high-speed, low-power solution of linear equations, with high throughput and low latency, and is suitable for fields such as partial differential equations, fluid dynamics, linear regression and electromagnetic calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115543012B_ABST
    Figure CN115543012B_ABST
Patent Text Reader

Abstract

The application provides a photonic computing solver for solving linear equations. The solver comprises a control module, a forward computing module and a reverse computing module. The forward computing module comprises n forward input units, a computing unit and m forward output units. Each forward input unit comprises a forward light source, a forward polarization controller and a forward modulator. Each forward output unit is a forward detector. The reverse computing module comprises m reverse input units, a computing unit and n reverse output units. Each reverse input unit comprises a reverse light source, a reverse polarization controller and a reverse modulator. Each reverse output unit is a reverse detector. The forward computing module and the reverse computing module share one computing unit, which is a photonic matrix-vector multiplication computing module. Compared with the existing solvers based on digital circuits, the present application has the characteristics of high speed and low power consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data processing technology, specifically relating to a photonic computing solver for solving linear equation systems. Background Technology

[0002] Solving linear equations is central to scientific and engineering computing, and is widely used in fields such as partial differential equations, fluid dynamics, linear regression, electromagnetic computation, and data mining. Currently, all linear equations are solved using digital computers, but as chip manufacturing processes approach their physical limits, they can no longer meet the ever-increasing computational demands.

[0003] Optical computing based on silicon photonics integration technology has attracted much attention as an emerging non-von Neumann computing paradigm. Due to its inherent high throughput, low latency, and low power consumption, it has been applied to provide high-speed, low-power computing resources for artificial intelligence. The core of silicon photonics-based optical computing is a photonic chip using a photonic waveguide network structure. For example, scientists from MIT published a paper in Nature [see Prior Technology 1: Shen, Y et al., Nature Photonics. 11, 441–446 (2017)], which uses the interference properties of light to realize matrix-vector multiplication calculations in neural networks. In recent years, silicon photonics integrated photonic chip technology has been developed, but there is still no photonic computing solver based on silicon photonics integration technology for solving linear equations. In particular, there is no scheme that uses the same photonic chip to realize forward and backward computation of solving linear equations, nor is there any use of photonic chips to solve large-scale linear equations. Summary of the Invention

[0004] To address the aforementioned problems, this invention proposes a photonic computing solver based on a photonic chip for solving linear equations. This photonic computing solver utilizes the same chip to simultaneously perform different computational tasks in the gradient descent algorithm during both the forward and backward processes, thereby calculating the gradient and iteratively approximating the optimal solution to ultimately solve the linear equations.

[0005] The technical solution of this invention is:

[0006] A photonic computation solver for solving linear equation systems includes a control module, a forward computation module, and a backward computation module. The forward computation module comprises n forward input units, a computation unit, and m forward output units. Each forward input unit includes a forward light source, a forward polarization controller, and a forward modulator. Each forward output unit is a forward detector. The backward computation module comprises m backward input units, a computation unit, and n backward output units. Each backward input unit includes a backward light source, a backward polarization controller, and a backward modulator. Each backward output unit is a backward detector. The forward and backward computation modules share a single computation unit, which is a photonic matrix-vector multiplication computation module.

[0007] The control module stores the system of linear equations Ax = y to be solved, where matrix A and vector y are known, and vector x is unknown. During the first iteration, the control module randomly generates a vector x. (1) During the k-th iteration, the module storage will store x (k) The forward modulator is sent, and the superscript k indicates the value of the kth iteration. The control module also stores hyperparameters for controlling the iteration process, including the learning rate α, the maximum number of iterations K, and the loss threshold ε. The hyperparameters are set manually. All of the above data are stored in the memory of the control module in the form of binary digital codes.

[0008] The forward light source is used to generate a forward light signal, which, after passing through a forward polarization controller, forms a forward propagating light signal. The forward modulator is used to convert the unknowns in the linear equation system. The forward propagation optical signal is loaded onto the j-th forward propagation optical signal, and the forward propagation optical signal completes the forward calculation within the computing unit. In the formula, the superscript k represents the value of the k-th iteration; therefore, the n forward input units will combine the n light intensities with x. (k) The corresponding optical signal is input to the computing unit, the optical signal propagates along the computing unit, and m light intensities are obtained at the forward output. The corresponding output optical signal; the forward detector converts the optical signal into an electrical signal, which is then sampled and quantized to obtain a binary digital code. And send it to the control module;

[0009] The control module stores the received data. The loss function is then calculated in the digital signal processor:

[0010]

[0011] If the loss function is less than the preset loss threshold ε, the iteration stops; otherwise, the loss is calculated in the digital signal processor. The difference between the stored known quantity y and The calculation result r(k) Sending the inverting modulator;

[0012] The reverse light source is used to generate a reverse light signal. After passing through a reverse polarization controller, the reverse light signal forms a reverse propagating light signal. An inverse modulator is used to convert the received r... (k) The reverse-propagating optical signal is loaded and the reverse calculation is performed in the computing unit. Where L represents the loss function. Therefore, m inverted input units combine m light intensities with r. (k) The corresponding optical signal is input to the computing unit, the optical signal propagates along the computing unit, and n light intensity signals are obtained at the reverse output terminal. The corresponding output optical signal; the optical signal is converted into an electrical signal, and after sampling and quantization, a binary digital code is obtained. And send it to the control module;

[0013] The control module stores the received data. And calculate in digital signal processor Where α is the preset learning rate, the iteration stops if the number of iterations reaches the preset maximum number of iterations K, otherwise x is increased. (k+1) The input to the forward modulator is then sent as input for the next iteration. Finally, the x value at the point where the iteration stops is calculated. (k) As a solution to the linear system of equations Ax = y.

[0014] The photon matrix-vector multiplication calculation module includes a first unitary matrix module, a second unitary matrix module, and a diagonal matrix module, wherein the diagonal matrix module is connected to the first and second unitary matrix modules respectively. Each of the first, second, and diagonal matrix modules consists of multiple Mach-Zehnder interferometers (MZIs), each MZI being a 4-port device composed of two 50:50 beam splitters and two phase shifters, including two input ports and two output ports. Using the singular value decomposition algorithm, any matrix A can be decomposed into the product of two unitary matrices and one diagonal matrix, A = UΣV. * The MZI's phase shifter is controlled by an external voltage and generates any additional phase shift within the range of [-π, +π] on the input optical signal; the first unitary matrix module and the second unitary matrix module can realize any corresponding unitary matrix V under a specific phase shift configuration. * And U; the diagonal matrix module can realize any corresponding diagonal matrix Σ under a specific phase shift configuration, then the transformation matrix of the photon matrix-vector multiplication calculation module under this configuration is A=UΣV * When the input light intensity is related to x (k) The corresponding optical signal propagates along the computing unit and the light intensity is obtained at the forward output. The corresponding output optical signal effectively completes the computational task. Since the transformation matrix of the photon matrix-vector multiplication calculation module during backpropagation is exactly the transpose of the transformation matrix during forward propagation, the transformation matrix that can be backpropagated under this configuration is A. T When the input light intensity is equal to r (k) The corresponding optical signal propagates along the computing unit and the light intensity is obtained at the reverse output terminal. The corresponding output optical signal effectively completes the computational task. The voltage on each MZI phase shifter in the photon matrix-vector multiplication calculation module is calculated and configured by the control module according to the solution task Ax=y.

[0015] The beneficial effects of this invention are: compared with existing digital circuit-based solvers, this invention has the characteristics of high speed and low power consumption. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the abstract structure of the photonic computation solver for solving linear equation systems according to the present invention.

[0017] Figure 2 This is a schematic diagram of a method for scaling up a photonic computing solver through hardware reuse, provided by the present invention. Detailed Implementation

[0018] The present invention will now be described in detail with reference to the accompanying drawings.

[0019] Let the system of linear equations have a real matrix. vector Objective solution vector Let Ax = y. Define the loss function as follows:

[0020]

[0021] Where x (k) and y (k) Let and represent the values ​​in the k-th iteration, respectively. Solving the linear equation system then transforms into an optimization problem of minimizing the loss function. Since the inverse direction of the gradient of the loss function represents the steepest descent direction of the function, the optimal solution can be approximated iteratively along this direction, i.e.

[0022]

[0023] Where α represents the step size of the iteration, i.e., the learning rate. From the chain rule of gradients, we have:

[0024]

[0025] Where A T Since A is the transpose, formula (2) can be rewritten as

[0026]

[0027] Therefore, the photonic computation solver 100 for solving linear equation systems proposed in this invention includes a photonic matrix-vector multiplication calculation module 110, a forward path 120, a backward path 130, and a control module, such as... Figure 1 As shown.

[0028] The photon matrix-vector calculation module 110 consists of two unitary matrix modules 111 and 113 and one diagonal matrix module 112. Each module is composed of several Mach-Zehnder interferometers (MZIs) 114, enabling arbitrary matrix-vector multiplication calculations. The MZI is a 4-port device, consisting of two 50:50 beam splitters 114a and two phase shifters 114b. The matrix multiplication calculation is divided into forward and reverse processes based on the direction of optical signal propagation. When the MZI is located in a unitary matrix module, the corresponding propagation matrices are respectively... and have Where φ and θ represent the phase shift values ​​of the two phase shifters 114b in the MZI, respectively. T This represents the transpose of the matrix; on the other hand, when MZI is located in a diagonal matrix module, the corresponding propagation matrices are respectively and have Therefore, the propagation matrices for the forward and backward processes of the photon matrix-vector multiplication calculation module are respectively... and Where Φ and Θ represent the sets of all φ and θ in the photon matrix-vector multiplication calculation module, then

[0029]

[0030]

[0031] From formulas (7) and (8), we can obtain Therefore, the photon matrix-vector multiplication calculation module 110 is shared by the forward path 120 and the backward path 130, and its forward and backward processes respectively realize the numerical calculation of the linear equation system and the gradient calculation of the loss function.

[0032] Before the iteration begins, the matrix A and vector y in the linear system of equations Ax = y to be solved are known. Hyperparameters need to be preset manually, including the learning rate α, the maximum number of iterations K, the loss threshold ε, and the vector x is randomly initialized. (1) The above values ​​are stored in the control module in binary code form.

[0033] The forward path 120 consists of a light source 121, a polarization controller 122, a modulator 123, and a detector 124. The modulator 123 will convert the vector x (k) The input light signal is loaded so that the intensity of the input light signal is related to x. (k) The numerical values ​​correspond. The optical signal propagates along the forward direction through the photon matrix vector calculation module 110 to obtain the output optical signal. The intensity of the output optical signal corresponds to... The numerical correspondence is equivalent to matrix-vector multiplication. The output optical signal is converted into an electrical signal by detector 124, and then sampled and quantized to obtain a binary digital code. And send it to the control module to calculate the loss function. If the loss function is less than the preset loss threshold ε, the iteration stops; otherwise, the loss is calculated in the digital signal processor. The difference between the stored known quantity y and The calculation result r (k) Modulator 133 for transmitting the reverse path.

[0034] The reverse path 130 consists of a light source 131, a polarization controller 132, a modulator 133, and a detector 134. The modulator 133 will convert the vector r (k) The input optical signal is loaded, making the intensity of the input optical signal related to r. (k) The numerical values ​​correspond. The optical signal propagates 110 degrees in the reverse direction through the photon matrix vector calculation module to obtain the output optical signal. The intensity of the output optical signal is... The numerical correspondence is equivalent to matrix-vector multiplication. The output optical signal is converted into an electrical signal by detector 134, and then sampled and quantized to obtain a binary digital code. And input the calculation into the control module Where α is the preset learning rate, the iteration stops if the number of iterations reaches the preset maximum number of iterations K, otherwise x is increased. (k +1) The input to the next iteration is sent to modulator 123 in the forward path. Finally, x at the point of stopping the iteration is... (k) As a solution to the linear system of equations Ax = y.

[0035] The control module realizes the timing of the control system, the reconfiguration of the photon matrix vector multiplication calculation module 110, and the storage, calculation and transmission of input and output data of the forward path 120 and the reverse path 130.

[0036] This invention can expand the solver size through hardware reuse, and the principle is as follows:

[0037] Before the iteration begins, it is known that the size of matrix A in the system of linear equations Ax = y to be solved is m × n, and the size of the photon computation solver is s × s. Assume that matrix A can be partitioned into p × q submatrices A of size s × s. i,j Then vector x can be decomposed into q subvectors x of size s×1. j Vector y can be decomposed into p subvectors y = s × 1. i Then the forward process can be rewritten as:

[0038]

[0039] The reverse process can be rewritten as:

[0040]

[0041] Therefore, in the k-th iteration, the forward process submatrix A i,j The input vector is The output vector is but

[0042]

[0043] Reverse process submatrix The input vector is The output vector is but

[0044]

[0045] Finally, update the vector.

[0046] Therefore, in practical applications, before the iteration begins, given the matrix A and vector y in the system of linear equations Ax = y to be solved, it is necessary to manually preset hyperparameters, including the learning rate α, the maximum number of iterations K, the loss threshold ε, and randomly initialize the vector x. (1) The above values ​​are stored in the control module in binary code. A photonic computation solver array needs to be constructed, with p rows and q photonic computation solvers in each row. Let the photonic computation solver in the i-th row and j-th column be labeled S. i,j The control module configures its forward propagation transformation matrix as a submatrix A. i,j Then the transformation matrix corresponding to backpropagation is

[0047] In the k-th iteration, the vector Load to S i,j The forward input optical signal makes the intensity of the input optical signal and The numerical values ​​correspond. The optical signal propagates along the forward direction through the photon matrix vector calculation module to obtain the output optical signal. The intensity of the output optical signal corresponds to... The numerical correspondence is equivalent to matrix-vector multiplication. The output optical signal is converted into an electrical signal by the detector, and then sampled and quantized to obtain a binary digital code. And transmit it to the control module. The control module calculates. in yes The subvectors are calculated, and the loss function is computed. If the loss function is less than the preset loss threshold ε, the iteration stops; otherwise, the loss is calculated in the digital signal processor. With the known quantity y stored i Inter-difference Calculation results Send to S i,j The modulator of the reverse path.

[0048] vector Load to S i,j The reverse input optical signal makes the intensity of the input optical signal and The numerical correspondence. The optical signal propagates in the reverse direction through the photon matrix vector calculation module to obtain the output optical signal, and the intensity of the output optical signal corresponds to... The numerical correspondence is equivalent to matrix-vector multiplication. The output optical signal is converted into an electrical signal by the detector, and then sampled and quantized to obtain a binary digital code. And input it into the control module. The control module calculates... in yes The subvectors, and calculate Where α is the preset learning rate, the iteration stops if the number of iterations reaches the preset maximum number of iterations K, otherwise it stops. Send it to S as input for the next iteration i,j The modulator of the forward path. Ultimately, x will stop iterating. (k) As a solution to the linear system of equations Ax = y.

Claims

1. A photonic computation solver for solving systems of linear equations, characterized in that, The solver includes a control module, a forward calculation module, and a backward calculation module. The forward calculation module includes n forward input units, a calculation unit, and m forward output units. Each forward input unit includes a forward light source, a forward polarization controller, and a forward modulator. Each forward output unit is a forward detector. The backward calculation module includes m backward input units, a calculation unit, and n backward output units. Each backward input unit includes a backward light source, a backward polarization controller, and a backward modulator. Each backward output unit is a backward detector. The forward calculation module and the backward calculation module share a single calculation unit, which is a photon matrix-vector multiplication calculation module. The control module stores the system of linear equations to be solved. , where the matrix sum vector Given vectors unknown, , , During the first iteration, the control module randomly generates vectors. ;No. In the next iteration, the module storage will Transmit forward modulator, superscript Indicates the first The value of the next iteration; the control module also stores hyperparameters to control the iteration process, including the learning rate. Maximum number of iterations Loss threshold Hyperparameters are set manually; all data in the control module is stored in the control module's memory in binary digital code form. The forward light source is used to generate a forward light signal, which, after passing through a forward polarization controller, forms a forward propagating light signal. The forward modulator is used to convert the unknowns in the linear equation system. Loading to the On each forward-propagating optical signal, the forward-propagating optical signal completes forward calculation within the computing unit. superscript in the formula Indicates the first The values ​​of the next iteration; therefore, the n forward input units will combine the n light intensities with... The corresponding optical signal is input to the computing unit, the optical signal propagates along the computing unit, and m light intensities are obtained at the forward output. The corresponding output optical signal; the forward detector converts the optical signal into an electrical signal, which is then sampled and quantized to obtain a binary digital code. And send it to the control module; The control module stores the received data. And calculate the loss function in the digital signal processor: ; If the loss function is less than the preset loss threshold If the iteration stops, then the calculation is performed in the digital signal processor. With known quantities stored Inter-difference Calculation results Sending the inverting modulator; The reverse light source is used to generate a reverse light signal. This reverse light signal, after passing through a reverse polarization controller, forms a reverse propagating light signal. The reverse modulator is used to convert the received signal... The reverse-propagating optical signal is loaded and the reverse calculation is performed in the computing unit. ,in This represents the loss function; therefore, m inverse input units combine m light intensities with... The corresponding optical signal is input to the computing unit, the optical signal propagates along the computing unit, and n light intensity signals are obtained at the reverse output terminal. The corresponding output optical signal; the optical signal is converted into an electrical signal, and after sampling and quantization, a binary digital code is obtained. And send it to the control module; The control module stores the received data. And calculate in a digital signal processor ,in The learning rate is preset; if the number of iterations reaches the preset maximum number of iterations... Then stop iterating; otherwise, continue iterating. This is sent as input to the forward modulator for the next iteration, and finally, the input at the time of stopping the iteration is... As a system of linear equations The solution.

2. The photonic computation solver for solving linear equation systems according to claim 1, characterized in that, The photon matrix-vector multiplication calculation module includes a first unitary matrix module, a second unitary matrix module, and a diagonal matrix module, wherein the diagonal matrix module is connected to both the first and second unitary matrix modules. Each of the first, second, and diagonal matrix modules consists of multiple Mach-Zehnder interferometers (MZIs), each MZI being a 4-port device. The first input port and first output port are formed by two cascaded 50:50 beam splitters, and the second input port and second output port are formed by two cascaded phase shifters. Based on the singular value decomposition algorithm, arbitrary matrices are multiplied... Decompose into the product of two unitary matrices and a diagonal matrix. The MZI's phase shifter is controlled by an external voltage and generates a phase shifter for the input optical signal. Any additional phase shift within the range; The first and second unitary matrix modules implement arbitrary corresponding unitary matrices under phase-shift configuration. and The diagonal matrix module implements any corresponding diagonal matrix under phase-shift configuration. Then, the transformation matrix of the photon matrix-vector multiplication calculation module during forward propagation under this configuration is: When the input light intensity is The corresponding optical signal propagates along the computing unit and the light intensity is obtained at the forward output. The corresponding output optical signal effectively completes the computational task. Since the transformation matrix of the photon matrix-vector multiplication calculation module during backpropagation is exactly the transpose of the transformation matrix during forward propagation, the transformation matrix for backpropagation under this configuration is: When the input light intensity is The corresponding optical signal propagates along the computing unit and the light intensity is obtained at the reverse output terminal. The corresponding output optical signal effectively completes the computational task. The voltage on each MZI phase shifter in the photon matrix-vector multiplication calculation module is determined by the control module based on the solution task. Calculate and configure.

Citation Information

Patent Citations

  • Partial differential equation solver based on photoelectric computing array and method thereof

    CN110244817A

  • System and method for analog computation using linear photon processor

    CN114514490A