KR-102962856-B1 - Method for implementing activation function using masking technique
Abstract
The present invention relates to a method for implementing an activation function used in the art field using data masking and a function table. A method for implementing an activation function according to one embodiment of the present invention is characterized by comprising the steps of: generating a function table by defining an activation function with a plurality of indices and function values corresponding to each index; determining first and second indices by applying masking to the input of the activation function; and determining the output of the activation function based on the function values corresponding to the first and second indices identified from the function table.
Inventors
- 김준섭
- 홍석희
- 김희석
- 박수진
- 김규상
- 박동준
Assignees
- 고려대학교 산학협력단
Dates
- Publication Date
- 20260508
- Application Date
- 20240412
Claims (11)
- A step of creating a function table by defining an activation function with multiple indices and function values corresponding to each index; A step of determining the first and second indices by applying masking to the input of the above activation function; and A step of determining the output of the activation function based on the function values corresponding to the first and second indices identified from the function table. Activation function implementation method.
- In paragraph 1, The step of generating the above function table is A step comprising generating a function table for activation functions including an exponential function Activation function implementation method.
- In paragraph 1, The step of generating the above function table is A step comprising defining an interval containing the point where the gradient of the above activation function is maximum using a plurality of indices having a constant interval. Activation function implementation method.
- In paragraph 1, The step of generating the above function table is A step comprising defining a denser index in the interval where the gradient of the above activation function is greater. Activation function implementation method.
- In paragraph 1, The step of generating the above function table is The step of generating a function table in which the plurality of indexes and function values corresponding to each index are mutually mapped Activation function implementation method.
- In paragraph 1, The step of applying the above masking A step of splitting the input of the above activation function into two Activation function implementation method.
- In paragraph 1, The step of applying the above masking A step comprising splitting the input of the above activation function into a random number and a value obtained by subtracting the random number from the input. Activation function implementation method.
- In paragraph 1, The step of determining the first and second indices above A step of generating first and second masked inputs by applying masking to the input of the above activation function, and A step comprising determining a first index closest to the first masking input and a second index closest to the sum of the second masking input and the minimum input defined in the function table. Activation function implementation method.
- In paragraph 1, The step of determining the output of the above activation function is A step comprising determining a function value corresponding to the sum of the first and second indices as the output of the activation function Activation function implementation method.
- In paragraph 1, The step of generating the above function table includes the step of splitting the function values defined in the above function table into two and defining them. The step of determining the output of the activation function comprises identifying two split function values corresponding to the sum of the first and second indices from the function table, and determining the sum of the two identified function values as the output of the activation function. Activation function implementation method.
- In paragraph 1, The step of determining the output of the above activation function is A step of shifting the index defined in the above function table by a masking constant, and The step of identifying a function value corresponding to the sum of the first and second indices and the masking constant from the shifted function table, and determining the identified function value as the output of the activation function Activation function implementation method.
Description
Method for implementing activation function using masking technique The present invention relates to a method for implementing an activation function used in the relevant technical field using data masking and a function table. Side-Channel Analysis refers to a technology that obtains internal information about a device by statistically analyzing physical auxiliary signals generated by the device (e.g., computation time, temperature changes, power consumption, electromagnetic waves, etc.). With the advancement of the deep learning field, neural network models are being installed on various devices, but recently, the risk of side-channel analysis attacks on neural network models is increasingly being raised. Consequently, there is a need for various side-channel countermeasures for neural network models. FIG. 1 is a flowchart illustrating a method for implementing an activation function according to an embodiment of the present invention. FIG. 2 is a diagram illustrating activation functions that are the subject of implementation of the present invention. FIGS. 3 and FIGS. 4 are drawings illustrating multiple indices and function values that define an activation function. FIGS. 5A and FIGS. 5B are drawings illustrating function tables defined for activation functions according to each example. FIG. 6 is a diagram illustrating the process of determining the output of an activation function through a masked input and a function table. FIG. 7 is a diagram illustrating an index defined in a function table shifted by a masking constant. FIG. 8 is a diagram illustrating the process of determining the output of an activation function through a masked input and a shifted function table. The aforementioned objectives, features, and advantages are described in detail below with reference to the attached drawings, thereby enabling those skilled in the art to easily implement the technical concept of the present invention. In describing the present invention, detailed descriptions of known technologies related to the present invention are omitted if it is determined that such descriptions would unnecessarily obscure the essence of the invention. Hereinafter, preferred embodiments according to the present invention will be described in detail with reference to the attached drawings. In the drawings, the same reference numerals are used to indicate the same or similar components. In this specification, terms such as "first," "second," etc. are used to describe various components, but these components are not limited by these terms. These terms are used merely to distinguish one component from another, and unless specifically stated otherwise, the first component may be the second component. Additionally, in this specification, the statement that any configuration is disposed on the "upper (or lower)" or "upper (or lower)" of a component may mean not only that any configuration is disposed in contact with the upper (or lower) surface of said component, but also that another configuration may be interposed between said component and any configuration disposed on (or below) said component. Furthermore, where it is stated in this specification that one component is "connected," "coupled," or "connected" to another component, it should be understood that while the components may be directly connected or connected to each other, another component may be "interposed" between each component, or each component may be "connected," "coupled," or "connected" through another component. Additionally, singular expressions used in this specification include plural expressions unless the context clearly indicates otherwise. In this application, terms such as "composed of" or "comprising" should not be interpreted as necessarily including all of the various components or steps described in the specification, and should be interpreted as meaning that some of the components or steps may not be included, or that additional components or steps may be included. Additionally, in this specification, "A and/or B" means A, B, or A and B unless specifically stated otherwise, and "C to D" means C or more and D or less, unless specifically stated otherwise. The present invention relates to a method for implementing an activation function used in the art field using data masking and a function table. Hereinafter, a method for implementing an activation function according to an embodiment of the present invention will be described in detail with reference to FIGS. 1 to 9. FIG. 1 is a flowchart illustrating a method for implementing an activation function according to an embodiment of the present invention. FIG. 2 is a diagram illustrating activation functions that are the subject of implementation of the present invention, and FIG. 3 and FIG. 4 are diagrams illustrating a plurality of indices and function values that define the activation functions. Figures 5a and 5b are diagrams illustrating function tables defined for activation functions according to