Hybrid Analog-Digital Matrix Processor

The hybrid analog-digital processor addresses the inefficiencies of conventional digital processors by integrating photonic processors for energy-efficient matrix operations, achieving scalable and accurate deep learning computations.

JP7555944B2Active Publication Date: 2024-09-25LIGHTMATTER INC

Patent Information

Application Number
JP2021549796
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-02-26
Filing Date
2020-02-25
Publication Date
2024-09-25
Estimated Expiration
2040-02-25

AI Technical Summary

Technical Problem

Conventional digital processors for deep learning tasks, such as GPUs, face challenges with high power consumption and inefficiency due to reliance on large numbers of clocked transistors, while specialized hardware like GPUs are limited by the scalability and energy efficiency constraints.

Method used

A hybrid analog-digital processor architecture that combines digital controllers with energy-efficient analog circuits, utilizing photonic processors for optical signal processing to perform mathematical operations like matrix multiplication and convolution, with techniques like matrix tiling and dynamic gain adjustment to optimize power and accuracy.

Benefits of technology

The hybrid approach enhances performance and energy efficiency, allowing for scalable computation of large data sets with reduced power consumption and improved accuracy in deep learning applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007555944000017
    Figure 0007555944000017
  • Figure 0007555944000018
    Figure 0007555944000018
  • Figure 0007555944000019
    Figure 0007555944000019
Patent Text Reader

Abstract

Techniques are described for computing matrix operations on matrices of arbitrary size in a finite-size hybrid analog-digital matrix processor. Techniques for gain adjustment in a finite-size hybrid analog-digital matrix processor are described that enable the system to achieve greater energy efficiency, greater physical density, and improved numerical precision. In some embodiments, these techniques enable maximizing the prediction accuracy of GEMM-based convolutional neural networks using low-precision data representations.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a hybrid analog-digital processor configured to perform mathematical matrix operations. [Background technology]

[0002] Deep learning, machine learning, latent variable models, neural networks, and other matrix-based differentiable programs are used to solve a variety of problems, including natural language processing and object recognition in images. Solving these problems with deep neural networks generally requires long processing times to perform the required calculations. In solving these problems, the most computationally intensive operations are often mathematical matrix operations, such as general-purpose matrix multiplication or multi-channel convolution. A traditional approach to accelerating deep learning algorithms has been to develop specialized hardware architectures. This is because traditional computer processors (e.g., central processing units (CPUs)), which consist of circuits containing hundreds of millions of transistors to implement logic gates on multiple bits of information represented by electrical signals, are designed for general-purpose calculations and are therefore not optimized for the specific patterns of data movement and calculations required by the algorithms used in deep learning and other matrix-based differentiable programs. One traditional example of specialized hardware for deep learning is the graphics processing unit (GPU), which has a highly parallel architecture that makes the GPU more efficient than a CPU for performing image processing and graphics operations. After their development for graphics processing, GPUs have proven to be more efficient than CPUs for neural networks and other parallelizable algorithms such as those used in deep learning.

[0003] Traditionally, deep learning using neural networks requires two phases: a training phase and an evaluation phase (sometimes called "inference"). A neural network must first be trained before a deep learning algorithm can be meaningfully run on a processor, for example to classify image or audio samples during the evaluation phase. The training phase can be time-consuming and computationally intensive. Summary of the Invention

[0004] Some embodiments relate to a hybrid analog-digital processor including a circuitry including an analog processor configured to perform a mathematical operation using a plurality of paths, the circuitry being configured to: for each of the plurality of paths, determine one or more scaling factors for the path based on a set of parameters representing a portion of a matrix; scale at least some of the set of parameters based on the one or more scaling factors to result in a scaled set of parameters; program the analog processor based on the set of scaled parameters; generate a plurality of input analog signals based on the input data set; generate a plurality of output analog signals based on the plurality of input analog signals and the set of scaled parameters; generate a partial output data set based on the plurality of output analog signals; and scale the partial output data set based on the one or more scaling factors to result in a scaled partial output data set; and further configured to generate an accumulated output data set by accumulating the scaled partial output data sets generated by at least two of the plurality of paths, where the accumulated output data set represents a result of the mathematical operation.

[0005] In some embodiments, generating a plurality of output analog signals based on the plurality of input analog signals and the set of scaled parameters includes performing a matrix-matrix multiplication based on the plurality of input analog signals and the set of scaled parameters.

[0006] In some embodiments, generating the multiple output analog signals based on the multiple input analog signals and the set of scaled parameters includes performing a convolution based on the multiple input analog signals and the set of scaled parameters.

[0007] In some embodiments, programming the analog processor based on the set of scaled parameters includes setting respective gains or attenuations for a plurality of analog amplifiers or attenuators of the analog processor based on the set of scaled parameters.

[0008] In some embodiments, the analog processor includes a photonic processor including a plurality of programmable photonic devices, and programming the analog processor based on the set of scaled parameters includes setting respective characteristics for the plurality of programmable photonic devices based on the set of scaled parameters.

[0009] In some embodiments, the programmable photonic device includes a Mach-Zehnder interferometer, and setting respective properties for the plurality of programmable photonic devices based on the set of scaled parameters includes setting respective optical properties for the plurality of Mach-Zehnder interferometers based on the set of scaled parameters.

[0010] In some embodiments, the programmable photonic device includes an optical resonator, and setting respective properties for the plurality of programmable photonic devices based on the set of scaled parameters includes setting respective optical properties for the plurality of optical resonators based on the set of scaled parameters.

[0011] In some embodiments, the circuitry includes a plurality of digital-to-analog converters (DACs), the plurality of DACs configured to generate a plurality of input analog signals based on the input data set.

[0012] In some embodiments, the circuitry includes a plurality of analog-to-digital converters (ADCs), the plurality of ADCs configured to generate the partial output data set based on the plurality of output analog signals.

[0013] In some embodiments, the multiple ADCs include n-bit ADCs, where n is 12 or less. In some embodiments, accumulating the scaled partial output data sets generated by at least two of the plurality of passes includes, for at least some of the passes, summing the scaled partial output data set generated by a pass with a scaled partial output data set generated by a previous pass.

[0014] In some embodiments, programming the analog processor includes programming the analog processor based on the set of scaled parameters with a plurality of matrices that collectively represent the arbitrary matrix.

[0015] In some embodiments, programming the analog processor with the plurality of matrices includes programming the analog processor based on the set of scaled parameters with the plurality of matrices that collectively represent the arbitrary matrix based on a singular value decomposition (SVD) of the arbitrary matrix.

[0016] In some embodiments, programming the analog processor with the plurality of matrices includes programming the analog processor based on the set of scaled parameters with the plurality of matrices that collectively represent the arbitrary matrix based on a stretch of the arbitrary matrix.

[0017] In some embodiments, scaling at least some of the set of parameters based on one or more scaling factors comprises dividing at least some of the set of parameters by the one or more scaling factors, and scaling the partial output data set based on the one or more scaling factors comprises multiplying the partial output data set by the one or more scaling factors.

[0018] In some embodiments, for each of the multiple paths, the circuitry is further configured to determine one or more scaling factors based on a tile of the matrix associated with the path.

[0019] In some embodiments, for each of the multiple paths, the circuitry is further configured to determine one or more scaling factors based on one or more rows of the matrix. In some embodiments, for each of the multiple paths, the circuitry is further configured to determine one or more scaling factors based on one or more singular values ​​of the matrix.

[0020] In some embodiments, the one or more scaling factors include a first scaling factor and a second scaling factor, and scaling at least some parameters of the set of parameters based on the one or more scaling factors includes scaling a first subset of the set of parameters based on the first scaling factor and scaling a second subset of the set of parameters based on the second scaling factor.

[0021] Some embodiments relate to a method of performing a mathematical operation using multiple passes through an analog processor, the method including: for each of the multiple passes, determining one or more scaling factors for the pass based on a set of parameters representing a portion of a matrix; scaling at least some of the set of parameters based on the one or more scaling factors to produce a scaled set of parameters; programming the analog processor based on the set of scaled parameters; generating a plurality of input analog signals based on an input data set; generating a plurality of output analog signals based on the plurality of input analog signals and the set of scaled parameters; generating a partial output data set based on the plurality of output analog signals; scaling the partial output data set based on the one or more scaling factors to produce a scaled partial output data set; and generating an accumulated output data set by accumulating the scaled partial output data sets generated by at least two of the multiple passes, where the accumulated output data set represents a result of the mathematical operation.

[0022] In some embodiments, generating a plurality of output analog signals based on the plurality of input analog signals and the set of scaled parameters includes performing a matrix-matrix multiplication based on the plurality of input analog signals and the set of scaled parameters.

[0023] In some embodiments, generating the multiple output analog signals based on the multiple input analog signals and the set of scaled parameters includes performing a convolution based on the multiple input analog signals and the set of scaled parameters.

[0024] In some embodiments, programming the analog processor based on the set of scaled parameters includes setting respective gains or attenuations for a plurality of analog amplifiers or attenuators of the analog processor based on the set of scaled parameters.

[0025] In some embodiments, the analog processor includes a photonic processor including a plurality of programmable photonic devices, and programming the analog processor based on the set of scaled parameters includes setting respective characteristics for the plurality of programmable photonic devices based on the set of scaled parameters.

[0026] In some embodiments, the programmable photonic device includes a Mach-Zehnder interferometer, and setting respective properties for the plurality of programmable photonic devices based on the set of scaled parameters includes setting respective optical properties for the plurality of Mach-Zehnder interferometers based on the set of scaled parameters.

[0027] In some embodiments, the programmable photonic device includes an optical resonator, and setting respective properties for the plurality of programmable photonic devices based on the set of scaled parameters includes setting respective optical properties for the plurality of optical resonators based on the set of scaled parameters.

[0028] In some embodiments, generating the plurality of input analog signals based on the input data set includes providing the input data set as input to a plurality of digital-to-analog converters (DACs).

[0029] In some embodiments, generating the partial output data set based on the plurality of output analog signals, the circuit includes providing the plurality of output analog signals as inputs to a plurality of analog-to-digital converters (ADCs).

[0030] In some embodiments, the multiple ADCs include n-bit ADCs, where n is 12 or less. In some embodiments, accumulating the scaled partial output data sets generated by at least two of the plurality of passes includes, for at least some of the passes, summing the scaled partial output data set generated by a pass with a scaled partial output data set generated by a previous pass.

[0031] In some embodiments, programming the analog processor includes programming the analog processor based on the set of scaled parameters with a plurality of matrices that collectively represent the arbitrary matrix.

[0032] In some embodiments, programming the analog processor with the plurality of matrices includes programming the analog processor based on the set of scaled parameters with the plurality of matrices that collectively represent the arbitrary matrix based on a singular value decomposition (SVD) of the arbitrary matrix.

[0033] In some embodiments, programming the analog processor with the plurality of matrices includes programming the analog processor based on the set of scaled parameters with the plurality of matrices that collectively represent the arbitrary matrix based on a stretch of the arbitrary matrix.

[0034] In some embodiments, scaling at least some of the set of parameters based on one or more scaling factors comprises dividing at least some of the set of parameters by the one or more scaling factors, and scaling the partial output data set based on the one or more scaling factors comprises multiplying the partial output data set by the one or more scaling factors.

[0035] In some embodiments, determining the one or more scaling factors includes determining the one or more scaling factors based on a tile of a matrix associated with the pass.

[0036] In some embodiments, determining the one or more scaling factors includes determining the one or more scaling factors based on one or more rows of the matrix.

[0037] In some embodiments, determining the one or more scaling factors includes determining the one or more scaling factors based on one or more singular values ​​of the matrix.

[0038] In some embodiments, the one or more scaling factors include a first scaling factor and a second scaling factor, and scaling at least some parameters of the set of parameters based on the one or more scaling factors includes scaling a first subset of the set of parameters based on the first scaling factor and scaling a second subset of the set of parameters based on the second scaling factor.

[0039] Some embodiments relate to a hybrid analog-digital processor including a digital-to-analog converter (DAC) unit including a plurality of DACs, an analog processor arranged to perform matrix-matrix multiplication and coupled to an output of the DAC unit, an analog-to-digital (ADC) unit including a plurality of ADCs and coupled to an output of the analog processor, a digital scaling unit coupled to the output of the ADC unit, and a digital accumulator coupled to the output of the digital scaling unit, the digital accumulator including a memory unit and a digital adder.

[0040] In some embodiments, the hybrid analog-digital processor further includes an amplification or attenuation unit coupled between the DAC unit and the ADC unit. In some embodiments, the analog processor includes a photonic processor including a plurality of programmable photonic devices.

[0041] In some embodiments, the programmable photonic device includes a Mach-Zehnder interferometer. In some embodiments, the programmable photonic device includes an optical resonator.

[0042] In some embodiments, the analog processor is programmed with a number of matrices that collectively represent an arbitrary matrix. In some embodiments, the multiple matrices collectively represent an arbitrary matrix based on a singular value decomposition (SVD) of the arbitrary matrix.

[0043] In some embodiments, the multiple matrices collectively represent an arbitrary matrix based on a stretch of the arbitrary matrix. Some embodiments relate to a hybrid analog-digital processor configured to perform mathematical operations, including circuitry including an analog processor and an analog scaling unit configured to generate a plurality of input analog signals based on an input data set; set a gain of the analog scaling unit based on a scaling factor; program the analog processor with a set of parameters representing a matrix; generate a plurality of output analog signals based on the plurality of input analog signals and the set of parameters; amplify the plurality of input analog signals and / or the plurality of output analog signals using the analog scaling unit to generate a plurality of amplified output analog signals; and generate an output data set based on the plurality of amplified output analog signals.

[0044] In some embodiments, the analog scaling unit includes an analog amplifier or attenuator. In some embodiments, the hybrid analog-digital processor is further configured to perform a multi-pass calculation based on a mathematical operation, and the circuitry is further configured to set a gain of the analog scaling unit to a first value during a first pass of the multi-pass calculation, and to set a gain of the analog scaling unit to a second value, different from the first value, during a second pass of the multi-pass calculation.

[0045] In some embodiments, generating a plurality of output analog signals based on a plurality of input analog signals and a set of parameters includes performing a matrix-matrix multiplication based on the plurality of input analog signals and the set of parameters.

[0046] In some embodiments, generating a plurality of output analog signals based on a plurality of input analog signals and a set of parameters includes performing a convolution based on the plurality of input analog signals and the set of parameters.

[0047] In some embodiments, the circuitry includes a plurality of analog-to-digital converters (ADCs), the plurality of ADCs configured to generate an output data set based on the plurality of output analog signals.

[0048] In some embodiments, the multiple ADCs include n-bit ADCs, where n is 12 or less. In some embodiments, programming the analog processor includes programming the analog processor based on a set of parameters with a plurality of matrices that collectively represent the arbitrary matrix.

[0049] In some embodiments, programming the analog processor with the plurality of matrices includes programming the analog processor, based on the set of parameters, with the plurality of matrices that collectively represent the arbitrary matrix based on a singular value decomposition (SVD) of the arbitrary matrix.

[0050] In some embodiments, programming the analog processor with the plurality of matrices includes programming the analog processor based on the set of scaled parameters with the plurality of matrices that collectively represent the arbitrary matrix based on a stretch of the arbitrary matrix.

[0051] In some embodiments, the circuitry is further configured to determine a scaling factor based on the set of parameters and the input data set. In some embodiments, determining the scaling factor includes determining the scaling factor based on a statistical range for the set of parameters and a statistical range for the input data set.

[0052] Some embodiments relate to a method of performing a mathematical operation, the method including generating a plurality of input analog signals based on an input data set; setting a gain of an analog scaling unit based on a scaling factor; programming an analog processor with a set of parameters representing a matrix; generating a plurality of output analog signals based on the plurality of input analog signals and the set of parameters; generating a plurality of amplified output analog signals by amplifying the plurality of input analog signals and / or the plurality of output analog signals using the analog scaling unit; and generating an output data set based on the plurality of amplified output analog signals.

[0053] In some embodiments, the analog scaling unit includes an analog amplifier or attenuator. In some embodiments, the hybrid analog-digital processor is further configured to perform a multi-pass calculation based on a mathematical operation, and the circuitry is further configured to set a gain of the analog scaling unit to a first value during a first pass of the multi-pass calculation, and to set a gain of the analog scaling unit to a second value, different from the first value, during a second pass of the multi-pass calculation.

[0054] In some embodiments, generating a plurality of output analog signals based on a plurality of input analog signals and a set of parameters includes performing a matrix-matrix multiplication based on the plurality of input analog signals and the set of parameters.

[0055] In some embodiments, generating a plurality of output analog signals based on a plurality of input analog signals and a set of parameters includes performing a convolution based on the plurality of input analog signals and the set of parameters.

[0056] In some embodiments, the circuitry includes a plurality of analog-to-digital converters (ADCs), the plurality of ADCs configured to generate an output data set based on the plurality of output analog signals.

[0057] In some embodiments, the multiple ADCs include n-bit ADCs, where n is 12 or less. In some embodiments, programming the analog processor includes programming the analog processor based on a set of parameters with a plurality of matrices that collectively represent the arbitrary matrix.

[0058] In some embodiments, programming the analog processor with the plurality of matrices includes programming the analog processor, based on the set of parameters, with the plurality of matrices that collectively represent the arbitrary matrix based on a singular value decomposition (SVD) of the arbitrary matrix.

[0059] In some embodiments, programming the analog processor with the plurality of matrices includes programming the analog processor based on the set of scaled parameters with the plurality of matrices that collectively represent the arbitrary matrix based on a stretch of the arbitrary matrix.

[0060] In some embodiments, the method further includes determining a scaling factor based on the set of parameters and the input data set. In some embodiments, determining the scaling factor includes determining the scaling factor based on a statistical range for the set of parameters and a statistical range for the input data set.

[0061] Some embodiments relate to a circuit including a photonic processor configured to perform a mathematical operation using a plurality of paths, the circuit including: a photonic processor configured to: for each of the plurality of paths, determine one or more scaling factors for the path based on a set of parameters representing a portion of a matrix; scale at least some of the set of parameters based on the one or more scaling factors to result in a scaled set of parameters; program the photonic processor based on the set of scaled parameters; generate a plurality of input optical signals based on the input data set; generate a plurality of output optical signals based on the plurality of input optical signals and the scaled set of parameters; generate a partial output data set based on the plurality of output optical signals; and scale the partial output data set based on the one or more scaling factors to result in a scaled partial output data set; the circuit further configured to generate an accumulated output data set by accumulating the scaled partial output data sets generated by at least two of the plurality of paths, the accumulated output data set representing a result of the mathematical operation.

[0062] In some embodiments, the photonic processor includes a plurality of programmable photonic devices, and programming the analog processor based on the set of scaled parameters includes setting respective characteristics for the plurality of programmable photonic devices based on the set of scaled parameters.

[0063] In some embodiments, the programmable photonic device includes an optical resonator, and setting respective properties for the plurality of programmable photonic devices based on the set of scaled parameters includes setting respective optical properties for the plurality of optical resonators based on the set of scaled parameters.

[0064] In some embodiments, the optical resonator includes an optical ring or disk resonator, and setting the respective optical properties for the plurality of optical resonators includes setting respective resonant frequencies for the plurality of optical ring or disk resonators based on the set of scaled parameters.

[0065] In some embodiments, the programmable photonic device includes a Franz-Keldysh modulator, and setting the respective characteristics for the plurality of programmable photonic devices based on the set of scaled parameters includes setting respective absorption for the plurality of Franz-Keldysh modulators based on the set of scaled parameters.

[0066] In some embodiments, the photonic processor includes a first array of interconnected variable beam splitters (VBS) including a first plurality of optical inputs and a first plurality of optical outputs, a second array of interconnected VBS including a second plurality of optical inputs and a second plurality of optical outputs, and a plurality of controllable optical elements, each of a plurality of the controllable optical elements coupling a single one of the first plurality of optical outputs of the first array to a respective single one of the second plurality of optical inputs of the second array.

[0067] In some embodiments, programming the photonic processor based on the set of scaled parameters includes programming a plurality of controllable optical elements based on the set of scaled parameters.

[0068] In some embodiments, each of the VBSs of the first and second arrays includes a Mach-Zehnder interferometer including a first beam splitter, a second beam splitter, and at least one phase modulator configured to modulate the phase of light in an optical mode coupling the first beam splitter and the second beam splitter.

[0069] In some embodiments, each of the controllable optical elements includes a variable attenuator and at least one phase modulator. In some embodiments, generating the multiple output optical signals based on the multiple input optical signals and the set of scaled parameters includes performing matrix-matrix multiplication based on the multiple input optical signals and the set of scaled parameters.

[0070] In some embodiments, programming the photonic processor includes programming the photonic processor based on the set of scaled parameters with a plurality of matrices that collectively represent the arbitrary matrix.

[0071] Some embodiments relate to a hybrid analog-digital processor including a digital-to-analog converter (DAC) unit including a plurality of DACs, a photonic processor arranged to perform matrix-matrix multiplication and coupled to an output of the DAC unit, an analog-to-digital (ADC) unit including a plurality of ADCs and coupled to an output of the photonic processor, a digital scaling unit coupled to the output of the ADC unit, and a digital accumulator coupled to the output of the digital scaling unit, the digital accumulator including a memory unit and a digital adder.

[0072] In some embodiments, the hybrid analog-digital processor further includes an optical amplification or attenuation unit coupled between the DAC unit and the ADC unit. In some embodiments, the photonic processor includes a plurality of optical resonators.

[0073] In some embodiments, the photonic processor includes a first array of interconnected variable beam splitters (VBS) including a first plurality of optical inputs and a first plurality of optical outputs, a second array of interconnected VBS including a second plurality of optical inputs and a second plurality of optical outputs, and a plurality of controllable optical elements, each of a plurality of the controllable optical elements coupling a single one of the first plurality of optical outputs of the first array to a respective single one of the second plurality of optical inputs of the second array.

[0074] In some embodiments, the photonic processor is programmed with a number of matrices that collectively represent an arbitrary matrix. Some embodiments relate to a hybrid analog-digital processor configured to perform mathematical operations, the circuit including a photonic processor and at least one amplifier, the circuit being configured to: generate a plurality of input analog signals based on an input data set; set a gain of each of the at least one amplifier based on a scaling factor; program the photonic processor with a set of parameters representing a matrix; generate a plurality of output optical signals based on the plurality of input optical signals and the set of parameters; generate a plurality of output analog signals based on the plurality of output optical signals; amplify at least one of the plurality of input optical signals, the plurality of output optical signals, and the plurality of output analog signals using the at least one amplifier to generate a plurality of amplified output signals; and generate an output data set based on the plurality of amplified output signals.

[0075] In some embodiments, the at least one amplifier includes an optical amplifier and an electronic amplifier, and amplifying at least one of the plurality of input optical signals, the plurality of output optical signals, and the plurality of output analog signals using the at least one amplifier includes amplifying the plurality of input optical signals using an optical amplifier and amplifying the plurality of output analog signals using an electronic amplifier.

[0076] In some embodiments, the at least one amplifier includes a laser, and setting the gain of the amplifier includes setting the gain of the laser. In some embodiments, the hybrid analog-digital processor is further configured to perform a multi-pass calculation based on a mathematical operation, and the circuitry is further configured to set a gain of the at least one amplifier to a first value during a first pass of the multi-pass calculation, and to set a gain of the at least one amplifier to a second value, different from the first value, during a second pass of the multi-pass calculation.

[0077] In some embodiments, generating a plurality of output analog signals based on a plurality of input analog signals and a set of parameters includes performing a matrix-matrix multiplication based on the plurality of input analog signals and the set of parameters.

[0078] In some embodiments, generating a plurality of output analog signals based on a plurality of input analog signals and a set of parameters includes performing a convolution based on the plurality of input analog signals and the set of parameters.

[0079] In some embodiments, the photonic processor includes a plurality of optical resonators. In some embodiments, the photonic processor includes a first array of interconnected variable beam splitters (VBS) including a first plurality of optical inputs and a first plurality of optical outputs, a second array of interconnected VBS including a second plurality of optical inputs and a second plurality of optical outputs, and a plurality of controllable optical elements, each of a plurality of the controllable optical elements coupling a single one of the first plurality of optical outputs of the first array to a respective single one of the second plurality of optical inputs of the second array.

[0080] In some embodiments, programming the analog processor includes programming the analog processor based on a set of parameters with a plurality of matrices that collectively represent the arbitrary matrix.

[0081] In some embodiments, programming the analog processor with the plurality of matrices includes programming the analog processor, based on the set of parameters, with the plurality of matrices that collectively represent the arbitrary matrix based on a singular value decomposition (SVD) of the arbitrary matrix.

[0082] In some embodiments, programming the analog processor with the plurality of matrices includes programming the analog processor based on the set of scaled parameters with the plurality of matrices that collectively represent the arbitrary matrix based on a stretch of the arbitrary matrix.

[0083] In some embodiments, the circuitry is further configured to determine a scaling factor based on the set of parameters and the input data set. In some embodiments, determining the scaling factor includes determining the scaling factor based on a statistical range for the set of parameters and a statistical range for the input data set.

[0084] Some embodiments relate to a method of fabricating a hybrid analog-digital processor, including forming a digital-to-analog converter (DAC) unit including a plurality of DACs; forming a photonic processor arranged to perform matrix-matrix multiplication and coupled to an output of the DAC unit; forming an analog-to-digital (ADC) unit including a plurality of ADCs and coupled to the output of the photonic processor; forming a digital scaling unit coupled to the output of the ADC unit; and forming a digital accumulator coupled to the output of the digital scaling unit, the digital accumulator including a memory unit and a digital adder.

[0085] In some embodiments, forming the photonic processor and forming the digital accumulator includes forming the photonic processor and the digital accumulator on a common chip.

[0086] In some embodiments, forming the photonic processor and forming the digital accumulator includes forming the photonic processor on a first chip, forming the digital accumulator on a second chip, and bonding the first chip to the second chip.

[0087] In some embodiments, forming the ADC unit includes forming a plurality of n-bit ADCs, where n is 12 or less. Various aspects and embodiments of the present application are described with reference to the following figures. It should be understood that the figures are not necessarily drawn to scale. Items that appear in more than one figure are designated with the same reference numeral in all figures in which they appear. [Brief description of the drawings]

[0088] [Figure 1-1A] 1 is a representation of a matrix multiplication operation computed on a tile basis according to some embodiments. [Figure 1-1B] 1-1B illustrates how a sub-portion of the matrix of FIG. 1-1A may be calculated according to some embodiments. [Figure 1-1C] 13 is a heatmap illustrating the distribution of numerical values ​​of an input matrix according to some embodiments. [Figure 1-2A] FIG. 1 is a block diagram illustrating a hybrid analog-digital matrix processor in accordance with some embodiments. [Figure 1-2B] FIG. 1 illustrates a matrix multiplication according to some embodiments. [Figure 1-2C] FIG. 13 illustrates a matrix multiplication performed using tiling according to some embodiments. [Figure 1-3] 1 is a flow chart illustrating a method of processing information using a hybrid analog-digital matrix processor according to some embodiments. [Figure 1-4A] FIG. 13 illustrates matrix multiplication with tiling and scaling based on a tile factor according to some embodiments. [Figure 1-4B]FIG. 13 illustrates matrix multiplication with tiling and scaling based on a tile row factor according to some embodiments. [Figure 1-4C] FIG. 13 illustrates another matrix multiplication performed with tiling and scaling based on a tile factor according to some embodiments. [Figure 1-4D] FIG. 13 illustrates another matrix multiplication performed with tiling and scaling based on a tile row factor according to some embodiments. [Figure 1-5A] FIG. 1 illustrates a matrix factorized based on singular value decomposition according to some embodiments. [Figure 1-5B] FIG. 1 is a block diagram illustrating an example of a digital accumulator that receives n vector elements in accordance with some embodiments. [Figure 1-6A] 1 is a plot illustrating an output signal distribution in relation to the dynamic range of an analog processor according to some embodiments. [Figure 1-6B] FIG. 1 illustrates the effect of varying gain on a digital representation of data digitized from an analog signal, according to some embodiments. [Figure 1-7A] FIG. 13 is a block diagram illustrating another hybrid analog-digital matrix processor in accordance with some embodiments. [Figure 1-7B] FIG. 1 is a block diagram illustrating multiple analog scaling units, according to some embodiments. [Figure 1-8] 11 is a flow chart illustrating another method of processing information using a hybrid analog-digital matrix processor in accordance with some embodiments. [Figure 1-9A] 1 is a plot illustrating accuracy of neural network calculations as a function of gain, according to some embodiments. [Figure 1-9B] 13 is a plot showing mean squared error of component parts of a neural network calculation as a function of gain, according to some embodiments. [Figure 1-10] FIG. 13 is a block diagram illustrating another hybrid analog-digital matrix processor in accordance with some embodiments. [Figure 1-11] 11 is a flow chart illustrating another method of processing information using a hybrid analog-digital matrix processor in accordance with some embodiments. [Figure 1-12] FIG. 1 is a block diagram illustrating a photonic hybrid analog-digital matrix processor in accordance with some embodiments. [Figure 2-1] 1 is a schematic diagram of a photonic processing system, according to some embodiments. [Figure 2-2] 1 is a schematic diagram of an optical encoder, according to some embodiments. [Figure 2-3] 1 is a schematic diagram of a photonic processor, according to some embodiments. [Figure 2-4] FIG. 13 is a schematic diagram of an interconnected variable beam splitter array, according to some embodiments. [Figure 2-5] FIG. 2 is a schematic diagram of a variable beam splitter, according to some embodiments. [Figure 2-6] FIG. 13 is a schematic diagram of an implementation of attenuation and phase shifting that can be used to represent a diagonal matrix acting on n optical modes according to some embodiments. [Figure 2-7] 1 is a schematic diagram of an optical attenuator according to some embodiments. [Figure 2-8] 1 is a schematic diagram of an optical power tree according to some embodiments. [Figure 2-9] 1 is a schematic diagram of an optical receiver according to some non-limiting embodiments, according to some embodiments. [Figure 2-10] FIG. 2 is a schematic diagram of a homodyne detector according to some embodiments, in accordance with some non-limiting embodiments; [Figure 2-11] 1 is a schematic diagram of a folded photonic processing system, according to some embodiments. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0089] I. Overview The recent surge in deep learning applications has created a demand for digital accelerators specialized for high-performance computation of tensor algebraic operations such as convolution or general matrix multiply (GEMM). Traditionally, digital processor architectures including Graphical Processing Units (GPUs), Field Programmable Gate Arrays (FPGAs) and Application-Specific Integrated Circuits (ASICs) have been used as accelerators in such applications.

[0090] The inventors have realized that conventional digital accelerators have a major drawback: they consume a lot of power. For example, consider a digital accelerator programmed to perform a large number of GEMM operations. Such a digital accelerator relies on a large number of transistors clocked at very high frequencies to compute the required multiplications. For decades, transistors have exponentially become smaller in size, more powerful, and consume less power, which is what experts generally call Moore's Law. However, recently, this trend has begun to slow down. It has become more difficult to continue to increase performance without sacrificing power consumption, mainly due to leakage currents between the extremely small size of the transistors.

[0091] Recognizing these constraints, we have developed a new accelerator architecture that improves scalability, both in terms of performance and energy efficiency. The accelerators developed by us combine the flexibility and programmability of digital controllers with the energy efficiency and inherent speed of analog circuits. These accelerators are referred to herein as hybrid analog-digital processors.

[0092] Hybrid analog-digital processors of the type described herein are particularly suited for computing mathematical operations, one such mathematical operation being Generalized Matrix Multiplication (GEMM), and another such operation being convolution (although embodiments of the present application are not limited to any particular operation).

[0093] The GEMM operation can be expressed as follows: D = α(A×B) + βC where α and β are scalars (individual numbers) and A, B, C and D are matrices. The internal dimensions of A and B match so that (A×B) is a matrix multiplication. Some mathematical operations can be decomposed in terms of GEMM operations, thus making the accelerator developed by the inventors applicable to a variety of situations.

[0094] Some specific applications, such as deep artificial neural networks, require computation of large amounts of data, typically represented as matrices or tensors. One approach to performing operations on large amounts of data is to use large hybrid analog-digital processors. For example, a hybrid analog-digital processor with tens of thousands of analog elements may be used to perform linear operations involving matrices or tensors with tens of thousands of rows and columns.

[0095] However, the inventors have realized that this approach can be costly, since designing a processor with this many analog components may require more chip real estate than is available or more power than is practical for such a chip. In addition, the inventors have realized that some applications involve heterogeneous workloads, where some matrix operations have very large dimensions and other operations have smaller dimensions such that overall utilization of a processor with enough elements for maximum computation is low. Thus, some embodiments relate to hybrid analog-digital processors that can process large amounts of data using a relatively small number of analog components. For example, matrix operations involving matrices with thousands of rows and columns may be performed in some embodiments using a hybrid analog-digital processor with only a few hundred analog elements (it should be understood that these numbers are provided as examples only, as different numbers of analog components may be used).

[0096] In some embodiments, matrix operations may be performed by multiple passes through a hybrid analog-digital processor. In each pass through the processor, operations are performed on sub-portions of the matrix (referred to herein as "tiles"). Figures 1-1A and 1-1B show how matrix multiplication may be performed using tiles. First, referring to Figure 1-1A, matrix C is obtained by multiplying matrix A with matrix B. Matrix A has I rows and K columns, and matrix B has K rows and J columns. As a result, matrix C has I rows and J columns. A1 and A2 represent tiles of matrix A. For clarity, in this example, matrix A is segmented into four tiles (although in some embodiments, matrix A may be segmented into tens, hundreds, or thousands of tiles or more). Similarly, matrix B is segmented in this example into four non-square tiles (although in some embodiments, matrix B may also be segmented into tens, hundreds, or thousands of tiles or more). Tiles A1 and B1 may each include N rows and M columns, where N≦I, N≦K, N≦J, M≦I, M≦K, and M≦J (although tiles of the type described herein need not be square). In this example, matrix B is divided into tile rows B1 and B2. Each tile row includes N rows and J columns.

[0097] Each tile row of matrix C is obtained by multiplying each tile of matrix A with each tile row of matrix B and accumulating the results. Each multiplication is performed as a pass through the hybrid analog-digital processor. For example, as shown in Figure 1-1B, tile A1 is multiplied with tile row B1 in the first pass through the hybrid analog-digital processor, and tile A2 is multiplied with tile row B2 in the second pass. These results are then accumulated as follows:

[0098] C1 = A1 × B1 + A2 × B2 This example involves the accumulation of two partial results, but in other embodiments there may be more partial results depending on the tile dimensions relative to the dimensions of the matrices being multiplied. For GEMM applications such as those designed for prediction, where the same "weight" matrix (A) is reused with many different batches of data (B), this tile ordering may have benefits in terms of spatial or temporal locality and reduce movement of weight data.

[0099] The inventors have further developed a particular class of analog processors that use optical signals. The inventors have realized that because optical signals travel at the speed of light in the medium in which the light is traveling, the latency is much less than the limit for electrical systems. In addition, by increasing the distance that the optical signal travels, there is virtually no loss of power, opening up new topologies and processor layouts that are not feasible when using electrical signals. Thus, optically based processors, referred to herein as "photonic processors," may have speed and efficiency performance superior to conventional electrical processors. It should be understood that photonic processors are only one possible implementation of the accelerator described herein, as other types of hybrid analog-digital processors may also be used. Examples of such hybrid analog-digital processors are provided in further detail below.

[0100] The inventors have further realized that under certain circumstances, the matrix representing the input data (B) and / or the "weight" matrix (A) may exhibit large variations across the magnitude of its values. For example, consider the matrix of FIG. 1-1C, where the darker regions represent clusters of values ​​of larger magnitude and the lighter regions represent clusters of values ​​of smaller magnitude. Having entries with large variations across the magnitude of values ​​poses a large challenge caused by the finite dynamic range of digitizing analog signals, as is done for number representations in hybrid analog-digital processors. Small magnitude values ​​are rounded to the smallest non-zero representable, which means that the information in the lower order bits may be limited by the input quantization noise. Simply amplifying the signal to read out the lower order bits may produce noisy results.

[0101] The inventors have developed a technique that overcomes the aforementioned challenges. The technique developed by the inventors involves normalizing the entries of the weight matrix or the entries of the input data set to match the dynamic range of the system. The normalization may involve scaling different parts of the matrix by different amounts. The normalization may be done on a tile-by-tile, row-by-row, tile-by-row basis, or in any other suitable manner.

[0102] However, when different parts of a matrix are scaled by different amounts, a problem arises in that values ​​calculated from different matrix parts may no longer accumulate directly. To address this problem, in some embodiments, backscaling is performed. Backscaling brings the results of the different matrix parts back into the original data range, thus allowing direct accumulation.

[0103] The inventors have further realized that representing digital values ​​with a large number of bits while providing a high degree of representation precision can cause a significant increase in power consumption. For example, consider an analog-to-digital converter (ADC). The power consumption of an ADC depends, among other factors, on the number of bits with which the value is represented. The energy required for some ADCs grows exponentially with the number of output bits. In essence, there is a tradeoff between representation precision and power consumption.

[0104] Conventional digital processors utilize binary number representations such as floating-point, integer, fixed-point, inflection-point, etc. To achieve higher performance for certain applications, non-standard binary number representations have been developed, including non-linear mantissa maps (such as logarithmic representations), binary stochastic numbers, and entropy coding (such as posit, unum, and tapered floating-point). For some true matrix multiplications, rounding and overflow / underflow with such representations can cause the digital GEMM result to not match the true arithmetic result. With floating-point (FP) representations such as IEEE754 "binary64" (also known as "double precision" or "FP64"), this loss of precision is largely negligible. The division of the mantissa, exponent, and exponent bias can also be modified relative to the IEEE754 standard. For example, the 16-bit Brain floating-point or "bfloat16" representation allocates 8 bits for the exponent, instead of the 5 bits allocated by the IEEE standard "half" precision (FP16). To achieve higher performance and improve energy efficiency, many accelerators perform calculations using less precise representations such as 16-bit floating-point (FP16) and may use mixed precision representations. For example, NVIDIA's Volta generation Tensor Core calculates GEMM using 4x4 matrices A and B in "half" precision (FP16) and matrix C in half or "single" precision (FP32).

[0105] The inventors have realized that a low-precision (e.g., 16-bit or less, 12-bit or less, 10-bit or less) fixed-point binary representation is much less demanding in terms of chip area and power requirements than a floating-point binary representation. Furthermore, not all applications require that the results of mathematical operations be represented with full precision. For example, deep learning applications can often tolerate significantly less precision than other applications of numerical linear algebra. However, the use of a low-precision representation poses significant challenges in terms of reducing the precision with which numbers can be represented. To make matters worse, reducing the precision of the ADC can also reduce its dynamic range. As a result, there is a trade-off between representing the full dynamic range of a signal and accurately representing smaller output values. When converting a signal from analog to the digital domain, a low-precision ADC may attempt to set the most significant bit of the output. However, this may result in the ADC setting the most significant bit to zero (i.e., the ADC is attempting to read a signal range that has no meaningful information). This problem is further exacerbated by the computational nature of neural network models (conditions vary over time, for example, from one layer of the network to another layer of the network).

[0106] The inventors have developed accelerator architectures designed to operate with low-precision fixed-point binary representations that provide sufficient accuracy for a variety of practical applications, including deep learning applications, thereby limiting chip area and power consumption. These accelerator architectures can be dynamically reconfigured, thus accounting for the changing dynamic conditions of the neural network model. The accelerator architectures developed by the inventors are designed to shift the signal range or "window" that the ADC can read. Shifting the read window allows the ADC to focus the conversion on the portion of the signal that has the greatest amount of meaningful information, or at least is likely to have some meaningful information.

[0107] In some embodiments, shifting the readout window in this manner may involve the use of an analog scaling unit (e.g., an amplifier or attenuator). Adjusting the gain of the analog scaling unit shifts the readout window, resulting in a more accurate readout. For example, considering an 8-bit ADC, by setting the gain to 2, the readout window may be shifted 1 bit toward the least significant bit, and by setting the gain to 1 / 2, the readout window may be shifted 1 bit toward the most significant bit. In some embodiments, the position of the readout window is dynamically adjusted, thus allowing the accelerator to reconfigure itself based on the scale of the current problem. For example, as described in detail in connection with FIG. 1-9B, it may be desirable to dynamically change the position of the readout window between different layers of a neural network model to account for changes in the output data distribution that may occur from layer to layer. II. Matrix Tiling In some embodiments, the matrix operation may be performed by multiple passes through the hybrid analog-digital processor. In each pass, the processor operates on one tile of the matrix. FIG. 1-2A is a block diagram illustrating an example of a hybrid analog-digital matrix processor implementing a tiling technique, according to some embodiments. The hybrid analog-digital matrix processor 1-100 (also referred to herein as accelerator 1-100) includes a digital-to-analog converter (DAC) unit 1-102, an analog processor 1-104, an analog-to-digital converter (ADC) unit 1-106, a digital scaling unit 1-108, a digital accumulator 1-110, and a controller 1-120. The controller 1-120 may control the operation of the accelerator 1-100. For example, the controller 1-120 may include software instructions that, when executed, cause the accelerator to perform mathematical operations. The components of FIG. 1-2A and optionally other components are collectively referred to herein as a "circuit." The components of Figures 1-2A may be formed on a common chip or on different chips bonded together.

[0108] As described in more detail below, the accelerator 1-100 is configured to perform mathematical operations by making several passes through the analog processor 1-104. In each pass through the analog processor 1-104, the accelerator 1-100 calculates a partial result using the analog processor 1-104. The partial results are summed using a digital accumulator 1-110.

[0109] The analog processor 1-104 may be implemented in any of a number of ways using analog components. The analog processor 1-104, in some embodiments, is configured to perform linear operations such as matrix-vector or matrix-matrix multiplication. Thus, the processor 1-104 may include multiple analog components designed to perform analog multiplication or other mathematical operations.

[0110] The DAC unit 1-102 includes multiple DACs. Any suitable type of DAC may be used, including, for example, a resistor ladder DAC, a switched capacitor DAC, a switched register DAC, a binary weighted DAC, a thermometer coded DAC, a successive approximation DAC, an oversampling DAC, an interpolating DAC, a hybrid DAC, etc. Similarly, the ADC unit 1-106 includes multiple ADCs. Any suitable type of ADC may be used, including, for example, a parallel comparator ADC, a flash ADC, a successive approximation ADC, a Wilkinson ADC, an integrating ADC, a sigma delta ADC, a pipelined ADC, an integrating ADC, a cyclic ADC, a time interleaved ADC, etc.

[0111] FIG. 1-2B is a representation of a matrix-matrix multiplication that may be performed using accelerator 1-100. In some embodiments, matrix A represents a weight matrix and matrix B represents an input matrix encoded with respect to input data for an analog processor. In other embodiments, matrix A represents an input matrix and matrix B represents a weight matrix. In either case, matrix C represents output data. The entries of matrix A (also referred to herein as "parameters") may be stored in the accelerator's memory, and the entries of matrix B may be provided as input to the accelerator. C is calculated by applying weight matrix A to input matrix B. More specifically, matrix C is calculated by multiplying matrix A and matrix B. For clarity, matrix A is shown as a 4×4 matrix, matrix B is shown as a 4×3 matrix, and matrix C is shown as a 4×3 matrix. Of course, these matrices may have any suitable number of rows and columns. In some embodiments, the matrices may have hundreds, thousands, tens of thousands, or more of rows and columns. In some embodiments, A and B may be N-dimensional tensors such that matrix operations are performed on multiple instances of matrices of the same size. In some embodiments, the number of columns of A is equal to the number of rows of B, thus allowing the matrices to be multiplied together. For example, matrix A may have I rows and K columns, and matrix B may have K rows and J columns. As a result, matrix C has I rows and J columns. This relationship may be expressed as follows:

[0112] dim(A) = (I,K) and dim(B) = (K,J) and dim(C) = (I,J) where the operator dim(), when applied to a matrix, returns the number of rows and columns of the matrix. The entries of matrix A are a ik where i = 1, 2, ..., I and k = 1, 2, ..., K. The entries of matrix B are b kj where j=1,2,...,J. The entries of matrix C are c ij It is.

[0113] Multiplying the entire matrix A with the entire matrix B in a single pass requires a large analog processor, especially if I, K, and J are large. Designing a large processor may be impractical because it may require more chip real estate than is available and may result in large power dissipation. In some embodiments, it may be more practical to perform the operations of FIG. 1-2B using a relatively small analog processor. In these embodiments, instead of directly multiplying the matrices as a whole, the multiplication may be decomposed by tiles. For example, in the depiction of FIG. 1-2C, matrix A is segmented into four tiles, A1, A2, A3, and A4. In this example, N=2, and each tile of A has two rows and two columns (although other values ​​of N are possible as long as N≦I, N≦J, and N≦K). Matrix B is segmented into tile rows B1 and B2, and matrix C is segmented into tile rows C1 and C2. The tile rows of matrix C are given by the following equation:

[0114] C1 = A1 × B1 + A2 × B2 C2 = A3 × B1 + A4 × B2 The multiplication A1×B1 may be performed by a first pass through the analog processor, and the multiplication A2×B2 may be performed by a second pass through the analog processor, and the results may then be accumulated together to obtain C1. Similarly, the multiplication A3×B1 may be performed by a third pass through the analog processor, and the multiplication A4×B2 may be performed by a fourth pass through the analog processor, and the results may then be accumulated together to obtain C2.

[0115] FIG. 1-3 is a flow chart illustrating an example of a method for performing mathematical operations, according to some embodiments. Method 1-300 may be performed using accelerator 1-100 (FIG. 1-2A) (although other suitable accelerators may be used). It should be understood that the steps of method 1-300 may be performed in the order shown in FIG. 1-3 or in other suitable orders. In particular, the order of operations may be selected to exploit spatial and / or temporal locality. Method 1-300 loops multiple times, with each loop corresponding to a pass through the analog processor. FIG. 1-2A illustrates the pth iteration, where p=1, 2...P.

[0116] In step 1-301, the controller 1-120 determines one or more scaling factors for the current path. As discussed above in connection with FIG. 1-1C, in some embodiments, since the matrices may exhibit large variations across their entries, it may be desirable to normalize the entries of matrix A or matrix B to match the dynamic range of the analog processor. The determination of step 1-301 may involve determining values ​​of one or more scaling factors that scale the input data set to match the dynamic range of the ADC unit. This determination may be made in any of a number of ways. In some embodiments, this determination may be made based on parameters of matrix A. In some embodiments, this determination may be made based on parameters of the current tile or other tiles of matrix A. In this case, it may be beneficial to reorder matrix A so that entries with similar dynamic ranges are in the same tile. This may also be true for matrix B. In some embodiments, the dimensions of the tiles of matrix A may be selected depending on the degree of granularity with which it is desired to scale the matrix. For example, if the matrix is ​​expected to exhibit significant variation across its values, the tile dimensions may be chosen to be small, thus providing fine resolution, with the drawback that more passes are required. In contrast, if the matrix B is expected to exhibit relatively gentle variation across its values, the tile dimensions may be chosen to be larger, thus limiting the number of passes.

[0117] The scaling factor may be determined in any suitable manner. In one example, the scaling factor is set to the average value of the entries of the current tile. In another example, the scaling factor is set to the highest value of the entries of the current tile. In yet another example, the scaling factor is set to the lowest value of the entries of the current tile. In yet another example, the scaling factor may be set to the maximum absolute value of the rows of the current tile.

[0118] In some embodiments, matrix A may be factorized or decomposed into a product of matrices whose entries may be such that combining (e.g., multiplying) the matrices results in the original matrix A. Examples of matrix decompositions that may be applied to matrix A include singular value decomposition (SVD), LU decomposition, stretching (e.g., unitary stretching), rank decomposition, Cholesky decomposition, QR decomposition, interpolation decomposition, spectral decomposition, polar decomposition, etc. In some embodiments, the scaling factor is determined based on one parameter of the matrix resulting from the decomposition of matrix A.

[0119] In one example, matrix A is decomposed based on SVD, and a scaling factor is determined based on one or more of the singular values ​​of matrix A. For example, the scaling factor may be set to the highest singular value of the current tile, such as the highest among the absolute values ​​of the singular values ​​of the current tile. t for i=1,2,...,N p =max{|σ i |} and Σ p =diag[σ i ] where t p denotes the scaling factor for tile p, and Σ p denotes the diagonal matrix associated with tile p, and σ i is the matrix Σ p represents the diagonal values ​​of A (i.e., the singular values ​​of the p-th tile of A). i | is σ iIn yet another example, the scaling factor is set to the average of the singular values ​​of the current tile. In yet another example, the scaling factor is set to the minimum of the singular values ​​of the current tile.

[0120] Matrix A does not necessarily need to be segmented by tiles for purposes of determining the scaling factor. In some embodiments, the scaling factor may be determined based on a row of a tile (tile row) of matrix A, based on multiple tiles of matrix A, based on a row of matrix A, based on one or more columns of matrix A, or based on other suitable portions of matrix A. In some embodiments, the scaling factor may be set to the same value for two or more tiles of matrix A.

[0121] In step 1-302, the controller 1-120 scales at least some of the parameters of matrix A based on the one or more scaling factors determined in step 1-301. In some embodiments, the controller 1-120 scales the parameters (or at least some of the parameters) of the current tile of matrix A based on the scaling factors. For example, the controller 1-120 can scale a first subset of the parameters (e.g., one or more rows of matrix A and / or one or more columns of matrix A) based on a first scaling factor and can scale a second subset of the parameters based on a second scaling factor. In the example of FIG. 1-4A, the parameters of the tile are scaled based on the scaling factor determined for that particular tile. Scaling factor t1 indicates the scaling factor determined for tile A1, scaling factor t2 indicates the scaling factor determined for tile A2, scaling factor t3 indicates the scaling factor determined for tile A3, and scaling factor t4 indicates the scaling factor determined for tile A4. In this example, the entry of tile A1 is divided by t1, the entry of tile A2 is divided by t2, the entry of tile A3 is divided by t3, and the entry of tile A4 is divided by t4 (although operations other than division are possible, including multiplication).

[0122] In the example of Figures 1-4B, the parameters of a tile row of matrix A are scaled based on one or more scaling factors determined for that particular tile row. Scaling factor tr1 indicates the scaling factor determined for tiles A1 and A2, and scaling factor tr2 indicates the scaling factor determined for tiles A3 and A4. In this example, the entries for the tile row consisting of tiles A1 and A2 are divided by tr1, and the entries for the tile row consisting of tiles A3 and A4 are divided by tr2.

[0123] In some embodiments, instead of scaling the parameters of matrix A, the controller 1-120 may scale the entries of matrix B (the input data set). The entries may be scaled in the digital domain or in the analog domain (after passing through the DAC unit 1-102). When performed in the analog domain, scaling may involve attenuating or amplifying the input analog signal based on a scaling factor.

[0124] 1-4C, parameters of a tile row of matrix B are scaled based on one or more scaling factors determined for the corresponding tile in matrix A. Here, scaling factor t1 denotes the scaling factor determined for tile A1, and scaling factor t2 denotes the scaling factor determined for tile A2. In this example, entries of tile row B1 are divided by t1, and entries of tile row B2 are divided by t2.

[0125] In step 1-304, the controller 1-120 programs the analog processor 1-104 based on the parameters of the current tile of matrix A. In at least some of the embodiments in which the parameters of matrix A were scaled in step 1-302, the controller 1-120 programs the analog processor 1-104 based on the scaled parameters of the current tile of matrix A. For example, referring back to FIG. 1-2A, the controller 1-120 programs the analog processor 1-104 based on a11 / t1, a12 / t1, a21 / t1, and a22 / t1. Programming the analog processor may involve setting certain characteristics of the analog processor based on the parameters. In one example, the analog processor 1-104 includes a plurality of electronic amplifiers (e.g., voltage amplifiers, current amplifiers, power amplifiers, transimpedance amplifiers, transconductance amplifiers, operational amplifiers, or transistor amplifiers, among others), and programming the analog processor involves setting the gain of the electronic amplifiers based on the parameters of tile A1. In another example, analog processor 1-104 includes multiple electronic attenuators (e.g., voltage attenuators, current attenuators, or power attenuators, among others), and programming the analog processor involves setting the attenuation of the electronic attenuators based on parameters of tile A1. In yet another example, analog processor 1-104 includes multiple electronic phase shifters, and programming the analog processor involves setting the phase shift of the electronic phase shifters based on parameters of tile A1. In another example, the analog processor includes an array of memory devices, such as flash or ReRAM, typically laid out in a crossbar shape. Programming the analog processor involves setting the conductance (or resistance) of each of the memory cells.

[0126] As described in further detail below, in some embodiments, the analog processor 1-104 is implemented using a photonic processor. In some such embodiments, the analog processor 1-104 includes a plurality of optical amplifiers (e.g., semiconductor optical amplifiers or other solid-state amplifiers, rare earth doped optical amplifiers such as erbium doped optical amplifiers, Raman amplifiers, or optical parametric amplifiers, among others), and programming the analog processor involves setting the gain of the optical amplifiers based on the parameters of the tile A1. In another example, the analog processor 1-104 includes a plurality of optical attenuators (e.g., Mach-Zehnder interferometers, leaky waveguides, loopback attenuators, liquid crystal attenuators, saturable absorbers or Franz-Keldysh absorbers, metal-oxide semiconductor capacitor modulators, carrier depletion electro-optic modulators, among others), and programming the analog processor involves setting the attenuation of the optical attenuators based on the parameters of the tile A1. In yet another example, analog processor 1-104 includes a plurality of optical phase shifters (e.g., thermo-optical phase shifters, acousto-optical phase shifters, electro-optical phase shifters, plasma dispersion effect phase shifters, Pockels effect phase shifters, nano-opto-electro-mechanical phase shifters, or nonlinear phase modulators, among others), and programming the analog processor involves setting the phase shifts of the optical phase shifters based on parameters of tile A1. In yet another example, analog processor 1-104 includes a plurality of optical resonators (e.g., ring and disk resonators, photonic crystals, ridge resonators, among others), and programming the analog processor involves setting the resonant frequencies of the optical resonators based on parameters of tile A1.

[0127] In step 1-306, the accelerator 1-100 receives an input data set. For example, referring back to FIG. 1-2C, the accelerator may receive entries for tile row B1 in one pass and entries for tile row B2 in another pass. In some embodiments, the controller 1-120 receives and stores the entries for matrix B simultaneously, but provides one tile row at a time (e.g., per pass) to the DAC unit 1-102. The entries may represent real numbers. In some embodiments, the entries may represent positive real numbers or signed real numbers (positive and negative real numbers).

[0128] In step 1-308, the accelerator 1-100 generates a plurality of input analog signals based on the input data set received in step 1-302. Referring again to FIG. 1-2A, the generating step 1-304 involves converting the input data set into analog signals using the DAC unit 1-102.

[0129] In step 1-310, analog processor 1-104 generates a number of output analog signals based on the number of input analog signals and the set of parameters with which it was programmed in step 1-301. In some embodiments, this may involve performing a matrix multiplication, so that the number of input analog signals are multiplied by each of the parameters for the current tile. For the pth pass, the result is the following equation:

[0130]

number

[0131] The analog processors 1-104 may include any suitable analog components designed to perform matrix multiplication or convolution. As an example, the analog processors 1-104 may include analog mixers. Each mixer mixes an input analog signal with an analog signal that is coded (e.g., modulated) based on a corresponding parameter of the matrix A. As another example, the analog processors 1-104 may include an amplitude modulator. As another example, the analog processors 1-104 may include a current steering circuit. Each modulator modulates the input analog signal by an amount obtained based on a corresponding parameter of the matrix A. As another example, the analog processors 1-104 may include an amplifier. Each amplifier amplifies the input analog signal by a gain obtained based on a corresponding parameter of the matrix A. As another example, the analog processors 1-104 may include an attenuator. Each attenuator attenuates the input analog signal by an attenuation obtained based on a corresponding parameter of the matrix A. The analog processor 1-104 may be implemented using any suitable technology, including, for example, using complementary metal-oxide-semiconductor (CMOS) components, radio-frequency (RF) components, and microwave components (although other technologies may be used). In some embodiments, the analog processor 1-104 includes a photonic processor, and multiplications are performed in the optical domain. In some embodiments, the analog processor 1-04 includes a combination of photonic and analog electronic components, and some multiplications may be performed in the optical domain and other multiplications or additions are performed in the electronic domain. Examples of photonic processors are described in more detail below.

[0132] In some embodiments, instead of performing an operation (e.g., a matrix multiplication or convolution) based on the input analog signal and a set of scaled parameters, step 1-310 may involve performing an operation based on the scaled input analog signal and unscaled parameters (e.g., as described in connection with FIGS. 1-4C and 1-4D). In either case, the result is JPEG0007555944000002.jpg10158. In some embodiments, the scaling of matrix B may be done on a column tile basis, i.e., different column tiles of matrix B are scaled by different factors.

[0133] In some embodiments, the analog multiplication may involve matrix decomposition. The entries of these matrices may be such that combining (e.g., multiplying) the matrices results in the original matrix A. In some such embodiments, the analog processor 1-104 may be designed to perform a transformation on the input data set based on each of the matrices into which matrix A is decomposed. Specific examples of matrix decomposition are provided above. One such example is SVD. As shown in FIG. 1-5A, the controller 1-120 may decompose matrix A to be represented by three component matrices: A=UΣV † , where U and V are unitary I×I and K×K matrices, respectively (U † U=UU † = I and V † V=VV † =I), Σ is an I×K diagonal matrix with real or complex-valued entries. In some embodiments, the values ​​of the diagonal singular values ​​may also be further normalized such that the maximum absolute value of the singular values ​​is 1. The values ​​σ1, σ2...σ K represents the singular values. The analog processor 1-104 may include analog hardware designed to transform an input analog signal according to the matrices U, Σ, and V, respectively.

[0134] 1-3, in step 1-312, the accelerator 1-100 generates a partial output data set based on the multiple output analog signals obtained in step 1-310. In some embodiments, the generation in step 1-312 involves passing the output analog signals through an ADC unit 1-106.

[0135] In step 1-314, the accelerator 1-100 scales the partial output data set based on a scaling factor to generate a scaled partial output data set. The scaling in step 1-314 may involve passing the partial output data set through a digital scaling unit 1-108. In some embodiments, the digital scaling unit 1-108 may be configured to apply the inverse of the operation performed in step 1-308. For example, in at least some of the embodiments in which step 1-308 involves a division, step 1-314 may involve a multiplication. Similarly, in at least some of the embodiments in which step 1-308 involves a multiplication, step 1-314 may involve a division. This returns the entries of the output matrix to their original range.

[0136] In some embodiments, the scaling in step 1-314 may be based on the same scaling factor used in the scaling in step 1-302 (although it may be applied using an inverse operation). p If division by t is involved, the scaling in step 1-314 is p In other embodiments, the scaling of step 1-314 may involve additional factors. For example, if the scaling of step 1-308 involves multiplication by t p If division by t is involved, the scaling in step 1-314 is p / r (the factor r is the sum of all the scaling factors t p In one example, the factor r is calculated as follows:

[0137] r=f({t p :p=1,2,...,K / / N) where the function f(·) may represent any suitable function, such as max(·), min(·), or mean(·). p Scaling by / r has the effect of unifying the data range of the scaling factor.

[0138] In step 1-316, the scaled partial output data set generated in step 1-314 is accumulated. In each pass, the accumulation may involve summing the scaled partial output data set generated by the current pass with the result of the previous accumulation. Thus, each pass adds the current result to the accumulation result. The accumulation in step 1-320 may be performed using a digital accumulator 1-110. An example of an accumulator 1-110 according to some embodiments is shown in FIG. 1-5B. In this example, the accumulator 1-110 includes a memory unit 1-520 and a digital adder 1-522. The memory unit 1-520 stores the result of the previous accumulation. The digital adder 1-522 adds the scaled partial output data set generated by the current pass to the accumulation result.

[0139] In some embodiments, instead of performing an accumulation step in each pass, the partial results may be temporarily stored in memory and a single accumulation may be performed after completion of a pass. In any case, process 1-100 may involve at least one accumulation step in which the scaled partial output data sets produced by at least two of the multiple passes are accumulated.

[0140] In step 1-318, accelerator 1-100 determines whether further passes should be made. This may involve, for example, determining whether there are further tiles of matrix A that remain to be processed. That is, in some embodiments, method 1-300 is repeated for a number of cycles equal to the number of tiles of matrix A.

[0141] If the accelerator 1-100 determines that further iterations are required, then the method 1-300 makes another pass through the accelerator. In the next pass, another tile of matrix A is processed. In contrast, if the accelerator 1-100 determines that further iterations are not required, then the method 1-300 ends. III. Partial products In some embodiments, the analog processor performs a matrix-vector multiplication JPEG0007555944000003.jpg7158, where JPEG0007555944000004.jpg7158 is the input vector, A is an n x n matrix, JPEG0007555944000005.jpg7158 is the output vector. In subscript notation, this multiplication is JPEG0007555944000006.jpg8158 (for all i in [0,N-1]), which is ij n elements of (repeat over j) and b j (repeat over j) with n elements of A. ij and b j may be represented using an unsigned fixed-point representation (e.g., INT8). Within this representation, JPEG0007555944000007.jpg8158 is the m1 bit number, If JPEG0007555944000008.jpg8158 is an m2-bit number, then the resulting vector element c i is used to fully represent the matrix-vector product. Generally, the number of bits required to represent the result of a matrix-vector product without loss of precision is greater than the number of bits required to represent the inputs of the operation. If the ADC unit 1-106 cannot read the output vector with full precision, the output vector elements may be rounded to the precision of the ADC.

[0142] The present inventors have recognized and appreciated that it may be difficult to build an ADC with high bit precision at a bandwidth corresponding to the rate at which an input vector in the form of an analog signal is sent through the analog processor 1-104. Thus, in some embodiments, the bit precision of the DAC1-102 is determined by the matrix element A ij and vector element b j This may limit the bit precision with which A is expressed. Therefore, we have devised a method to obtain the output vector in full precision (which can be arbitrarily high) by computing partial products and partial sums. For simplicity, A ij or b j We assume that the number of bits required to represent m1, m2, and m2 are the same (i.e., m1 = m2 = m). However, this assumption can be broken and is not intended to limit the scope of the embodiments of the present disclosure.

[0143] The method, according to some embodiments, includes, as a first act, calculating a matrix element A ij and vector element b j into d partitions, each containing k=m / d bits. (If k is not an integer, zeros may be added until m is divisible by d.) The resulting matrix element A ij =A ij [0] 2 k(d-1) +A ij [1] 2 k(d-2) +...+A ij [d-1] 2 0 In the formula, A ij [f] A ij is the k-bit value of the f-th most significant k-bit string of A. ij =A ij [0] A ij [1] ...A ij [d-1] Similarly, b j =b j [0] 2 k(d-1) +b j[1] 2 k(d-2) +...+b j [d-1] 2 0 In this case, we can obtain the vector element b j =b j [0] b j [1] ...b j [d-1] Multiplication c i =Σ j A ij b j From the perspective of these divisions, JPEG0007555944000009.jpg8158, where the set S p is the set of all integer values ​​of f and g, where f+g=p.

[0144] As a second act, the method includes controlling the analog processor 1-104 to calculate a matrix A ij [f] and transmitting the input vector b in the form of a coded analog signal through an analog processor 1-104. j [g] (where each input vector is only k-bits accurate). Using any of the above tiling techniques, the matrix-vector multiplication operation involves propagating c i [f,g] =Σ j A ij [f] b j [g] The method generates an output vector c i [f,g] This includes storing the

[0145] The method includes a set S p and repeating the second act for each of the different values ​​of f and g in i [f,g] and storing the

[0146] As a third act, the method includes using a digital electronic device, such as a processor, to sum the different iterations of f and g to produce a final result: This involves calculating JPEG0007555944000010.jpg8158.

[0147] In some embodiments of the method, the precision of the ADC used to obtain full precision calculations is only 2k+log2(n) bits, which is less than the 2m+log2(n) bits of precision that would otherwise be required.

[0148] The inventors have further recognized and appreciated that the above-described method embodiments may be generalized to work for tensors. As previously described, the hybrid analog-digital processing system may perform matrix-matrix multiplication using tiles. The above method may be applied to matrix tiles and input dataset tile rows to obtain output dataset tile rows at full precision.

[0149] As described in more detail below, in some of the embodiments where the analog processor includes a photonic processor, the matrix may be represented in terms of the phase of an optical variable beam splitter (VBS). In some such embodiments, the division may be done on a bit string representing the phase, rather than directly on the matrix elements. In some embodiments, if the map between phases on the matrix elements is a linear map, the relationship between the input parameters (in this case the phase of the VBS and the input vector elements) and the output vector may be linear. If this relationship is linear, the above method is still applicable. However, in general, according to some embodiments, a non-linear map from the base representation of the matrix to the photonic representation may be considered. For example, a bit string division of the Euclidean space matrix elements from the most significant k bit string to the least significant k bit string may be used to produce a set of different matrices that are decomposed into a phase representation and implemented using the photonic processor. The division need not be done on both the weight matrix entries and the input dataset entries simultaneously. In some embodiments, the photonic processor may propagate multiple input datasets in terms of the same matrix. Because digital-to-analog converters (DACs) for vector preparation may operate at high bandwidths, while DACs for VBS may be quasi-static with respect to vectors, it may be efficient to perform division only on the input data set and maintain VBS control at a set precision (e.g., full precision). In general, it is more difficult to include a DAC with high bit precision at a higher bandwidth than to design a DAC with high bit precision at a lower bandwidth. Thus, in some embodiments, the output vector elements may be more precise than the ADC allows, but the ADC automatically rounds the output vector values ​​down to the bit precision allowed by the ADC. IV. Analog Gain The inventors have realized that low-precision (16-bit or less, 12-bit or less, 10-bit or less) fixed-point binary representations are much less demanding in terms of chip area and power requirements than high-precision floating-point binary representations. However, compared to high-precision floating-point representations (e.g., FP32) traditionally used in modern processors, low-precision fixed-point representations result in significantly lower representation accuracy. Furthermore, reducing the precision can reduce the dynamic range of the ADC. This results in a trade-off between representing the full dynamic range of the data vector and accurately representing smaller output values. Described herein are techniques for performing matrix multiplication using a hybrid analog-digital processor with a low-precision ADC. More specifically, some accelerator architectures according to some embodiments employ techniques for shifting the readout window of the ADC. Shifting the readout window allows the ADC to focus the conversion on the portion of the signal that has the greatest amount of meaningful information, or is at least more likely to have some meaningful information. By leveraging these techniques, some accelerator architectures are designed to operate using a low-precision fixed-point binary number representation, resulting in significantly reduced power consumption compared to traditional high-precision floating-point representations.

[0150] FIG. 1-6A is a plot illustrating one such technique. The plot shows an example of a signal distribution that may be presented as an input to an ADC (see the curve labeled "Input Distribution"). (In this example, the distribution is expressed as a function of voltage, although it is also possible to express the distribution as a function of other quantities.) The input distribution depends on the data that needs to be processed and may vary significantly from data to data. The dynamic range of an ADC (labeled "Dynamic Range") indicates the maximum magnitude range that the ADC can read. At one end of the dynamic range is the minimum signal (e.g., voltage) that the ADC can read. At the opposite end of the dynamic range is the maximum signal that the ADC can read. In this particular example, the input distribution extends over only a portion of the ADC's dynamic range. However, in other situations, the input data may be such that the signal extends primarily outside the dynamic range.

[0151] The techniques described herein allow for adjustment of the input distribution to more closely match the dynamic range of the ADC. In some embodiments, this can be achieved by scaling (e.g., amplifying or attenuating) the analog signal before it is provided as an input to the ADC. In some embodiments, the analog signal can be scaled so that the signal distribution extends from one end of the dynamic range to the other end of the dynamic range. In some embodiments, as shown in FIG. 1-6A, the analog signal can be scaled so that a small portion of the tail of the distribution is outside the dynamic range. In the example of FIG. 1-6A, an amplification is applied that stretches the input distribution across the entire dynamic range, with a portion of the tail outside the dynamic range (the resulting distribution is labeled "Amplified Distribution"). Those inputs that are not within the dynamic range can be clipped to the minimum and maximum values ​​of the ADC range. In FIG. 1-6A, this is shown by the vertical spikes of the "Amplified Distribution" at the end of the ADC range. The inventors have recognized that, as shown in Figures 1-6A, truncating a portion of a distribution can result in a loss of information, but the lost information may not be as meaningful as information within the dynamic range.

[0152] This concept is illustrated in Figure 1-6B. For example, matrix-vector multiplication using integer (or fixed-point) arithmetic Consider JPEG0007555944000011.jpg7158, where A is an n x n matrix. The entries of A are unsigned numbers represented in m1 bits, and the entries of b are unsigned numbers represented in m2 bits. The full precision representation of the entries of the output vector c is c bit, b c = log2(n) + m1 + m2 (see Bit String 1). However, if the output of such a calculation is b adc c ​When read out using an ADC with 16 bits, there is a tradeoff between representing the full dynamic range of c and more accurately representing smaller output values. As an example, consider n=16, m1=2, and m2=4, where full precision is b c = 10. As further shown in the figure, a 4-bit ADC configured to read out the full dynamic range of c will read out the most significant 4 bits of the output (see bit string 2). For some distribution of values, there may be useful information in this range. However, in general, there is a high probability that the most significant bit will not be set. As a result, the conversion will not yield any meaningful information.

[0153] In some embodiments, the ADC read window can be shifted by amplifying the signal. Bit string 3 is obtained by amplifying the signal with a gain equal to 4, which shifts the read window 2 bits towards the least significant bits. As a result, useful information begins to appear within the window. The resulting 4-bit output captures most of the meaningful information of an output with full precision. Bit string 4 is obtained by amplifying the signal with a gain equal to 64 (which inadvertently saturates the ADC in this case), which shifts the read window another 3 bits towards the least significant bits. The saturated result indicates that the true value is representable on the scale of these lowest bits and is therefore greater than the maximum data value that is the most accurate representation of this input bit string on this data scale.

[0154] The inventors have realized that the useful information of the lower bits can be limited by input quantization noise. An analog device that programs a normalization matrix A (having values ​​between 0 and 1) is accurate to m1 bits, and 2 -(m1+1) If an analog device has a coding noise level of m and programs b normalization entries (having values ​​between 0 and 1) accurate to m2 bits, and -(m2+1) Consider an example with coding noise at a level of . For n=16, m1=2 and m2=4, full precision isc =10. However, if we consider the case where the maximum value of A (all values ​​equal to 1) is programmed, then the (log2n+m2+1)th bit may be noisy. Similarly, if the maximum value of b (all values ​​equal to 1) is programmed, then the (log2n+m1+1)th bit may be noisy. Amplifying the signal to read this bit and the less significant bits may produce a noisy result. However, by taking multiple measurements and averaging, it may be possible to bring these noisy bits back to their normal state. This coding quantization noise essentially limits how much amplification can be applied to the signal before a noisy bit is encountered. In some embodiments, the coding quantization noise is not the only noise source. The noise floor of the TIA and the optical receiver (in the case of a photonic processor) may limit the amount of amplification before the noisy bits are read out.

[0155] In general, it may be difficult to predict how much gain is needed to maximize the collection of meaningful information. In some embodiments, the gain may be determined based on the statistics of the weight matrix (e.g., matrix A). This determination may be further based on known statistics of the input vector data (matrix B) or ranges of statistics of the input vector data in some embodiments. In one example, the gain may be determined as part of the training procedure. That is, the gain is a parameter that can be learned. In other embodiments, the gain parameter may be learned without using machine learning techniques. For example, it may be determined whether a particular gain level is sufficiently accurate for the training data, and if not, it may be adjusted until it is. Furthermore, it may be desirable to regularize the gain during the training procedure toward lower values ​​by adding a regularization loss term to the overall training loss function, for example, to reduce the amount of energy required to evaluate calculations in an analog processor, or to allow the analog processor to operate at a higher bandwidth while preserving the gain-bandwidth product of the amplifier.

[0156] In some embodiments, the gain settings may be different for each layer of the neural network. In some such embodiments, it may be desirable to learn the gain settings for each layer, and the gains may change when transitioning from one layer to the next. In some embodiments, when the accelerator receives new data, the controller may set the gains to the values ​​used in training on the new data.

[0157] An example of an accelerator based on the above technique, according to some embodiments, is shown in FIG. 1-7A. Similar to the accelerator 1-100, the accelerator 1-700 includes a DAC unit 1-102, an analog processor 1-104, and an ADC unit 1-106. The accelerator 1-700 further includes an analog scaling unit 1-103 disposed between the DAC unit 1-102 and the analog processor 1-104, and an analog scaling unit 1-105 disposed between the analog processor 1-104 and the ADC unit 1-106. The components of FIG. 1-7A and optionally other components are collectively referred to herein as a "circuit."

[0158] Unlike the accelerator 1-100, the accelerator 1-700 is configured to perform mathematical operations in a single pass. Thus, the digital accumulator 1-110 is omitted. However, as described in more detail above, techniques for increasing the accuracy of low-precision fixed-point representations may be used with multiple accelerators arranged to perform multiple passes. In particular, multiple passes may be made between input data of different levels of precision and values ​​encoded in an analog processor.

[0159] The scaling described in connection with FIG. 1-6A may occur anywhere along the data path from the DAC unit to the ADC unit. The analog scaling unit 1-103 may be configured to scale (e.g., amplify or attenuate) the analog signal before it is provided to the analog processor. The analog scaling unit 1-105 may be configured to scale the analog signal after the analog processor 1-104. The analog scaling units may include any suitable type of controllable amplifier or attenuator, including voltage amplifiers, current amplifiers, power amplifiers, transimpedance amplifiers, transconductance amplifiers, voltage attenuators, current attenuators, and power attenuators, among others. As described in more detail below, in a photonic analog processor, the analog scaling unit may be one of the analog scaling units mentioned above, an optical amplifier, or a variable gain laser, among others. In the example of FIG. 1-7B, the analog scaling unit 1-103 includes a plurality of amplifiers or attenuators 1-702. The controller 1-120 sets the gain of these devices. (Gain is referred to herein to indicate amplification or attenuation depending on whether the gain is greater than or less than one).

[0160] 1-8 is a flow chart illustrating an example of a method for performing a mathematical operation, according to some embodiments. In some embodiments, an accelerator 1-700 (FIG. 1-7A) may perform method 1-800 (although other suitable accelerators may be used). It should be understood that the steps of method 1-800 may be performed in the order shown in FIG. 1-8 or in any other suitable order.

[0161] In step 1-801, the accelerator 1-700 receives an input data set. For example, referring again to FIG. 1-2B, the accelerator may receive the entries of matrix B.

[0162] In step 1-802, the accelerator 1-700 generates a plurality of input analog signals based on the input data set received in step 1-801. Referring again to FIG. 1-7A, in some embodiments, the generating in step 1-804 involves converting the input data set to analog signals using a DAC unit 1-102.

[0163] In step 1-804, the controller 1-120 determines one or more scaling factors. As noted above, the one or more scaling factors may be determined based on the set of parameters and the input data set in some embodiments. For example, the scaling factors may be determined based on statistics of the set of parameters and statistics of the input data set. Alternatively, the scaling factors may be determined based on assumptions regarding the statistics of the set of parameters and statistics of the input data set. In some embodiments, two scaling factors may be determined (one for analog scaling unit 1-103 and one for analog scaling unit 1-105).

[0164] As noted above, there may be an optimal gain value that maximizes the accuracy of calculations made using the numerical representation. The optimal gain may not be known a priori in some embodiments, but the gain may be learned as part of a training procedure. FIG. 1-9A is a plot showing the accuracy (expressed as a percentage) of a neural network performing an image classification task as a function of gain. As shown in the figure, there is an optimal gain that maximizes accuracy that may be learned as part of the training procedure. In some embodiments, this optimum may be calculated prior to performing method 1-800, and information indicative of the optimal gain may be stored in a memory or look-up table for retrieval during method 1-800.

[0165] In step 1-806, the controller 1-120 sets the gain of the analog scaling unit 1-103 and / or the gain of the analog scaling unit 1-105 based on the one or more scaling factors determined in step 1-806.

[0166] In step 1-808, the analog scaling unit 1-103 amplifies or attenuates the input analog signal generated by the DAC unit 1-102 based on one or more scaling factors. As mentioned above, this may cause the signal distribution to more closely match the dynamic range of the ADC.

[0167] In step 1-810, the controller 1-120 programs the analog processor 1-104. More specifically, the controller 1-120 programs the analog processor 1-104 based on a set of parameters (e.g., based on the parameters of matrix A). Programming the analog processor may involve setting certain characteristics of the analog processor based on the parameters, as described above in connection with Figures 1-2A and 1-3.

[0168] In step 1-812, the analog processor 1-104 generates a number of output analog signals based on a number of input analog signals and a set of parameters for which the analog processor was programmed in step 1-810. This may involve performing a matrix multiplication or convolution in some embodiments. As in the example of Figure 1-3, the operations may be performed using matrix decomposition.

[0169] In step 1-814, the accelerator 1-700 amplifies or attenuates the analog signal output by the DAC unit 1-102 using the gain or attenuation factor determined in step 1-806. The amplification or attenuation may be performed using an analog scaling unit 1-105. In some embodiments, only one of steps 1-808 and 1-814 is performed; that is, the signal is amplified or attenuated only before or after passing through the analog processor 1-104. In other embodiments, both steps are performed.

[0170] In step 1-816, the accelerator 1-700 generates an output data set based on the multiple output analog signals obtained in step 1-814. In some embodiments, generating step 1-816 involves passing the output analog signals through an ADC unit 1-106.

[0171] The inventors have realized that in some embodiments, it may be beneficial to have the gain or damping coefficients of a (e.g., multi-path) neural network model differ from layer to layer. Indeed, the inventors have realized that the error of a low-precision fixed-point representation may be layer dependent. Figures 1-9B plot how the mean squared error associated with a low-precision fixed-point representation varies as a function of gain across three different layers of a neural network. The mean squared error is calculated for an FP32 representation. In this particular example, setting the gain to 2 minimizes the mean squared error of the second layer, setting the gain to 4 minimizes the mean squared error of the third layer, and setting the gain to 6 minimizes the mean squared error of the fourth layer. This is primarily caused by the changing data distribution in different layers of the neural network model. Thus, in some embodiments, the gain may differ from layer to layer. Additionally, the gain may differ between any suitable sub-portions of the network assigned to a processor, including, but not limited to, tiles of matrices within a layer.

[0172] The accelerator of FIG. 1-10 combines the aspects described in connection with the accelerator of FIG. 1-2A and the aspects described in connection with the accelerator of FIG. 1-7A. The accelerator 1-1000 includes a DAC unit 1-102, an analog scaling unit 1-103, an analog processor 1-104, an analog scaling unit 1-105, an ADC unit 1-106, a digital scaling unit 1-108, a digital accumulation unit 1-110, and a controller 1-120. The accelerator 1-1000 is configured to perform multiple passes through the analog processor 1-104, as described in connection with FIG. 1-2A, and is also configured to perform amplification or attenuation, as described in connection with FIG. 1-7A. The components of FIG. 1-10 and optionally other components are collectively referred to herein as a "circuit."

[0173] FIG. 1-11 is a flow chart illustrating an example of a method for performing a mathematical operation, according to some embodiments. Method 1-1100 may be performed using accelerator 1-1000 (FIG. 1-10) (although other suitable accelerators may be used). Method 1-1100 is similar to method 1-300, although it further includes some of the steps of method 1-800. V. Example of an Optical Analog-Digital Matrix Processor The inventors have developed a particular class of analog processors that use optical signals. The inventors have realized that because optical signals travel at the speed of light in the medium they are traveling, the latency is much less than the limit for electrical systems. In addition, the increased distances that optical signals travel means that there is virtually no power loss, opening up new topologies and processor layouts that are not possible using electrical signals. Thus, in some embodiments, photonic processors can be used as part of an accelerator.

[0174] Any of the techniques described above may be applied to an accelerator including a photonic processor. An example of such an accelerator, according to some embodiments, is shown in FIG. 1-12. The accelerator 1-1200 includes a DAC unit 1-102, one or more lasers 1-1250, an optical encoder 1-1201, an optical scaling unit 1-1203, a photonic processor 1-1204, an optical scaling unit 1-1205, an optical receiver 1-1207, an electronic analog scaling unit 1-105, an ADC unit 1-106, a digital scaling unit 1-108, a digital accumulation unit 1-110, and a controller 1-120. Despite the use of optical signals, the accelerator 1-1200 may be configured to operate in a manner similar to the accelerator 1-100 (FIG. 1-2A), in a manner similar to the accelerator 1-700 (FIG. 1-7A), in a manner similar to the accelerator 1-1000 (FIG. 1-10), or any suitable combination of these accelerators. The photonic processor 1-1204 may be designed to perform mathematical operations similar to those performed by the analog processor 1-104 (FIGS. 1-2A and 1-7A), but in the optical domain. Examples of photonic processors are described in more detail below. The components of FIG. 1-12 (whether optical or electronic) and optionally other components are collectively referred to herein as a "circuit."

[0175] The DAC unit 1-102, the electronic analog scaling unit 1-105, the ADC unit 1-106, the digital scaling unit 1-108 and the digital accumulation unit 1-110 have characteristics similar to those described in connection with FIGS. 1-2A and 1-7A.

[0176] The laser 1-1250 provides a reference optical signal to the optical encoder 1-1201. In some embodiments, the controller 1-120 may control the output power of the laser. The optical encoder 1-1201 is configured to convert the analog signal received from the DAC unit 1-102 into an optically encoded signal that is processed by the photonic processor 1-1204. In some embodiments, the optical signal represents the value and sign of an associated bit string as the amplitude and phase of optical pulses. In some embodiments, the phase may be limited to a binary selection of zero phase shift or π phase shift, representing positive and negative values, respectively. The embodiments are not limited to real input vector values. Complex vector components may be represented, for example, using more than two phase values ​​when encoding the optical signal.

[0177] Similar to the analog scaling unit 1-103 (FIG. 1-7A), the optical scaling unit 1-1203 may be configured to scale the optical input signal generated by the optical encoder 1-1201 to more closely match the dynamic range of the ADC. Additionally, the optical scaling unit 1-1205 may be configured to scale the optical output of the processor 1-1204. As in FIG. 1-7A, the analog scaling unit 1-105 may be configured to more closely match the dynamic range of the ADC by scaling the received electrical output. In some embodiments, the analog scaling unit 1-105 is implemented using a transimpedance amplifier. Additionally or alternatively, the signal distribution may be adjusted to more closely match the dynamic range of the ADC based on the output power of the laser. In effect, a laser including an optical amplifying medium may be utilized as the amplifier. It should be understood that while the example of FIG. 1-12 includes an optical scaling unit 1-1203, an optical scaling unit 1-1205, and an electrical analog scaling unit 1-105, other embodiments may include only a subset of these units. In some embodiments, since amplification or attenuation may occur anywhere along the path to the ADC, the accelerator 1-1200 generates multiple amplified output optical signals using any combination of the following optical amplifiers: laser 1-1250, optical scaling unit 1-1203 and optical scaling 1-1205.

[0178] The optical receiver 1-1207 is configured to convert the optical signal into an electrical signal. For example, the optical receiver 1-1207 may include a number of photodetectors, such as pn junction photodiodes, pin junction photodiodes, avalanche photodiodes, or phototransistors. In some embodiments, the photodetectors include germanium photodiodes.

[0179] As in FIG. 1-2A, a digital scaling unit 1-108 may be configured to scale the partial output data set, and a digital accumulation unit 1-110 may be configured to accumulate the scaled partial output data set.

[0180] The photonic processor 1-1204 may be implemented in any of a number of ways. As described in connection with the analog processor 1-104, the photonic processor 1-1204 may be designed to perform matrix operations based on matrix decomposition (examples of which are provided below). Different processor architectures may be used to encode the weight matrix. In some embodiments, this may be accomplished by a programmable photonic device such as an optical modulator. Examples of optical modulators are optical resonator modulators, including ring modulators and disk modulators. Another example is a Franz-Keldysh modulator. In some embodiments, programming the photonic processor based on the parameters of the matrix involves setting optical properties of the programmable photonic device. For example, programming an optical resonator may involve programming the resonant frequency of the resonator, and programming a Franz-Keldysh modulator may involve programming the absorption of the modulator.

[0181] We now describe another implementation of the photonic processor. FIG. 2-1 illustrates a photonic processing system 2-100 that may be used to implement some of the components of the accelerator 1-1200, according to some embodiments. The photonic processing system 2-100 includes an optical encoder 2-101, a photonic processor 2-103, an optical receiver 2-105, and a controller 2-107. The optical encoder 2-100 functions as the optical encoder 1-1201 (FIG. 1-12), the photonic processor 2-103 functions as the photonic processor 1-1204, the optical receiver 2-105 functions as the optical receiver 1-1207, and the controller 2-107 functions as the controller 1-120. Although not illustrated in FIG. 2-1, in some embodiments, an optical analog scaling unit may be inserted between the optical encoder 2-101 and the photonic processor 2-103. Additionally or alternatively, an optical analog scaling unit may be inserted between the photonic processor 2-103 and the optical receiver 2-105.

[0182] The photonic processing system 2-100 receives an input vector represented by a group of input bit strings, for example from an external processor (e.g., a CPU), and produces an output vector represented by a group of output bit strings. For example, if the input vector is an n-dimensional vector, the input vector can be represented by n separate bit strings, each bit string representing each component of the vector. The input bit strings may be received from the external processor as electrical or optical signals, and the output bit strings may be transmitted to the external processor as electrical or optical signals. In some embodiments, the controller 2-107 does not necessarily output an output bit string after each process iteration. Instead, the controller 2-107 may use one or more output bit strings to determine a new input bit stream to be fed through the components of the photonic processing system 2-100. In some embodiments, the output bit string itself may be used as an input bit string for the next iteration of a process performed by the photonic processing system 2-100. In other embodiments, multiple output bit streams are combined in various ways to determine the next input bit string. For example, one or more output bitstrings may be summed as part of determining the next input bitstring.

[0183] The optical encoder 2-101 outputs n separate optical pulses that are transmitted to the photonic processor 2-103. Each output of the optical encoder 2-101 is one-to-one coupled to a single input of the photonic processor 2-103. In some embodiments, the optical encoder 2-101 may be located on the same substrate as the photonic processor 2-103 (e.g., the optical encoder 2-101 and the photonic processor 2-103 are on the same chip). In such embodiments, the optical signal may be transmitted from the optical encoder 2-101 to the photonic processor 2-103 in a waveguide, such as a silicon photonic waveguide. In other embodiments, the optical encoder 2-101 may be located on a separate substrate from the photonic processor 2-103. In such embodiments, the optical signal may be transmitted from the optical encoder 2-101 to the photonic processor 2-103 in an optical fiber.

[0184] The photonic processor 2-103 performs multiplication of the input vector with a matrix M. As described in detail below, the matrix M may be decomposed into three matrices using a combination of singular value decomposition (SVD) and unitary matrix decomposition. In some embodiments, the unitary matrix decomposition is performed using an operation similar to the Givens rotation of the QR decomposition. For example, SVD may be used in combination with a Householder decomposition. The decomposition of the matrix M into three component parts may be performed by the controller 2-107, and each component part may be implemented by a portion of the photonic processor 2-103. In some embodiments, the photonic processor 2-103 includes three parts: a first array of variable beam splitters (VBS) configured to perform a transformation on an array of input optical pulses equivalent to a first matrix multiplication (see, for example, the first matrix module 2-301 in FIG. 2-3); a group of controllable optical elements configured to adjust the intensity and / or phase of each optical pulse received from the first array, said adjustment equivalent to a second matrix multiplication by a diagonal matrix (see, for example, the second matrix module 2-303 in FIG. 2-3); and a second array of VBS configured to perform a transformation on optical pulses received from a group of controllable electro-optical elements, said transformation equivalent to a third matrix multiplication (see, for example, the third matrix module 2-305 in FIG. 3).

[0185] The photonic processor 2-103 outputs n separate optical pulses that are transmitted to the optical receiver 2-105. Each output of the photonic processor 2-103 is one-to-one coupled to a single input of the optical receiver 2-105. In some embodiments, the photonic processor 2-103 may be located on the same substrate as the optical receiver 2-105 (e.g., the photonic processor 2-103 and the optical receiver 2-105 are on the same chip). In such embodiments, the optical signal may be transmitted from the photonic processor 2-103 to the optical receiver 2-105 by a silicon photonic waveguide. In other embodiments, the photonic processor 2-103 may be located on a separate substrate from the optical receiver 2-105. In such embodiments, the optical signal may be transmitted from the photonic processor 2-103 to the optical receiver 2-105 by an optical fiber.

[0186] The optical receiver 2-105 receives n optical pulses from the photonic processor 2-103. Each optical pulse is then converted into an electrical signal. In some embodiments, the intensity and phase of each optical pulse are measured by a photodetector in the optical receiver. Electrical signals representing these measurements are then output to the controller 2-107.

[0187] The controller 2-107 includes a memory 2-109 and a processor 2-111 for controlling the optical encoder 2-101, the photonic processor 2-103, and the optical receiver 2-105. The memory 2-109 may be used to store input and output bit strings as well as measurement results from the optical receiver 2-105. The memory 2-109 also stores executable instructions that, when executed by the processor 2-111, control the optical encoder 2-101, perform a matrix decomposition algorithm, control the VBS of the photonic processor 103, and control the optical receiver 2-105. The memory 2-109 may also include executable instructions that cause the processor 2-111 to determine a new input vector to send to the optical encoder based on a group of one or more output vectors determined by measurements made by the optical receiver 2-105. In this manner, the controller 2-107 may control an iterative process in which an input vector is multiplied with multiple matrices by adjusting the settings of the photonic processor 2-103 and feeding detection information from the optical receiver 2-105 back to the optical encoder 2-101. Thus, the output vector transmitted by the photonic processing system 2-100 to an external processor may be the result of multiple matrix multiplications rather than just a single matrix multiplication.

[0188] In some embodiments, a matrix may be too large to be encoded in a photonic processor using a single pass. In such a situation, a portion of the large matrix may be encoded in the photonic processor, and a multiplication process may be performed on the single portion of the large matrix. The result of that first operation may be stored in memory 2-109. Then, a second portion of the large matrix may be encoded in the photonic processor, and a second multiplication process may be performed. This "chunking" of the large matrix may continue until a multiplication process has been performed on all portions of the large matrix. The results of the multiple multiplication processes, which may be stored in memory 2-109, may then be combined to form a final result of the multiplication of the input vector and the large matrix.

[0189] In other embodiments, only the collected behavior of the output vectors is used by the external processor. In such embodiments, only the collected results, such as the average or maximum / minimum values ​​of multiple output vectors, are sent to the external processor. A. Optical Encoder Referring to FIG. 2-2, an optical encoder, according to some embodiments, includes at least one light source 2-201, a power tree 2-203, an amplitude modulator 2-205, a phase modulator 2-207, a digital-to-analog converter (DAC) 2-209 associated with the amplitude modulator 2-205, and a DAC 2-211 associated with the phase modulator 2-207. The DACs 2-209 and 2-211 may be part of a DAC unit 1-102 (FIG. 1-12). Although the amplitude modulator 2-205 and the phase modulator 2-207 are shown in FIG. 2-2 as a single block having n inputs and n outputs (each of the inputs and outputs is, for example, a waveguide), in some embodiments, each waveguide may include a respective amplitude modulator and a respective phase modulator such that the optical encoder includes n amplitude modulators and n phase modulators. There may also be an individual DAC for each amplitude and phase modulator. In some embodiments, instead of having an amplitude modulator and a separate phase modulator associated with each waveguide, a single modulator may be used to encode both amplitude and phase information. Using a single modulator to perform such encoding limits the ability to precisely adjust both the amplitude and phase of each optical pulse, but there are some encoding schemes that do not require precise adjustment of both the amplitude and phase of the optical pulse. Such schemes are described later in this specification.

[0190] The light source 2-201 may be any suitable coherent light source. In some embodiments, the light source 2-201 may be a diode laser or a vertical-cavity surface emitting laser (VCSEL). In some embodiments, the light source 2-201 is configured to have an output power of more than 10 mW, more than 25 mW, more than 50 mW, or more than 75 mW. In some embodiments, the light source 2-201 is configured to have an output power of less than 100 mW. The light source 2-201 may be configured to emit a continuous wave of light or a pulse of light ("light pulse") at one or more wavelengths (e.g., C-band or O-band). The duration of the light pulse may be, for example, about 100 ps.

[0191] Although the light source 2-201 is shown in FIG. 2-2 as being on the same semiconductor substrate as the other components of the optical encoder, the embodiment is not so limited. For example, the light source 2-201 could be a separate laser packaging that is edge- or surface-bonded to the optical encoder chip. Alternatively, the light source 2-201 could be completely off-chip and light pulses could be coupled into the waveguide 2-202 of the optical encoder 2-101 via optical fiber and / or grating couplers.

[0192] Although the light source 2-201 is shown as two light sources 2-201a and 2-201b, the embodiments are not so limited. Some embodiments may include a single light source. Including multiple light sources 201a-b, which may include three or more light sources, can provide redundancy if one of the light sources fails. Including multiple light sources can extend the useful life of the photonic processing system 2-100. The multiple light sources 2-201a-b can each be coupled to a waveguide of the optical encoder 2-101 and then combined with a waveguide coupler configured to direct light pulses from each light source to the power tree 2-203. In such an embodiment, only one light source is used at any one time.

[0193] Some embodiments may simultaneously use two or more phase-locked light sources of the same wavelength to increase the optical power going into the optical encoder system. A small portion of the light from each of the two or more light sources (e.g., obtained by a waveguide tap) may be directed to a homodyne detector where a beat error signal may be measured. The bear error signal may be used to determine possible phase drift between the two light sources. The beat error signal may be fed, for example, to a feedback circuit that controls a phase modulator that phase-locks the output of one light source to the phase of the other light source. Phase-locking may be generalized to a master-slave scheme, where N≧1 slave light sources are phase-locked to a single master light source. The result is a total of N+1 phase-locked light sources available to the optical encoder system.

[0194] In other embodiments, each separate light source may be associated with a different wavelength of light. The use of multiple wavelengths of light allows some embodiments to be multiplexed such that multiple calculations can be performed simultaneously using the same optical hardware.

[0195] The power tree 2-203 is configured to split a single optical pulse from the light source 2-201 into an array of spatially separated optical pulses. Thus, the power tree 2-203 has one optical input and n optical outputs. In some embodiments, the optical power from the light source 2-201 is split evenly to the n optical modes associated with the n waveguides. In some embodiments, the power tree 2-203 is an array of 50:50 beam splitters 2-801, as shown in FIG. 2-8. The number of "depths" of the power tree 2-203 depends on the number of output waveguides. For a power tree with n output modes, the depth of the power tree 2-203 is ceil(log2(n)). The power tree 2-203 in FIG. 2-8 shows only three tree depths (each layer of the tree is labeled at the bottom of the power tree 2-203). Each layer has 2 m-1beam splitters 2-801a, where m is the layer number. As a result, the first layer has a single beam splitter 2-801a, the second layer has two beam splitters 2-801b to 2-801c, and the third layer has four beam splitters 2-801d to 2-801g.

[0196] Although power tree 2-203 is shown as an array of cascaded beam splitters that may be implemented as evanescent waveguide couplers, the embodiment is not so limited as any optical device that converts a single optical pulse into multiple spatially separated optical pulses may be used. For example, power tree 2-203 may be implemented using one or more multimode interferometers (MMIs), in which case the equations governing the layer widths and depths are appropriately modified.

[0197] Whatever type of power tree 2-203 is used, it is likely difficult, if not impossible, to create a power tree 2-203 in which the division ratio is exactly equal between the n output modes. Thus, adjustments can be made to the settings of the amplitude modulators to correct for the unequal intensities of the n optical pulses output by the power tree. For example, the waveguide with the lowest optical power can be set as the maximum power for any pulses sent to the photonic processor 2-103. Thus, in addition to modulation on the amplitude being performed to encode information into the optical pulses, any optical pulses with power above the maximum power can be modulated by the amplitude modulator 2-205 to have a lower power. A phase modulator can also be placed in each of the n output modes, which can be used to adjust the phase of each output mode of the power tree 2-203 so that all output signals have the same phase.

[0198] Alternatively or additionally, power tree 2-203 may be implemented using one or more Mach-Zehnder Interferometers (MZIs), in which the splitting ratio of each beam splitter in the power tree may be adjusted to produce substantially equal intensity pulses at the output of power tree 2-203.

[0199] The amplitude modulator 2-205 is configured to modify the amplitude of each optical pulse received from the power tree 2-203 based on the respective input bit string. The amplitude modulator 2-205 may be a variable attenuator or other suitable amplitude modulator controlled by a DAC 2-209 (which may be further controlled by the controller 2-107). Several amplitude modulators are known for telecommunications applications and may be used in some embodiments. In some embodiments, a variable beam splitter may be used as the amplitude modulator 2-205, in which case only one output of the variable beam splitter is kept and the other output is discarded or ignored. Other examples of amplitude modulators that may be used in some embodiments include traveling wave modulators, resonator-based modulators, Franz-Keldysh modulators, plasmon-based modulators, 2D material-based modulators, and nano-opto-electro-mechanical switches (NOEMS).

[0200] The phase modulator 2-207 is configured to modify the phase of each optical pulse received from the power tree 2-203 based on a respective input bit string. The phase modulator may be a thermo-optic phase shifter or other suitable phase shifter that may be electrically controlled by 2-211 (which may be further controlled by the controller 2-107).

[0201] Although FIG. 2-2 shows the amplitude modulator 2-205 and the phase modulator 2-207 as two separate components, they may be combined into a single element that controls both the amplitude and phase of the optical pulse. However, there is an advantage to separately controlling the amplitude and phase of the optical pulse. Namely, due to the relationship between the amplitude shift and the phase shift using the Kramers-Kronenig relationship, there is a phase shift associated with any amplitude shift. To precisely control the phase of the optical pulse, the phase shift introduced by the amplitude modulator 2-205 should be cancelled out using the phase modulator 2-207. As an example, the total amplitude of the optical pulses leaving the optical encoder 2-101 is A=a0a1a2, and the total phase of the optical pulses leaving the optical encoder is θ=Δθ+Δφ+φ, where a0 is the input intensity of the input optical pulse (assuming zero phase at the input of the modulator), a1 is the amplitude attenuation of the amplitude modulator 2-205, Δθ is the phase shift imparted by the amplitude modulator 2-205 while modulating the amplitude, Δφ is the phase shift imparted by the phase modulator 2-207, a2 is the attenuation associated with the optical pulse passing through the phase modulator 2-209, and φ is the phase imparted to the optical signal by the propagation of the optical signal. Thus, the settings of the amplitude and phase of the optical pulses are not two independent decisions. Rather, to accurately encode a particular amplitude and phase into the optical pulses output from the optical encoder 2-101, the settings of both the amplitude modulator 2-205 and the phase modulator 2-207 should be considered for both settings.

[0202] In some embodiments, the amplitude of the light pulse is directly related to the bit string value. For example, a high amplitude pulse corresponds to a high bit string value and a low amplitude pulse corresponds to a low bit string value. The phase of the light pulse encodes whether the bit string value is positive or negative. In some embodiments, the phase of the light pulse output by the optical encoder 2-101 may be selected from two phases 180 degrees (π radians) apart. For example, a positive bit string value may be encoded with a zero degree phase shift and a negative bit string value may be encoded with a 180 degree (π radians) phase shift. In some embodiments, the vector is intended to be complex valued, and thus the phase of the light pulse is selected from more than just two values ​​between 0 and 2π.

[0203] In some embodiments, the controller 2-107 determines the amplitude and phase applied by both the amplitude modulator 2-205 and the phase modulator 2-207 based on the input bit string and the above equations linking the output amplitude and output phase to the amplitude and phase provided by the amplitude modulator 2-204 and the phase modulator 2-207. In some embodiments, the controller 2-107 may store in memory 2-109 a table of digital values ​​that drive the amplitude modulator 2-205 and the phase modulator 2-207. In some embodiments, the memory may be placed in close proximity to these modulators to reduce communication latency and power consumption.

[0204] A DAC 2-209 associated with and communicatively coupled to the amplitude modulator 2-205 receives digital drive values ​​from the controller 2-107 and converts the digital drive values ​​into analog voltages that drive the amplitude modulator 2-205. Similarly, a DAC 2-211 associated with and communicatively coupled to the phase modulator 2-207 receives digital drive values ​​from the controller 2-107 and converts the digital drive values ​​into analog voltages that drive the phase modulator 2-207. In some embodiments, the DAC may include an amplifier that amplifies the analog voltage to a level high enough to achieve a desired extinction ratio in the amplitude modulator (e.g., the highest extinction ratio physically achievable using the particular phase modulator described above) and a desired phase shift range in the phase modulator (e.g., a phase shift range covering the full range from 0 to 2π). Although DAC2-209 and DAC2-211 are shown in FIG. 2-2 as being located within and / or on the chip of the optical encoder 2-101, in some embodiments, DAC2-209 and DAC2-211 may be located off-chip while still being communicatively coupled to the amplitude modulator 2-205 and phase modulator 2-207, respectively, using conductive traces and / or wires.

[0205] After modulation by the amplitude modulator 2-205 and the phase modulator 2-207, the n optical pulses are sent from the optical encoder 2-101 to the photonic processor 2-103. B. Photonic Processor 2-3, the photonic processor 2-103 performs matrix multiplication on an input vector represented by n input optical pulses and includes three main components: a first matrix module 2-301, a second matrix module 2-303, and a third matrix module 2-305. In some embodiments, as described in more detail below, the first matrix module 2-301 and the third matrix module 2-305 include interconnected arrays of programmable and reconfigurable variable beam splitters (VBS) configured to convert the n input optical pulses from the input vector into output vectors, whose components are represented by the amplitude and phase of each optical pulse. In some embodiments, the second matrix module 2-303 includes a group of electro-optical elements.

[0206] The matrix that is multiplied with the input vector by passing the input optical pulse through the photonic processor 2-103 is called A. The matrix A is a generic m×n matrix known to the controller 2-107 as the matrix to be implemented by the photonic processor 2-103. Therefore, the controller 2-107 determines whether the matrix A is represented by three component matrices (A=V T ΣU, where U and V are real orthogonal n×n and m×m matrices, respectively (U T U=UU T = I and V T V=VV T =I), Σ is an m×n diagonal matrix with real entries), and decomposes matrix A using singular value decomposition (SVD). The superscript “T” in all equations denotes the transpose of the associated matrix. Determining the SVD of a matrix is ​​known, and controller 2-107 may use any suitable technique for determining the SVD of matrix A. In some embodiments, matrix A is a complex matrix, in which case matrix A can be expressed as A=V T ΣU, where V and U are complex unitary n×n and m×m matrices, respectively, and U † U=UU † = I and V † V=VV †=I), Σ is an m×n diagonal matrix with real or complex entries. The values ​​of the diagonal singular values ​​may also be further normalized such that the maximum absolute value of the singular values ​​is 1.

[0207] Once the controller 2-107 has determined the matrices U, Σ, and V of the matrix A, if the matrices U and V are orthogonal real matrices, the control unit may further decompose the two orthogonal matrices U and V into a series of real-valued Givens rotation matrices. The Givens rotation matrix G(i,j,θ) is defined component-wise by the following equation:

[0208] If k ≠ i, j, g kk =1 For k=i,j, g kk =cos(θ) g ij =-g ji =-sin(θ) In other cases, g ki =0 In the formula, g ij represents the element in the i-th row and j-th column of matrix G, and θ is the rotation angle associated with the matrix. In general, matrix G is any 2×2 unitary matrix (SU(2) group) with determinant 1, and is parameterized by two parameters. In some embodiments, these two parameters are the rotation angle θ and another phase value φ. Nevertheless, matrix G may be parameterized by other values ​​than angle or phase, for example by reflectance / transmittance, or (in the case of NOEMS) by separation distance.

[0209] Algorithms for expressing any real orthogonal matrix in terms of a product of a set of Givens rotations in complex space are provided in M. Reck et al., “Experimental realization of any discrete unitary operator,” Physical Review Letters, vol. 73, p. 58, 1994 (“Reck”) and W. R. Clements et al., “Optimal design for universal multiport interferometers,” Optica, vol. 3, p. 12, 2016 (“Clements”), both of which are incorporated herein by reference in their entirety and at least for their description of techniques for decomposing real orthogonal matrices in terms of Givens rotations. (To the extent that any term used herein differs from the usage of that term in Reck and / or Clement, the term shall be given the meaning herein that is most consistent with how one of ordinary skill in the art would understand that usage.) The resulting decomposition is given by the following formula:

[0210]

number

[0211] If n is odd, For odd k, S k ={(1,2),(3,4),...,(n-2,n-1)} For even k, S k ={(2,3),(4,5),...,(n-1,n)} It is.

[0212] By way of example and not limitation, the decomposition of a 4×4 orthogonal matrix may be:

[0213]

number

[0214] An outline of one embodiment of an algorithm for decomposing an n×n matrix U in terms of n sets of real-valued Givens rotations, which may be implemented using the controller 2-107, is as follows. U'←U For i from 1 to n-1: If i is odd: For j=0 to i-1: Element U' n-j,i-j Disable G T i-j,i-j+1 (θ), i.e. θ=tan -1 (U' n-j,i-j / U' n-j,i-j+1 ) U'←U'G T i-j,i-j+1 (θ) If i is even: For j=1 to i: Element U' n+j-i,j Disable G n+j-i-1,n+j-i (θ), i.e. θ=tan -1 (-U' n+j-i,j / U' n+j-i-1,j ) U'←G n+j-i-1,n+j-i (θ)U' The matrix U′ resulting from the above algorithm is lower triangular and is related to the original matrix U by the following equation:

[0215]

number

[0216] The next step in the algorithm is G T jk (θ1)D U =D U G jk The goal is to iteratively determine (θ2), which is accomplished using the following algorithm, which may be implemented using the controller 2-107.

[0217] S L For each (j, k) in: U' j,j and U' k,k If have different signs: θ2=-θ1 Otherwise: θ2=θ1 The above algorithm is performed using V and / or V T can also be used to decompose and determine the m layers of VBS values ​​and the associated phase screens.

[0218] The above concept of decomposing an orthogonal matrix into a real-valued Givens rotation matrix may be extended to complex matrices, e.g., unitary matrices, rather than orthogonal matrices. In some embodiments, this may be achieved by including an additional phase in the parameterization of the Givens rotation matrix. Thus, the general form of a Givens matrix with the addition of an additional phase term is T(i,j,θ,φ), where If k ≠ i, j, then t kk =1, t ii =e iφ cos(θ), t jj = cos(θ), t ij = -sin(θ), t ji =e iφ sin(θ), Otherwise, t ki =0 where t ij represents the i-th row and j-th column of a matrix T, θ is the rotation angle associated with the matrix, and φ is an additional phase. Any unitary matrix can be decomposed into a matrix of type T(i,j,θ,φ). By choosing to set the phase φ=0, we obtain the conventional real-valued Givens rotation matrix shown above. If instead we let the phase φ=π, we obtain a set of matrices known as Householder matrices. The Householder matrix H is JPEG0007555944000015.jpg6158, where I is an n×n identity matrix, v is a unit vector, JPEG0007555944000016.jpg6158 is the cross product. Householder matrices represent reflections onto a hyperplane orthogonal to the unit vector v. In this parameterization, the hyperplane is a 2-dimensional subspace, rather than an n-1-dimensional subspace as in the definition of Householder matrices in terms of the QR decomposition. Thus, the decomposition of a matrix into Givens rotations corresponds to the decomposition of the matrix into Householder matrices.

[0219] Based on the above decomposition of any unitary matrix into a restricted set of Givens rotations, the unitary matrix can be implemented by a specific sequence of rotations and phase shifts. Also, in photonics, the rotations can be represented by variable beam splitters (VBS) and the phase shifts are easily implemented with phase modulators. Thus, for n optical inputs of the photonic processor 2-103, the first matrix module 2-301 and the third matrix module 2-305, which represent the unitary matrices of the SVD of the matrix A, can be implemented by an interconnected array of VBS and phase shifters. Due to the parallelism of simultaneously passing n optical pulses through the VBS array, a matrix multiplication of dimension (I,K)×(K,J) can be implemented in O(IJK / n 2 ) time. The second matrix module 2-303 is a diagonal matrix of the SVD of matrix A combined with a diagonal matrix D associated with each orthogonal matrix of the SVD. As mentioned above, each matrix D may be referred to as a "phase screen" and may be labeled with a subscript to indicate whether it is the phase screen associated with matrix U or matrix V. Thus, the second matrix module 303 is a matrix Σ'=D V ΣD U By factoring these phase screens from the matrices U and V, we obtain the matrices U and V in FIG. 2-3.

[0220] In some embodiments, the VBS unit cells of the photonic processor 2-103 associated with the first matrix module 2-301 and the third matrix module 2-305 may be Mach-Zehnder interferometers (MZIs) with internal phase shifters. In other embodiments, the VBS unit cells may be microelectromechanical system (MEMS) actuators. In some embodiments, external phase shifters may be used to implement the additional phase required for the Givens rotation.

[0221] Diagonal matrix D V ΣD UThe second matrix module 2-303 representing may be implemented using amplitude modulators and phase shifters. In some embodiments, the VBS may be used to variably attenuate the optical pulses, isolating a portion of the light that can be discarded. Additionally or alternatively, a controllable gain medium may be used to amplify the optical signal. For example, GaAs, InGaAs, GaN or InP may be used as the active gain medium to amplify the optical signal. Other active gain processes such as second harmonic generation in materials with crystal inversion symmetry (e.g., KTP and lithium niobate) and four-wave mixing processes in materials lacking inversion symmetry (e.g., silicon) may also be used. Depending on the phase screen implemented, a phase shifter for each optical mode may be used to apply either a zero phase shift or a π phase shift. In some embodiments, only a single phase shifter is used for each optical mode, rather than one phase shifter per phase screen. This is because the matrix D V , Σ and D U This is possible because each of the phase screens D is diagonal and therefore commutes. Therefore, the value of each phase shifter in the second matrix module 2-303 of the photonic processor 2-103 is the product of the two phase screens (D V D U ).

[0222] Referring to FIG. 2-4, the first matrix module 2-301 and the third matrix module 2-305 are implemented as an array of VBS2-401 according to some embodiments. For simplicity, only n=6 input optical pulses (number of rows) are shown resulting in a "circuit depth" (e.g., number of columns) equal to the number of input optical pulses (e.g., 6). For clarity, only a single VBS2-401 is labeled with a reference number. However, the VBSs are labeled with a subscript that identifies which optical mode is mixed by the particular VBS and a superscript that labels the associated column. Each VBS2-401 performs a complex Givens rotation T(i,j,θ,φ), as described above, where i and j correspond to the subscript label of the VBS2-401, θ is the rotation angle of the Givens rotation, and φ is an additional phase associated with the generalized rotation.

[0223] Referring to FIG. 2-5, each VBS2-401 may be implemented using an MZI2-510 and at least one external phase shifter 2-507. In some embodiments, a second external phase shifter 2-509 may also be included. The MZI2-510 includes a first evanescent coupler 2-501 and a second evanescent coupler 2-503 for mixing the two input modes of the MZI2-510. The internal phase shifter 2-505 modulates the phase θ in one arm of the MZI2-510 to create a phase difference between the two arms. Adjusting the phase θ changes the intensity of the light output by the VBS2-401 from one output mode of the MZI2-510 to the other output mode, thereby creating a controllable and variable beam splitter. In some embodiments, a second internal phase shifter may be applied to the second arm. In this case, it is the difference between the two internal phase shifters that changes the output light intensity. The average of the two internal phases gives a global phase to the light entering mode i and mode j. Thus, the two parameters θ and φ can be controlled by phase shifters, respectively. In some embodiments, a second external phase shifter 2-509 can be used to correct for undesired differential phase across multiple output modes of the VBS due to static phase disturbances.

[0224] In some embodiments, the phase shifters 2-505, 2-507, and 2-509 may include thermo-optic, electro-optic, or opto-mechanical phase modulators. In other embodiments, rather than including an internal phase modulator 505 within the MZI 510, a NOEMS modulator may be used.

[0225] In some embodiments, the number of VBSs grows with the size of the matrix. The inventors have realized that it may be difficult to control a large number of VBSs and that there are advantages to sharing a single control circuit among multiple VBSs. One example of a parallel control circuit that may be used to control multiple VBSs is a digital-to-analog converter that receives as an input a digital string that encodes an analog signal to be applied to a particular VBS. In some embodiments, the circuit also receives as a second input the address of the VBS to be controlled. The circuit may then apply an analog signal to the addressed VBS. In other embodiments, the control circuit may automatically scan several VBSs and apply analog signals to those multiple VBSs without being actively addressed. In this case, the addressing sequence is predefined to traverse the VBS array in a known order.

[0226] Referring to FIG. 2-6, the second matrix module 2-303 converts the diagonal matrix Σ′=D V ΣD U This may be achieved by implementing two phase screens using two phase shifters 2-601 and 2-605, and modulating the intensity of the associated optical pulse by an amount η using an amplitude modulator 2-603. As mentioned above, in some embodiments, a single phase modulator 2-601 may be used since the two phase screens can be combined since the three component matrices forming Σ′ are diagonal and therefore commute.

[0227] In some embodiments, the amplitude modulator 2-603 may be implemented using an attenuator and / or an amplifier. If the value of the amplitude modulation η is greater than 1, the optical pulse is amplified. If the value of the amplitude modulation η is less than 1, the optical pulse is attenuated. In some embodiments, only attenuation is used. In some embodiments, the attenuation may be implemented by a bank of integrated attenuators. In other embodiments, as shown in FIG. 2-7, the attenuation 2-603 may be implemented using an MZI that includes two evanescent couplers 2-701 and 2-703 and a controllable internal phase shifter 2-705 for adjusting how much of the input light is transmitted from the input of the MZI to the first output port 2-709 of the MZI. The second output port 2-707 of the MZI may be ignored, blocked, or discarded.

[0228] In some embodiments, the controller 2-107 controls the value of each phase shifter of the photonic processor 2-103. Each of the phase shifters mentioned above may include a DAC similar to the DAC described in connection with the phase modulator 2-207 of the optical encoder 2-101.

[0229] The photonic processor 2-103 may include any number of input modes, but the size and complexity of the interconnected VBS arrays 2-301 and 2-305 increases as the number of input modes increases. For example, if there are n input optical modes, the photonic processor 2-103 has a circuit depth of 2n+1, where the first matrix module 2-301 and the second matrix module 2-305 each have a circuit depth of n, and the second matrix module 2-303 has a circuit depth of 1. What is important is the time complexity of performing a single matrix multiplication that is linear with the number of columns of the input data. If the dimension of the matrix multiplication being processed is (I,K)×(K×J), the time complexity of performing this multiplication for an optical processor with n modes is O(IKJ / n 2 ) In some embodiments, this low order complexity achieved through parallelization results in energy and time efficiencies that are not obtainable using conventional electrical processors.

[0230] Although the embodiments described herein show the photonic processor 2-103 as having n inputs and n outputs, in some embodiments, the matrix A implemented by the photonic processor 2-103 may not be a square matrix. In such embodiments, the photonic processor 2-103 may have a different number of outputs and inputs.

[0231] It should also be noted that the topology of the interconnections of the VBSs in the first and second matrix modules 2-301 and 2-305 allows the photonic processor 2-103 to be subdivided into subsets of non-interacting rows such that two or more matrix multiplications can occur simultaneously. For example, in the VBS array shown in FIG. 2-4, if each VBS 2-401 that couples optical modes 3 and 4 is set such that optical modes 3 and 4 are not coupled at all (e.g., as if the VBS 2-401 with the subscript "34" did not exist in FIG. 2-4), the top three optical modes will operate completely independently from the bottom three optical modes. Such subdivision can be performed on a much larger scale with photonic processors having many more input optical modes. For example, a photonic processor with n=64 may simultaneously multiply eight 8-component input vectors with respective 8×8 matrices (each 8×8 matrix being separately programmable and controllable). Also, the photonic processor 2-103 need not be evenly subdivided. For example, an n=64 photonic processor may be subdivided into seven different input vectors having 20, 13, 11, 8, 6, 4, and 2 components, respectively, each multiplied simultaneously by a respective matrix. It should be understood that the above numerical example is for illustrative purposes only and that any number of subdivisions are possible.

[0232] In addition, although the photonic processor 2-103 performs matrix-vector multiplication in which a vector is multiplied with a matrix by passing an optical signal through an array of VBSs, the photonic processor 2-103 may also be used to perform matrix-matrix multiplication. For example, multiple input vectors may be passed to the photonic processor 2-103 one at a time in sequence, where each input vector represents a column of the input matrix. After optically computing each of the individual matrix-vector multiplications (each multiplication resulting in an output vector corresponding to a column of the output column of the resulting matrix), the results may be digitally combined to form an output matrix resulting from the matrix-matrix multiplication. C. Optical receiver The photonic processor 2-103 outputs n optical pulses that are transmitted to the optical receiver 2-105. The optical receiver 2-105 receives the optical pulses and generates an electrical signal based on the received optical signal. In some embodiments, the amplitude and phase of each optical pulse is determined. In some embodiments, this is accomplished using a homodyne or heterodyne detection scheme. In other embodiments, simple phase-convergent optical detection can be performed using a conventional photodiode.

[0233] Referring to FIG. 2-9, according to some embodiments, the optical receiver 2-105 includes a homodyne detector 2-901, a transimpedance amplifier 2-903, and an ADC 2-905. The transimpedance amplifier 2-903 can function as an electronic analog scaling unit 1-105 (FIG. 1-12), and the ADC 2-905 can be part of the ADC unit 1-106. In FIG. 2-9, the components are shown as one element for all optical modes, but this is for simplicity. Each optical mode can have a dedicated homodyne detector 2-901, a dedicated transimpedance amplifier 2-903, and a dedicated ADC 2-905. In some embodiments, the transimpedance amplifier 2-903 may not be used. Instead, any other suitable electronic circuit that converts a current to a voltage may be used.

[0234] 2-10, according to some embodiments, the homodyne detector 2-903 includes a local oscillator (LO) 2-1001, a quadrature controller 2-1003, a beam splitter 2-1005, and two detectors 2-1007 and 2-1009. The homodyne detector 2-903 outputs a current based on the difference between the currents output by the first detector 2-1007 and the second detector 2-1009.

[0235] The local oscillator 2-1001 is coupled with the input light pulse at a beam splitter 2-1005. In some embodiments, a portion of the light source 2-201 is transmitted to the homodyne detector 2-901 by an optical waveguide and / or optical fiber. The light from the light source 2-201 may itself be used as the local oscillator 2-1001, or in other embodiments, the local oscillator 2-1001 may be a separate light source that uses light from the light source 2-201 to generate phase-matched light pulses. In some embodiments, an MZI may replace the beam splitter 2-1005 so that adjustments can be made between the signal and the local oscillator.

[0236] The quadrature controller 2-1003 controls the cross-sectional angle in phase space at which measurements are made. In some embodiments, the quadrature controller 2-1003 may be a phase shifter that controls the relative phase between the input optical pulse and a local oscillator. The quadrature controller 2-1003 is shown as a phase shifter in input optical mode. However, in some embodiments, the quadrature controller 2-1003 may be in local oscillator mode.

[0237] A first detector 2-1007 detects the light output by the first output of the beam splitter 2-1005, and a second detector 2-1009 detects the light output by the second output of the beam splitter 2-1005. Detectors 2-1007 and 2-1009 can be photodiodes operated with zero bias.

[0238] The subtraction circuit 2-1011 subtracts the current from the first detector 2-1007 from the current from the second detector 2-1009. The resulting current therefore has an amplitude and a sign (+ or -). The transimpedance amplifier 2-903 converts this difference in currents into a voltage that can be positive or negative. Finally, the ADC 2-905 converts the analog signal into a digital bit string. This output bit string represents the output vector result of the matrix multiplication and is an electrical digital version of the optical output representation of the output vector output by the photonic processor 2-103. In some embodiments, the output bit string may be sent to the controller 2-107 for further processing, which may include determining a next input bit string based on one or more output bit strings and / or sending the output bit string to an external processor, as described above.

[0239] The inventors have further realized that the components of the photonic processing system 2-100 described above need not be chained in series, such that there is a first matrix module 2-301 connected to a second matrix module 2-303 connected to a third matrix module 2-305. In some embodiments, the photonic processing system 2-103 may include only a single unitary circuit for performing one or more multiplications. The output of the single unitary circuit may be directly connected to an optical receiver 2-105, where the result of the multiplication is determined by detecting the output optical signal. In such an embodiment, the single unitary circuit may, for example, implement the first matrix module 2-301. The result detected by the optical receiver 2-105 may then be digitally transmitted to a conventional processor (e.g., processor 2-111) where the diagonal second matrix module 2-303 is performed in the digital domain using a conventional processor (e.g., processor 2-111). The controller 2-107 may then reprogram the single unitary circuit to perform a third matrix module 2-305, determine an input bit string based on the result of the digital implementation of the second matrix module, and control the optical encoder to transmit an optical signal encoded based on the new input bit string through the single unitary circuit with the reprogrammed settings. The resulting output optical signal detected by the optical receiver 105 is then used to determine the result of the matrix multiplication.

[0240] The inventors have also realized that there may be advantages to chaining multiple photonic processors 2-103 in series in series. For example, to perform a matrix multiplication M=M1M2 (where M1 and M2 are arbitrary matrices, but M2 changes more frequently than M1 based on a changing input workload), a first photonic processor can be controlled to perform M2, and a second photonic processor optically coupled to the first photonic processor can perform M1, which is kept static. In this way, only the first photonic processing system needs to be updated frequently based on a changing input workload. Such an arrangement not only accelerates computation, but also reduces the number of data bits moving between the controller 2-107 and the photonic processors. D. Folded Photonic Processing Systems In FIG. 2-1, in such an arrangement, the optical encoder 2-101 and the optical receiver 2-105 are located on opposite sides of the photonic processing system 2-100. In an application in which feedback from the optical receiver 2-105 is used to determine the input to the optical encoder 2-101 for future iterations of the process, the data is transferred electronically from the optical receiver 2-105 to the controller 2-107 and then to the optical encoder 2-101. The inventors have realized that reducing the distance these electrical signals must travel (e.g., by reducing the length of the electrical traces and / or wires) results in power savings and reduced latency. Also, the optical encoder 2-101 and the optical receiver 2-105 do not need to be located on opposite sides of the photonic processing system.

[0241] Thus, in some embodiments, the optical encoder 2-101 and the optical receiver 2-105 are located near each other (e.g., on the same side of the photonic processor 2-103) so that the distance that an electrical signal must travel between the optical encoder 2-101 and the optical receiver 2-105 is less than the width of the photonic processor 2-103. This can be achieved by physically interleaving the components of the first matrix module 2-301 and the third matrix module 2-305 so that they are physically in the same part of the chip. This arrangement is referred to as a "folded" photonic processing system because the light first propagates in a first direction through the first matrix module 2-301 until it reaches a physical part of the chip far away from the optical encoder 2-101 and the optical receiver 2-105, and then when implementing the third matrix module 2-305, the waveguide folds back to redirect the light to propagate in the opposite direction to the first direction. In some embodiments, the second matrix module 2-303 is physically located adjacent to the folded portion of the waveguide. Such an arrangement reduces the complexity of the electrical traces connecting the optical encoder 2-101, the optical receiver 2-105, and the controller 2-107, reducing the total chip area used to implement the photonic processing system 2-100. For example, some embodiments using a folded arrangement use only 65% ​​of the total chip area that would be required if the continuous photonic arrangement of FIG. 2-1 were used. This may reduce the cost and complexity of the photonic processing system.

[0242] The inventors have realized that the folded arrangement has not only electrical advantages, but also optical advantages. For example, by reducing the distance that the optical signal must travel from the light source to be used as a local oscillator for homodyne detection, the time-dependent phase variation of the optical signal can be reduced, thereby resulting in higher quality detection results. Specifically, by placing the light source and the homodyne on the same side of the photonic processor, the distance traveled by the optical signal used for the local oscillator no longer depends on the size of the matrix. For example, in the continuous arrangement of FIG. 2-1, the distance traveled by the optical signal for the local oscillator scales linearly with the size of the matrix, whereas the distance traveled in the folded arrangement is constant regardless of the size of the matrix.

[0243] FIG. 2-11 is a schematic diagram of a folded photonic processing system 2-1100 according to some embodiments. The folded photonic processing system 2-1100 includes a power tree 2-1101, a plurality of optical encoders 2-1103a-2-1103d, a plurality of homodyne detectors 2-1105a-2-1105d, a plurality of selector switches 2-1107a-2-1107d, a plurality of U matrix elements 2-1109a-2-1109j, a plurality of diagonal matrix elements 2-1111a-2-1111d, and a plurality of V matrix elements 2-1113a-2-1113j. For clarity, not all components of the folded photonic processing system are shown in the figure. It should be understood that the folded photonic processing system 2-1100 may include similar components as the continuous photonic processing system 2-100.

[0244] The power tree 2-1101 is similar to the power tree 2-203 of FIG. 2 and is configured to deliver light from a light source (not shown) to the optical encoder 2-1103. However, the difference between the power tree 2-1101 and the power tree 2-203 is that the power tree delivers the optical signal directly to the homodyne detector 2-1105a. In FIG. 2, the light source 201 delivers the local oscillator signal to the homodyne detector on the other side of the photonic processor by taking a portion of the optical signal from the light source and guiding the optical signal using a waveguide. In FIG. 2-11, the power tree 2-1101 includes a number of outputs equal to twice the number of spatial modes. For example, FIG. 2-11 shows only four spatial modes of the photonic processor, which results in eight output modes from the power tree 2-1101 (one output directing light to each optical encoder 2-1103 and one output directing light to each homodyne detector 2-1105). The power tree may be implemented, for example, using cascaded beam splitters or a multimode interferometer (MMI).

[0245] The optical encoder 2-1103 is similar to the power tree optical encoder 2-101 of FIGURE 1 and is configured to encode information in the amplitude and / or phase of the optical signal received from the power tree 2-1101. This may be accomplished, for example, as described in connection with the optical encoder 2-101 of FIGURE 2.

[0246] The homodyne detector 2-1105 is disposed between the power tree 2-1101 and the U matrix element 2-1109. In some embodiments, the homodyne detector 2-1105 is physically disposed in a row with the optical encoder 2-1103. In some embodiments, the optical encoder 2-1103 and the homodyne detector 2-1105 may be interleaved in a single row. In this manner, the optical encoder 2-1103 and the homodyne detector 2-1105 are in close proximity to each other, thereby reducing the distance of the electrical traces (not shown) used to connect the optical encoder 2-1103 and the homodyne detector 2-1105 to a controller (not shown) that may be physically disposed adjacent to the row of the optical encoder 2-1103 and the homodyne detector 2-1105.

[0247] Each optical encoder 2-1103 is associated with a respective homodyne detector 2-1105. Both the optical encoder 2-1103 and the homodyne detector 2-1105 receive an optical signal from the power tree 2-1101. The optical encoder 2-1103 encodes an input vector using the optical signal, as described above. The homodyne detector 2-1105 uses the received optical signal received from the power tree as a local oscillator, as described above.

[0248] Each pair of optical encoder 2-1103 and homodyne detector 2-1105 is associated with and connected to a selector switch 2-1107 by a waveguide. The selector switches 2-1107a-2-1107d may be implemented using, for example, conventional 2×2 optical switches. In some embodiments, the 2×2 optical switch is an MZI with an internal phase shifter to control the behavior of the MZI from the crossing to the bar. The switch 2-1107 is connected to a controller (not shown) for controlling whether the optical signal received from the optical encoder 2-1103 is directed towards the U matrix element 2-1109 or the V matrix element 2-1113. The optical switch is also controlled to direct the light received from the U matrix element 2-1109 and / or the V matrix element 2-1113 towards the homodyne detector 2-1105 for detection.

[0249] The technique for implementing matrix multiplication in the photonically folded photonic processing system 2-1100 is similar to that described above in connection with the continuous system depicted in FIG. 2-3. The difference between these two systems is the physical arrangement of the matrix elements and the implementation of the folded portion 2-1120, where the optical signal changes from propagating generally from left to right in FIG. 2-11 to propagating generally from right to left. In FIG. 2-11, the connections between the components may represent waveguides. In some embodiments, the solid line connections represent portions of the waveguide where the optical signal is propagating from left to right, and in some embodiments, the dashed line connections represent portions of the waveguide where the optical signal is propagating from right to left. Specifically, given this nomenclature, the embodiment shown in FIG. 2-11 is one in which the selector switch 2-1107 first directs the optical signal to the U matrix element 2-1109. In other embodiments, selector switch 2-1107 may first direct the optical signal to V matrix element 2-1113, where the dashed lines represent the portions of the waveguide in which the optical signal is propagating from left to right and the solid line connections represent the portions of the waveguide in which the optical signal is propagating from right to left.

[0250] The U matrix of the SVD of matrix A is implemented in the photonic processing system 2-1100 using U matrix elements 2-1109 interleaved with V matrix elements 2-1113. Thus, unlike the serially arranged embodiment shown in FIG. 2-3, the U matrix elements 2-1109 and the V matrix elements 2-1113 are not all physically arranged in their own self-contained arrays within a single physical area. Thus, in some embodiments, the photonic processing system 2-1100 includes multiple matrix element columns, at least one of which includes both the U matrix elements 2-1109 and the V matrix elements 2-1113. In some embodiments, the first column may only have the U matrix elements 2-1109, as shown in FIG. 2-11. The U matrix elements 2-1109 are implemented similarly to the first matrix module 2-301 of FIG. 3.

[0251] Due to the inter-positioned structure of the U matrix elements 2-1109 and the V matrix elements 2-1113, the folded photonic processing system 2-1100 includes waveguide crossovers 2-1110 at various locations between the columns of matrix elements. In some embodiments, the waveguide crossovers may be constructed using adiabatic evanescent elevators between two or more layers of an integrated photonics chip. In other embodiments, the U matrix and the V matrix may be located on different layers of the same chip, and a waveguide crossover is not used.

[0252] After the optical signal has propagated through all of the U matrix elements 2-1109, the optical signal propagates to diagonal matrix element 2-1111, which is implemented similarly to the second matrix module 2-303 of FIG. 2-3.

[0253] After the optical signal has propagated through all of the diagonal matrix elements 2-1111, the optical signal propagates to the V matrix elements 2-1113, which are implemented similarly to the third matrix module 2-305 of FIG. 2-3. The V matrix of the SVD of matrix A is implemented in the photonic processing system 2-1100 with the V matrix elements 2-1113 interleaved with the U matrix elements 2-1109. Thus, not all of the V matrix elements 2-1113 are physically located in a single self-contained array.

[0254] After the optical signal has propagated through all of the V matrix elements 2-1113, the optical signal returns to the selector switch 2-1107, which directs the optical signal to the homodyne detector 2-1105 for detection.

[0255] The inventors have further recognized that by including a selector switch after the optical encoder and before the matrix elements, the folded photonic processing system 2-1100 allows for efficient bidirectionality of the circuit. Thus, in some embodiments, a controller such as the controller 2-107 described in connection with FIG. 2-1 may select whether the optical signal is first multiplied with the U matrix or first multiplied with the V matrix. TFor an array of VBSs configured to implement a unitary matrix U when an optical signal propagates from left to right, propagating an optical signal from right to left may be multiplied with a unitary matrix U T Thus, the same setup for an array of VBSs will result in multiplication by U and U depending on which direction the optical signal is propagating through the array (this can be controlled using selector switch 2-1107). T In some applications, such as backpropagation used to train machine learning algorithms, it may be desirable to pass an optical signal through one or more matrices in reverse. In other applications, the bidirectionality may be used to compute the inverse matrix operation on an input vector. For example, for an invertible n×n matrix A, SVD can be calculated as A=V T ΣU. The inverse of this matrix is ​​A -1 =U T Σ -1 V, and Σ -1 is the inverse of a diagonal matrix, which can be efficiently computed by inverting each diagonal element. To multiply a vector by a matrix A, the switch goes in the first direction through the matrix U, then Σ, then V. T The optical signal is directed through the vector A. -1 To multiply by Σ -1 Singular values ​​are set to program the implementation of the matrix VBS. This involves changing the settings of only one column of the VBS, instead of all 2n+1 columns of the photonic processor (which is the case for a unidirectional photonic processing system, such as the photonic processing system shown in Figures 2-3). An optical signal representing the input vector is then transmitted through the matrix VBS in a second direction, opposite to the first direction. T , then Σ -1 and then propagated through U. Using the selector switch 2-1107, the folded photonic processing system 2-1100 first performs the U matrix (or its transpose) and V T This can easily be modified from performing the matrix (or its transpose) first. VI. Conclusion Having thus described several aspects and embodiments of the technology of the present application, it should be understood that various changes, modifications, and improvements will readily occur to those skilled in the art. Such changes, modifications, and improvements are intended to be within the spirit and scope of the technology described in this application. Accordingly, it should be understood that the foregoing embodiments are presented by way of example only, and that, within the scope of the appended claims and their equivalents, the embodiments of the invention may be practiced otherwise than as specifically described. In addition, any combination of two or more features, systems, articles, materials, and / or methods described herein is included within the scope of the present disclosure, provided that such features, systems, articles, materials, and / or methods are not mutually inconsistent.

[0256] Similarly, as described, some aspects may be embodied as one or more methods. The acts performed as part of a method may be ordered in any suitable manner. Thus, embodiments may be constructed in which acts are performed in an order different from that shown, which may include performing some acts simultaneously even if shown as sequential acts in an illustrated embodiment.

[0257] It should be understood that all definitions defined and used herein are subject to dictionary definitions, definitions in documents incorporated by reference, and / or ordinary meanings of the defined terms. As used in the specification and claims herein, the indefinite articles "a" and "an" should be understood to mean "at least one," unless expressly indicated otherwise.

[0258] As used in the specification and claims herein, the term "and / or" should be understood to mean "either or both" of the conjoint elements, i.e., elements that may be present conjunctively or disjunctively.

[0259] The term "circuitry" as used in this specification and claims shall be understood to mean any type of circuitry possible alone or in combination with other circuits including, for example, analog electrical circuits, digital electronic circuits, and optical circuits, which include, among others, solid-state optical components and combinations thereof, and free-space optical components and combinations thereof.

[0260] As used herein in the specification and claims, the phrase "at least one" when referring to a list of one or more elements should be understood to mean at least one element selected from any one or more of the elements in the list of elements, but does not necessarily include at least one of each and every element specifically listed in the list of elements, nor does it exclude any combinations of elements in the list of elements. This definition also allows for elements other than those specifically identified in the list of elements to which the phrase "at least one" refers, may optionally be present, whether related or unrelated to those specifically identified elements.

[0261] The terms "approximately" and "about" may be used to mean, in some embodiments, within ±20% of a target value, in some embodiments, within ±10% of a target value, in some embodiments, within ±5% of a target value, and even in some embodiments, within ±2% of a target value. The terms "approximately" and "about" may include the target value.

Claims

1. 1. A hybrid analog-digital processor, comprising: a circuit including an analog processor, the circuit configured to perform a mathematical operation using a plurality of paths, the circuit performing, for each of the plurality of paths: determining one or more scaling factors for the paths based on a set of parameters representing a portion of a matrix; scaling at least some parameters of the set of parameters based on the one or more scaling factors to produce a set of scaled parameters; programming the analog processor based on the set of scaled parameters; generating a plurality of input analog signals based on the input data set; generating a plurality of output analog signals based on the plurality of input analog signals and the set of scaled parameters; generating a partial output data set based on the plurality of output analog signals; scaling the partial output data set based on the one or more scaling factors to produce a scaled partial output data set; The circuitry is further configured to generate an accumulated output data set by accumulating the scaled partial output data sets generated by at least two of the plurality of paths, the accumulated output data set representing a result of a mathematical operation.

2. 2. The hybrid analog-digital processor of claim 1 , wherein generating a plurality of output analog signals based on the plurality of input analog signals and the set of scaled parameters comprises performing matrix-matrix multiplication based on the plurality of input analog signals and the set of scaled parameters.

3. 2. The hybrid analog-digital processor of claim 1 , wherein generating a plurality of output analog signals based on the plurality of input analog signals and the set of scaled parameters comprises performing a convolution based on the plurality of input analog signals and the set of scaled parameters.

4. 2. The hybrid analog-digital processor of claim 1, wherein programming the analog processor based on the set of scaled parameters comprises setting respective gains or attenuations for a plurality of analog amplifiers or attenuators of the analog processor based on the set of scaled parameters.

5. 2. The hybrid analog-digital processor of claim 1, wherein the analog processor comprises a photonic processor including a plurality of programmable photonic devices, and programming the analog processor based on the set of scaled parameters comprises setting respective characteristics for the plurality of programmable photonic devices based on the set of scaled parameters.

6. the programmable photonic device includes a plurality of Mach-Zehnder interferometers, and configuring respective characteristics for the plurality of programmable photonic devices based on the set of scaled parameters comprises: The hybrid analog-digital processor of claim 5 further comprising setting respective optical characteristics for the plurality of Mach-Zehnder interferometers based on the set of scaled parameters.

7. accumulating the scaled partial output data sets generated by at least two of the plurality of passes comprises:

2. The hybrid analog-digital processor of claim 1, further comprising: for at least some of the passes, summing the scaled partial output data set produced by the pass with the scaled partial output data set produced by a previous pass.

Citation Information

Patent Citations

  • Method for adjusting output level of neuron of multilayer neural network

    JP2019003546A

  • Concurrently performing attribute-dependent operations on signals

    US20180081388A1

  • Noise and bound management for RPU array

    US20180293208A1

  • Analog sub-matrix computing from input matrixes

    US20180373902A1

Cited By

  • Computer language and code for application development and electronic and optical communication

    US12724589B2