# US 11,443,797 B2 · Neural network computation method and apparatus using adaptive data representation

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,443,797 B2
- Document ID: US11443797B2
- Status: Granted
- Kind: B2
- Application number: 16/798,166
- Filed: 2020-02-21
- Published: 2020-10-01
- Granted: 2022-09-13
- Earliest claimed: 2019-03-26
- Assignees: Macronix International Co., Ltd.
- Applicants: MACRONIX International Co., Ltd.
- Inventors: Shu-Yin Ho; Hsiang-Pang Li; Yao-Wen Kang; Chun-Feng Wu; Yuan-Hao Chang; Tei-Wei Kuo
- Web page: https://patentgrep.com/patent/US11443797B2

## CPC

- G11C 11/54: using elements simulating biological cells, e.g. neuron
- G06F 7/5443: {Sum of products (for applications thereof, see the relevant places, e.g. G06F17/10, H03H17/00)}
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/06: Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N 3/065: Analogue means
- G06N 3/08: Learning methods
- G11C 11/4085: {Word line control circuits, e.g. word line drivers, - boosters, - pull-up, - pull-down, - precharge}
- G11C 11/4091: Sense or sense/refresh amplifiers, or associated sense circuitry, e.g. for coupled bit-line precharging, equalising or isolating
- G11C 11/4094: Bit-line management or control circuits
- G06F 2207/4814: Non-logic devices, e.g. operational amplifiers
- G06F 2207/4824: Neural networks
- G06N 3/045: Combinations of networks
- G11C 16/0483: {comprising cells having several storage transistors connected in series}
- G11C 2213/71: Three dimensional array
- G11C 2213/77: Array wherein the memory element being directly connected to the bit lines and word lines without any access device being used
- G11C: STATIC STORES (semiconductor memory devices H10B)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method and an apparatus for neural network computation using adaptive data representation, adapted for a processor to perform multiply-and-accumulate operations on a memory having a crossbar architecture, are provided. The memory comprises multiple input and output lines crossing each other, multiple cells respectively disposed at intersections of the input and output lines, and multiple sense amplifiers respectively connected to the output lines. In the method, an input cycle of kth bits respectively in an input data is adaptively divided into multiple sub-cycles, wherein a number of the divided sub-cycles is determined according to a value of k. The kth bits of the input data are inputted to the input lines with the sub-cycles and computation results of the output lines are sensed by the sense amplifiers. The computation results sensed in each sub-cycle are combined to obtain the output data corresponding to the kth bits of the input data.

## Claims

### Claim 1

A neural network computation method using adaptive data representation, adapted for a processor to perform multiply-and-accumulate (MAC) operations on a memory having a crossbar architecture, wherein the memory comprises a plurality of input lines and a plurality of output lines crossing each other, a plurality of cells respectively disposed at intersections of the input lines and the output lines, and a plurality of sense amplifiers respectively connected to the output lines, the method comprising:
adaptively dividing an input cycle of kth bits respectively in a plurality of input data to be inputted to the input lines into a plurality of sub-cycles, wherein a number of the divided sub-cycles is determined according to a value of k and k is an integer;
inputting the kth bits of the plurality of input data to the input lines with the sub-cycles and sensing computation results of the output lines by the sense amplifiers; and
combining the computation results sensed in each sub-cycle to obtain a plurality of output data corresponding to the kth bits of the input data.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
multiplying the output data corresponding to the bits of each order of the input data with corresponding exponential base and summing multiplication results of the bits of all orders to obtain a final output data.

### Claim 3 (depends on 1)

The method of claim 1, wherein the number of the divided sub-cycles increases as the value of k increases and a maximum number of the input lines involved in each of the divided sub-cycles is determined according to a resolution of the sense amplifiers.

### Claim 4 (depends on 1)

The method of claim 1, wherein a number of the divided sub-cycles for most significant bits (MSBs) in the input data is larger than a number of the divided sub-cycles for least significant bits (LSBs) in the input data.

### Claim 5 (depends on 1)

The method of claim 1, wherein the memory comprises NAND flash, NOR flash, phase change memory (PCM), spin-transfer torque random-access memory (STT-RAM), or resistive random-access memory (ReRAM) of 2D or 3D structure.

### Claim 6 (depends on 1)

The method of claim 1, wherein the input lines are wordlines of the memory and the output lines are bitlines of the memory, or the input lines are bitlines of the memory and the output lines are wordlines of the memory.

### Claim 7

A neural network computation apparatus using adaptive data representation, comprising:
a memory having a crossbar architecture, comprising:
a plurality of input lines and a plurality of output lines crossing each other;
a plurality of cells respectively disposed at intersections of the input lines and the output lines; and
a plurality of sense amplifiers respectively connected to the output lines;
a processor, coupled to the memory and configured to perform MAC operations comprising steps of:
adaptively dividing an input cycle of kth bits respectively in a plurality of input data to be inputted to the input lines into a plurality of sub-cycles, wherein a number of the divided sub-cycles is determined according to a value of k and k is an integer;
inputting the kth bits of the plurality of input data to the input lines with the sub-cycles and sensing computation results of the output lines by the sense amplifiers; and
combining the computation results sensed in each sub-cycle to obtain a plurality of output data corresponding to the kth bits of the input data.

### Claim 8 (depends on 7)

The neural network computation apparatus of claim 7, wherein the processor multiplies the output data corresponding to the bits of each order of the input data with corresponding exponential base and sums multiplication results of the bits of all orders to obtain a final output data.

### Claim 9 (depends on 7)

The neural network computation apparatus of claim 7, wherein the processor increases the number of the divided sub-cycles as the value of k increases and determines a maximum number of the input lines involved in each of the divided sub-cycles according to a resolution of the sense amplifiers.

### Claim 10 (depends on 7)

The neural network computation apparatus of claim 7, wherein a number of the divided sub-cycles for MSBs in the input data is larger than a number of the divided sub-cycles for LSBs in the input data.

### Claim 11 (depends on 7)

The neural network computation apparatus of claim 7, wherein the processors further comprises:
retrieving a plurality of weight values to be respectively programmed into the cells;
counting a number of bits representing a low resistance state (LRS) in a binary representation of a target weight value among the weight values;
inquiring a plurality of candidate weight values around the target weight value to find one of the candidate weight values having a number of bits representing the LRS in a binary representation less than the counted number of bits by at least a rounding threshold; and
programming the found candidate weight value in replacement of the target weight value to the corresponding cell.

### Claim 12 (depends on 11)

The neural network computation apparatus of claim 11, wherein the processors comprises programming the target weight value to the corresponding cell if no candidate weight value is found.

### Claim 13 (depends on 11)

The neural network computation apparatus of claim 11, wherein the processors comprises inquiring a plurality of weight values having a difference from the target weight value less than or equal to a rounding distance as the candidate weight values.

### Claim 14 (depends on 7)

The neural network computation apparatus of claim 7, wherein the memory comprises NAND flash, NOR flash, PCM, STT-RAM, or ReRAM of 2D or 3D structure.

### Claim 15 (depends on 7)

The neural network computation apparatus of claim 7, wherein the input lines are wordlines of the memory and the output lines are bitlines of the memory, or the input lines are bitlines of the memory and the output lines are wordlines of the memory.
