WO2024025386A1 - Method and device for deep learning network encoding/decoding using standard normal distribution-based quantization technique - Google Patents

Method and device for deep learning network encoding/decoding using standard normal distribution-based quantization technique Download PDF

Info

Publication number
WO2024025386A1
WO2024025386A1 PCT/KR2023/011047 KR2023011047W WO2024025386A1 WO 2024025386 A1 WO2024025386 A1 WO 2024025386A1 KR 2023011047 W KR2023011047 W KR 2023011047W WO 2024025386 A1 WO2024025386 A1 WO 2024025386A1
Authority
WO
WIPO (PCT)
Prior art keywords
quantization
residual
deep learning
quantization technique
learning network
Prior art date
Application number
PCT/KR2023/011047
Other languages
French (fr)
Korean (ko)
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 한국전자기술연구원
Publication of WO2024025386A1 publication Critical patent/WO2024025386A1/en

Links

Images

Classifications

    • 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
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • 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/08Learning methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • the present disclosure relates to a method and device for encoding or decoding a deep learning network.
  • encoding or decoding a deep learning network using a standard normal distribution-based quantization technique for encoding or decoding residual information or residual parameters It relates to methods and devices.
  • AI Artificial intelligence
  • Deep Learning a technology that implements artificial intelligence
  • the capacity of deep learning networks has increased dramatically due to the development of storage and computing devices, which has recently caused many difficulties in data transmission.
  • NNC compression of Neural Network for Multimedia Content Description and Analysis
  • JTC1/SC29/WG4 under ISO/IEC
  • JTC1/SC29/WG4 under ISO/IEC
  • the purpose of this disclosure is to provide a method and device for deep learning network encoding/decoding.
  • the present disclosure seeks to provide a method and device for efficiently quantizing residual information generated from federated learning of a deep learning network.
  • the present disclosure seeks to provide a method and device for reducing the weight of a deep learning network through compression of parameters such as weights of a pre-trained deep learning network in an artificial intelligence system utilizing a deep learning network and its applications.
  • a deep learning network encoding method using a standard normal distribution-based quantization technique includes quantizing a residual parameter, and entropy encoding the quantized residual parameter, wherein the residual parameter is In the quantization step, the importance of the residual parameter is determined based on a predefined threshold using a standard normal distribution, and then one or more of a plurality of quantization techniques is selectively applied based on the determined importance.
  • the step of quantizing the residual parameter includes determining a binary flag for selecting a quantization technique using the average and standard deviation of the residual parameter, and quantizing the residual parameter according to a standard normal distribution. converting the residual parameter to a step of determining the importance of the residual parameter from the standard normal distribution, and using the determined importance and the binary flag to remove the residual parameter using a quantization technique, a binomial quantization technique, a ternary quantization technique, or a cumulative exponential quantization. It includes the step of quantizing by applying any one of the techniques or a combination thereof.
  • the residual parameter may be a residual weight of a deep learning network generated in federated learning.
  • the step of quantizing the residual parameter further includes lowering the dimension of the residual parameter to be quantized, but the dimension of the changed residual parameter is brought to one dimension.
  • the removal quantization technique when the absolute value of the value (z) normalized by the standard normal distribution is smaller than a preset first threshold, the removal quantization technique is selected.
  • the preset first threshold may be 1.
  • the removal quantization technique replaces all residual parameters to which the removal quantization technique is applied with 0.
  • the preset specific section may be a section between 1 and 2.
  • the step of quantizing the residual parameter further includes calculating a probability density function for each layer of the deep learning network, wherein the mean and standard deviation are calculated from the normal distribution of the probability density function. is obtained, and the binary flag for selecting either the binomial quantization technique or the ternary quantization technique is determined.
  • the binary flag is set to True and the binary quantization technique is selected.
  • the binary flag is set to False and the ternary quantization technique is selected.
  • the cumulative exponential quantization technique when the absolute value of the value (z) normalized by the standard normal distribution is greater than a preset second threshold, the cumulative exponential quantization technique is selected.
  • the preset second threshold may be 2.
  • a deep learning network decoding method encoded using a standard normal distribution-based quantization technique includes an entropy decoding step of acquiring a residual parameter to be dequantized and quantization information, and inverse quantizing the residual parameter.
  • Including an inverse quantization step wherein the inverse quantization step includes deriving which quantization technique among a plurality of quantization techniques was applied to the residual parameter encoded from the obtained quantization information, and the corresponding quantization technique according to the confirmation result. It includes the step of deriving the restored residual parameter by applying the corresponding inverse quantization technique.
  • the plurality of quantization techniques include an elimination quantization technique, a binomial quantization technique, a ternary quantization technique, and a cumulative exponential quantization technique.
  • a deep learning network encoding method that performs federated learning through a plurality of clients according to an embodiment of the present disclosure includes generating residual information, which is a difference value of the reference model, from an update model additionally learned by each client. , and quantizing the residual information, wherein the step of quantizing the residual information includes determining the importance of the residual information based on a predefined threshold using a standard normal distribution, and then quantizing the residual information based on the determined importance. Selectively apply one or more of the quantization techniques.
  • a deep learning network system that performs federated learning according to an embodiment of the present disclosure includes a plurality of clients that generate residual information that is the difference value of the reference model from an additionally learned update model, and A central server that receives residual information, generates supplemented residual information, and transmits it to the plurality of clients, wherein the residual information generated by the plurality of clients or the supplemented residual information generated by the central server is a standard normal After determining the importance of residual information based on a predefined threshold using a distribution, the residual information is quantized by selectively applying one or more of a plurality of quantization techniques based on the determined importance.
  • a quantization method for deep learning network encoding includes determining a binary flag for selecting a quantization technique using the average and standard deviation of residual information that is a quantization target, and using the residual information. Converting to a standard normal distribution, determining the importance of the residual information from the standard normal distribution, and using the determined importance and the binary flag to remove the residual information using a quantization technique, a binomial quantization technique, a ternary quantization technique, or It includes the step of quantizing by applying one or a combination of cumulative exponential quantization techniques.
  • the inverse quantization method for deep learning network decoding includes obtaining quantization information for encoded residual information, from the quantization information, the encoded residual information using a binomial quantization technique, A step of deriving which quantization technique is applied, the ternary quantization technique or the cumulative exponential quantization technique, and
  • It includes deriving restored residual information by applying a dequantization technique corresponding to the corresponding quantization technique according to the confirmation result.
  • residual information in deep learning network encoding and decoding, residual information can be efficiently compressed by applying a quantization technique based on a standard normal distribution to the residual information of the deep learning network generated from federated learning. It becomes possible. Specifically, by setting an efficient threshold in the standard normal distribution, it is possible to minimize data loss by maintaining weights that are judged to be of high importance as much as possible. Specifically, according to various embodiments of the present disclosure, it is possible to solve the problem of the prior art that causes large data loss by quantizing positive and negative data excluding 0 in a data set to an average value. In addition, according to various embodiments of the present disclosure, when residual information generated from federated learning must be efficiently transmitted from a central server to various devices, it can be used as a quantization technique that guarantees a high compression rate and low performance degradation. You can.
  • Figure 1 is an example showing a fully connected layer of a deep learning network according to an embodiment of the present disclosure, and is a diagram for explaining parameters occurring in the deep learning network.
  • Figure 2 is a diagram illustrating an example of a service model of federated learning according to an embodiment of the present disclosure.
  • Figure 3 is a diagram for explaining the residual information generation process in federated learning covered by the Compression of Neural Network for Multimedia Content Description and Analysis (NNC) standard, according to an embodiment of the present disclosure.
  • NNC Neural Network for Multimedia Content Description and Analysis
  • Figure 4 is a diagram for explaining the general tendency of residual information generated in federated learning according to an embodiment of the present disclosure.
  • Figure 5 illustrates an NNC encoding and decoding device for explaining the compression process in the NNC standard, according to an embodiment of the present disclosure.
  • Figure 6 is a diagram for explaining the process of a standard normal distribution-based quantization technique for residual weights in federated learning, according to an embodiment of the present disclosure.
  • Figure 7 is a diagram for explaining a flattening process according to an embodiment of the present disclosure.
  • Figure 8 is a diagram for explaining a normal distribution according to an embodiment of the present disclosure.
  • Figure 9 is a diagram for visually showing the criteria for determining True/False of a binary flag (binary_flag), according to an embodiment of the present disclosure.
  • Figure 10 is a diagram for explaining the process of determining the true/false status of a binary flag, according to an embodiment of the present disclosure.
  • Figure 11 is a diagram for explaining a standard normal distribution according to an embodiment of the present disclosure.
  • Figure 12 is a diagram for explaining pruning quantization according to an embodiment of the present disclosure.
  • Figure 13 is a diagram for explaining binary-ternary quantization according to an embodiment of the present disclosure.
  • Figure 14 is a diagram for explaining additive exponent quantization according to an embodiment of the present disclosure.
  • Figure 15 is a diagram illustrating a specific example of cumulative exponential quantization according to an embodiment of the present disclosure.
  • Figures 16 and 17 illustrate a deep learning network encoding method using a standard normal distribution-based quantization technique according to an embodiment of the present disclosure.
  • Figures 18 and 19 illustrate a deep learning network decoding method encoded with a standard normal distribution-based quantization technique according to an embodiment of the present disclosure.
  • Figure 20 illustrates a deep learning network encoding method that performs joint learning through a plurality of clients, according to an embodiment of the present disclosure.
  • Figure 21 illustrates a quantization method for deep learning network encoding according to an embodiment of the present disclosure.
  • Figure 22 illustrates a dequantization method for deep learning network decoding according to an embodiment of the present disclosure.
  • Figure 23 exemplarily shows a content streaming system to which an embodiment according to the present disclosure can be applied.
  • first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another.
  • a first component may be referred to as a second component, and similarly, the second component may be referred to as a first component without departing from the scope of the present disclosure.
  • the term and/or includes any of a plurality of related stated items or a combination of a plurality of related stated items.
  • a component of the present disclosure When a component of the present disclosure is referred to as being “connected” or “connected” to another component, it may be directly connected or connected to the other component, but other components may exist in between. It must be understood that it may be possible. On the other hand, when it is mentioned that a component is “directly connected” or “directly connected” to another component, it should be understood that there are no other components in between.
  • each component is listed and included as a separate component for convenience of explanation, and at least two of each component can be combined to form one component, or one component can be divided into a plurality of components to perform a function, and each of these components can be divided into a plurality of components.
  • Integrated embodiments and separate embodiments of the constituent parts are also included in the scope of the present disclosure as long as they do not deviate from the essence of the present disclosure.
  • Some of the components of the present disclosure may not be essential components that perform essential functions in the present disclosure, but may simply be optional components to improve performance.
  • the present disclosure can be implemented by including only essential components for implementing the essence of the present disclosure, excluding components used only to improve performance, and a structure that includes only essential components excluding optional components used only to improve performance. is also included in the scope of rights of this disclosure.
  • an embodiment of the invention described in this disclosure is characterized by compressing residual information generated by federated learning by applying a new quantization technique, and the technology for implementing this will be described in detail below.
  • the 'federated learning' referred to in this disclosure means distributing a baseline model from a central server to multiple devices, allowing each device to additionally learn the baseline model, and then creating an updated model. ) and a method of collecting residual information of the standard model to create and redistribute a more strengthened model. This will be described in detail later with reference to Figure 2.
  • the present disclosure maintains the concept of the basic module presented by the NNC standard to compress the residual information generated in the joint learning process, but changes the characteristics of the residual information during the joint learning. In consideration of this, we would like to propose variations and modifications to the NNC standard module.
  • residual information' means all information related to residuals, including the above-described residual parameters.
  • the residual parameter may include a residual weight.
  • Figure 1 is an example showing a fully connected layer of a deep learning network according to an embodiment of the present disclosure, and is a diagram for explaining parameters occurring in the deep learning network.
  • a deep learning network consists of numerous layers, and each layer has neurons corresponding to x1 to x3 and y1 to y2, and weights corresponding to W11 to W32, as shown in Figure 1. ), and the bias corresponding to b.
  • Figure 1 is only a simplified conceptual diagram for convenience of explanation, and in reality, the layers of commonly used deep learning models are composed of numerous neurons and weights, so they contain a huge amount of data.
  • neurons are values calculated by weights, and generally naming a pre-trained model can refer to weights and biases determined through learning.
  • the method of storing the weight and bias information varies depending on the deep learning framework.
  • commonly used frameworks include PyTorch or TensorFlow.
  • FIG 2 is a diagram illustrating an example of a service model of federated learning according to an embodiment of the present disclosure.
  • the service model presented in Figure 2 conceptually illustrates a general federated learning scenario for convenience of explanation.
  • the central server 210 distributes a baseline model to each client (clients 221, 223, and 225), each client learns the baseline model using its own data. Thereafter, each of the clients 221, 223, and 225 sends residual information, which is the difference between the learned update model and the reference model, back to the central server 210.
  • the residual information corresponds to the information in Figure 2. ⁇ am.
  • the central server 210 supplements the reference model based on the collected residual information, and distributes the supplemented residual information, which is the difference between the supplemented model and the existing reference model, to each client.
  • the supplemented residual information is shown in Figure 2. corresponds to The above process is performed at every step (epoch).
  • the federated learning method has the advantage of preventing leakage of personal information because the data of the clients 221, 223, and 225 is not directly sent to the central server 210.
  • Figure 3 is a diagram for explaining the residual information generation process in federated learning discussed in the NNC standard, according to an embodiment of the present disclosure.
  • residual information refers to the difference value between the parameters of the additionally learned model and the reference model parameters. That is, in Figure 3 The residual information expressed as at This is the value minus . If there is a difference, the bias is also stored, but the residual information of the bias is generally 0. In other words, the two models that generate residual information must have the same form, and the residual information has the same dimensions as the two models.
  • retraining at each stage does not have a significant impact on the model's weight, and therefore the complemented models at each stage have similar parameters.
  • the residual information which is the difference value of the model at each stage, inevitably has a high percentage of 0, and non-zero values also have values very close to 0.
  • this means that the method for compressing residual information must be different from the technique for compressing the weights of existing learned models.
  • Figure 4 is a diagram for explaining the general tendency of residual information generated in federated learning according to an embodiment of the present disclosure.
  • residual information mostly consists of values that are 0 or close to 0.
  • Figure 4 is a histogram that visually illustrates this, and is a result derived from actual data values for the federated learning scenario corresponding to Figure 2 described above. Referring to the histogram in Figure 4, it can be seen that the ratio of 0 is the highest, and also that the frequency gradually decreases as the distance from 0 increases. In other words, it can be seen from Figure 4 that the residual information data generated from joint learning is in the form of a normal distribution.
  • Figure 5 shows the configuration of an NNC encoding and decoding device to explain the compression process in the NNC standard according to the present disclosure.
  • the NNC encoding device 100 may be configured to include three basic modules. That is, the NNC encoding device 100 includes a parameter reduction (110) module (this is also called a 'parameter removal module') and a parameter quantization (120) module (this is also called a 'parameter quantization module'). ), and an entropy coding (130) module.
  • the parameter removal module 110 is a step for network lightweighting, and may typically include a sparsification process and a pruning process.
  • sparsification of a pre-trained model means retraining the model weight in a way that increases the ratio of values close to 0, and considering the importance of the weight through parameter removal, values with low importance are selected. It means making it 0.
  • importance can refer to the degree to which a parameter affects the deep learning network, and the closer it is to 0, the lower the importance.
  • parameter removal is not generally used for residual information in joint learning, rather than the weights of the learned model, because it is difficult to retrain the residual information.
  • the parameter quantization module 120 performs parameter quantization on the information (eg, residual information) that has undergone the parameter removal.
  • representative methods for quantizing the weights of a learned model include scalar quantization, codebook quantization, and stochastic binary-ternary quantization (SBT quantization).
  • SBT quantization stochastic binary-ternary quantization
  • ‘stochastic binomial-ternary quantization (SBT quantization)’ is mainly used.
  • the SBT quantization of the parameter quantization module is a method of randomly selecting binomial or trinomial quantization based on probability.
  • the SBT quantization seeks to increase compression efficiency by quantizing positive and negative data excluding 0 in the data set to the average value.
  • data values other than 0 are replaced with the average value, causing large data loss, deep learning networks that apply this compression have limitations in that performance may decrease.
  • most of the residual information generated in federated learning has the characteristic of being 0 or a value close to 0.
  • SBT quantization for information having the above characteristics is a method that takes into account the characteristics of the data, and by using this quantization technique, increasing the redundancy of the data can result in increasing the compression rate.
  • the present disclosure seeks to propose a new parameter quantization technique that minimizes performance degradation for residual information that occurs during joint learning, as an element technology supporting the above-mentioned NNC standard.
  • the present disclosure utilizes a standard normal distribution to set the importance of each parameter based on a predefined threshold, and then assigns the importance to each parameter. Accordingly, we propose a method of utilizing different quantization techniques. This will be described in detail later with reference to FIGS. 6 to 15.
  • the entropy encoding module 130 is a technique that can increase compression efficiency through an entropy encoding method that replaces similar values with one unified value.
  • the entropy coding technique is a compression technique that allows the same information to be expressed with fewer bits by varying the number of bits allocated according to the probability of appearance of the value.
  • DeepCABAC Context Adaptive Binary Arithmetic Coding for Deep neural network compression
  • the quantized information e.g., residual information
  • the NNC decoding device 200 may be configured to include two basic modules. That is, the NNC decoding device 200 includes an entropy decoding 210 module and a parameter inverse-quantization 220 module (this is also referred to as a 'parameter inverse-quantization module').
  • the entropy decoding module 210 refers to a process of decoding the bitstream encoded by the entropy encoding module 130 described above.
  • the parameter dequantization module 220 refers to a dequantization process of restoring information (e.g., residual information) quantized by the above-described parameter quantization module 120 to generate restored residual information.
  • Figure 6 is a diagram for explaining the process of a standard normal distribution-based quantization technique for residual weights in federated learning, according to an embodiment of the present disclosure.
  • the process of FIG. 6 may be performed, for example, by the parameter quantization module 120 of FIG. 5 described above.
  • a deep learning network encoding method using a standard normal distribution-based quantization technique includes the steps of quantizing a residual parameter through the parameter quantization module 120, and the entropy encoding. It includes entropy encoding the quantized residual parameter through the module 130.
  • the step of quantizing the residual parameter involves determining the importance of the residual parameter based on a predefined threshold using a standard normal distribution, and then selectively using one or more of a plurality of quantization techniques based on the determined importance. Apply as.
  • the step of quantizing the residual parameter includes determining a binary flag for selecting a quantization technique using the average and standard deviation of the residual parameter, and quantizing the residual parameter according to a standard normal distribution. converting the residual parameter to a step of determining the importance of the residual parameter from the standard normal distribution, and using the determined importance and the binary flag to remove the residual parameter using a quantization technique, a binomial quantization technique, a ternary quantization technique, or a cumulative exponential quantization. It includes the step of quantizing by applying any one of the techniques or a combination thereof.
  • the process of Figure 6 is further explained as follows.
  • residual information generated from federated learning is received as input (S1110).
  • the residual information may be a residual weight and may also be named a residual parameter.
  • the input residual information is in the form of a multidimensional tensor, it is reduced to one dimension through flattening for each layer (S1120).
  • the probability density function calculation step (S1130) for each layer to obtain a normal distribution by obtaining a probability density function for the data of each layer, true/false of the binary flag (binary_flag) is determined based on the normal distribution. (S1140).
  • the normal distribution is converted to a standard normal distribution (S1150), and at least one of three types of quantization techniques or a combination thereof is used based on the position in the standard normal distribution.
  • the quantization techniques proposed in the present disclosure include Pruning Quantization (S1160), Binary-Ternary Quantization (S1170), and Additive Exponent Quantization (S1180).
  • the Binary-Ternary Quantization (S1170) includes the Binary-Ternary Quantization technique (S1171) and the Ternary Quantization technique (S1172), respectively.
  • Figure 7 is a diagram for explaining a flattening process (S1120) according to an embodiment of the present disclosure.
  • the dimension reduction process refers to the process of converting a multidimensional tensor into a one-dimensional tensor in order to handle data more easily.
  • the dimension reduction process when trying to obtain a probability density function for one layer, it may be simpler in terms of data processing to use one-dimensional data rather than data composed of two-dimensional tensors.
  • Figure 8 is a diagram for explaining a normal distribution using probability density function calculation for each layer (S1130) according to an embodiment of the present disclosure.
  • the formula for the probability density function of the normal distribution is the same as Equation 1, and Figure 8 shows the probability density function of the normal distribution.
  • the weighted average of the corresponding layer is the weight distribution, means the weighted standard deviation.
  • the distribution of residual information takes the form of a normal distribution, and since the number of samples is large, it can be expressed in Equation 1 assuming a normal distribution.
  • the first weight standard deviation (- ⁇ ) The probability between the intervals is 68.27%
  • the second weight standard deviation (-2 ⁇ 2 ) The probability between the intervals is 95.45%
  • the third weight standard deviation (-3 ⁇ 3 ) It can be seen that the probability between the sections reaches 99.73%.
  • Figure 9 is a diagram for explaining the binary flag setting (S1140) for each layer according to an embodiment of the present disclosure, and visually illustrates the criteria for determining true/false of the binary flag.
  • the binary flag is a criterion for selecting Binary Quantization (S1171) or Ternary Quantization (S1172) in the Binary-Ternary Quantization process (S1170) among the above-described quantization techniques. do.
  • residual information can be expressed as a normal distribution with 0 as the standard.
  • exceptional cases may occur where the average is not 0 but is a certain positive or negative value.
  • the binary flag is set to True. This is to encourage the use of only one sign in subsequent binomial quantization, as values opposite to the sign of the average are generally judged to be less important.
  • Figure 10 is a diagram for explaining the process of determining true/false of the binary flag according to an embodiment of the present disclosure.
  • Figure 10 expresses what is explained in Figure 9 above in pseudocode.
  • are the weight values of one layer of residual information, and are stored as a one-dimensional tensor with reduced dimension (1010).
  • The mean (1020) and standard deviation (1030) of are derived in the process of calculating the probability density function of the normal distribution described above. For example, when the mean is a positive number, the binary flag is true if the difference between the mean and the standard deviation is positive (1040), and false if it is negative (1050). Conversely, when the mean is negative, the binary flag is true if the sum of the mean and standard deviation is less than 0 (1060), and false if it is greater than 0 (1070).
  • Figure 11 is a diagram for explaining a standard normal distribution transformation step (S1150) according to an embodiment of the present disclosure.
  • the standard normal distribution is a normal distribution of the normal distribution, meaning a normal distribution with a mean of 0 and a standard deviation of 1.
  • the reason for standardizing the normal distribution into the standard normal distribution is for the convenience of calculations. For example, in the probability density function of the normal distribution, the mean and variance are used to find the probability of appearance for a specific value, while in the probability density function of the standard normal distribution, the probability of appearance is calculated directly through z as shown in Figure 11. It becomes possible to obtain it.
  • the above-mentioned standard normal distribution has the advantage of being able to calculate the importance of the weights by simultaneously considering the size and frequency of appearance of the weight values of the residual information, and of being able to more easily set the threshold for subsequent quantization.
  • Equation 2 the formula for calculating the probability density function of the standard normal distribution is as shown in Equation 2, where the input data of x is normalized to z through Equation 3.
  • the probability between the first standard normal distribution (-1 to 1) interval is 68.27%
  • the probability between the second standard normal distribution (-2 to 2) interval is 95.457. %
  • the probability between the 3rd standard normal distribution (-3 ⁇ 3) interval reaches 99.73%.
  • the quantization techniques proposed in this disclosure using the binary flag and standard normal distribution include Pruning Quantization (S1160), Binary-Ternary Quantization (S1170), and Cumulative Exponent Quantization (S1170).
  • Additive Exponent Quantization (S1180) is included, that is, the removal quantization (S1160) can be performed on the least important data.
  • Data judged to be of higher importance are quantized through the binomial-ternary quantization (S1170), and for the values with the highest importance, quantization can be performed while maintaining values as similar to the original as possible through the cumulative exponential quantization (S1180). there is. Therefore, by maintaining values similar to the original for highly important parameters, it is possible to minimize performance degradation due to compression of residual information that occurs in federated learning.
  • the quantization methods will be described in detail.
  • Figure 12 is a diagram for explaining the removal quantization (S1160) according to an embodiment of the present disclosure.
  • the removal quantization method can be used as a quantization technique performed on residual information of the lowest importance according to an embodiment of the present disclosure.
  • a certain threshold e.g., '1', '0.1', etc.
  • values whose absolute value of z is smaller than the above threshold can be defined as values with a high frequency of occurrence but low importance that do not actually have a significant impact on the performance of the model.
  • Figure 13 is a diagram for explaining the binomial-ternary quantization (S1170) according to an embodiment of the present disclosure.
  • the binomial-ternary quantization method can be used as a quantization technique used when the absolute value of z in the standard normal distribution is within a specific range (eg, between 1 and 2).
  • This has the same concept as the stochastic binomial-ternary quantization (SBT quantization) technique, which is one of the quantization techniques of the conventional NNC standard described above, but the criterion for selecting binomial quantization and trinomial quantization is not randomness based on the conventional Bernoulli probability distribution, but The difference is that it is determined by the binary flag set in step S1140. That is, according to an embodiment of the present disclosure, if the binary flag is true, the binary quantization (S1171) can be selected, and if the binary flag is false, the ternary quantization (S1172) can be selected.
  • SBT quantization stochastic binomial-ternary quantization
  • Figure 13 (a) shows a simple example of a binomial quantization technique
  • Figure 13 (b) shows a simple example of a triple quantization technique
  • the binomial quantization (S1171) technique is a quantization technique that compares the average of positive values and the average of negative values and maintains only the characteristics of the sign that has more influence. For example, the sign with the larger average has more influence, and the opposite sign is all 0. In other words, the values of a sign with a large average are replaced with the average of the corresponding sign, thereby increasing redundancy. For example, assuming that the residual information is ⁇ 0,0,1,3,2,0,0,0,-2,-1 ⁇ according to the example in (a) of Figure 13, the average of positive numbers is 2 and the average of negative numbers is 2. The average is -1.5.
  • the above-mentioned binomial quantization (S1171) and ternary quantization (S1172) do not cause data loss as much as the removal quantization technique of FIG. 12, some data loss is inevitable in that various values are replaced with one average value.
  • the absolute value of Z in the standard normal distribution is in a specific range (e.g., between 1 and 2). For this, the binomial quantization (S1171) technique or the ternary quantization (S1172) technique is selectively applied.
  • the above-mentioned binomial quantization (S11710 technique) and/or ternary quantization (S1172) technique is selectively performed on the assumption that only the minimum characteristics need to be left. do.
  • Figure 14 is a diagram for explaining the cumulative exponent quantization (S1180) method according to an embodiment of the present disclosure.
  • the absolute value of z in the standard normal distribution of step S1150 described above may be a quantization technique applied to values greater than a specific threshold (e.g., '2').
  • a specific threshold e.g., '2'
  • the cumulative exponential quantization (S1180) is a quantization technique that utilizes a small number of bits and can maintain a value as similar to the original as possible.
  • Figure 14 shows the cumulative exponential quantization (S1180) process expressed in pseudocode.
  • an array with N elements e.g., 4
  • N elements e.g., 4
  • i is decreased until it becomes smaller than the value to be quantized (1430).
  • the same process as above is performed again, and this process is performed a total of N times (e.g., 4 times), and i determined in each loop statement is input as an element of a pre-initialized array.
  • N times e.g., 4 times
  • Figure 15 illustrates a specific example of the cumulative exponential quantization (S1180) according to an embodiment of the present disclosure.
  • Figure 15 is an example illustrating the process of quantizing the value '0.65' through the cumulative exponential quantization (S1180) technique.
  • the parameters of the input residual information are converted to the standard normal distribution, and then different quantization techniques are used depending on the range of z. .
  • the absolute value of z is less than 1, it is determined to be a parameter of less importance and is replaced with 0 through the removal quantization (S1160).
  • the binomial quantization S1171
  • the trinomial quantization S1172
  • parameters with a z value of 2 or more, which are determined to have the highest importance are quantized using the cumulative exponential quantization (S1180).
  • Figure 16 illustrates a deep learning network encoding method using a standard normal distribution-based quantization technique according to an embodiment of the present disclosure.
  • the deep learning network encoding method determines the importance of the residual parameter based on a predefined threshold using a standard normal distribution, and then selectively applies one or more of a plurality of quantization techniques based on the determined importance. It may include a step of quantizing a residual parameter (S1610), and a step of entropy encoding the quantized residual parameter (S1620).
  • Figure 17 shows detailed steps of the step (S1610) of quantizing the residual parameter of Figure 16 described above. That is, the step of quantizing the residual parameter (S1610) includes determining a binary flag for selecting a quantization technique using the average and standard deviation of the residual parameter (S1611), and converting the residual parameter into a standard normal distribution. Step (S1612), determine the importance of the residual parameter from the standard normal distribution, and use the determined importance and the binary flag to remove the residual parameter quantization technique, binomial quantization technique, trinomial quantization technique, or cumulative exponential quantization. It includes a step (S1613) of quantization by applying one of the techniques or a combination thereof.
  • FIG. 18 illustrates a deep learning network decoding method encoded using a standard normal distribution-based quantization technique, according to an embodiment of the present disclosure.
  • the deep learning network decoding method includes an entropy decoding step (S1810) of acquiring a residual parameter to be dequantized and quantization information, and an inverse quantization step (S1820) of inversely quantizing the residual parameter.
  • FIG 19 shows detailed steps of the inverse quantization step (S1820) of Figure 18 described above.
  • the dequantization step (S1820) includes deriving which quantization technique among a plurality of quantization techniques was applied to the residual parameter encoded from the obtained quantization information (S1821), and determining the corresponding quantization technique according to the confirmation result. It includes a step (S1822) of deriving the restored residual parameter by applying the corresponding inverse quantization technique.
  • the plurality of quantization techniques include an elimination quantization technique, a binomial quantization technique, a ternary quantization technique, and a cumulative exponential quantization technique.
  • Figure 20 illustrates a deep learning network encoding method that performs joint learning through a plurality of clients, according to an embodiment of the present disclosure.
  • the deep learning network encoding method includes generating residual information that is a difference value of a reference model from an update model additionally learned by a client (S2010), and quantizing the residual information (S2020), wherein the residual information
  • the step of quantizing information (S2020) determines the importance of residual information based on a predefined threshold using a standard normal distribution, and then selectively applies one or more of a plurality of quantization techniques based on the determined importance. do.
  • Figure 21 illustrates a quantization method for deep learning network encoding according to an embodiment of the present disclosure.
  • the quantization method includes determining a binary flag for selecting a quantization technique using the average and standard deviation of residual information that is a quantization target (S2110), converting the residual information into a standard normal distribution (S2120), and Determine the importance of the residual information from a normal distribution, and use the determined importance and the binary flag to remove the residual information. Any one or a combination of a quantization technique, a binomial quantization technique, a ternary quantization technique, or a cumulative exponential quantization technique. It includes a step of quantizing by applying (S2220).
  • Figure 22 illustrates a dequantization method for deep learning network decoding according to an embodiment of the present disclosure.
  • the inverse quantization method includes obtaining quantization information for the encoded residual information (S2210), from the quantization information, the encoded residual information is obtained using any quantization technique among the binomial quantization technique, the trinomial quantization technique, or the cumulative exponential quantization technique. It includes a step of deriving whether it has been applied (S2220), and a step of deriving restored residual information by applying an inverse quantization technique corresponding to the corresponding quantization technique according to the confirmation result (S2230).
  • an encoding device or a decoding device that performs a predetermined operation may perform an operation (step) that checks performance conditions or situations for the corresponding operation (step). For example, when it is described that a predetermined operation is performed when a predetermined condition is satisfied, the encoding device or decoding device performs an operation to check whether the predetermined condition is satisfied, and then performs the predetermined operation. You can.
  • various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof.
  • one or more ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DSPDs Digital Signal Processing Devices
  • PLDs Programmable Logic Devices
  • FPGAs Field Programmable Gate Arrays
  • general purpose It can be implemented by a processor (general processor), controller, microcontroller, microprocessor, etc.
  • the decoding device and the encoding device to which embodiments of the present disclosure are applied include multimedia broadcasting transmission and reception devices, mobile communication terminals, home cinema video devices, digital cinema video devices, surveillance cameras, video conversation devices, real-time communication devices such as video communication, mobile devices, etc.
  • OTT video (Over the top video) devices may include game consoles, Blu-ray players, Internet-connected TVs, home theater systems, smartphones, tablet PCs, and DVRs (Digital Video Recorders).
  • FIG 23 is a diagram illustrating a content streaming system to which an embodiment according to the present disclosure can be applied.
  • a content streaming system to which an embodiment of the present disclosure is applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
  • the encoding server compresses content input from multimedia input devices such as smartphones, cameras, CCTV, etc. into digital data, generates a bitstream, and transmits it to the streaming server.
  • multimedia input devices such as smartphones, cameras, CCTV, etc. directly generate bitstreams
  • the encoding server may be omitted.
  • the bitstream may be generated by an encoding method and/or an encoding device to which an embodiment of the present disclosure is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
  • the streaming server transmits multimedia data to the user device based on a user request through a web server, and the web server can serve as a medium to inform the user of what services are available.
  • the web server delivers it to a streaming server, and the streaming server can transmit multimedia data to the user.
  • the content streaming system may include a separate control server, and in this case, the control server may control commands/responses between each device in the content streaming system.
  • the streaming server may receive content from a media repository and/or encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream for a certain period of time.
  • Examples of the user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation, slate PCs, Tablet PC, ultrabook, wearable device (e.g. smartwatch, smart glass, head mounted display), digital TV, desktop There may be computers, digital signage, etc.
  • PDAs personal digital assistants
  • PMPs portable multimedia players
  • navigation slate PCs
  • Tablet PC ultrabook
  • wearable device e.g. smartwatch, smart glass, head mounted display
  • digital TV desktop There may be computers, digital signage, etc.
  • Each server in the content streaming system may be operated as a distributed server, and in this case, data received from each server may be distributedly processed.
  • the scope of the present disclosure is software or machine-executable instructions (e.g., operating system, application, firmware, program, etc.) that cause operations according to the methods of various embodiments to be executed on a device or computer, and such software or It includes non-transitory computer-readable medium in which instructions, etc. are stored and can be executed on a device or computer.
  • software or machine-executable instructions e.g., operating system, application, firmware, program, etc.
  • Embodiments of the present disclosure can be used for encoding or decoding deep learning networks.

Abstract

The present disclosure relates to a method and a device for encoding or decoding of a deep learning network. In particular, the present disclosure relates to a method and a device for deep learning network encoding or decoding using a standard normal distribution-based quantization technique for encoding or decoding of residual information or a residual parameter. A deep learning network encoding method using a standard normal distribution-based quantization technique according to an embodiment of the present disclosure comprises the steps of quantizing a residual parameter, and entropy-encoding the quantized residual parameter. Here, the step of quantizing the residual parameter comprises determining importance of the residual parameter on the basis of a predefined threshold by using a standard normal distribution, and then selectively applying one or more of multiple quantization techniques on the basis of the determined importance.

Description

표준 정규분포 기반 양자화 기법을 이용한 딥러닝 네트워크 부호화/복호화 방법 및 장치Deep learning network encoding/decoding method and device using standard normal distribution-based quantization technique
본 개시는 딥러닝 네트워크((Deep Learning Network)의 부호화 또는 복호화 방법 및 장치에 관한 것으로서, 특히, 잔차 정보 또는 잔차 파라미터의 부호화 또는 복호화를 위해 표준 정규분포 기반 양자화 기법을 이용한 딥러닝 네트워크 부호화 또는 복호화 방법 및 장치에 관한 것이다.The present disclosure relates to a method and device for encoding or decoding a deep learning network. In particular, encoding or decoding a deep learning network using a standard normal distribution-based quantization technique for encoding or decoding residual information or residual parameters. It relates to methods and devices.
최근 저장 장치와 계산 장치의 발전으로 인공지능(AI) 시스템이 빠르게 발전하고 있다. 특히, 이러한 인공지능을 구현하는 기술인 딥러닝(Deep Learning)에 관한 연구가 활발히 이루어지고 있다. 특히, 저장 및 계산 장치의 발전으로 딥러닝 네트워크 또한 용량이 비약적으로 증대함에 따라 최근에는 데이터 전송 시에 많은 어려움을 야기하고 있다. Artificial intelligence (AI) systems are developing rapidly due to recent advances in storage and computing devices. In particular, research on Deep Learning, a technology that implements artificial intelligence, is being actively conducted. In particular, the capacity of deep learning networks has increased dramatically due to the development of storage and computing devices, which has recently caused many difficulties in data transmission.
이에 ISO/IEC 산하 JTC1/SC29/WG4의 표준인 NNC(Compression of Neural Network for Multimedia Content Description and Analysis)는 네트워크 경량화를 위해 파라미터 제거(Parameter Reduction)를 진행한 후, 파라미터 양자화(Parameter Quantization) 및 엔트로피 부호화(Entropy Coding)를 활용하여 딥러닝 네트워크를 압축하는 방안을 제시하였다. 상기 NNC 표준은 이러한 사전 학습된 딥러닝 네트워크의 압축에 관한 표준화에 관한 것으로, 현재는 연합 학습(Federated Learning)시 발생하는 잔차 정보(Residual Information)의 압축을 논의하고 있다.Accordingly, NNC (Compression of Neural Network for Multimedia Content Description and Analysis), a standard of JTC1/SC29/WG4 under ISO/IEC, performs parameter reduction to lighten the network, and then performs parameter quantization and entropy. A method to compress deep learning networks using entropy coding was proposed. The NNC standard concerns standardization of compression of such pre-trained deep learning networks, and currently discusses compression of residual information generated during federated learning.
본 개시는 딥러닝 네트워크 부호화/복호화 하는 방법 및 장치를 제공하는 것을 목적으로 한다.The purpose of this disclosure is to provide a method and device for deep learning network encoding/decoding.
또한, 본 개시는 딥러닝 네트워크의 연합 학습에서 발생하는 잔차 정보를 효율적으로 양자화 하는 방법 및 장치를 제공하고자 한다.Additionally, the present disclosure seeks to provide a method and device for efficiently quantizing residual information generated from federated learning of a deep learning network.
또한, 본 개시는 딥러닝 네트워크를 활용하는 인공지능 시스템 및 그 응용에 있어서, 사전 학습된 딥러닝 네트워크의 가중치 등 파라미터 압축을 통한 딥러닝 네트워크의 경량화 방법 및 장치를 제공하고자 한다. In addition, the present disclosure seeks to provide a method and device for reducing the weight of a deep learning network through compression of parameters such as weights of a pre-trained deep learning network in an artificial intelligence system utilizing a deep learning network and its applications.
본 개시의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있으며, 본 개시의 실시예에 의해 보다 분명하게 알게 될 것이다. 또한, 본 개시의 목적 및 장점들은 특허청구범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.Other objects and advantages of the present disclosure can be understood by the following description and will be more clearly understood by the examples of the present disclosure. In addition, it will be readily apparent that the objects and advantages of the present disclosure can be realized by means and combinations thereof as indicated in the claims.
본 개시의 일 실시예에 따른, 표준 정규분포 기반 양자화 기법을 이용한 딥러닝 네트워크 부호화 방법은, 잔차 파라미터를 양자화 하는 단계, 및 상기 양자화된 잔차 파라미터를 엔트로피 부호화 하는 단계를 포함하되, 상기 잔차 파라미터를 양자화 하는 단계는 표준 정규분포를 활용하여 기정의된 임계값을 기준으로 상기 잔차 파라미터의 중요도를 결정한 후, 상기 결정된 중요도를 기반으로 복수의 양자화 기법들 중 어느 하나 이상을 선택적으로 적용한다. According to an embodiment of the present disclosure, a deep learning network encoding method using a standard normal distribution-based quantization technique includes quantizing a residual parameter, and entropy encoding the quantized residual parameter, wherein the residual parameter is In the quantization step, the importance of the residual parameter is determined based on a predefined threshold using a standard normal distribution, and then one or more of a plurality of quantization techniques is selectively applied based on the determined importance.
또한, 본 개시의 일 실시예에 의하면, 상기 잔차 파라미터를 양자화 하는 단계는, 상기 잔차 파라미터의 평균과 표준편차를 활용하여 양자화 기법 선택을 위한 바이너리 플래그를 결정하는 단계, 상기 잔차 파라미터를 표준 정규분포로 변환하는 단계, 및 상기 표준 정규분포로부터 상기 잔차 파라미터의 중요도를 결정하고, 상기 결정된 중요도와 상기 바이너리 플래그를 활용하여, 상기 잔차 파라미터를 제거 양자화 기법, 이항 양자화 기법, 삼항 양자화 기법 또는 누적 지수 양자화 기법 중 어느 하나 또는 이들의 조합을 적용하여 양자화 하는 단계를 포함한다.In addition, according to an embodiment of the present disclosure, the step of quantizing the residual parameter includes determining a binary flag for selecting a quantization technique using the average and standard deviation of the residual parameter, and quantizing the residual parameter according to a standard normal distribution. converting the residual parameter to a step of determining the importance of the residual parameter from the standard normal distribution, and using the determined importance and the binary flag to remove the residual parameter using a quantization technique, a binomial quantization technique, a ternary quantization technique, or a cumulative exponential quantization. It includes the step of quantizing by applying any one of the techniques or a combination thereof.
또한, 본 개시의 일 실시예에 의하면, 상기 잔차 파라미터는, 연합 학습에서 발생하는 딥러닝 네트워크의 잔차 가중치일 수 있다. Additionally, according to an embodiment of the present disclosure, the residual parameter may be a residual weight of a deep learning network generated in federated learning.
또한, 본 개시의 일 실시예에 의하면, 상기 잔차 파라미터를 양자화 하는 단계는, 양자화 대상 잔차 파라미터의 차원을 낮추는 단계를 더 포함하되, 변경된 잔차 파라미터의 차원은 1차원으로 유도한다. Additionally, according to an embodiment of the present disclosure, the step of quantizing the residual parameter further includes lowering the dimension of the residual parameter to be quantized, but the dimension of the changed residual parameter is brought to one dimension.
또한, 본 개시의 일 실시예에 의하면, 상기 표준 정규분포에 의해 정규화된 값(z)의 절대값이 기설정된 제1 임계값 보다 작은 경우는, 상기 제거 양자화 기법을 선택한다. 여기서, 상기 기설정된 제1 임계값은 1일 수 있다. Additionally, according to an embodiment of the present disclosure, when the absolute value of the value (z) normalized by the standard normal distribution is smaller than a preset first threshold, the removal quantization technique is selected. Here, the preset first threshold may be 1.
또한, 본 개시의 일 실시예에 의하면, 상기 제거 양자화 기법은, 제거 양자화 기법이 적용되는 잔차 파라미터를 모두 0 으로 대체한다. Additionally, according to an embodiment of the present disclosure, the removal quantization technique replaces all residual parameters to which the removal quantization technique is applied with 0.
또한, 본 개시의 일 실시예에 의하면, 상기 표준 정규분포에 의해 정규화된 값(z)의 절대값이 기설정된 특정 구간내에 해당하는 경우는, 상기 이항 양자화 기법 또는 삼항 양자화 기법 중 어느 하나를 선택한다. 여기서, 상기 기설정된 특정 구간은, 1 과 2 사이 구간일 수 있다.In addition, according to an embodiment of the present disclosure, when the absolute value of the value (z) normalized by the standard normal distribution falls within a preset specific interval, either the binomial quantization technique or the trinomial quantization technique is selected. do. Here, the preset specific section may be a section between 1 and 2.
또한, 본 개시의 일 실시예에 의하면, 상기 잔차 파라미터를 양자화 하는 단계는, 딥러닝 네트워크의 레이어별 확률밀도 함수를 계산하는 단계를 더 포함하되, 상기 확률밀도 함수의 정규분포로부터 평균과 표준편차를 구하여, 상기 이항 양자화 기법 또는 삼항 양자화 기법 중 어느 하나를 선택하기 위한 상기 바이너리 플래그를 결정한다.In addition, according to an embodiment of the present disclosure, the step of quantizing the residual parameter further includes calculating a probability density function for each layer of the deep learning network, wherein the mean and standard deviation are calculated from the normal distribution of the probability density function. is obtained, and the binary flag for selecting either the binomial quantization technique or the ternary quantization technique is determined.
또한, 본 개시의 일 실시예에 의하면, 상기 잔차 파라미터 평균과 표준편차의 차의 절대값이 0보다 크면, 상기 바이너리 플래그를 참(True)으로 설정하고 상기 이항 양자화 기법을 선택한다. Additionally, according to an embodiment of the present disclosure, if the absolute value of the difference between the residual parameter mean and standard deviation is greater than 0, the binary flag is set to True and the binary quantization technique is selected.
또한, 본 개시의 일 실시예에 의하면, 상기 잔차 파라미터 평균과 표준편차의 차의 절대값이 0보다 작으면, 상기 바이너리 플래그를 거짓(False)으로 설정하고 상기 삼항 양자화 기법을 선택한다.Additionally, according to an embodiment of the present disclosure, if the absolute value of the difference between the residual parameter mean and the standard deviation is less than 0, the binary flag is set to False and the ternary quantization technique is selected.
또한, 본 개시의 일 실시예에 의하면, 상기 표준 정규분포에 의해 정규화된 값(z)의 절대값이 기설정된 제2 임계값보다 큰 경우는, 상기 누적 지수 양자화 기법을 선택한다. 여기서, 상기 기설정된 제2 임계값은 2일 수 있다. Additionally, according to an embodiment of the present disclosure, when the absolute value of the value (z) normalized by the standard normal distribution is greater than a preset second threshold, the cumulative exponential quantization technique is selected. Here, the preset second threshold may be 2.
또한, 본 개시의 일 실시예에 따른, 표준 정규분포 기반 양자화 기법으로 부호화된 딥러닝 네트워크 복호화 방법은, 역양자화 대상 잔차 파라미터 및 양자화 정보를 획득하는 엔트로피 복호화 단계, 및 상기 잔차 파라미터를 역양자화 하는 역양자화 단계를 포함하되, 상기 역양자화 단계는, 상기 획득된 양자화 정보로부터 부호화된 잔차 파라미터가 복수의 양자화 기법들 중 어느 양자화 기법을 적용하였는 지를 유도하는 단계, 및 상기 확인 결과에 따라 해당 양자화 기법에 대응하는 역양자화 기법을 적용하여 복원된 잔차 파라미터를 유도하는 단계를 포함한다. In addition, a deep learning network decoding method encoded using a standard normal distribution-based quantization technique according to an embodiment of the present disclosure includes an entropy decoding step of acquiring a residual parameter to be dequantized and quantization information, and inverse quantizing the residual parameter. Including an inverse quantization step, wherein the inverse quantization step includes deriving which quantization technique among a plurality of quantization techniques was applied to the residual parameter encoded from the obtained quantization information, and the corresponding quantization technique according to the confirmation result. It includes the step of deriving the restored residual parameter by applying the corresponding inverse quantization technique.
또한, 본 개시의 일 실시예에 의하면, 상기 복수의 양자화 기법들은, 제거 양자화 기법, 이항 양자화 기법, 삼항 양자화 기법 및 누적 지수 양자화 기법을 포함한다.Additionally, according to an embodiment of the present disclosure, the plurality of quantization techniques include an elimination quantization technique, a binomial quantization technique, a ternary quantization technique, and a cumulative exponential quantization technique.
또한, 본 개시의 일 실시예에 따른, 복수의 클라이언트를 통해 연합 학습을 수행하는 딥러닝 네트워크 부호화 방법은, 각 클라이언트에 의해 추가 학습된 업데이트 모델로부터 기준 모델의 차이값인 잔차 정보를 생성하는 단계, 및 상기 잔차 정보를 양자화 하는 단계를 포함하되, 상기 잔차 정보를 양자화 하는 단계는 표준 정규분포를 활용하여 기정의된 임계값을 기준으로 잔차 정보의 중요도를 결정한 후, 상기 결정된 중요도를 기반으로 복수의 양자화 기법들 중 어느 하나 이상을 선택적으로 적용한다.In addition, a deep learning network encoding method that performs federated learning through a plurality of clients according to an embodiment of the present disclosure includes generating residual information, which is a difference value of the reference model, from an update model additionally learned by each client. , and quantizing the residual information, wherein the step of quantizing the residual information includes determining the importance of the residual information based on a predefined threshold using a standard normal distribution, and then quantizing the residual information based on the determined importance. Selectively apply one or more of the quantization techniques.
또한, 본 개시의 일 실시예에 따른, 연합 학습을 수행하는 딥러닝 네트워크 시스템은, 추가 학습된 업데이트 모델로부터 기준 모델의 차이값인 잔차 정보를 생성하는 복수의 클라이언트, 및 상기 복수 클라이언트로부터 생성된 잔차 정보를 수신하여, 보완된 잔차 정보를 생성하여 상기 복수 클라이언트에 전송하는 중앙 서버를 포함하되, 상기 복수 클라이언트에 의해 생성된 잔차 정보 또는 상기 중앙 서버에 의해 생성된 보완된 잔차 정보는, 표준 정규분포를 활용하여 기정의된 임계값을 기준으로 잔차 정보의 중요도를 결정한 후, 상기 결정된 중요도를 기반으로 복수의 양자화 기법들 중 어느 하나 이상을 선택적으로 적용하여 양자화되는 것을 특징으로 한다.In addition, a deep learning network system that performs federated learning according to an embodiment of the present disclosure includes a plurality of clients that generate residual information that is the difference value of the reference model from an additionally learned update model, and A central server that receives residual information, generates supplemented residual information, and transmits it to the plurality of clients, wherein the residual information generated by the plurality of clients or the supplemented residual information generated by the central server is a standard normal After determining the importance of residual information based on a predefined threshold using a distribution, the residual information is quantized by selectively applying one or more of a plurality of quantization techniques based on the determined importance.
또한, 본 개시의 일 실시예에 따른, 딥러닝 네트워크 부호화를 위한, 양자화 방법은, 양자화 대상인 잔차 정보의 평균과 표준편차를 활용하여 양자화 기법 선택을 위한 바이너리 플래그를 결정하는 단계, 상기 잔차 정보를 표준 정규분포로 변환하는 단계, 및 상기 표준 정규분포 로부터 상기 잔차 정보의 중요도를 결정하고, 상기 결정된 중요도와 상기 바이너리 플래그를 활용하여, 상기 잔차 정보를 제거 양자화 기법, 이항 양자화 기법, 삼항 양자화 기법 또는 누적 지수 양자화 기법 중 어느 하나 또는 이들의 조합을 적용하여 양자화 하는 단계를 포함한다.In addition, a quantization method for deep learning network encoding according to an embodiment of the present disclosure includes determining a binary flag for selecting a quantization technique using the average and standard deviation of residual information that is a quantization target, and using the residual information. Converting to a standard normal distribution, determining the importance of the residual information from the standard normal distribution, and using the determined importance and the binary flag to remove the residual information using a quantization technique, a binomial quantization technique, a ternary quantization technique, or It includes the step of quantizing by applying one or a combination of cumulative exponential quantization techniques.
또한, 본 개시의 일 실시예에 따른, 딥러닝 네트워크 복호화를 위한, 역양자화 방법은, 부호화된 잔차 정보에 대한 양자화 정보를 획득하는 단계, 상기 양자화 정보로부터, 부호화된 잔차 정보가 이항 양자화 기법, 삼항 양자화 기법, 또는 누적 지수 양자화 기법 중 어느 양자화 기법을 적용하였는 지를 유도하는 단계, 및In addition, the inverse quantization method for deep learning network decoding according to an embodiment of the present disclosure includes obtaining quantization information for encoded residual information, from the quantization information, the encoded residual information using a binomial quantization technique, A step of deriving which quantization technique is applied, the ternary quantization technique or the cumulative exponential quantization technique, and
상기 확인 결과에 따라 해당 양자화 기법에 대응하는 역양자화 기법을 적용하여 복원된 잔차 정보를 유도하는 단계를 포함한다. It includes deriving restored residual information by applying a dequantization technique corresponding to the corresponding quantization technique according to the confirmation result.
본 개시의 다양한 실시예에 의하면, 딥러닝 네트워크 부호화 및 복호화에 있어서, 연합 학습에서 발생하는 딥러닝 네트워크의 잔차 정보에 대하여 표준 정규분포를 기반으로 하는 양자화 기법을 적용함으로써 잔차 정보를 효율적으로 압축할 수 있게 된다. 구체적으로, 표준 정규분포에서 효율적인 임계치(threshold)를 설정해줌으로써 중요도가 높다고 판단되는 가중치는 최대한 유지하여 데이터 손실을 최소화할 수 있게 된다. 구체적으로, 본 개시의 다양한 실시예에 의하면, 데이터 집합에서 0을 제외한 양수와 음수 데이터에 대하여 평균값으로 양자화 함으로서 큰 데이터 손실을 유발하는 종래 기술의 문제점을 해결할 수 있게 된다. 또한, 본 개시의 다양한 실시예에 의하면, 연합 학습에서 발생하는 잔차 정보를 중앙 서버(central server)에서 다양한 장치로 효율적으로 전송해야 하는 경우, 높은 압축률과 낮은 성능 저하가 보장되는 양자화 기법으로써 활용될 수 있다. According to various embodiments of the present disclosure, in deep learning network encoding and decoding, residual information can be efficiently compressed by applying a quantization technique based on a standard normal distribution to the residual information of the deep learning network generated from federated learning. It becomes possible. Specifically, by setting an efficient threshold in the standard normal distribution, it is possible to minimize data loss by maintaining weights that are judged to be of high importance as much as possible. Specifically, according to various embodiments of the present disclosure, it is possible to solve the problem of the prior art that causes large data loss by quantizing positive and negative data excluding 0 in a data set to an average value. In addition, according to various embodiments of the present disclosure, when residual information generated from federated learning must be efficiently transmitted from a central server to various devices, it can be used as a quantization technique that guarantees a high compression rate and low performance degradation. You can.
도1은 본 개시의 일 실시예에 따른, 딥러닝 네트워크의 완전 연결 계층(fully connected layer)을 나타낸 하나의 예시로, 딥러닝 네트워크에서 발생하는 파라미터를 설명하기 위한 도면이다. Figure 1 is an example showing a fully connected layer of a deep learning network according to an embodiment of the present disclosure, and is a diagram for explaining parameters occurring in the deep learning network.
도2는 본 개시의 일 실시예에 따른, 연합 학습의 서비스 모델의 한 예를 설명하는 도면이다.Figure 2 is a diagram illustrating an example of a service model of federated learning according to an embodiment of the present disclosure.
도3은 본 개시의 일 실시예에 따른, NNC(Compression of Neural Network for Multimedia Content Description and Analysis) 표준에서 다루고 있는 연합 학습에서의 잔차 정보 생성 과정을 설명하기 위한 도면이다. Figure 3 is a diagram for explaining the residual information generation process in federated learning covered by the Compression of Neural Network for Multimedia Content Description and Analysis (NNC) standard, according to an embodiment of the present disclosure.
도4는 본 개시의 일 실시예에 따른, 연합 학습에서 발생하는 잔차 정보의 일반적인 경향성을 설명하기 위한 도면이다. Figure 4 is a diagram for explaining the general tendency of residual information generated in federated learning according to an embodiment of the present disclosure.
도5는 본 개시의 일 실시예에 따른, NNC 표준에서의 압축 과정을 설명하기 위한 NNC 부호화 및 복호화 장치를 도시한 것이다. Figure 5 illustrates an NNC encoding and decoding device for explaining the compression process in the NNC standard, according to an embodiment of the present disclosure.
도6은 본 개시의 일 실시예에 따른, 연합 학습에서의 잔차 가중치를 위한 표준 정규분포 기반 양자화 기법의 과정을 설명하기 위한 도면이다. Figure 6 is a diagram for explaining the process of a standard normal distribution-based quantization technique for residual weights in federated learning, according to an embodiment of the present disclosure.
도7은 본 개시의 일 실시예에 따른, 차원 낮춤 과정(flattening process)을 설명하기 위한 도면이다. Figure 7 is a diagram for explaining a flattening process according to an embodiment of the present disclosure.
도8은 본 개시의 일 실시예에 따른, 정규분포를 설명하기 위한 도면이다. Figure 8 is a diagram for explaining a normal distribution according to an embodiment of the present disclosure.
도9는 본 개시의 일 실시예에 따른, 바이너리 플래그(binary_flag)의 참/거짓(True/False)을 결정하는 기준을 시각적으로 보이기 위한 도면이다. Figure 9 is a diagram for visually showing the criteria for determining True/False of a binary flag (binary_flag), according to an embodiment of the present disclosure.
도10은 본 개시의 일 실시예에 따른, 바이너리 플래그의 참/거짓이 결정되는 과정을 설명하기 위한 도면이다. Figure 10 is a diagram for explaining the process of determining the true/false status of a binary flag, according to an embodiment of the present disclosure.
도11은 본 개시의 일 실시예에 따른, 표준 정규분포를 설명하기 위한 도면이다. Figure 11 is a diagram for explaining a standard normal distribution according to an embodiment of the present disclosure.
도12는 본 개시의 일 실시예에 따른, 제거 양자화(pruning quantization)를 설명하기 위한 도면이다. Figure 12 is a diagram for explaining pruning quantization according to an embodiment of the present disclosure.
도13은 본 개시의 일 실시예에 따른, 이항-삼항 양자화(binary-ternary quantization)를 설명하기 위한 도면이다. Figure 13 is a diagram for explaining binary-ternary quantization according to an embodiment of the present disclosure.
도14는 본 개시의 일 실시예에 따른, 누적 지수 양자화(additive exponent quantization)를 설명하기 위한 도면이다. Figure 14 is a diagram for explaining additive exponent quantization according to an embodiment of the present disclosure.
도15는 본 개시의 일 실시예에 따른, 누적 지수 양자화에 대한 구체적 예시를 도시화한 도면이다. Figure 15 is a diagram illustrating a specific example of cumulative exponential quantization according to an embodiment of the present disclosure.
도16 및 도17은 본 개시의 일 실시예에 따른, 표준 정규분포 기반 양자화 기법을 이용한 딥러닝 네트워크 부호화 방법을 도시한 것이다. Figures 16 and 17 illustrate a deep learning network encoding method using a standard normal distribution-based quantization technique according to an embodiment of the present disclosure.
도18 및 도19는 본 개시의 일 실시예에 따른, 표준 정규분포 기반 양자화 기법으로 부호화된 딥러닝 네트워크 복호화 방법을 도시한 것이다Figures 18 and 19 illustrate a deep learning network decoding method encoded with a standard normal distribution-based quantization technique according to an embodiment of the present disclosure.
도20은 본 개시의 일 실시예에 따른, 복수의 클라이언트를 통해 연합 학습을 수행하는 딥러닝 네트워크 부호화 방법을 도시한 것이다. Figure 20 illustrates a deep learning network encoding method that performs joint learning through a plurality of clients, according to an embodiment of the present disclosure.
도21은 본 개시의 일 실시예에 따른, 딥러닝 네트워크 부호화를 위한, 양자화 방법을 도시한 것이다. Figure 21 illustrates a quantization method for deep learning network encoding according to an embodiment of the present disclosure.
도22는 본 개시의 일 실시예에 따른, 딥러닝 네트워크 복호화를 위한, 역양자화 방법을 도시한 것이다. Figure 22 illustrates a dequantization method for deep learning network decoding according to an embodiment of the present disclosure.
도23은 본 개시에 따른 실시예가 적용될 수 있는 컨텐츠 스트리밍 시스템을 예시적으로 도시한 것이다.Figure 23 exemplarily shows a content streaming system to which an embodiment according to the present disclosure can be applied.
본 개시는 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 개시를 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 개시의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다. 도면에서의 요소들의 형상 및 크기 등은 보다 명확한 설명을 위해 과장될 수 있다. 후술하는 예시적 실시예들에 대한 상세한 설명은, 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 실시예를 실시할 수 있기에 충분하도록 상세히 설명된다. 다양한 실시예들은 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예에 관련하여 본 개시의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 실시예의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 예시적 실시예들의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다.Since the present disclosure can make various changes and have various embodiments, specific embodiments will be illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present disclosure to specific embodiments, and should be understood to include all changes, equivalents, and substitutes included in the spirit and technical scope of the present disclosure. Similar reference numbers in the drawings refer to identical or similar functions across various aspects. The shapes and sizes of elements in the drawings may be exaggerated for clearer explanation. For a detailed description of the exemplary embodiments described below, refer to the accompanying drawings, which illustrate specific embodiments by way of example. These embodiments are described in sufficient detail to enable those skilled in the art to practice the embodiments. It should be understood that the various embodiments are different from one another but are not necessarily mutually exclusive. For example, specific shapes, structures and characteristics described herein with respect to one embodiment may be implemented in other embodiments without departing from the spirit and scope of the disclosure. Additionally, it should be understood that the location or arrangement of individual components within each disclosed embodiment may be changed without departing from the spirit and scope of the embodiment. Accordingly, the detailed description that follows is not to be taken in a limiting sense, and the scope of the exemplary embodiments is limited only by the appended claims, together with all equivalents to what those claims assert if properly described.
본 개시에서 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 개시의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.In the present disclosure, terms such as first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another. For example, a first component may be referred to as a second component, and similarly, the second component may be referred to as a first component without departing from the scope of the present disclosure. The term and/or includes any of a plurality of related stated items or a combination of a plurality of related stated items.
본 개시의 어떤 구성 요소가 다른 구성 요소에 “연결되어” 있다거나 “접속되어” 있다고 언급된 때에는, 그 다른 구성 요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있으나, 중간에 다른 구성 요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component of the present disclosure is referred to as being “connected” or “connected” to another component, it may be directly connected or connected to the other component, but other components may exist in between. It must be understood that it may be possible. On the other hand, when it is mentioned that a component is “directly connected” or “directly connected” to another component, it should be understood that there are no other components in between.
본 개시의 실시예에 나타나는 구성부들은 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시되는 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수 개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 개시의 본질에서 벗어나지 않는 한 본 개시의 권리범위에 포함된다.The components appearing in the embodiments of the present disclosure are shown independently to represent different characteristic functions, and do not mean that each component is comprised of separate hardware or one software component. That is, each component is listed and included as a separate component for convenience of explanation, and at least two of each component can be combined to form one component, or one component can be divided into a plurality of components to perform a function, and each of these components can be divided into a plurality of components. Integrated embodiments and separate embodiments of the constituent parts are also included in the scope of the present disclosure as long as they do not deviate from the essence of the present disclosure.
본 개시에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 개시를 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 개시에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다. 즉, 본 개시에서 특정 구성을 “포함”한다고 기술하는 내용은 해당 구성 이외의 구성을 배제하는 것이 아니며, 추가적인 구성이 본 개시의 실시 또는 본 개시의 기술적 사상의 범위에 포함될 수 있음을 의미한다.The terms used in this disclosure are only used to describe specific embodiments and are not intended to limit the disclosure. Singular expressions include plural expressions unless the context clearly dictates otherwise. In the present disclosure, terms such as “comprise” or “have” are intended to designate the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, but are not intended to indicate the presence of one or more other features. It should be understood that this does not exclude in advance the possibility of the existence or addition of elements, numbers, steps, operations, components, parts, or combinations thereof. In other words, the description of “including” a specific configuration in this disclosure does not exclude configurations other than the configuration, and means that additional configurations may be included in the scope of the implementation of the disclosure or the technical idea of the disclosure.
본 개시의 일부의 구성 요소는 본 개시에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 개시는 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 개시의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 개시의 권리범위에 포함된다.Some of the components of the present disclosure may not be essential components that perform essential functions in the present disclosure, but may simply be optional components to improve performance. The present disclosure can be implemented by including only essential components for implementing the essence of the present disclosure, excluding components used only to improve performance, and a structure that includes only essential components excluding optional components used only to improve performance. is also included in the scope of rights of this disclosure.
이하, 첨부한 도면을 참고로 하여 본 개시의 실시 예에 대하여 본 개시이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 또한 본 명세서의 실시예를 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 명세서의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략하고, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, with reference to the attached drawings, embodiments of the present disclosure will be described in detail so that those skilled in the art can easily practice them. In addition, when describing the embodiments of the present specification, if it is determined that a detailed description of a related known configuration or function may obscure the gist of the present specification, the detailed description is omitted, and the same reference numerals refer to the same components in the drawings. Use and omit duplicate descriptions for the same component.
관련하여, 본 개시에서 설명하는 발명의 일 실시예는, 연합 학습에서 생성된 잔차 정보에 새로운 양자화 기법을 적용하여 압축하는 것을 특징으로 하고 있으며, 이하에서는 이를 구현하기 위한 기술에 대해 상세히 설명한다. In relation to this, an embodiment of the invention described in this disclosure is characterized by compressing residual information generated by federated learning by applying a new quantization technique, and the technology for implementing this will be described in detail below.
우선, 본 개시에서 언급하는 '연합 학습'이란, 중앙 서버(central server)에서 기준 모델(baseline model)을 여러 장치로 배포하여 각 장치에서 기준 모델을 추가 학습하게 한 뒤, 업데이트된 모델(updated model)과 기준 모델의 잔차 정보를 수집하여 더욱 강화된 모델을 만들어 재배포하는 방식의 의미할 수 있다. 이에 대해서는 도2를 참고하여 상세히 후술할 예정이며, 본 개시는 상기 연합 학습 과정에서 발생하는 잔차 정보를 압축하기 위해 NNC 표준이 제시한 기본적인 모듈의 개념은 유지하되, 상기 연합 학습시 잔차 정보의 특성을 고려하여 상기 NNC 표준 모듈의 변형 및 수정을 제안하고자 한다. First, the 'federated learning' referred to in this disclosure means distributing a baseline model from a central server to multiple devices, allowing each device to additionally learn the baseline model, and then creating an updated model. ) and a method of collecting residual information of the standard model to create and redistribute a more strengthened model. This will be described in detail later with reference to Figure 2. The present disclosure maintains the concept of the basic module presented by the NNC standard to compress the residual information generated in the joint learning process, but changes the characteristics of the residual information during the joint learning. In consideration of this, we would like to propose variations and modifications to the NNC standard module.
또한, 본 개시에서 언급하는 '잔차 정보(residual information)'는 전술한 잔차 파라미터(residual parameter)를 포함하여 잔차와 관련된 모든 정보를 의미한다. 여기서, 상기 잔차 파라미터는 잔차 가중치를 포함할 수 있다. 이하 본 개시의 설명에서는 보다 정확한 이해를 위해, 잔차 정보, 잔차 파라미터, 잔차 가중치 용어를 혼용하여 사용한다. Additionally, 'residual information' referred to in this disclosure means all information related to residuals, including the above-described residual parameters. Here, the residual parameter may include a residual weight. Hereinafter, in the description of the present disclosure, the terms residual information, residual parameter, and residual weight are used interchangeably for more accurate understanding.
도1은 본 개시의 일 실시예에 따른, 딥러닝 네트워크의 완전 연결 계층(fully connected layer)을 나타낸 하나의 예시로, 딥러닝 네트워크에서 발생하는 파라미터를 설명하기 위한 도면이다. Figure 1 is an example showing a fully connected layer of a deep learning network according to an embodiment of the present disclosure, and is a diagram for explaining parameters occurring in the deep learning network.
일반적으로, 딥러닝 네트워크는 수많은 레이어(layer)로 구성되며, 각 레이어는 도1에서 도시된 바와 같이 x1~x3와 y1~y2에 해당하는 뉴런(neurons), W11~W32에 해당하는 가중치(weight), 그리고 b에 해당하는 편향(bias)으로 구성되어 있다. 반면, 도1은 설명의 편의를 위해 간략화한 개념도로 제시한 것일뿐, 실제 일반적으로 사용되는 딥러닝 모델의 레이어는 수많은 뉴런 및 가중치로 구성되었기 때문에, 막대한 양의 데이터를 포함하고 있다. 이 중 뉴런은 가중치에 의해 계산이 되는 값이고, 일반적으로 사전 학습된 모델(pre-trained model)로 명명하는 것은 학습을 통해 정해진 가중치 및 편향을 의미할 수 있다. 특히, 상기 가중치 및 편향 정보는 딥러닝 프레임워크(framework)에 따라 저장 방식이 달라지는 바, 예를 들어 범용적으로 사용되는 프레임워크는 파이토치(PyTorch) 혹은 텐서플로우(TensorFlow) 등이 있다. Generally, a deep learning network consists of numerous layers, and each layer has neurons corresponding to x1 to x3 and y1 to y2, and weights corresponding to W11 to W32, as shown in Figure 1. ), and the bias corresponding to b. On the other hand, Figure 1 is only a simplified conceptual diagram for convenience of explanation, and in reality, the layers of commonly used deep learning models are composed of numerous neurons and weights, so they contain a huge amount of data. Among these, neurons are values calculated by weights, and generally naming a pre-trained model can refer to weights and biases determined through learning. In particular, the method of storing the weight and bias information varies depending on the deep learning framework. For example, commonly used frameworks include PyTorch or TensorFlow.
도2는 본 개시의 일 실시예에 따른, 연합 학습의 서비스 모델의 한 예를 설명하는 도면이다. 도2에서 제시하는 서비스 모델은 일반적인 연합 학습의 시나리오를 설명의 편의를 위해 개념적으로 도시한 것이다. 예를 들어, 중앙 서버(210)에서 기준 모델(baseline model)을 각 클라이언트(client, 221, 223, 225)에 배포하면, 각 클라이언트에서는 각자의 고유 데이터를 활용하여 기준 모델을 학습시킨다. 이후, 상기 각 클라이언트(221, 223, 225)는 학습된 업데이트 모델과 기준 모델의 차이값인 잔차 정보를 중앙 서버(210)로 다시 보낸다. 여기서 잔차 정보에 해당하는 것은 도2의
Figure PCTKR2023011047-appb-img-000001
~
Figure PCTKR2023011047-appb-img-000002
이다. 이 후, 상기 중앙 서버(210)에서는 수집한 잔차 정보를 기반으로 기준 모델을 보완하며, 보완된 모델과 기존의 기준 모델의 차이값인 보완된 잔차 정보를 다시 각 클라이언트에 배포하게 된다. 이때 보완된 잔차 정보는 도2의
Figure PCTKR2023011047-appb-img-000003
에 해당한다. 상기 과정을 매 단계(epoch)마다 시행하게 된다. 관련하여, 상기 연합 학습 방식은 클라이언트(221, 223, 225)의 데이터를 직접적으로 중앙 서버(210)로 보내지 않기에 개인 정보의 유출을 막을 수 있다는 장점을 가진다.
Figure 2 is a diagram illustrating an example of a service model of federated learning according to an embodiment of the present disclosure. The service model presented in Figure 2 conceptually illustrates a general federated learning scenario for convenience of explanation. For example, when the central server 210 distributes a baseline model to each client ( clients 221, 223, and 225), each client learns the baseline model using its own data. Thereafter, each of the clients 221, 223, and 225 sends residual information, which is the difference between the learned update model and the reference model, back to the central server 210. Here, the residual information corresponds to the information in Figure 2.
Figure PCTKR2023011047-appb-img-000001
~
Figure PCTKR2023011047-appb-img-000002
am. Afterwards, the central server 210 supplements the reference model based on the collected residual information, and distributes the supplemented residual information, which is the difference between the supplemented model and the existing reference model, to each client. At this time, the supplemented residual information is shown in Figure 2.
Figure PCTKR2023011047-appb-img-000003
corresponds to The above process is performed at every step (epoch). In relation to this, the federated learning method has the advantage of preventing leakage of personal information because the data of the clients 221, 223, and 225 is not directly sent to the central server 210.
도3은 본 개시의 일 실시예에 따른, NNC 표준에서 논의하고 있는 연합 학습에서의 잔차 정보 생성 과정을 설명하기 위한 도면이다. 도3에서 도시한 바와 같이, 잔차 정보란 추가 학습된 모델의 파라미터와 기준 모델 파라미터의 차이 값을 의미한다. 즉, 도3의
Figure PCTKR2023011047-appb-img-000004
로 표현된 잔차 정보는
Figure PCTKR2023011047-appb-img-000005
에서
Figure PCTKR2023011047-appb-img-000006
을 뺀 값이다. 편향 또한 차이가 있으면 그에 해당하는 차이를 저장하지만, 일반적으로 편향의 잔차 정보는 0이 된다. 즉, 잔차 정보를 발생시키는 두 개의 모델은 동일한 형태를 갖추어야 하며, 잔차 정보는 두 개의 모델과 같은 차원을 가진다. 일반적으로 연합 학습에서는 각 단계별 재학습이 모델의 가중치에 큰 영향을 끼치지 않으며, 따라서 각 단계별 보완된 모델끼리 유사한 파라미터를 갖게 된다. 따라서, 각 단계별 모델의 차이값인 잔차 정보는 0의 비율이 높을 수밖에 없으며, 0이 아닌 값 또한 0에 매우 가까운 값을 갖게 된다. 결국 이러한 잔차 정보를 압축하기 위한 방안은 기존의 학습된 모델의 가중치를 압축하는 기법과는 차이가 있어야 함을 의미한다.
Figure 3 is a diagram for explaining the residual information generation process in federated learning discussed in the NNC standard, according to an embodiment of the present disclosure. As shown in Figure 3, residual information refers to the difference value between the parameters of the additionally learned model and the reference model parameters. That is, in Figure 3
Figure PCTKR2023011047-appb-img-000004
The residual information expressed as
Figure PCTKR2023011047-appb-img-000005
at
Figure PCTKR2023011047-appb-img-000006
This is the value minus . If there is a difference, the bias is also stored, but the residual information of the bias is generally 0. In other words, the two models that generate residual information must have the same form, and the residual information has the same dimensions as the two models. In general, in federated learning, retraining at each stage does not have a significant impact on the model's weight, and therefore the complemented models at each stage have similar parameters. Therefore, the residual information, which is the difference value of the model at each stage, inevitably has a high percentage of 0, and non-zero values also have values very close to 0. Ultimately, this means that the method for compressing residual information must be different from the technique for compressing the weights of existing learned models.
도4는 본 개시의 일 실시예에 따른, 연합 학습에서 발생하는 잔차 정보의 일반적인 경향성을 설명하기 위한 도면이다. 전술한 바와 같이, 잔차 정보는 대부분 0 혹은 0에 가까운 값으로 구성된다. 도4는 이를 시각적으로 도시한 히스토그램(Histogram)이며, 전술한 도2에 해당하는 연합 학습 시나리오에 대한 실제 데이터 값을 통해 도출해낸 결과이다. 도4의 히스토그램을 참고하면, 0의 비율이 가장 높음을 알 수 있고, 또한 순차적으로 0에서 멀어질수록 빈도수가 떨어짐을 알 수 있다. 즉, 도4로부터 연합 학습에서 발생하는 잔차 정보 데이터가 정규분포의 형태를 띄고 있음을 알 수 있다. Figure 4 is a diagram for explaining the general tendency of residual information generated in federated learning according to an embodiment of the present disclosure. As described above, residual information mostly consists of values that are 0 or close to 0. Figure 4 is a histogram that visually illustrates this, and is a result derived from actual data values for the federated learning scenario corresponding to Figure 2 described above. Referring to the histogram in Figure 4, it can be seen that the ratio of 0 is the highest, and also that the frequency gradually decreases as the distance from 0 increases. In other words, it can be seen from Figure 4 that the residual information data generated from joint learning is in the form of a normal distribution.
도5는 본 개시에 따른, NNC 표준에서의 압축 과정을 설명하기 위한 NNC 부호화 및 복호화 장치의 구성을 도시한 것이다. 도5에서 도시한 바와 같이, NNC 부호화 장치(100)는 세 가지 기본 모듈을 포함하여 구성될 수 있다. 즉, NNC 부호화 장치(100)는 매개변수 제거(parameter reduction)(110) 모듈 (이는 '파라미터 제거 모듈' 라고도 한다), 매개변수 양자화(parameter quantization)(120) 모듈 (이는 '파라미터 양자화 모듈' 라고도 한다), 및 엔트로피 부호화(entropy coding)(130) 모듈을 포함한다. Figure 5 shows the configuration of an NNC encoding and decoding device to explain the compression process in the NNC standard according to the present disclosure. As shown in FIG. 5, the NNC encoding device 100 may be configured to include three basic modules. That is, the NNC encoding device 100 includes a parameter reduction (110) module (this is also called a 'parameter removal module') and a parameter quantization (120) module (this is also called a 'parameter quantization module'). ), and an entropy coding (130) module.
구체적으로, 상기 파라미터 제거 모듈(110)은 네트워크 경량화를 위한 단계이며, 대표적으로 희소화(sparsification) 과정 및 프루닝(pruning) 과정을 포함할 수 있다. 예를 들어, 사전 학습된 모델에 대한 희소화는 모델 가중치를 0에 가까운 값의 비율을 높이는 방향으로 재학습을 진행하는 것을 의미하며, 상기 파라미터 제거를 통해 가중치의 중요도를 따져 중요도가 낮은 값을 0으로 만드는 것을 의미한다. 여기서 중요도는 파라미터가 딥러닝 네트워크에 영향을 끼치는 정도를 의미할 수 있으며, 0에 가까울수록 중요도가 낮음을 의미한다. 하지만 학습된 모델의 가중치가 아닌 연합 학습에서의 잔차 정보에 대해서는 파라미터 제거를 일반적으로 사용하지는 않는데, 이는 잔차 정보에 대한 재학습을 진행하기 어렵기 때문이다. Specifically, the parameter removal module 110 is a step for network lightweighting, and may typically include a sparsification process and a pruning process. For example, sparsification of a pre-trained model means retraining the model weight in a way that increases the ratio of values close to 0, and considering the importance of the weight through parameter removal, values with low importance are selected. It means making it 0. Here, importance can refer to the degree to which a parameter affects the deep learning network, and the closer it is to 0, the lower the importance. However, parameter removal is not generally used for residual information in joint learning, rather than the weights of the learned model, because it is difficult to retrain the residual information.
상기 파라미터 양자화 모듈(120)은, 상기 파라미터 제거를 거친 정보 (예, 잔차 정보)에 대해서 파라미터 양자화를 수행한다. 예를 들어, 학습된 모델의 가중치를 양자화 하는 방법에는 대표적으로 스칼라 양자화(scalar quantization), 코드북 양자화(codebook quantization) 및 확률적 이항-삼항 양자화(SBT 양자화, Stochastic Binary-Ternary quantization)가 있을 수 있다. 특히, 전술한 잔차 정보를 양자화 하는 경우 주로 '확률적 이항-삼항 양자화 (SBT 양자화)'가 사용된다. The parameter quantization module 120 performs parameter quantization on the information (eg, residual information) that has undergone the parameter removal. For example, representative methods for quantizing the weights of a learned model include scalar quantization, codebook quantization, and stochastic binary-ternary quantization (SBT quantization). . In particular, when quantizing the above-described residual information, ‘stochastic binomial-ternary quantization (SBT quantization)’ is mainly used.
여기서, 상기 파라미터 양자화 모듈의 SBT 양자화는 확률에 기반하여 무작위로 이항 또는 삼항 양자화를 선택하는 방식이다. 상기 SBT 양자화는 데이터 집합에서 0을 제외한 양수와 음수 데이터에 대하여 평균값으로 양자화 함으로써 압축 효율을 높이고자 한다. 그러나 0을 제외한 데이터 값들이 평균값으로 대체하기에 큰 데이터 손실을 일으키므로 해당 압축을 적용한 딥러닝 네트워크는 성능 하락이 발생할 수 있다는 제한 사항이 있다. 예를 들어, 일반적으로 연합 학습에서 발생하는 잔차 정보는 대부분이 0 혹은 0과 가까운 값이라는 특징을 갖고 있다. 상기 특징을 가지는 정보에 대해 SBT 양자화를 활용하는 것은 데이터의 특성을 고려한 방법이며, 이러한 양자화 기법을 활용함으로써 데이터의 중복성(redundancy)을 높이는 것은 압축률을 높일 수 있는 결과를 얻을 수 있게 된다. 하지만 중복성이 높다는 것은 큰 데이터 손실을 의미하며, 이는 곧 성능 저하로 연결되어진다. 이에 본 개시는 전술한 NNC 표준을 지원하는 요소 기술로써, 연합 학습시 발생하는 잔차 정보에 대한 성능 저하를 최소화한 새로운 파라미터 양자화 기법을 제안하고자 한다. 구체적으로, 본 개시는 연합 학습에서 발생하는 잔차 정보를 압축할 시 딥러닝 성능 저하를 막기 위해 표준 정규분포를 활용하여 사전 정의된 임계값을 기준으로 각 파라미터의 중요도를 설정한 후, 각 중요도에 따라 서로 다른 양자화 기법을 활용하는 방법을 제안한다. 이에 대해서는 도6 내지 도15를 참고하여 상세히 후술한다. Here, the SBT quantization of the parameter quantization module is a method of randomly selecting binomial or trinomial quantization based on probability. The SBT quantization seeks to increase compression efficiency by quantizing positive and negative data excluding 0 in the data set to the average value. However, because data values other than 0 are replaced with the average value, causing large data loss, deep learning networks that apply this compression have limitations in that performance may decrease. For example, most of the residual information generated in federated learning has the characteristic of being 0 or a value close to 0. Using SBT quantization for information having the above characteristics is a method that takes into account the characteristics of the data, and by using this quantization technique, increasing the redundancy of the data can result in increasing the compression rate. However, high redundancy means large data loss, which leads to performance degradation. Accordingly, the present disclosure seeks to propose a new parameter quantization technique that minimizes performance degradation for residual information that occurs during joint learning, as an element technology supporting the above-mentioned NNC standard. Specifically, in order to prevent deep learning performance degradation when compressing residual information generated in federated learning, the present disclosure utilizes a standard normal distribution to set the importance of each parameter based on a predefined threshold, and then assigns the importance to each parameter. Accordingly, we propose a method of utilizing different quantization techniques. This will be described in detail later with reference to FIGS. 6 to 15.
또한, 상기 엔트로피 부호화 모듈(130)은, 유사한 값들을 하나의 통일된 값으로 대체하는 엔트로피 부호화 방식을 통해 압축 효율을 높일 수 있는 기법이다. 예를 들어, 상기 엔트로피 부호화 기법은 값의 출현 확률에 따라 할당하는 비트(bit)수를 다르게 하여 같은 정보를 더 적은 비트수로 표현할 수 있게 하는 압축 기법으로써, 예를 들어, DeepCABAC(Context Adaptive Binary Arithmetic Coding for Deep neural network compression)을 적용할 수 있다. 따라서, 상기 양자화를 거친 정보 (예, 잔차 정보)는 최종적으로 상기 엔트로피 부호화 모듈을 거쳐 비트스트림으로 압축되어 전송되어 진다.Additionally, the entropy encoding module 130 is a technique that can increase compression efficiency through an entropy encoding method that replaces similar values with one unified value. For example, the entropy coding technique is a compression technique that allows the same information to be expressed with fewer bits by varying the number of bits allocated according to the probability of appearance of the value. For example, DeepCABAC (Context Adaptive Binary) Arithmetic Coding for Deep neural network compression) can be applied. Therefore, the quantized information (e.g., residual information) is finally compressed into a bitstream and transmitted through the entropy encoding module.
또한, NNC 복호화 장치(200)는 두 가지 기본 모듈을 포함하여 구성될 수 있다. 즉, NNC 복호화 장치(200)는 엔트로피 복호화(entropy decoding)(210) 모듈 및 매개변수 역양자화(parameter inverse-quantization)(220) 모듈 (이는 '파라미터 역양자화 모듈' 라고도 한다)을 포함한다. Additionally, the NNC decoding device 200 may be configured to include two basic modules. That is, the NNC decoding device 200 includes an entropy decoding 210 module and a parameter inverse-quantization 220 module (this is also referred to as a 'parameter inverse-quantization module').
여기서, 상기 엔트로피 복호화 모듈(210)은 전술한 엔트로피 부호화 모듈(130)에 의해 부호화된 비트스트림을 복호화 하는 과정을 의미한다. 또한, 상기 매개변수 역양자화 모듈(220)은, 전술한 상기 파라미터 양자화 모듈(120)에 의해 양자화된 정보 (예, 잔차 정보)를 복원하여 복원된 잔차 정보를 생성하는 역양자화 과정을 의미한다. Here, the entropy decoding module 210 refers to a process of decoding the bitstream encoded by the entropy encoding module 130 described above. In addition, the parameter dequantization module 220 refers to a dequantization process of restoring information (e.g., residual information) quantized by the above-described parameter quantization module 120 to generate restored residual information.
도6은 본 개시의 일 실시예에 따른, 연합 학습에서의 잔차 가중치를 위한 표준 정규분포 기반 양자화 기법의 과정을 설명하기 위한 도면이다. 도6의 과정은, 예를 들어 전술한 도5의 상기 파라미터 양자화 모듈(120)에 의해 수행될 수 있다.Figure 6 is a diagram for explaining the process of a standard normal distribution-based quantization technique for residual weights in federated learning, according to an embodiment of the present disclosure. The process of FIG. 6 may be performed, for example, by the parameter quantization module 120 of FIG. 5 described above.
도 6을 참고하면, 본 개시의 일 실시예에 따른, 표준 정규분포 기반 양자화 기법을 이용한 딥러닝 네트워크 부호화 방법은, 상기 파라미터 양자화 모듈(120)을 통해 잔차 파라미터를 양자화 하는 단계, 및 상기 엔트로피 부호화 모듈(130)을 통해 상기 양자화된 잔차 파라미터를 엔트로피 부호화 하는 단계를 포함한다. 여기서, 상기 잔차 파라미터를 양자화 하는 단계는 표준 정규분포를 활용하여 기정의된 임계값을 기준으로 상기 잔차 파라미터의 중요도를 결정한 후, 상기 결정된 중요도를 기반으로 복수의 양자화 기법들 중 어느 하나 이상을 선택적으로 적용한다. Referring to FIG. 6, a deep learning network encoding method using a standard normal distribution-based quantization technique according to an embodiment of the present disclosure includes the steps of quantizing a residual parameter through the parameter quantization module 120, and the entropy encoding. It includes entropy encoding the quantized residual parameter through the module 130. Here, the step of quantizing the residual parameter involves determining the importance of the residual parameter based on a predefined threshold using a standard normal distribution, and then selectively using one or more of a plurality of quantization techniques based on the determined importance. Apply as.
또한, 본 개시의 일 실시예에 의하면, 상기 잔차 파라미터를 양자화 하는 단계는, 상기 잔차 파라미터의 평균과 표준편차를 활용하여 양자화 기법 선택을 위한 바이너리 플래그를 결정하는 단계, 상기 잔차 파라미터를 표준 정규분포로 변환하는 단계, 및 상기 표준 정규분포로부터 상기 잔차 파라미터의 중요도를 결정하고, 상기 결정된 중요도와 상기 바이너리 플래그를 활용하여, 상기 잔차 파라미터를 제거 양자화 기법, 이항 양자화 기법, 삼항 양자화 기법 또는 누적 지수 양자화 기법 중 어느 하나 또는 이들의 조합을 적용하여 양자화 하는 단계를 포함한다.In addition, according to an embodiment of the present disclosure, the step of quantizing the residual parameter includes determining a binary flag for selecting a quantization technique using the average and standard deviation of the residual parameter, and quantizing the residual parameter according to a standard normal distribution. converting the residual parameter to a step of determining the importance of the residual parameter from the standard normal distribution, and using the determined importance and the binary flag to remove the residual parameter using a quantization technique, a binomial quantization technique, a ternary quantization technique, or a cumulative exponential quantization. It includes the step of quantizing by applying any one of the techniques or a combination thereof.
예를 들어, 도6의 과정을 부언하여 설명하면 다음과 같다. 먼저, 연합 학습에서 발생하는 잔차 정보를 입력으로 받는다(S1110). 이때 잔차 정보는 잔차 가중치일 수 있고, 잔차 파라미터로도 명명될 수 있다. 여기서, 입력된 잔차 정보는 다차원 텐서(Tensor)의 형태를 가지므로, 이를 각 레이어별 차원 낮춤(flattening)을 통해 1차원으로 차원을 낮춘다 (S1120). 또한, 이후 각 레이어별 데이터에 대해서 확률밀도 함수를 구하여 정규분포를 구하는 레이어별 확률밀도 함수 계산 단계 (S1130)를 통해, 상기 정규분포를 기반으로 바이너리 플래그(binary_flag)의 참/거짓 여부를 결정한다 (S1140). 이후, 상기 정규분포는 표준 정규분포로 변환시키고 (S1150), 해당 표준 정규분포에서의 위치를 기반으로 세 종류의 양자화 기법 중 적어도 하나 이상 또는 이들의 조합으로 활용한다. 관련하여, 상기 본 개시에서 제안하는 양자화 기법들은, 제거 양자화(Pruning Quantization)(S1160), 이항-삼항 양자화(Binary-Ternary Quantization)(S1170) 및 누적 지수 양자화(Additive Exponent Quantization)(S1180)를 포함한다, 여기서, 상기 이항-삼항 양자화(Binary-Ternary Quantization)(S1170)는 이항 양자화 기법 (S1171) 및 삼항 양자화 기법 (S1172)를 각각 포함한다. 이하 상기 도6의 각 과정을 도7 내지 도15를 참고하여 상세히 설명한다.For example, the process of Figure 6 is further explained as follows. First, residual information generated from federated learning is received as input (S1110). At this time, the residual information may be a residual weight and may also be named a residual parameter. Here, since the input residual information is in the form of a multidimensional tensor, it is reduced to one dimension through flattening for each layer (S1120). In addition, through the probability density function calculation step (S1130) for each layer to obtain a normal distribution by obtaining a probability density function for the data of each layer, true/false of the binary flag (binary_flag) is determined based on the normal distribution. (S1140). Thereafter, the normal distribution is converted to a standard normal distribution (S1150), and at least one of three types of quantization techniques or a combination thereof is used based on the position in the standard normal distribution. In relation to this, the quantization techniques proposed in the present disclosure include Pruning Quantization (S1160), Binary-Ternary Quantization (S1170), and Additive Exponent Quantization (S1180). Here, the Binary-Ternary Quantization (S1170) includes the Binary-Ternary Quantization technique (S1171) and the Ternary Quantization technique (S1172), respectively. Hereinafter, each process of FIG. 6 will be described in detail with reference to FIGS. 7 to 15.
도7은 본 개시의 일 실시예에 따른, 차원 낮춤 과정(flattening process, S1120)을 설명하기 위한 도면이다. 여기서, 차원 낮춤 과정은, 데이터를 더욱 손쉽게 다루기 위해서 다차원 텐서(tensor)를 1차원 텐서로 바꾸는 과정을 의미한다. 도7의 예시와 같이, 하나의 레이어에 대해 확률밀도 함수를 구하고자 할 때, 2차원 텐서로 구성된 데이터보다는 1차원 데이터를 활용하는 것이 데이터 처리 면에서 더욱 간편할 수 있다. Figure 7 is a diagram for explaining a flattening process (S1120) according to an embodiment of the present disclosure. Here, the dimension reduction process refers to the process of converting a multidimensional tensor into a one-dimensional tensor in order to handle data more easily. As in the example in Figure 7, when trying to obtain a probability density function for one layer, it may be simpler in terms of data processing to use one-dimensional data rather than data composed of two-dimensional tensors.
도8은 본 개시의 일 실시예에 따른, 레이어별 확률밀도 함수 계산(S1130)을 이용한 정규분포를 설명하기 위한 도면이다. 정규분포의 확률밀도 함수의 공식은 수학식1과 같으며, 도8은 정규분포의 확률밀도 함수를 나타낸 것이다. Figure 8 is a diagram for explaining a normal distribution using probability density function calculation for each layer (S1130) according to an embodiment of the present disclosure. The formula for the probability density function of the normal distribution is the same as Equation 1, and Figure 8 shows the probability density function of the normal distribution.
[수학식1] [Equation 1]
Figure PCTKR2023011047-appb-img-000007
Figure PCTKR2023011047-appb-img-000007
이때,
Figure PCTKR2023011047-appb-img-000008
는 해당 레이어의 가중치 평균을 의미하며,
Figure PCTKR2023011047-appb-img-000009
는 가중치 분산,
Figure PCTKR2023011047-appb-img-000010
은 가중치 표준편차를 의미한다. 전술한 도4를 다시 참고하면, 잔차 정보의 분포도는 정규분포의 형태를 띄며, 표본 수 또한 많기에 정규분포를 가정하여 수학식1로 나타낼 수 있다. 예를 들어, 실험적으로 제1 가중치 표준편차 (-
Figure PCTKR2023011047-appb-img-000011
~
Figure PCTKR2023011047-appb-img-000012
) 구간 사이의 확률은 68.27%, 제2 가중치 표준편차 (-2
Figure PCTKR2023011047-appb-img-000013
~ 2
Figure PCTKR2023011047-appb-img-000014
) 구간 사이의 확률은 95.45%, 제3 가중치 표준편차 (-3
Figure PCTKR2023011047-appb-img-000015
~ 3
Figure PCTKR2023011047-appb-img-000016
) 구간 사이의 확률은 99.73% 에 도달함을 알 수 있다. 이는 후술할 표준 정규분포로 변환할 때 사용되며, 정규분포의 확률밀도 함수를 구하기 위해 도출한 가중치 평균과 표준편차는 다음 모듈의 바이너리 플래그(binary_flag)의 참/거짓(True/False) 판단 여부에 활용될 수 있다.
At this time,
Figure PCTKR2023011047-appb-img-000008
means the weighted average of the corresponding layer,
Figure PCTKR2023011047-appb-img-000009
is the weight distribution,
Figure PCTKR2023011047-appb-img-000010
means the weighted standard deviation. Referring again to the above-described Figure 4, the distribution of residual information takes the form of a normal distribution, and since the number of samples is large, it can be expressed in Equation 1 assuming a normal distribution. For example, experimentally, the first weight standard deviation (-
Figure PCTKR2023011047-appb-img-000011
~
Figure PCTKR2023011047-appb-img-000012
) The probability between the intervals is 68.27%, the second weight standard deviation (-2
Figure PCTKR2023011047-appb-img-000013
~ 2
Figure PCTKR2023011047-appb-img-000014
) The probability between the intervals is 95.45%, the third weight standard deviation (-3
Figure PCTKR2023011047-appb-img-000015
~ 3
Figure PCTKR2023011047-appb-img-000016
) It can be seen that the probability between the sections reaches 99.73%. This is used when converting to the standard normal distribution, which will be described later, and the weighted average and standard deviation derived to obtain the probability density function of the normal distribution determine whether the binary flag (binary_flag) of the next module is True/False. It can be utilized.
도9는 본 개시의 일 실시예에 따른, 레이어별 바이너리 플래그 설정(S1140)을 설명하기 위한 도면으로, 상기 바이너리 플래그의 참/거짓을 결정하는 기준을 시각적으로 예시한 것이다. 상기 바이너리 플래그는 전술한 양자화 기법들 중, 이항-삼항 양자화(Binary-Ternary Quantization) 과정(S1170)에서 이항 양자화(Binary Quantization)(S1171) 혹은 삼항 양자화(Ternary Quantization)(S1172)를 선택하는 기준이 된다. 일반적으로 잔차 정보는 0을 기준으로 정규분포로 도시될 수 있다. 즉, 예외적으로 평균이 0이 아닌 특정 양의 값, 혹은 음의 값인 경우도 발생할 수 있다. 이러한 경우 도9에서 도시하는 바와 같이 평균과 표준편차의 차의 절대값이 0보다 크다면, 바이너리 플래그를 참(True)으로 설정한다. 이는 평균의 부호와 반대되는 값들은 일반적으로 중요도가 떨어진다고 판단되어, 이후 이항 양자화에서 한가지 부호만 사용하게끔 유도하기 위한 것이다. Figure 9 is a diagram for explaining the binary flag setting (S1140) for each layer according to an embodiment of the present disclosure, and visually illustrates the criteria for determining true/false of the binary flag. The binary flag is a criterion for selecting Binary Quantization (S1171) or Ternary Quantization (S1172) in the Binary-Ternary Quantization process (S1170) among the above-described quantization techniques. do. In general, residual information can be expressed as a normal distribution with 0 as the standard. In other words, exceptional cases may occur where the average is not 0 but is a certain positive or negative value. In this case, as shown in Figure 9, if the absolute value of the difference between the mean and the standard deviation is greater than 0, the binary flag is set to True. This is to encourage the use of only one sign in subsequent binomial quantization, as values opposite to the sign of the average are generally judged to be less important.
도10은 본 개시의 일 실시예에 따른, 상기 바이너리 플래그의 참/거짓이 결정되는 과정을 설명하기 위한 도면이다. 예를 들어, 도10은 전술한 도9에서 설명하는 바를 의사코드(pseudocode)로 표현한 것이다. Figure 10 is a diagram for explaining the process of determining true/false of the binary flag according to an embodiment of the present disclosure. For example, Figure 10 expresses what is explained in Figure 9 above in pseudocode.
예를 들어,
Figure PCTKR2023011047-appb-img-000017
~
Figure PCTKR2023011047-appb-img-000018
는 잔차 정보의 한 레이어의 가중치 값들이며, 차원을 낮추어 1차원 텐서인 상태로 저장되어 있다 (1010). 이후,
Figure PCTKR2023011047-appb-img-000019
~
Figure PCTKR2023011047-appb-img-000020
의 평균(1020)과 표준편차(1030)는 전술한 정규분포의 확률밀도 함수를 구하는 과정에서 도출된다. 예를 들어, 평균이 양수일 경우, 평균과 표준편차의 차 값이 양수라면 바이너리 플래그는 참이며(1040), 음수라면 거짓이다(1050). 반대로 평균이 음수일 경우, 평균과 표준편차의 합이 0보다 작다면 바이너리 플래그가 참이고(1060), 0보다 더 크다면 거짓이다(1070).
for example,
Figure PCTKR2023011047-appb-img-000017
~
Figure PCTKR2023011047-appb-img-000018
are the weight values of one layer of residual information, and are stored as a one-dimensional tensor with reduced dimension (1010). after,
Figure PCTKR2023011047-appb-img-000019
~
Figure PCTKR2023011047-appb-img-000020
The mean (1020) and standard deviation (1030) of are derived in the process of calculating the probability density function of the normal distribution described above. For example, when the mean is a positive number, the binary flag is true if the difference between the mean and the standard deviation is positive (1040), and false if it is negative (1050). Conversely, when the mean is negative, the binary flag is true if the sum of the mean and standard deviation is less than 0 (1060), and false if it is greater than 0 (1070).
도11은 본 개시의 일 실시예에 따른, 표준 정규분포 변환 단계 (S1150)를 설명하기 위한 도면이다. 표준정규 분포는 정규분포를 표준화한 것으로써, 평균이 0이며 표준편차가 1인 정규분포를 의미한다. 정규분포를 표준 정규분포로 표준화하는 이유는, 계산의 편의 때문이다. 예를 들어, 정규분포의 확률밀도 함수에서는, 특정 값에 대한 출현 확률을 구하기 위하여 평균과 분산을 활용하는 반면, 표준 정규분포의 확률밀도 함수에서는, 도11에서와 같이 z를 통해 바로 출현 확률을 구할 수 있게 된다. Figure 11 is a diagram for explaining a standard normal distribution transformation step (S1150) according to an embodiment of the present disclosure. The standard normal distribution is a normal distribution of the normal distribution, meaning a normal distribution with a mean of 0 and a standard deviation of 1. The reason for standardizing the normal distribution into the standard normal distribution is for the convenience of calculations. For example, in the probability density function of the normal distribution, the mean and variance are used to find the probability of appearance for a specific value, while in the probability density function of the standard normal distribution, the probability of appearance is calculated directly through z as shown in Figure 11. It becomes possible to obtain it.
전술한 표준 정규분포는 잔차 정보의 가중치 값들의 크기 및 출현 빈도를 동시에 고려하여 가중치의 중요도를 산정할 수 있으며, 이후 양자화에서의 임계치를 보다 용이하게 설정할 수 있다는 장점이 있다. The above-mentioned standard normal distribution has the advantage of being able to calculate the importance of the weights by simultaneously considering the size and frequency of appearance of the weight values of the residual information, and of being able to more easily set the threshold for subsequent quantization.
예를 들어, 표준 정규분포의 확률밀도 함수를 구하는 공식은 수학식2와 같으며, 이때 x의 입력 데이터는 수학식3을 통해서 z로 정규화된다. For example, the formula for calculating the probability density function of the standard normal distribution is as shown in Equation 2, where the input data of x is normalized to z through Equation 3.
[수학식2][Equation 2]
Figure PCTKR2023011047-appb-img-000021
Figure PCTKR2023011047-appb-img-000021
[수학식3][Equation 3]
Figure PCTKR2023011047-appb-img-000022
Figure PCTKR2023011047-appb-img-000022
예를 들어, 전술한 도8의 경우를 참고하면, 제1 표준 정규분포 (-1~1) 구간 사이의 확률은 68.27%, 제2 표준 정규분포 (-2~2) 구간 사이의 확률은 95.457%, 제3 표준 정규분포 (-3~3) 구간 사이의 확률은 99.73% 에 도달함을 알 수 있다. For example, referring to the case of Figure 8 above, the probability between the first standard normal distribution (-1 to 1) interval is 68.27%, and the probability between the second standard normal distribution (-2 to 2) interval is 95.457. %, it can be seen that the probability between the 3rd standard normal distribution (-3~3) interval reaches 99.73%.
관련하여, 상기 바이너리 플래그 및 표준 정규분포를 이용한, 본 개시에서 제안하는 양자화 기법들은, 제거 양자화(Pruning Quantization)(S1160), 이항-삼항 양자화(Binary-Ternary Quantization)(S1170) 및 누적 지수 양자화(Additive Exponent Quantization)(S1180)를 포함한다, 즉, 중요도가 가장 떨어지는 데이터에 대해서는 상기 제거 양자화(S1160)를 수행할 수 있다. 반면. 중요도가 더 높다고 판단되는 데이터는 상기 이항-삼항 양자화(S1170)을 통해 양자화되며, 중요도가 가장 높은 값들에 대해서는 상기 누적 지수 양자화(S1180)를 통해 원본과 최대한 유사한 값을 유지하면서 양자화를 수행할 수 있다. 따라서, 중요도가 높은 파라미터에 대해 원본과 유사한 값을 유지함으로써 연합 학습에서 발생하는 잔차 정보의 압축에 대해 성능 저하를 최소화할 수 있게 된다. 이하 상기 양자화 방식들에 대해 상세히 설명한다. In relation to this, the quantization techniques proposed in this disclosure using the binary flag and standard normal distribution include Pruning Quantization (S1160), Binary-Ternary Quantization (S1170), and Cumulative Exponent Quantization (S1170). Additive Exponent Quantization (S1180) is included, that is, the removal quantization (S1160) can be performed on the least important data. On the other hand. Data judged to be of higher importance are quantized through the binomial-ternary quantization (S1170), and for the values with the highest importance, quantization can be performed while maintaining values as similar to the original as possible through the cumulative exponential quantization (S1180). there is. Therefore, by maintaining values similar to the original for highly important parameters, it is possible to minimize performance degradation due to compression of residual information that occurs in federated learning. Hereinafter, the quantization methods will be described in detail.
우선, 도12는 본 개시의 일 실시예에 따른, 상기 제거 양자화(S1160)를 설명하기 위한 도면이다. 상기 제거 양자화 방식은 본 개시의 일 실시예에 따라 중요도가 가장 낮은 잔차 정보에 대해 수행하는 양자화 기법으로 활용될 수 있다. 예를 들어, 전술한 S1150 단계의 표준 정규분포에서 z의 절대값이 특정 임계값 (예, '1', '0.1' 등)보다 작은 값을 전부 0으로 대체하는 방식이다. 이는 z의 절대값이 상기 임계값 보다 작은 값들은 출현 빈도수는 높으나 실질적으로 모델의 성능에 큰 영향을 끼치지 않는 중요도가 떨어지는 값으로 정의할 수 있기 때문이다. 상기 제거 양자화 방식을 통해 빈도수가 높은 값을 0으로 대체함으로써 데이터 손실이 일부 발생할 수 있지만, 그만큼 중복성(redundancy)이 높아지므로 엔트로피 부호화 과정에서 높은 압축률을 달성할 수 있게 된다. 예를 들어, 도12의 예시를 참고하면, 상기 제거 양자화 이전 잔차 가중치가 각각, 0.21, 0.09, 0.05 를 포함할 때, 상기 임계값을 '0.1'로 설정하여 상기 제거 양자화 방식을 적용하면, 양자화된 잔차 가중치는 0.21, 0, 만을 가지게 된다. First, Figure 12 is a diagram for explaining the removal quantization (S1160) according to an embodiment of the present disclosure. The removal quantization method can be used as a quantization technique performed on residual information of the lowest importance according to an embodiment of the present disclosure. For example, in the standard normal distribution in step S1150 described above, all values in which the absolute value of z is smaller than a certain threshold (e.g., '1', '0.1', etc.) are replaced with 0. This is because values whose absolute value of z is smaller than the above threshold can be defined as values with a high frequency of occurrence but low importance that do not actually have a significant impact on the performance of the model. Although some data loss may occur by replacing high-frequency values with 0 through the removal quantization method, redundancy increases accordingly, making it possible to achieve a high compression rate in the entropy encoding process. For example, referring to the example of Figure 12, when the residual weights before the removal quantization include 0.21, 0.09, and 0.05, respectively, if the removal quantization method is applied by setting the threshold to '0.1', quantization The resulting residual weight has only 0.21, 0, and 0.21.
도13은 본 개시의 일 실시예에 따른, 상기 이항-삼항 양자화(S1170)를 설명하기 위한 도면이다. 본 개시의 일 실시예에 의하면, 상기 이항-삼항 양자화 방식은, 상기 표준 정규분포에서 z의 절대값이 특정 구간 (예, 1과 2 사이)일 경우에 사용하는 양자화 기법으로 활용할 수 있다. 이는 전술한 종래 NNC 표준의 양자화 기법 중 하나인 확률적 이항-삼항 양자화 (SBT 양자화) 기법과 개념은 같으나, 이항 양자화와 삼항 양자화를 선택하는 기준이 종래 베르누이 확률분포에 기반한 무작위성이 아닌, 전술한 S1140단계에서 설정된 상기 바이너리 플래그에 의해 결정된다는 차이점이 있다. 즉, 본 개시의 일 실시예에 따르면, 상기 바이너리 플래그가 참일 경우 상기 이항 양자화 (S1171)를 선택하며, 거짓일 경우 상기 삼항 양자화(S1172)를 선택할 수 있다. Figure 13 is a diagram for explaining the binomial-ternary quantization (S1170) according to an embodiment of the present disclosure. According to an embodiment of the present disclosure, the binomial-ternary quantization method can be used as a quantization technique used when the absolute value of z in the standard normal distribution is within a specific range (eg, between 1 and 2). This has the same concept as the stochastic binomial-ternary quantization (SBT quantization) technique, which is one of the quantization techniques of the conventional NNC standard described above, but the criterion for selecting binomial quantization and trinomial quantization is not randomness based on the conventional Bernoulli probability distribution, but The difference is that it is determined by the binary flag set in step S1140. That is, according to an embodiment of the present disclosure, if the binary flag is true, the binary quantization (S1171) can be selected, and if the binary flag is false, the ternary quantization (S1172) can be selected.
예를 들어, 도 13의 (a)는 이항 양자화 기법을, 도13의 (b)는 삼항 양자화 기법에 대한 간단한 예시를 도시하였다. For example, Figure 13 (a) shows a simple example of a binomial quantization technique, and Figure 13 (b) shows a simple example of a triple quantization technique.
관련하여, 상기 이항 양자화 (S1171) 기법은 양수 값의 평균과 음수 값의 평균을 비교하여, 영향을 더 많이 주는 부호에 대한 특성만을 유지하는 양자화 기법이다. 예를 들어, 평균이 큰 부호가 영향을 더 많이 주는 것이며, 반대 부호는 전부 0이 된다. 즉, 평균이 큰 부호의 값들은, 해당 부호의 평균으로 대체되며, 이를 통해 중복성을 높일 수 있게 된다. 예를 들어, 도13의 (a) 예시에 따라 잔차 정보가 {0,0,1,3,2,0,0,0,-2,-1} 이라고 가정하면, 양수의 평균은 2이며 음수의 평균은 -1.5 이다. 따라서, 2는 -1.5의 절대값인 1.5보다 크므로, 양수가 음수보다 영향력이 큰 것으로 해석하고, 이에 따라 음수 값은 전부 0으로 설정한다. 즉, 양수 값인 1과 3은 평균인 2로 대체되어, 결과적으로 -2, -1, 0, 1, 2, 3의 값들로 이루어졌던 텐서는 0과 2로만 표현된 텐서로, {0,0,2,2,2,0,0,0,2,2} 로 양자화되며, 0과 2의 중복성이 높아지게 된다. In relation to this, the binomial quantization (S1171) technique is a quantization technique that compares the average of positive values and the average of negative values and maintains only the characteristics of the sign that has more influence. For example, the sign with the larger average has more influence, and the opposite sign is all 0. In other words, the values of a sign with a large average are replaced with the average of the corresponding sign, thereby increasing redundancy. For example, assuming that the residual information is {0,0,1,3,2,0,0,0,-2,-1} according to the example in (a) of Figure 13, the average of positive numbers is 2 and the average of negative numbers is 2. The average is -1.5. Therefore, since 2 is greater than 1.5, which is the absolute value of -1.5, positive numbers are interpreted as having greater influence than negative numbers, and accordingly, all negative values are set to 0. In other words, the positive values 1 and 3 are replaced by the average 2, and as a result, the tensor consisting of the values of -2, -1, 0, 1, 2, and 3 is a tensor expressed only by 0 and 2, {0,0 ,2,2,2,0,0,0,2,2}, and the redundancy of 0 and 2 increases.
상기 삼항 양자화 (S1172) 기법의 경우, 도13의 (b) 예시에 따라 잔차 정보가 {0,0,1,3,2,0,0,0,-2,-1} 이라고 가정하면, 각 부호(양 및 음)의 평균을 구한 후 양수인 가중치는 양의 평균으로 대체하며 음수인 가중치는 음의 평균으로 대체한다. 즉, 전술한 이항 양자화 기법은 하나의 부호만 유지한 반면, 상기 삼항 양자화 기법은 양쪽 부호를 모두 유지함으로써 데이터 손실을 줄일 수 있게 된다. 예를 들어, 도13의 (b) 예시와 같이, 양수의 값은 양의 평균인 2로, 음수는 음의 평균인 -1.5로 되어, 결국 {0,0,2,2,2,0,0,0,-1.5, -1.5} 로 양자화될 수 있다. 결국, 전술한 이항 양자화 기법보다 더 많은 값(예, '-1.5')을 활용하여 더 많은 특성을 유지할 수 있게 된다. In the case of the ternary quantization (S1172) technique, assuming that the residual information is {0,0,1,3,2,0,0,0,-2,-1} according to the example in (b) of Figure 13, each After calculating the average of the signs (positive and negative), positive weights are replaced with the positive average, and negative weights are replaced with the negative average. That is, while the binomial quantization technique described above maintains only one sign, the ternary quantization technique maintains both signs, thereby reducing data loss. For example, as shown in (b) of Figure 13, positive values become 2, the positive average, and negative values become -1.5, the negative average, resulting in {0,0,2,2,2,0, It can be quantized as 0,0,-1.5, -1.5}. Ultimately, it is possible to maintain more characteristics by utilizing more values (e.g., '-1.5') than the binomial quantization technique described above.
전술한 이항 양자화 (S1171) 및 삼항 양자화 (S1172)는, 전술한 도 12의 제거 양자화 기법만큼 데이터 손실을 발생시키지는 않지만, 다양한 값들을 하나의 평균값으로 대체한다는 점에서 일정 부분 데이터 손실이 불가피하다. 하지만, 본 개시의 일 실시예에서는, 양자화를 진행하는 레이어가 가지는 최소한의 특성을 유지할 수 있다는 장점으로 인해, 표준 정규분포에서 Z의 절대값이 특정 구간 (예, 1과 2 사이) 인 값들에 대해서 상기 이항 양자화 (S1171) 기법 또는 삼항 양자화 (S1172) 기법을 선택적으로 적용한다. 즉, 중요도가 상대적으로 낮은 것도, 높은 것도 아닌 것으로 판단되는 이러한 가중치에 대해서는 최소한의 특성만 남겨도 된다는 가정으로, 전술한 이항 양자화 (S11710 기법 및/또는 삼항 양자화 (S1172) 기법을 선택적으로 수행하게 된다. Although the above-mentioned binomial quantization (S1171) and ternary quantization (S1172) do not cause data loss as much as the removal quantization technique of FIG. 12, some data loss is inevitable in that various values are replaced with one average value. However, in one embodiment of the present disclosure, due to the advantage of maintaining the minimum characteristics of the layer undergoing quantization, the absolute value of Z in the standard normal distribution is in a specific range (e.g., between 1 and 2). For this, the binomial quantization (S1171) technique or the ternary quantization (S1172) technique is selectively applied. In other words, for these weights that are judged to be neither relatively low nor high in importance, the above-mentioned binomial quantization (S11710 technique) and/or ternary quantization (S1172) technique is selectively performed on the assumption that only the minimum characteristics need to be left. do.
도14는 본 개시의 일 실시예에 따른, 상기 누적 지수 양자화 (S1180) 방식을 설명하기 위한 도면이다. 예를 들어, 본 개시의 일 실시예에 의하면, 전술한 S1150 단계의 표준 정규분포에서 z의 절대값이 특정 임계값 (예, '2') 보다 큰 값들에 대해 적용하는 양자화 기법이 될 수 있다. 즉, 상기 누적 지수 양자화 (S1180)는, 적은 비트(bit)수를 활용하며 최대한 원본과 유사한 값을 유지할 수 있는 양자화 기법이다. Figure 14 is a diagram for explaining the cumulative exponent quantization (S1180) method according to an embodiment of the present disclosure. For example, according to an embodiment of the present disclosure, the absolute value of z in the standard normal distribution of step S1150 described above may be a quantization technique applied to values greater than a specific threshold (e.g., '2'). . In other words, the cumulative exponential quantization (S1180) is a quantization technique that utilizes a small number of bits and can maintain a value as similar to the original as possible.
예를 들어, 도14는 상기 누적 지수 양자화 (S1180) 과정을 의사코드(pseudocode)로 표현한 것이다. 먼저, 원소가 N개 (예, 4개) 인 배열을 초기화한다(1410). 이 후 i=0부터 시작하여, 2의 i 승을 구한다 (1420). 다음, 양자화 하려는 값보다 작아질 때까지 i를 감소시킨다 (1430). 예를 들어, 양자화 하려는 파라미터보다 작아지면(1440) i의 감소를 멈추고(1450), 현재 2의 i승을 기준점으로 잡는다 (1460). 상기 기준점으로부터 다시 위와 같은 과정을 진행하며, 이를 총 N번 (예, 4번) 진행하여 각 루프(loop) 문에서 결정되는 i를 미리 초기화해둔 배열의 원소로 입력한다. 상기 과정을 예를 들어 도15를 참고하여 설명하면 다음과 같다. For example, Figure 14 shows the cumulative exponential quantization (S1180) process expressed in pseudocode. First, an array with N elements (e.g., 4) is initialized (1410). After this, starting from i=0, find 2 to the power of i (1420). Next, i is decreased until it becomes smaller than the value to be quantized (1430). For example, when it becomes smaller than the parameter to be quantized (1440), i stops decreasing (1450) and sets the i power of the current 2 as the reference point (1460). From the reference point, the same process as above is performed again, and this process is performed a total of N times (e.g., 4 times), and i determined in each loop statement is input as an element of a pre-initialized array. The above process is explained with reference to FIG. 15 as an example as follows.
도15는 본 개시의 일 실시예에 따른, 상기 누적 지수 양자화 (S1180)에 대한 구체적 예시를 도시화한 것이다. 예를 들어, 도15는 '0.65' 라는 값을 상기 누적 지수 양자화 (S1180) 기법을 통해 양자화 하는 과정을 도시화한 예시이다. Figure 15 illustrates a specific example of the cumulative exponential quantization (S1180) according to an embodiment of the present disclosure. For example, Figure 15 is an example illustrating the process of quantizing the value '0.65' through the cumulative exponential quantization (S1180) technique.
도15를 참고하면, 먼저, i=0 이라면,
Figure PCTKR2023011047-appb-img-000023
는 1이다. 1은 0.65 보다 크므로 i를 -1로 감소시킨다.
Figure PCTKR2023011047-appb-img-000024
은 0.5 이며, 0.5 는 0.65 보다 작으므로 0.5가 기준점이 되며, 배열의 첫 번째 원소로 -1을 삽입한다 (1510). 다음으로, 0.5에 2의 i승을 더하여 0.65 보다 작아질 때까지 i를 감소시킨다. i가 -2이면 0.5 +
Figure PCTKR2023011047-appb-img-000025
은 0.5+0.25인 0.75 이다. i를 다시 감소시키면 0.5 +
Figure PCTKR2023011047-appb-img-000026
이며, 이는 0.5+0.125인 0.625 로 계산된다. 이때, 0.625는 0.65보다 작으므로 0.625 가 기준점이 되며, 배열의 두 번째 원소로 -3을 삽입한다 (1520). 상기 과정을 두 번 더 하면 최종적으로 도15에 도시된 바와 같이 [-1,-3,-6,-7]이라는 1차원 배열을 얻을 수 있다 (1540).
Referring to Figure 15, first, if i=0,
Figure PCTKR2023011047-appb-img-000023
is 1. Since 1 is greater than 0.65, decrease i to -1.
Figure PCTKR2023011047-appb-img-000024
is 0.5, and 0.5 is smaller than 0.65, so 0.5 becomes the reference point, and -1 is inserted as the first element of the array (1510). Next, add i to the power of 2 to 0.5 and decrease i until it becomes less than 0.65. If i is -2 then 0.5 +
Figure PCTKR2023011047-appb-img-000025
is 0.75 which is 0.5+0.25. Decrease i again to 0.5 +
Figure PCTKR2023011047-appb-img-000026
, which is calculated as 0.625, which is 0.5+0.125. At this time, 0.625 is smaller than 0.65, so 0.625 becomes the reference point, and -3 is inserted as the second element of the array (1520). If the above process is repeated twice more, a one-dimensional array of [-1,-3,-6,-7] can be finally obtained as shown in Figure 15 (1540).
도15의 예시로부터, 결과적으로 0.65는 매우 유사한 0.6484375 라는 값으로 근사 시킬 수 있게 된다. 상기 근사된 결과 값 (0.6484375)만 보면, 0.65를 표현하는 데에 필요한 비트수가 더 적어 보일 수도 있다. 그러나 전체 파라미터를 고려하면, 상기 누적 지수 양자화 (S1180) 방식에 따른 정수의 배열로써 표현하는 방법이 중복성을 높이고 결국 엔트로피 부호화에서 높은 압축률을 달성할 수 있게 된다. 또한 상기 누적 지수 양자화 (S1180) 기법은 원본 파라미터와 매우 유사한 값을 복원할 수 있기 때문에, 중요도가 높은 가중치에 적용하기 적합한 양자화 기법으로 활용할 수 있다. 따라서, 중요도가 높다고 판단되는, 예를 들어, 전술한 S1150 단계의 상기 표준 정규분포에서 z의 절대값이 2 이상인 파라미터에 적용하면 보다 효율적일 수 있다. From the example in Figure 15, as a result, 0.65 can be approximated to a very similar value of 0.6484375. Looking only at the approximated result value (0.6484375), it may seem that the number of bits required to express 0.65 is smaller. However, considering all parameters, the method of expressing as an array of integers according to the cumulative exponential quantization (S1180) method increases redundancy and ultimately achieves a high compression rate in entropy coding. Additionally, since the cumulative exponential quantization (S1180) technique can restore values very similar to the original parameters, it can be used as a quantization technique suitable for application to weights of high importance. Therefore, it may be more efficient to apply it to parameters that are judged to be of high importance, for example, the absolute value of z is 2 or more in the standard normal distribution in step S1150 described above.
전술한 도 6 내지 도 15의 과정을 정리하면, 본 개시의 일 실시예에 따르면, 입력 받은 잔차 정보의 파라미터를 상기 표준 정규분포로 변환한 후, z의 범위에 따라 서로 다른 양자화 기법을 활용한다. 예를 들어, z의 절대값이 1보다 작다면 중요도가 떨어지는 파라미터라고 판단하여 상기 제거 양자화(S1160)를 통해 0으로 대체한다. 반면, z의 값이 상기 표준 정규분포에서 1과 2 사이인 파라미터에 대해서는, 최소한의 특성을 살릴 수 있는 상기 이항 양자화(S1171) 또는 상기 삼항 양자화(S1172)를 수행한다. 끝으로, 중요도가 가장 높다고 판단되는, z의 값이 2 이상인 파라미터는, 상기 누적 지수 양자화(S1180)를 활용하여 양자화 한다. 본 개시에서 제안하는 적어도 세 종류의 양자화 기법들을 모두 사용하거나 또는 일부 양자화 기법들을 조합하여 사용함에 의해, 높은 압축률과 낮은 성능 저하를 보장할 수 있게 된다. To summarize the processes of FIGS. 6 to 15 described above, according to an embodiment of the present disclosure, the parameters of the input residual information are converted to the standard normal distribution, and then different quantization techniques are used depending on the range of z. . For example, if the absolute value of z is less than 1, it is determined to be a parameter of less importance and is replaced with 0 through the removal quantization (S1160). On the other hand, for parameters where the value of z is between 1 and 2 in the standard normal distribution, the binomial quantization (S1171) or the trinomial quantization (S1172) that can utilize the minimum characteristics is performed. Finally, parameters with a z value of 2 or more, which are determined to have the highest importance, are quantized using the cumulative exponential quantization (S1180). By using all of the at least three types of quantization techniques proposed in this disclosure or using a combination of some quantization techniques, it is possible to guarantee a high compression rate and low performance degradation.
도16은 본 개시의 일 실시예에 따른, 표준 정규분포 기반 양자화 기법을 이용한 딥러닝 네트워크 부호화 방법을 도시한 것이다. 상기 딥러닝 네트워크 부호화 방법은, 표준 정규분포를 활용하여 기정의된 임계값을 기준으로 상기 잔차 파라미터의 중요도를 결정한 후, 상기 결정된 중요도를 기반으로 복수의 양자화 기법들 중 어느 하나 이상을 선택적으로 적용하는 잔차 파라미터를 양자화 하는 단계 (S1610), 및 상기 양자화된 잔차 파라미터를 엔트로피 부호화 하는 단계(S1620)를 포함하여 구성될 수 있다. Figure 16 illustrates a deep learning network encoding method using a standard normal distribution-based quantization technique according to an embodiment of the present disclosure. The deep learning network encoding method determines the importance of the residual parameter based on a predefined threshold using a standard normal distribution, and then selectively applies one or more of a plurality of quantization techniques based on the determined importance. It may include a step of quantizing a residual parameter (S1610), and a step of entropy encoding the quantized residual parameter (S1620).
도17은 전술한 도16의 잔차 파라미터를 양자화 하는 단계 (S1610)의 세부 단계를 도시한 것이다. 즉, 상기 잔차 파라미터를 양자화 하는 단계 (S1610)는, 상기 잔차 파라미터의 평균과 표준편차를 활용하여 양자화 기법 선택을 위한 바이너리 플래그를 결정하는 단계(S1611), 상기 잔차 파라미터를 표준 정규분포로 변환하는 단계(S1612), 및 상기 표준 정규분포로부터 상기 잔차 파라미터의 중요도를 결정하고, 상기 결정된 중요도와 상기 바이너리 플래그를 활용하여, 상기 잔차 파라미터를 제거 양자화 기법, 이항 양자화 기법, 삼항 양자화 기법 또는 누적 지수 양자화 기법 중 어느 하나 또는 이들의 조합을 적용하여 양자화 하는 단계(S1613)를 포함한다.Figure 17 shows detailed steps of the step (S1610) of quantizing the residual parameter of Figure 16 described above. That is, the step of quantizing the residual parameter (S1610) includes determining a binary flag for selecting a quantization technique using the average and standard deviation of the residual parameter (S1611), and converting the residual parameter into a standard normal distribution. Step (S1612), determine the importance of the residual parameter from the standard normal distribution, and use the determined importance and the binary flag to remove the residual parameter quantization technique, binomial quantization technique, trinomial quantization technique, or cumulative exponential quantization. It includes a step (S1613) of quantization by applying one of the techniques or a combination thereof.
도18은 본 개시의 일 실시예에 따른, 표준 정규분포 기반 양자화 기법으로 부호화된 딥러닝 네트워크 복호화 방법을 도시한 것이다. 상기 딥러닝 네트워크 복호화 방법은, 역양자화 대상 잔차 파라미터 및 양자화 정보를 획득하는 엔트로피 복호화 단계(S1810), 및 상기 잔차 파라미터를 역양자화 하는 역양자화 단계(S1820)를 포함한다. Figure 18 illustrates a deep learning network decoding method encoded using a standard normal distribution-based quantization technique, according to an embodiment of the present disclosure. The deep learning network decoding method includes an entropy decoding step (S1810) of acquiring a residual parameter to be dequantized and quantization information, and an inverse quantization step (S1820) of inversely quantizing the residual parameter.
도19는 전술한 도18의 역양자화 단계 (S1820)의 세부 단계를 도시한 것이다. 상기 역양자화 단계(S1820)는, 상기 획득된 양자화 정보로부터 부호화된 잔차 파라미터가 복수의 양자화 기법들 중 어느 양자화 기법을 적용하였는 지를 유도하는 단계(S1821), 및 상기 확인 결과에 따라 해당 양자화 기법에 대응하는 역양자화 기법을 적용하여 복원된 잔차 파라미터를 유도하는 단계(S1822)를 포함한다. 여기서, 본 개시의 일 실시예에 의하면, 상기 복수의 양자화 기법들은, 제거 양자화 기법, 이항 양자화 기법, 삼항 양자화 기법 및 누적 지수 양자화 기법을 포함한다.Figure 19 shows detailed steps of the inverse quantization step (S1820) of Figure 18 described above. The dequantization step (S1820) includes deriving which quantization technique among a plurality of quantization techniques was applied to the residual parameter encoded from the obtained quantization information (S1821), and determining the corresponding quantization technique according to the confirmation result. It includes a step (S1822) of deriving the restored residual parameter by applying the corresponding inverse quantization technique. Here, according to an embodiment of the present disclosure, the plurality of quantization techniques include an elimination quantization technique, a binomial quantization technique, a ternary quantization technique, and a cumulative exponential quantization technique.
도20은 본 개시의 일 실시예에 따른, 복수의 클라이언트를 통해 연합 학습을 수행하는 딥러닝 네트워크 부호화 방법을 도시한 것이다. 상기 딥러닝 네트워크 부호화 방법은, 클라이언트에 의해 추가 학습된 업데이트 모델로부터 기준 모델의 차이값인 잔차 정보를 생성하는 단계(S2010), 및 상기 잔차 정보를 양자화 하는 단계(S2020)를 포함하되, 상기 잔차 정보를 양자화 하는 단계(S2020)는 표준 정규분포를 활용하여 기정의된 임계값을 기준으로 잔차 정보의 중요도를 결정한 후, 상기 결정된 중요도를 기반으로 복수의 양자화 기법들 중 어느 하나 이상을 선택적으로 적용한다.Figure 20 illustrates a deep learning network encoding method that performs joint learning through a plurality of clients, according to an embodiment of the present disclosure. The deep learning network encoding method includes generating residual information that is a difference value of a reference model from an update model additionally learned by a client (S2010), and quantizing the residual information (S2020), wherein the residual information The step of quantizing information (S2020) determines the importance of residual information based on a predefined threshold using a standard normal distribution, and then selectively applies one or more of a plurality of quantization techniques based on the determined importance. do.
도21은 본 개시의 일 실시예에 따른, 딥러닝 네트워크 부호화를 위한, 양자화 방법을 도시한 것이다. 상기 양자화 방법은, 양자화 대상인 잔차 정보의 평균과 표준편차를 활용하여 양자화 기법 선택을 위한 바이너리 플래그를 결정하는 단계(S2110), 상기 잔차 정보를 표준 정규분포로 변환하는 단계(S2120), 및 상기 표준 정규분포 로부터 상기 잔차 정보의 중요도를 결정하고, 상기 결정된 중요도와 상기 바이너리 플래그를 활용하여, 상기 잔차 정보를 제거 양자화 기법, 이항 양자화 기법, 삼항 양자화 기법 또는 누적 지수 양자화 기법 중 어느 하나 또는 이들의 조합을 적용하여 양자화 하는 단계(S2220)를 포함한다.Figure 21 illustrates a quantization method for deep learning network encoding according to an embodiment of the present disclosure. The quantization method includes determining a binary flag for selecting a quantization technique using the average and standard deviation of residual information that is a quantization target (S2110), converting the residual information into a standard normal distribution (S2120), and Determine the importance of the residual information from a normal distribution, and use the determined importance and the binary flag to remove the residual information. Any one or a combination of a quantization technique, a binomial quantization technique, a ternary quantization technique, or a cumulative exponential quantization technique. It includes a step of quantizing by applying (S2220).
도22는 본 개시의 일 실시예에 따른, 딥러닝 네트워크 복호화를 위한, 역양자화 방법을 도시한 것이다. 상기 역양자화 방법은, 부호화된 잔차 정보에 대한 양자화 정보를 획득하는 단계(S2210), 상기 양자화 정보로부터, 부호화된 잔차 정보가 이항 양자화 기법, 삼항 양자화 기법, 또는 누적 지수 양자화 기법 중 어느 양자화 기법을 적용하였는 지를 유도하는 단계(S2220, 및 상기 확인 결과에 따라 해당 양자화 기법에 대응하는 역양자화 기법을 적용하여 복원된 잔차 정보를 유도하는 단계(S2230)를 포함한다. Figure 22 illustrates a dequantization method for deep learning network decoding according to an embodiment of the present disclosure. The inverse quantization method includes obtaining quantization information for the encoded residual information (S2210), from the quantization information, the encoded residual information is obtained using any quantization technique among the binomial quantization technique, the trinomial quantization technique, or the cumulative exponential quantization technique. It includes a step of deriving whether it has been applied (S2220), and a step of deriving restored residual information by applying an inverse quantization technique corresponding to the corresponding quantization technique according to the confirmation result (S2230).
전술한 본 개시의 예시적인 방법들은 설명의 명확성을 위해서 동작의 시리즈로 표현되어 있지만, 이는 단계가 수행되는 순서를 제한하기 위한 것은 아니며, 필요한 경우에는 각각의 단계가 동시에 또는 상이한 순서로 수행될 수도 있다. 본 개시에 따른 방법을 구현하기 위해서, 예시하는 단계에 추가적으로 다른 단계를 포함하거나, 일부의 단계를 제외하고 나머지 단계를 포함하거나, 또는 일부의 단계를 제외하고 추가적인 다른 단계를 포함할 수도 있다.Although the above-described exemplary methods of the present disclosure are expressed as a series of operations for clarity of explanation, this is not intended to limit the order in which the steps are performed, and each step may be performed simultaneously or in a different order if necessary. there is. In order to implement the method according to the present disclosure, other steps may be included in addition to the exemplified steps, some steps may be excluded and the remaining steps may be included, or some steps may be excluded and additional other steps may be included.
본 개시에 있어서, 소정의 동작(단계)을 수행하는 부호화 장치 또는 복호화 장치는 해당 동작(단계)의 수행 조건이나 상황을 확인하는 동작(단계)을 수행할 수 있다. 예를 들어, 소정의 조건이 만족되는 경우 소정의 동작을 수행한다고 기재된 경우, 부호화 장치 또는 복호화 장치는 상기 소정의 조건이 만족되는지 여부를 확인하는 동작을 수행한 후, 상기 소정의 동작을 수행할 수 있다.In the present disclosure, an encoding device or a decoding device that performs a predetermined operation (step) may perform an operation (step) that checks performance conditions or situations for the corresponding operation (step). For example, when it is described that a predetermined operation is performed when a predetermined condition is satisfied, the encoding device or decoding device performs an operation to check whether the predetermined condition is satisfied, and then performs the predetermined operation. You can.
본 개시의 다양한 실시예는 모든 가능한 조합을 나열한 것이 아니고 본 개시의 대표적인 양상을 설명하기 위한 것이며, 다양한 실시예에서 설명하는 사항들은 독립적으로 적용되거나 또는 둘 이상의 조합으로 적용될 수도 있다.The various embodiments of the present disclosure do not list all possible combinations but are intended to explain representative aspects of the present disclosure, and matters described in the various embodiments may be applied independently or in combination of two or more.
또한, 본 개시의 다양한 실시예는 하드웨어, 펌웨어(firmware), 소프트웨어, 또는 그들의 결합 등에 의해 구현될 수 있다. 하드웨어에 의한 구현의 경우, 하나 또는 그 이상의 ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), 범용 프로세서(general processor), 컨트롤러, 마이크로 컨트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다. Additionally, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. For hardware implementation, one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general purpose It can be implemented by a processor (general processor), controller, microcontroller, microprocessor, etc.
또한, 본 개시의 실시예가 적용된 복호화 장치 및 부호화 장치는 멀티미디어 방송 송수신 장치, 모바일 통신 단말, 홈 시네마 비디오 장치, 디지털 시네마 비디오 장치, 감시용 카메라, 비디오 대화 장치, 비디오 통신과 같은 실시간 통신 장치, 모바일 스트리밍 장치, 저장 매체, 캠코더, 주문형 비디오(VoD) 서비스 제공 장치, OTT 비디오(Over the top video) 장치, 인터넷 스트리밍 서비스 제공 장치, 3차원(3D) 비디오 장치, 화상 전화 비디오 장치, 및 의료용 비디오 장치 등에 포함될 수 있으며, 비디오 신호 또는 데이터 신호를 처리하기 위해 사용될 수 있다. 예를 들어, OTT 비디오(Over the top video) 장치로는 게임 콘솔, 블루레이 플레이어, 인터넷 접속 TV, 홈시어터 시스템, 스마트폰, 태블릿 PC, DVR(Digital Video Recoder) 등을 포함할 수 있다.In addition, the decoding device and the encoding device to which embodiments of the present disclosure are applied include multimedia broadcasting transmission and reception devices, mobile communication terminals, home cinema video devices, digital cinema video devices, surveillance cameras, video conversation devices, real-time communication devices such as video communication, mobile devices, etc. Streaming devices, storage media, camcorders, video on demand (VoD) service provision devices, OTT video (Over the top video) devices, Internet streaming service provision devices, three-dimensional (3D) video devices, video phone video devices, and medical video devices. etc., and may be used to process video signals or data signals. For example, OTT video (Over the top video) devices may include game consoles, Blu-ray players, Internet-connected TVs, home theater systems, smartphones, tablet PCs, and DVRs (Digital Video Recorders).
도23은 본 개시에 따른 실시예가 적용될 수 있는 컨텐츠 스트리밍 시스템을 예시적으로 나타내는 도면이다. 도23에 도시된 바와 같이, 본 개시의 실시예가 적용된 컨텐츠 스트리밍 시스템은 크게 인코딩 서버, 스트리밍 서버, 웹 서버, 미디어 저장소, 사용자 장치 및 멀티미디어 입력 장치를 포함할 수 있다.Figure 23 is a diagram illustrating a content streaming system to which an embodiment according to the present disclosure can be applied. As shown in Figure 23, a content streaming system to which an embodiment of the present disclosure is applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
상기 인코딩 서버는 스마트폰, 카메라, CCTV 등과 같은 멀티미디어 입력 장치들로부터 입력된 컨텐츠를 디지털 데이터로 압축하여 비트스트림을 생성하고 이를 상기 스트리밍 서버로 전송하는 역할을 한다. 다른 예로, 스마트폰, 카메라, CCTV 등과 같은 멀티미디어 입력 장치들이 비트스트림을 직접 생성하는 경우, 상기 인코딩 서버는 생략될 수도 있다.The encoding server compresses content input from multimedia input devices such as smartphones, cameras, CCTV, etc. into digital data, generates a bitstream, and transmits it to the streaming server. As another example, when multimedia input devices such as smartphones, cameras, CCTV, etc. directly generate bitstreams, the encoding server may be omitted.
상기 비트스트림은 본 개시의 실시예가 적용된 부호화 방법 및/또는 부호화 장치에 의해 생성될 수 있고, 상기 스트리밍 서버는 상기 비트스트림을 전송 또는 수신하는 과정에서 일시적으로 상기 비트스트림을 저장할 수 있다.The bitstream may be generated by an encoding method and/or an encoding device to which an embodiment of the present disclosure is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
상기 스트리밍 서버는 웹 서버를 통한 사용자 요청에 기반하여 멀티미디어 데이터를 사용자 장치에 전송하고, 상기 웹 서버는 사용자에게 어떠한 서비스가 있는지를 알려주는 매개체 역할을 할 수 있다. 사용자가 상기 웹 서버에 원하는 서비스를 요청하면, 상기 웹 서버는 이를 스트리밍 서버에 전달하고, 상기 스트리밍 서버는 사용자에게 멀티미디어 데이터를 전송할 수 있다. 이때, 상기 컨텐츠 스트리밍 시스템은 별도의 제어 서버를 포함할 수 있고, 이 경우 상기 제어 서버는 상기 컨텐츠 스트리밍 시스템 내 각 장치 간 명령/응답을 제어하는 역할을 수행할 수 있다.The streaming server transmits multimedia data to the user device based on a user request through a web server, and the web server can serve as a medium to inform the user of what services are available. When a user requests a desired service from the web server, the web server delivers it to a streaming server, and the streaming server can transmit multimedia data to the user. At this time, the content streaming system may include a separate control server, and in this case, the control server may control commands/responses between each device in the content streaming system.
상기 스트리밍 서버는 미디어 저장소 및/또는 인코딩 서버로부터 컨텐츠를 수신할 수 있다. 예를 들어, 상기 인코딩 서버로부터 컨텐츠를 수신하는 경우, 상기 컨텐츠를 실시간으로 수신할 수 있다. 이 경우, 원활한 스트리밍 서비스를 제공하기 위하여 상기 스트리밍 서버는 상기 비트스트림을 일정 시간동안 저장할 수 있다.The streaming server may receive content from a media repository and/or encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream for a certain period of time.
상기 사용자 장치의 예로는, 휴대폰, 스마트 폰(smart phone), 노트북 컴퓨터(laptop computer), 디지털방송용 단말기, PDA(personal digital assistants), PMP(portable multimedia player), 네비게이션, 슬레이트 PC(slate PC), 태블릿 PC(tablet PC), 울트라북(ultrabook), 웨어러블 디바이스(wearable device, 예를 들어, 워치형 단말기 (smartwatch), 글래스형 단말기 (smart glass), HMD(head mounted display)), 디지털 TV, 데스크탑 컴퓨터, 디지털 사이니지 등이 있을 수 있다.Examples of the user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation, slate PCs, Tablet PC, ultrabook, wearable device (e.g. smartwatch, smart glass, head mounted display), digital TV, desktop There may be computers, digital signage, etc.
상기 컨텐츠 스트리밍 시스템 내 각 서버들은 분산 서버로 운영될 수 있으며, 이 경우 각 서버에서 수신하는 데이터는 분산 처리될 수 있다.Each server in the content streaming system may be operated as a distributed server, and in this case, data received from each server may be distributedly processed.
본 개시의 범위는 다양한 실시예의 방법에 따른 동작이 장치 또는 컴퓨터 상에서 실행되도록 하는 소프트웨어 또는 머신-실행가능한 명령들(예를 들어, 운영체제, 애플리케이션, 펌웨어(firmware), 프로그램 등), 및 이러한 소프트웨어 또는 명령 등이 저장되어 장치 또는 컴퓨터 상에서 실행 가능한 비-일시적 컴퓨터-판독가능 매체(non-transitory computer-readable medium)를 포함한다.The scope of the present disclosure is software or machine-executable instructions (e.g., operating system, application, firmware, program, etc.) that cause operations according to the methods of various embodiments to be executed on a device or computer, and such software or It includes non-transitory computer-readable medium in which instructions, etc. are stored and can be executed on a device or computer.
본 개시의 실시예는 딥러닝 네트워크의 부호화 또는 복호화에 이용 가능하다. Embodiments of the present disclosure can be used for encoding or decoding deep learning networks.

Claims (20)

  1. 표준 정규분포 기반 양자화 기법을 이용한 딥러닝 네트워크 부호화 방법에 있어서, In the deep learning network encoding method using a standard normal distribution-based quantization technique,
    잔차 파라미터를 양자화 하는 단계, 및 quantizing the residual parameters, and
    상기 양자화된 잔차 파라미터를 엔트로피 부호화 하는 단계를 포함하되, Entropy encoding the quantized residual parameter,
    상기 잔차 파라미터를 양자화 하는 단계는 표준 정규분포를 활용하여 기정의된 임계값을 기준으로 상기 잔차 파라미터의 중요도를 결정한 후, 상기 결정된 중요도를 기반으로 복수의 양자화 기법들 중 어느 하나 이상을 선택적으로 적용하는, 딥러닝 네트워크 부호화 방법.The step of quantizing the residual parameter involves determining the importance of the residual parameter based on a predefined threshold using a standard normal distribution, and then selectively applying one or more of a plurality of quantization techniques based on the determined importance. Deep learning network encoding method.
  2. 제1항에 있어서, According to paragraph 1,
    상기 잔차 파라미터를 양자화 하는 단계는, The step of quantizing the residual parameter is,
    상기 잔차 파라미터의 평균과 표준편차를 활용하여 양자화 기법 선택을 위한 바이너리 플래그를 결정하는 단계,Determining a binary flag for selecting a quantization technique using the average and standard deviation of the residual parameters,
    상기 잔차 파라미터를 표준 정규분포로 변환하는 단계, 및converting the residual parameters into a standard normal distribution, and
    상기 표준 정규분포로부터 상기 잔차 파라미터의 중요도를 결정하고, 상기 결정된 중요도와 상기 바이너리 플래그를 활용하여, 상기 잔차 파라미터를 제거 양자화 기법, 이항 양자화 기법, 삼항 양자화 기법 또는 누적 지수 양자화 기법 중 어느 하나 또는 이들의 조합을 적용하여 양자화 하는 단계를 포함하는, 딥러닝 네트워크 부호화 방법.Determine the importance of the residual parameter from the standard normal distribution, and use the determined importance and the binary flag to remove the residual parameter by using one or more of a removal quantization technique, a binomial quantization technique, a ternary quantization technique, or a cumulative exponential quantization technique. A deep learning network encoding method including the step of quantizing by applying a combination of.
  3. 제2항에 있어서,According to paragraph 2,
    상기 잔차 파라미터는, 연합 학습에서 발생하는 딥러닝 네트워크의 잔차 가중치인, 딥러닝 네트워크 부호화 방법.The residual parameter is a deep learning network encoding method that is a residual weight of a deep learning network that occurs in federated learning.
  4. 제2항에 있어서, According to paragraph 2,
    상기 잔차 파라미터를 양자화 하는 단계는, The step of quantizing the residual parameter is,
    양자화 대상 잔차 파라미터의 차원을 낮추는 단계를 더 포함하되, 변경된 잔차 파라미터의 차원은 1차원으로 유도하는, 딥러닝 네트워크 부호화 방법. A deep learning network encoding method that further includes the step of lowering the dimension of the residual parameter to be quantized, but inducing the dimension of the changed residual parameter to be one-dimensional.
  5. 제2항에 있어서,According to paragraph 2,
    상기 표준 정규분포에 의해 정규화된 값(z)의 절대값이 기설정된 제1 임계값 보다 작은 경우는, 상기 제거 양자화 기법을 선택하는, 딥러닝 네트워크 부호화 방법.When the absolute value of the value (z) normalized by the standard normal distribution is smaller than a preset first threshold, the deep learning network encoding method selects the removal quantization technique.
  6. 제5항에 있어서,According to clause 5,
    상기 기설정된 제1 임계값은 1인, 딥러닝 네트워크 부호화 방법.A deep learning network encoding method, wherein the preset first threshold is 1.
  7. 제6항에 있어서,According to clause 6,
    상기 제거 양자화 기법은, 제거 양자화 기법이 적용되는 잔차 파라미터를 모두 0 으로 대체하는, 딥러닝 네트워크 부호화 방법.The removal quantization technique is a deep learning network encoding method in which all residual parameters to which the removal quantization technique is applied are replaced with 0.
  8. 제2항에 있어서,According to paragraph 2,
    상기 표준 정규분포에 의해 정규화된 값(z)의 절대값이 기설정된 특정 구간내에 해당하는 경우는, 상기 이항 양자화 기법 또는 삼항 양자화 기법 중 어느 하나를 선택하는, 딥러닝 네트워크 부호화 방법.A deep learning network encoding method in which, when the absolute value of the value (z) normalized by the standard normal distribution falls within a preset specific interval, one of the binomial quantization technique or the trinomial quantization technique is selected.
  9. 제8항에 있어서,According to clause 8,
    상기 기설정된 특정 구간은, 1 과 2 사이 구간인, 딥러닝 네트워크 부호화 방법.The preset specific section is a section between 1 and 2, a deep learning network encoding method.
  10. 제8항에 있어서, According to clause 8,
    상기 잔차 파라미터를 양자화 하는 단계는, The step of quantizing the residual parameter is,
    딥러닝 네트워크의 레이어별 확률밀도 함수를 계산하는 단계를 더 포함하되, 상기 확률밀도 함수의 정규분포로부터 평균과 표준편차를 구하여, 상기 이항 양자화 기법 또는 삼항 양자화 기법 중 어느 하나를 선택하기 위한 상기 바이너리 플래그를 결정하는, 딥러닝 네트워크 부호화 방법. It further includes the step of calculating a probability density function for each layer of the deep learning network, wherein the mean and standard deviation are calculated from the normal distribution of the probability density function, and the binary for selecting either the binomial quantization technique or the trinomial quantization technique. Deep learning network encoding method for determining flags.
  11. 제10항에 있어서, According to clause 10,
    상기 잔차 파라미터 평균과 표준편차의 차의 절대값이 0보다 크면, 상기 바이너리 플래그를 참(True)으로 설정하고 상기 이항 양자화 기법을 선택하는, 딥러닝 네트워크 부호화 방법. If the absolute value of the difference between the residual parameter mean and standard deviation is greater than 0, the binary flag is set to True and the binomial quantization technique is selected.
  12. 제10항에 있어서, According to clause 10,
    상기 잔차 파라미터 평균과 표준편차의 차의 절대값이 0보다 작으면, 상기 바이너리 플래그를 거짓(False)으로 설정하고 상기 삼항 양자화 기법을 선택하는, 딥러닝 네트워크 부호화 방법. If the absolute value of the difference between the residual parameter mean and the standard deviation is less than 0, the binary flag is set to False and the ternary quantization technique is selected.
  13. 제2항에 있어서,According to paragraph 2,
    상기 표준 정규분포에 의해 정규화된 값(z)의 절대값이 기설정된 제2 임계값보다 큰 경우는, 상기 누적 지수 양자화 기법을 선택하는, 딥러닝 네트워크 부호화 방법.When the absolute value of the value (z) normalized by the standard normal distribution is greater than a preset second threshold, the deep learning network encoding method selects the cumulative exponential quantization technique.
  14. 제13항에 있어서,According to clause 13,
    상기 기설정된 제2 임계값은 2인, 딥러닝 네트워크 부호화 방법.The deep learning network encoding method wherein the preset second threshold is 2.
  15. 표준 정규분포 기반 양자화 기법으로 부호화된 딥러닝 네트워크 복호화 방법에 있어서, In the deep learning network decoding method encoded with a standard normal distribution-based quantization technique,
    역양자화 대상 잔차 파라미터 및 양자화 정보를 획득하는 엔트로피 복호화 단계, 및An entropy decoding step of acquiring residual parameters and quantization information to be dequantized, and
    상기 잔차 파라미터를 역양자화 하는 역양자화 단계를 포함하되,Including an inverse quantization step of inverse quantizing the residual parameter,
    상기 역양자화 단계는, 상기 획득된 양자화 정보로부터 부호화된 잔차 파라미터가 복수의 양자화 기법들 중 어느 양자화 기법을 적용하였는 지를 유도하는 단계, 및 상기 확인 결과에 따라 해당 양자화 기법에 대응하는 역양자화 기법을 적용하여 복원된 잔차 파라미터를 유도하는 단계를 포함하는, 딥러닝 네트워크 복호화 방법.The inverse quantization step includes deriving which quantization technique among a plurality of quantization techniques has been applied to the encoded residual parameter from the obtained quantization information, and determining an inverse quantization technique corresponding to the corresponding quantization technique according to the confirmation result. A deep learning network decoding method including the step of deriving a restored residual parameter by applying it.
  16. 제15항에 있어서,According to clause 15,
    상기 복수의 양자화 기법들은, 제거 양자화 기법, 이항 양자화 기법, 삼항 양자화 기법 및 누적 지수 양자화 기법을 포함하는, 딥러닝 네트워크 복호화 방법.The plurality of quantization techniques include a removal quantization technique, a binomial quantization technique, a ternary quantization technique, and a cumulative exponential quantization technique.
  17. 복수의 클라이언트를 통해 연합 학습을 수행하는 딥러닝 네트워크 부호화 방법에 있어서, In a deep learning network encoding method that performs federated learning through multiple clients,
    상기 클라이언트에 의해 추가 학습된 업데이트 모델로부터 기준 모델의 차이값인 잔차 정보를 생성하는 단계, 및Generating residual information, which is a difference value of the reference model, from the update model additionally learned by the client, and
    상기 잔차 정보를 양자화 하는 단계를 포함하되, Including the step of quantizing the residual information,
    상기 잔차 정보를 양자화 하는 단계는 표준 정규분포를 활용하여 기정의된 임계값을 기준으로 잔차 정보의 중요도를 결정한 후, 상기 결정된 중요도를 기반으로 복수의 양자화 기법들 중 어느 하나 이상을 선택적으로 적용하는, 연합 학습을 수행하는 딥러닝 네트워크 부호화 방법.The step of quantizing the residual information includes determining the importance of the residual information based on a predefined threshold using a standard normal distribution, and then selectively applying one or more of a plurality of quantization techniques based on the determined importance. , A deep learning network encoding method that performs federated learning.
  18. 연합 학습을 수행하는 딥러닝 네트워크 시스템에 있어서, In a deep learning network system that performs federated learning,
    추가 학습된 업데이트 모델로부터 기준 모델의 차이값인 잔차 정보를 생성하는 복수의 클라이언트, 및A plurality of clients that generate residual information, which is the difference value of the reference model, from the additionally learned update model, and
    상기 복수 클라이언트로부터 생성된 잔차 정보를 수신하여, 보완된 잔차 정보를 생성하여 상기 복수 클라이언트에 전송하는 중앙 서버를 포함하되,A central server that receives residual information generated from the plurality of clients, generates supplemented residual information, and transmits it to the plurality of clients,
    상기 복수 클라이언트에 의해 생성된 상기 잔차 정보 또는 상기 중앙 서버에 의해 생성된 상기 보완된 잔차 정보는, 표준 정규분포를 활용하여 기정의된 임계값을 기준으로 잔차 정보의 중요도를 결정한 후, 상기 결정된 중요도를 기반으로 복수의 양자화 기법들 중 어느 하나 이상을 선택적으로 적용하여 양자화되는 것을 특징으로 하는, 연합 학습을 수행하는 딥러닝 네트워크 시스템.The residual information generated by the plurality of clients or the supplemented residual information generated by the central server determines the importance of the residual information based on a predefined threshold using a standard normal distribution, and then determines the importance of the residual information based on the determined importance. A deep learning network system that performs federated learning, characterized in that it is quantized by selectively applying one or more of a plurality of quantization techniques based on .
  19. 딥러닝 네트워크 부호화를 위한, 양자화 방법에 있어서,In a quantization method for deep learning network encoding,
    양자화 대상인 잔차 정보의 평균과 표준편차를 활용하여 양자화 기법 선택을 위한 바이너리 플래그를 결정하는 단계,A step of determining a binary flag for selecting a quantization technique using the average and standard deviation of the residual information that is the target of quantization,
    상기 잔차 정보를 표준 정규분포로 변환하는 단계, 및converting the residual information into a standard normal distribution, and
    상기 표준 정규분포 로부터 상기 잔차 정보의 중요도를 결정하고, 상기 결정된 중요도와 상기 바이너리 플래그를 활용하여, 상기 잔차 정보를 제거 양자화 기법, 이항 양자화 기법, 삼항 양자화 기법 또는 누적 지수 양자화 기법 중 어느 하나 또는 이들의 조합을 적용하여 양자화 하는 단계를 포함하는, 양자화 방법. Determine the importance of the residual information from the standard normal distribution, and use the determined importance and the binary flag to remove the residual information. One or more of a quantization technique, a binomial quantization technique, a trinomial quantization technique, or a cumulative exponential quantization technique. A quantization method comprising the step of quantizing by applying a combination of .
  20. 딥러닝 네트워크 복호화를 위한, 역양자화 방법에 있어서, In the inverse quantization method for deep learning network decoding,
    부호화된 잔차 정보에 대한 양자화 정보를 획득하는 단계,Obtaining quantization information for encoded residual information,
    상기 양자화 정보로부터, 부호화된 잔차 정보가 이항 양자화 기법, 삼항 양자화 기법, 또는 누적 지수 양자화 기법 중 어느 양자화 기법을 적용하였는 지를 유도하는 단계, 및From the quantization information, deriving which quantization technique among the binomial quantization technique, ternary quantization technique, or cumulative exponential quantization technique was applied to the encoded residual information, and
    상기 확인 결과에 따라 해당 양자화 기법에 대응하는 역양자화 기법을 적용하여 복원된 잔차 정보를 유도하는 단계를 포함하는, 역양자화 방법.An inverse quantization method comprising deriving restored residual information by applying an inverse quantization technique corresponding to the corresponding quantization technique according to the confirmation result.
PCT/KR2023/011047 2022-07-28 2023-07-28 Method and device for deep learning network encoding/decoding using standard normal distribution-based quantization technique WO2024025386A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2022-0093959 2022-07-28
KR1020220093959A KR20240015991A (en) 2022-07-28 2022-07-28 An encoding/decoding method of deep learning network usiing standard normal distribution based quantization scheme, and an apparatus thereof

Publications (1)

Publication Number Publication Date
WO2024025386A1 true WO2024025386A1 (en) 2024-02-01

Family

ID=89707038

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2023/011047 WO2024025386A1 (en) 2022-07-28 2023-07-28 Method and device for deep learning network encoding/decoding using standard normal distribution-based quantization technique

Country Status (2)

Country Link
KR (1) KR20240015991A (en)
WO (1) WO2024025386A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190072450A (en) * 2017-12-15 2019-06-25 한국전자통신연구원 Method and apparatus to provide comprssion and transmission of learning parameter in distributed processing environment
KR20210032140A (en) * 2019-09-16 2021-03-24 삼성전자주식회사 Method and apparatus for performing pruning of neural network
WO2022108361A1 (en) * 2020-11-18 2022-05-27 인텔렉추얼디스커버리 주식회사 Neural network feature map quantization method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190072450A (en) * 2017-12-15 2019-06-25 한국전자통신연구원 Method and apparatus to provide comprssion and transmission of learning parameter in distributed processing environment
KR20210032140A (en) * 2019-09-16 2021-03-24 삼성전자주식회사 Method and apparatus for performing pruning of neural network
WO2022108361A1 (en) * 2020-11-18 2022-05-27 인텔렉추얼디스커버리 주식회사 Neural network feature map quantization method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LIU XIAORUI, YAO LI, TANG JILIANG, YAN MING: "A Double Residual Compression Algorithm for Efficient Distributed Learning", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, ARXIV.ORG, ITHACA, 16 October 2019 (2019-10-16), Ithaca, XP093133037, Retrieved from the Internet <URL:https://proceedings.mlr.press/v108/liu20a/liu20a.pdf> [retrieved on 20240220], DOI: 10.48550/arxiv.1910.07561 *
RAZANI RYAN; MORIN GREGOIRE; SARI EYYUB; NIA VAHID PARTOVI: "Adaptive Binary-Ternary Quantization", 2021 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION WORKSHOPS (CVPRW), IEEE, 19 June 2021 (2021-06-19), pages 4608 - 4613, XP033967330, DOI: 10.1109/CVPRW53098.2021.00519 *

Also Published As

Publication number Publication date
KR20240015991A (en) 2024-02-06

Similar Documents

Publication Publication Date Title
KR102513867B1 (en) Point cloud geometry compression
WO2011034378A2 (en) Method and apparatus for encoding and decoding image based on skip mode
US9946723B2 (en) Data embedding in run length encoded streams
WO2019045473A1 (en) Method and apparatus for point-cloud streaming
WO2020057182A1 (en) Image compression method and apparatus
US20230291909A1 (en) Coding video frame key points to enable reconstruction of video frame
Bi et al. Spike coding for dynamic vision sensors
WO2016076515A1 (en) Method and device for generating metadata including frequency characteristic information of image
Zhao et al. Improving the accuracy-latency trade-off of edge-cloud computation offloading for deep learning services
KR20240016368A (en) Features data encoding and decoding method and device
WO2024025386A1 (en) Method and device for deep learning network encoding/decoding using standard normal distribution-based quantization technique
Yudin et al. Method of encoding binary structures of stationary component of video stream
Deepthi et al. RTL implementation of image compression techniques in WSN
WO2021118149A1 (en) Electronic apparatus and control method thereof
Cucchiara et al. Semantic transcoding for live video server
WO2020046041A1 (en) Electronic device for high-speed compression processing of feature map of cnn utilizing system and controlling method thereof
CN115623207B (en) Data transmission method based on MIMO technology and related equipment
Zhou An improved EZW algorithm for image compression
WO2021261950A1 (en) Method and apparatus for compression and training of neural network
WO2023177272A1 (en) Method and device for compressing feature tensor on basis of neural network
Kufa et al. Quality comparison of 360° 8K images compressed by conventional and deep learning algorithms
WO2024053854A1 (en) Apparatus, method, and computer-readable medium for residual vector quantization using viterbi beam search
WO2022211409A1 (en) Method and device for coding machine vision data by using reduction of feature map
US20230222355A1 (en) Distributed neural network communication system
Garcia et al. Statistical characterization of tile decoding time of HEVC-encoded 360° video

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: 23847042

Country of ref document: EP

Kind code of ref document: A1