WO2021039164A1 - 情報処理装置、情報処理システム及び情報処理方法 - Google Patents

情報処理装置、情報処理システム及び情報処理方法 Download PDF

Info

Publication number
WO2021039164A1
WO2021039164A1 PCT/JP2020/027324 JP2020027324W WO2021039164A1 WO 2021039164 A1 WO2021039164 A1 WO 2021039164A1 JP 2020027324 W JP2020027324 W JP 2020027324W WO 2021039164 A1 WO2021039164 A1 WO 2021039164A1
Authority
WO
WIPO (PCT)
Prior art keywords
product
information processing
exponent
addition
multipliers
Prior art date
Application number
PCT/JP2020/027324
Other languages
English (en)
French (fr)
Inventor
高木 聡
紘司 清田
裕隆 堀江
Original Assignee
ソニー株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ソニー株式会社 filed Critical ソニー株式会社
Priority to US17/634,568 priority Critical patent/US20220334802A1/en
Priority to CN202080054616.0A priority patent/CN114207609A/zh
Priority to JP2021542610A priority patent/JPWO2021039164A1/ja
Priority to EP20859106.5A priority patent/EP4024198A4/en
Publication of WO2021039164A1 publication Critical patent/WO2021039164A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/544Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices for evaluating functions by calculation
    • G06F7/5443Sum of products
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/483Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • This disclosure relates to an information processing device, an information processing system, and an information processing method.
  • Non-Patent Document 1 describes a method of reducing the processing load by binarizing the weighting coefficient.
  • Non-Patent Document 2 describes a method of converting multiplication into addition by converting an input signal into a log domain.
  • Non-Patent Document 1 since binarization is performed using +1 or -1, it is assumed that the granularity of quantization becomes coarser as the number of dimensions of the weighting coefficient increases. Further, although the method described in Non-Patent Document 2 has a predetermined effect in avoiding multiplication, it is assumed that there is further room for reducing the processing load.
  • one form of the information processing apparatus is quantized by a plurality of input values quantized by a power expression and a power expression corresponding to each of the input values.
  • a product-sum calculation circuit that executes a product-sum operation based on a plurality of weight coefficients is provided, and the exponent of each of the input values is represented by a fraction having a predetermined divisor as the denominator, and the exponent of each of the weight coefficients is expressed. Is expressed by a fraction having the divisor as the denominator, and the product-sum calculation circuit uses the sum of the numerator of each of the input values and the numerator of the exponent as the divisor.
  • the product-sum operation is executed using a plurality of addition multipliers based on the remainder when the division is performed, and each of the addition multipliers is a floating-point number having an exponent base of 2.
  • FIG. 6 is an enlarged view of data of SNR 7 to 9 dB in FIG. 62. It is a figure which shows the BER evaluation result when QPSK which concerns on this disclosure is used for a modulation method.
  • FIG. 6 is an enlarged view of data of SNR 10 to 12 dB in FIG. 64. It is a figure which shows the BER evaluation result when 16QAM which concerns on this disclosure is used as a modulation method.
  • FIG. 6 is an enlarged view of data of SNR 16 to 18 dB in FIG. 66. It is a figure which shows the hardware configuration example which concerns on one Embodiment of this disclosure.
  • Third Embodiment 6.1 Issues of base technology 6.2 Specific example of product-sum calculation circuit 6.3 Development to quantization method 6.4 Specific example of quantization circuit 6.5 Action / effect 6.6 Deformation Example 6.6.1 First modification example 6.6.2 Second modification example 6.6.3 Third modification example 6.6.4 Fourth modification example 6.6.5 Fifth modification Example 6.6.6 Sixth modification example 7. Fourth Embodiment 7.1 Issues of Base Technology 7.2 Specific Examples of Numerical Format Information 7.2.1 s. e. m format 7.2.2 s. B. Q format 7.3 Real data management method: Relationship between container and numerical format information 7.4 Byte stream 7.4.1 Byte stream by packets of basic structure (Basic Structure) and continuation structure (Continue Structure) 7.4.
  • FIG. 1 is a conceptual diagram for explaining an outline of basic operations in a neural network.
  • FIG. 1 two layers constituting the neural network and cells c1 1 to c1 N and cells c2 1 belonging to the two layers are shown.
  • the input signal (hereinafter, also referred to as an input vector) input to the cell c2 1 is divided into an input vector and a weighting coefficient (hereinafter, also referred to as a weight vector) related to the cells c1 1 to c1 N belonging to the lower layer. Determined based on. More specifically, the input vector input to the cell c2 1 is a value obtained by adding a bias b to the inner product calculation result of the input vector and the weight vector related to the cells c1 1 to c1 N, and further processing by the activation function h. It becomes.
  • the input vector z input to the cell c2 1 is defined by the following mathematical formula (1).
  • FIG. 2 is a schematic diagram for explaining the inner product operation of the input vector x and the weight vector w.
  • FIG. 3 is a diagram for explaining a weight vector w binarized in a two-dimensional space.
  • the particle size of the weight vector w can be expressed by the rotation angle ⁇ in the plane, and the particle size is 90 degrees as shown in FIG.
  • FIG. 4 is a diagram for explaining a weight vector w quantized by four values in a two-dimensional space.
  • the grain size of the weight vector w that is, the rotation angle ⁇ is about 15 degrees, and it is possible to guarantee a finer grain size as compared with the case of binary quantization.
  • FIG. 5 is a diagram for explaining the variation in the particle size of the weight vector w in the three-dimensional space.
  • the direction (1,1,0) Since the length of the side of is ⁇ 2 times the length of the side in the (0,0,1) direction, it can be seen that the variation in grain size at the time of quantization becomes large.
  • FIG. 6 is a diagram for explaining the variation in the particle size of the weight vector w in the N-dimensional space.
  • FIG. 6 shows the planes defined by (1,1, ..., 1,0) and (0,0, ..., 0,1) in the N-dimensional space.
  • the length of the side in the (1,1, ..., 1,0) direction is ⁇ (N-1) of the length of the side in the (0,0, ..., 0,1) direction. It can be represented by a double.
  • N 100, 1,1,. .. ..
  • the length of the side in the (1,0) direction is ⁇ 99 times ( ⁇ 10 times) the length of the side in the (0,0, ..., 0,1) direction.
  • the information processing apparatus and information processing method according to the base technology of the present disclosure are characterized in that the inner product calculation is performed using a weight vector quantized based on the particle size in the vector direction in the N-dimensional hypersphere. Let it be one.
  • the information processing apparatus and information processing method according to the base technology of the present disclosure can achieve both high approximation accuracy and reduction of processing load by quantizing the weight vector with a particle size that is neither too fine nor too coarse. Is. More specifically, the information processing apparatus and the information processing method according to the base technique of the present disclosure may perform an inner product operation using a weight vector expressed by exponentiation.
  • the above-mentioned features of the information processing apparatus and the information processing method according to the base technology of the present disclosure will be described in detail.
  • FIG. 7 is an example of a functional block diagram of the information processing apparatus 10 according to the base technology.
  • the information processing apparatus 10 according to the base technology includes an input unit 110, a calculation unit 120, a storage unit 130, and an output unit 140.
  • the above configuration will be described focusing on the functions of the configuration.
  • the input unit 110 has a function of detecting various input operations by the operator.
  • the input unit 110 may include various devices for detecting an input operation by the operator.
  • the input unit 110 can be realized by, for example, various buttons, a keyboard, a touch panel, a mouse, a switch, and the like.
  • the calculation unit 120 has a function of performing an internal product calculation based on a plurality of input values and a plurality of weighting coefficients corresponding to the input values and calculating an output value.
  • the calculation unit 120 particularly performs an inner product calculation related to forward propagation of the neural network.
  • one of the features of the calculation unit 120 is that the output value is calculated based on the weighting coefficient quantized based on the particle size in the vector direction on the surface of the N-dimensional hypersphere. More specifically, the calculation unit 120 may calculate the output value based on the weighting coefficient expressed by exponentiation.
  • the features of the inner product calculation will be described in detail separately.
  • the storage unit 130 has a function of storing programs, data, and the like used in each configuration included in the information processing device 10.
  • the storage unit 130 stores, for example, various parameters used in the neural network.
  • the output unit 140 has a function of outputting various information to the operator.
  • the output unit 140 may be configured to include a display device that outputs visual information.
  • the above-mentioned display device can be realized by, for example, a CRT (Cathode Ray Tube) display device, a liquid crystal display (LCD: Liquid Crystal Display) device, an OLED (Organic Light Emitting Device) device, or the like.
  • the functional configuration example of the information processing device 10 related to the base technology has been described above.
  • the functional configuration example described above is merely an example, and the functional configuration example is not limited to such an example.
  • the information processing device 10 may further include a configuration other than that shown in FIG.
  • the information processing device 10 may further include, for example, a communication unit that performs information communication with another information processing terminal. That is, the functional configuration of the information processing apparatus 10 according to the base technology can be flexibly redesigned.
  • the information processing apparatus 10 can maintain high granularity uniformity by performing quantization by the weight vector w expressed by exponentiation.
  • the arithmetic unit 120 the feature to normalize the plurality of weight vector component w i rearranged in ascending order of value, also the plurality of weight vector component w i the most large value of the weight coefficient w i Make one.
  • the weight vectors w j are represented by the following mathematical formulas (2) to (4).
  • ⁇ in the above mathematical formula (2) is 0 ⁇ ⁇ 1, s j is s j ⁇ ⁇ -1,1 ⁇ , and n j is n j ⁇ ⁇ 0, 1,2 ,. .. .. ⁇ , May be. That is, the arithmetic unit 120 performs quantization with n j as an integer.
  • the inner product calculation executed by the calculation unit 120 is expressed by the following mathematical formula (5).
  • K in the following formula (5) indicates a normalization constant.
  • the value of ⁇ may be finally set within the above range in the inner product calculation even when the following mathematical formula (5) is appropriately modified.
  • the mathematical formulas shown in the present disclosure are merely examples and can be flexibly transformed.
  • the inner product operation by the calculation unit 120 can be processed by N times of addition operations and the number of multiplications in the order of -1 / 2log (N-1) / log ⁇ .
  • the weight vector w is approximated by a power expression of ⁇ and the weight vector w is rearranged in ascending order of values.
  • the weight vector w is quantized by converting the exponent of ⁇ into a t-value according to N.
  • N 100
  • n j-1- n j can take a value other than 0 only four times. Therefore, in the case of this example, the number of multiplications related to the inner product calculation is only four, and all the rest are additions, so that the processing load can be effectively reduced.
  • the information processing apparatus 10 may include a product-sum calculation circuit having a table that holds address information of a plurality of weight vectors w and corresponding input vectors x sorted in ascending order of values.
  • FIG. 8 is an example of a circuit block diagram of the product-sum calculation circuit 200 included in the information processing device 10 according to the base technology.
  • the product-sum calculation circuit according to the base technology includes a storage circuit that holds a table WT that holds the address information of the weight vector w and the corresponding input vector x, a RAM 210, an addition circuit 220, and an accumulator 230. It includes a first multiplication circuit 240 that performs multiplication related to ⁇ , and a second multiplication circuit 250 that performs multiplication related to normalization constants.
  • the address table WT holds address information, code information, and multiplication instruction information of a plurality of weight vectors w sorted in ascending order of values and corresponding input vectors x.
  • the above address information may include a Null Pointer as shown in FIG. In this case, 0 is added to the accumulator 230, and the value of the accumulator 230 can be simply multiplied by ⁇ .
  • the above-mentioned code information is information indicating a value corresponding to S j in the above-mentioned mathematical expression (5).
  • the above multiplication instruction information is information instructing the processing content by the first multiplication circuit 240.
  • the multiplication instruction information according to the base technique may include, for example, information that specifies the necessity of multiplication.
  • the first multiplication circuit 240 when the multiplication instruction information is 0, the first multiplication circuit 240 does not perform multiplication, and when the multiplication instruction information is 1, the first multiplication circuit 240 multiplies ⁇ . An example of the case is shown.
  • the multiplication instruction information related to the base technology is not limited to the above example, and may include information that specifies various processing contents.
  • the multiplication instruction information according to the base technique may include, for example, information that specifies the number of multiplications and the shift operation.
  • RAM210 RAM210 outputs the input vector components x j corresponding to the weight vector component w j in accordance with the address information input from the address table WT to the adder circuit 220.
  • the addition circuit 220 executes addition based on the input vector component x j input from the RAM 210 and the value output from the first multiplication circuit 240. At this time, the addition circuit 220 performs the above addition based on the code information held in the address table WT.
  • the accumulator 230 accumulates the calculation results output from the adder circuit 220.
  • the accumulator 230 outputs the accumulated values to the first multiplication circuit 240 and the second multiplication circuit 250. Further, a reset signal for resetting the accumulated value to 0 is appropriately input to the accumulator 230.
  • the first multiplication circuit 240 multiplies the accumulated value of the accumulator 230 by ⁇ . At this time, as described above, the first multiplication circuit 240 executes the above multiplication based on the multiplication instruction information held by the address table WT. The first multiplication circuit 240 outputs the calculation result to the addition circuit 220.
  • the second multiplication circuit 250 multiplies the value output from the accumulator 230 by the normalization constant K.
  • the configuration example of the product-sum calculation circuit 200 related to the base technology has been described above. According to the product-sum calculation circuit 200 according to the base technique, it is possible to effectively reduce the number of multiplications in the inner product calculation and reduce the processing load.
  • the address table WT may include offsets indicating relative positions between addresses, as shown in FIG. FIG. 9 is an example of the offset notation related to the address information held by the address table WT related to the base technology.
  • the address table WT sorts the addresses of the intervals in which the values of n j-1 to n j are continuously 0 in the above-mentioned mathematical formula (5), that is, the addresses of the intervals in which multiplication is not performed, in order of address.
  • the offset between the addresses may be retained as address information. According to the above-mentioned address table WT related to the base technology, it is possible to significantly reduce the amount of information related to the address information and effectively reduce the power consumption.
  • the address table WT can take various forms other than the forms shown in FIGS. 8 and 9.
  • the address table WT does not have to clearly separate and hold the code information and the multiplication instruction information, or may adopt an address compression method other than the above.
  • the address table WT can be flexibly deformed according to the configuration of the neural network, the performance of the information processing apparatus 10, and the like.
  • FIG. 10 is a diagram showing a processing image of an information processing method according to the base technology.
  • the weight vectors are set to q 1 , q 2 , ... .. ..
  • the quantization particle size ⁇ of the weight vector in the plane stretched by the axis projected in the q j-1 space and q j is the following mathematical formula (8) in the counterclockwise rotation and the clockwise rotation directions, respectively. And can be represented by (9). However, at this time, l in the mathematical formulas (8) and (9) is defined by the mathematical formula (10).
  • FIG. 11 is a diagram for explaining the quantization particle size ⁇ according to the base technique. Note that FIG. 11 shows a weight vector projected in the first quadrant.
  • FIG. 12 is a graph showing the maximum value of the quantization particle size ⁇ according to ⁇ according to the base technology. As described above, according to the information processing method according to the base technology, the quantization particle size is guaranteed in all the orthogonal rotation directions in the N-dimensional space.
  • FIG. 13 is a diagram for explaining a maximum power of the base technology. Note that FIG. 13 shows a weight vector projected in the first quadrant. At this time, the maximum power that guarantees the quantization particle size ⁇ may be obtained by adding the following formula (13) to the minimum m that satisfies the following formula (12). Therefore, the number of multiplications executed by the information processing apparatus 10 can be obtained by the following mathematical formula (14).
  • the number of multiplications for the number of inputs N is determined as shown in the graph shown in FIG.
  • the number of multiplications with respect to the number of inputs N is determined as shown in the graph shown in FIG. That is, in the inner product calculation by the calculation unit 120, it can be said that the number of multiplications is determined based on the base value of the weight vector.
  • 14 and 15 are diagrams showing an example of the number of multiplications with respect to the number of inputs N according to the base technology.
  • the number of multiplications can be significantly reduced in the internal product calculation related to the forward propagation of the neural network, and the product-sum calculation circuit 200 is used. It is possible to effectively reduce power consumption.
  • the quantization accuracy of the weight vector can be improved, and the recognition by the neural network is compared with the conventional quantization method using the same number of bits. The effect of improving accuracy and approximation accuracy is expected.
  • the weight vector component w i and the input vector components x i may be expressed as alpha -n / p.
  • 2
  • the values that ⁇ ⁇ n / p can take can be expressed as shown in Table 1 below.
  • Table 1 above shows that the larger the value of p, the smaller the quantization particle size. Therefore, in the development embodiment, by quantizing the weighting vector component w i and the input vector components x i ⁇ -n / p, it is possible to reduce the quantization error compared to the base technology. In addition, according to the calculation method in the developed example, it is possible to perform the same processing as the inner product calculation described in the base technology only by the shift calculation and the addition, and it is possible to effectively reduce the processing load in the inner product calculation. Become.
  • the formula ( 15) can be expressed as the following mathematical formula (17).
  • yr is defined by the following mathematical formula (18).
  • y r can be represented by the usual fixed-point notation in which a negative number is represented by two's complement.
  • x i a negative number in two's complement That is, it can be calculated by shifting to the right as a signed binary number by an integerized int ( ni / p). That is, the inner product operation related to the input vector x and the weight vector w can be expressed as the following mathematical formula (19).
  • the inner product calculation shown in the above mathematical formula (19) can be realized by, for example, the product-sum calculation circuit 300 shown in FIG. FIG. 16 is an example of a product-sum calculation circuit in the case where the weight vector according to the developed example is quantized.
  • the product-sum calculation circuit 300 includes a shift calculator 310, a modulo calculator 320, selectors 330 and 340, an accumulator group 350, an adder / subtractor 360, a multiplier group 370, and an adder 380.
  • Shift calculator 310 performs a shift operation based on the input vector components x i, and n i is inputted. Specifically, the shift calculator 310 bit-shifts the input vector component x i to the right by the value of int ( ni / p).
  • (Modulo 320) Remainder calculator 320 based on the n i input, performs a calculation of n i mod p, and inputs a value of the remainder to the selector 330 and 340.
  • the selectors 330 and 340 select an accumulator connecting the circuits from a plurality of accumulators included in the accumulator group 350 based on the calculation result by the modulo calculator 320. At this time, the selectors 330 and 340 operate so that the accumulator and the circuit corresponding to the remainder value are connected. For example, when the remainder is 0, the selectors 330 and 340 operate so that the accumulator y 0 and the circuit are connected, and when the remainder is 1, the selectors 330 and 340 operate so that the accumulator y 1 and the circuit are connected.
  • the accumulator group 350 includes a plurality of accumulators, each of which corresponds to the value of the remainder of the n i mod p. That is, the accumulator group 350 holds yr for each value of the remainder.
  • Subtracter 360 s i to be inputted, performs addition and subtraction based on the value of the shift operation result, and y r.
  • the adder-subtractor 360 as described above, the value of y r the accumulator which is selected is held based on the value of the remainder of the n i mod p is input. Further, based on the calculation result of the adder-subtractor 360, y r of the selected accumulator is updated.
  • multiplier group 370 Multiplier group 370, to y r, which is updated every residue by the above-described processing, multiplying the sum multiplier corresponding to the remainder. Therefore, multiplier group 370 includes a plurality of multipliers corresponding to each modulo n i mod p. For example, the multiplier group 370 multiplies y 0 input from the accumulator group 350 by 1, and multiplies y 1 by 2-1 / p .
  • the product-sum calculation circuit 300 has been described above. As described above, according to the product-sum operation circuit 300, by performing multiplying together at the end to accumulate the y r each accumulator corresponding to each modulo n i mod p, to suppress the number of multiplications to a minimum Is possible. In the example shown in FIG. 16, i is sequentially calculated and yr is updated, but it is also possible to calculate a part or all of the above calculations in parallel.
  • the inner product operation can be expressed by the following mathematical formula (22).
  • y r is defined by the following mathematical formula (23).
  • r ⁇ ⁇ 0,1,. .. .. , P-1 ⁇
  • y r is enabled usually expressed in fixed-point title representing the negative in two's complement.
  • p may be a natural number, but p may be expressed as a power expression.
  • p 2 q , q ⁇ ⁇ 0,1,2,. .. .. ⁇ , Int (( mi + ni ) / p) and ( mi + ni )
  • the calculation of mod p is possible by cutting out the bits, and division is not required, which has the effect of simplifying the calculation.
  • the inner product calculation can be realized by, for example, the product-sum calculation circuit 400 shown in FIG. FIG. 17 is an example of a product-sum operation circuit in the case where both the weight vector and the input vector according to the development example are quantized.
  • the multiply-accumulate circuit 400 includes a first adder 410, a shift calculator 420, a selector 430, an XOR circuit 440, an accumulator group 450, a multiplier group 460, and a second adder 470. ..
  • First adder 410 adds the m i and n i input thereto. At this time, the addition result of m i and n i, as shown, [b k-1,. .. .. , b q , b q-1 ,. .. .. It can be represented as a bit array of b 0].
  • the shift calculator 420 right-shifts 1 represented by a fixed point by int (( mi + ni ) / p) based on the calculation result of the first adder 410.
  • the value of int (( mi + ni ) / p) is [b k-1 , ... Of the above bit array which is the calculation result by the first adder 410. .. .. , B q ] corresponds to the value of the high-order bit. Therefore, the shift arithmetic unit 420 may perform the shift calculation using the value of the high-order bit.
  • the accumulator group 450 includes a plurality of accumulators corresponding to the remainder values of (mi + ni) mod p. Further, the accumulator group 450 is configured to include a plurality of addition / subtractors (1-bit up / down counters) corresponding to the accumulator.
  • each of the above-mentioned addition / subtractors determines the necessity of addition / subtraction based on the Enable signal input from the selector 430.
  • each adder / subtractor has only one bit for the value O held by the corresponding accumulator according to the U / D value input from the XOR circuit 440 only when the input Enable signal is 1.
  • Add or subtract According to the accumulator group 450 according to the refinement of, because it can update the value of y r a 1-bit adder for the upper bit, normal subtracter it is possible to reduce the circuit scale becomes unnecessary.
  • Multiplier group 460 Multiplier group 460, to y r, which is updated every residue by the above-described processing, multiplying the value corresponding to the remainder.
  • the multiplier group 460 includes a plurality of multipliers corresponding to each remainder of the (mi + ni) mod p. For example, the multiplier group 460 multiplies y 0 input from the accumulator group 450 by 1, and multiplies y 1 by 2-1 / p .
  • Second adder 470 Second adder 470, multipliers 460 adds the value of y r calculated for each residue, and outputs a final operation result y.
  • the product-sum calculation circuit 400 has been described above. As described above, according to the product-sum operation circuit 400 in accordance with the development embodiment, by performing multiplying together at the end respectively accumulating y r in the accumulator corresponding to each residue of (m i + n i) mod p, It is possible to minimize the number of multiplications. In the example shown in FIG. 17, i is sequentially calculated and yr is updated, but it is also possible to calculate a part or all of the above calculations in parallel.
  • the arithmetic circuit 400 may include a selector and a single adder / subtractor as in the product-sum arithmetic circuit 300 shown in FIG. Similarly, it is also possible to mount a plurality of addition / subtractors in parallel on the product-sum calculation circuit 300.
  • the configuration of the product-sum calculation circuit according to the developed example can be appropriately designed so that the circuit scale becomes smaller according to the value of p.
  • the inner product calculation can be realized by a single addition / subtractor as in the product-sum calculation circuit 500 shown in FIG.
  • FIG. 18 is an example of a product-sum operation circuit in the case where both the weight vector and the input vector according to the development example are quantized.
  • the product-sum calculation circuit 500 includes an adder 510, a selector 520, a storage circuit group 530, a shift calculation device 540, an XOR circuit 550, an adder / subtractor 560, and an accumulator 570.
  • the adder 510 adds the m i and n i input thereto.
  • the adder 510 may perform the same operation as the first adder 410 shown in FIG.
  • the selector 520 corresponds to the lower q bits [b q-1 , ... .. .. , B 0 ], a storage circuit to connect the circuits is selected from a plurality of storage circuits included in the storage circuit group 530.
  • the storage circuit group 530 includes a plurality of storage circuits corresponding to the remainder values of (mi + ni) mod p. Each storage circuit stores an addition multiplier corresponding to each remainder. Each storage circuit included in the storage circuit group 530 may be a read-only circuit that holds the addition multiplier as a constant, or may be a rewritable register. When the addition multiplier is stored as a constant in the read-only circuit, there is an advantage that the circuit configuration can be simplified and the power consumption can be reduced.
  • the shift calculator 540 sets the addition multiplier stored in the connected storage circuit as [b k-1,. .. .. , b q ], the right shift operation is performed only for the value of the high-order bit corresponding to.
  • the XOR circuit 550 outputs 1 or 0 based on the input S xi and S wi.
  • the XOR circuit 550 may perform the same operation as the XOR circuit 440 shown in FIG.
  • the addition / subtractor 560 repeatedly executes addition or subtraction based on the calculation result by the shift calculator 540 and the input from the XOR circuit 550 with respect to y held in the accumulator 570.
  • the accumulator 570 holds the result y of the inner product operation.
  • the internal product calculation can be realized by a single addition / subtractor 560 and a single accumulator 570, and the circuit scale can be further reduced. It will be possible.
  • the quantization method of the input vector x will be described in detail.
  • the quantization of the weight vector w can be calculated in advance, but the quantization of the input vector x needs to be performed at runtime. Therefore, a method for realizing the quantization of the input vector x with a small-scale arithmetic circuit is required.
  • L the number of consecutive 0 bits from msb (most significant bit) of c.
  • c [c k-1 , ... .. .. , C 0 ] is treated as a fixed-point number with the L-bit left-shifted bit array as d and msb as 0.5.
  • r min be the minimum r that satisfies the following mathematical formula (29).
  • x i is approximated as equation (31) below, that is, it can be quantized.
  • the calculation described above can be realized by providing a configuration in which L is counted by counting the number of bits of 0 continuously from msb of c and a configuration in which a fixed value of p times is compared.
  • FIG. 19 is a diagram showing the network structure of ResNet used in the comparative experiment according to the developed example.
  • the input size input to each layer is shown on the right side of the figure, and the kernel size is shown on the left side of the figure.
  • the created network includes both ResBlock that does not include the Max Pooling layer and ResBlock that includes the Max Pooling layer.
  • 20 and 21 are diagrams showing network configurations of ResBlock not including the Max Pooling layer and ResBlock including the Max Polling layer, respectively.
  • FIG. 22 shows a comparison result of the image recognition rate when inference is performed without re-learning by the quantization described above.
  • the vertical axis shows the recognition accuracy
  • the horizontal axis shows the quantization number (N value) of the input vector x.
  • line segments P2 are indicated by line segments P2, respectively.
  • the information processing device related to the base technology and its development examples is based on a plurality of input values and a plurality of weighting coefficients quantized by a power expression corresponding to the input values.
  • a product-sum calculation circuit for executing a product-sum operation is provided.
  • the exponent of the quantized weighting factor is represented by a fraction with a predetermined divisor p in the denominator.
  • the product-sum calculation circuit performs the product-sum calculation using different addition multipliers based on the remainder determined from the divisor p. According to such a configuration, it is possible to further reduce the processing load related to the inner product calculation and guarantee the quantization granularity of the weighting coefficient.
  • FIG. 23 An example of a product-sum calculation circuit (corresponding to FIG. 18) in the case where both the weight vector and the input vector related to the base technology are quantized is shown in FIG. 23 again.
  • the base technique exemplifies a method of realizing a product-sum operation by table lookup. Specifically, a table (storage circuit group 530) in which the number of entries and the value are determined by p indicating the particle size of quantization is provided, and the product-sum operation oriented to the inference processing of DNN / CNN is performed using this table. ..
  • the storage circuit group 530 is a register that can be rewritten by exemplifying a table other than the value table consisting of the power of the p-th root of 2 and exemplifying a configuration in which a plurality of tables are switched. Show the benefits of this more clearly.
  • the base technology proposes a new quantization method for the purpose of reducing the product-sum operation amount of the deep neural network (DNN) and the convolutional neural network (CNN).
  • quantization in information theory refers to the approximate representation of an analog quantity with discrete values, but the quantization here is defined as the representation of the accuracy with which the original value was expressed with a smaller amount of bits.
  • the value originally represented by a 32-bit floating point number can be truncated to a 10-bit or 8-bit floating-point number or a fixed-point number, or more extreme, the value can be truncated to a 2-bit or 1-bit number. It is called Quantization.
  • the word length of the numerical value expressing the coefficient or variable is shortened by quantizing the coefficient or variable at the time of DNN / CNN inference. As a result, it is possible to reduce the memory capacity required for storing the parameters, reduce the calculation amount and calculation energy at the time of product-sum calculation, and the like.
  • the variable is x and the constant is w, and the quantization as shown in the following equation (32) (corresponding to the above-mentioned equations (20) and (21)) is executed.
  • x i is the i th element of the input vector x
  • w i is the i-th element of the coefficient vector w
  • s represents the sign of the element
  • m is quantizes the i-th element of the input vector x
  • the index (symbol) at the time n is the index (symbol) when the i-th element of the coefficient vector w is quantized
  • p is the granularity of the quantization.
  • DNN / CNN inference processing was directed using a table (memory circuit group 530) in which the number of entries and the value are determined by using p as a parameter indicating the particle size of quantization.
  • the product-sum operation is performed. Specifically, p values along the function space of 2 to the power of 2 (to be exact, the power of the root of 2 to the power of p) are held as table values, and the positive and negative signs and dynamic range of variables and coefficients are used. By accumulating addition while performing scaling according to it, the product-sum calculation by the power method of 2 is realized.
  • the following equation (33) is exemplified as a table value.
  • each symbol like when the power of two expressions shown in Equation (32), x i is the i th element of the input vector x, the i th element of w i is the coefficient vector w , S represent the positive and negative signs of the element, m is the index (symbol) when the i-th element of the input vector x is quantized, and n is the index (symbol) when the i-th element of the coefficient vector w is quantized. , P indicate the granularity of quantization.
  • the table in the power expression of 2 of the base technology, the domain and the range are combined, and p values along the linear function space are used as the table values.
  • the circuit configuration in this case may be the same as the product-sum calculation circuit illustrated in FIG. 23.
  • the table value in the storage circuit group 530 is a value represented by the following equation (35).
  • Equation (35) can be simplified and expressed as the following equation (36).
  • FIG. 26 is a diagram in which the table values in the power representation of 2 and the table values in the linear representation are plotted on the same graph. As shown in FIG. 26, the table value of the power expression of 2 has a downwardly convex shape with respect to the linear expression.
  • each storage circuit included in the storage circuit group 530 may be a read-only circuit that holds the addition multiplier as a constant, or may be a rewritable register.
  • FIG. 27 is a circuit diagram showing a schematic configuration example of a product-sum calculation circuit according to the first specific example.
  • the product-sum calculation circuit according to the first specific example is an integer adder (also simply referred to as an adder) 510, a selector 520, and a storage circuit, similarly to the product-sum calculation circuit illustrated in FIG. It includes a group 530, a shift calculator 540, an XOR circuit 550, an adder / subtractor 560, and an accumulator 570.
  • Integer adder 510 adds the m i and n i input thereto. At this time, the addition result of m i and n i, as shown, [b k-1,. .. .. , B q , b q-1 ,. .. .. , B 0 ] can be represented as a bit array.
  • the selector 520 corresponds to the lower q bits [b q-1 ,. .. .. , B 0 ], a storage circuit to connect the circuits is selected from a plurality of storage circuits included in the storage circuit group 530.
  • the storage circuit group 530 includes a plurality of storage circuits corresponding to the remainder values of (mi + ni) mod p.
  • the addition multiplier corresponding to each remainder is stored as a normalized number of floating-point representation having an exponent part based on 2.
  • the addition / subtraction multiplier stored in the storage circuit group 530 is larger than 0.5 and is in the range of 1.0 or less, it can be expressed by a normalized number by having a word length of 1 bit or more as an exponent part. Is.
  • Each storage circuit included in the storage circuit group 530 may be a read-only circuit that holds the addition multiplier as a constant, or may be a rewritable register. When the addition multiplier is stored as a constant in the read-only circuit, there is an advantage that the circuit configuration can be simplified and the power consumption can be reduced.
  • the shift calculator 540 sets the addition multiplier stored in the connected storage circuit as [b k-1 , ... .. .. , B q ], the right shift operation is performed only for the value of the high-order bit corresponding to].
  • the XOR circuit 550 outputs 1 or 0 based on the input S xi and S wi.
  • the addition / subtractor 560 repeatedly executes addition or subtraction of the input from the shift arithmetic unit 540 with respect to y held in the accumulator 570 based on the input from the XOR circuit 550. If the input from the XOR circuit 550 is 0, addition is performed, and if it is 1, subtraction is performed.
  • the accumulator 570 holds the result y of the product-sum operation.
  • the product-sum calculation circuit includes a memory 1530 that holds a plurality of different tables and each storage circuit of the memory circuit group 530 that selectively stores the table values in the memory 1530.
  • a selector 1531 for writing to a register or memory) is further provided.
  • the memory 1530 holds, for example, the table 1530a of the power representation of 2 described above and the table 1530b of the linear representation.
  • the selector 1531 reads the table 1530a or 1530b from the memory 1530 according to the writing table control value input from the upper control unit or the like, and writes the read tables 1530a / 1530b to each storage circuit of the storage circuit group 530.
  • FIG. 28 is a circuit diagram showing a schematic configuration example of a product-sum calculation circuit according to the second specific example.
  • the product-sum calculation circuit according to the second specific example has a configuration similar to that of the product-sum calculation circuit illustrated in FIG. 23, and the storage circuit group 530 holds a plurality of different tables. It is replaced by the storage circuit groups 530A and 530B (two in this example), and further includes a selector 1532 that selectively switches the connection between the storage circuit group 530A or 530B and the selector 520.
  • the storage circuit group 530A includes, for example, a plurality of storage circuits for storing the values in the table of the power expression of 2 described above, as in FIG. 23.
  • the storage circuit group 530B includes, for example, a plurality of storage circuits for storing the values in the above-mentioned linear representation table.
  • the selector 1532 switches the connection between the storage circuit group 530A / 530B and the selector 520 according to the table switching signal input from the upper control unit or the like.
  • the configuration of the arithmetic circuit portion in the multiply-accumulate arithmetic circuit 2100 can be configured. It is possible to select, for example, a linear floating point number that is not a power representation of 2 without modification.
  • the input vector and the product-sum operation result in each layer are quantized into a power representation of 2 at runtime and sent to the subsequent processing or memory. It had to be stored in. Since the values of the DNN and CNN coefficients do not change in the middle, it is possible to convert them to a power expression of 2 in advance and use them, but the numerical values that appear in the inference calculation are 2 powers. It will be necessary to convert it to a power representation. This process is commonly referred to as run-time quantization. In this embodiment, a more developed form of the rounding of the quantizer will be described.
  • FIG. 29 is a diagram showing an example of rounding of the quantizer. As shown in FIG. 29, when a value included in the range RA in the quantizer is input, the value is rounded to A and the symbol m-1 is assigned. On the other hand, when a value included in the range RB is input, the value is rounded to B and the symbol m is assigned.
  • FIG. 30 is a block diagram showing a schematic configuration example of a neural network circuit as a comparative example.
  • the neural network circuit as a comparative example includes a power expression conversion unit 2001, a multiplication unit 2002, a variable buffer 2003, a coefficient memory 2004, an operation result buffer 2005, and a product-sum operation circuit 2100.
  • the product-sum calculation circuit 2100 includes a product-sum calculation unit 2101, a power expression conversion unit 2102, a power expression table 2103, and a multiplication unit 2104.
  • the multiplication unit 2002 executes 0.5 rounding according to the expression function of the power expression of 2 by executing the multiplication shown in the following equation (38) on the table value read from the power expression table 2103. Then, the obtained value is input to the exponentiation conversion unit 2001.
  • exponentiation conversion unit 2001 converts the input value into a power expression of 2 using the value input from the multiplication unit 2002.
  • the value obtained by the conversion is stored in the variable buffer 2003. Therefore, the variable buffer 2003 stores the variable represented by the power of 2.
  • the product-sum calculation unit 2101 executes the product-sum calculation from the variable of the power expression stored in the variable buffer 2003 and the coefficient of the power expression stored in the coefficient memory 2004. At that time, the product-sum calculation unit 2101 executes the product-sum calculation using the table values stored in the exponentiation table 2103.
  • the table stored in the exponentiation table 2103 is the value table shown in the above equation (33).
  • the multiplication unit 2104 executes 0.5 rounding according to the expression function of the power expression of 2 by executing the multiplication shown in the above equation (38) on the table value read from the power expression table 2103. Then, the obtained value is input to the exponentiation conversion unit 2001.
  • Exponentiation conversion unit 2102 The exponentiation conversion unit 2102 converts the value input from the product-sum calculation unit 2101 into a power expression of 2 using the value input from the multiplication unit 2104. The value obtained by the conversion is stored in the operation result buffer 2005. Therefore, the calculation result buffer 2005 stores a variable represented by a power of 2.
  • run-time quantization is performed by quantization of external input data for DNN / CNN, and quantization including rounding after product sum. These are the same processes. Therefore, as shown in FIG. 32, the table holding amount of the entire system can be reduced by sharing the exponentiation conversion table 2204 in the exponentiation conversion units 2001 and 2102 and using it in a time division manner.
  • the exponentiation conversion table 2202 and 2204 is obtained by multiplying the exponentiation table of 2 which is the parameter p for determining the particle size of quantization by the 2p root of 2. That is, when the conversion formula (38) for deriving the power expression conversion table 2202 and 2204 from the power expression table 2103 is transformed into the following formula (39).
  • FIG. 33 is a diagram showing a case where the even partial subset and the odd partial subset are combined into one table.
  • the exponentiation expression table 2203 including the even partial subset and the odd partial subset is shared by the multiply-accumulate calculation unit 2101 and the exponentiation conversion units 2001 and 2102.
  • the table values input to the product-sum calculation unit 2101 and the exponentiation conversion units 2001 and 2102 can be distributed according to, for example, the evenness and oddity of the symbol index address.
  • the circuit configuration can be greatly simplified along with the logical compression.
  • the advantage of being able to reduce power consumption can be obtained.
  • y x * 2 ⁇ n.
  • * is an operator of multiplication
  • is an operator of exponentiation.
  • the required word length of the fixed-point representation is as follows as an example.
  • the input vector components x i and the weight vector components w i is assumed to be represented by the formula (32) respectively described above. Further, in the equation (32), a s xi, s wi ⁇ ⁇ -1,1 ⁇ , n i, m i ⁇ ⁇ 0,1,2 ,. .. .. ⁇ .
  • the molecules according to the index of quantized input value m i, a predetermined divisor denominator and p defined molecules according to the index of the quantized weighting factors n i, pre denominator divisor Let p.
  • the product-sum calculation circuit realizes an inner product calculation on a smaller circuit scale by means of a single adder / subtractor 560 and a single accumulator 570.
  • p 16
  • m i and n i respectively 8-bit word length of the maximum shift amount of the shift calculator 540 is 32 bits.
  • the word length of the addition / subtraction multiplier stored in the storage circuit group 530 is 20 bits, so that the output word length of the shift calculator 540 is 52 bits. Since the word length of the accumulator 570 depends on how many times the addition is performed, for example, if the maximum number of additions is 255, the word length is 60 bits, which is the output word length of the shift calculator 540 plus 8 bits.
  • the IEEE754 standard is known. According to this standard, a finite number based on 2 or 10 is represented by three integers: sign, mantissa, and exponent. As a feature of this standard, in the binary floating-point format with 2 as the radix, the most significant bit of the normalized mantissa is always 1, so this is omitted. Further, the exponent is a bias expression obtained by adding a predetermined fixed value to the exponent in the case of 0 or a denormalized number and 0 in the case of a normalized number. These expression methods can be easily extended to the exponent part and the mantissa part of any word length.
  • the most significant bit of the normalized number of the mantissa is omitted, and the exponent part is 0 or 0 for a denormalized number, and a floating point number that uses a bias expression for a normalized number.
  • the notation shall be referred to as IEEE754 compliant.
  • the product-sum calculation circuit that enables the reduction of the circuit scale and the reduction of the power consumption and the method thereof will be described with an example. According to the following embodiments, it is possible to achieve the effect of base technology and identification with a shorter word length, in other words, a smaller circuit scale and power consumption.
  • FIG. 34 is a circuit diagram showing a schematic configuration example of the product-sum calculation circuit according to the third embodiment.
  • the product-sum calculation circuit according to the third embodiment is an integer adder 510, a selector 520, a storage circuit group 530, a power multiplication unit 3540 of 2, an XOR circuit 550, and a floating-point adder / subtractor. It includes a 3560 and an accumulator 570.
  • the integer adder 510, the selector 520, the storage circuit group 530, the XOR circuit 550, and the accumulator 570 may be the same as the configuration described with reference to FIG. 27 in the first embodiment.
  • the power multiplication calculator 3540 of 2 corresponds to the shift calculator 540 in FIG. 27. Therefore, the operation performed by the power multiplication operator 3540 of 2 corresponds to the shift operation in the fixed-point representation.
  • the power multiplication unit 3540 of 2 sets the addition multiplier stored in the connected storage circuit to [b k-1 ,. .. .. , B q ], the value S of the high-order bit is multiplied by 2 with -S as an exponent, that is, D * 2 ⁇ -S is calculated.
  • the word length of the exponent part of the floating-point representation of the input D in the power multiplication operator 3540 of 2 is added to the word length of the exponent part in the storage circuit, and- It extended to the minimum size index that can be expressed in S, i.e., - i extended (1 + 2 ⁇ (bw ( m i) -q) + 2 ⁇ (bw (n i) -q)) size index representable
  • this operation can be implemented only with an integer subtractor for the exponent part of the floating-point representation, and the operation result will not be a denormalized number.
  • bw (m i), bw (n i) is a value representing the word length of m i, n i, respectively.
  • the floating-point adder / subtractor 3560 like the adder / subtractor 560, adds or subtracts the input from the power multiplication unit 3540 of 2 to the y held in the accumulator 570 based on the input from the XOR circuit 550. Execute repeatedly. If the input from the XOR circuit 550 is 0, addition is performed, and if it is 1, subtraction is performed.
  • the word length of i is 8 bits each
  • the maximum value of S is 32 bits
  • the exponent part of the floating point number in the 2nd power multiplex arithmetic unit 3540 should be 7 bits (since the bias is 63, 2 ⁇
  • the range of 63 to 2 ⁇ -62 can be expressed by a normalized number)
  • the word length of the addition / subtraction multiplier stored in the storage circuit group 530 is, for example, 19 bits for the improper part and 1 bit for the exponent part when the effective number is 6 digits.
  • the word lengths of the floating-point adder / subtractor 3560 and the accumulator 570 may be, for example, if the number of additions is 255 times at the maximum, the word length of the exponent part determined by the maximum value of S is 19 bits of the improper part and the exponent without further extension. Part 7 bits.
  • the floating-point representation value is output as a result of the multiply-accumulate operation, and it is also desired that this can be requantized at low cost.
  • Quantization from a floating-point representation of radix 2 can be performed as follows.
  • the absolute value of the floating-point representation x i is keep normalized so that 1.0. This normalization may be similar to the base technique.
  • p 2 ⁇ q
  • the quantization can be performed as follows.
  • the input that meets this condition is limited to the floating-point number of the normalized number, if the floating-point representation of the radix 2 is used, the number L of bits of continuous 0 from msb of c, which is necessary in the base technology, is used.
  • the "counting configuration" can be omitted.
  • the exponential part exp is a bias representation
  • the mantissa part frac is a representation in which the MSB 1 is omitted, x i ⁇ 0 and the exponent is -2 ⁇ (bb).
  • L-1 (Ebias-1) -exp (where Ebias is the bias value of the exponential part)
  • d ⁇ 1, frac ⁇ (where ⁇ , ⁇ is a bit concatenation operator)
  • FIG. 35 is a circuit diagram showing a schematic configuration example of the quantization circuit according to the third embodiment.
  • the quantization circuit includes an integer subtractor 3210, a shift calculator 3220, a storage circuit group 3230, a comparator group 3240, a priority encoder 3250, an integer adder 3260, and a comparator 3270. And a selector 3280.
  • the shift calculator 3220 calculates p (L-1) by multiplying the value of (L-1) calculated by the integer subtractor 3210 by p.
  • p 2 ⁇ q
  • this multiplication can be realized by a q-bit left shift operation.
  • the storage circuit group 3230 has 2 ⁇ -((r + 1/2) / p), r ⁇ ⁇ 0 ,. .. .. , P-1 ⁇ corresponding to p storage circuits.
  • Each storage circuit included in the storage circuit group 3230 may be a read-only circuit that holds a value as a constant, or may be a rewritable register.
  • a read-only circuit that holds a value as a constant
  • a rewritable register When stored in a read-only circuit as a constant, there is an advantage that the circuit configuration can be simplified and power consumption can be reduced together with the comparator group 3240 and the priority encoder 3250 described later.
  • the priority encoder 3250 outputs a value in the range of 0 to p-1 according to the position where 1 is input out of p inputs. If there are multiple 1 inputs, priority is given to the position with the lowest number. If any of the inputs is 0, p is output. Table 10 shows the operation of the priority encoder 3250 as a truth table.
  • the integer adder 3260 adds the p (L-1) value input from the shift calculator 3220 and the r min input from the priority encoder 3250 to obtain p (L-1) + r min.
  • the selector 3280 based on the output of the comparator 3270 outputs p outputted from the integer adder 3260 (L-1) + r min, or a code representing 0 as m i.
  • arithmetic units when a plurality of arithmetic units according to the present embodiment are installed, more arithmetic units can be installed with the same resource (circuit scale, power), and it is possible to improve the arithmetic performance per the same resource.
  • the range of values stored in the storage circuit group 3230 of the product-sum calculation circuit is more than 0.5 and limited to 1.0 or less, the range of the exponent part.
  • the maximum positive value is determined by the number of additions of the accumulator 570, and the maximum negative value is determined by the maximum value of S. Since these may not be symmetrical, the bit of the exponent part is reduced by setting the bias of the exponent part in the integer adder 510 and the accumulator 570 to a value shifted from 2 ⁇ (word length of the exponent part-1) -1. can do.
  • 2 ⁇ -41 to 2 ⁇ 20 can be expressed.
  • the negative maximum value of the exponent part of the product-sum calculation circuit may be smaller than the maximum value of S.
  • the denormalized number can be dealt with by shifting the mantissa part to the right. According to such a configuration, it is necessary to add a comparator and a shift circuit, but it is possible to reduce the bit length of the exponent part.
  • the calculation of D * 2 ⁇ -S of the product-sum calculation circuit may be realized by a floating-point arithmetic unit (multiplier and power arithmetic unit).
  • circuit configuration (product-sum calculation circuit and / or quantization circuit) according to the third embodiment described above may be partially or wholly implemented by a program. Good.
  • FIG. 36 is a schematic diagram for explaining the operation of general DNN and CNN. Note that FIG. 36 shows a three-layer convolutional neural network.
  • processing such as convolution by sum of products (Convolution), pooling (Pooling), and activation function excitation (Activation) is sequentially performed for each layer. ..
  • Convolution convolution by sum of products
  • Pooling pooling
  • Activation activation function excitation
  • FIGS. 37 to 43 Examples of input / output variables of each layer and coefficients used for convolution are shown in FIGS. 37 to 43.
  • 37 shows a coefficient w1 input to the first layer convolution layer in FIG. 36
  • FIG. 38 shows a coefficient w2 input to the second layer convolution layer in FIG. 36
  • FIG. 39 shows FIG. 36.
  • the coefficient w3 input to the convolution layer of the first layer in is shown.
  • FIG. 40 shows the input (variable) x0 of the convolutional neural network in FIG. 36
  • FIG. 41 shows the output (variable) x1 from the first layer in FIG. 36
  • FIG. 42 shows the second in FIG.
  • the output (variable) x2 from the layer is shown
  • FIG. 43 shows the output (variable) x3 from the third layer in FIG.
  • the range of values for both the coefficient and the variable is different for each layer.
  • w1 has a value range of about -5 to 4
  • w2 has a value of about -0.15 to 0.15.
  • W3 are distributed approximately from -0.4 to 0.5.
  • x0 is distributed from about -1 to 1
  • x1 is distributed from about 0 to 90
  • x2 is distributed from about 0 to 120
  • x3 is distributed from about 0. It is distributed in 20.
  • the base technology is considered to have the following problems.
  • the present embodiment for the purpose of solving the above problem, we propose numerical format information and a container that can be numerically expressed by a power expression of 2. Further, the present embodiment also proposes a byte stream format capable of holding and separating a plurality of quantization settings.
  • the following three-element set is s. e. Defined as m format.
  • value 0 zero
  • m all bits 1.
  • monotonic decrementability the value expressed decreases as the value of the index consisting of a bit string consisting of ⁇ e, m ⁇ combined within the same plus-minus sign increases
  • the total number of assigned bits s + e + m indicates the data word length (Numeric Data Bit Width).
  • The'B'in Q format indicates the word length of Numeric Data. s. e.
  • The'Q'in the Q format indicates the number of bits allocated for accuracy. This is s. e. It is synonymous with m (Mantissa Bit Width) in the m format.
  • packet header The packet header portion (hereinafter referred to as packet header) includes the following elements.
  • the continuation determination identifier is an identifier indicating whether or not to reuse the numerical format information specified immediately before.
  • Numeric Format Information can be found in s. e. m format and s. B. This is information indicating which numerical format information is used as the Q format.
  • Number of numerical data (Number) The number of numerical data (Number) indicates the number of numerical data stored in Payload.
  • the payload area (Payload) indicates an area for storing numerical data. This payload area (Payload) allows that it does not exist within the byte size aligned depending on other identifiers.
  • Numeric data Numerical data (Numeric Data) is s. e. m format and s. B. This is the main body of the numerical value specified in the Q format.
  • This numerical data (Numeric Data) is stored inside the Payload, and the unused area is filled with Padding.
  • the area filled with Padding is not limited to the area immediately after the packet header. For example, numerical data (Numeric Data) may be continued immediately after the packet header, and the surplus area may be filled with Padding. This also applies to the byte stream exemplified later.
  • the header skip identifier (Skip Header) is an identifier for determining whether or not to handle the next aligned data as a payload without a header.
  • the custom identifier (Custom) is an identifier indicating whether or not to treat the packet header as a custom format. When this custom identifier (Custom) is confirmed as a valid value, the packet interpretation method is switched according to the value.
  • FIGS. 46 and 47 are diagrams showing two basic structural examples in which a basic structure can be realized. Specifically, FIG. 46 shows a basic structure (Basic Structure) in which the continuation judgment identifier is “not continued”, and FIG. 47 is a continuation structure (in which the continuation judgment identifier is “continued”). Continue Structure) is shown.
  • Basic Structure Basic Structure
  • FIG. 47 is a continuation structure (in which the continuation judgment identifier is “continued”). Continue Structure) is shown.
  • the numerical data is continuously stored in the Payload until the subsequent alignment only by inputting the number of numerical data. be able to.
  • the Payload Recursive Number indicates how many times the Payload of the alignment unit repeats when the next alignment unit is used as the Payload. Since the packet including the packet header is described again after the byte size of the number of alignment units specified here, the format can be switched at this point.
  • Reserved area (Reserved) The Reserved area (Reserved) is a reserved area.
  • FIGS. 48 and 49 exemplify the structure of such an extended structure packet and a packet aligned only as a payload.
  • FIG. 48 shows the structure of the packet of the extended structure (Extended Structure)
  • FIG. 49 shows the structure of the packet aligned as Payload only.
  • a packet with only Payload and no header as shown in FIG. 49 is useful when the byte size of the entire Payload is divisible by the word length of the numerical data, or when a large amount of surplus area is left in the continuation structure.
  • the version number (Version) is indicated by a numerical value and indicates the type of custom extension structure (Custom Structure).
  • the numerical value 0 holds the information of the following four elements as the Payload size expansion.
  • the Payload Size indicates the size of the Payload following the packet header.
  • the Custom Structure allows the packet header to not be the same size as the byte size shown in the previous structure.
  • the numerical format information may be equivalent to the numerical format information (Numeric Format Information) in the basic structure.
  • Number of numerical data (Number)
  • the number of numerical data may be equivalent to the number of numerical data (Number) in the basic structure.
  • the Payload Recursive Number may be the same as the Payload Recursive Number in the Extended Structure.
  • FIGS. 50 and 51 An example of the header and payload of this custom extended structure (Custom Structure) is illustrated in FIGS. 50 and 51.
  • FIG. 50 shows an example of the header of the custom extended structure (Custom Structure)
  • FIG. 51 shows an example of the payload of the custom extended structure (Custom Structure).
  • This custom extension structure leaves room for storing information other than numerical values in the Payload part by changing the version number as an development example, and additional information such as a numerical calculation method on the byte stream. Can also be embedded.
  • FIGS. 52 and 53 are diagrams showing an example of implementing a byte stream of a basic structure.
  • FIG. 52 shows a packet of a basic structure
  • FIG. 53 shows a packet of a continuation structure.
  • the packet of the basic structure has, for example, a 1-bit continuation judgment identifier (denoted as'Continue'in the figure) and 2 bits in order from the leftmost MSB (Most Significant Bit).
  • Number of numerical data indicated as'Number' in the figure
  • 1-bit header skip identifier indicated as'SkipHeader' in the figure
  • 1-bit custom identifier indicated as'Custom' in the figure
  • 1, 1-bit s Sign Information
  • 4-bit B Noric Data Bit Width
  • Q in the figure
  • Payload 19-bit payload area
  • the 1-bit continuation identifier indicates, for example, that a value of '1' indicates that the packet contains a new format header, and a value of '0' indicates that of the previous packet. Indicates that a format header should be used.
  • the 2-bit number of numerical data is, for example, '10', indicating that one numerical data is stored in the payload area (Payload) of the packet when the value is '01'. In the case, it indicates that two numerical data are stored, and in the case of '11', it indicates that three numerical data are stored. If it is '00', it means that no numerical data is stored in the packet.
  • the 1-bit header skip identifier indicates that, for example, when the value is '1', the next aligned data is treated as a payload area (Payload) without a header, and when it is '0', the next Indicates that the aligned data is treated as a new packet that does not continue.
  • a 1-bit custom identifier (Custom) indicates, for example, that if the value is '0', the packet is treated as a normal format packet, and if the value is '1', it is treated as a custom format packet. Shown. That is, when the custom identifier (Custom) is '1', the interpretation method of the packet is switched.
  • the packet of the continuation structure has a 1-bit continuation judgment identifier (denoted as'Continue' in the figure) and a 2-bit numerical data number (indicated as'Continue') in order from the leftmost MSB. It is composed of a 29-bit payload area (Payload) (denoted as'Payload'in the figure) and a 29-bit payload area (denoted as'Number') in the figure.
  • the continuation determination identifier (Continue), the number of numerical data (Number), and the payload area (Payload) may be the same as those described with reference to FIG. 53, respectively.
  • FIG. 54 and FIG. 55 are diagrams showing an example of implementing a byte stream of an extended structure.
  • FIG. 54 shows packets of the Extended Structure
  • FIG. 55 shows packets of only the continuing payload area (Payload).
  • the packet of the extended structure has a structure similar to that of the packet of the basic structure (Basic Structure) shown in FIG. 52, and has a 19-bit payload area (Payload) of 11 bits. It has been replaced with a Reserved area (indicated as'Reserved'in the figure) and an 8-bit Payload repetition number (indicated as'Payload Recursive Number' in the figure).
  • the Reserved area (Reserved) may be filled by, for example, zero padding when not in use.
  • a packet having only a payload area is composed of, for example, a 32-bit payload area (denoted as'Payload'in the figure).
  • FIG. 56 and FIG. 57 are diagrams showing an example of implementing a byte stream of a custom structure.
  • FIG. 56 shows packets of a custom structure
  • FIGS. 57 (a) to 57 (c) show packets of only a continuous payload area (Payload).
  • the packet having a custom structure has, for example, the number of numerical data (denoted as'Number' in the figure) in the same structure as the packet having the basic structure (Basic Structure) shown in FIG. Is s. B. It is moved to the next Q format section, and instead, a version number (denoted as'Version' in the figure) is placed between the continuation judgment identifier (Continue) and the header skip identifier (SkipHeader), and a custom identifier. (Custom) and s. B. It has a structure in which a payload size (denoted as'PayloadSize'in the figure) is added between the Q format unit. Further, the 19-bit payload area (Payload) is replaced with the above-mentioned 6-bit numerical data number ('Number') and 8-bit Payload repetition number (denoted as'Payload Recursive Number'in the figure). There is.
  • a packet having a custom structure (Custom Structure)
  • a packet having only the payload area (Payload) continues for the size specified by the payload size (Payload Size). This constitutes a payload variable length stream with a custom extended structure packet header.
  • FIG. 58 is a block diagram showing a schematic configuration example of a system for processing a byte stream according to the present embodiment.
  • the solid line arrow indicates the data flow and control command flow in the basic structure (Basic Structure), the continuation structure (Continue Structure), the extended structure (Extended Structure), and the custom structure (Custom Structure). Shows the data flow and control instruction flow in the extended example that can be extended and handled by the custom structure.
  • the one-dot dashed arrow indicates an instruction or instruction from the outside of the system
  • the two-dot dashed arrow indicates an instruction or instruction from the outside of the system in an extended example that can be extended and handled by a custom structure.
  • the processing system 4000 includes a power expression conversion unit 4003, a storage / conversion unit 4004, an input feature map memory 4005, a coefficient memory 4006, an analysis unit 4007, an extraction unit 4008, and a power expression. It includes a conversion unit 4009, an arithmetic control unit 4010, an arithmetic unit array 4011, a power expression conversion unit 4013, a storage / conversion unit 4014, and an output feature map memory 4015.
  • the exponentiation conversion unit 4003 has, for example, a configuration corresponding to the exponentiation conversion units 2001 and 2102 in the above-described embodiment, and the value input via the sensor I / F 4001 is input from the multiplication unit 2002/2104 or the like. It is converted into a power expression of 2 using the coefficient 4002.
  • the sensor I / F4001 can be converted into numerical data such as an image sensor, a ToF (Time of Flight) sensor, a microphone, and various sensors for measuring weather information such as atmospheric pressure, temperature, humidity, and wind speed. Various sensors can be applied to obtain possible measurements.
  • the storage / conversion unit 4004 is configured to store the value in the container and convert it into a byte stream.
  • the storage / conversion unit 4004 is a byte stream that stores the numerical representation and the calculation control command input from the sensor I / F 4001 and the exponentiation conversion unit 4003 in accordance with the calculation control command input from the host device and the instruction of the storage / conversion method.
  • the byte stream to be constructed includes the above-mentioned basic structure (Basic Structure), continuation structure (Continue Structure), extended structure (Extended Structure), and custom structure (Custom Structure) byte stream.
  • the arithmetic control instruction may include, for example, designation of a value table used by the product-sum arithmetic circuit 4012 of the arithmetic unit array 4011 described later.
  • the input feature map memory 4005 has a configuration corresponding to the variable buffer 2003 in the above-described embodiment, and stores the byte stream constructed by the storage / conversion unit 4004. Therefore, the input feature map memory 4005 stores a variable represented by a power of 2.
  • the coefficient memory 4006 has a configuration corresponding to the coefficient memory 2004 in the above-described embodiment, and stores the coefficient of the power expression of 2 input from the storage / conversion unit 4004.
  • the analysis unit 4007 parses (analyzes) the byte stream read from the input feature map memory 4005, and separates the payload area (Payload) from other information.
  • the extraction unit 4008 extracts a combination of actual data in the container. Specifically, from the container, s. e. m format and s. B. Numerical format information such as Q format and numerical representation (Numeric Data) inside the container are extracted.
  • the extraction unit 4008 extracts numerical values and control instructions other than the exponentiation from the byte stream. For example, the extraction unit 4008 extracts a numerical calculation method (calculation control instruction), a numerical value type (floating point type, etc.), actual numerical value data, and the like.
  • a numerical calculation method calculation control instruction
  • a numerical value type floating point type, etc.
  • actual numerical value data and the like.
  • the exponentiation conversion unit 4009 has a configuration corresponding to the exponentiation conversion units 2001 and 2102 in the above-described embodiment, and converts the numerical values of other numerical expressions input from the extraction unit 4008 into the exponentiation numerical values.
  • the arithmetic control unit 4010 outputs a control instruction to the arithmetic unit array 4011 based on the arithmetic control instruction embedded in the byte stream of the custom structure having a predetermined version number (Version).
  • the arithmetic unit array 4011 is configured to include, for example, the product-sum arithmetic circuit 4012 in the above-described embodiment, and executes a predetermined arithmetic processing on the input numerical value of the power expression, the numerical value of other numerical expressions, and the like.
  • the exponentiation conversion unit 4013 has a configuration corresponding to the exponentiation conversion units 2001 and 2102 in the above-described embodiment, and converts the numerical value of the exponentiation input input from the arithmetic unit array 4011.
  • the storage / conversion unit 4014 has a configuration for storing a value in a container and converting a byte stream, and instructing an arithmetic control command and a storage / conversion method input from a higher-level device. According to this, a byte stream storing numerical expressions and arithmetic control instructions input from the numerical expression conversion unit 4013 and the arithmetic unit array 4011 is constructed.
  • the byte stream to be constructed includes the above-mentioned basic structure (Basic Structure), continuation structure (Continue Structure), extended structure (Extended Structure), and custom structure (Custom Structure) byte stream.
  • the output feature map memory 4015 has a configuration corresponding to the operation result buffer 2005 in the above-described embodiment, and stores the byte stream constructed by the storage / conversion unit 4014.
  • the output feature map stored in the output feature map memory 4015 can be re-input to the analysis unit 4007 as an input feature map.
  • each part shown in FIG. 58 can be realized in part or in whole by hardware or software. Further, in the configuration shown in FIG. 58, the output of each part may be appropriately buffered.
  • the byte stream format it becomes possible to adopt different numerical representation settings in finer units than for each layer and / or map of DNN. For example, it is possible to realize a byte stream format that efficiently switches numerical expression settings in finer units such as line units and pixel units.
  • the quantization method according to the present disclosure may be applied to a convolution operation in a bandpass filter used in the field of communication technology.
  • a bandpass filter used in the field of communication technology.
  • FIG. 59 is a diagram showing simulation results related to frequency characteristics (gain characteristics) when the quantization method according to the present disclosure is applied to a bandpass filter.
  • the coefficients (63 taps, rolloff 0.5) in the RRC (Root-Raised Cosine) filter were quantized.
  • FIG. 60 is a diagram showing a simulation result relating to the phase characteristics when the quantization method according to the present disclosure is applied to a bandpass filter.
  • FIG. 60 it can be seen that even when the quantization method according to the present disclosure is applied, the rotation of the phase in the passband, that is, the deterioration of the phase characteristic is not confirmed.
  • the quantization method according to the present disclosure does not significantly deteriorate the frequency characteristics of the bandpass filter, it can be said that it is sufficiently applicable in the field of communication technology.
  • FIG. 61 is a block diagram used for the BER evaluation according to the present disclosure.
  • a floating point number, an integer, and a DNN (p, 32) were applied to the ADC (Analog to Digital Converter) and the RRC filter before demodulation, and the BER was measured.
  • ADC Analog to Digital Converter
  • BPSK, QPSK, and 16QAM were used as the modulation and demodulation methods, respectively.
  • FIG. 62 is a diagram showing a BER evaluation result when BPSK is used as a modulation method. Further, FIG. 63 is an enlarged view of the data of SNR 7 to 9 dB in FIG. 62.
  • the quantization method according to the present disclosure is also effective in the field of communication technology, and can realize both maintenance of performance and reduction of processing load.
  • FIG. 68 is a block diagram showing a hardware configuration example of the information processing apparatus 10 according to the embodiment of the present disclosure.
  • the information processing apparatus 10 includes, for example, a CPU 871, a ROM 872, a RAM 873, a host bus 874, a bridge 875, an external bus 876, an interface 877, an input device 878, and an output device 879.
  • a storage 880, a drive 881, a connection port 882, and a communication device 883 is an example, and some of the components may be omitted. Further, components other than the components shown here may be further included.
  • the CPU 871 functions as, for example, an arithmetic processing device or a control device, and controls all or a part of the operation of each component based on various programs recorded in the ROM 872, the RAM 873, the storage 880, or the removable recording medium 901.
  • the ROM 872 is a means for storing a program read into the CPU 871 and data used for calculation.
  • the RAM 873 temporarily or permanently stores, for example, a program read into the CPU 871 and various parameters that change as appropriate when the program is executed.
  • the CPU 871, ROM 872, and RAM 873 are connected to each other via, for example, a host bus 874 capable of high-speed data transmission.
  • the host bus 874 is connected to the external bus 876, which has a relatively low data transmission speed, via, for example, the bridge 875.
  • the external bus 876 is connected to various components via the interface 877.
  • Input device 8708 For the input device 878, for example, a mouse, a keyboard, a touch panel, buttons, switches, levers, and the like are used. Further, as the input device 878, a remote controller (hereinafter, remote controller) capable of transmitting a control signal using infrared rays or other radio waves may be used. Further, the input device 878 includes a voice input device such as a microphone.
  • the output device 879 provides the user with acquired information such as a display device such as a CRT (Cathode Ray Tube), an LCD, or an organic EL, an audio output device such as a speaker or headphones, a printer, a mobile phone, or a facsimile. It is a device that can notify visually or audibly. Further, the output device 879 according to the present disclosure includes various vibration devices capable of outputting a tactile stimulus.
  • the storage 880 is a device for storing various types of data.
  • a magnetic storage device such as a hard disk drive (HDD), a semiconductor storage device, an optical storage device, a magneto-optical storage device, or the like is used.
  • the drive 881 is a device that reads information recorded on a removable recording medium 901 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, or writes information to the removable recording medium 901.
  • a removable recording medium 901 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory
  • the removable recording medium 901 is, for example, a DVD media, a Blu-ray (registered trademark) media, an HD DVD media, various semiconductor storage media, and the like.
  • the removable recording medium 901 may be, for example, an IC card equipped with a non-contact type IC chip, an electronic device, or the like.
  • connection port 882 is a port for connecting an external connection device 902 such as a USB (Universal Serial Bus) port, an IEEE1394 port, a SCSI (Small Computer System Interface), an RS-232C port, or an optical audio terminal. is there.
  • an external connection device 902 such as a USB (Universal Serial Bus) port, an IEEE1394 port, a SCSI (Small Computer System Interface), an RS-232C port, or an optical audio terminal. is there.
  • the externally connected device 902 is, for example, a printer, a portable music player, a digital camera, a digital video camera, an IC recorder, or the like.
  • the communication device 883 is a communication device for connecting to a network, and is, for example, a communication card for wired or wireless LAN, Wireless (registered trademark), or WUSB (Wireless USB), a router for optical communication, and ADSL (Asymmetric Digital). A router for Subscriber Line), a modem for various communications, and the like.
  • the present technology can also have the following configurations.
  • (1) It is equipped with a multiply-accumulate operation circuit that executes a product-sum operation based on a plurality of input values quantized by a power expression and a plurality of weighting coefficients quantized by a power expression corresponding to each of the input values.
  • the exponent of each of the input values is represented by a fraction having a predetermined divisor in the denominator.
  • the exponent of each of the weighting factors is represented by a fraction having the divisor as the denominator.
  • the product-sum calculation circuit is a plurality of addition multipliers based on a remainder when division is performed by dividing the value obtained by adding the molecule of the exponent of each of the input values and the molecule of the exponent of each of the weighting coefficients as a dividend.
  • Each of the addition multipliers is an information processing device that is a floating-point number having a radix of 2 in the exponent part.
  • the information processing device executes addition / subtraction to an exponent portion of a floating-point number having a radix of 2.
  • the storage unit A group of storage circuits consisting of multiple rewritable storage circuits, A memory that holds a plurality of first addition multipliers and a plurality of second addition multipliers different from the plurality of first addition multipliers.
  • the above (2) includes a selector for selectively writing one of the plurality of first addition multipliers and the plurality of second addition multipliers held in the memory to the storage circuit group.
  • the storage unit A first storage circuit group that holds a plurality of first addition multipliers, A second storage circuit group that holds a plurality of second addition multipliers different from the plurality of first addition multipliers, and A selector that switches the storage circuit group connected to the product-sum calculation circuit to either the first storage circuit group or the second storage circuit group.
  • the plurality of first addition multipliers are values expressed as powers of 2.
  • the information processing apparatus according to (6) or (7) above, wherein the plurality of second addition multipliers are linearly represented values.
  • An analysis unit that analyzes the byte stream and It is provided with a product-sum calculation circuit that executes a product-sum operation based on a plurality of input values quantized by a power expression and a plurality of weighting coefficients quantized by a power expression corresponding to each of the input values.
  • Arithmetic array and An arithmetic control unit that controls the arithmetic unit array based on the analysis result by the analysis unit, and With The arithmetic unit array further includes a storage unit that holds a plurality of addition multipliers.
  • the storage unit A first storage circuit group that holds a plurality of first addition multipliers, A second storage circuit group that holds a plurality of second addition multipliers different from the plurality of first addition multipliers, and A selector that switches the storage circuit group connected to the product-sum calculation circuit to either the first storage circuit group or the second storage circuit group.
  • the byte stream includes a designation of storage circuits used in the multiply-accumulate operation.
  • the arithmetic control unit controls the selector based on the designation.
  • the exponent of each of the input values is represented by a fraction having a predetermined divisor in the denominator.
  • the exponent of each of the weighting factors is represented by a fraction having the divisor as the denominator.
  • the product-sum calculation circuit is a plurality of addition multipliers based on a remainder when division is performed by dividing the value obtained by adding the molecule of the exponent of each of the input values and the molecule of the exponent of each of the weighting coefficients as a dividend.
  • each of the additional multipliers is a floating-point number having a radix of 2 in the exponent part.
  • (11) A product-sum operation based on an analysis unit that analyzes a byte stream, a plurality of input values quantized by the multiplication expression, and a plurality of weighting coefficients quantized by the multiplication expression corresponding to the input values.
  • the arithmetic unit array includes an arithmetic unit array including a product-sum arithmetic circuit for executing the above, and an arithmetic control unit that controls the arithmetic unit array based on the analysis result by the analysis unit, and the arithmetic unit array holds a plurality of addition multipliers.
  • a storage unit is further provided, and the storage unit holds a first storage circuit group that holds a plurality of first addition multipliers, and a plurality of second addition multipliers that are different from the plurality of first addition multipliers.
  • the product sum includes a second storage circuit group and a selector for switching the storage circuit group connected to the product sum calculation circuit to either the first storage circuit group or the second storage circuit group.
  • the arithmetic circuit uses a plurality of addition multipliers based on the remainder when division is performed by dividing the value obtained by adding the numerator of each of the input values and the numerator of each of the weighting coefficients as a dividend.
  • the analysis unit identifies the designation of the storage circuit group used in the product-sum operation from the byte stream, and determines the designation.
  • the arithmetic control unit controls the selector based on the designation.
  • the product-sum calculation circuit includes executing the product-sum calculation using the plurality of addition multipliers held in the storage circuits connected via the selector.
  • the exponent of each of the input values is represented by a fraction having a predetermined divisor in the denominator.
  • the exponent of each of the weighting factors is represented by a fraction having the divisor as the denominator.
  • Each of the addition multipliers is an information processing method in which the radix of the exponent part

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Neurology (AREA)
  • Nonlinear Science (AREA)
  • Complex Calculations (AREA)

Abstract

内積演算に係る処理負担をより軽減すると共に、重み係数の量子化粒度を保証する。実施形態に係る情報処理装置は、冪乗表現により量子化された複数の入力値と、前記入力値にそれぞれ対応する冪乗表現により量子化された複数の重み係数とに基づいて、積和演算を実行する積和演算回路(200)を備え、前記入力値それぞれの指数は、予め定められた除数を分母に有する分数により表現され、前記重み係数それぞれの指数は、前記除数を分母に有する分数により表現され、前記積和演算回路は、前記入力値それぞれの前記指数に係る分子と、前記重み係数それぞれの前記指数に係る分子とを加算した値を被除数とした除算をした際の剰余に基づく複数の加算乗数を用いて前記積和演算を実行し、前記加算乗数それぞれは、指数部の基数が2である浮動小数点数である。

Description

情報処理装置、情報処理システム及び情報処理方法
 本開示は、情報処理装置、情報処理システム及び情報処理方法に関する。
 近年、脳神経系の仕組みを模した数学モデルであるニューラルネットワークが注目されている。また、ニューラルネットワークにおける演算の処理負担を軽減するための種々の手法が提案されている。例えば、非特許文献1には、重み係数を2値化することで、処理負担を軽減する手法が記載されている。また、非特許文献2には、入力信号をログドメインに変換することにより、乗算を加算に変換する手法が記載されている。
Matthieu Courbariaux、外2名、"BinaryConnect: Training Deep Neural Networks with binary weights during propagations"、[online]、2015年11月2日、arXiv、[平成29年3月22日検索]、インターネット〈URL: https://arxiv.org/pdf/1511.00363.pdf〉 Daisuke Miyashita、外2名、"Convolutional Neural Networks using Logarithmic Data Representation"、[online]、2016年3月3日、arXiv、[平成29年3月22日検索]、インターネット〈URL: https://arxiv.org/pdf/1603.01025.pdf〉
 しかし、非特許文献1に記載の手法では、+1または-1を用いた2値化を行っているため、重み係数の次元数が増加するにつれて量子化の粒度が荒くなることが想定される。また、非特許文献2に記載の手法では、乗算の回避において所定の効果を有するものの、処理負担の軽減については、さらなる余地があるものと想定される。
 そこで、本開示では、内積演算に係る処理負担をより軽減すると共に、重み係数の量子化粒度を保証することが可能な、新規かつ改良された情報処理装置、情報処理システム及び情報処理方法を提案する。
 上記の課題を解決するために、本開示に係る一形態の情報処理装置は、冪乗表現により量子化された複数の入力値と、前記入力値にそれぞれ対応する冪乗表現により量子化された複数の重み係数とに基づいて、積和演算を実行する積和演算回路を備え、前記入力値それぞれの指数は、予め定められた除数を分母に有する分数により表現され、前記重み係数それぞれの指数は、前記除数を分母に有する分数により表現され、前記積和演算回路は、前記入力値それぞれの前記指数に係る分子と、前記重み係数それぞれの前記指数に係る分子とを加算した値を被除数とした除算をした際の剰余に基づく複数の加算乗数を用いて前記積和演算を実行し、前記加算乗数それぞれは、指数部の基数が2である浮動小数点数である。
本開示の関連技術に係るニューラルネットワークにおける基本演算の概要について説明するための概念図である。 本開示の関連技術に係る入力ベクトルと重みベクトルとの内積演算について説明するための概要図である。 本開示の関連技術に係る2次元空間において2値量子化した重みベクトルについて説明するための図である。 本開示の関連技術に係る2次元空間において4値量子化した重みベクトルについて説明するための図である。 本開示の関連技術に係る3次元空間における重みベクトルの粒度のばらつきについて説明するための図である。 本開示の関連技術に係るN次元空間における重みベクトルの粒度のばらつきについて説明するための図である。 ベース技術に係る情報処理装置の機能ブロック図の一例である。 ベース技術に係る情報処理装置が備える積和演算回路の回路ブロック図の一例である。 ベース技術に係るアドレステーブルが保持するアドレス情報に係るオフセット表記の一例である。 ベース技術に係る情報処理方法の処理イメージを示す図である。 ベース技術に係る量子化粒度Δθについて説明するための図である。 ベース技術に係るαに応じた量子化粒度Δθの最大値を示すグラフである。 ベース技術に係る最大冪乗数について説明するための図である。 ベース技術に係る入力数Nに対する乗算回数の例を示す図である。 ベース技術に係る入力数Nに対する乗算回数の例を示す図である。 ベース技術の発展例に係る重みベクトルを量子化した場合における積和演算回路の一例である。 ベース技術の発展例に係る重みベクトルおよび入力ベクトルの双方を量子化した場合における積和演算回路の一例である。 ベース技術の発展例に係る重みベクトルおよび入力ベクトルの双方を量子化した場合における積和演算回路の一例である。 ベース技術の発展例に係る比較実験に用いたResNetのネットワーク構造を示す図である。 ベース技術の発展例に係るMax Pooling層を含まないResNetネットワーク構成を示す図である。 ベース技術の発展例に係るMax Pooling層を含むResNetネットワーク構成を示す図である。 ベース技術の発展例に係る画像認識率の比較結果を示す図である。 ベース技術の発展例に係る重みベクトルおよび入力ベクトルの双方を量子化した場合における積和演算回路の一例である。 第1の実施形態に係るインデックスとテーブル値の関係を示す図である。 第1の実施形態に係るインデックスとテーブル値の他の関係を示す図である。 第1の実施形態に係る2の冪乗表現におけるテーブル値と線形表現におけるテーブル値とを同一のグラフにプロットした図である。 第1の実施形態の第1の具体例に係る積和演算回路の概略構成例を示す回路図である。 第1の実施形態の第2の具体例に係る積和演算回路の概略構成例を示す回路図である。 第2の実施形態に係る量子化器の丸めの一例を示す図である。 比較例としてのニューラルネットワーク回路の概略構成例を示すブロック図である。 他の比較例としてのニューラルネットワーク回路の概略構成例を示すブロック図である。 さらに他の比較例としてのニューラルネットワーク回路の概略構成例を示すブロック図である。 第2の実施形態に係るニューラルネットワーク回路の概略構成例を示すブロック図である。 第3の実施形態に係る積和演算回路の概略構成例を示す回路図である。 第3の実施形態に係る量子化回路の概略構成例を示す回路図である。 一般的なDNN、CNNの動作を説明するための概略図である。 図36における第1層の畳み込み層に入力される係数w1を示す図である。 図36における第2層の畳み込み層に入力される係数w2を示す図である。 図36における第1層の畳み込み層に入力される係数w3を示す図である。 図36における畳み込みニューラルネットワークの入力(変数)x0を示す図である。 図36における第1層からの出力(変数)x1を示す図である。 図36における第2層からの出力(変数)x2を示す図である。 図36における第3層からの出力(変数)x3を示す図である。 第4の実施形態に係る2の冪乗の数表の一例を示す図である。 第4の実施形態に係る、s.e.mフォーマットとs.B.Qフォーマットと数値フォーマット情報(Numeric Format Information)とコンテナ(Numeric Data Container)との関係を示す図である。 第4の実施形態に係る基本構造(Basic Structure)のパケットの構造例を示す図である。 第4の実施形態に係る継続構造(Continue Structure)のパケットの構造例を示す図である。 第4の実施形態に係る拡張構造(Extended Structure)のパケットの構造例を示す図である。 第4の実施形態に係るPayloadのみとしてアライメントされたパケットの構造例を示す図である。 第4の実施形態に係るカスタム拡張構造(Custom Structure)のヘッダの例を示す図である。 第4の実施形態に係るカスタム拡張構造(Custom Structure)のPayloadの例を示す図である。 第4の実施形態に係る基本構造(Basic Structure)のパケットの実装例を示す図である。 第4の実施形態に係る継続構造(Continue Structure)のパケットの実装例を示す図である。 第4の実施形態に係る拡張構造(Extended Structure)のパケットの実装例を示す図である。 第4の実施形態に係る継続するペイロード領域(Payload)のみのパケットの実装例を示す図である。 第4の実施形態に係るカスタム構造(Custom Structure)のパケットの実装例を示す図である。 第4の実施形態に係る継続するペイロード領域(Payload)のみのパケットの実装例を示す図である。 第4の実施形態に係るバイトストリームを処理するシステムの概略構成例を示すブロック図である。 本開示に係る量子化手法をバンドパスフィルタに適用した際の周波数特性(ゲイン特性)に係るシミュレーション結果を示す図である。 本開示に係る量子化手法をバンドパスフィルタに適用した際の位相特性に係るシミュレーション結果を示す図である。 本開示に係るBER評価に利用したブロック図である。 本開示に係るBPSKを変調方式に用いた際のBER評価結果を示す図である。 図62におけるSNR7~9dBのデータを拡大した図である。 本開示に係るQPSKを変調方式に用いた際のBER評価結果を示す図である。 図64におけるSNR10~12dBのデータを拡大した図である。 本開示に係る16QAMを変調方式に用いた際のBER評価結果を示す図である。 図66におけるSNR16~18dBのデータを拡大した図である。 本開示の一実施形態に係るハードウェア構成例を示す図である。
 以下に、本開示の一実施形態について図面に基づいて詳細に説明する。なお、以下の実施形態において、同一の部位には同一の符号を付することにより重複する説明を省略する。
 また、以下に示す項目順序に従って本開示を説明する。
  1.ベース技術
   1.1 背景
   1.2 情報処理装置10の機能構成例
   1.3 重みベクトルの量子化
   1.4 積和演算回路の構成例
   1.5 学習時における量子化
   1.6 ベース技術の効果
  2.ベース技術の発展例
   2.1 概要
   2.2 重みベクトルの量子化
   2.3 重みベクトルおよび入力ベクトル双方の量子化
   2.4 発展例の効果
  3.まとめ
  4.第1の実施形態
   4.1 ベース技術の課題
   4.2 値テーブルの例
   4.3 積和演算回路の具体例
    4.3.1 第1の具体例
    4.3.2 第2の具体例
   4.4 作用・効果
  5.第2の実施形態
   5.1 ベース技術の課題
   5.2 量子化回路の具体例
   5.3 作用・効果
  6.第3の実施形態
   6.1 ベース技術の課題
   6.2 積和演算回路の具体例
   6.3 量子化方法への展開
   6.4 量子化回路の具体例
   6.5 作用・効果
   6.6 変形例
    6.6.1 第1の変形例
    6.6.2 第2の変形例
    6.6.3 第3の変形例
    6.6.4 第4の変形例
    6.6.5 第5の変形例
    6.6.6 第6の変形例
  7.第4の実施形態
   7.1 ベース技術の課題
   7.2 数値フォーマット情報の具体例
    7.2.1 s.e.mフォーマット
    7.2.2 s.B.Qフォーマット
   7.3 実データの管理手法:コンテナと数値フォーマット情報の関係
   7.4 バイトストリーム
    7.4.1 基本構造(Basic Structure)と継続構造(Continue Structure)のパケットによるバイトストリーム
    7.4.2 拡張構造のパケットによるバイトストリーム(Extended Structure)
    7.4.3 カスタム拡張構造のパケットヘッダによるPayload可変長ストリーム(Custom Structure)
   7.5 バイトストリームの実装例
    7.5.1 基本構造(Basic Structure)及び継続構造(Continue Structure)のバイトストリーム実装例
    7.5.2 拡張構造(Extended Structure)のバイトストリーム実装例
    7.5.3 カスタム構造(Custom Structure)のバイトストリーム実装例
   7.6 バイトストリームの処理システムの構成例
   7.7 作用・効果
  8.通信技術への応用例
  9.ハードウェア構成例
 1.ベース技術
 まず、本開示のベースとなる技術(以下、ベース技術という)について図面を参照して詳細に説明する。
 1.1 背景
 近年、深層学習(Deep Learning)などニューラルネットワークを用いた学習手法が広く研究されている。ニューラルネットワークを用いた学習手法は高い精度を有する一方、演算に係る処理負担が大きいことから、当該処理負担を効果的に軽減する演算方式が求められている。
 このため、近年においては、例えば、Binary weight networkや、XNOR netなどの、演算量や情報量の軽減を目的とする演算方式も提案されている。
 ここで、一般的なニューラルネットワークにおける基本演算の概要について説明する。図1は、ニューラルネットワークにおける基本演算の概要について説明するための概念図である。図1には、ニューラルネットワークを構成する2つの層と、当該2つの層にそれぞれ属するセルc1~c1とセルc2とが示されている。
 この際、セルc2に入力される入力信号(以下、入力ベクトル、とも称する)は、下層に属するセルc1~c1に係る入力ベクトルと重み係数(以下、重みベクトル、とも称する)とに基づいて決定される。より詳細には、セルc2に入力される入力ベクトルは、セルc1~c1に係る入力ベクトルと重みベクトルとの内積演算結果にバイアスbを加算し、さらに活性化関数hにより処理した値となる。
 すなわち、セルc1~c1に係る入力ベクトルと重みベクトルとをそれぞれ、x=(x,x,x,...x)、w=(w,w,w,...w)とした場合、セルc2に入力される入力ベクトルzは、下記の数式(1)により定義される。
Figure JPOXMLDOC01-appb-M000001
 この際、重みベクトルwを法線とする超平面hを想定すると、N次元で表現される入力ベクトルxと重みベクトルwとの内積は、図2に示すように、超平面hを基準とした入力ベクトルxを重みベクトルwへ射影した射影距離dに||w||を掛けた値により表現することができる。ここで、上記の||w||は、ベクトルwのノルムである。図2は、入力ベクトルxと重みベクトルwとの内積演算について説明するための概要図である。
 ここで、入力ベクトルxと重みベクトルwとが2次元である場合、非特許文献1のように、重みベクトルwを+1または-1の2値で量子化すると、重みベクトルwは、図3のように表すことができる。図3は、2次元空間において2値量子化した重みベクトルwについて説明するための図である。この際、重みベクトルwの粒度は、平面における回転角度θで表現することができ、当該粒度は、図3に示すように、90度となる。
 続いて、重みベクトルwを{0,1/4,1/2,1}の4値で量子化する場合を考察する。図4は、2次元空間において4値量子化した重みベクトルwについて説明するための図である。この場合、重みベクトルwの粒度、すなわち回転角度θは、約15度となり、2値量子化した場合と比較してより細かい粒度を保証することが可能となる。
 一方、重みベクトルwの粒度は、次元数が増加するにつれ、ばらつきが大きくなることが想定される。図5は、3次元空間における重みベクトルwの粒度のばらつきについて説明するための図である。例えば、図5に示すように、(1,1,0)と(0,0,1)とで定義される面における重みベクトルwの量子化を考えた場合、(1,1,0)方向の辺の長さは、(0,0,1)方向の辺の長さの√2倍となるため、量子化時における粒度のばらつきが大きくなることがわかる。
 また、上記のような粒度のばらつき、すなわち不均一性は、次元数が増加するほど顕著となる。図6は、N次元空間における重みベクトルwの粒度のばらつきについて説明するための図である。図6には、N次元空間において、(1,1,...,1,0)と(0,0,...,0,1)で定義される面が示されている。この際、(1,1,...,1,0)方向の辺の長さは、(0,0,...,0,1)方向の辺の長さの√(N-1)倍により表すことができる。例えば、N=100である場合には、1,1,...,1,0)方向の辺の長さは、(0,0,...,0,1)方向の辺の√99倍(≒10倍)となる。
 上記のような重みベクトルwに係る粒度の不均一性は、ニューラルネットワークの性能低下の要因となり得ることから、より精度の高い量子化手法が望まれていた。本開示に係る技術思想は、上記の点に着目して発想されたものであり、N次元空間における重みベクトルの高い近似精度を維持しながらも効果的に処理負担を軽減することを可能とする。このために、本開示のベース技術に係る情報処理装置および情報処理方法は、N次元超球平面におけるベクトル方向の粒度に基づいて量子化された重みベクトルを用いて内積演算を行うことを特徴の一つとする。本開示のベース技術に係る情報処理装置および情報処理方法は、重みベクトルを、細かすぎず、かつ粗すぎない粒度で量子化することで、高い近似精度と処理負担の軽減を両立することが可能である。より詳細には、本開示のベース技術に係る情報処理装置および情報処理方法は、冪乗により表現された重みベクトルを用いた内積演算を行ってよい。以下、本開示のベース技術に係る情報処理装置および情報処理方法の有する上記の特徴について詳細に説明する。
 1.2 情報処理装置10の機能構成例
 続いて、ベース技術に係る情報処理方法を実現する情報処理装置10の機能構成例について述べる。図7は、ベース技術に係る情報処理装置10の機能ブロック図の一例である。図7を参照すると、ベース技術に係る情報処理装置10は、入力部110、演算部120、記憶部130、および出力部140を備える。以下、上記構成について、当該構成が有する機能を中心に説明する。
 (入力部110)
 入力部110は、操作者による種々の入力操作を検出する機能を有する。このために、入力部110は、操作者による入力操作を検出するための各種の装置を含んでよい。入力部110は、例えば、各種のボタン、キーボード、タッチパネル、マウス、スイッチなどにより実現され得る。
 (演算部120)
 演算部120は、複数の入力値と当該入力値にそれぞれ対応する複数の重み係数とに基づく内積演算を行い出力値を算出する機能を有する。演算部120は、特に、ニューラルネットワークの順伝播に係る内積演算を行う。この際、演算部120は、N次元超球表面におけるベクトル方向の粒度に基づいて量子化された重み係数に基づいて出力値を算出することを特徴の一つとする。より具体的には、演算部120は、冪乗により表現された重み係数に基づいて出力値を算出してよい。内積演算の特徴については、別途詳細に説明する。
 (記憶部130)
 記憶部130は、情報処理装置10が備える各構成で用いられるプログラムやデータなどを記憶する機能を有する。記憶部130は、例えば、ニューラルネットワークに用いられる種々のパラメータなどを記憶する。
 (出力部140)
 出力部140は、操作者に対し種々の情報出力を行う機能を有する。このために、出力部140は、視覚情報を出力するディスプレイ装置を含んで構成され得る。ここで、上記のディスプレイ装置は、例えば、CRT(Cathode Ray Tube)ディスプレイ装置、液晶ディスプレイ(LCD:Liquid Crystal Display)装置、OLED(Organic Light Emitting Diode)装置などにより実現され得る。
 以上、ベース技術に係る情報処理装置10の機能構成例について説明した。なお、上記で説明した機能構成例はあくまで一例であり、その機能構成例は係る例に限定されない。情報処理装置10は、図1に示す以外の構成をさらに備えてもよい。情報処理装置10は、例えば、他の情報処理端末との情報通信を行う通信部などをさらに備えてもよい。すなわち、ベース技術に係る情報処理装置10の機能構成は、柔軟に設計変更され得る。
 1.3 重みベクトルの量子化
 次に、ベース技術に係る重みベクトルの量子化について詳細に説明する。上述したように、ベース技術に係る情報処理装置10は、冪乗により表現された重みベクトルwによる量子化を行うことで、粒度の均一性を高く保つことができる。この際、演算部120は、複数の重みベクトル成分wを値の小さい順番に並び替え、また当該複数の重みベクトル成分wを最も値の大きい重み係数wで正規化することを特徴の一つとする。ここで、並び替えて正規化された重みベクトルをwとすると、重みベクトルwは、下記の数式(2)~(4)により表される。
Figure JPOXMLDOC01-appb-M000002
 但し、この際、上記の数式(2)におけるαは、0<α<1、であり、sは、s∈{-1,1}であり、nは、n∈{0,1,2,...}、であってよい。すなわち、演算部120は、nを整数として量子化を行う。この際、演算部120が実行する内積演算は、下記の数式(5)により表される。なお、下記の数式(5)におけるKは、正規化定数を示す。また、上記αの値については、下記の数式(5)を適宜変形した場合であっても、内積演算において最終的に上記の範囲に定まればよい。本開示に示す数式は、あくまで一例であり、柔軟に変形され得る。
Figure JPOXMLDOC01-appb-M000003
 このため、演算部120による内積演算は、N回の加算演算と、-1/2log(N-1)/logαのオーダーの乗算回数により処理が可能であることが予想される。
 このように、ベース技術に係る情報処理方法では、重みベクトルwをαの冪乗表現により近似し、値の小さい順番に重みベクトルwを並び替えることを特徴の一つとする。この際、ベース技術に係る情報処理方法では、Nに応じてαの指数をt値化することで、重みベクトルwの量子化が行われる。
 例えば、N=100である場合、ベース技術に係る情報処理方法では、t=4(2bit),8(3bit),16(4bit)などが採用されてもよい。上記のようにtを設定することで、上記の数式(5)におけるn1-,n2-,n3-...の多くは、同一の値により量子化されることで0となるため、乗算の回数を大幅に削減することが可能となる。より具体的な例を挙げると、N=100に対し、t=4である場合、nj-1-nが0以外の値を取り得るのは4回のみとなる。このため、本例の場合、内積演算に係る乗算回数は4回で済み、残りはすべて加算となるため、処理負担を効果的に軽減することができる。
 1.4 積和演算回路の構成例
 次に、ベース技術に係る演算方式を実現する積和演算回路について説明する。上述のように、重みベクトルwを冪乗表現により量子化し、また並び替えを行った場合、重みベクトルwに対応する入力ベクトルxの並び替えも併せて行う必要がある。
 このため、情報処理装置10は、値の小さい順番に並び替えられた複数の重みベクトルwと対応する入力ベクトルxのアドレス情報を保持するテーブルを有する積和演算回路を備えてよい。
 図8は、ベース技術に係る情報処理装置10が備える積和演算回路200の回路ブロック図の一例である。図8に示すように、ベース技術に係る積和演算回路は、重みベクトルwと対応する入力ベクトルxのアドレス情報を保持するテーブルWTを保持する記憶回路と、RAM210、加算回路220、アキュムレータ230、αに係る乗算を行う第1の乗算回路240、および正規化定数に係る乗算を行う第2の乗算回路250を備える。
 (アドレステーブルWT)
 ベース技術に係るアドレステーブルWTは、値の小さい順番に並び替えられた複数の重みベクトルwと対応する入力ベクトルxのアドレス情報、符号情報、および乗算指示情報を保持する。なお、上記のアドレス情報は、図8に示すように、Null Pointerを含んでもよい。この場合、アキュムレータ230には0が加算されることとなり、アキュムレータ230の値を単純にα倍することが可能となる。また、上記の符号情報は、上述した数式(5)におけるSに対応する値を示す情報である。
 また、上記の乗算指示情報は、第1の乗算回路240による処理内容を指示する情報である。ベース技術に係る乗算指示情報は、例えば、乗算の要否を指定する情報を含んでよい。図8には、乗算指示情報が0である場合には、第1の乗算回路240は乗算を行わず、乗算指示情報が1である場合には、第1の乗算回路240はαを乗算する場合の一例が示されている。
 なお、ベース技術に係る乗算指示情報は、上記の例に限定されず、種々の処理内容を指定する情報を含んでよい。ベース技術に係る乗算指示情報は、例えば、乗算の回数やシフト演算を指定する情報などを含み得る。
 (RAM210)
 RAM210は、アドレステーブルWTから入力されたアドレス情報に基づいて重みベクトル成分wに対応する入力ベクトル成分xを加算回路220に出力する。
 (加算回路220)
 加算回路220は、RAM210から入力される入力ベクトル成分xと第1の乗算回路240から出力される値に基づいて加算を実行する。この際、加算回路220は、アドレステーブルWTが保持する符号情報に基づいて上記の加算を行う。
 (アキュムレータ230)
 アキュムレータ230は、加算回路220から出力される演算結果を累積する。アキュムレータ230は、累積した値を第1の乗算回路240および第2の乗算回路250に出力する。また、アキュムレータ230には、累積した値を0にリセットするためのリセット信号が適宜入力される。
 (第1の乗算回路240)
 第1の乗算回路240は、アキュムレータ230が累積する値に対し、αを乗算する。この際、第1の乗算回路240は、上述したように、アドレステーブルWTが保持する乗算指示情報に基づいて上記の乗算を実行する。第1の乗算回路240は、演算結果を加算回路220に出力する。
 (第2の乗算回路250)
 第2の乗算回路250は、アキュムレータ230から出力される値に対し、正規化定数Kを乗算する。
 以上、ベース技術に係る積和演算回路200の構成例について説明した。ベース技術に係る積和演算回路200によれば、内積演算における乗算回数を効果的に削減し、処理負担を軽減することが可能となる。
 一方、アドレステーブルWTは、入力ベクトルxのアドレス情報を保持することで容量が大きくなるため、消費電力が増加することも想定される。このため、アドレステーブルWTは、図9に示すように、アドレス間の相対位置を示すオフセットを含んでもよい。図9は、ベース技術に係るアドレステーブルWTが保持するアドレス情報に係るオフセット表記の一例である。
 図9に示すように、アドレステーブルWTは、上述した数式(5)においてnj-1-nの値が連続して0である区間、すなわち乗算が行われない区間のアドレスをアドレス順にソートし、当該アドレス間のオフセットをアドレス情報として保持してもよい。ベース技術に係る上記のアドレステーブルWTによれば、アドレス情報に係る情報量を大幅に削減し、消費電力を効果的に低減することが可能となる。
 なお、アドレステーブルWTは、図8および図9に示した形式以外にも種々の形態を取り得る。アドレステーブルWTは、例えば、符号情報と乗算指示情報とを明確に分離して保持しなくてもよいし、上記以外のアドレス圧縮方法を採用してもよい。アドレステーブルWTは、ニューラルネットワークの構成や情報処理装置10の性能などに応じて柔軟に変形され得る。
 1.5 学習時における量子化
 次に、ベース技術に係る学習時における重みベクトルwの量子化について説明する。ベース技術に係る情報処理方法において、学習時における重みベクトル成分wの更新については、下記の数式(6)により計算することが可能である。
Figure JPOXMLDOC01-appb-M000004
 但し、上記の数式(6)におけるwmaxは、wの最大値を示す。また、整数化intについては、切り上げ、または切り捨てのうちいずれか近い方を選んでもよい。ベース技術に係る情報処理方法では、最終学習時に、nを並び替えることで、上述したアドレステーブルWTを生成することができる。
 なお、1に近いαを設定した場合においては、通常の浮動小数点演算を用いたDNN(Deep Neural Network)による学習アルゴリズムを用いて演算を行い、学習終了後のwを量子化する手法を採択することも可能である。すなわち、重みベクトルwに係る量子化粒度が小さい場合には、ネットワーク構造を変形しなくても、認識精度が低下しない効果が期待される。
 1.6 ベース技術の効果
 次に、ベース技術に係る重みベクトルの量子化により奏される効果について詳細に説明する。上述したように、ベース技術に係る情報処理方法では、冪乗表現により量子化したwを値の小さい順番に並び替え正規化を行うことでwと定義する。この際、並び替えられた基底ベクトルをqとすると、重みベクトルwは、下記の数式(7)により表される。
Figure JPOXMLDOC01-appb-M000005
 すなわち、ベース技術に係る情報処理方法は、図10に示すように、q,q,...qj-1で張られる空間に投影された重みベクトルとqとにより形成される平面にベクトルを作成し、当該ベクトルをαnj-nj+1倍する処理を繰り返す、と意味を有する。図10は、ベース技術に係る情報処理方法の処理イメージを示す図である。
 このため、ベース技術に係る情報処理方法では、重みベクトルをq,q,...qj-1空間に投影した軸とqとで張られる平面において、重みベクトルの量子化粒度Δθは、図11に示すように、反時計回転および時計回転方向にそれぞれ下記の数式(8)および(9)により表すことができる。但し、この際、数式(8)および(9)におけるlは、数式(10)により定義される。図11は、ベース技術に係る量子化粒度Δθについて説明するための図である。なお、図11では、第1象限に射影された重みベクトルが示されている。
Figure JPOXMLDOC01-appb-M000006
 また、量子化粒度ΔθおよびΔθをlで微分して0とおいた場合、それぞれの最大値は、下記の数式(11)により定義される。
Figure JPOXMLDOC01-appb-M000007
 図12は、ベース技術に係るαに応じた量子化粒度Δθの最大値を示すグラフである。このように、ベース技術に係る情報処理方法によれば、N次元空間において、すべての直交する回転方向に量子化粒度が保証される。
 なお、冪乗演算を途中で停止した場合、図13に示すように、量子化粒度Δθが残されることとなる。図13は、ベース技術に係る最大冪乗数について説明するための図である。なお、図13では、第1象限に射影された重みベクトルが示されている。この際、量子化粒度Δθを保証する最大冪乗数は、下記の数式(12)を満たす最小なmに対し、下記の数式(13)を加算すればよい。従って、情報処理装置10が実行する乗算回数は、下記の数式(14)により求めることができる。
Figure JPOXMLDOC01-appb-M000008
 例えば、α=3/4である場合、入力数Nに対する乗算回数は、図14に示すグラフのように決定される。また、例えば、α=7/8である場合には、入力数Nに対する乗算回数は、図15に示すグラフのように決定される。すなわち、演算部120による内積演算において、乗算回数は、重みベクトルの底の値に基づいて定まるといえる。図14および図15は、ベース技術に係る入力数Nに対する乗算回数の例を示す図である。
 以上説明したように、ベース技術に情報処理方法を実現する情報処理装置によれば、ニューラルネットワークの順伝播に係る内積演算において、乗算回数を大幅に削減することができ、積和演算回路200による消費電力を効果的に低減することが可能となる。また、ベース技術に情報処理方法を実現する情報処理装置によれば、重みベクトルの量子化精度を向上させることができ、同一のビット数による従来の量子化手法と比較して、ニューラルネットワークによる認識精度および近似精度を向上させる効果が期待される。
 2.ベース技術の発展例
 2.1 概要
 次に、ベース技術の発展例について説明する。上記のベース技術では、重みベクトル成分wをαにより表現することで、高い近似精度を実現するとともに、内積演算における乗算回数をlogのオーダーで軽減する手法について述べた。
 しかし、ベース技術において例示した手法は、内積空間の次元数が比較的大きい場合に有効である一方、CNN(Convolutional Neural Network)のような比較的次元数の小さい内積演算については、処理負担の軽減効果が十分ではない場合も想定される。
 そこで、ベース技術の発展例(以下、単に発展例という)では、内積空間の次元数が比較的小さい場合であっても内積演算の処理負担を効果的に低減することが可能な演算回路を提案する。
 具体的には、重みベクトル成分wや入力ベクトル成分xをα-n/pと表現してよい。この際、α=2とすると、α-n/pが取り得る値は、下記の表1のように表すことができる。
Figure JPOXMLDOC01-appb-T000009
 上記の表1は、すなわち、pの値を大きいほど、量子化の粒度を小さくできることを示している。このため、発展例では、重みベクトル成分wや入力ベクトル成分xをα-n/pにより量子化することで、ベース技術と比べ量子化誤差を小さくすることが可能となる。また、発展例における演算手法によれば、ベース技術で述べた内積演算と同等の処理をシフト演算および加算のみで行うことが可能となり、内積演算における処理負担を効果的に低減することが可能となる。
 2.2 重みベクトルの量子化
 まず、重みベクトルwのみをα-n/pにより量子化する場合の手法について述べる。ここで、α=2、p∈{1,2,3,...}の自然数とし、下記の数式(15)により内積演算を行う場合を説明する。なお、pは本開示における除数に対応する。また、下記の数式(15)におけるwは、下記数式(16)により表すものとする。また、下記の数式(16)におけるsおよびnはそれぞれ、s∈{-1,1}、n∈{0,1,2,...}、とする。
Figure JPOXMLDOC01-appb-M000010
 この際、wを、すべてのwに対して、|w|≦1、となるように正規化を行い、必要に応じてのちにyに正規化乗数をかけるとすると、上記の数式(15)は、下記の数式(17)のように表すことができる。また、ここで、yを下記の数式(18)により定義する。
Figure JPOXMLDOC01-appb-M000011
 ここで、r∈{0,1,...,p-1}、δi,j=1 if i=j,otherwise 0、とすると、yは、負数を2の補数で表現した通常の固定小数点標記で表現可能となる。また、上記の数式(18)における
Figure JPOXMLDOC01-appb-M000012
は、負数を2の補数で表現した固定小数点標記されたx
Figure JPOXMLDOC01-appb-M000013
、すなわち、整数値化したint(n/p)分、符号付2進数として右シフトすることで計算可能である。すなわち、入力ベクトルxと重みベクトルwに係る内積演算は、下記の数式(19)として表すことができる。
Figure JPOXMLDOC01-appb-M000014
 この際、上記の数式(19)に示す内積演算は、例えば、図16に示す積和演算回路300により実現することが可能である。図16は、発展例に係る重みベクトルを量子化した場合における積和演算回路の一例である。
 図16を参照すると、積和演算回路300は、シフト演算器310、剰余演算器320、セレクタ330および340、アキュムレータ群350、加減算器360、乗算器群370、および加算器380を備える。
 (シフト演算器310)
 シフト演算器310は、入力される入力ベクトル成分xi、およびnに基づくシフト演算を行う。具体的には、シフト演算器310は、入力ベクトル成分xを、int(ni/p)の値分、右にビットシフトする。
 (剰余演算器320)
 剰余演算器320は、入力されるnに基づいて、n mod pの演算を行い、剰余の値をセレクタ330および340に入力する。
 (セレクタ330および340)
 セレクタ330および340は、剰余演算器320による演算結果に基づいて、アキュムレータ群350が含む複数のアキュムレータのうち、回路を繋ぐアキュムレータを選択する。この際、セレクタ330および340は、剰余の値にそれぞれ対応したアキュムレータと回路が接続されるよう動作する。例えば、剰余が0である場合、セレクタ330および340は、アキュムレータyと回路が繋がるよう動作し、剰余が1である場合、セレクタ330および340は、アキュムレータyと回路が繋がるよう動作する。
 (アキュムレータ群350)
 アキュムレータ群350は、n mod pの剰余の値にそれぞれ対応した複数のアキュムレータを備える。すなわち、アキュムレータ群350は、剰余の値ごとにyを保持する。
 (加減算器360)
 加減算器360は、入力されるs、シフト演算結果、およびyの値に基づく加減算を行う。この際、加減算器360には、上述のように、n mod pの剰余の値に基づいて選択されたアキュムレータが保持するyの値が入力される。また、加減算器360による演算結果に基づいて、上記選択されたアキュムレータのyが更新される。
 (乗算器群370)
 乗算器群370は、上述した処理により剰余ごとに更新されたyに対し、当該剰余に応じた加算乗数を乗算する。このために、乗算器群370は、n mod pの剰余ごとに対応した複数の乗算器を含む。例えば、乗算器群370は、アキュムレータ群350から入力されるyに対し1を乗算し、yに対しては2-1/pを乗算する。
 (加算器380)
 加算器380は、乗算器群370が剰余ごとに計算したyの値を加算し、最終的な演算結果yを出力する。
 以上、積和演算回路300について説明した。上述したように、積和演算回路300によれば、n mod pの剰余ごとに対応したアキュムレータにyをそれぞれ蓄積し最後にまとめて乗算を行うことで、乗算回数を最小限に抑えることが可能となる。なお、図16に示した一例では、iについて逐次計算を行いyを更新しているが、上記計算の一部または全部を並列して計算することも可能である。
 2.3 重みベクトルおよび入力ベクトル双方の量子化
 次に、重みベクトルwと入力ベクトルxの双方をα-n/pにより量子化する場合の手法について述べる。ここで、α=2、p∈{1,2,3,...}の自然数とし、内積演算を行う場合を説明する。ここで、入力ベクトル成分xおよび重みベクトル成分wは、それぞれ下記の数式(20)および(21)で表すものとする。また、下記の数式(20)および(21)において、sxi,swi∈{-1,1}、n,m∈{0,1,2,...}、とする。
Figure JPOXMLDOC01-appb-M000015
 ここで、入力ベクトルxおよび重みベクトルwをそれぞれ、|x|≦1、|w|≦1、となるように正規化しておき、必要に応じて後にyに正規化乗数をかけるとすると、内積演算は、下記の数式(22)により表すことができる。また、ここで、yを下記の数式(23)により定義する。
Figure JPOXMLDOC01-appb-M000016
 この際、r∈{0,1,...,p-1}、とおけば、yは、負数を2の補数で表現した通常の固定小数点標記で表現可能となる。なお、上記において、pは自然数であってよい旨を述べたが、pは、冪乗表現で表されてもよい。例えば、p=2、q∈{0,1,2,...}、とした場合、int((mi+ni)/p)および(mi+ni mod pの計算がビットの切り出しで可能となり除算が不要となるため計算が簡略される効果がある。
 この際、内積演算は、例えば、図17に示す積和演算回路400により実現することが可能である。図17は、発展例に係る重みベクトルおよび入力ベクトルの双方を量子化した場合における積和演算回路の一例である。
 図17を参照すると、積和演算回路400は、第1の加算器410、シフト演算器420、セレクタ430、XOR回路440、アキュムレータ群450、乗算器群460、および第2の加算器470を備える。
 (第1の加算器410)
 第1の加算器410は、入力されるmとnとを加算する。この際、mおよびnの加算結果は、図示するように、[bk-1,...,b,bq-1,...b]のビット配列として表すことができる。
 (シフト演算器420)
 シフト演算器420は、第1の加算器410による演算結果に基づいて、固定小数点で表現された1をint((m+n)/p)だけ右シフト演算する。この際、int((m+n)/p)の値は、第1の加算器410による演算結果である上記のビット配列のうち、[bk-1,...,b]に該当する上位ビットの値となる。このため、シフト演算器420は、当該上位ビットの値を用いてシフト演算を行ってよい。
 (セレクタ430)
 セレクタ430は、(m+n) mod pの剰余の値に基づいて、アキュムレータ群450が含む複数のアキュムレータおよび加減算器のうち、加減算を実行させる加減算器を選択し、Enable信号=1を入力する。この際、上記の剰余の値は、第1の加算器410による演算結果であるビット配列のうち、下位qビットに対応する[bq-1,...,b]に該当するため、上記と同様に演算を簡略化することが可能である。
 (XOR回路440)
 XOR回路440は、入力されるSxiおよびSwiに基づいて、1または0をアキュムレータ群450の各アキュムレータに入力する。具体的には、XOR回路440は、Swixi=-1となる場合に1を、Swixi=+1となる場合に0を各アキュムレータに入力する。
 (アキュムレータ群450)
 アキュムレータ群450は、(m+n) mod pの剰余の値にそれぞれ対応した複数のアキュムレータを備える。また、アキュムレータ群450は、当該アキュムレータと対応する複数の加減算器(1ビットのアップダウンカウンタ)を含んで構成される。
 ここで、上記の各加減算器は、図中右下に示すように、セレクタ430から入力されるEnable信号に基づいて、加減算の要否を判定する。具体的には、各加減算器は、入力されたEnable信号が1である場合にのみ、XOR回路440から入力されるU/Dの値に従い、対応するアキュムレータが保持する値Oに対し1ビットのみ加算または減算を行う。発展例に係るアキュムレータ群450によれば、上位ビットに対する1ビットの加減算でyの値を更新可能なことから、通常の加減算器が不要となり回路規模を小さくすることが可能となる。
 (乗算器群460)
 乗算器群460は、上述した処理により剰余ごとに更新されたyに対し、当該剰余に応じた値を乗算する。このために、乗算器群460は、(m+n) mod pの剰余ごとに対応した複数の乗算器を含む。例えば、乗算器群460は、アキュムレータ群450から入力されるyに対し1を乗算し、yに対しては2-1/pを乗算する。
 (第2の加算器470)
 第2の加算器470は、乗算器群460が剰余ごとに計算したyの値を加算し、最終的な演算結果yを出力する。
 以上、積和演算回路400について説明した。上述したように、発展例に係る積和演算回路400によれば、(m+n) mod pの剰余ごとに対応したアキュムレータにyをそれぞれ蓄積し最後にまとめて乗算を行うことで、乗算回数を最小限に抑えることが可能となる。なお、図17に示した一例では、iについて逐次計算を行いyを更新しているが、上記計算の一部または全部を並列して計算することも可能である。
 また、図17に示した積和演算回路400では、アキュムレータに対応する複数の加減算器(1ビットのアップダウンカウンタ)を並列して実装する場合の例を述べたが、発展例に係る積和演算回路400は、上記構成に代えて、図16に示した積和演算回路300のようにセレクタと単一の加減算器を備えてもよい。また、同様に、積和演算回路300に複数の加減算器を並列して実装することも可能である。発展例に係る積和演算回路の構成は、pの値に応じてより回路規模が小さくなるよう適宜設計され得る。
 また、図17に示した積和演算回路400では、(m+n)の下位qビットに基づいて、加減算器およびアキュムレータを選択する場合を述べた。一方、上記の数式(22)は、下記の数式(24)のように変形可能である。
Figure JPOXMLDOC01-appb-M000017
 このため、内積演算は、図18に示す積和演算回路500のように、単一の加減算器により実現することも可能である。図18は、発展例に係る重みベクトルおよび入力ベクトルの双方を量子化した場合における積和演算回路の一例である。
 図18を参照すると、積和演算回路500は、加算器510、セレクタ520、記憶回路群530、シフト演算器540、XOR回路550、加減算器560、およびアキュムレータ570を備える。
 (加算器510)
 加算器510は、入力されるmとnとを加算する。加算器510は、図17に示した第1の加算器410と同様の動作を行ってよい。
 (セレクタ520)
 セレクタ520は、下位qビットに対応する[bq-1,...,b]の値に基づいて、記憶回路群530が含む複数の記憶回路のうち回路を接続する記憶回路を選択する。
 (記憶回路群530)
 記憶回路群530は、(m+n) mod pの剰余の値にそれぞれ対応した複数の記憶回路を備える。各記憶回路には、剰余ごとに対応した加算乗数がそれぞれ格納される。なお、記憶回路群530が備える各記憶回路は、上記加算乗数を定数として保持する読み取り専用回路であってもよいし、書き換え可能なレジスタであってもよい。加算乗数を定数として読み取り専用回路に記憶させる場合、回路構成が簡略化されるとともに消費電力を低減できるメリットがある。
 (シフト演算器540)
 シフト演算器540は、接続された記憶回路が格納する加算乗数を[bk-1,...,b]に該当する上位ビットの値だけ右シフト演算を行う。
 (XOR回路550)
 XOR回路550は、入力されるSxiおよびSwiに基づいて、1または0を出力する。XOR回路550は、図17に示したXOR回路440と同様の動作を行ってよい。
 (加減算器560)
 加減算器560は、アキュムレータ570に保持されるyに対し、シフト演算器540による演算結果およびXOR回路550からの入力に基づく加算または減算を繰り返し実行する。
 (アキュムレータ570)
 アキュムレータ570は、内積演算の結果yを保持する。
 以上説明したように、発展例に係る積和演算回路500によれば、単一の加減算器560および単一のアキュムレータ570により、内積演算を実現することができ、より回路規模を小さくすることが可能となる。
 なお、上記の説明では、入力ベクトルxと重みベクトルwとで共通のpを用いる場合を例に述べたが、発展例に係る情報処理方法においては、入力ベクトルxと重みベクトルwで異なるpを用いることも可能である。この場合、入力ベクトルxおよび重みベクトルwは、それぞれ下記の数式(25)および(26)により表すことができる。
Figure JPOXMLDOC01-appb-M000018
 この際、pおよびpの最小公倍数をp、すなわち、ap=p、およびbp=p、とすれば、入力ベクトル成分xおよび重みベクトル成分wは、それぞれ下記の数式(27)および(28)により表される。
Figure JPOXMLDOC01-appb-M000019
 従って、m+nの演算をam+bnに置き換え、さらにpをpに置き換えることで、pが異なる場合であっても、上述の説明と同様に計算が可能となる。また、pおよびpを冪乗表現とする場合、amおよびbnは、それぞれシフト演算により求めることができる。
 続いて、発展例に係る入力ベクトルxの量子化方法について詳細に説明する。入力ベクトルxおよび重みベクトルwの双方を量子化する場合、重みベクトルwの量子化は事前に計算することが可能であるが、入力ベクトルxの量子化については、ランタイムで行う必要がある。このため、入力ベクトルxの量子化を小規模の演算回路で実現する手法が求められる。
 ここで、|x|≦1を、c=[ck-1,...,c]のビット配列とする。なお、cは、ck-1が1に対応する固定小数点標記である。
 この際、cのmsb(most significant bit:最上位ビット)から連続0のビット数をLとする。また、c=[ck-1,...,c]をLビット左シフトしたビット配列をdとし、当該ビット配列をmsbを0.5とする固定小数点として扱う。
 次に、下記の数式(29)を満たす最小のrをrminとする。なお、ここで、r∈{0,...,p-1}であるが、最小のrが見つからない場合においては、rmin=pとしてよい。ここで、mを下記の数式(30)により定義すれば、|x|は、下記の数式(31)として近似、すなわち量子化することが可能である。
Figure JPOXMLDOC01-appb-M000020
 なお、上記で述べた計算は、cのmsbから連続0のビット数をLをカウントする構成と、p回の固定値との比較を行う構成を備えることにより実現することが可能である。
 2.4 発展例の効果
 次に、発展例に係る重みベクトルwおよび入力ベクトルxの量子化により奏される効果について詳細に説明する。ここでは、重みベクトル成分wおよび入力ベクトル成分xを±2-n/pとして量子化を行う場合において、p=1、すなわちベース技術で説明した量子化手法を用いた場合と、p=2、すなわち発展例の量子化手法を用いた場合の認識率を比較した。
 具体的には、重みベクトルwおよび入力ベクトルxをfloatで学習した後、得られた係数をそれぞれのpの値で最近傍の量子化点に量子化し、再学習なしで推論を行った場合の画像認識率を比較する実験を実施した。
 なお、データセットには、CIFAR-10画像セット(10クラスの分類、学習データ=50000画像、テストデータ=10000画像)を採用した。
 また、ネットワークには、ResNet23をベースとした11層のResNetを用いた。図19は、発展例に係る比較実験に用いたResNetのネットワーク構造を示す図である。図19では、図中右側に各層に入力される入力サイズが、図中左にカーネルサイズがそれぞれ示されている。また、図19に示すように、作成したネットワークは、Max Pooling層を含まないResBlock、およびMax Pooling層を含むResBlockの両方を含んでいる。図20および図21は、Max Pooling層を含まないResBlock、およびMax Pooling層を含むResBlockのネットワーク構成をそれぞれ示す図である。
 続いて、実験に用いた重みベクトルwおよび入力ベクトルxの量子化手法について詳細に説明する。
 まず、p=1により量子化を行った場合のデータについて説明する。ここでは、重みベクトルwの量子化において、n=-3~12の32値(16値×2±)を用いた。この際、量子化された重みベクトル成分w=±(2-n)の取り得る値は、下記の表2に示すとおりである。
Figure JPOXMLDOC01-appb-T000021
 また、入力ベクトルxの量子化においては、Reluブロックへの入力前において、n=-4~3の16値(8値×2±)、n=-4~11の32値(16値×2±)、n=-4~27の64値(32値×2±)、の異なる3つの量子化を行った。この際、量子化された入力ベクトル成分x=±(2-n)の取り得る値は、下記の表3~表5に示すとおりである。
Figure JPOXMLDOC01-appb-T000022
Figure JPOXMLDOC01-appb-T000023
Figure JPOXMLDOC01-appb-T000024
 次に、p=2、すなわち発展例に係る手法を用いて量子化を行った場合のデータについて説明する。ここでは、重みベクトルwの量子化において、n=-6~9の32値(16値×2±)を用いた。この際、量子化された重みベクトル成分w=±(2-n/2)の取り得る値は、下記の表6に示すとおりである。
Figure JPOXMLDOC01-appb-T000025
 また、入力ベクトルxの量子化においては、Reluブロックへの入力前において、n=-8~-1の16値(8値×2±)、n=-8~7の32値(16値×2±)、n=-8~23の64値(32値×2±)、の異なる3つの量子化を行った。この際、量子化された入力ベクトル成分x=±(2-n/2)の取り得る値は、下記の表7~表9に示すとおりである。
Figure JPOXMLDOC01-appb-T000026
Figure JPOXMLDOC01-appb-T000027
Figure JPOXMLDOC01-appb-T000028
 以上説明した量子化により、再学習なしで推論を行った場合の画像認識率の比較結果を図22に示す。図22では、縦軸に認識精度が、横軸に入力ベクトルxの量子化数(N値)がそれぞれ示されている。また、図22では、量子化前の認識精度が線分Cにより、p=1により量子化を行った場合の認識精度が線分P1により、p=2により量子化を行った場合の認識精度が線分P2により、それぞれ示されている。
 ここで、線分P1および線分P2を比較すると、入力ベクトルxの量子化数を32値や64値とした場合、p=2で量子化を行う方が、p=1で量子化を行うよりも認識精度が著しく向上することがわかる。また、線分P2と線分Cを比較しても、認識精度に大きな劣化は観察されないことがわかる。これは、すなわち入力ベクトルxの量子化数が十分である場合、発展例に係る量子化手法を採用することで、再学習を行わない場合であっても、認識精度を高く維持することが可能であることを示している。
 このように、発展例に係る量子化手法によれば、内積演算における処理負担を効果的に軽減するとともに学習器の性能を高く維持することが可能となる。
 3.まとめ
 以上説明したように、ベース技術及びその発展例に係る情報処理装置は、複数の入力値と、当該入力値にそれぞれ対応する、冪乗表現により量子化された複数の重み係数とに基づいて、積和演算を実行する積和演算回路を備える。量子化された重み係数の指数は、予め定められた除数pを分母に有する分数により表現される。また、積和演算回路は、除数pから定まる剰余に基づいて、異なる加算乗数を用いた積和演算を行う。係る構成によれば、内積演算に係る処理負担をより軽減すると共に、重み係数の量子化粒度を保証することが可能となる。
 4.第1の実施形態
 つづいて、本開示の第1の実施形態について、以下に図面を参照して詳細に説明する。なお、以降の説明では、ベース技術とその発展例とを含めて、単にベース技術と称する。
 4.1 ベース技術の課題
 ベース技術に係るに係る重みベクトルおよび入力ベクトルの双方を量子化した場合における積和演算回路の一例(図18に相当)を、図23に再掲する。図23に示すように、ベース技術は、積和演算をテーブル引きにより実現する方法を例示している。具体的には、量子化の粒度を示すpによってエントリ数と値が決まるテーブル(記憶回路群530)を備え、このテーブルを用いてDNN/CNNの推論処理を指向した積和演算を行っている。
 そこで以下の実施形態では、2のp乗根の冪乗からなる値テーブル以外のテーブルを例示しつつ、複数のテーブルを切り替える構成を例示することで、記憶回路群530が書換可能なレジスタであることによるメリットをより明確に示す。
 4.2 値テーブルの例
 上述したように、ベース技術は、ディープニューラルネット(DNN)、畳み込みニューラルネット(CNN)の積和演算量削減を目的として、新たな量子化手法を提案している。一般に、情報理論における量子化はアナログ量を離散値で近似表現することを指すが、ここでの量子化は、本来持つ値が表現されていた精度をより少ないビット量で表現することと定義される。例えば、もともと32bitの浮動小数点数で表されていた値を、10bitや8bitの浮動小数点数や固定小数点数に値を切り詰めること、より極端には、2bitや1bitにまで値を切り詰めることを、量子化と称する。
 ベース技術では、DNN/CNN推論時の係数や変数を量子化することで、係数や変数を表現する数値の語長を短くしている。これにより、パラメータの格納にかかるメモリ容量の削減、積和演算時の演算量・演算エネルギーの低減等を達成することができる。
 そこで、ベース技術では、変数をx、定数をwとして、以下の式(32)(上述した式(20)及び式(21)に相当)に示すような量子化を実行していた。
Figure JPOXMLDOC01-appb-M000029
 ここで、xは入力ベクトルxのi番目の要素、wは係数ベクトルwのi番目の要素、sは当該要素の正負符号を表し、mは入力ベクトルxのi番目要素を量子化した際のインデックス(シンボル)、nは係数ベクトルwのi番目要素を量子化した際のインデックス(シンボル)、pは量子化の粒度を示す。
 ベース技術では、図23に示したように、量子化の粒度を示すpをパラメータとし、これによってエントリ数と値が決まるテーブル(記憶回路群530)を用いてDNN/CNNの推論処理を指向した積和演算を行っている。具体的には、2の冪乗(正確には2のp乗根の冪乗)の関数空間に沿ったp個の値をテーブル値として保持し、変数や係数が持つ正負符号やダイナミックレンジに応じたスケーリングを行いつつ累積加算することで、2の冪乗方式による積和演算を実現している。なお、ベース技術では、テーブル値として、以下の式(33)が例示されている。
Figure JPOXMLDOC01-appb-M000030
 式(33)のテーブル値をグラフにプロットすると、インデックスとテーブル値の関係は、図24に示される関係のようになる。
 ここで、テーブルの値として別のものを考える。例えば、テーブルの値として、2の冪乗の関数空間に沿った値ではなく、線形の関数空間に沿った値を適用する。その場合、以下の式(34)に示すような量子化が行われる。
Figure JPOXMLDOC01-appb-M000031
 式(34)において、各記号は、式(32)に示した2の冪乗表現のときと同じく、xは入力ベクトルxのi番目の要素、wは係数ベクトルwのi番目の要素、sは当該要素の正負符号を表し、mは入力ベクトルxのi番目要素を量子化した際のインデックス(シンボル)、nは係数ベクトルwのi番目要素を量子化した際のインデックス(シンボル)、pは量子化の粒度を示している。
 本実施形態では、ベース技術の2の冪乗表現でのテーブルと定義域と値域を合わせた上で、線形の関数空間に沿ったp個の値をテーブル値とする。この値を用いて、変数や係数が持つ正負符号やダイナミックレンジに応じたスケーリングを行いつつ累積加算することで、線形方式による積和演算の実現が可能になる。この場合の回路構成は、図23に例示した積和演算回路と同様の構成であってよい。ただし、記憶回路群530内のテーブル値は、以下の式(35)で表される値となる。
Figure JPOXMLDOC01-appb-M000032
 なお、式(35)は、以下の式(36)のように簡略化して表すことができる。
Figure JPOXMLDOC01-appb-M000033
 式(35)又は式(36)に示すテーブル値をグラフにプロットすると、インデックスとテーブル値の関係は、図25に示される関係のようになる。
 ここまで、線形表現という形で表記してきたが、後述する第3の実施形態において例示する表記方法を採用することで、符号部と指数部(exponent)と仮数部(mantissa)を持つ浮動小数点数表現に対しても適用することができる。
 図26は、2の冪乗表現におけるテーブル値と線形表現におけるテーブル値とを同一のグラフにプロットした図である。図26に示すように、線形の表現に対して、2の冪乗表現のテーブル値は下に凸の形状となっている。
 このようにテーブル値を変更することで容易に別の特性の積和演算回路を実現することができる。
 さらに別のテーブルの例としては、線形表現の値を軸として2の冪乗表現を上に凸に変換したものが考えられる。
 その他にも、基盤となる関数空間を変えることで、CNN/DNNのタスクに適する様々なテーブルを作成することが可能である。ただし、積和演算回路としての特性上、この定義域区間で単調減少であることが求められる。
 なお、ベース技術でも説明したように、記憶回路群530が備える各記憶回路は、上記加算乗数を定数として保持する読み取り専用回路であってもよいし、書き換え可能なレジスタであってもよい。
 4.3 積和演算回路の具体例
 つづいて、第1の実施形態に係る積和演算回路の具体例について、幾つか例を挙げて説明する。
 4.3.1 第1の具体例
 図27は、第1の具体例に係る積和演算回路の概略構成例を示す回路図である。図27に示すように、第1の具体例に係る積和演算回路は、図23に例示した積和演算回路と同様に、整数加算器(単に加算器ともいう)510、セレクタ520、記憶回路群530、シフト演算器540、XOR回路550、加減算器560、およびアキュムレータ570を備える。
 (整数加算器510)
 整数加算器510は、入力されるmとnとを加算する。この際、mおよびnの加算結果は、図示するように、[bk-1,...,b,bq-1,...,b]のビット配列として表すことができる。
 (セレクタ520)
 セレクタ520は、下位qビットに対応する[bq-1,...,b]の値に基づいて、記憶回路群530が含む複数の記憶回路のうち回路を接続する記憶回路を選択する。
 (記憶回路群530)
 記憶回路群530は、(m+n) mod pの剰余の値にそれぞれ対応した複数の記憶回路を備える。各記憶回路には、剰余ごとに対応した加算乗数が2を基数とする指数部をもつ浮動小数点表現の正規化数でそれぞれ格納される。ここで、記憶回路群530に格納される上記加減乗数は0.5より大きく1.0以下の範囲となるため、指数部として1ビット以上の語長を持つことで正規化数にて表現可能である。なお、記憶回路群530が備える各記憶回路は、上記加算乗数を定数として保持する読み取り専用回路であってもよいし、書き換え可能なレジスタであってもよい。加算乗数を定数として読み取り専用回路に記憶させる場合、回路構成が簡略化されるとともに消費電力を低減できるメリットがある。
 (シフト演算器540)
 本実施形態に係るシフト演算器540は、接続された記憶回路が格納する加算乗数を[bk-1,...,b]に該当する上位ビットの値だけ右シフト演算を行う。
 (XOR回路550)
 XOR回路550は、入力されるSxiおよびSwiに基づいて、1または0を出力する。
 (加減算器560)
 加減算器560は、アキュムレータ570に保持されるyに対し、シフト演算器540からの入力を、XOR回路550からの入力に基づいて加算または減算を繰り返し実行する。XOR回路550からの入力が0であれば加算、1であれば減算を行う。
 (アキュムレータ570)
 アキュムレータ570は、積和演算の結果yを保持する。
 また、第1の具体例に係る積和演算回路は、上記構成に加え、複数の異なるテーブルを保持するメモリ1530と、メモリ1530内のテーブル値を選択的に記憶回路群530の各記憶回路(レジスタ又はメモリ)に書き込むセレクタ1531とをさらに備える。
 (メモリ1530)
 メモリ1530は、例えば、上述した2の冪乗表現のテーブル1530aと、線形表現のテーブル1530bとを保持する。
 (セレクタ1531)
 セレクタ1531は、上位の制御部等から入力された書込みテーブル制御値に従い、メモリ1530からテーブル1530a又は1530bを読み出し、この読み出したテーブル1530a/1530bを記憶回路群530の各記憶回路に書き込む。
 以上のような構成を備えることで、基盤となる関数空間を切り替えることが可能となるため、CNN/DNNのタスクに応じて適切なテーブルを用いて積和演算を実行することが可能となる。
 4.3.2 第2の具体例
 図28は、第2の具体例に係る積和演算回路の概略構成例を示す回路図である。図28に示すように、第2の具体例に係る積和演算回路は、図23に例示した積和演算回路と同様の構成において、記憶回路群530が、それぞれ複数の異なるテーブルを保持する複数(本例では2つ)の記憶回路群530A及び530Bに置き換えられるとともに、記憶回路群530A又は530Bとセレクタ520との接続を選択的に切り替えるセレクタ1532とをさらに備える。
 記憶回路群530Aは、例えば、図23と同様に、上述した2の冪乗表現のテーブルの値を格納する複数の記憶回路よりなる。一方、記憶回路群530Bは、例えば、上述した線形表現のテーブルの値を格納する複数の記憶回路よりなる。
 セレクタ1532は、上位の制御部等から入力されたテーブル切替信号に従い、記憶回路群530A/530Bとセレクタ520との接続を切り替える。
 以上のような構成を備えることで、第1の具体例と同様に、基盤となる関数空間を切り替えることが可能となるため、CNN/DNNのタスクに応じて適切なテーブルを用いて積和演算を実行することが可能となる。
 4.4 作用・効果
 以上のように、本実施形態によれば、テーブル(記憶回路群530)の加算定数として適当なものを選択することで、積和演算回路2100における演算回路部分の構成を変更することなく、2の冪乗表現ではない、例えば線形な浮動小数点数を選択することが可能となる。
 それにより、2の冪乗表現や線形表現等に限定されず、DNN/CNNの処理タスクに応じたテーブル値を選択することが可能となる。
 一般には、DNN/CNNのための演算回路系を実装する際には、さまざまな処理タスクに対応させるため、float32、float16、短語長floatなど、さらにベース技術の2の冪乗表現による積和回路も含めて、複数の積和回路を具備したプロセッサエレメントを多数並べることになる。これに対し、本実施形態によれば、テーブルを切り替えるだけで2の冪乗表現による積和回路と短語長floatで全く同じ回路を流用できるため、全体として大幅な回路削減を達成することが可能となる。
 その他の構成、動作及び効果は、上述したベース技術と同様であってよいため、ここでは詳細な説明を省略する。
 5.第2の実施形態
 つづいて、第2の実施形態について、図面を参照して詳細に説明する。
 5.1 ベース技術の課題
 ベース技術では、式(29)を満たす最小のrを見つける必要があるが、実装では最適なrの探索にあたって値比較のために2のp乗根の冪乗にさらに2の2p乗根を乗じた値を準備する必要がある。そのため、既存のテーブル(記憶回路群530)を値探索に流用する場合には都度、2の2p乗根を乗じる演算が必要になり、計算コストが著しく高くなってしまう。あるいは、予め2の2p乗根を乗じたテーブルを使用する場合には、ベース技術を実現するシステムにおいて積和演算用のテーブルと量子化丸めのためのテーブルとの2つのテーブルを実装しておく必要があり、管理上、煩雑になり易いという課題がある。
 そこで本実施形態では、管理上の煩雑化を抑制しつつ、計算コストの低減を可能にする量子化回路及び方法について、例を挙げて説明する。
 5.2 量子化回路の具体例
 ベース技術では、入力ベクトルや各層(あるいは特徴マップ)での積和演算結果が、ランタイムで2の冪乗表現に量子化され、後段処理に送られたり、メモリに格納されたりする必要があった。DNNやCNNの係数は値が途中で変わることがないので、予め2の冪乗表現に変換しておいて利用することが可能であるが、推論計算のなかで現れた数値については2の冪乗表現に変換する必要が生じる。この処理は、一般的に、ランタイム量子化と称される。本実施形態では、この量子化器の丸めについて、より発展させた形態を説明する。
 量子化器の丸めは情報量削減を狙った量子化であるので、量子化器への入力よりも出力のほうが情報量が少なくなる。具体的には、入力のある幅を持った数値が、ひとつの値で代表される。すなわち、ある範囲の数値がひとつの代表値に丸められるということになる。図29は、量子化器の丸めの一例を示す図である。図29に示すように、量子化器にある範囲RAに含まれる値が入力されると、その値はAに丸められ、シンボルm-1が割り当てられる。一方、範囲RBに含まれる値が入力されると、その値はBに丸められ、シンボルmが割り当てられる。
 ベース技術における入力ベクトルxのランタイム量子化では、上述した式(29)を満たす最小のrを見つける必要があるが、実装では最適なrの探索にあたって2のp乗根の冪乗にさらに2の2p乗根を乗じた値を準備する必要がある。これは、式(37)(式(29)と同じ)における実線で囲まれた部分に相当する。
Figure JPOXMLDOC01-appb-M000034
 これは、2の冪乗表現の表現関数に沿った0.5丸めを意味し、図29における中間点Bの値を算出していることになる。上の式(37)において実線で囲まれた項目を除いたものをrの値に応じて並べると、第1の実施形態において例示した積和演算のための値テーブル(式(33)参照)と同じものとなる。
 これは、図30に示すように、ベース技術で説明したテーブル(記憶回路群530)をランタイム量子化時の値探索に流用することができることを意味している。なお、図30は、比較例としてのニューラルネットワーク回路の概略構成例を示すブロック図である。
 図30に示すように、比較例としてのニューラルネットワーク回路は、冪表現変換部2001と、乗算部2002と、変数バッファ2003と、係数メモリ2004と、演算結果バッファ2005と、積和演算回路2100とを備える。積和演算回路2100は、積和演算部2101と、冪表現変換部2102と、冪乗表現テーブル2103と、乗算部2104とを含む。
 (乗算部2002)
 乗算部2002は、冪乗表現テーブル2103から読み出されたテーブル値に以下の式(38)に示す乗算を実行することで、2の冪乗表現の表現関数に沿った0.5丸めを実行し、得られた値を冪表現変換部2001に入力する。
Figure JPOXMLDOC01-appb-M000035
 (冪表現変換部2001)
 冪表現変換部2001は、入力された値を、乗算部2002から入力された値を用いて2の冪乗表現に変換する。変換により得られた値は、変数バッファ2003に格納される。したがって、変数バッファ2003には、2の冪乗表現の変数が格納されることとなる。
 (積和演算部2101)
 積和演算部2101は、変数バッファ2003に格納されている冪乗表現の変数と、係数メモリ2004に格納されている冪乗表現の係数とをから、積和演算を実行する。その際、積和演算部2101は、冪乗表現テーブル2103に格納されているテーブル値を用いて、積和演算を実行する。冪乗表現テーブル2103に格納されているテーブルは、上述において式(33)に示された値テーブルである。
 (乗算部2104)
 乗算部2104は、冪乗表現テーブル2103から読み出されたテーブル値に上述の式(38)に示す乗算を実行することで、2の冪乗表現の表現関数に沿った0.5丸めを実行し、得られた値を冪表現変換部2001に入力する。
 (冪表現変換部2102)
 冪表現変換部2102は、積和演算部2101から入力された値を、乗算部2104から入力された値を用いて2の冪乗表現に変換する。変換により得られた値は、演算結果バッファ2005に格納される。したがって、演算結果バッファ2005には、2の冪乗表現の変数が格納されることとなる。
 このように、積和演算回路2100中に存在する2の冪乗表現テーブル2103(パラメータp)に2の2p乗根を乗じることで、ランタイム量子化器としての冪表現変換部2001及び2102を実現することができる。
 ただし、以上のような構成では、ランタイム量子化の都度乗算が生じるために、計算コストが著しく高い。そこで、図31に示すように、冪乗表現テーブル2103内のテーブル値に式(38)に示す定数を乗じたテーブル(冪表現変換用テーブル2202及び2204)を予め用意しておくことも考えられる。
 また、ランタイム量子化は、DNN/CNNのための外部からの入力データの量子化、また積和後の丸めを含む量子化で行われる。これらは同じ処理である。そのため、図32に示すように、冪表現変換部2001及び2102で冪表現変換用テーブル2204を共用して時分割で使用することで、システム全体のテーブル保持量を削減することができる。
 ところで、冪表現変換用テーブル2202、2204は、量子化の粒度を決めるパラメータpである2の冪乗表現テーブルに2の2p乗根を乗じたものである。すなわち、冪乗表現テーブル2103から冪表現変換用テーブル2202、2204を導出するための変換式(38)を式変形すると、以下の式(39)のようになる。
Figure JPOXMLDOC01-appb-M000036
 これは、パラメータ2pである2の冪乗表現テーブルの奇数部分サブセットを意味する。そのため、以下の式(40)で表される偶数部分サブセットのテーブルとを連結して、すなわち、冪乗表現テーブル2103と冪表現変換用テーブル2202/2204とをまとめて、1つのテーブルとして扱うことができる。
Figure JPOXMLDOC01-appb-M000037
 図33は、偶数部分サブセットと奇数部分サブセットをまとめて1つのテーブルとした場合を示す図である。図33に示すように、偶数部分サブセットと奇数部分サブセットを含む冪乗表現テーブル2203は、積和演算部2101と冪表現変換部2001及び2102とで共用される。積和演算部2101と冪表現変換部2001及び2102とのそれぞれに入力されるテーブル値は、例えば、シンボルインデックスのアドレスの偶奇に従って振り分けることができる。
 このように、2つのテーブルを1つのテーブルとしてまとめることで、例えば、定数として読取り専用回路に記憶させる場合には、論理圧縮に伴って回路構成を大幅に簡略化することが可能になるとともに、消費電力を低減できるというメリットを得ることができる。
 5.3 作用・効果
 以上のように、本実施形態によれば、ランタイム量子化を行う際に、積和演算のための2の冪乗表現テーブルを流用し、ランタイム量子化の比較用の値を生成することができる。
 この際、ベース技術では乗算が頻回に発生していたが、予め用意したテーブルを装備することで、都度の乗算を廃してランタイム量子化時の演算コストを大幅に下げることが可能となる。
 さらに、2の冪乗表現テーブルと比較値用テーブルを一体化させることで、管理するべきテーブルを1つにまとめることが可能となる。それにより、回路規模の削減や消費電力の低減が可能となる。
 その他の構成、動作及び効果は、上述したベース技術又は実施形態と同様であってよいため、ここでは詳細な説明を省略する。
 6.第3の実施形態
 次に、第3の実施形態について、以下に図面を参照して詳細に説明する。
 6.1 ベース技術の課題
 上述したベース技術では、内積演算に係る処理負担をより軽減すると共に、重み係数の量子化粒度を保証することが可能な、新規かつ改良された情報処理装置および情報処理方法が提案されている。
 しかし、ベース技術の手法では、内部の数値表現として固定小数点表現を使用する必要があり、長い語長が必要であるため規模の増加や消費電力の増大を招く。
 例えば、固定小数点表現以外の数値表現を用いたとすると、シフト演算は2の冪乗倍の演算であるので、一般的にはy=x*2^nとなる。それにより、冪乗演算器と乗算器が必要になり、規模の増大を招く。ここで、*は乗算の、^は冪乗の演算子とする。
 また、ベース技術では、入力ベクトルの量子化についても、固定小数点表現からの量子化のみが示されており、他の数値表現から低コストで量子化を行う手段が示されていなかった。
 ベース技術の手法を用いると、必要な固定小数点表現の語長は一例として以下のようになる。なお、以下の説明では、入力ベクトル成分xおよび重みベクトル成分wは、それぞれ上述した式(32)で表されるものとする。また、式(32)において、sxi,swi∈{-1,1}であって、n,m∈{0,1,2,...}であるとする。
 また、量子化された入力値の指数に係る分子をm、分母の予め定められた除数をpとし、量子化された重み係数の指数に係る分子をn、分母の予め定められた除数をpとする。
 上述において図23を用いて説明したベース技術に係る積和演算回路は、単一の加減算器560および単一のアキュムレータ570によって、より小さい回路規模での内積演算を実現している。ここで、例えば、p=16、m及びnの語長をそれぞれ8ビットとすると、シフト演算器540の最大シフト量は32ビットとなる。そして、例えば有効数字を6桁とすると、記憶回路群530に格納する加減乗数の語長は20ビットであるため、シフト演算器540の出力語長は52ビットとなる。アキュムレータ570の語長は何回加算を行うかに依存するため、例えば加算回数を最大255回とすると、シフト演算器540の出力語長に8ビットを加えた60ビットとなる。
 一方で、浮動小数点による数の表現方法としては、IEEE754標準によるものが知られている。本標準によれば、2または10を基数とする有限数を符号、仮数、指数の3つの整数で表現する。本標準の特徴として、2を基数とする二進浮動小数点形式においては、正規化された仮数の最上位ビットは必ず1となるため、これを省略して表現する。また、指数は、0または非正規化数の場合は0、正規化数の場合は指数に予め定められた固定値を加算したバイアス表現としている。これらの表現方式は、任意の語長の指数部、仮数部に容易に拡張し得る。以下、IEEE754規格と同様に、仮数部の正規化数の最上位ビットを省略し、指数部を、0または非正規化数の場合は0、正規化数の場合はバイアス表現を採用した浮動小数点表記をIEEE754準拠と呼ぶものとする。
 そこで本実施形態では、回路規模の縮小と消費電力の低減とを可能にする積和演算回路及びその方法について、例を挙げて説明する。以下の実施形態によれば、より短い語長、言い換えると、より少ない回路規模、消費電力でベース技術と同定の効果を奏することも可能である。
 6.2 積和演算回路の具体例
 図34は、第3の実施形態に係る積和演算回路の概略構成例を示す回路図である。図34に示すように、第3の実施形態に係る積和演算回路は、整数加算器510、セレクタ520、記憶回路群530、2の冪乗倍演算器3540、XOR回路550、浮動小数点加減算器3560、およびアキュムレータ570を備える。
 図34に示す構成において、整数加算器510、セレクタ520、記憶回路群530、XOR回路550及びアキュムレータ570は、第1の実施形態において図27を用いて説明した構成と同様であってよい。
 (2の冪乗倍演算器3540)
 2の冪乗倍演算器3540は、図27におけるシフト演算器540に相当する。したがって、2の冪乗倍演算器3540が実行する演算は、固定小数点表現におけるシフト演算に相当する。
 2の冪乗倍演算器3540は、接続された記憶回路が格納する加算乗数を、[bk-1,...,b]に該当する上位ビットの値Sに対して、-Sを指数とする2の冪乗倍、すなわちD*2^-Sの演算を行う。ここで、p=2^qとして、また、2の冪乗倍演算器3540において入力Dの浮動小数点表現の指数部の語長を、前記記憶回路での指数部の語長に加えて、-Sの最小値の指数が表現可能なサイズに拡張、すなわち-(1+2^(bw(m)-q)+2^(bw(n)-q))の指数が表現可能なサイズに拡張すれば、本演算は浮動小数点表現の指数部に対する整数減算器のみで実装でき、演算結果が非正規化数となることはない。ここで、bw(m)、bw(n)はそれぞれm、nの語長を表す値とする。
 (浮動小数点加減算器3560)
 浮動小数点加減算器3560は、加減算器560と同様に、アキュムレータ570に保持されるyに対し、2の冪乗倍演算器3540からの入力を、XOR回路550からの入力に基づいて加算または減算を繰り返し実行する。XOR回路550からの入力が0であれば加算、1であれば減算を行う。
 例として、記憶回路群530の格納値、2の冪乗倍演算器3540、浮動小数点加減算器3560及びアキュムレータ570に、それぞれIEEE754準拠の浮動小数点表現を用いたとして、p=16、m、nの語長をそれぞれ8ビットとすると、Sの最大値は32ビットであり、2の冪乗倍演算器3540における浮動小数点の指数部は7ビットあればよく(バイアスは63であるので2^63~2^-62の範囲が正規化数で表現可能)、また、記憶回路群530に格納する加減乗数の語長は、例えば有効数字を6桁とすると仮数部19ビット、指数部1ビットでよく、浮動小数点加減算器3560とアキュムレータ570の語長は例えば加算回数を最大255回とすると、Sの最大値から決まる指数部の語長から、さらに拡張することなく、仮数部19ビット、指数部7ビットとなる。
 6.3 量子化方法への展開
 以上のように、本実施形態によれば、積和演算の結果として浮動小数点表現の値が出力されるため、これを低コストで再量子化できることも望まれる。基数2の浮動小数点表現からの量子化は、以下のように行うことができる。
 まず、浮動小数点表現xを絶対値が1.0以下になるように正規化しておく。この正規化は、ベース技術と同様であってよい。
 次に、量子化値の指数に係る分子をm、分母の予め定められた除数をpとし、mの語長をbw(m)、p=2^qとすると、入力|x|<=1の浮動小数点として少なくとも2^(-2^(bw(m)-q))を正規化数として表現可能な指数部の語長を持つ浮動小数点表現を用いる。これにより、以下のように量子化を行うことができる。
 x≠0かつ指数が-2^(bw(m)-q)以上の条件を満たす場合
  L=-指数(基数2の指数)
  d=仮数(MSBを0.5の桁とした固定小数点表記として扱う)
 として、ベース技術と同様に、d≧2^-((r+1/2)/p)を満たす最小のrであるrminを求め、m=p(L-1)+rminとして量子化を実行する。本条件に合致する入力は、正規化数の浮動小数点数に限定されるため、基数2の浮動小数点表現を用いればベース技術で必要であった、「cのmsbから連続0のビット数Lをカウントする構成」を省略することができる。
 一方、上記条件を満たさない場合、すなわち、x=0または指数が-2^(bw(m)-q)未満(非正規化数含む)の場合は、0を表す量子化符号に置き換える。指数が-2^(bw(m)-q)未満の値は、量子化値にて表現可能な最小値より小さい値であるため、0として扱うことが可能である。
 例えば、量子化後のmの語長を8ビット、q=4とすると、入力の浮動小数点は-2^(8-4)=-16までの指数が正規化数として表現できればよいので、IEEE754に準拠した浮動小数点表現を用いれば、指数部は6ビットあればよい。すなわち、バイアスは31で2^31~2^-30の範囲が正規化数で表現可能であればよい。
 また、例えば、入力をIEEE754準拠の浮動小数点表現、言い換えると、指数部expはバイアス表現、仮数部fracはMSBの1を省略した表現とすれば、x≠0かつ指数が-2^(bw(m)-q)以上のxに対しては、以下のように計算することができる。
 L-1=(Ebias-1)-exp(ここでEbiasは指数部のバイアス値である)
 d={1,frac}(ここで{,}はビット連接の演算子である)
 6.4 量子化回路の具体例
 つづいて、以上に述べた量子化方法を実現する量子化回路について説明する。図35は、第3の実施形態に係る量子化回路の概略構成例を示す回路図である。
 図35に示すように、本実施形態に係る量子化回路は、整数減算器3210、シフト演算器3220、記憶回路群3230、比較器群3240、プライオリティエンコーダ3250、整数加算器3260、比較器3270、およびセレクタ3280を備える。
 (整数減算器3210)
 整数減算器3210は、入力されたIEEE754準拠の浮動小数点表現の指数部expを用いて(L-1)=(Ebias-1)-expの計算を行う。
 (シフト演算器3220)
 シフト演算器3220は、整数減算器3210で計算した(L-1)の値にpを乗じてp(L-1)を計算する。ここで、p=2^qであるから、本乗算はqビットの左シフト演算で実現できる。
 (記憶回路群3230)
 記憶回路群3230は、2^-((r+1/2)/p)、r∈{0,...,p-1}に対応したp個の記憶回路を備える。
 記憶回路群3230が備える各記憶回路は、値を定数として保持する読み取り専用回路であってもよいし、書き換え可能なレジスタであってもよい。定数として読み取り専用回路に記憶させる場合、後述の比較器群3240及びプライオリティエンコーダ3250とあわせて回路構成が簡略化されるとともに、消費電力を低減できるメリットがある。
 (比較器群3240)
 比較器群3240は、前記記憶回路群から出力されるp個の値と、入力の浮動小数点表現の仮数部から生成したd={1,frac}とを比較し、dの方が等しいか大きい場合に1を、そうでない場合に0を出力する。
 (プライオリティエンコーダ3250)
 プライオリティエンコーダ3250は、p個の入力のうち1が入力される位置に応じた値を0からp-1の範囲で出力する。複数の1の入力がある場合は若い番号の位置を優先する。いずれの入力も0であった場合はpを出力するものとする。表10に、プライオリティエンコーダ3250の動作を真理値表で表す。
Figure JPOXMLDOC01-appb-T000038
 本プライオリティエンコーダの出力をrminとすれば、記憶回路群3230、比較器群3240、プライオリティエンコーダ3250により、d≧2^-((r+1/2)/p)となる最小のrであるrminが求められる。また、最小のrが見つからない場合は、rmin=pとなる。
 (整数加算器3260)
 整数加算器3260は、シフト演算器3220から入力されるp(L-1)値と、プライオリティエンコーダ3250から入力されるrminとを加算し、p(L-1)+rminを得る。
 (比較器3270)
 比較器3270は、入力されたIEEE754準拠の浮動小数点表現の指数部expと、Ebias-2^(bw(m)-q)とを比較し、expとEbias-2^(bw(m)-q)とが等しいかexpの方が大きい場合には1を、そうでない場合には0を出力する。これにより、x≠0かつ指数が-2^(bw(m)-q)以上であることの判定を行う。入力をIEEE754準拠の浮動小数点表現とすることで、入力が0か否かの判断も含めて指数部expの比較だけで判断可能となる。
 (セレクタ3280)
 セレクタ3280は、比較器3270の出力に基づいて、整数加算器3260から出力されるp(L-1)+rmin、または、0を表す符号をmとして出力する。
 6.5 作用・効果
 以上のように、本実施形態によれば、より短い語長、言い換えると、より少ない回路規模、消費電力でベース技術と同等の効果を得ることができる。
 また、本実施形態に係る演算器を複数搭載する場合、同一リソース(回路規模、電力)でより多くの演算器を搭載できることになり、同一リソースあたりの演算性能を向上させることも可能となる。
 その他の構成、動作及び効果は、上述したベース技術又は実施形態と同様であってよいため、ここでは詳細な説明を省略する。
 6.6 変形例
 また、上述した第3の実施形態に係る構成は、以下のように変形することも可能である。
 6.6.1 第1の変形例
 積和演算回路の記憶回路群3230に格納される値の範囲が0.5より大きく1.0以下の範囲に限られることから、D*2^-Sの指数は、0または負の値となる。そのため、IEEE754準拠の指数部バイアスを採用した場合、指数部のMSBは、0の値に固定されるため、省略することができる。例えば、p=16(q=4)、m、nの語長を8ビットとすると、D*2^-Sの指数の範囲は2^0から2^-33となるため、指数部7ビット(バイアスは63)の下位6ビットのみを使用する。すなわち、2^0から2^-62の範囲が表現可能となる。その場合、後段の浮動小数点加減算器3560へは省略したMSBを拡張して渡せばよい。
 6.6.2 第2の変形例
 また、積和演算回路の記憶回路群3230に格納される値の範囲が0.5より大きく1.0以下の範囲に限られることから、指数部の範囲はアキュムレータ570の加算回数で正の最大値が決まり、Sの最大値で負の最大値が決まる。これらは対称でないことがあるので整数加算器510およびアキュムレータ570での指数部のバイアスを2^(指数部の語長-1)-1からずらした値にするとことで、指数部のビットを削減することができる。例えば、p=16(q=4)、m、nの語長を8ビット、有効数字を6桁、アキュムレータ加算回数を最大255回とすると、指数の範囲は2^-33から2^7であるため、例えばバイアスを42とすれば、指数部を6ビットとすることができる。この例では、2^-41から2^20を表現することができる。
 6.6.3 第3の変形例
 さらに、積和演算回路の指数部の負の最大値をSの最大値に比べて小さくしてもよい。その場合、指数部が減算の結果表現可能な範囲を超える場合に対しては、仮数部の右シフトで対応することで、非正規化数に対応することができる。このような構成によれば、比較器やシフト回路を追加する必要が生じるが、指数部のビット長を削減することが可能となる。
 6.6.4 第4の変形例
 さらにまた、積和演算回路の指数部の負の最大値をSの最大値に比べて小さくした場合、指数部が減算の結果表現可能な範囲を超える場合には、指数部をゼロにしてもよい。これによる精度の劣化が無視できるようであれば、指数部のビット長を削減することが可能である。
 6.6.5 第5の変形例
 さらにまた、積和演算回路のD*2^-Sの計算を浮動小数点演算器(乗算器と冪乗演算器)で実現してもよい。
 6.6.6 第6の変形例
 さらにまた、上述した第3の実施形態に係る回路構成(積和演算回路及び/又は量子化回路)は、その一部又は全部がプログラムによって実装されてもよい。
 7.第4の実施形態
 次に、第4の実施形態について、以下に図面を参照して詳細に説明する。
 7.1 ベース技術の課題
 上述したように、ベース技術では、ディープニューラルネット(DNN)、畳み込みニューラルネット(CNN)の積和演算量削減を目的として、新たな量子化手法が提案されている。
 図36は、一般的なDNN、CNNの動作を説明するための概略図である。なお、図36には、3層の畳み込みニューラルネットワークが示されている。
 図36に示すように、一般的なDNN、CNNの動作では、層ごとに、積和による畳み込み等演算(Convolution)、プーリング(Pooling)、活性化関数励起(Activation)といった処理を順次行っている。この際に、各層の演算で用いられる係数や層の出力に現れる変数に関して、その値範囲や分布が層ごとに異なるという状況がある。また、このような特徴は、層ごとに限られず、特徴マップごとにこの分布が異なるという特徴として現れる場合もある。
 各層の入出力変数と畳み込みに使われる係数の例を図37~図43に示す。図37は、図36における第1層の畳み込み層に入力される係数w1を示し、図38は、図36における第2層の畳み込み層に入力される係数w2を示し、図39は、図36における第1層の畳み込み層に入力される係数w3を示している。また、図40は、図36における畳み込みニューラルネットワークの入力(変数)x0を示し、図41は、図36における第1層からの出力(変数)x1を示し、図42は、図36における第2層からの出力(変数)x2を示し、図43は、図36における第3層からの出力(変数)x3を示している。
 図37~図43から分かるように、係数・変数ともに各層ごとに値の範囲が異なる。具体的には、係数に関しては、図37~図39に示されるように、w1は値の範囲がおよそ-5から4までに分布し、w2はおよそ-0.15から0.15に分布し、w3はおよそ-0.4から0.5に分布している。一方、変数に関しては、図40~図43に示されるように、x0がおよそ-1から1まで分布し、x1はおよそ0から90、x2はおよそ0から120に分布し、x3はおよそ0から20に分布している。
 上述の理由からいたずらに表現ビット数を削るのではなく、DNN/CNN推論タスク結果に影響を与えない程度に層ごと(あるいは特徴マップごと)に、必要十分な量子化(=ビット量削減)設定を行うべきであると言える。その場合、ベース技術は次のような課題があると考えられる。
・数値フォーマットと実データの管理について考慮されていない。
・量子化設定(精度設定、ダイナミックレンジ設定)の区別に関する表現が考慮されていない。このため、各層(あるいは各特徴マップ)ごとに異なる量子化設定することができない。
・正負符号あり数値表現と正負符号なし数値表現が区別されていない。
・すべての数値が正負符号ありで数値表現されており、特定の層(あるいは特徴マップ)(例えば図41~図43のx1、x2、x3)変数を指定しようとしたときに使用する符号に無駄が生じている。
・値0(ゼロ)の表現が考慮されていない。このため、図41~図43に現れる数値0(ゼロ)を表現できない。
 そこで本実施形態では、上記課題を解決することを目的として、2の冪乗表現による数値表現ができる数値フォーマット情報とコンテナを提案する。さらに、本実施形態では、複数量子化設定を保持・切り分け可能なバイトストリームフォーマットについても提案する。
 7.2 数値フォーマット情報の具体例
 まず、数値フォーマット情報について、具体例を挙げて説明する。
 7.2.1 s.e.mフォーマット
 語長を柔軟に選択可能な2の冪乗表現による数値表現(Numeric Data)を、正負の浮動小数点表現にエンコードする必要がある。正負符号あり数値表現と正負符号なし数値表現を区別するために、正負符号の有無に対する設定を指定できる必要がある。また、量子化設定の区別するために、精度に関する設定とダイナミックレンジに関する設定を独立に指定できる必要がある。
 そこで本実施形態では、以下の3要素のセットをs.e.mフォーマットとして定義する。
・Sign Information
 s.e.mフォーマットの‘s’は、正負符号の有無に対する割当ビット数を示す。
・Exponent Bit Width
 s.e.mフォーマットの‘e’は、ダイナミックレンジに対する割当ビット数を示す。
・Mantissa Bit Width
 s.e.mフォーマットの‘m’は、精度に関する割当ビット数を示す。
 実際に(s.e.m)=(1.4.3)、(すなわち、符号1bit、ダイナミックレンジ4bit、精度3bit)を割り当てた2の冪乗での例を図44の数表に示す。なお、mに関して、2の値がベース技術のp値に相当している。
 さらに、数値表現としてゼロが扱えるよう、値0(ゼロ)の表現を考慮する必要がある。そこで本実施形態では、eとmが全ビット1のときを値ゼロと定義した。この場所を値0と定義することで、単調減少性(同一正負符号内で、{e、m}を結合したビット列からなるインデックスの値が増えると、表現される数値が減少する)を確保することができる。
 なお、この数値表現の最大値(絶対値の最大値)は1.0であり、そのときのeとmは全ビットが0である。
 s.e.mフォーマットにおいては、それぞれのビット割当数の合計s+e+mが、データ語長(Numeric Data Bit Width)を示している。
 7.2.2 s.B.Qフォーマット
 上述したs.e.mフォーマットでは、数値の語長を確認し領域より取り出すためにs.e.mの値を合算しなければならず、そのため、演算装置にフォーマットが切り替わる度に計算が必要となる。そこで本実施形態では、s.e.mフォーマットとは別に、数値フォーマット情報自体に語長情報を入れ込み、追加計算無しで切り分けられるようにs.e.mフォーマットを発展させたs.B.Qフォーマットを定義する。なお、s.B.Qフォーマットが示す数値の扱いはs.e.mフォーマットと完全に等価である。以下にs.B.Qフォーマットの要素を示す。
・Sign Information
 s.B.Qフォーマットの‘s’は、正負符号の有無に対する割当ビット数を示す。これは、s.e.mフォーマットのs(Sign Information)と同義である。
・Numeric Data Bit Width
 s.B.Qフォーマットの‘B’は、Numeric Dataの語長を示す。s.e.mフォーマットのe(Exponent Bit Width)は、e=Numeric Data Bit Width-s-Qで導出できる。
・Q
 s.B.Qフォーマットの‘Q’は、精度に関する割り当てビット数を示す。これは、s.e.mフォーマットのm(Mantissa Bit Width)と同義である。
 7.3 実データの管理手法:コンテナと数値フォーマット情報の関係
 本実施形態では、s.e.mフォーマットとs.B.Qフォーマットを数値フォーマット情報(Numeric Format Information)と称する。実際のデータを格納するコンテナ(Numeric Data Container)は、図45のように表現される。
 7.4 バイトストリーム
 s.e.mやs.B.Qのフォーマットにて示された複数の数値を利用するためには、それぞれの数値に対応する数値フォーマット情報が明確でなければならない。単一種であれば、数値が連続していても語長が変わらず切り出し可能だが、複数種となると変化点を把握し、各数値フォーマット情報を確認した後に語長が判明してから始めて切り分けが可能となる。すべての数値に数値フォーマット情報を付与すれば語長の判別はその都度可能だが、量子化で圧縮されたデータが肥大化してしまう。
 そこで本実施形態では、連続した数値フォーマット情報と数値の対応付けをすべてに付与せずとも、一定コストで切り分け可能な状態で表現可能な以下3種のバイトストリームを提案する。なお、後述において例示するバイトストリームの構造は単なる例であり、種々変形することが可能である。
・基本構造と継続構造のパケットによるバイトストリーム
・拡張構造のパケットによるバイトストリーム
・カスタム拡張構造のパケットヘッダによるPayload可変長ストリーム
 7.4.1 基本構造(Basic Structure)と継続構造(Continue Structure)のパケットによるバイトストリーム
 バイトストリームの先頭は必ず一定バイトサイズ単位にアラインされた基本構造(Basic Structure)で始まる。この一定サイズのデータをパケットと称する。パケットのヘッダ部分(以下、パケットヘッダと称する)は、以下の要素を含む。
・継続判断識別子(Continue)
 継続判断識別子(Continue)は、一つ前に指定された数値フォーマット情報を再利用するか否かを示す識別子である。
・数値フォーマット情報(Numeric Format Information)
 数値フォーマット情報(Numeric Format Information)は、s.e.mフォーマットとs.B.Qフォーマットとのいずれの数値フォーマット情報であるかを示す情報である。
・数値データ個数(Number)
 数値データ個数(Number)は、Payloadに格納する数値データの個数を示す。
・ペイロード領域(Payload)
 ペイロード領域(Payload)は、数値データを格納する領域を示す。このペイロード領域(Payload)は、他識別子次第でアラインされたバイトサイズ内に存在しないことを許容する。
・数値データ(Numeric Data)
 数値データ(Numeric Data)は、s.e.mフォーマットやs.B.Qフォーマットで指定された数値の本体である。この数値データ(Numeric Data)は、Payload内部に格納され、未利用領域はPaddingにて埋められる。なお、Paddingにて埋められる領域は、パケットヘッダの直後の領域に限定されない。例えば、数値データ(Numeric Data)をパケットヘッダの直後に連続させ、余った領域をPaddingにて埋めてもよい。これは、後述において例示するバイトストリームにおいても同様である。
・ヘッダスキップ識別子(Skip Header)
 ヘッダスキップ識別子(Skip Header)は、次アラインデータをヘッダ無しのPayloadとして扱うか否かを判別するための識別子である。
・カスタム識別子(Custom)
 カスタム識別子(Custom)は、パケットヘッダをカスタム形式として扱うか否かを示す識別子である。このカスタム識別子(Custom)が有効な値として確認された際には、その値に応じてパケットの解釈方法が切り替えられる。
 図46及び図47は、基本構造(Basic Structure)が実現し得る2つの基本的な構造例を示す図である。具体的には、図46は、継続判断識別子が「継続せず」とされている基本構造(Basic Structure)を示し、図47は、継続判断識別子が「継続する」とされている継続構造(Continue Structure)を示している。
 図46に示すように、基本構造(Basic Structure)では、継続判断識別子が「継続せず」とされ、ヘッダスキップ識別子が「スキップしない」と示されていた場合、数値フォーマット情報で指定された数値が数値データ個数で示された分だけ残されたペイロード領域(Payload)に格納される。このパケット自体に格納可能な数値データの数は少ないが、以降の連続数値として同一フォーマットを保持する際には継続構造のパケットヘッダが有用となる。
 図47に示すように、継続判断識別子が「継続する」とされた継続構造(Continue Structure)のパケットヘッダでは、数値データの個数を入れるだけで以降のアライメントまではPayloadに数値データを格納し続けることができる。
 フォーマットを切り替える際には、継続判断識別子を「継続せず」と指定し基本構造のパケットを入れることで別のフォーマットへと切り替えることが可能である。これにより、一定バイトサイズ単位で処理することで、数値データを切り分けることが可能となる。
 以上のような構造により、複雑なバイトストリームのパース処理やアライメントサイズ以上の一時保持領域を確保せず、すべての数値に数値フォーマット情報を付与せずとも、対応付けが可能となる。
 7.4.2 拡張構造のパケットによるバイトストリーム(Extended Structure)
 拡張構造(Extended Structure)のパケットによるバイトストリームでは、基本構造のパケットヘッダにて継続判断識別子が「継続せず」とし、ヘッダスキップ識別子が「スキップする」と指定された場合は、以下の2つの要素を拡張情報として扱い、次のアライメント単位のバイトサイズまでのパケット全体をペイロード領域(Payload)として扱う。
・Payload繰返し数(Payload Recursive Number)
 Payload繰返し数(Payload Recursive Number)は、次のアライメント単位をPayloadとして使う際に、アライメント単位のPayloadが何回繰り返すかを示す。ここで指定した数のアライメント単位のバイトサイズ以降に再度、パケットヘッダを含むパケットを記述するため、この箇所でフォーマットの切り替え可能となる。
・Reserved領域(Reserved)
 Reserved領域(Reserved)は、予備領域である。
 このような拡張構造(Extended Structure)のパケットとPayloadのみとしてアライメントされたパケットの構造を、図48及び図49に例示する。図48は、拡張構造(Extended Structure)のパケットの構造を示し、図49は、Payloadのみとしてアライメントされたパケットの構造を示している。図49に示すような、Payloadのみでヘッダ無しのパケットは、Payload全体のバイトサイズが数値データの語長で割り切れる場合や、継続構造では余剰領域を多く残してしまう場合等に有用である。
 以上のような構造を利用することで、基本構造(Basic Structure)と同様に、複雑なバイトストリームのパース処理やアライメントサイズ以上の一時保持領域を確保せず、すべての数値に数値フォーマット情報を付与せずとも、数値データの保持が可能となる。
 7.4.3 カスタム拡張構造のパケットヘッダによるPayload可変長ストリーム(Custom Structure)
 カスタム拡張構造(Custom Structure)のパケットヘッダによるPayload可変長ストリームでは、拡張構造のパケットヘッダと同様に、継続判断識別子が「継続せず」とし、ヘッダスキップ識別子が「スキップする」と指定され、さらにカスタム識別子が「有効」と指定された場合は、基本構造で規定したパケットヘッダの一部を読み替えることを許容し、以下3種の位置と意味のみが基本構造のパケットヘッダと同等に扱われる。
・継続判断識別子(Continue)
・ヘッダスキップ識別子(Skip Header)
・カスタム識別子(Custom)
 また、カスタム拡張構造(Custom Structure)では、上記以外に以下の情報が追加となる。
・バージョン番号(Version)
 バージョン番号(Version)は、数値で示され、カスタム拡張構造(Custom Structure)の種類を示す。数値0は、Payloadサイズ拡張として以下4要素の情報を保持する。
・Payloadサイズ(Payload Size)
 Payloadサイズ(Payload Size)は、パケットヘッダ以降に続くPayloadのサイズを示す。カスタム拡張構造(Custom Structure)では、これまでの構造で示されたパケットヘッダのバイトサイズと同一サイズで無いことを許容する。
・数値フォーマット情報(Numeric Format Information)
 数値フォーマット情報(Numeric Format Information)は、基本構造(Basic Structure)における数値フォーマット情報(Numeric Format Information)と同等であってよい。
・数値データ個数(Number)
 数値データ個数(Number)は、基本構造(Basic Structure)における数値データ個数(Number)と同等であってよい。
・Payloadの繰り返し数(Payload Recursive Number)
 Payloadの繰り返し数(Payload Recursive Number)は、拡張構造(Extended Structure)におけるPayloadの繰り返し数(Payload Recursive Number)と同じであってよい。
 このカスタム拡張構造(Custom Structure)のヘッダとPayloadの例を図50及び図51に例示する。図50は、カスタム拡張構造(Custom Structure)のヘッダの例を示し、図51は、カスタム拡張構造(Custom Structure)のPayloadの例を示している。
 カスタム拡張構造(Custom Structure)では、上述した基本構造(Basic Structure)や拡張構造(Extended Structure)とは異なり、バイトストリームのパース処理が複雑化し、Payloadの切り分け前に必要な一時保持領域をPayloadサイズで示したサイズまで増やす必要があるが、拡張構造以上にPayloadに数値を詰めて保持可能となる。
 このカスタム拡張構造(Custom Structure)は、発展例としてVersion番号を変えて利用することでPayload部分に数値以外の情報を格納できる余地を残しており、バイトストリーム上に数値演算手法のような付加情報も埋め込むことが可能となる。
 7.5 バイトストリームの実装例
 つづいて、上述において例示した3種のバイトストリームの具体的な実装例を、以下に図面を参照して詳細に説明する。なお、以下の説明では、s.B.Qフォーマットでの実装例を示す。
 7.5.1 基本構造(Basic Structure)及び継続構造(Continue Structure)のバイトストリーム実装例
 図52及び図53は、基本構造(Basic Structure)のバイトストリーム実装例を示す図である。図52は、基本構造(Basic Structure)のパケットを示し、図53は、継続構造(Continue Structure)のパケットを示している。
 図52に示すように、基本構造(Basic Structure)のパケットは、例えば、左端のMSB(Most Significant Bit)から順に、1ビットの継続判断識別子(図中、‘Continue’と表記)と、2ビットの数値データ個数(図中、‘Number’と表記)と、1ビットのヘッダスキップ識別子(図中、‘SkipHeader’と表記)と、1ビットのカスタム識別子(図中、‘Custom’と表記)と、1ビットのs(Sign Information)(図中、‘sign’と表記)と、4ビットのB(Numeric Data Bit Width)(図中、‘B’と表記)と、3ビットのQ(図中、‘Q’と表記)と、19ビットのペイロード領域(Payload)(図中、‘Payload’と表記)とから構成される。
 1ビットの継続判断識別子(Continue)は、例えば、その値が‘1’である場合、当該パケットに新たなフォーマットヘッダが含まれていることを示し、‘0’である場合、前回のパケットのフォーマットヘッダを使用することを示している。
 2ビットの数値データ個数(Number)は、例えば、その値が‘01’である場合、当該パケットのペイロード領域(Payload)に1つの数値データが格納されていることを示し、‘10’である場合、2つの数値データが格納されていることを示し、‘11’である場合、3つの数値データが格納されていることを示している。なお、‘00’である場合、当該パケットに数値データが格納されていないことを示す。
 1ビットのヘッダスキップ識別子(Skip Header)は、例えば、その値が‘1’である場合、次アラインデータをヘッダ無しのペイロード領域(Payload)として扱うことを示し、‘0’である場合、次アラインデータを継続しない新たなパケットとして扱うことを示す。
 1ビットのカスタム識別子(Custom)は、例えば、その値が‘0’である場合、当該パケットを通常形式のパケットとして扱うことを示し、‘1’である場合、カスタム形式のパケットとして扱うことを示す。すなわち、カスタム識別子(Custom)が‘1’である場合、当該パケットの解釈方法が切り替えられる。
 一方、図53に示すように、継続構造(Continue Structure)のパケットは、左端のMSBから順に、1ビットの継続判断識別子(図中、‘Continue’と表記)と、2ビットの数値データ個数(図中、‘Number’と表記)と、29ビットのペイロード領域(Payload)(図中、‘Payload’と表記)とから構成される。
 継続判断識別子(Continue)と数値データ個数(Number)とペイロード領域(Payload)とは、それぞれ図53を用いて説明したものと同様であってよい。
 7.5.2 拡張構造(Extended Structure)のバイトストリーム実装例
 図54及び図55は、拡張構造(Extended Structure)のバイトストリーム実装例を示す図である。図54は、拡張構造(Extended Structure)のパケットを示し、図55は、継続するペイロード領域(Payload)のみのパケットを示している。
 図54に示すように、拡張構造(Extended Structure)のパケットは、例えば、図52に示す基本構造(Basic Structure)のパケットと同様の構造において、19ビットのペイロード領域(Payload)が、11ビットのReserved領域(図中、‘Reserved’と表記)と、8ビットのPayload繰返し数(図中、‘Payload Recursive Number’と表記)とに置き換えられている。Reserved領域(Reserved)は、使用しない場合、例えばゼロパディングにより埋められてもよい。
 一方、図55に示すように、ペイロード領域(Payload)のみのパケットは、例えば、32ビットのペイロード領域(図中、‘Payload’と表記)から構成されている。
 7.5.3 カスタム構造(Custom Structure)のバイトストリーム実装例
 図56及び図57は、カスタム構造(Custom Structure)のバイトストリーム実装例を示す図である。図56は、カスタム構造(Custom Structure)のパケットを示し、図57の(a)~(c)は、継続するペイロード領域(Payload)のみのパケットを示している。
 図56に示すように、カスタム構造(Custom Structure)のパケットは、例えば、図52に示す基本構造(Basic Structure)のパケットと同様の構造において、数値データ個数(図中、‘Number’と表記)がs.B.Qフォーマット部の次に移動され、代わりに、継続判断識別子(Continue)とヘッダスキップ識別子(SkipHeader)との間に、バージョン番号(図中、‘Version’と表記)が配置され、さらに、カスタム識別子(Custom)とs.B.Qフォーマット部との間に、ペイロードサイズ(図中、‘PayloadSize’と表記)が追加された構造を備える。また、19ビットのペイロード領域(Payload)が、上述した6ビットの数値データ個数(‘Number’)と、8ビットのPayload繰返し数(図中、‘Payload Recursive Number’と表記)とに置き換えられている。
 一方、図57に示すように、カスタム構造(Custom Structure)のパケットに対しては、そのペイロードサイズ(Payload Size)で指定されたサイズ分だけ、ペイロード領域(Payload)のみのパケットが継続する。これにより、カスタム拡張構造のパケットヘッダによるペイロード可変長ストリームが構成される。
 その他の構成、動作及び効果は、上述したベース技術又は実施形態と同様であってよいため、ここでは詳細な説明を省略する。
 7.6 バイトストリームの処理システムの構成例
 図58は、本実施形態に係るバイトストリームを処理するシステムの概略構成例を示すブロック図である。なお、図面中、実線矢印は、基本構造(Basic Structure)及び継続構造(Continue Structure)と、拡張構造(Extended Structure)と、カスタム構造(Custom Structure)におけるデータフロー及び制御命令フローを示し、破線矢印は、カスタム構造(Custom Structure)で拡張して扱える拡張例でのデータフロー及び制御命令フローを示している。また、一点破線矢印は、システム外部からの指示や命令を示し、二点破線矢印は、カスタム構造(Custom Structure)で拡張して扱える拡張例でのシステム外部からの指示や命令を示している。
 図58に示すように、処理システム4000は、冪表現変換部4003と、格納・変換部4004と、入力特徴マップメモリ4005と、係数メモリ4006と、解析部4007と、抽出部4008と、冪表現変換部4009と、演算制御部4010と、演算器アレイ4011と、冪表現変換部4013と、格納・変換部4014と、出力特徴マップメモリ4015とを備える。
 (冪表現変換部4003)
 冪表現変換部4003は、例えば、上述した実施形態における冪表現変換部2001及び2102に対応する構成であり、センサI/F4001を介して入力された値を、乗算部2002/2104等から入力された係数4002を用いて2の冪乗表現に変換する。なお、センサI/F4001には、例えば、イメージセンサやToF(Time of Flight)センサ等の他、マイクロフォンや、気圧、温度、湿度、風速等の気象情報を計測する各種センサなど、数値データに変換可能な計測値を取得する種々のセンサが適用され得る。
 (格納・変換部4004)
 格納・変換部4004は、値のコンテナへの格納やバイトストリームへの変換を実行する構成である。格納・変換部4004は、上位装置から入力された演算制御命令や格納・変換方法の指示に従い、センサI/F4001や冪表現変換部4003から入力された数値表現や演算制御命令を格納したバイトストリームを構築する。なお、構築されるバイトストリームには、上述した基本構造(Basic Structure)及び継続構造(Continue Structure)、拡張構造(Extended Structure)、並びに、カスタム構造(Custom Structure)のバイトストリームが挙げられる。また、演算制御命令には、例えば、後述する演算器アレイ4011の積和演算回路4012が使用する値テーブルの指定等が含まれてもよい。
 (入力特徴マップメモリ4005)
 入力特徴マップメモリ4005は、上述した実施形態における変数バッファ2003に対応する構成であり、格納・変換部4004が構築したバイトストリームを格納する。したがって、入力特徴マップメモリ4005には、2の冪乗表現の変数が格納されることとなる。
 (係数メモリ4006)
 係数メモリ4006は、上述した実施形態における係数メモリ2004に対応する構成であり、格納・変換部4004から入力された2の冪乗表現の係数を格納する。
 (解析部4007)
 解析部4007は、入力特徴マップメモリ4005から読み出したバイトストリームをパース(解析)し、ペイロード領域(Payload)とそれ以外の情報とを分離する。
 (抽出部4008)
 抽出部4008は、コンテナ内実データの組み合わせを抽出する。具体的には、コンテナからs.e.mフォーマットやs.B.Qフォーマットなどの数値フォーマット情報と、コンテナ内部の数値表現(Numeric Data)とを抽出する。
 また、抽出部4008は、カスタム構造(Custom Structure)のバイトストリームにおいて所定のバージョン番号(Version)が指定されている場合、バイトストリームから冪表現以外の数値や制御命令を抽出する。例えば、抽出部4008は、数値演算手法(演算制御命令)や、数値の種類(浮動小数点の種類等)や、数値の実データ等を抽出する。
 (冪表現変換部4009)
 冪表現変換部4009は、上述した実施形態における冪表現変換部2001及び2102に対応する構成であり、抽出部4008から入力されたその他の数値表現の数値を冪表現の数値に変換する。
 (演算制御部4010)
 演算制御部4010は、所定のバージョン番号(Version)のカスタム構造(Custom Structure)のバイトストリームに埋め込まれた演算制御命令に基づいて、演算器アレイ4011へ制御命令を出力する。
 (演算器アレイ4011)
 演算器アレイ4011は、例えば、上述した実施形態における積和演算回路4012を含む構成であり、入力された冪表現の数値やその他の数値表現の数値等に対して所定の演算処理を実行する。
 (冪表現変換部4013)
 冪表現変換部4013は、上述した実施形態における冪表現変換部2001及び2102に対応する構成であり、演算器アレイ4011から入力された冪表現の数値を変換する。
 (格納・変換部4014)
 格納・変換部4014は、格納・変換部4004と同様に、値のコンテナへの格納やバイトストリームの変換を実行する構成であり、上位装置から入力された演算制御命令や格納・変換方法の指示に従い、冪表現変換部4013や演算器アレイ4011から入力された数値表現や演算制御命令を格納したバイトストリームを構築する。なお、構築されるバイトストリームには、上述した基本構造(Basic Structure)及び継続構造(Continue Structure)、拡張構造(Extended Structure)、並びに、カスタム構造(Custom Structure)のバイトストリームが挙げられる。
 (出力特徴マップメモリ4015)
 出力特徴マップメモリ4015は、上述した実施形態における演算結果バッファ2005に対応する構成であり、格納・変換部4014が構築したバイトストリームを格納する。なお、出力特徴マップメモリ4015に格納された出力特徴マップは、入力特徴マップとして、解析部4007に再投入され得る。
 なお、図58に示す各部は、その一部又は全部をハードウェア又はソフトウェアで実現することができる。また、図58に示す構成において、各部の出力は、適宜バッファリングされてもよい。
 7.7 作用・効果
 以上のように、本実施形態によれば、コンテナと数値フォーマット情報により、CNN/DNNへの適用において、層ごと及び/又はマップごとに、異なる数値表現設定を採用することが可能となる。
 例えば、DNN/CNNを指向した2の冪乗表現に対する正負符号、精度、ダイナミックレンジ等を独立に設定可能な数値表現を採用することが可能となる。
 また、ある単位(層やマップ等)毎に異なる数値表現設定単位のコンテナと数値フォーマット情報の組み合わせを採用することが可能となる。
 さらに、数値表現のフォーマットに語長情報を組み込むことで、語長取得の計算を省略することが可能となるため、演算コストを削減することが可能となる。
 さらにまた、バイトストリームフォーマットを利用することで、DNNの層及び/又はマップごとよりもさらに細かい単位で、異なる数値表現設定を採用することが可能になる。例えば、ライン単位やピクセル単位などのより細かい単位で効率的に数値表現設定を切り替えるバイトストリームフォーマットを実現することが可能となる。
 その他の構成、動作及び効果は、上述したベース技術又は実施形態と同様であってよいため、ここでは詳細な説明を省略する。
 8.通信技術への応用例
 次に、本開示に係る量子化手法の他分野への応用について説明する。上記の説明では、本開示に係る量子化手法をニューラルネットワークの順伝播に係る内積演算に適用する場合について述べた。一方、本開示に係る量子化手法は、上記の例に限定されず、内積演算を行う種々の技術に応用することが可能である。
 例えば、本開示に係る量子化手法は、通信技術分野で用いられるバンドパスフィルタにおける畳み込み演算に適用されてもよい。以下、本開示に係る量子化手法をバンドパスフィルタに適用した際のシミュレーション結果について説明する。
 図59は、本開示に係る量子化手法をバンドパスフィルタに適用した際の周波数特性(ゲイン特性)に係るシミュレーション結果を示す図である。ここでは、RRC(Root-Raised Cosine)フィルタにおける係数(63 tap, rolloff 0.5)の量子化を行った。
 なお、量子化には、p=2,3,4でそれぞれ32値(0~31)を用いた。図中においては、DNN(p,32)として示されている。また、比較として、浮動小数点(Float)、整数(Linear)を用いた場合のシミュレーション結果が共に示されている。
 ここで、図59を参照すると、本開示に係る量子化手法を適用した場合でも、バンドパス内の平坦特性は劣化していないことがわかる。一方、サイドバンドに着目すると、DNN(2,32)の場合であっても、約-25dBの減衰が可能となっており、またpを大きくするほど、減衰の効果が大きくなることがわかる。なお、量子化の影響は、例えば、LPF(Low Pass Filter)との組み合わせによりさらに軽減するものと予想される。
 また、図60は、本開示に係る量子化手法をバンドパスフィルタに適用した際の位相特性に係るシミュレーション結果を示す図である。図60を参照すると、本開示に係る量子化手法を適用した場合であっても、パスバンド内における位相の回転、すなわち位相特性の劣化は確認されないことがわかる。このように、本開示に係る量子化手法は、バンドパスフィルタの周波数特性を大きく劣化させることがないため、通信技術分野においても十分に適用可能だといえる。
 また、本開示に係る量子化手法の影響をさらに調査するため、BER(Bit Error Rate)による評価を実施した。図61は、本開示に係るBER評価に利用したブロック図である。
 図61に示すように、本評価では、復調前におけるADC(Analog to Digital Converter)およびRRCフィルタにおいて、浮動小数点、整数、DNN(p,32)を適用し、BERを測定した。また、変調および復調の方式には、BPSK、QPSK、および16QAMをそれぞれ用いた。
 図62は、BPSKを変調方式に用いた際のBER評価結果を示す図である。また、図63は、図62におけるSNR7~9dBのデータを拡大した図である。図62および図63を参照すると、変調方式としてBPSKを用いた場合、p=4ではBERの劣化はまったく観察されず、またp=2または3である場合でも、BERに大きな影響を与えないことがわかる。
 図64は、QPSKを変調方式に用いた際のBER評価結果を示す図である。また、図65は、図64におけるSNR10~12dBのデータを拡大した図である。図64および図65を参照すると、変調方式としてQPSKを用いた場合も、BPSKを用いた場合と同様に、p=2または3による量子化はBERに大きな影響を与えていないことがわかる。
 図66は、16QAMを変調方式に用いた際のBER評価結果を示す図である。また、図67は、図66におけるSNR16~18dBのデータを拡大した図である。図66および図67を参照すると、変調方式として16QAMを用いた場合、p=2または3による量子化では、BERの上昇が見られるものの、p=4による量子化では、BERの劣化が確認されないことがわかる。
 以上説明したように、変調方式にBPSKやQPSKを用いる場合、本開示に係る量子化手法は、pの値に依らず有効であるといえる。また、変調方式に16QAMを用いる場合には、p≧4であれば、BERに影響を与えないものと考えられる。
 このように、本開示に係る量子化手法は、通信技術分野においても有効であり、性能の維持と処理負担の軽減との両立を実現し得る。
 9.ハードウェア構成例
 次に、本開示の一実施形態に係る情報処理装置10のハードウェア構成例について説明する。図68は、本開示の一実施形態に係る情報処理装置10のハードウェア構成例を示すブロック図である。図68を参照すると、情報処理装置10は、例えば、CPU871と、ROM872と、RAM873と、ホストバス874と、ブリッジ875と、外部バス876と、インターフェース877と、入力装置878と、出力装置879と、ストレージ880と、ドライブ881と、接続ポート882と、通信装置883と、を有する。なお、ここで示すハードウェア構成は一例であり、構成要素の一部が省略されてもよい。また、ここで示される構成要素以外の構成要素をさらに含んでもよい。
 (CPU871)
 CPU871は、例えば、演算処理装置又は制御装置として機能し、ROM872、RAM873、ストレージ880、又はリムーバブル記録媒体901に記録された各種プログラムに基づいて各構成要素の動作全般又はその一部を制御する。
 (ROM872、RAM873)
 ROM872は、CPU871に読み込まれるプログラムや演算に用いるデータ等を格納する手段である。RAM873には、例えば、CPU871に読み込まれるプログラムや、そのプログラムを実行する際に適宜変化する各種パラメータ等が一時的又は永続的に格納される。
 (ホストバス874、ブリッジ875、外部バス876、インターフェース877)
 CPU871、ROM872、RAM873は、例えば、高速なデータ伝送が可能なホストバス874を介して相互に接続される。一方、ホストバス874は、例えば、ブリッジ875を介して比較的データ伝送速度が低速な外部バス876に接続される。また、外部バス876は、インターフェース877を介して種々の構成要素と接続される。
 (入力装置878)
 入力装置878には、例えば、マウス、キーボード、タッチパネル、ボタン、スイッチ、及びレバー等が用いられる。さらに、入力装置878としては、赤外線やその他の電波を利用して制御信号を送信することが可能なリモートコントローラ(以下、リモコン)が用いられることもある。また、入力装置878には、マイクロフォンなどの音声入力装置が含まれる。
 (出力装置879)
 出力装置879は、例えば、CRT(Cathode Ray Tube)、LCD、又は有機EL等のディスプレイ装置、スピーカ、ヘッドホン等のオーディオ出力装置、プリンタ、携帯電話、又はファクシミリ等、取得した情報を利用者に対して視覚的又は聴覚的に通知することが可能な装置である。また、本開示に係る出力装置879は、触覚刺激を出力することが可能な種々の振動デバイスを含む。
 (ストレージ880)
 ストレージ880は、各種のデータを格納するための装置である。ストレージ880としては、例えば、ハードディスクドライブ(HDD)等の磁気記憶デバイス、半導体記憶デバイス、光記憶デバイス、又は光磁気記憶デバイス等が用いられる。
 (ドライブ881)
 ドライブ881は、例えば、磁気ディスク、光ディスク、光磁気ディスク、又は半導体メモリ等のリムーバブル記録媒体901に記録された情報を読み出し、又はリムーバブル記録媒体901に情報を書き込む装置である。
 (リムーバブル記録媒体901)
リムーバブル記録媒体901は、例えば、DVDメディア、Blu-ray(登録商標)メディア、HD DVDメディア、各種の半導体記憶メディア等である。もちろん、リムーバブル記録媒体901は、例えば、非接触型ICチップを搭載したICカード、又は電子機器等であってもよい。
 (接続ポート882)
 接続ポート882は、例えば、USB(Universal Serial Bus)ポート、IEEE1394ポート、SCSI(Small Computer System Interface)、RS-232Cポート、又は光オーディオ端子等のような外部接続機器902を接続するためのポートである。
 (外部接続機器902)
 外部接続機器902は、例えば、プリンタ、携帯音楽プレーヤ、デジタルカメラ、デジタルビデオカメラ、又はICレコーダ等である。
 (通信装置883)
 通信装置883は、ネットワークに接続するための通信デバイスであり、例えば、有線又は無線LAN、Bluetooth(登録商標)、又はWUSB(Wireless USB)用の通信カード、光通信用のルータ、ADSL(Asymmetric Digital Subscriber Line)用のルータ、又は各種通信用のモデム等である。
 以上、本開示の実施形態について説明したが、本開示の技術的範囲は、上述の実施形態そのままに限定されるものではなく、本開示の要旨を逸脱しない範囲において種々の変更が可能である。また、異なる実施形態及び変形例にわたる構成要素を適宜組み合わせてもよい。
 また、本明細書に記載された各実施形態における効果はあくまで例示であって限定されるものでは無く、他の効果があってもよい。
 なお、本技術は以下のような構成も取ることができる。
(1)
 冪乗表現により量子化された複数の入力値と、前記入力値にそれぞれ対応する冪乗表現により量子化された複数の重み係数とに基づいて、積和演算を実行する積和演算回路を備え、
 前記入力値それぞれの指数は、予め定められた除数を分母に有する分数により表現され、
 前記重み係数それぞれの指数は、前記除数を分母に有する分数により表現され、
 前記積和演算回路は、前記入力値それぞれの前記指数に係る分子と、前記重み係数それぞれの前記指数に係る分子とを加算した値を被除数とした除算をした際の剰余に基づく複数の加算乗数を用いて前記積和演算を実行し、
 前記加算乗数それぞれは、指数部の基数が2である浮動小数点数である
 情報処理装置。
(2)
 前記複数の加算乗数を保持する記憶部をさらに備える前記(1)に記載の情報処理装置。
(3)
 前記除算をした際の商を整数化した値に基づいて、前記記憶部に格納された前記加算乗数に対して2の冪乗倍の演算を行う演算器をさらに備える前記(2)に記載の情報処理装置。
(4)
 前記演算器における浮動小数点数の指数部の語長は、前記入力値それぞれの前記指数に係る前記分子の語長と、前記重み係数それぞれの前記指数に係る前記分子の語長と、前記予め定められた除数とに基づいて定められる前記(3)に記載の情報処理装置。
(5)
 前記演算器は、基数が2である浮動小数点数の指数部に対する加減算を実行する前記(3)又は(4)に記載の情報処理装置。
(6)
 前記記憶部は、
  書換え可能な複数の記憶回路よりなる記憶回路群と、
  複数の第1の加算乗数と、前記複数の第1の加算乗数とは異なる複数の第2の加算乗数とを保持するメモリと、
  前記メモリ内に保持されている前記複数の第1の加算乗数と前記複数の第2の加算乗数とのうちの一方を選択的に前記記憶回路群に書き込むセレクタとを備える
 前記(2)に記載の情報処理装置。
(7)
 前記記憶部は、
  複数の第1の加算乗数を保持する第1の記憶回路群と、
  前記複数の第1の加算乗数とは異なる複数の第2の加算乗数を保持する第2の記憶回路群と、
  前記積和演算回路に接続される記憶回路群を前記第1の記憶回路群と前記第2の記憶回路群とのいずれかに切り替えるセレクタと、
 を備える
 前記(2)に記載の情報処理装置。
(8)
 前記複数の第1の加算乗数は、2の冪乗表現された値であり、
 前記複数の第2の加算乗数は、線形表現された値である
 前記(6)又は(7)に記載の情報処理装置。
(9)
 前記記憶部は、前記複数の加算乗数と、前記複数の加算乗数それぞれを2の冪乗表現の表現関数に沿って0.5丸めした値とを保持する、前記(2)に記載の情報処理装置。
(10)
 バイトストリームを解析する解析部と、
 冪乗表現により量子化された複数の入力値と、前記入力値にそれぞれ対応する冪乗表現により量子化された複数の重み係数とに基づいて、積和演算を実行する積和演算回路を備える演算器アレイと、
 前記解析部による解析結果に基づいて前記演算器アレイを制御する演算制御部と、
 を備え、
 前記演算器アレイは、複数の加算乗数を保持する記憶部をさらに備え、
 前記記憶部は、
  複数の第1の加算乗数を保持する第1の記憶回路群と、
  前記複数の第1の加算乗数とは異なる複数の第2の加算乗数を保持する第2の記憶回路群と、
  前記積和演算回路に接続される記憶回路群を前記第1の記憶回路群と前記第2の記憶回路群とのいずれかに切り替えるセレクタと、
 を備え、
 前記バイトストリームは、前記積和演算で使用する記憶回路群の指定を含み、
 前記演算制御部は、前記指定に基づいて前記セレクタを制御し、
 前記入力値それぞれの指数は、予め定められた除数を分母に有する分数により表現され、
 前記重み係数それぞれの指数は、前記除数を分母に有する分数により表現され、
 前記積和演算回路は、前記入力値それぞれの前記指数に係る分子と、前記重み係数それぞれの前記指数に係る分子とを加算した値を被除数とした除算をした際の剰余に基づく複数の加算乗数を用いて前記積和演算を実行し、
 前記加算乗数それぞれは、指数部の基数が2である浮動小数点数である
 情報処理システム。
(11)
 バイトストリームを解析する解析部と、冪乗表現により量子化された複数の入力値と、前記入力値にそれぞれ対応する冪乗表現により量子化された複数の重み係数とに基づいて、積和演算を実行する積和演算回路を備える演算器アレイと、前記解析部による解析結果に基づいて前記演算器アレイを制御する演算制御部とを備え、前記演算器アレイは、複数の加算乗数を保持する記憶部をさらに備え、前記記憶部は、複数の第1の加算乗数を保持する第1の記憶回路群と、前記複数の第1の加算乗数とは異なる複数の第2の加算乗数を保持する第2の記憶回路群と、前記積和演算回路に接続される記憶回路群を前記第1の記憶回路群と前記第2の記憶回路群とのいずれかに切り替えるセレクタとを備え、前記積和演算回路は、前記入力値それぞれの指数に係る分子と、前記重み係数それぞれの前記指数に係る分子とを加算した値を被除数とした除算をした際の剰余に基づく複数の加算乗数を用いて前記積和演算を実行する情報処理システムが実行する情報処理方法であって、
 前記解析部が、前記バイトストリームから前記積和演算で使用する記憶回路群の指定を特定し、
 前記演算制御部が、前記指定に基づいて前記セレクタを制御し、
 前記積和演算回路が、前記セレクタを介して接続された記憶回路群に保持されている前記複数の加算乗数を用いて前記積和演算を実行する
 ことを含み、
 前記入力値それぞれの指数は、予め定められた除数を分母に有する分数により表現され、
 前記重み係数それぞれの指数は、前記除数を分母に有する分数により表現され、
 前記加算乗数それぞれは、指数部の基数が2である浮動小数点数である
 情報処理方法。
 10 情報処理装置
 110 入力部
 120 演算部
 130 記憶部
 140 出力部
 200、300、400、500 積和演算回路
 530、530A、530B 記憶回路群
 1530 メモリ
 1530a、1530b テーブル
 1531、1532 セレクタ
 2001、2102 冪表現変換部
 2002、2104 乗算部
 2003 変数バッファ
 2004 係数メモリ
 2005 演算結果バッファ
 2100 積和演算回路
 2101 積和演算部
 2103 冪乗表現テーブル
 2202、2204 冪表現変換用テーブル
 2203 冪乗表現テーブル
 3210 整数減算器
 3220 シフト演算器
 3230 記憶回路群
 3240 比較器群
 3250 プライオリティエンコーダ
 3260 整数加算器
 3270 比較器
 3280 セレクタ
 3540 2の冪乗倍演算器
 3560 浮動小数点加減算器
 4001 センサI/F
 4002 係数
 4003、4009、4013 冪表現変換部
 4004、4014 格納・変換部
 4005 入力特徴マップメモリ
 4006 係数メモリ
 4007 解析部
 4008 抽出部
 4010 演算制御部
 4011 演算器アレイ
 4015 出力特徴マップメモリ

Claims (11)

  1.  冪乗表現により量子化された複数の入力値と、前記入力値にそれぞれ対応する冪乗表現により量子化された複数の重み係数とに基づいて、積和演算を実行する積和演算回路を備え、
     前記入力値それぞれの指数は、予め定められた除数を分母に有する分数により表現され、
     前記重み係数それぞれの指数は、前記除数を分母に有する分数により表現され、
     前記積和演算回路は、前記入力値それぞれの前記指数に係る分子と、前記重み係数それぞれの前記指数に係る分子とを加算した値を被除数とした除算をした際の剰余に基づく複数の加算乗数を用いて前記積和演算を実行し、
     前記加算乗数それぞれは、指数部の基数が2である浮動小数点数である
     情報処理装置。
  2.  前記複数の加算乗数を保持する記憶部をさらに備える請求項1に記載の情報処理装置。
  3.  前記除算をした際の商を整数化した値に基づいて、前記記憶部に格納された前記加算乗数に対して2の冪乗倍の演算を行う演算器をさらに備える請求項2に記載の情報処理装置。
  4.  前記演算器における浮動小数点数の指数部の語長は、前記入力値それぞれの前記指数に係る前記分子の語長と、前記重み係数それぞれの前記指数に係る前記分子の語長と、前記予め定められた除数とに基づいて定められる請求項3に記載の情報処理装置。
  5.  前記演算器は、基数が2である浮動小数点数の指数部に対する加減算を実行する請求項3に記載の情報処理装置。
  6.  前記記憶部は、
      書換え可能な複数の記憶回路よりなる記憶回路群と、
      複数の第1の加算乗数と、前記複数の第1の加算乗数とは異なる複数の第2の加算乗数とを保持するメモリと、
      前記メモリ内に保持されている前記複数の第1の加算乗数と前記複数の第2の加算乗数とのうちの一方を選択的に前記記憶回路群に書き込むセレクタとを備える
     請求項2に記載の情報処理装置。
  7.  前記記憶部は、
      複数の第1の加算乗数を保持する第1の記憶回路群と、
      前記複数の第1の加算乗数とは異なる複数の第2の加算乗数を保持する第2の記憶回路群と、
      前記積和演算回路に接続される記憶回路群を前記第1の記憶回路群と前記第2の記憶回路群とのいずれかに切り替えるセレクタと、
     を備える
     請求項2に記載の情報処理装置。
  8.  前記複数の第1の加算乗数は、2の冪乗表現された値であり、
     前記複数の第2の加算乗数は、線形表現された値である
     請求項6に記載の情報処理装置。
  9.  前記記憶部は、前記複数の加算乗数と、前記複数の加算乗数それぞれを2の冪乗表現の表現関数に沿って0.5丸めした値とを保持する、請求項2に記載の情報処理装置。
  10.  バイトストリームを解析する解析部と、
     冪乗表現により量子化された複数の入力値と、前記入力値にそれぞれ対応する冪乗表現により量子化された複数の重み係数とに基づいて、積和演算を実行する積和演算回路を備える演算器アレイと、
     前記解析部による解析結果に基づいて前記演算器アレイを制御する演算制御部と、
     を備え、
     前記演算器アレイは、複数の加算乗数を保持する記憶部をさらに備え、
     前記記憶部は、
      複数の第1の加算乗数を保持する第1の記憶回路群と、
      前記複数の第1の加算乗数とは異なる複数の第2の加算乗数を保持する第2の記憶回路群と、
      前記積和演算回路に接続される記憶回路群を前記第1の記憶回路群と前記第2の記憶回路群とのいずれかに切り替えるセレクタと、
     を備え、
     前記バイトストリームは、前記積和演算で使用する記憶回路群の指定を含み、
     前記演算制御部は、前記指定に基づいて前記セレクタを制御し、
     前記入力値それぞれの指数は、予め定められた除数を分母に有する分数により表現され、
     前記重み係数それぞれの指数は、前記除数を分母に有する分数により表現され、
     前記積和演算回路は、前記入力値それぞれの前記指数に係る分子と、前記重み係数それぞれの前記指数に係る分子とを加算した値を被除数とした除算をした際の剰余に基づく複数の加算乗数を用いて前記積和演算を実行し、
     前記加算乗数それぞれは、指数部の基数が2である浮動小数点数である
     情報処理システム。
  11.  バイトストリームを解析する解析部と、冪乗表現により量子化された複数の入力値と、前記入力値にそれぞれ対応する冪乗表現により量子化された複数の重み係数とに基づいて、積和演算を実行する積和演算回路を備える演算器アレイと、前記解析部による解析結果に基づいて前記演算器アレイを制御する演算制御部とを備え、前記演算器アレイは、複数の加算乗数を保持する記憶部をさらに備え、前記記憶部は、複数の第1の加算乗数を保持する第1の記憶回路群と、前記複数の第1の加算乗数とは異なる複数の第2の加算乗数を保持する第2の記憶回路群と、前記積和演算回路に接続される記憶回路群を前記第1の記憶回路群と前記第2の記憶回路群とのいずれかに切り替えるセレクタとを備え、前記積和演算回路は、前記入力値それぞれの指数に係る分子と、前記重み係数それぞれの前記指数に係る分子とを加算した値を被除数とした除算をした際の剰余に基づく複数の加算乗数を用いて前記積和演算を実行する情報処理システムが実行する情報処理方法であって、
     前記解析部が、前記バイトストリームから前記積和演算で使用する記憶回路群の指定を特定し、
     前記演算制御部が、前記指定に基づいて前記セレクタを制御し、
     前記積和演算回路が、前記セレクタを介して接続された記憶回路群に保持されている前記複数の加算乗数を用いて前記積和演算を実行する
     ことを含み、
     前記入力値それぞれの指数は、予め定められた除数を分母に有する分数により表現され、
     前記重み係数それぞれの指数は、前記除数を分母に有する分数により表現され、
     前記加算乗数それぞれは、指数部の基数が2である浮動小数点数である
     情報処理方法。
PCT/JP2020/027324 2019-08-26 2020-07-14 情報処理装置、情報処理システム及び情報処理方法 WO2021039164A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US17/634,568 US20220334802A1 (en) 2019-08-26 2020-07-14 Information processing apparatus, information processing system, and information processing method
CN202080054616.0A CN114207609A (zh) 2019-08-26 2020-07-14 信息处理装置、信息处理系统和信息处理方法
JP2021542610A JPWO2021039164A1 (ja) 2019-08-26 2020-07-14
EP20859106.5A EP4024198A4 (en) 2019-08-26 2020-07-14 INFORMATION PROCESSING DEVICE, INFORMATION PROCESSING SYSTEM AND INFORMATION PROCESSING METHOD

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019-154141 2019-08-26
JP2019154141 2019-08-26

Publications (1)

Publication Number Publication Date
WO2021039164A1 true WO2021039164A1 (ja) 2021-03-04

Family

ID=74684524

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/027324 WO2021039164A1 (ja) 2019-08-26 2020-07-14 情報処理装置、情報処理システム及び情報処理方法

Country Status (5)

Country Link
US (1) US20220334802A1 (ja)
EP (1) EP4024198A4 (ja)
JP (1) JPWO2021039164A1 (ja)
CN (1) CN114207609A (ja)
WO (1) WO2021039164A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7166498B1 (ja) * 2022-02-10 2022-11-07 三菱電機株式会社 風況学習装置、風況予測装置、及びドローンシステム

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0451384A (ja) * 1990-06-19 1992-02-19 Canon Inc ニューラルネットワークの構築方法
WO2019064774A1 (ja) * 2017-09-29 2019-04-04 ソニー株式会社 情報処理装置、および情報処理方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201607713D0 (en) * 2016-05-03 2016-06-15 Imagination Tech Ltd Convolutional neural network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0451384A (ja) * 1990-06-19 1992-02-19 Canon Inc ニューラルネットワークの構築方法
WO2019064774A1 (ja) * 2017-09-29 2019-04-04 ソニー株式会社 情報処理装置、および情報処理方法

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
DAISUKE MIYASHITA: "Convolutional Neural Networks using Logarithmic Data Representation", ARXIV, 3 March 2016 (2016-03-03), Retrieved from the Internet <URL:https://arxiv.org/pdf/1603.01025.pdf>>
DEMPSTER D, LAIRD N M, RUBIN D B, ZHANG TANG CHUAN, KWAN HON KEUNG: "Multilayer feedforward neural networks with single powers-of-two weights", IEEE TRANSACTIONS ON SIGNAL PROCESSING, vol. 41, no. 8, August 1993 (1993-08-01), pages 2724 - 2727, XP055794135 *
MATTHIEU COURBARIAUX: "BinaryConnect: Training Deep Neural Networks with binary weights during propagations", ARXIV, 2 November 2015 (2015-11-02), Retrieved from the Internet <URL:https://arxiv.org/pdf/1511.00363.pdf>>
MIYASHITA DAISUKE, LEE EDWARD H, MURMANN BORIS: "Convolutional Neural Networks using Logarithmic Data Representation", ARXIV.ORG, vol. 2, 17 March 2016 (2016-03-17), pages 1 - 10, XP080686928 *
See also references of EP4024198A4

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7166498B1 (ja) * 2022-02-10 2022-11-07 三菱電機株式会社 風況学習装置、風況予測装置、及びドローンシステム
WO2023152862A1 (ja) * 2022-02-10 2023-08-17 三菱電機株式会社 風況学習装置、風況予測装置、及びドローンシステム

Also Published As

Publication number Publication date
US20220334802A1 (en) 2022-10-20
EP4024198A1 (en) 2022-07-06
EP4024198A4 (en) 2022-10-12
JPWO2021039164A1 (ja) 2021-03-04
CN114207609A (zh) 2022-03-18

Similar Documents

Publication Publication Date Title
CN110363279B (zh) 基于卷积神经网络模型的图像处理方法和装置
CN110036384B (zh) 信息处理设备和信息处理方法
CN110852416B (zh) 基于低精度浮点数数据表现形式的cnn硬件加速计算方法及系统
CN110852434B (zh) 基于低精度浮点数的cnn量化方法、前向计算方法及硬件装置
US10491239B1 (en) Large-scale computations using an adaptive numerical format
US11615301B2 (en) Lossless exponent and lossy mantissa weight compression for training deep neural networks
CN110888623B (zh) 数据转换方法、乘法器、加法器、终端设备及存储介质
WO2022168604A1 (ja) ソフトマックス関数の近似計算装置、近似計算方法および近似計算プログラム
US20150113027A1 (en) Method for determining a logarithmic functional unit
WO2021039164A1 (ja) 情報処理装置、情報処理システム及び情報処理方法
CN107220025B (zh) 处理乘加运算的装置和处理乘加运算的方法
Chandra A novel method for scalable VLSI implementation of hyperbolic tangent function
US10271051B2 (en) Method of coding a real signal into a quantized signal
US6898615B2 (en) Signal processing unit and signal processing method including using an exponent part and a mantissa part for power generation
JPH11212768A (ja) 対数値算出回路
WO2018198454A1 (ja) 情報処理装置、および情報処理方法
Madadum et al. A resource-efficient convolutional neural network accelerator using fine-grained logarithmic quantization
CN112199072A (zh) 一种基于神经网络层的数据处理方法、装置及设备
US20210334635A1 (en) Neural network accelerator configured to perform operation on logarithm domain
US20240036821A1 (en) Floating-point number decoder
Wu TableNet: a multiplier-less implementation of neural networks for inferencing
GB2621135A (en) Methods and systems employing enhanced block floating point numbers
CN114442994A (zh) 低功率、低内存乘法和累加(mac)单元
JP2003288100A (ja) 逆量子化回路

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20859106

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021542610

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020859106

Country of ref document: EP

Effective date: 20220328