Method and apparatus for compression and training of neural networks
By receiving and reconstructing the bitstream of the neural network model, and using detailed information for compression and reconstruction, the problem of low decoding efficiency of video signals and neural networks is solved, thereby improving decoding efficiency and the training and inference performance of neural networks.
Patent Information
- Application Number
- CN202611515968.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2020-07-02
- Filing Date
- 2021-06-25
- Publication Date
- 2026-11-20
AI Technical Summary
Current technologies have low decoding efficiency for video signals and neural networks, and their training and inference performance needs to be improved.
By receiving the bitstream of the neural network model, the neural network model is extracted and reconstructed. Detailed information such as model information, layer information, parameter set, and layer parameter set is used for compression and reconstruction, including quantization and entropy coding methods, and optimization of weight and bias information.
It improves the decoding efficiency of video signals and neural networks, and enhances the training and inference performance of neural networks.
Smart Images

Figure CN123140118A_ABST
Abstract
Description
[0001] This application is a divisional application of Chinese patent application filed on December 26, 2022, with application number 202180045540.X and entitled "Method and Apparatus for Compression and Training of Neural Networks". The international filing date of the corresponding PCT international application is June 25, 2021, and the international application number is PCT / KR2021 / 008005. Technical Field
[0002] This disclosure relates to methods and apparatus for compressing neural networks. Furthermore, this disclosure relates to methods and apparatus for training and inference of neural networks. Background Technology
[0003] Video images are compressed and encoded by removing temporal and spatial redundancy as well as redundancy between viewpoints, and can then be transmitted over communication lines or stored in a form suitable for storage media. Summary of the Invention
[0004] Technical issues
[0005] The purpose of this disclosure is to improve the decoding efficiency of video signals. Furthermore, this disclosure aims to improve the decoding efficiency of neural networks. Additionally, this disclosure aims to improve the training and inference performance of neural networks.
[0006] Technical solution
[0007] The neural network-based signal processing method and apparatus according to this disclosure can receive a bitstream including information about a neural network model, wherein the bitstream includes at least one neural network access unit; can obtain information about at least one neural network access unit from the bitstream; and can reconstruct the neural network model based on the information about the at least one neural network access unit.
[0008] In the neural network-based signal processing method and apparatus according to the present disclosure, at least one neural network access unit may include multiple neural network layers.
[0009] In the neural network-based signal processing method and apparatus according to the present disclosure, the information regarding at least one neural network access unit may include at least one of the following: model information specifying a neural network model, layer information of at least one neural network access unit, a model parameter set indicating parameter information of a neural network model, a layer parameter set representing parameter information of a neural network layer, or compressed neural network layer information.
[0010] In the neural network-based signal processing method and apparatus according to the present disclosure, the layer information may include at least one of the following: number, type, position, identifier, arrangement order, priority, whether compression is skipped, node information of the neural network layer, or whether there is a correlation between neural network layers.
[0011] In the neural network-based signal processing method and apparatus according to the present disclosure, the model parameter set may include at least one of the following: the number of neural network layers, entry point information corresponding to the starting position of a specified bitstream and a neural network layer, quantization information for compression of the neural network model, or type information of the neural network layer.
[0012] In the neural network-based signal processing method and apparatus according to this disclosure, entry point information can be separately included in the model parameter set according to the number of neural network layers.
[0013] In the neural network-based signal processing method and apparatus according to the present disclosure, the layer parameter set may include at least one of the following: the parameter type of the current neural network layer, the number of sub-layers of the current neural network layer, entry point information of the starting position corresponding to the sub-layer in the specified bit stream, quantization information for compression of the current neural network layer, or differential quantization information indicating the difference between the quantization information and the quantization information for compression of the current neural network layer.
[0014] In the neural network-based signal processing method and apparatus according to the present disclosure, compressed neural network layer information may include at least one of weight information, bias information, or normalized parameter information.
[0015] Beneficial effects
[0016] According to embodiments of the present disclosure, the decoding efficiency of video signals can be improved. Furthermore, according to embodiments of the present disclosure, the decoding efficiency of neural networks can be improved. Additionally, according to embodiments of the present disclosure, the training and inference performance of neural networks can be improved. Attached Figure Description
[0017] Figure 1 This is a conceptual diagram illustrating a schematic process of compression and reconstruction of a neural network model according to an embodiment of the present disclosure.
[0018] Figure 2 This is a diagram used to explain in detail the compression concept of a neural network model as an embodiment of the present disclosure.
[0019] Figure 3 This is a diagram used to illustrate in detail the reconstruction concept of a neural network model as an embodiment of the present disclosure.
[0020] Figure 4 The bitstream structure of a neural network generated by compression of a neural network model, as an embodiment of the present disclosure, is shown.
[0021] Figure 5 This is a diagram illustrating the payload structure of a neural network access unit as an embodiment of the present disclosure.
[0022] Figure 6 This is a diagram illustrating another embodiment of the payload structure of a neural network access unit as an embodiment of the present disclosure.
[0023] Figure 7 This is a diagram that conceptually illustrates the information included in a compressed neural network layer as an embodiment of the present disclosure.
[0024] Figure 8 This is a diagram illustrating the structure of a model parameter set (MPS) as an embodiment of the present disclosure.
[0025] Figure 9 This is a diagram illustrating the structure of a Layer Parameter Set (LPS) as an embodiment according to this disclosure.
[0026] Figure 10 This is a diagram conceptually illustrating the bitstream structure of a compressed neural network model as an embodiment of the present disclosure.
[0027] Figure 11a This is a diagram illustrating the flow of a deep learning network as an embodiment of this disclosure, and Figure 11b This is a diagram illustrating the input / output of a layer in a deep learning network as an embodiment of the present disclosure.
[0028] Figure 12a This is a diagram illustrating the flow of a deep learning network as an embodiment of this disclosure, and Figure 12b This is a diagram illustrating the input / output of a layer in a deep learning network as an embodiment of the present disclosure.
[0029] Figure 13a and Figure 13b This is a diagram illustrating the flow of a deep learning network as an embodiment of the present disclosure.
[0030] Figure 14 This is a diagram illustrating a method for generating residual weights for weight training of a deep learning network as an embodiment of the present disclosure.
[0031] Figure 15This is a diagram illustrating the process of optimizing weights using an error tensor encoder and an error tensor decoder as an embodiment of the present disclosure.
[0032] Figure 16 This is a diagram illustrating the process of optimizing weights using an error map encoder and an error map decoder as an embodiment of the present disclosure.
[0033] Figure 17a and Figure 17b This is a diagram illustrating the training and inference process of a deep learning network as an embodiment of the present disclosure.
[0034] Figure 18a and Figure 18b This is a diagram illustrating the training and inference process of a deep learning network using encoded / decoded images as an embodiment of this disclosure.
[0035] Figure 19a and Figure 19b This is a diagram illustrating the training and inference process of a deep learning network that uses image and feature tensor encoding / decoding as an embodiment of the present disclosure.
[0036] Figure 20a and Figure 20b This is a diagram illustrating the training and inference process of a deep learning network that uses feature tensors of a deep learning network executed thereon, as an embodiment of the present disclosure.
[0037] Figure 21 This is a diagram illustrating the training process of a deep learning network using feature tensors and error tensors for encoding / decoding, as an embodiment of the present disclosure.
[0038] Best practice for this public content
[0039] The neural network-based signal processing method and apparatus according to this disclosure can receive a bitstream including information about a neural network model, wherein the bitstream includes at least one neural network access unit; can obtain information about at least one neural network access unit from the bitstream; and can reconstruct the neural network model based on the information about the at least one neural network access unit.
[0040] In the neural network-based signal processing method and apparatus according to the present disclosure, at least one neural network access unit may include multiple neural network layers.
[0041] In the neural network-based signal processing method and apparatus according to the present disclosure, the information regarding at least one neural network access unit may include at least one of the following: model information specifying a neural network model, layer information of at least one neural network access unit, a model parameter set indicating parameter information of a neural network model, a layer parameter set representing parameter information of a neural network layer, or compressed neural network layer information.
[0042] In the neural network-based signal processing method and apparatus according to the present disclosure, layer information may include the number, type, position, identifier, arrangement order, priority, whether compression is skipped, node information of the neural network layer, or whether there is a correlation between neural network layers.
[0043] In the neural network-based signal processing method and apparatus according to the present disclosure, the model parameter set may include at least one of the following: the number of neural network layers; entry point information, which specifies the starting position in the bit stream corresponding to the neural network layer; quantization information for compression of the neural network model; or type information of the neural network layer.
[0044] In the neural network-based signal processing method and apparatus according to this disclosure, entry point information can be separately included in the model parameter set according to the number of neural network layers.
[0045] In the neural network-based signal processing method and apparatus according to the present disclosure, the layer parameter set may include at least one of the following: the parameter type of the current neural network layer, the number of sub-layers of the current neural network layer, entry point information of the starting position corresponding to the sub-layer in the specified bit stream, quantization information for compression of the current neural network layer, or differential quantization information indicating the difference between the quantization information for compression of the current neural network layer and the quantization information for compression of the current neural network layer.
[0046] In the neural network-based signal processing method and apparatus according to the present disclosure, compressed neural network layer information may include at least one of weight information, bias information, or normalized parameter information. Detailed Implementation
[0047] Embodiments of this disclosure have been described in detail with reference to the accompanying figures, enabling those skilled in the art to readily implement the invention. However, this disclosure can be implemented in various different forms and is not limited to the embodiments described herein. Furthermore, portions irrelevant to the specification have been omitted, and similar drawing codes have been appended to similar portions in the description to clearly illustrate the disclosure in the figures.
[0048] In this specification, when a part is referred to as "connected to" another part, it includes cases where another element is inserted between them for electrical connection as well as cases where they are directly connected.
[0049] Furthermore, in this specification, unless otherwise stated, when a part is referred to as "including" a component, it means that other components may be included but not excluded.
[0050] Furthermore, terms such as "first," "second," etc., may be used to describe various components, but components should not be limited by such terms. These terms are only used to distinguish one component from others.
[0051] Furthermore, in the embodiments of the devices and methods described in this specification, some configurations of the device or some steps of the method may be omitted. Additionally, the order of some configurations of the device or some steps of the method may be changed. Furthermore, another configuration may be inserted into some configurations of the device, or another step may be inserted into some steps of the method.
[0052] Furthermore, some configurations or steps in the first embodiment of this disclosure may be added to the second embodiment of this disclosure, or may be replaced with some configurations or steps in the second embodiment.
[0053] Furthermore, the components shown in the embodiments of this disclosure are illustrated independently to indicate different functional characteristics, and do not imply that each component consists of a separate hardware or software component unit. That is, for ease of description, each component is listed as a single component, and at least two components of each component can be combined to form a single component, or a single component can be divided into multiple components to perform functions. Integrated and individual implementations of each of these components are also included within the scope of this disclosure without departing from its spirit.
[0054] First, the terminology used in this application will be briefly described below.
[0055] The video decoding apparatus, which will be described later, can be a civilian security camera, a civilian security system, a military security camera, a military security system, a personal computer (PC), a laptop computer, a portable multimedia player (PMP), a wireless communication terminal, a smartphone, a device included in a server terminal such as a TV application server and a service server, and can also refer to a user terminal such as various devices, communication devices such as a communication modem for performing communication with wired / wireless communication networks, a memory for storing various programs and data for decoding images or performing inter-frame prediction or intra-frame prediction for decoding, and various devices equipped with a microprocessor for executing programs and calculating and controlling programs, etc.
[0056] Furthermore, the image encoded into a bitstream by the encoder can be transmitted to an image decoding device via real-time or non-real-time wired / wireless communication networks such as the Internet, local area wireless communication networks, wireless LAN networks, Wi-Fi networks, and mobile communication networks, or via various communication interfaces such as cables and Universal Serial Bus (USB), where it is decoded, reconstructed into an image, and reproduced. Alternatively, the bitstream generated by the encoder can be stored in a memory. The memory can include both volatile and non-volatile memory. In this specification, memory can be referred to as a recording medium that stores the bitstream.
[0057] Typically, a video can consist of a series of images, and each image can be divided into decoding units such as blocks. Furthermore, those skilled in the art to which this embodiment pertains will understand that the term "image" can be used by replacing it with another term having an equivalent meaning (e.g., "picture" or "frame"). Additionally, those skilled in the art will understand that the term "decoding unit" can be replaced by other terms with the same meaning, such as "unit block" and "block," and used in conjunction with other terms.
[0058] In the following description, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Redundant descriptions of identical components will be omitted in the description of the present disclosure.
[0059] Figure 1 This is a conceptual diagram illustrating a schematic process of compression and reconstruction of a neural network model according to an embodiment of the present disclosure.
[0060] Reference Figure 1A compressed neural network model can be obtained by compressing a neural network model that includes at least one network model using a predefined compression method. The compressed neural network model can be transmitted using wired or wireless networks, or stored in a storage device.
[0061] The compressed neural network model transmitted or stored can be reconstructed into a neural network model corresponding to the original neural network model by using a predefined reconstruction method corresponding to the predefined compression method.
[0062] Figure 2 This is a diagram used to explain in detail the compression concept of a neural network model as an embodiment of the present disclosure. Figure 2 An implementation of compression of the VGG-16 model, one of the representative neural network models used for image processing, is shown.
[0063] Reference Figure 2 When compressing a neural network model, at least one layer included in a conventional neural network model can be removed through a quantization process.
[0064] exist Figure 2 In this implementation, the Conv3-3 layer can be removed during the compression (or quantization) process of the neural network model. The Conv3-3 layer can be positioned between the pooling layer and the Conv3-2 layer. As an example, the Conv3-3 layer may be removed because it does not play a relatively important role.
[0065] Figure 3 This is a diagram used to illustrate in detail the reconstruction concept of a neural network model as an embodiment of the present disclosure. Figure 3 An implementation of reconstructing the compressed VGG-16 model is shown.
[0066] Figure 3 This shows when one or more layers are in accordance with the above Figure 2 The case of reconstructing the corresponding neural network model during the compression process of the neural network model in the implementation method, when the model is removed through the quantization process.
[0067] According to embodiments of this disclosure, when layers have been removed during compression, a neural network model with the corresponding layers removed can be output even through a reconstruction process.
[0068] Figure 4 The bitstream structure of a neural network generated by compression of a neural network model, as an embodiment of the present disclosure, is shown.
[0069] Reference Figure 4Neural network models can be expressed as compressed bitstreams, and in this disclosure, such bitstreams may be referred to as neural network bitstreams. A neural network bitstream may include one or more neural network access units. Here, a neural network access unit refers to an access unit that is transmitted or received via a wired or wireless network.
[0070] like Figure 4 As shown, a neural network access unit may include a header and / or a payload. Here, the header may include higher-level information such as the type, size, and layer information (or layer-related information) of the access unit, and the payload may include lower-level information about the compressed neural network model. As an example, an access unit may include both a header and a payload, and may include only the header without the payload or only the payload without the header. The configuration of the access unit may vary depending on whether the access unit has a variable size, and this will be described in detail later. Higher-level information is merely a concept distinguished from lower-level information, and the payload may also include layer-related information and / or sublayer-related information.
[0071] Furthermore, in one implementation, the neural network access units can have a variable size. When the neural network access units have a variable size, the start position of the access unit can be determined according to a predefined start code, or the end position of the access unit can be determined according to a predefined end code. Access units can have either a start code or an end code, or some access units can have both. Alternatively, for example, the neural network bitstream can be divided into access units of a specific predefined size.
[0072] Figure 5 This is a diagram illustrating the payload structure of a neural network access unit as an embodiment of the present disclosure.
[0073] Reference Figure 5 The payload of a neural network access unit may include at least one of the following: model information, layer information, model parameter set (MPS), layer parameter set (LPS), or compressed neural network layer information. Here, model information may represent information indicating (or specifying) one of various predefined neural network models (or neural network access units). In this case, zero or more specific numbers may be mapped (or assigned) to various predefined neural network models.
[0074] In addition, layer information can be information about at least one of the following: number, type, position, identifier, order, priority, independence / relevance between layers, whether to skip, or node-related information of the layers included in the neural network model (or the currently accessed unit). The layer type can represent information indicating one of various predefined layers. In this case, a specific predefined number can be mapped to various predefined layers.
[0075] Figure 5 The example assumes that model information and layer information are included in the payload of the neural network access unit, but is not necessarily limited to this. For example, model information and / or layer information may be included in the header of the neural network access unit. Furthermore, in Figure 5 In the example, it is assumed that the model parameter set is included in the payload of the neural network access unit, but it is not necessarily limited to this. For example, the model parameter set may be included in the header of the neural network access unit.
[0076] In the following text, reference will be made to Figure 8 A detailed description of the model parameter set is provided, and will be referenced later. Figure 9 Describe the layer parameter set in detail.
[0077] like Figure 5 As shown, a compressed neural network layer may include at least one sublayer. In this case, the number of sublayers included in the compressed neural network layer may be variable. In this disclosure, the compressed neural network layer may be referred to as a neural network layer. Furthermore, sublayers may include those to be added later. Figure 6 The information of compressed neural network layers described in the text can be reduced by using previously transmitted sublayer information for prediction and compensation.
[0078] Figure 6 This is a diagram illustrating another embodiment of the payload structure of a neural network access unit as an embodiment of the present disclosure.
[0079] Reference Figure 6 Each layer of a neural network model can include at least one of the following: weight information, bias information, or normalization parameters, depending on the number of nodes that make up the corresponding layer.
[0080] According to embodiments of this disclosure, a compressed neural network layer may include at least one of compressed weight information, compressed bias information, or compressed normalized parameter information. As an embodiment, a layer of the neural network model may include at least one of weights, biases, and normalized parameters, and quantization may be performed on each of the weights, biases, and normalized parameters included in the layer of the neural network model. Compression of the quantized weights, biases, and normalized parameters may be performed according to a predefined entropy encoding method.
[0081] Furthermore, the amount of information can be reduced by performing predictions using the weights, biases, and parameters of adjacent layers before quantization, and compression can be performed on the difference obtained based on the predictions using at least one of the quantization method or the entropy coding method.
[0082] exist Figure 6 In the example, it is assumed that the model parameter set is included in the payload of the neural network access unit, but it is not necessarily limited to this. For example, the model parameter set may be included in the header of the neural network access unit.
[0083] Figure 7 This is a diagram that conceptually illustrates the information included in a compressed neural network layer as an embodiment of the present disclosure.
[0084] Reference Figure 7 A compressed neural network layer may include at least one of compressed weight information, compressed bias information, or compressed normalized parameter information.
[0085] As one implementation, methods such as prediction, transformation, or quantization can be used as compression methods for at least one of weight information, bias information, or normalized parameter information. At least one of prediction, transformation, or quantization compression methods can be used.
[0086] Figure 8 This is a diagram illustrating the structure of a model parameter set (MPS) as an embodiment of the present disclosure.
[0087] Reference Figure 8 The model parameter set includes parameter information related to the compressed neural network model. Specifically, the model parameter set may include at least one of the following: the number of neural network layers, entry point information specifying the starting position of each neural network layer in the bitstream, quantization information used to compress the current neural network model (which may be referred to as basic quantization information in this disclosure), or type information of each neural network layer.
[0088] In this case, the entry point information corresponding to the starting position of each neural network layer in the specified bit stream can be individually indicated by a signal according to the number of neural network layers, and the decoder can decode the received information.
[0089] Figure 9 This is a diagram illustrating the structure of a Layer Parameter Set (LPS) as an embodiment according to this disclosure.
[0090] Reference Figure 9The layer parameter set includes parameter information related to each neural network layer in the compressed neural network model. Specifically, the layer parameter set may include at least one of the following: the type of layer parameters, the number of sublayers of the current neural network layer, information about the entry point corresponding to the start position of each sublayer in the specified bitstream, quantization information for compression of the current neural network layer, or differential quantization information indicating the difference between the quantization information and the quantization information for compression of the current neural network model.
[0091] According to embodiments of this disclosure, the layer parameter set may include additional parameter information depending on the layer parameter type.
[0092] For example, when the layer parameter type is a convolutional layer, the layer parameter set may additionally include information about the number of weights and / or the shape of the weights. Here, the shape of the weights may be represented by at least one of the following: the number of channels of the weight, the height of the weight, or the width of the weight.
[0093] Furthermore, when the layer parameter type is a convolutional layer, the layer parameter set may additionally include padding-related information. Padding-related information may include at least one of the following: input padding size, input padding method, output padding size, or output padding method. If the corresponding information is not included, predefined information may be used for padding. Here, padding means adding specific values to the input and / or output data. The padding size may include size information, expressed as two integers (or positive integers) for each dimension of the data, such as the horizontal direction (i.e., left and right) or the vertical direction (top and bottom). Alternatively, padding can be performed by including one piece of information for each dimension and applying the same size to both sides.
[0094] For example, if the number of dimensions of the data is 4, the layer parameter set can additionally include a total of 8 dimension information entries. Furthermore, as a padding method, information about the padding method, such as zero-padding or duplicate padding, can be transmitted (or included). Here, zero-padding indicates a method of filling the padding area with 0 values, and duplicate padding indicates a method of filling the padding area with the data value closest to the padding area. Additionally, the padding-related information can also include padding information for the input or output data, and in this case, the same padding method can be applied using the same information.
[0095] Furthermore, when the layer parameter type is a convolutional layer or a pooling layer, the layer parameter set can additionally include information about the convolutional sample units. Here, the convolutional sample units can include the same number of information as the number of dimensions of the input data or twice the number of dimensions of the input data. For example, when the value of the convolutional sample unit information is 2 (i.e., includes one piece of information), convolution operations can be performed in units of 2 samples in the vertical and / or horizontal directions. If convolution operations are performed in units of 2 samples, then if the current position of the convolution operation is (0,0), the next operation position could be (2,0). Alternatively, for example, if the value of the convolutional sample unit information includes two pieces of information (or values) such as (2,1), convolution operations can be performed in units of 2 samples in the horizontal direction and in units of 1 sample in the vertical direction.
[0096] Furthermore, the payload information of the compressed neural network layer can be indicated by a signal based on the number of sub-layers indicated by the signal. Additionally, the layer parameter type can indicate a specific layer type among predefined layer types, and integer values greater than or equal to 0 can be mapped to predefined layer types. As an implementation, the value indicating the corresponding layer can be indicated by a signal by assigning specific values to predefined layer types; for example, 0 in the case of convolutional layers and 1 in the case of pooling layers.
[0097] Furthermore, the differential quantization information indicates the difference between the basic quantization information of the current neural network model, which is used to compress the model parameter set indicated by a signal before the layer parameter set, and the quantization information used to compress the current layer. As an example, the differential quantization information can be indicated by a signal after the absolute value and sign information of the corresponding difference is classified.
[0098] Figure 10 This is a diagram conceptually illustrating the bitstream structure of a compressed neural network model as an embodiment of the present disclosure.
[0099] Reference Figure 10 In the bitstream of a compressed neural network model, the compressed neural network layers (or layer payloads) and / or layer parameter sets can be referenced, respectively, to previously signaled compressed neural network layer information and / or parameter sets. In other words, structural similarities can exist between the layers constituting the neural network model. For example, various similarities can exist, such as the number of sublayers included in a layer, the type of sublayers, the number of neurons constituting the layer, and the similarity of connections.
[0100] Therefore, according to embodiments of this disclosure, the layer parameter set, including information related to the neural network layer, can be referenced to a previous layer parameter set based on this similarity. Furthermore, the payload information for compressing the neural network layer can also be referenced to previously signal-indicated payload information.
[0101] Furthermore, as an implementation method, a list of layer parameter sets (i.e., LPS list) constituting the layers of the current neural network model can be configured. The LPS list may include one or more layer parameter sets, and an identifier (ID) corresponding to each layer parameter set in the LPS list can be assigned.
[0102] At this point, when transmitting each layer parameter set in a compressed neural network model bitstream, the following method can be used: obtain the layer parameter set information using only the identifier information corresponding to the previously signaled list of layer parameter sets.
[0103] In this way, when a layer parameter set list is configured and the layer parameter set identifier information is used in subsequent bit streams (or payloads) to perform signaling, duplicate signaling of the layer parameter set can be reduced.
[0104] Figure 11a This is a diagram illustrating the flow of a deep learning network as an embodiment of this disclosure, and Figure 11b This is a diagram illustrating the input / output of a layer in a deep learning network as an embodiment of the present disclosure.
[0105] Figure 11a The forward flow of a deep learning network is shown. A deep learning network can have N layers, and each layer can be one of the following: a convolutional layer, a deconvolutional layer, a pooling layer, a skip layer, a summation layer, or a difference layer.
[0106] Figure 11b The input / output of the nth layer (i.e., the nth level) is shown. (Refer to...) Figure 11b The input to the nth layer can be a feature tensor that serves as the output of the (n-1)th layer. Here, a tensor represents data in one-dimensional or more-than-one-dimensional form.
[0107] The nth feature tensor can be generated from the nth layer, and the generated nth feature tensor can be input to the (n+1)th layer.
[0108] Figure 12a This is a diagram illustrating the flow of a deep learning network as an embodiment of this disclosure, and Figure 12b This is a diagram illustrating the input / output of a layer in a deep learning network as an embodiment of this disclosure. Specifically, Figure 12a The reverse flow of a deep learning network is shown, and Figure 12b The input / output of the nth layer in the reverse flow is shown.
[0109] Reference Figure 12aThe backward propagation of error in a deep learning network can occur during the training of the weights of each layer. The backward propagation of error from the last layer to the first layer (or in the direction of the first layer) is called backpropagation, and during backpropagation, an error tensor can be generated in each layer. Furthermore, refer to... Figure 12b The nth layer can receive the nth error tensor and generate the (n-1)th error tensor.
[0110] Figure 13a and Figure 13b This is a diagram illustrating the flow of a deep learning network as an embodiment of this disclosure. Specifically, Figure 13a The forward flow of the nth layer of the deep learning network is shown, and Figure 13b The reverse flow of the nth layer of a deep learning network is shown.
[0111] Reference Figure 13a The input (x) can be the (n-1)th feature tensor or the input tensor of the deep learning network. The output (y) can be the nth feature tensor or the output tensor of the network. The input (x) and output (y) can be data with the same horizontal, vertical, and channel dimensions.
[0112] Alternatively, the sizes of the input (x) and output (y) can be adaptively changed based on the type of layer. For example, when the layer is a convolutional layer, the horizontal and / or vertical lengths can be reduced according to the horizontal and / or vertical lengths of the weights, respectively. Alternatively, for example, when the current layer is a pooling layer, the horizontal and / or vertical lengths can be halved.
[0113] In this implementation, the number of weights (w) and / or biases (b) in the nth layer can be equal to the number of channels (f) in the output feature map. For example, an output with fewer than f channels can be generated by omitting a specific number of weights and / or biases, according to a predetermined application method. Convolution is performed on the input (x) based on the weights (w_f) and biases (b_f) are added to generate the output (y_f). The output (y_f) can represent the output (y) for each channel.
[0114] Reference Figure 13b In the reverse flow, the nth layer can receive the nth error tensor from the (n+1)th layer and output the (n-1)th error tensor to the (n-1)th layer. At this time, the input error tensor (dl / dy) can be separated into error maps for each channel, such as dl / dy0, dl / dy1, ..., dl / yf-1.
[0115] Here, each error map can be paired with a weight (wf). That is, one error map can be mapped to one weight. The optimizer can then use the input feature tensor and the error map to update the weights paired with the error map. Furthermore, each error map can be paired with a bias. The optimizer can then use the error map to update the biases paired with the error map.
[0116] For each individual error map, convolution can be performed based on the weights, and an error tensor for each weight can be generated. Finally, the (n-1)th error map (dl / dx) can be generated by summing the error tensors for all weights. The generated (n-1)th error map (dl / dx) can be fed into the (n-1)th layer.
[0117] Figure 14 This is a diagram illustrating a method for generating residual weights for weight training of a deep learning network as an embodiment of the present disclosure.
[0118] Reference Figure 14 The optimizer can generate a residual weight by taking one channel of the error tensor, the feature tensor, and the training rate as input. In other words, the optimizer can use one channel of the error map, the feature tensor, and the training rate to generate (or obtain) residual weights applied to each channel, and update the weights based on the generated residual weights.
[0119] In one implementation, it may be necessary to require an error map to be input separately for each channel. Furthermore, it may be necessary to require the entire tensor (or the entire feature tensor) as the feature tensor.
[0120] Furthermore, the training rate can be a predetermined fixed value, or it can be adaptively adjusted by reflecting the statistical properties of the residual weights during the training process in the optimizer.
[0121] Figure 15 This is a diagram illustrating the process of optimizing weights using an error tensor encoder and an error tensor decoder as an embodiment of the present disclosure.
[0122] Reference Figure 15 The location (or component) where the error tensor is generated may differ from that of the optimizer, and in such cases, it may be necessary to require the transfer of the error tensor.
[0123] However, the error tensor generated in an image has a large capacity, and in the case of video, the capacity is extremely large. Therefore, the data size can be reduced by encoding the error tensor, compressing it as a bitstream, and transmitting it. Furthermore, when transferring the error tensor generated by the GPU to an external storage device, bitstream compression encoding can be applied.
[0124] In one implementation, the optimizer, acting as a server-like receiver, can receive error tensors transmitted from multiple transmitters and generate residual weights using the received error tensors. In this case, the above reference can be applied. Figure 14 The method described. The generated residual weights can be transmitted to the transmitter and added to the transmitter's weights.
[0125] The error tensor encoder / decoder can be a separate image encoder / decoder. Alternatively, the error tensor encoder / decoder can be implemented as a component included in each image encoder / decoder, or the image encoder / decoder can be implemented as a component included in each error tensor encoder / decoder.
[0126] Figure 16 This is a diagram illustrating the process of optimizing weights using an error map encoder and an error map decoder as an embodiment of the present disclosure.
[0127] Reference Figure 16 An error map can be mapped individually to weights and / or biases as a channel of the error tensor. An error map can be used to update a weight.
[0128] Therefore, when only one or some weights need to be updated, the corresponding error map, which is partitioned from the error tensor into an error map, can be transmitted. As an example, the bitstream generated by the error map encoder may include the channel numbers of the error map. Furthermore, the bitstream generated by the error map encoder may include at least one of the following: horizontal length information, vertical length information, channel number information, and weight number information used to generate the error map.
[0129] The error map encoder / decoder can be a separate image encoder / decoder. Alternatively, the error map encoder / decoder can be implemented as a configuration included in each image encoder / decoder, or the image encoder / decoder can be implemented as a configuration included in each error map encoder / decoder.
[0130] Figure 17a and Figure 17b This is a diagram illustrating the training and inference process of a deep learning network as an embodiment of the present disclosure.
[0131] Reference Figure 17a The deep learning network training unit can receive at least one of training data, correct answer data, and deep learning network information. Here, training data can be data acquired through various sensors, and for example, training data can include at least one of image data, video data, speech data, text data, or 3D data.
[0132] Furthermore, the ground truth data represents ground truth data that is a value paired with training data and to be predicted by the deep learning network. For example, if the deep learning network is a network for image region segmentation, the ground truth data may be a segmented binary image. Alternatively, in the case of a network for object detection, the ground truth data may be the coordinates and / or dimensions of an object in an image. Alternatively, in the case of a network for speech recognition, the ground truth data may be text information corresponding to speech.
[0133] The deep learning network information may include the structure and / or parameters of the deep learning network. Here, the deep learning network structure may be information related to the types of layers of the deep learning network and / or connections between layers. Furthermore, the deep learning network structure may include information about sampling layers, such as downsampling or upsampling between layers. Here, the sampling may be sampling of nodes and / or sampling of connectivity. Furthermore, the deep learning network structure may also include information about the sampling frequency.
[0134] With reference to Figure 17b , the deep learning network inference unit may receive test data. An inference process may be performed based on the test data, and prediction information may be input to the visual device.
[0135] Figure 18a and Figure 18b are diagrams illustrating the training and inference process of a deep learning network using encoded / decoded images according to an embodiment of the present disclosure.
[0136] With reference to Figure 18a , the previously described Figure 17a deep learning network training unit may receive compressed / reconstructed data as training data through the image encoder / decoder. Descriptions redundant with those previously described in Figure 17a will be omitted. Specifically, the training data may be compressed and encoded by the image encoder, and transmitted in the form of a bitstream. The image decoder may reconstruct data by decoding the received bitstream, and transmit the reconstructed data to the deep learning network.
[0137] With reference to Figure 18b , the deep learning network inference unit may receive compressed / deconstructed data as test data through the image encoder / decoder due to encoding / decoding. At this time, since the accuracy of the visual device of the inference unit is expected to decrease, the deep learning network training unit including the encoding / decoding process may be required to reflect these characteristics.
[0138] Furthermore, depending on the transmission / reception environment, the quality of the received image may be degraded, and the image decoder may extract main information in advance in consideration of the accuracy degradation of the visual device caused by the image quality degradation and transmit the main information to the visual device. Here, the main information may include at least one of a quantization parameter, a picture division structure, an intra prediction direction, a motion vector, a reference structure, prediction information, or merge information.
[0139] Figure 19a and Figure 19b are diagrams illustrating the training and inference processes of a deep learning network for encoding / decoding using images and feature tensors according to an embodiment of the present disclosure.
[0140] With reference to Figure 19a , the deep learning network training unit and the inference unit according to the present embodiment may perform encoding / decoding of images and encoding / decoding of feature tensors output by a partial deep learning network. Redundant descriptions relative to those previously described in Figure 17a and Figure 18a will be omitted.
[0141] When the forward pass of the deep learning network is executed together with the encoding / decoding video decoder, the computational complexity may increase rapidly. To solve this problem, the computational complexity of the training unit / inference unit can be reduced by executing some forward passes of the deep learning network in the server, encoding the output intermediate feature tensors, and transmitting the outputs together with the images.
[0142] Figure 20a and Figure 20b are diagrams illustrating the training and inference processes of a deep learning network using feature tensors on which the deep learning network has been executed according to an embodiment of the present disclosure.
[0143] With reference to Figure 20a , the previously described Figure 17a deep learning network training unit may receive feature tensors that have passed through the deep learning network as training data. Redundant descriptions relative to those previously described in Figure 17a will be omitted.
[0144] According to embodiments of the present disclosure, when encoded / decoded images are used in a deep learning network training unit and an inference unit, serious personal information problems may occur. For example, most of the images generated during a patient's treatment process in a hospital contain critical personal information, and since image data is frequently used in hospitals for the purpose of applying (or implementing) deep learning, such privacy infringement issues have become prominent problems.
[0145] Therefore, for the learning and inference of deep learning networks that solve this problem, feature tensors (or feature maps) generated by partial deep learning without encoding / decoding the images can be used.
[0146] Figure 21 This is a diagram illustrating the training process of a deep learning network using feature tensors and error tensors for encoding / decoding, as an embodiment of the present disclosure.
[0147] Reference Figure 21 Error tensors can be generated during the training of deep learning networks using the backpropagation algorithm. Since error tensors are typically generated individually for each training data set, a large number of error tensors are generated and used in situations where deep learning involves very large amounts of data.
[0148] Typically, storing or using an error tensor occurs when training is done using the average error rather than updating based on a single error data point. In deep learning applications such as image recognition, the amount of data used to obtain the average error is one of the most important factors for improving accuracy. In this case, the amount of memory available in the GPU can be the amount of data used for error averaging. GPUs can be trained with networks that demonstrate high accuracy because they can process data quickly and have a large memory size. Figure 21 The deep learning network training unit can encode / decode the error tensor and store it in external memory, thereby increasing complexity and having an advantage in cost.
[0149] The above embodiments are implementations in which elements and features of the invention are combined in a predetermined form. Unless otherwise expressly stated, each component or feature should be considered optional. Each component or feature may be implemented without combination with other components or features. Embodiments of the invention may also be configured by combining some components and / or features. The order of operations described in the embodiments of the invention may be changed. Some components or features in one embodiment may be included in another embodiment, or may be replaced by corresponding components or features of another embodiment. Claims that are not explicitly referenced in the claims may be combined to form embodiments, or may be included as new claims after submission by modification.
[0150] Embodiments of the present invention can be implemented in various ways, such as hardware, firmware, software, or a combination thereof. For hardware implementations, the implementation can be performed using 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 processors, controllers, microcontrollers, microprocessors, etc.
[0151] Furthermore, when implemented via firmware or software, embodiments of the present invention can be implemented as modules, processes, functions, etc., that perform the aforementioned functions or operations, and can be recorded on a recording medium readable by various computer devices. Here, the recording medium may include individual or combined program commands, data files, data structures, etc. The program instructions recorded on the recording medium may be program instructions specifically designed and configured for the present invention or program instructions known and available to those skilled in the art of computer software. For example, the recording medium includes: magnetic media such as hard disks, floppy disks, and magnetic tapes; optical media such as CD-ROMs (Compact Disc Read-Only Memory) and DVDs (Digital Video Discs); floppy disks, which include hardware devices specifically configured for storing and executing program instructions, such as magneto-optical media like floppy disks; and ROMs, RAMs, flash memory, etc. Examples of program instructions may include high-level language code executable by a computer using an interpreter, etc., and machine language code generated by a compiler. These hardware devices may be configured as one or more software modules to perform the operations of the present invention, and vice versa.
[0152] Furthermore, the device or terminal according to the invention can be driven by commands that cause one or more processors to perform the aforementioned functions and processes. For example, such instructions may include interpreted instructions, such as scripting instructions like JavaScript or ECMAScript instructions, or executable code or other instructions stored on a computer-readable medium. Furthermore, the device according to the invention can be implemented in a distributed manner on a network such as a server cluster, or it can be implemented in a single computer device.
[0153] Furthermore, computer programs (also referred to as programs, software, software applications, scripts, or code) loaded into the device according to the invention and executing the methods according to the invention include compiled or interpreted languages or a priori or programming languages. They can be written in any form of programming language and can be deployed in any form, including independently running programs, modules, components, subroutines, or other units suitable for use in a computer environment. A computer program does not necessarily correspond to a file in a file system. A program can be in a single file provided to the requested program, or in multiple interactive files (e.g., one or more modules, subroutines, or files storing partial code), or in partial files holding other programs or data (e.g., one or more scripts stored in markup language documents). Computer programs can be deployed to execute on a single computer or on multiple computers located at one site or distributed across multiple sites and interconnected by a communication network.
[0154] It will be apparent to those skilled in the art that the invention may be practiced in other specific forms without departing from its essential characteristics. Therefore, the foregoing detailed description should not be construed as limiting in all respects, but rather as illustrative. The scope of this disclosure should be determined by a reasonable interpretation of the appended claims, and all variations within the scope of equivalents of this disclosure are included within the scope of this disclosure.
[0155] Regarding the implementation methods including the above embodiments, the following technical solutions are also disclosed:
[0156] Solution 1. A signal processing method based on neural networks, the method comprising:
[0157] Receive a bitstream including information about a neural network model, the bitstream including at least one neural network access unit;
[0158] Obtain information about the at least one neural network access unit from the bitstream; and
[0159] The neural network model is reconstructed based on information about the at least one neural network access unit.
[0160] Option 2. According to the method described in Option 1,
[0161] The at least one neural network access unit includes multiple neural network layers.
[0162] Option 3. Following the method described in Option 2,
[0163] The information regarding the at least one neural network access unit includes at least one of the following: model information specifying the neural network model, layer information of the at least one neural network access unit, a model parameter set indicating the parameter information of the neural network model, a layer parameter set representing the parameter information of the neural network layer, or compressed neural network layer information.
[0164] Option 4. Following the method described in Option 3,
[0165] The layer information includes at least one of the following: number, type, position, identifier, arrangement order, priority, whether compression is skipped, node information of the neural network layer, or whether there is a correlation between the neural network layers.
[0166] Option 5. Following the method described in Option 3,
[0167] The model parameter set includes at least one of the following: the number of neural network layers, entry point information specifying the starting position of the bitstream corresponding to the neural network layer, quantization information for compression of the neural network model, or type information of the neural network layer.
[0168] Option 6. Following the method described in Option 5,
[0169] The entry point information is included separately in the model parameter set according to the number of neural network layers.
[0170] Option 7. Following the method described in Option 3,
[0171] The layer parameter set includes at least one of the following: the parameter type of the current neural network layer, the number of sublayers of the current neural network layer, entry point information specifying the starting position of the sublayer in the bit stream, quantization information for compression of the current neural network layer, or differential quantization information indicating the difference between the quantization information and the quantization information for compression of the current neural network layer.
[0172] Option 8. The method described in Option 3,
[0173] The compressed neural network layer information includes at least one of weight information, bias information, or normalized parameter information.
[0174] Option 9. A signal processing device based on a neural network, the device comprising:
[0175] The processor that controls the signal processing device; and
[0176] The memory that is combined with the processor and stores data
[0177] The processor receives a bitstream including information about a neural network model.
[0178] The bitstream includes at least one neural network access unit.
[0179] The processor obtains information about the at least one neural network access unit from the bitstream, and
[0180] The processor reconstructs the neural network model based on information about the at least one neural network access unit.
[0181] Industrial availability
[0182] This disclosure can be used in neural network-based video compression methods and apparatus.
Claims
1. A neural network training method, comprising: An error tensor is generated by performing backpropagation on a neural network. The error tensor is divided into multiple error maps; Select one or more error maps from the plurality of error maps that correspond to one or more weights to be updated from the plurality of weights of the neural network; Encode one or more selected error maps to generate a bitstream; as well as Transmit the bit stream.
2. The method according to claim 1, in, Each of the plurality of error maps corresponds to a channel of the error tensor.
3. The method according to claim 1, in, Each selected error map is mapped to the corresponding weight to be updated.
4. The method according to claim 1, in, Each selected error map is also mapped to a corresponding bias of the neural network.
5. The method according to claim 1, in, The bitstream includes information indicating the channel number for each selected error map.
6. The method according to claim 1, in, The bitstream also includes at least one of the following for each selected error map: horizontal length information, vertical length information, and weight number information.
7. The method according to claim 1, in, When only some of the weights are to be updated, only the error map corresponding to the weights to be updated is selected from the plurality of error maps.
8. A signal processing device based on a neural network, comprising: A processor that controls the signal processing device; as well as A memory, which is combined with the processor and stores data; The processor is configured as follows: An error tensor is generated by performing backpropagation on the neural network. The error tensor is divided into multiple error maps. Select one or more error maps from the plurality of error maps that correspond to one or more weights to be updated from the plurality of weights of the neural network. Encode one or more selected error maps to generate a bitstream; as well as Transmit the bit stream.
