IP Library Granted Patent US 12705465
Granted Patent B2
US 12705465 · App. 17/734,221 · Granted Aug 11, 2026

Method for operating neural network

Inventors: Kea Tiong Tang (Taipei City, TW); Chen-Han Hsu (Keelung City, TW)
Assignees: TAIWAN SEMICONDUCTOR MANUFACTURING COMPANY, LTD.; NATIONAL TSING HUA UNIVERSITY
G06N3/049G06N3/08
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12705465
App. No.
17/734,221
Granted
Aug 11, 2026
Kind
B2
Abstract

A method is provided and includes operations as below: receiving multiple spike signals in an input layer of a spiking neural network during multiple time steps; counting a corresponding number of spikes in the spike signals for each of the time steps; weighting, in response to the corresponding number of spikes in one of plurality of time steps being greater than a predetermined count value, the spike signals with multiple synaptic weight values to generate multiple synaptic signals; generating a membrane potential by accumulating a number N of the synaptic signals according to a weight distribution of the synaptic weight values; and generating an output spike signal according to the membrane potential.

Claims (67)

1 . A method, comprising:

receiving a plurality of spike signals in an input layer of a spiking neural network during a plurality of time steps;

counting a corresponding number of spikes in the plurality of spike signals for each of the plurality of time steps;

weighting, in response to the corresponding number of spikes in one of plurality of time steps being greater than a predetermined count value, the plurality of spike signals with a plurality of synaptic weight values to generate a plurality of synaptic signals;

generating a membrane potential by accumulating a number N of the plurality of synaptic signals according to a weight distribution of the plurality of synaptic weight values, comprising:

accumulating a number K of groups of signals in the plurality of synaptic signals in a first computing cycle to a K-th computing cycle to generate a first intermediate membrane potential;

comparing the first intermediate membrane potential and a threshold value; and

when the first intermediate membrane potential is less than the threshold value and a difference between the first intermediate membrane potential and the threshold value is greater than a sum of remaining signals in the plurality of synaptic signals in a (K+1)-th computing cycle, terminating an operation of accumulating the remaining signals in the plurality of synaptic signals in the (K+1)-th computing cycle; and

generating an output spike signal according to the membrane potential.

2 . The method of claim 1 , further comprising:

when the corresponding number of spikes in a first time step of the plurality of time steps is smaller than the predetermined count value, generating an output spike having a value “0” in the output spike signal corresponding to the first time step of the plurality of time steps.

3 . The method of claim 2 , wherein the predetermined count value is configured to be obtained by training the spiking neural network.

4 . The method of claim 1 , wherein the counting the corresponding number of spikes in the plurality of spike signals further comprises:

increasing the corresponding number of spikes for a first time step of the plurality of time steps in response to a first spike signal, in the plurality of spike signals, including a spike having a value “1” in the first time step of the plurality of time steps.

5 . The method of claim 1 , wherein a number of the plurality of synaptic signals, generated in the operation of weighting the plurality of spike signals, equals to a number M,

wherein the number M is different from the number N.

6 . The method of claim 1 , further comprising:

generating an output spike having a value “0” in the output spike signal corresponding to the one of plurality of time steps.

7 . The method of claim 1 , further comprising:

generating an output signal, based on the output spike signal, for an image recognition operation of an input data associated with the plurality of spike signals.

8 . A non-transitory computer-readable medium for storing computer-executable instructions, the computer-executable instructions when executed by a processor implementing a method comprising:

counting a first number of input spikes received in an input layer of a neural network during a first time step;

comparing the first number of input spikes with a predetermined count value;

when the first number of input spikes is smaller than the predetermined count value, terminating an operation of accumulation associated with input spikes received during the first time step;

generating an output spike having a value “0”;

when the first number of input spikes is greater than the predetermined count value, weighting the input spikes with a plurality of first synaptic weight values to generate a plurality of first synaptic signals;

generating a membrane potential, comprising:

accumulating a number K of groups of signals in the plurality of first synaptic signals in a first computing cycle to a K-th computing cycle to generate a first intermediate membrane potential;

comparing the first intermediate membrane potential and a threshold value; and

when the first intermediate membrane potential is less than the threshold value and a difference between the first intermediate membrane potential and the threshold value is greater than a sum of remaining signals in the plurality of first synaptic signals in a (K+1)-th computing cycle, terminating an operation of accumulating the remaining signals in the plurality of first synaptic signals in the (K+1)-th computing cycle.

9 . The non-transitory computer-readable medium of claim 8 , wherein the method further comprises:

counting a second number of input spikes received in the input layer of the neural network during a second time step following the first time step;

comparing the second number of input spikes with the predetermined count value; and

when the second number of input spikes is greater than the predetermined count value, generating a plurality of second synaptic signals by weighting the input spikes received during the second time step.

10 . The non-transitory computer-readable medium of claim 9 , wherein the method further comprises:

accumulating a number M of groups of signals in the plurality of second synaptic signals in a first computing cycle to a M-th computing cycle to generate a second intermediate membrane potential;

calculating a difference between the second intermediate membrane potential and the threshold value;

when the second intermediate membrane potential is greater than the threshold value and the difference is greater than a sum of the number M of groups of signals in the plurality of second synaptic signals, terminating an operation of accumulating remaining signals in the plurality of second synaptic signals in remaining computing cycle; and

generating an output spike having a value “1” corresponding to the second time step.

11 . The non-transitory computer-readable medium of claim 8 , wherein the method further comprises:

determining that no spike is received during the first time step; and

in response to the determination, generating the output spike having a value “0”.

12 . A neural network system, comprising:

a memory, configured for storing a plurality of program codes and an input data;

a processor, coupled with the memory, wherein the processor is configured to run a spiking neural network and to execute operations of:

generating a number M of a plurality of synaptic signals according to a plurality of spike signals that are received in an input layer of the spiking neural network and associated with an input signal provided for the spiking neural network;

accumulating a first synaptic signal to an N-th synaptic signal in the plurality synaptic signals to generate a membrane potential, wherein the number N is smaller than the number M;

outputting, according to the membrane potential and a threshold value, an output spike corresponding to the input signal;

accumulating a number K of groups of signals in the plurality of synaptic signals in a first computing cycle to a K-th computing cycle to generate a first intermediate membrane potential;

comparing the first intermediate membrane potential and the threshold value; and

when the first intermediate membrane potential is less than the threshold value and a difference between the first intermediate membrane potential and the threshold value is greater than a sum of remaining signals in the plurality of synaptic signals in a (K+1)-th computing cycle, terminating an operation of accumulating the remaining signals in the plurality of synaptic signals in the (K+1)-th computing cycle.

13 . The neural network system of claim 12 , wherein an absolute value of a sum of the N-th synaptic signal to a M-th synaptic signal in the plurality synaptic signals is smaller than an absolute value of a difference between the membrane potential and the threshold value.

14 . The neural network system of claim 12 , wherein the processor is further configured to execute operations of:

terminating an operation of accumulating the N-th synaptic signal to a M-th synaptic signal in the plurality synaptic signals.

15 . The neural network system of claim 12 , wherein the processor is further configured to execute operations of:

counting a number of spikes in the plurality of spike signals received during a time step;

wherein the generating the plurality of synaptic signals further comprises:

when the number of spikes in the plurality of spike signals is greater than a predetermined count value, weighting the plurality of spike signals with a plurality of synaptic weight values to generate the plurality of synaptic signals.

16 . The neural network system of claim 12 , wherein the processor is further configured to execute operations of:

when a sum of the N-th synaptic signal to a M-th synaptic signal in the plurality synaptic signals is a negative number and an absolute value of the sum of the N-th synaptic signal to the M-th synaptic signal is greater than a difference between the membrane potential and the threshold value,

accumulating the N-th synaptic signals to the M-th synaptic signal to update the membrane potential.

17 . The method of claim 1 , wherein the number K is different from the number N.

18 . The method of claim 1 , wherein the number K is smaller than the number N.

19 . The method of claim 1 , further comprising:

outputting the first intermediate membrane as the membrane potential.

20 . The method of claim 1 , further comprising:

when the first intermediate membrane potential is greater than the threshold value, generating an output spike having a value “0” in the output spike signal.