# US 2025/0148272 A1 · Programming method of an activation function and an activation function programming unit

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

- Number: US 2025/0148272 A1
- Document ID: US20250148272A1
- Status: Published application
- Kind: A1
- Application number: 19/007,909
- Filed: 2025-01-02
- Published: 2025-05-08
- Earliest claimed: 2023-11-08
- Assignees: Deepx Co., Ltd.
- Applicants: Deepx Co., Ltd.
- Inventors: Jong Hoon SHIN; Lok Won KIM; Hyung Jin CHUN; Ho Seung KIM
- Web page: https://patentgrep.com/patent/US20250148272A1

## CPC

- G06N 3/048: Activation functions
- G06N 3/045: Combinations of networks
- G06N 3/063: using electronic means
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

An activation function conversion program unit and method may be configured to approximate a target activation function to a programmed activation function through machine-learning of an artificial neural network. The method may include setting up a target activation function; approximating the target activation function to a programmed activation function by machine-learning an artificial neural network; and converting the programmed activation function into a slope and offset and storing it in a lookup table. Accordingly, the computation speed and power consumption of the programmed activation function execution unit of an NPU may be optimized.

## Claims

### Claim 1

A method of approximating an activation function, comprising:
receiving a target activation function;
determining, using a trained neural network model including a plurality of layers, an approximation activation function that approximates the received target activation function as a plurality of segments at least a subset of which is defined by parameters; and
storing the parameters in a neural processor circuit.

### Claim 2 (depends on 1)

The method of claim 1, wherein the parameters are stored in a lookup table of the neural processor circuit.

### Claim 3 (depends on 2)

The method of claim 2, further comprising executing an artificial neural network model by the neural processor circuit using the approximation activation function corresponding to the parameters stored in the lookup table.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
programming an activation function execution circuit of the neural processor circuit according to the stored parameters;
receiving an input by the programmed activation function execution circuit; and
determining an output that approximates an activation value of the target activation function corresponding to the input by processing the input using the programmed activation function execution circuit.

### Claim 5 (depends on 4)

The method of claim 4, wherein determining the approximation activation function comprises determining a number of the plurality of segments to be equal to or less than a number of comparators in the activation function execution circuit.

### Claim 6 (depends on 1)

The method of claim 1, wherein determining the approximation activation function comprises determining one or more breaking points at which the plurality of segments are separated using the trained neural network model.

### Claim 7 (depends on 1)

The method of claim 1, wherein the at least a subset of the parameters represent a linear function and wherein the at least the subset of parameters comprise a slope and an offset of the linear function.

### Claim 8 (depends on 1)

The method of claim 1, wherein the trained neural network model is generated by:
(a) receiving an input at a first neural network section of a neural network model including a hidden layer;
(b) generating hidden layer outputs at the first neural network section by at least applying first weights and first biases to the input;
(c) generating a neural network output at a second neural network section of the neural network model by applying second weights and the second biases to the hidden layer outputs;
(d) determining an error representing a difference between the neural network output and an activation value corresponding to the input;
(e) updating the first weights, the first biases, the second weight and the second biases according to the error; and
(f) repeating (a) through (e) until a termination condition is satisfied to determine the trained neural network model.

### Claim 9 (depends on 8)

The method of claim 8, wherein (b) generating the hidden layer outputs comprises applying a rectified linear unit (ReLU) function to values determined by applying the input with the first weights and the first biases.

### Claim 10 (depends on 8)

The method of claim 8, wherein the trained neural network model is generated further by performing pruning on a version of the neural network model with the updated first weights, the updated first biases, the updated second weights and the updated second biases.

### Claim 11

A neural processor circuit comprising:
memory configured to store parameters;
one or more processing elements configured to perform at least multiply and accumulate (MAC) operations by applying weights to input data to generate an operation value; and
a programmable activation function execution circuit coupled to the one or more processing elements and the memory, the programmable activation function execution circuit configured to generate an activation value by applying, to the operation value, an approximation activation function that approximates a target activation function, the approximation activation function including a plurality of segments at least a subset of which is defined by the parameters.

### Claim 12 (depends on 11)

The neural processor circuit of claim 11, wherein the programmable active function execution circuit comprises subcircuits programmed by the stored parameters, wherein the subcircuits process the operation value to generate the activation value.

### Claim 13 (depends on 12)

The neural processor circuit of claim 12, wherein the subcircuits comprises:
a plurality of comparator circuits, each configured to receive the operation value and compare the operation value with corresponding ones of the stored parameters to generate comparator signals;
a selector circuit coupled to the plurality of comparators to receive the comparator signals and output a subset of the parameters corresponding to one of the plurality of segments corresponding to the operation value; and
computation circuits coupled to the selector circuit to receive the subset of parameters and determine the activation value by applying the subset of parameters to the operation value.

### Claim 14 (depends on 13)

The neural processor circuit of claim 13, wherein the computation circuits comprise multiplier circuits and adder circuits.

### Claim 15 (depends on 13)

The neural processor circuit of claim 13, wherein a number of the plurality of segments is equal to or fewer than a number of the comparator circuits.

### Claim 16 (depends on 11)

The neural processor circuit of claim 11, wherein at least a subset of the parameters represent a linear function, and wherein the at least the subset of parameters comprise a slope and an offset of the linear function.

### Claim 17 (depends on 11)

The neural processor circuit of claim 11, wherein the approximation activation function is generated by a trained neural network model including a plurality of layers.

### Claim 18 (depends on 17)

The neural processor circuit of claim 17, wherein the trained neural network model is generated by:
(a) receiving an input at a first neural network section of a neural network model including a hidden layer;
(b) generating hidden layer outputs at the first neural network section by at least applying first weights and first biases to the input;
(c) generating a neural network output at a second neural network section of the neural network model by applying second weights and the second biases to the hidden layer outputs;
(d) determining an error representing a difference between the neural network output and an activation value corresponding to the input;
(e) updating the first weights, the first biases, the second weight and the second biases according to the error; and
(f) repeating (a) through (e) until a termination condition is satisfied to determine the trained neural network model.

### Claim 19 (depends on 18)

The neural processor circuit of claim 18, wherein pruning is performed on an updated version of the neural network model to generate the trained neural network.

### Claim 20

A non-transitory computer readable storage medium storing instructions thereon, the instructions when executed by one or more processors cause the one or more processors to:
receive a target activation function;
determine, using a trained neural network model including a plurality of layers, an approximation activation function that approximates the received target activation function as a plurality of segments at least a subset of which is defined by parameters; and
store the parameters in a neural processor circuit.
