Concepts for encoding and decoding neural network parameters.
By using a predetermined syntax element reconstruction index and historical data-based probability models, the method enhances neural network parameter encoding and updating efficiency by reducing unnecessary decoding and optimizing coding processes.
Patent Information
- Application Number
- JP2024541196
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-01-09
- Filing Date
- 2023-01-05
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2043-01-05
AI Technical Summary
Existing methods for encoding and updating neural network parameters are inefficient in terms of memory requirements and bit rate, particularly due to the need to decode all syntax elements, which is costly and unnecessary.
The method involves mapping neural network parameters using a predetermined syntax element reconstruction index, where the mapping method is checked against a prescribed standard to determine if syntax elements need to be decoded or skipped, and using a probability model for updating parameters based on historical data to optimize coding efficiency.
This approach reduces memory requirements and bit rate by selectively decoding syntax elements and optimizing the coding process, thereby improving the efficiency of neural network parameter encoding and updating.
Smart Images

Figure 2025502873000001_ABST
Abstract
Description
[Technical field]
[0001] Some embodiments relate to methods, decoders and / or encoders for entropy coding of parameters of neural networks and their incremental update, in particular reduced value set coding and history dependent significance coding. [Background technology]
[0002] Typically, neural networks have millions of parameters and may require hundreds of MB to represent. The MPEG-7 Part 17 standard for compression of neural networks for multimedia content description and analysis [2] provides different methods for the quantization and integer representation of neural network parameters, e.g., independent scalar quantization and codebook-based integer representation. Furthermore, it specifies an entropy quantization scheme, also known as deepCABAC [4].
[0003] It would be desirable to provide concepts for improved compression of neural networks, for example to reduce the bitstream and thus the signaling cost of neural networks. Additionally or alternatively, it would be desirable to make neural network coding more efficient, for example in terms of reducing the bit rate required for coding.
[0004] This is achieved by the subject matter of the independent claims of the present application. Further embodiments according to the invention are defined by the subject matter of the dependent claims of the present application. Summary of the Invention
[0005] According to a first aspect of the present invention, the inventors of the present application have realized that one problem encountered when trying to code / decode neural network parameters (NN parameters), for example using deepCABAC, is currently due to the fact that a certain amount of syntax elements should be coded / decoded for the neural network parameters. This can be costly in terms of memory requirements for storing a representation of the neural network. According to a first aspect of the present application, this difficulty is overcome by allowing the inference of certain syntax elements depending on the mapping scheme used in the quantization / dequantization of the neural network parameters. The inventors have found that instead of coding / decoding the certain syntax elements to / from the data stream, inferring the certain syntax elements is advantageous in terms of memory requirements / signalization costs and in terms of decoding / coding efficiency. In particular, it has been found that a mapping scheme for mapping quantization indexes to reconstruction levels, e.g., in decoding, or vice versa, e.g., in encoding, is a good indicator for evaluating whether a given syntax element carries necessary information and thus should be coded / decoded for one of the NN parameters, or whether a given syntax element is obsolete and thus can be inferred instead of being coded / decoded for the respective NN parameters. This is based on the idea that it is possible to derive information about possible values of a group of NN parameters to be coded / decoded from a mapping scheme selected for a group of NN parameters. Thus, it is not necessary to decode / code the value of each NN parameter by decoding / encoding all syntax elements. Instead, it is possible to infer one or more of the syntax elements to decode / code the respective value of the respective NN parameter.
[0006] Thus, according to a first aspect of the present application, an apparatus for decoding Neural Network (NN) parameters defining a neural network from a data stream, for example called a decoder, is configured to obtain from the data stream a mapping scheme for mapping quantization indexes to reconstruction levels and to check whether the mapping scheme satisfies a predefined criterion. The apparatus for decoding reads one of the NN parameters as If the mapping scheme satisfies a predetermined criterion, estimating a state of the predetermined syntax element from the mapping scheme, e.g., a predetermined state, e.g., a state among one or more possible states, and applying the quantization index derived using the predetermined syntax element to the mapping scheme to obtain a reconstruction level, e.g., a reconstruction level of a NN parameter. deriving, e.g., reading, decoding, a predetermined syntax element from the data stream if the mapping scheme does not meet a predetermined criterion; subjecting the quantization indexes derived using predefined syntax elements to a mapping scheme to obtain reconstruction levels, e.g. reconstruction levels of NN parameters; The system is configured to reconstruct the image by
[0007] Thus, according to a first aspect of the present application, an apparatus for encoding Neural Network (NN) parameters defining a neural network into a data stream, for example called an encoder, is configured to obtain a mapping scheme for mapping reconstruction levels to quantization indexes and encoding the mapping scheme into the data stream. The apparatus for encoding may be configured to check whether the mapping scheme satisfies a predefined criterion. The apparatus for encoding comprises the steps of: subjecting the reconstruction levels of the NN parameters to the mapping scheme so as to obtain a quantization index; skipping the coding of certain syntax elements into the data stream if the mapping scheme satisfies, for example, a predetermined criterion, e.g., the certain syntax elements are inferred by the decoder, where the certain syntax elements are part of a representation of quantization indexes; encoding a predetermined syntax element into the data stream if the mapping scheme does not meet a predetermined criterion; The NN parameter encoding unit 100 is configured to encode one of the NN parameters by
[0008] One embodiment relates to a method for decoding / encoding Neural Network (NN) parameters from / to a data stream. The method is based on the same considerations as the encoder / decoder described above. The method can be completed using all the features and functions that are also described for the encoder / decoder, incidentally.
[0009] According to a second aspect of the invention, the inventors of the present application have realized that one problem encountered when trying to update neural network parameters (NN parameters) is due to the fact that a large proportion of the neural network parameters do not change during the update. This may result in a high bit rate for coding and signaling of the updates, even if updates have to be provided for all NN parameters. According to a second aspect of the present application, this difficulty is overcome by selecting a probability model for the coding of the update parameters of the NN parameters, for example, depending on the current value of the respective NN parameter and / or depending on previous update parameters of the respective NN parameter. The inventors have found that the current NN parameters and previous update parameters of the respective NN parameters can give a good indication of the update parameters. In particular, it has been found that by using such a specially selected probability model, the coding efficiency of the respective update parameters can be improved. This is based on the idea that the current NN parameters or the history of updates of the respective NN parameters can enable a better modeling of the probabilities. Thus, such a selected probability model provides an optimized probability estimate for the respective update parameters.
[0010] Thus, according to a second aspect of the present application, an apparatus for decoding Neural Network (NN) parameters defining a neural network from a data stream, for example referred to as a decoder, is configured to receive an update parameter of one of the NN parameters and update the NN parameter using the update parameter. The apparatus is configured to entropy decode the update parameter from the data stream, and the apparatus is configured to select a probability model, for example one of a set of probability models, for entropy decoding of the update parameter depending on a sequence of previous (e.g. previously received; e.g. the sequence includes a plurality of update parameters majoring on a currently decoded update parameter in a sequence including a sequence of previous update parameters; e.g. the update parameter may provide an incremental update for the NN parameter; e.g. the update parameter is an update in the sense of the concept of section 2.2.1)) update parameters for the NN parameter and / or depending on the NN parameter.
[0011] Thus, according to a second aspect of the present application, an apparatus for encoding Neural Network (NN) parameters defining a neural network into a data stream, e.g. called an encoder, is configured to obtain an update parameter for one of the NN parameters, the apparatus is configured to entropy code the update parameter into the data stream, the apparatus being configured to select a probability model, e.g. one of a set of probability models, for the entropy coding of the update parameter depending on a sequence of previous, e.g. previously coded and transmitted, update parameters for the NN parameter and / or depending on the NN parameter.
[0012] One embodiment relates to a method for decoding / encoding Neural Network (NN) parameters from / to a data stream. The method is based on the same considerations as the encoder / decoder described above. The method can be completed using all the features and functions that are also described for the encoder / decoder, incidentally.
[0013] One embodiment relates to a data stream comprising pictures or video encoded using the encoding method described herein.
[0014] An embodiment relates to a computer program having a program code for performing the methods described herein, when the computer program runs on a computer.
[0015] The drawings are not necessarily to scale, emphasis instead generally being placed upon illustrating the principles of the invention. In the following description, various embodiments of the invention are described with reference to the following drawings, in which: [Brief description of the drawings]
[0016] [Figure 1] FIG. 1 illustrates an embodiment of an apparatus for decoding NN parameters according to a mapping scheme. [Diagram 2] FIG. 1 illustrates an embodiment of an apparatus for encoding NN parameters according to a mapping scheme. [Diagram 3] FIG. 1 illustrates one embodiment of a mapping scheme including three positive quantization indexes. [Figure 4] FIG. 1 illustrates one embodiment of a mapping scheme including two positive quantization indexes. [Diagram 5] FIG. 1 illustrates one embodiment of a mapping scheme including negative quantization indexes. [Figure 6] FIG. 1 illustrates one embodiment of a mapping scheme including positive and negative quantization indexes. [Figure 7]FIG. 1 illustrates one embodiment of a mapping scheme including two negative quantization indexes. [Figure 8] FIG. 1 illustrates one embodiment of decoding of quantization indexes. [Figure 9] FIG. 1 illustrates an embodiment of an apparatus for decoding update parameters of NN parameters. [Figure 10] FIG. 1 illustrates an embodiment of an apparatus for encoding update parameters of NN parameters. [Figure 11] FIG. 13 illustrates one embodiment of decoding of quantization indexes representing update parameters of NN parameters. [Figure 12] FIG. 1 illustrates an embodiment of a method for decoding NN parameters according to a mapping scheme. [Figure 13] FIG. 1 illustrates an embodiment of a method for encoding NN parameters according to a mapping scheme. [Figure 14] FIG. 1 illustrates an embodiment of a method for decoding update parameters of NN parameters. [Figure 15] FIG. 1 illustrates an embodiment of a method for encoding update parameters of NN parameters. [Figure 16] FIG. 1 illustrates a neural network. [Figure 17] FIG. 1 illustrates a uniform reconstruction quantizer. [Figure 18] FIG. 2 illustrates integer codebook encoding. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0017] Equivalent or equivalent elements, or elements having equivalent or equivalent functionality, are designated in the following description with the same or equivalent reference numbers, even if they occur in different figures.
[0018] In the following, the embodiments are described in detail, but it should be understood that the embodiments provide many applicable concepts that can be implemented in a wide variety of coding concepts. The specific embodiments described are merely illustrative of specific ways to implement and use the concepts, and do not limit the scope of the embodiments. In the following description, a number of details are described to provide a more complete description of the embodiments of the present disclosure. However, it will be apparent to those skilled in the art that other embodiments can be implemented without these specific details. In other instances, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring the examples described herein. Furthermore, features of different embodiments described herein can be combined with each other unless specifically stated otherwise.
[0019] Further embodiments are described by the claims and their accompanying description.
[0020] The present invention describes a method for parameter coding of a set of full neural network parameters or incremental updating of a set of neural network parameters, or more specifically, encoding / decoding of integer indices related to the parameters of a neural network. These integer indices may be the output of a quantization process prior to the encoding stage.
[0021] Such integer indices may, for example, indicate quantization levels that can be multiplied with a float-valued quantization step size to generate a reconstructed version of the model, or may specify an index that is then mapped to a reconstructed weight value using a codebook.
[0022] Typically, the integer index is encoded using an entropy coding method such as DeepCABAC, which is also part of the MPEG-7 Part 17 standard for Compression of Neural Networks for Multimedia Content Description and Analysis [2].
[0023] Furthermore, the described method can be used in combination with all existing methods for neural network compression (e.g., those given in the MPEG-7 Part 17 standard for Compression of Neural Networks for Multimedia Content Description and Analysis [2]), provided that the requirements given previously are met.
[0024] The described method deals with the entropy coding stage, or more specifically, the binarization process and context modeling, as defined, for example, by the DeepCABAC entropy coding method based on CABAC [3]. However, the method is applicable to all entropy coding methods that use similar binarization or context modeling processes.
[0025] The methodology of the apparatus can be divided into different main parts consisting of: 1. Integer representation of neural network parameters (quantization) 2. Binarization and lossless encoding 3. Lossless Decoding
[0026] In order to understand the main advantages of the present invention, we first provide a brief introduction to the topic of neural networks and related methods for parameter coding.
[0027] 1 Applicable area In their most basic form, neural networks compose a chain of affine transformations followed by element-wise nonlinear functions. They can be represented as directed acyclic graphs, as shown in Figure 16. Each node is accompanied by a specific value that is forward propagated to the next node by multiplication with the edge's respective weight value. All input values are then simply aggregated. Figure 16 is a diagram of a two-layer feedforward neural network, i.e., Figure 16 shows a graph representation of a feedforward neural network. Specifically, this two-layer neural network is a nonlinear function that maps a four-dimensional input vector to a real line.
[0028] Mathematically, the neural network shown in FIG. 16 calculates its output in the following manner: TIFF2025502873000002.tif8105 where W1 and W2 are the weight parameters (edge weights) of the neural network and sigma σ is some nonlinear function. For example, so-called convolutional layers can also be used by casting them as a matrix-matrix product as described in [1]. The incremental updates are usually aimed at providing updates to the weights of W1 and W2 and can be the result of an additional training process. The updated versions of W1 and W2 usually result in a revised output. In the following, the procedure of calculating the output from a given input is called inference. We also call the intermediate results hidden layers or hidden activation values, which constitute a linear transformation + element-wise nonlinearity, such as the calculation of the first dot product + nonlinearity mentioned above.
[0029] Neural networks are typically equipped with millions of parameters and may require hundreds of MB to represent. As a result, they require high computational resources to be performed, as their inference procedure involves the calculation of many dot-product operations between large matrices. It is therefore very important to reduce the complexity of performing these dot products.
[0030] 2. Encoding Concepts This section describes concepts that may be optionally implemented in embodiments according to the invention. The concepts may be implemented individually or in combination.
[0031] 2.1 Quantization, Integer Representation, and Entropy Coding For example, embodiments may be implemented according to the MPEG-7 Part 17 standard for Compression of Neural Networks for Multimedia Content Description and Analysis [2]. This standard provides different methods for quantization and integer representation of neural network parameters, such as independent scalar quantization and codebook-based integer representation. Furthermore, it specifies an entropy quantization scheme, also known as deepCABAC [4]. These methods are briefly summarized in this section for better understanding. Details can be found in [2].
[0032] 2.1.1 Scalar quantizer The neural network parameters can be quantized using a scalar quantizer. As a result of the quantization, the set of allowable values of the parameters is reduced. In other words, the neural network parameters are mapped to a countable set (actually, a finite set) of so-called reconstruction levels. The set of reconstruction levels represents a proper subset of the set of possible neural network parameter values. To simplify the entropy coding below, the allowable reconstruction levels are represented by quantization indexes transmitted as part of the bitstream. On the decoder side, the quantization indexes are mapped to the reconstructed neural network parameters. The possible values of the reconstructed neural network parameters correspond to the set of reconstruction levels. On the encoder side, the result of the scalar quantization is a set of (integer) quantization indexes. Figure 17 illustrates a uniform reconstruction quantizer.
[0033] In an embodiment of the present invention, a Uniform Reconstruction Quantizer (URQ) can be optionally used. Its basic design is shown in FIG. 17. URQ has the property that the reconstruction levels are equally spaced. The distance Δ between two adjacent reconstruction levels is called the quantization step size. One of the reconstruction levels is equal to 0. Thus, the complete set of available reconstruction levels is uniquely specified by the quantization step size Δ. The decoder mapping of the quantization index q to the reconstructed weight parameter t′ is, in principle, given by the following simple formula: TIFF2025502873000003.tif718In this context, the term "independent scalar quantization" refers to the property that given a quantization index q of any weight parameter, the associated reconstructed weight parameter t' can be determined independently of all quantization indexes of the other weight parameters.
[0034] 2.1.2 Integer Codebook Representation Instead of transmitting the quantization levels directly, they can be mapped to integer indices using a codebook. Each integer index specifies a location in the codebook that contains the associated quantization level. The integer indices and the codebook are transmitted as part of the bitstream. At the decoder side, the integer indices are mapped to quantization levels using the codebook (table lookup), and then the quantization levels are mapped to the reconstructed neural network parameters using the technique also used for scalar quantization (multiplying by the quantization step size, which is also part of the bitstream).
[0035] A codebook representation can be beneficial when the number of unique weight parameters is small but the quantization is very fine. In these cases, scalar quantization can result in several unique but large quantization levels being transmitted, as described, for example, in Section 2.1.1. With the codebook representation, the transmitted values can be mapped to smaller indices.
[0036] In other words, according to an embodiment, the neural network parameters may be quantized using scalar quantization to obtain quantization levels, which are then mapped to quantization indexes using a codebook, e.g., as described below.
[0037] The integer indices are coded using the entropy coding stage, i.e. deepCABAC, in the same way as is done for the quantization levels output by the quantization stage.
[0038] The integer codebook is encoded as described below. integer_codebook() is defined as shown in FIG.
[0039] For example, the function integerCodebook[j] returns for each quantization index the associated value of the reconstruction level or quantization level associated with that quantization index. The quantization indexes form a monotonic sequence of integers, and the values of the quantization indexes are associated with their position in the sequence of integers by the variable cbZeroOffset. For example, as can be seen in FIG. 18, the sequence of integer values to be coded is contained in the vector integerCodebook, which are strictly monotonically ordered. For coding, the encoder encodes into the data stream a predefined integer value codebook_0_value, which is placed at a predefined position cbZeroOffset of the sequence of integer values. In the example, the predefined position is the position in the monotonic sequence of integers associated with the value 0.
[0040] In the example of Figure 18, in the first for loop, the position of the sequence of integer values before the given position cbZeroOffset is coded first. In particular, for each such position j, a first difference is calculated between the integer value immediately following the respective position, stored in previousValue as the for loop traverses these positions towards the beginning of the sequence of integer values, and the integer value of the respective position, integerCodebook[j], decremented by 1, and the first difference is coded into the data stream, i.e., codebook_delta_left=previousValue-integerCodebook[j]-1. Then, in the second for loop, the position of the sequence of integer values next to the given position is coded first. For each such position in the sequence of integer values, the integer value at the respective position, integerCodebook[j], and the integer value immediately preceding the respective position, where a for loop traverses these positions towards the end of the sequence of integer values, are stored in previousValue as they are initialized with a predefined integer value, and immediately before the second for loop a predefined integer value, codebook_0_value, is calculated, a second difference with the value decremented by 1 is calculated, and the second difference is coded into the data stream, i.e., codebook_delta_right=integerCodebook[j]-previousValue-1. As mentioned before, the order of coding the differences can be switched or even alternated. To decode the sequence of integer values, a predefined integer value, codebook_0_value, located at a predefined position, cbZeroOffset, in the sequence of integer values is decoded from the data stream.Then, for each position in the sequence of integer values preceding the given position, a first difference between the integer value immediately following the respective position and the integer value of the respective position decreased by one is decoded from the data stream, i.e., codebook_delta_left=previousValue-integerCodebook[j]-1, and for each position in the sequence of integer values following the given position, a second difference between the integer value of the respective position and the integer value immediately preceding the respective position decreased by one is decoded from the data stream, i.e., codebook_delta_right=integerCodebook[j]-previousValue-1.
[0041] More specifically, the number of integer values in the sequence of integer values is also coded into the data stream, i.e., codebook_size. This is done using a variable length code, i.e., a quadratic Exp-Golomb code.
[0042] Information about a given position codebook_centre_offset of the coded sequence of integer values can also be coded into the data stream. This coding is done differently for the center position of the sequence: cbZeroOffset-(codebook_size>>1)=codebook_centre_offset is coded, i.e. the difference between the rank of the given position cbZeroOffset and an integer rounded half of the number of integer values, here rounded half, i.e. codebook_size>>1. This is done using a variable length code, i.e. a quadratic Exp-Golomb code.
[0043] A given integer value, codebook_0_value, is coded using a 7th order Exp-Golomb code.
[0044] The first and second differences are coded using an Exp-Golomb code of order k, where k is coded into the data stream as codebook_egk, which is coded as a 4-bit unsigned integer.
[0045] A coding sequence of integer values, eg, a codebook (integer_codebook), is defined by the variables cbZeroOffset and integerCodebook - a predefined position in the sequence of integer values, eg, z, and a predefined integer value, eg, C(z), located at the predefined position.
[0046] The parameters that define a sequence, e.g., a codebook, include an exponential Golomb code parameter, e.g., an Exp-Golomb code parameter, e.g., k (codebook_egk), and the number of integer values in the sequence of integer values, e.g., the number of elements in the codebook (codebook_size). These parameters are decoded from a data stream, e.g., a bit stream, that are used in creating the determined sequence of integer values.
[0047] The predetermined position (cbZeroOffset) is a variable (codebook_centre_offset) calculated using the difference (codebook_centre_offset) between the rank of the predetermined position and an integer rounded half of the number of integer values, which is coded in the bitstream. The variable codebook_centre_offset is defined in one embodiment as the third difference, e.g., y. The variable codebook_centre_offset specifies an offset for accessing an integer value in a sequence, e.g., an element in a codebook, relative to the center of the sequence, e.g., a codebook. The difference (codebook_centre_offset) is decoded from a data stream, e.g., a bitstream, used in creating the determined sequence of integer values.
[0048] The parameter codebook_0_value, which defines an encoded sequence, e.g., a codebook, specifies a predefined integer value (integerCodebook) located at a predefined position (cbZeroOffset), e.g., the value of the codebook at position CbZeroOffset. This parameter participates in the creation of a decoded sequence of integer values, e.g., a variable codebook (an array representing a codebook).
[0049] In generating a decoded sequence, the first difference (codebook_delta_left) and the second difference (codebook_delta_right) are decoded from a data stream, eg, a bitstream.
[0050] The first difference (codebook_delta_left) specifies the difference between the integer value immediately following the respective position and the integer value at the respective position, and is decremented by one for each position in the sequence of integer values preceding the given position (cbZeroOffset), e.g., the difference between a codebook value and its right neighbor subtracts one for the value to the left toward the center position. The first difference (codebook_delta_left) is responsible for creating a decoded sequence of integer values, e.g., a variable Codebook (an array representing a codebook), as shown in FIG. 18. For each position in the sequence of positions preceding the given position (cbZeroOffset), the integer value at the respective position is calculated by linearly combining the first difference (codebook_delta_left), the integer value immediately following the respective position (previousValue=integerCodebook[j+1]), and one.
[0051] integerCodebook[j]=previousValue-codebook_delta_left-1 The second difference (codebook_delta_right) specifies the difference between the integer value at each position and the integer value immediately preceding the respective position, and is decremented by 1 for each position of the sequence of integer values located after the predetermined position (cbZeroOffset), e.g., the difference between a codebook value and its left neighbor subtracts 1 for the value to the right of the center position. The second difference is responsible for creating a decoded sequence of integer values, e.g., a variable Codebook (an array representing a codebook), as shown in FIG. 18. For each position of the sequence of integer values located after the predetermined position (cbZeroOffset), the integer value at the respective position is calculated by linearly combining the second difference (codebook_delta_right), the integer value immediately preceding the respective position (previousValue=integerCodebook[j-1]), and 1.
[0052] integerCodebook[j]=previousValue+codebook_delta_right+1. The exponential Golomb code parameter (codebook_egk) is used to decode the syntax elements codebook_delta_left, which defines the first difference, and codebook_delta_right, which defines the second difference.
[0053] 2.1.3 Entropy Coding As a result of the quantization applied in the previous step, the weight parameters are mapped to a finite set of so-called reconstruction levels. These can be represented by (integer) quantizer indices (also called quantization indices (e.g. in scalar quantization as described above), integer indices (e.g. when an integer codebook is used as described above), or parameter or weight levels) and quantization step sizes, which may for example be fixed for the entire layer. To recover all quantized weight parameters of a layer, the step sizes and dimensions of the layer can be known by the decoder. They may for example be transmitted separately.
[0054] 2.1.3.1 Binarization and Coding of Quantization or Integer Indices Using Context-Adaptive Binary Arithmetic Coding (CABAC) The quantization index (integer representation) or (codebook) integer index is then transmitted using an entropy coding technique. Thus, the layer of weights is mapped to a sequence of quantized weight levels, e.g., quantization index or integer index, using a scan. For example, a row-major scanning order can be used, starting from the top row of the matrix and encoding the contained values from left to right. In this way, all rows are encoded from top to bottom. However, any other scan can also be applied. For example, the matrix can be transposed or flipped horizontally and / or vertically and / or rotated 90 / 180 / 270 degrees left or right before applying the row-major scanning. Optionally, the quantization levels can be mapped to integer indexes using a codebook. In the following, we refer to values that are encoded as indexes, whether they are quantized weight levels or codebook integer indexes.
[0055] For example, the NN parameters, e.g., for one layer of a NN, can be represented as a 2D matrix with one row containing the NN parameters associated with exactly one output neuron of the neural network, e.g., for one output neuron, the row can contain one or more parameters, e.g., weights, for each of the output neuron's one input neurons.
[0056] For example, the index is coded using CABAC (Context-Adaptive Binary Arithmetic Coding). For details, see [2]. Therefore, the index TIFF2025502873000004.tif73 can be decomposed into a series of binary symbols or syntax elements and then passed to a binary arithmetic coder (CABAC).
[0057] In the first step, a binary syntax element sig_flag of the index is derived that specifies whether the corresponding index is equal to 0. If sig_flag is equal to 1, a further binary syntax element sign_flag is derived. The bin indicates whether the current index is positive (e.g., bin = 0) or negative (e.g., bin = 1).
[0058] Next, a single-term sequence of the bin is encoded, followed by encoding of a fixed-length sequence as follows.
[0059] The variable k is initialized with a non-negative integer, and X is initialized with 1 << k.
[0060] One or more syntax elements abs_level_greater_X indicating that the absolute value of the index is greater than X are encoded. If abs_level_greater_X is equal to 1, the variable k is updated (e.g., incremented by 1), then 1 << k is added to X, and further abs_level_greater_X are encoded. This procedure continues until abs_level_greater_X is equal to 0. Thereafter, a fixed-length code of length k is sufficient to complete the encoding of the index. For example, the variable TIFF2025502873000005.tif727 can be encoded using k bits. Alternatively, the variable TIFF2025502873000006.tif79 is encoded using k bits and can be defined as TIFF2025502873000007.tif754. Alternatively, any other mapping of the variable to a fixed-length code of k bits TIFF2025502873000008.tif78 may be used.
[0061] If we increase k by 1 after each abs_level_greater_X, then this approach is identical to applying exponential Golomb coding (if sign_flag is not taken into account).
[0062] 2.1.3.2 Decoding Quantization Indexes Using Context-Adaptive Binary Arithmetic Coding (CABAC) Decoding the index (integer representation) works similarly to encoding. The decoder first decodes sig_flag. If this is equal to 1, then a unary sequence of sign_flag and abs_level_greater_X follows, where the update of k (and therefore the increment of X) must follow the same rules as the encoder. Finally, it decodes the k-bit fixed-length code, which is then converted to an integer (e.g., TIFF2025502873000009.tif78 and Depending on whether TIFF2025502873000010.tif79 or TIFF2025502873000010.tif79 was encoded, TIFF2025502873000011.tif78 or TIFF2025502873000012.tif79). Then, the decoded index The absolute value of TIFF2025502873000013.tif76 can be reconstructed from X to form the fixed length part. For example, If TIFF2025502873000014.tif78 is used as the fixed length part, TIFF2025502873000015.tif727. Or, When TIFF2025502873000016.tif79 is encoded, TIFF2025502873000017.tif759. As a final step, the code is Applied to TIFF2025502873000018.tif76, index Then whenever the index refers to a codebook index, the quantized weight level is generated by a codebook table lookup. We can get TIFF2025502873000020.tif713. Finally, the quantized weight levels Step size to TIFF2025502873000021.tif713 Quantized weights by multiplying TIFF2025502873000022.tif73 TIFF2025502873000023.tif74 is reconstructed.
[0063] Context Modeling In CABAC entropy coding, most syntax elements of the quantized weight levels are coded using binary probability modeling. Each binary decision (bin) is associated with a context. The context represents a probability model of the class of coded bins. The probability of one of the two possible bin values is estimated for each context based on the values of the bins already coded in the corresponding context. Depending on the application, different context modeling techniques can be applied. Typically, for some bins related to the coding of quantized weights, the context used for coding is selected based on the syntax elements already transmitted. Depending on the actual application, different probability estimators can be selected, for example, those of SBMP [4], or HEVC [5] or VTM-4.0 [6]. The choice affects, for example, compression efficiency and complexity.
[0064] A context modeling scheme that is suitable for a wide range of neural networks is described below: The quantized weight level at a particular location (x,y) in the weight matrix (layer). To decode TIFF2025502873000024.tif73, a local template is applied to the current position. This template contains several other (ordered) positions, e.g. (x-1,y), (x,y-1), (x-1,y-1), etc. For each position, a state identifier is derived.
[0065] In an embodiment variant (denoted as Si1), the state identifier of the position (x,y) TIFF2025502873000025.tif77 is derived as follows: if position (x,y) points outside the matrix, or if the quantized weight level at position (x,y) If TIFF2025502873000026.tif77 has not yet been decoded or is equal to 0, the state identifier TIFF2025502873000027.tif715. Otherwise, the state identifier is Let it be TIFF2025502873000028.tif740.
[0066] For a particular template, a sequence of state identifiers is derived and each possible constellation of state identifier values is mapped to a context index to identify the context in which it will be used. The templates and mappings may be different for different syntax elements. For example, an ordered sequence of state identifiers may be derived from a template containing (ordered) positions (x-1,y), (x,y-1), (x-1,y-1). TIFF2025502873000029.tif711, TIFF2025502873000030.tif711, For example, this sequence contains the context index For example, the context index TIFF2025502873000033.tif73 may be used to identify the number of contexts for sig_flag.
[0067] In one implementation variant (denoted as Method 1), the quantized weight level at position (x,y) The local template for sig_flag or sign_flag in TIFF2025502873000034.tif77 consists of only one position (x-1,y) (i.e., the left neighbor). Associated state identifier TIFF2025502873000035.tif711 is derived according to the implementation variant Si1.
[0068] For sig_flag, Depending on the value of TIFF2025502873000036.tif711, one of three contexts is selected, or for sign_flag, Depending on the value of TIFF2025502873000037.tif711, one of the other three contexts is selected.
[0069] In another implementation variant (shown in technique 2), the local template of the sig flag includes three ordered positions: (x-1, y), (x-2, y), (x-3, y). TIFF2025502873000038.tif711, The associated sequence of TIFF2025502873000039.tif723 is derived according to the implementation variant Si2.
[0070] For sig_flag, the context index TIFF2025502873000040.tif73 is derived as follows: In the case of TIFF2025502873000041.tif719, TIFF2025502873000042.tif711. Otherwise, In the case of TIFF2025502873000043.tif719, TIFF2025502873000044.tif711. Otherwise, In the case of TIFF2025502873000045.tif719, TIFF2025502873000046.tif711. Otherwise, The file is TIFF2025502873000047.tif711.
[0071] This can also be expressed by the following formula: TIFF2025502873000048.tif13116Similarly, the number of neighbors to the left can be increased or decreased so that the context index C is equal to the distance to the next non-zero weight to the left (not exceeding the template size).
[0072] 2.2 Incremental Neural Network Coding 2.2.1 Concept of Base Model and Updated Model This concept introduces a neural network model according to Section 1 that can be considered a complete model in the sense that it is possible to compute an output for a given input. We call this model the base model. Each base model is represented as a base layer. The base layer consists of layers shown as TIFF2025502873000050.tif729. The base layer contains base values that can be selected, for example, so that they can be efficiently represented or compressed / transmitted in a first step. Furthermore, this concept is applied to the update model ( TIFF2025502873000051.tif735, which may have an architecture similar to or even identical to the base model. The updated models, for example, do not have to be complete models in the sense described above. Instead, the updated models are combined with the base model using composition methods, so that they form a new complete model. TIFF2025502873000052.tif78 can be formed. This model itself can serve as a base model for further updated models. Updated Model TIFF2025502873000053.tif78 is the update layer It consists of a layer called TIFF2025502873000054.tif737. The update layer contains, for example, base values that can be selected such that they can be efficiently represented or compressed / transmitted separately.
[0073] The updated model may be the result of an (additional) training process applied to the base model at the encoder side. Depending on the type of updates provided by the updated model, several synthesis methods can be applied. It should be noted that the methods described within this invention are not limited to any particular type of update / synthesis method, but are applicable to any architecture that uses the base model / updated model approach.
[0074] In a preferred embodiment, TIFF2025502873000055.tif 73rd updated model TIFF2025502873000056.tif78 is a new model layer according to the following: Base model to form TIFF2025502873000057.tif710 The layer with the difference values (also called incremental updates) that will be added to the corresponding layer in TIFF2025502873000058.tif76 TIFF2025502873000059.tif79 (index j identifies an individual layer). TIFF2025502873000060.tif754The new model layer forms the (updated) new model, which then serves as the base model for the next incremental update, which is sent separately.
[0075] In a further preferred embodiment, TIFF2025502873000061.tif7The third update model is the new model according to the following The corresponding base layer to form TIFF2025502873000062.tif79 A layer with a scaling factor value multiplied by the value in TIFF2025502873000063.tif77 Includes TIFF2025502873000064.tif79. TIFF2025502873000065.tif752The new model layer forms the (updated) new model, which then serves as the base model for the next incremental update, which is sent separately.
[0076] In some cases, the update model may also update one or more existing layers (i.e., for layer k: Note that you can include a new layer that replaces the old one (TIFF2025502873000066.tif742).
[0077] 2.2.2 Coding Neural Network Parameters for Incremental Updates The concept of base model and one or more incremental updates can be utilized in the entropy coding stage to improve coding efficiency. The parameters of the layers are usually represented by multidimensional tensors. For the coding process, all tensors are usually mapped into a 2D matrix, such as entities like rows and columns. Then, this 2D matrix is scanned in a predefined order and the parameters are coded / transmitted. It should be noted that the method described below is not limited to 2D matrices. The method is applicable to all representations of neural network parameters that provide parameter entities of known size, such as rows, columns, blocks, etc., and / or combinations thereof. The 2D matrix representation is used below to better understand the method.
[0078] In a preferred embodiment, the parameters of the layers are represented as a 2D matrix providing value entities such as rows and columns.
[0079] 2.2.2.1 Improved context modeling for base model update model structure The concept of a base model and one or more update models can be utilized in the entropy coding stage. The methods described herein are applicable to any entropy coding scheme that uses a context model, such as the one described in Section 2.1.4.
[0080] Typically, separate update models (and base models) are available correlated at the encoder and decoder sides, which can be used in the context modeling stage to improve coding efficiency by providing new context models and methods for context model selection.
[0081] In the preferred embodiment, binarization (sig_flag, sign_flag, etc.), context modeling and encoding schemes according to section 2.1.3.1 are applied.
[0082] In another preferred embodiment, the context models (context sets) of a given number of symbols to be coded are replicated to form a set of two or more context models. A set of context models is then selected based on the values of co-located parameters in a corresponding layer of a particular previously coded update or base model. This is done by selecting the set of context models based on the values of the co-located parameters within a corresponding layer of a particular previously coded update or base model. The first set is selected if the value is lower than the threshold The second set is selected if the value is greater than or equal to the threshold value TIFF2025502873000068.tif75. TIFF2025502873000069.tif75 or greater, a third set is selected, etc. This procedure can be applied with more or fewer thresholds.
[0083] In a preferred embodiment equivalent to the previous embodiment, a single threshold TIFF2025502873000070.tif713 is used.
[0084] In a further preferred embodiment, the context models (context sets) of a given number of symbols to be coded are replicated to form a set of two or more context models. A set of context models is then selected based on the absolute values of the co-located parameters in the corresponding layer of a particular previously coded update or base model, which is determined when the absolute values of the co-located parameters exceed a first threshold. The first set is selected if its absolute value is lower than another threshold The second set is selected if the absolute value is greater than or equal to the threshold. TIFF2025502873000073.tif75 or greater, a third set is selected, etc. This procedure can be applied with more or fewer thresholds.
[0085] In a preferred embodiment, which is equivalent to the previous embodiment, a sig_flag is encoded which indicates whether the current value being encoded is equal to 0 or not, which employs a set of context models. Use TIFF2025502873000074.tif713.
[0086] Another preferred embodiment is equal to the previous embodiment, but instead of sig_flag a sign_flag is encoded which indicates the sign of the current value being encoded.
[0087] A further preferred embodiment is equivalent to the previous embodiment, but instead of sig_flag, abs_level_greater_X is coded, which indicates whether the current value being coded is greater than X.
[0088] In a further preferred embodiment, the context models (context sets) of a given number of symbols to be coded are multiplied by two to form two sets of context models. Then, depending on whether there is a corresponding previously coded update (or base) model, the set of context models is selected. If there is no corresponding previously coded update (or base) model, the first set of context models is selected, otherwise the second set is selected.
[0089] In another preferred embodiment, a context model from the set of context models for a syntax element is selected based on the value of a co-located parameter in a particular corresponding previously encoded updated (or base) model, where the co-located parameter is greater than or equal to a threshold. The first model is selected if the value is lower than the threshold The second model is selected if the value is greater than or equal to TIFF2025502873000076.tif75, and another threshold is set. TIFF2025502873000077.tif75 or greater, a third set is selected, etc. This procedure can be applied with more or fewer thresholds.
[0090] In a preferred embodiment equivalent to the previous embodiment, a sign_flag is encoded which indicates the sign of the current value being encoded. The first threshold for the context model selection process is TIFF2025502873000078.tif713, and the second threshold is The file is TIFF2025502873000079.tif713.
[0091] In another preferred embodiment, a context model from the set of context models for a syntax element is selected based on the absolute value of a co-located parameter in a particular corresponding previously coded updated (or base) model, where the absolute value of the co-located parameter is greater than or equal to a threshold. The first model is selected if the value is lower than the threshold The second model is selected if the value is greater than or equal to the threshold. TIFF2025502873000082.tif75 or greater, a third model is selected, etc. This procedure can be applied with more or fewer thresholds.
[0092] In a preferred embodiment, which is equivalent to the previous embodiment, a sig_flag is encoded which indicates whether the current value being encoded is equal to 0 or not. The first threshold value set in TIFF2025502873000083.tif713 and The second threshold set in TIFF2025502873000084.tif713 is adopted.
[0093] In another preferred embodiment, which is equal to the previous embodiment, instead of sig_flag, a flag abs_level_greater_X is coded, which indicates whether the current value being coded is greater than X. Furthermore, Only one threshold is used, which is set in TIFF2025502873000085.tif713.
[0094] It should be noted that any of the above embodiments can be combined with one or more of the other embodiments.
[0095] 3. Invention Aspect 1: Coding of a Reduced Set of Values The present invention describes a modified binarization scheme for encoding the levels of quantized weights or integer indices when there is information about the possible values to be encoded / decoded available at the encoder and decoder, respectively. For example, all indices to be encoded / decoded may not be positive or negative, respectively. Therefore, the sign_flag does not carry any information and can be considered obsolete. Another example is when the maximum absolute level of all transmitted values is given. In this case, the number of abs_level_greater_X_flags may be reduced.
[0096] In the next section (Section 3.1), we describe a modified binarization scheme, assuming that the necessary information is available at the encoder and decoder. Then, Section 3.2 describes the concept of how to derive the information, more specifically, the value of sign_flag and the maximum absolute level on the decoder side.
[0097] FIG. 1 shows an apparatus 10 for decoding NN parameters from a data stream 14, for example referred to as a decoder 10, according to an embodiment. The decoder 10 comprises a mapping module 40, which maps quantization indexes 32, with which the NN parameters are coded in the data stream 14, to reconstruction levels 42 of the NN parameters. The reconstruction levels 42 may be dequantized to obtain the NN parameters (e.g. a scalar quantizer, which may optionally be characterized by a quantization parameter that may be signaled in the data stream, for example the scalar quantizer described in section 2.1.1), but this is not necessarily the case and in other examples the mapping 40 may directly map the quantization indexes to values of the NN parameters. The mapping module 40 uses a mapping scheme 44 obtained by the decoder 10 from the data stream 14 to map the quantization indexes to the reconstruction levels.
[0098] According to one embodiment, the decoder 10 is configured to inverse quantize or scale the reconstructed levels 42 using, e.g., a quantization parameter, e.g., a quantization step size, to obtain reconstructed values of the NN parameters that may correspond to the values of the NN parameters encoded by the encoder 11 despite the quantization loss. For example, the quantization indexes and the reconstruction levels may be integers, so that the mapping scheme is an integer-to-integer mapping.
[0099] The decoder 10 comprises a mapping scheme analyzer 34 which checks whether the mapping scheme 44 satisfies a predefined criterion. The decoder 10 further comprises a decoding module 30 configured to derive the quantization index 32 based on one or more syntax elements, which may include the predefined syntax element 22. Depending on whether the mapping scheme 44 satisfies the predefined criterion, the decoding module 30 derives the predefined syntax element 22 from the data stream 14 or infers a state of the predefined syntax element 22. For this purpose, the decoding module 30 may comprise a prediction module 24 for providing a state of the predefined syntax element 22. For example, the decoder 10 may assume the state to be the predefined state if the mapping scheme 44 satisfies the predefined criterion, i.e. the prediction module 24 may provide a fixed state in that case. In other examples, if the mapping scheme 44 satisfies a predefined criterion, the state of the given syntax element 22 may be determined using further information, such as already decoded syntax elements, or properties of the mapping scheme 44 (e.g., in the case of the sign flag described below, whether all indices of the codebook are non-positive or non-negative). Deriving the given syntax element 22 from the data stream 14 may be performed by the decoding module 30, for example, by entropy decoding, e.g., context-adaptive binary arithmetic coding, CABAC.
[0100] FIG. 2 shows an encoder 11 according to an embodiment, which may be an encoder corresponding to the decoder 10, i.e. an encoder for encoding the data stream 14 of FIG. 1. For this purpose, the encoder 11 may perform the inverse operation of the decoder 10. The encoder 10 comprises a mapping module 41 for subjecting the reconstruction levels to a mapping scheme 44 to obtain the quantization indexes 32. The mapping module 41 may apply the mapping scheme 44 in the reverse direction as the mapping module 40 of FIG. 1. The encoder 10 further comprises a coding module 31 for coding the quantization indexes 32 into the data stream, for example by using one or more syntax elements including the predefined syntax element 22 as described with respect to FIG. 1. If the mapping scheme 44 satisfies a predefined criterion, the coding module 31 skips or suppresses or refrains from coding the predefined syntax element 22 into the data stream 14. For example, the encoder 10 may comprise a mapping scheme analyzer 34 for checking a predefined criterion on the mapping scheme 44. The encoder 10 may further comprise a mapping scheme obtainer 48 for obtaining the mapping scheme 44. For example, the mapping scheme obtainer 48 may obtain the mapping scheme 44 based on an overall set of reconstruction levels, e.g. a range of values within which the reconstruction levels fall, and / or a number of reconstruction levels, and / or a step size of the reconstruction levels. The encoder 11 may be configured to quantize or scale the NN parameters, e.g. using a quantization step size, e.g. a quantization parameter, to obtain the reconstruction levels of the NN parameters.
[0101] Examples of mapping schemes 44 that can be used by the decoder 10 of FIG. 1 and the encoder 11 of FIG. 2 are shown in FIGS.
[0102] FIG. 3 illustrates a mapping scheme 44 according to one embodiment, including an exemplary number or three quantization indexes 32. In other words, the size of the mapping scheme 44, or codebook, is three. Each quantization index 32 is associated with a corresponding reconstruction level 42. Note that the mapping between the quantization indexes 32 and the reconstruction levels 42 is bijective. For example, each of the quantization indexes 32 has a position 33 in the sequence of quantization indexes 32. The positions 33 may be indicated by position indices, e.g., indexes 1, 2, and 3 in FIG. 3, but instead, the numbering starts with index 0. According to this embodiment, the quantization indexes 32 form a monotonic sequence of integers, e.g., the values of the quantization indexes are monotonic with respect to their positions in the sequence.
[0103] According to one embodiment, the mapping scheme 44 may be signaled in the data stream 14 or may be characterized by indicating the size of the sequence and the position 33* of a predefined quantization index 32*, e.g., a quantization index having value 0 as shown in FIG. 3 or any other predefined value. The size of the sequence may be indicated by codebook_size below. For example, the size of the sequence may represent the number or count of quantization indexes contained in the sequence, e.g., 3 as shown in FIG. 3. The position 33* may be indicated by the syntax element codebook_centre_offset or by the variable cbZeroOffset below.
[0104] According to one embodiment, the mapping scheme 44 may be further signaled by indicating the value of the reconstruction level 42* associated with a given quantization index 32* and, in the example, the distance 27 between adjacent reconstruction levels. The reconstruction level 42* may represent a given reconstruction level and may be denoted in the following by codebook_0_value. For this purpose, the reconstruction levels 42 may also form a monotonic sequence of numbers, which may optionally be integers.
[0105] For example, mapping scheme 44 may follow that described in Section 2.1.2, and mapping scheme 44 may be encoded into data stream 14 as described in Section 2.1.2.
[0106] 3.1 Modified Thresholding Method Subsections 3.1.1 and 3.1.2 describe two modifications of the binarization scheme, based on the available information. Both methods can be used in combination whenever the requirements of each method are met. Section 3.1.3 describes a special case where bins do not need to be transmitted.
[0107] 3.1.1 Skipping sign_flag The sign_flag may represent the predefined syntax element 22 described with reference to Figures 1 and 2. The sign_flag may be a syntax element indicating whether a value, e.g., a quantization value, or an index, e.g., a quantization index 32, is positive or negative. Optionally, the sign_flag may indicate for multiple values or indexes whether they are all positive or negative. In other words, the predefined syntax element 22 may be a sign flag indicating whether the quantization index 32 has a non-negative value, i.e., a positive value, or whether the quantization index 32 has a non-positive value, i.e., a negative value.
[0108] Whenever the indices in the set of indices to be coded are not all negative or not all positive, each index, e.g., quantization index 32, can be coded as follows: In a first step, a binary syntax element sig_flag for index 32 is derived, which specifies whether the corresponding index 32 is equal to 0 or not. Then, unlike the scheme described in 2.1.3.1, if sig_flag is equal to 1, the coding of sign_flag is skipped and instead a single term sequence of bins is coded, followed by a fixed length sequence as follows:
[0109] The variable k is initialized to a non - negative integer, and X is initialized to 1 << k.
[0110] One or more syntax elements abs_level_greater_X indicating that the absolute value of the index is greater than X are encoded. If abs_level_greater_X is equal to 1, the variable k is updated (e.g., incremented by 1), then 1 << k is added to X, and further abs_level_greater_X is encoded. This procedure continues until abs_level_greater_X is equal to 0. Thereafter, a fixed - length code of length k is sufficient to complete the encoding of index 32. For example, the variable TIFF2025502873000086.tif728 can be encoded using k bits. Alternatively, the variable TIFF2025502873000087.tif710 is encoded using k bits and can be defined as TIFF2025502873000088.tif755. Alternatively, any other mapping of the variable TIFF2025502873000089.tif79 to the k - bit fixed - length code may be used.
[0111] 3.1.2 End of Absolute - level Encoding According to one embodiment, a predetermined syntax element 22 is a predetermined threshold flag indicating whether the absolute value of the quantized index is greater than a threshold associated with the predetermined threshold flag, i.e., X, for example, abs_level_greater_X. The threshold may be an integer value such as 1, 2, or 3.
[0112] The absolute level of the index 32 is coded, for example, using a single term sequence of bins (abs_level_greater_X; for example, a sequence of threshold flags associated with different thresholds, i.e. X, in which the thresholds may be monotonically increasing integers, for example a sequence of abs_level_greater_1, abs_level_greater_2, and abs_level_greater_3). From the decoder 10's point of view, this single term sequence ends when abs_level_greater_X decoded from the bitstream, i.e. data stream 14, is equal to 0. However, if a maximum absolute value is available to the encoder 11 and the decoder 10, this allows early termination of the single term sequence of all indexes 32 with absolute value equal to the maximum absolute value. The binarization scheme of the indexes 32 to be coded is then as follows:
[0113] If the requirements of the method described in 3.1.1 are not met, in a first step a binary syntax element sig_flag is derived for an index 32 specifying whether the corresponding index 32 is equal to 0 or not. If sig_flag is equal to 1 a further binary syntax element sign_flag is derived. Bin indicates whether the current index 32 is positive (e.g. bin=0) or negative (e.g. bin=1). Otherwise, if the requirements of the method described in 3.1.1 are met, sig_flag is coded and coding of sign_flag is skipped. In this case, sign_flag may represent a predefined syntax element 22 and the threshold flag may represent a further predefined syntax element, and the decoder 10 and / or the encoder 11 may be configured to check whether the respective mapping scheme 44 meets a further predefined criterion. Depending on this check, the decoder 10 may be configured to decide whether to infer or decode the further predefined syntax element, and the encoder 11 may be configured to decide whether to skip encoding or to encode the further predefined syntax element.
[0114] Next, the maximum absolute value Assuming that TIFF2025502873000090.tif74 is available, the following applies. If TIFF2025502873000091.tif74 is equal to 1, no further bins are encoded; otherwise, a single-term sequence of bins is encoded, followed, if necessary, by a fixed-length sequence as follows.
[0115] The variable k is initialized with a non-negative integer, and X is initialized with 1<<k.
[0116] One or more syntax elements abs_level_greater_X indicating that the absolute value of index 32 is greater than X are encoded. If abs_level_greater_X is equal to 1, the variable k is updated (e.g., incremented by 1), then 1<<k is added to X, and further abs_level_greater_X are encoded. This procedure continues until abs_level_greater_X is equal to 0 or X becomes TIFF2025502873000092.tif712 or more. For example, in particular, in an example where sig_flag is treated as a flag indicating whether the absolute value of q is greater than 0, a case X greater than M - 1 may occur for X == 0.
[0117] Next, after encoding abs_level_greater_X equal to 0, to complete the encoding of index 32, a fixed-length code of length k is sufficient. For example, the variable TIFF2025502873000093.tif728 can be encoded using k bits. Alternatively, the variable TIFF2025502873000094.tif710 is encoded using k bits TIFF2025502873000095.tif755 can be defined as. Alternatively, the variable to a fixed-length code of k bits Any other mapping of TIFF2025502873000096.tif79 may be used.
[0118] 3.1.3 Skipping Index Encoding In a special case, none of the syntax elements need to be transmitted and the integer index 32, and therefore the reconstruction level, can be derived entirely at the decoder side. This is given by the maximum absolute level of all transmitted indices being 0 ( TIFF2025502873000097.tif714, which means that all indices sent in the tensor are 0.
[0119] 3.2 Derivation Concept of sign_flag and Maximum Absolute Level The method described in section 3.1 requires that the value or maximum absolute value of sign_flag is available at the encoder 11 and decoder 10. Usually, this information is only available at the encoder 11 side, but this section provides an idea on how to derive the information at the decoder 10.
[0120] 3.2.1 Deriving the sign_flag value and the threshold flag (abs_level_greater_X syntax element) from the codebook If a codebook-based integer representation, e.g. according to section 2.1.2, is applied, the maximum absolute level and possibly the value of the sign flag can be derived in the decoder 10. Typically the codebook is decoded in a previous step from the bitstream 14. Possibly, the limits of a range including all possible quantization indexes may be determined from the codebook.
[0121] In the example of a codebook according to section 2.1.2 that can be decoded from the bitstream 14, the decoded index depends on the length of the codebook (codebook_size) and the value of cbZeroOffset. The codebook may be a mapping scheme 44 as shown in one of Figures 3-7 and may be selected by the decoder 10 shown in Figure 1 and the encoder 11 shown in Figure 2.
[0122] a) Deriving the threshold flag: The threshold flag is an example of the predetermined syntax element 22 or the further predetermined syntax element. The threshold flag indicates, for example, whether the absolute value of the quantization index 32 is greater than a threshold value associated with the threshold flag. For example, the threshold value is a positive value.
[0123] As explained in section 3.1.2, a parameter M can be used to terminate the encoding / decoding of the sequence of threshold flags, where M represents the maximum absolute value of the current index 32.
[0124] According to one embodiment, when codebook_size is equal to 1, the maximum absolute level TIFF2025502873000098.tif74 is derived to be 0 (as described in Section 3.1.3). In this case, the decoder 10 may be configured to infer the quantization index to be 0.
[0125] Otherwise (codebook_size is not equal to 1), for the current index 32 to be coded, the value of sign_flag is derived or decoded from the bitstream 14. Then, the maximum absolute value M of the current index 32 can be derived as follows: TIFF2025502873000099.tif13125This embodiment has the advantage that M can accurately indicate the maximum possible value M for both positive and negative quantization indexes, even when the quantization indexes are not symmetrically distributed around 0, in the example.
[0126] For example, there may be two cases where the predefined criterion is met and the predefined threshold flag may be inferred by the decoder 10 or may be omitted in the encoding by the encoder 11. The predefined criterion is met, for example, when the quantization indexes 32 to be reconstructed or encoded have a non-negative value and none of the quantization indexes 32 included in the mapping scheme 44 is greater than the threshold associated with the predefined threshold flag. The predefined criterion is also met, for example, when the quantization indexes 32 to be reconstructed or encoded have a non-positive value and none of the quantization indexes 32 included in the mapping scheme 44 is less than the negative of the threshold associated with the predefined threshold flag. For example, the decoder 10 / encoder 11 may check the predefined criterion depending on the sign of the quantization indexes 32. For example, the decoder 10 / encoder 11 may determine the predefined threshold flag separately for the two cases of positive and negative quantization indexes 32.
[0127] For example, the decoder 10 / encoder 11 of Fig. 1 and Fig. 2 may check one or more threshold flags, e.g. sequentially check a sequence of threshold flags, and check whether a predefined criterion is met. The decoder 10 / encoder 11 may select the threshold flag associated with the smallest absolute threshold value and meeting the predefined criterion as the predefined threshold flag, e.g. threshold flag abs_level_greater_M. The decoder 10 / encoder 11 may select a threshold flag, the threshold of which is associated with the highest absolute value possible for the quantization index 32 according to the mapping scheme 44, and is selected as the predefined threshold flag, e.g. threshold flag abs_level_greater_M. In other words, the decoder 10 / encoder 11 may be configured to determine the maximum value M of the absolute values of the quantization index 32 included in the mapping scheme 44, and to select the predefined threshold flag of the one or more threshold flags such that the threshold value associated with the predefined threshold flag is equal to the maximum value M of the absolute values of the quantization index 32. The maximum value M of the absolute values of the quantization indexes 32 may be determined based on the number of quantization indexes 32 included in the mapping scheme 44, eg, a count indication.
[0128] If the predefined syntax element 22 is a predefined threshold flag, the decoder 10 may be configured to infer that the predefined threshold flag indicates that the absolute value of the quantization index 32 is less than or equal to the threshold associated with the predefined threshold flag, and the encoder 11 may be configured to skip encoding the predefined threshold flag into the data stream 14. In inferring, the decoder 10 may be configured to set the predefined syntax element 22 to a predefined state indicating that the quantization index 32 is less than or equal to the threshold. Based on this inference, the decoder 10 may be configured, for example, to set the value of the quantization index 32 to the threshold associated with the predefined threshold flag, or may be configured to further decode from the data stream 14 a residual of the quantization index, for example the difference between the quantization index 32 and the threshold associated with the predefined threshold flag.
[0129] The quantization index 32 may be represented by two or more threshold flags, which may be sequentially decoded / encoded by deriving / encoding a first of the two or more threshold flags; if the first threshold flag indicates that the value of the absolute value of the quantization index 32 is greater than a threshold associated with the first threshold flag, e.g., adapt the value of the quantization index based on a threshold associated with the first threshold flag and continue sequential reading / encoding of the threshold flags; if the first threshold flag indicates that the value of the absolute value of the quantization index 32 is not greater than the threshold associated with the first threshold flag, stop sequential derivation / encoding of the threshold flags and adapt the value of the quantization index based on, e.g., a first threshold associated with the first threshold flag, and optionally continue decoding / encoding a residual value of the quantization index 32 to / from the data stream and adapt the value of the quantization index 32 based on the first threshold and the residual value. The sequence of decoding / encoding threshold flags of two or more threshold flags is terminated, for example, when each threshold flag corresponds to a predefined threshold flag or when each threshold flag indicates that the value of the absolute value of the quantization index is less than or equal to the threshold value associated with the respective threshold flag. In case of each threshold flag corresponding to a predefined threshold flag and when the mapping scheme 44 satisfies the predefined criterion, the encoder 11 is configured, for example, to refrain from encoding the predefined threshold flag into the data stream 14, skip encoding the threshold flag, and continue to encode, for example, the residual value of the quantization index into the data stream 14. In case of each threshold flag corresponding to a predefined threshold flag and when the mapping scheme 44 satisfies the predefined criterion, the decoder 10 is configured, for example, to terminate the sequence of deriving two or more threshold flags by inferring the state of the predefined threshold flag, and optionally the decoder 11 is configured, for example, to continue decoding the residual value of the quantization index 32 from the data stream 14. For example, the two or more threshold flags form a sequence of threshold flags, each associated with a respective threshold value, the threshold flags being monotonically arranged in the sequence with respect to their associated threshold values, for example, the threshold values being positive integers.The residual values are, for example, represented in a binary representation with a fixed number of bins.
[0130] According to one embodiment, the decoder 10 may be configured to derive a sign flag for the quantization index 32 if the quantization index 32 is not zero, and to sequentially derive one or more threshold flags, including, for example, a predefined threshold flag, for the quantization index 32. The sequential derivation may be performed by deriving a first one of the threshold flags, continuing the sequential reading of the threshold flags (e.g., adapting the value of the quantization index based on the threshold associated with the first threshold flag) if the first threshold flag indicates that the value of the absolute value of the quantization index is greater than the threshold associated with the first threshold flag, and stopping the sequential derivation of the threshold flags (and, for example, adapting the value of the quantization index based on the first threshold associated with the first threshold flag) if the first threshold flag indicates that the value of the absolute value of the quantization index is less than or equal to the threshold associated with the first threshold flag. The apparatus is configured to continue the sequential derivation of the threshold flags by deriving a next threshold flag among the threshold flags, continuing the sequential derivation of the threshold flags (e.g., adapting the value of the quantization index based on the threshold of the current threshold flag) if the next threshold flag indicates that the absolute value of the quantization index is greater than the threshold associated with the next threshold flag, and stopping the sequential derivation of the threshold flags (and, e.g., adapting the value of the quantization index based on a first threshold associated with the first threshold flag) if the next threshold flag indicates that the absolute value of the quantization index is less than or equal to the threshold associated with the next threshold flag.
[0131] According to an embodiment, the encoder 11 may be configured to, if the value of the quantization index is not zero, refrain from encoding the first threshold flag into the data stream if a first threshold flag of the one or more threshold flags (e.g. the one or more threshold flags form a sequence of threshold flags, each threshold flag being associated with a respective threshold value, the threshold flags being monotonically arranged in the sequence with respect to their associated threshold values, e.g. the thresholds being positive integers) is a predefined threshold flag, skip encoding the first threshold flag (e.g. continue encoding a residual value of the quantization index (e.g. the difference between the quantization index and the threshold associated with the predefined threshold flag) into the data stream), and to encode the first threshold flag into the data stream if the first threshold flag is not the predefined threshold flag; If the absolute value of the quantization index is greater than the threshold associated with the first threshold flag, continue encoding a next threshold flag of the one or more threshold flags; if the absolute value of the quantization index is less than or equal to the threshold associated with the first threshold flag, skip encoding the threshold flag (and, e.g., continue encoding the remaining values); The device, suppressing encoding of the next threshold flag into the data stream if the next threshold flag is a predetermined threshold flag and stopping encoding of the threshold flag (and, e.g., continuing to encode remaining values into the data stream); if the next threshold flag is not the predetermined threshold flag, encoding the next threshold flag into the data stream; continuing to encode a further next threshold flag of the one or more threshold flags if the absolute value of the quantization index is greater than a threshold associated with the next threshold flag; if the absolute value of the quantization index is less than or equal to the threshold associated with the next threshold flag, stopping encoding the threshold flag (and, e.g., continuing to encode the remaining values into the data stream); The next threshold flag encoding is performed by:
[0132] The techniques described in this specification under paragraph a) also apply to the techniques described below under paragraph c), where the term "predetermined syntax elements" is therefore to be understood as "further predetermined syntax elements" and the term "predetermined criteria" is to be understood as "further predetermined criteria".
[0133] b) Deriving the sign flag The sign flag is an example of the predetermined syntax element 22 or the further predetermined syntax element. The sign flag indicates, for example, whether the quantization index 32 is positive or negative.
[0134] In the two cases, the sign_flag can be derived in the decoder 10, for example, based on the notification of position 33* in the sequence of integers, where quantization index 32* having value 0 is located, as follows:
[0135] Whenever cbZeroOffset is equal to 0, all decoded indices are either 0 or positive. In this case, sign_flag is inferred to be 0.
[0136] Whenever cbZeroOffset is equal to codebook_size-1, all decoded indices are either 0 or negative. In this case, sign_flag is inferred to be 1.
[0137] 2, the encoder 11 may be configured to determine whether to encode the sign flag based also on the position 33*. Further, the encoder 11 may be configured to encode, for example, cbZeroOffset, i.e., an indication of the position 33*, into the data stream 14.
[0138] Referring to FIG. 1, the decoder 10 may first check whether the quantization index 32 has a value of 0, for example by deriving a significance flag, for example by decoding the significance flag from the data stream 14, or by inferring the significance flag. For example, only if the quantization index 32 is not 0, a predetermined criterion is checked and the decoder 10 decides whether to infer or decode a sign flag from the data stream 14. After inferring or decoding the sign flag, the decoder 10 may be configured to continue the derivation of the quantization index 32 by deriving one or more threshold flags, where each of the one or more threshold flags indicates whether the absolute value of the quantization index is greater than a threshold associated with the threshold flag. If the significance flag indicates that the value of the quantization index is 0, the decoder 10 may be configured to set the value of the quantization index to 0.
[0139] 2, the encoder 11 may also be configured to check whether the quantization index 32 has a value of 0, and only if the quantization index 32 is not 0, a predetermined criterion is checked and the encoder 11 decides whether to code a sign flag into the data stream 14. After this decision, the encoder 11 may be configured to continue encoding the quantization index 32 by encoding one or more threshold flags, where each of the one or more threshold flags indicates whether the absolute value of the quantization index 32 is greater than a threshold associated with the threshold flag.
[0140] c) Deriving the threshold flag and the sign flag 1 and 2, the decoder 10 / encoder 11 is further configured to check whether the mapping scheme 44 satisfies a further predetermined criterion. If the mapping scheme 44 satisfies the further predetermined criterion, the decoder 10 may be configured to infer that the further predetermined syntax element has a predefined state, for example indicating that the quantization index 32 is below a threshold, and the encoder 11 may be configured to, for example, skip encoding the further predetermined syntax element into the data stream 14, so that the further predetermined syntax element is inferred by the decoder 10. The further predetermined syntax element may, for example, be part of the representation of the quantization index 32, for example two or more syntax elements may represent the quantization index 32. If the mapping scheme 44 does not satisfy the further predetermined criterion, the decoder 10 may be configured to derive or read the further predetermined syntax element from the data stream 10 and the encoder 11 may be configured to encode the further predetermined syntax element into the data stream 14. The predefined syntax element 22 is for example a sign flag and the further predefined syntax element is for example a predefined threshold flag. The predefined criteria checked in relation to the predefined syntax element 22 are described above under item b, and the further predefined criteria checked in relation to the further predefined syntax element 22 are described above under item a.
[0141] 3.3 Preferred embodiment In a preferred embodiment, a codebook according to section 2.1.2 is decoded from the bitstream, where codebook_size is equal to 1 and cbZeroOffset is equal to 0. Then, sign_flag (assumed to be 0) and the maximum absolute level The derivation process of section 3.2.1 for TIFF2025502873000100.tif74 (derived to 0) is applied. Then, the encoding process according to section 3.1.3 is used, which skips the index encoding altogether. With reference to the decoder 10 of FIG. 1 and the encoder 11 of FIG. 2, in this embodiment, the predetermined criterion is met if the mapping scheme 44 includes exactly one quantization index 32 with value 0 and the predefined syntax element 22 is a significance flag indicating whether the quantization index has value 0 or not. The decoder 10 is configured to infer that the quantization index 32 is 0 if the mapping scheme 44 meets the predefined criterion, and the encoder 11 is configured to suppress encoding certain syntax elements, e.g. any syntax element, into the data stream 14, where the syntax element is dedicated to signaling the quantization index 32. In this case, at least the predefined syntax element 22, i.e. the significance flag, is not encoded by the encoder 11 if the predefined criterion is met. The decoder 10 may be configured to derive the quantization indexes 32 independently of syntax elements of the data stream 14 that are dedicated to signaling the quantization indexes 32, e.g., to derive the quantization indexes without decoding such dedicated syntax elements from the data stream.
[0142] In the preferred embodiment shown in Figure 4, a codebook, i.e., mapping scheme 44 according to section 2.1.2, is decoded / encoded to / from bitstream 14, where codebook_size is equal to 2 and cbZeroOffset is equal to 0. In other words, the size of the monotonic sequence of integers of mapping scheme 44 is 2, and quantization index 32* having value 0 has the first position 33* in the sequence of quantization indexes 32. Then, sign_flag (assumed to be 0) and the maximum absolute level The derivation process of section 3.2.1 for TIFF2025502873000101.tif74 (which derives to 1) is applied, then the encoding process according to section 3.1.2, including skipping the sign_flag, is used.
[0143] In the preferred embodiment shown in Figure 5, a codebook, i.e. mapping scheme 44 according to section 2.1.2, is decoded / encoded to / from the bitstream 14, where codebook_size is equal to 2 and cbZeroOffset is equal to 1. In other words, the size of the monotonic sequence of integers of mapping scheme 44 is 2, and the quantization index 32* having value 0 has the second position 33* in the sequence of quantization indexes 32. Then, the sign_flag (assumed to be 1) and the maximum absolute level The derivation process of section 3.2.1 for TIFF2025502873000102.tif74 (derived to 1) is applied, then the encoding process according to section 3.1.2 including skipping the sign_flag is used.
[0144] In a further preferred embodiment shown in Figure 3, a codebook, i.e. mapping scheme 44 according to section 2.1.2, is decoded / encoded to / from the bitstream, where codebook_size is equal to 3 and cbZeroOffset is equal to 0. In other words, the size of the monotonic sequence of integers of mapping scheme 44 is 3, and the quantization index 32* having value 0 has the first position 33* in the sequence of quantization indexes 32. Then, the sign_flag (assumed to be 0) and the maximum absolute level The derivation process of section 3.2.1 for TIFF2025502873000103.tif74 (derived from 2) is applied, then the encoding process according to section 3.1.2 including skipping the sign_flag is used.
[0145] In a further preferred embodiment shown in Figure 6, a codebook, i.e. mapping scheme 44 according to section 2.1.2, is decoded / encoded to / from the bitstream 14, where codebook_size is equal to 3 and cbZeroOffset is equal to 1. In other words, the size of the monotonic sequence of integers of mapping scheme 44 is 3, and the quantization index 32* having value 0 has the second position 33* in the sequence of quantization indexes 32. Then, the maximum absolute level The derivation process of section 3.2.1 for TIFF2025502873000104.tif74 (derived to 1) is applied, then the encoding process according to section 3.1.2 without skipping sign_flag is used.
[0146] In the preferred embodiment shown in Figure 7, a codebook, i.e. mapping scheme 44 according to section 2.1.2, is decoded / encoded to / from the bitstream 14, where codebook_size is equal to 3 and cbZeroOffset is equal to 2. In other words, the size of the monotonic sequence of integers of mapping scheme 44 is 3, and quantization index 32* having value 0 has the third position 33* in the sequence of quantization indexes 32. Then, sign_flag (assumed to be 1) and the maximum absolute level The derivation process of section 3.2.1 for TIFF2025502873000105.tif74 (derived from 2) is applied, then the encoding process according to section 3.1.2 including skipping the sign_flag is used.
[0147] The predetermined syntax element 22 may be a sign flag indicating the sign of the quantization index 32. The predetermined criterion is met, for example, when the quantization indexes 32, for example the set of quantization indexes, included in the mapping scheme 44 does not include both positive and negative quantization indexes. This applies, for example, to the mapping schemes 44 shown in Figs. 3 to 5 and 7. The predetermined criterion is not met, for example, when the quantization indexes 32 included in the mapping scheme 44 include both positive and negative quantization indexes. This applies, for example, to the mapping scheme 44 shown in Fig. 6. For example, when the mapping scheme 44 of Fig. 3 or Fig. 4 is selected, the decoder 10 may be configured to infer that the predetermined syntax element 22 is not negative, i.e., positive. For example, when the mapping scheme 44 of Fig. 5 or Fig. 7 is selected, the decoder 10 may be configured to infer that the predetermined syntax element 22 is not positive, i.e., negative.
[0148] In a particularly preferred embodiment, the integer parameters / indexes are decoded as described below (using function int_param in Figure 8): The scheme in Figure 8 is a modified version of the scheme given in [2] section 10.2.1.5.
[0149] In FIG. 8, if a codebook is not used, the values of codebookSize and cbZeroOffset are set to 0.
[0150] The variable codebookSize here is equal to the value of codebook_size used above.
[0151] The variable QuantParam can correspond to the reconstructed quantization index.
[0152] In the example of Figure 18, the quantization indexes are integers. The variable maxNumNoRemMinus1 may indicate the length of a sequence of threshold flags associated with positive integer thresholds with monotonic increments of 1, e.g., the sequence of threshold flags associated with values 1, 2, 3, 4, ..., maxNumNoRemMinus1+1. For these threshold flags, residual coding may be skipped since there is no residual in the purely integer case.
[0153] The variable maxAbsVal may correspond to the variable M described in Sections 2.1.2 and 3.2.1.
[0154] 4. Aspect 2 of the invention: History-dependent significance coding The present invention reduces the bit rate required to code the significance flag (sig_flag) as described in 2.1.3.1 of coefficients in an update layer as described in 2.2.1. Given the sig_flag of a coefficient q(x,y,k) at position (x,y) in an update layer with index k (index k identifies a model update in a sequence of model updates), the basic idea is to model the probability of sig_flag depending on the previous update or coefficient at position (x,y) occurring in the base layer with index l smaller than k. Note that in contrast to the method described in 2.2.2.1, the present invention concerns multiple previous coefficients, i.e. the coefficient history at (x,y).
[0155] 4.1 Overview Fig. 9 shows an apparatus 10, for example referred to as decoder 10, for decoding NN parameters from a data stream 14 according to an embodiment. The NN parameters define a neural network. The decoder 10 receives a data stream 14 including an encoded representation 122 of an update parameter 132 of one of the neural network parameters. For example, the data stream 14 may include a number of update parameters 20, for example arranged in a matrix representation, each update parameter providing, for example, update information of a corresponding NN parameter of the NN (which should, for example, be updated by the decoder 10). The decoder 10 comprises an entropy decoding module 30 configured to decode the encoded representation 122 to obtain the update parameter 132. The decoder 10 further comprises an update module 50 configured to use the update parameters 132 to update corresponding NN parameters, for example, by adding (e.g., combining the NN parameters with the update parameters) or multiplying the update parameters 132 with the NN parameters, or by using the update parameters 132 as an input to control another operation for determining an updated NN parameter based on a current value of the NN parameter, or by replacing the NN parameter with the update parameters 132. In other words, the update may be incremental.
[0156] The decoder 10 further comprises a probability model selector 140, which selects a probability model 142 for entropy decoding of the update parameters 132 depending on the previous update parameters (see 122' and 122''). For example, the update signaled in the data stream 14 may be one of a sequence of updates 26, each update including a respective plurality of update parameters, e.g. a plurality of update parameters 20', 20''. Each of the plurality of update parameters may include a corresponding update parameter 132 of the NN parameter to which the update parameter 132 refers. The update parameters may be signaled by the coded representation 122', 122''.
[0157] Thus, the probabilistic model selector 140 can obtain information based on previous update parameters 132′, 132″, for example by storing them or by deriving a historical parameter, e.g., h, and can use the information to select the probabilistic model 142.
[0158] According to one embodiment, the decoder 10 can infer the characteristics of the previous update parameter 132′, 132″ by analyzing the NN parameter, for example by checking whether it is 0 or not. According to this embodiment, the decoder can select a probability model 142 depending on the NN parameter, and in an example even independently of the previous update parameter 132′, 132″. For example, the decoder 10 can check the value of the NN parameter and select a predefined probability model, for example a special model, if the NN parameter has a particular value, for example 0. Otherwise, the decoder 10 can select a second probability model or select the probability model 142 depending on the previous parameter.
[0159] 10 shows a corresponding apparatus 11 for encoding update parameters of NN parameters according to one embodiment, i.e. the encoder 11, where the decoder 10 performs the reverse operation of the encoder 11. The encoder 11 comprises an update deriver 51 for deriving the update parameters 132.
[0160] According to one embodiment, the encoder 11 is configured to obtain an update parameter set referenced 20 and to encode the update parameter set into the data stream 14, and the decoder 10 is configured to derive the update parameter set 20 from the data stream 14. The update parameter set 20 comprises a plurality of respective update parameters for a plurality of NN parameters, and the decoder 10 is configured to update the NN parameters using the respective update parameters. The decoder 10 / encoder 11 is configured to select, for each of the update parameters, a respective probability model 142 depending on one or more previous update parameters for the respective NN parameter, and to use the selected probability model 142 for, for example, entropy decoding / encoding the respective update parameter 132.
[0161] According to an embodiment, the update parameter 132 and the one or more previous update parameters 132', 132'' may be part of a sequence of update parameters of the NN parameters. The decoder 10 is configured, for example, to sequentially update the NN parameters based on the sequence of update parameters, and the encoder 11 obtains the update parameters 132, for example, based on the update parameters 132, such that the update of the NN parameters can be performed by the decoder 10. For example, the update parameters 132 enable the decoder 10 to set or modify the NN parameters starting from the current values of the NN parameters. For example, the encoder 11 is configured, for example, to sequentially update the NN parameters of the neural network based on the sequence of update parameters in order to make the NN available, for example, on the decoder 10 side. For example, the encoder 11 is for obtaining the update parameters 132 based on the neural network that is sequentially updated.
[0162] For both the decoder 10 and the encoder 11, the probability model 142 is, for example, a context model, or an adaptation model, or an adaptive context model. For example, the context of the update parameter 132 is part of the same set of update parameters (see 20), but is another parameter for another combination of, for example, input / output neurons, selected based on previously decoded, for example, directly adjacent update parameters (see, for example, 20a and 20b), and / or the probability is modeled according to the context. Alternatively, the context of the update parameter 132 is selected based on a sequence of previous update parameters 132', 132'' and / or the current NN parameters, and / or the probability is modeled according to the context.
[0163] Figure 11 shows the building blocks and data flow of the present invention. The target is the decoding of the encoded representation of q(x, y, k). The probability model selector 140 selects a probability model 142 m(x, y, k) based on the history h(x, y, k). The model is then used by the entropy decoder 30 to decode the sig_flag associated with q(x, y, k). After decoding other bins associated with q(x, y, k), the entropy decoder 30 reconstructs and provides the decoded value of q(x, y, k). Then, the history derivator derives a history h(x, y, k+1) for the next update using q(x, y, k) and h(x, y, k).
[0164] 4.2 Decoding process The details of the decoding process are as follows.
[0165] 1) The history h(x, y, k) indicates whether any previous coefficient q(x, l) with l < k is non-zero, that is, whether a significant coefficient was transmitted at the position (x, y) of any previous update layer (or base layer). For this purpose, in a preferred embodiment (E1), the history derivator iteratively derives h(x, y, k). This is intended as follows.
[0166] Setting h(x,y,0) to 0 before decoding the update of the first layer (i.e. the base layer) Setting h(x,y,k+1) equal to (h(x,y,k)||(q(x,y,k)!=0)) for further layer updates (where '||' represents the logical OR operator and '!=' represents the logical 'not equal' operator) 2) If h(x,y,k) is equal to 1, the probability mode selector 140 selects a special probability model, e.g., the first probability model, otherwise (h(x,y,k) is equal to 0), the probability mode selector 140 selects a default probability model. In a preferred embodiment, the special probability model provides a certain probability, e.g., close to or equal to 0, or a minimum probability representable by the entropy decoder 30. In a preferred embodiment, the default probability model is, e.g., an adaptive context model selected by other means as described in 2.1.3.2.
[0167] 9 and 10, the decoder 10 / encoder 11 is configured to select a first probability model (e.g. a special model, e.g. a constant probability close to 0 or a constant model representing a minimum probability representable by the entropy decoder 30 / encoder 31) for the entropy decoding / encoding of the update parameters 132, e.g. if the sequence of previous update parameters 132', 132'' does not satisfy a predetermined criterion, e.g. if not all previous update parameters of the sequence have a predetermined value, e.g. if not all previous update parameters indicate that the NN parameters are to remain unchanged. The predetermined criterion is satisfied, e.g. if all previous update parameters 132', 132'' of the sequence have a predetermined value, e.g. 0, e.g. if all one or more previous update parameters indicate that the NN parameters are to be kept unchanged.
[0168] The decoder 10 / encoder 11 is configured to select a probability model 142 for the entropy decoding 30 / encoding 31 of the update parameters 132 depending on, for example, historical data, which is derived by the decoder 10 / encoder 11 depending on, for example, previous update parameters 132′, 132″. The decoder 10 / encoder 11 is configured to entropy decode 30 / encode 31 the update parameters 132 using, for example, the probability model 142 and to update the historical data depending on the decoded update parameters 132.
[0169] The decoder 10 / encoder 11 is configured to update the history data depending on, for example, previous update parameters. The updating of the history data can be done by setting history parameters, such as, for example, a history deriver h, or by storing (previous) update parameters, see, for example, section 4.3.3. Optionally, the history data is further updated depending on the history data (e.g. current and / or past history data), for example the decoder 10 / encoder 11 can determine the value of a parameter contained in the history data depending on the previous update parameters (see 132', 132'') and depending on the value of the parameter before updating the parameter (e.g. the value of the current NN parameter) and then replace the value of the parameter with the determined value.
[0170] According to one embodiment, the decoder 10 / encoder 11 is configured to select a first probability model, e.g. a special model "0 model", for entropy decoding / encoding of the update parameters 132, e.g. if the sequence of previous update parameters 132', 132" does not satisfy a predefined criterion, e.g. if not all previous update parameters 132', 132" are equal to 0. Furthermore, the decoder 10 / encoder 11 is configured to, e.g. update a history parameter, which indicates whether the sequence of previous update parameters 132', 132" satisfies a predefined criterion or not, e.g. to adjust the history parameter, e.g. a history deriver h, depending on the update parameters 132, e.g. if the history parameter has a first value, e.g., 1, indicating that the predetermined criterion is not met, or if the update parameter 132 does not have a predetermined value, e.g., not equal to 0, setting the history parameter to the first value; if the update parameter 132 has a predetermined value, e.g., 0, and the history parameter has a second value, e.g., 0, indicating that the predetermined criterion has been met, setting the history parameter to the second value; Set by.
[0171] Thus, the current update parameters 132 are used to update the historical data, thereby allowing the selection of an optimized likelihood model 142 based on the updated historical data for subsequent update parameters of the respective NN parameters.
[0172] For example, the decoder 10 / encoder 11 is configured to select a first probability model for entropy decoding / encoding of a subsequent update parameter of the NN parameter, for example, when, in a sequence of update parameters, the history parameter has a first, e.g., one, value, for example, after updating the history parameter based on the update parameter 132. Optionally, the decoder 10 / encoder 11 is further configured to select a second probability model, for example, a default model, for example, an adaptive model, for entropy decoding of a subsequent update parameter of the NN parameter, for example, when, in a sequence of update parameters, the history parameter has a second, e.g., zero, value.
[0173] According to one embodiment, the decoder 10 / encoder 11 is configured to check whether one of the previous update parameters 132′, 132″ has a predefined value, for example 0, by considering a significance flag of the previous update parameter. If one of the previous update parameters 132′, 132″ does not have the predefined value, the sequence of the previous update parameters 132′, 132″ does not meet the predefined criterion. This check gives a good indication of whether the update parameter 132 is 0 or not 0. The significance flag indicates whether the previous update parameter is 0 or not 0. The check can also be performed on each of the previous update parameters of the sequence of previous update parameters. For example, the decoder 10 / encoder 11 is configured to check whether the sequence of the previous update parameters meets the predefined criterion by considering a significance flag of each of the previous update parameters 132′, 132″, the respective significance flag of each of the previous update parameters indicating whether the respective update parameter is 0 or not 0. For example, the predefined criterion is met if, for all previous update parameters of the sequence of previous update parameters, the respective significance flag indicates whether the respective previous update parameter is 0. This check may be further performed by taking into account further NN parameters, for example by checking whether the NN parameter, such as the current NN parameter, is equal to zero.
[0174] The first probability model is, for example, a constant probability model, which represents / indicates, for example, a constant probability, for example, a probability of 0, or a probability less than 0.1 or less than 0.05, or a minimum probability that can be represented by the entropy decoder 30 / encoder 31, or a predetermined probability that can be represented by the entropy decoder 30 / encoder 31, or a minimum probability that can be represented in the entropy decoding / encoding by the entropy decoder 10 / encoder 11 performing the entropy decoding / encoding, for example, the minimum representable probability may depend on the configuration of the entropy decoder 10 / encoder 11, which configuration is used to entropy decode / encode the update parameters 132. The first probability model indicates, for example, a constant probability of a predetermined syntax element, for example, a significance flag, having a predetermined state, for example indicating that the update parameters 132 are not 0. For example, the coded representation 122 of the update parameters 132 may be represented by one or more syntax elements including the predetermined syntax element.
[0175] According to one embodiment, the decoder 10 / encoder 11 is configured to select a second probability model, e.g. one of a set of probability models, e.g. a default model, as the probability model if the sequence of previous update parameters 132′, 132″ satisfies a predefined criterion. The second probability model is e.g. a context model, or an adaptive model, or an adaptive context model.
[0176] 4.3 Other Aspects / Variations / Embodiments 4.3.1 Enable / Disable For each layer (for a set of layers, or for a subset of layers), the encoder signals a flag (or another syntax element) to enable or disable the history deriver and probability model selector 140. When they are disabled in the preferred embodiment, the entropy decoder 30 always uses the default probability model.
[0177] The neural network includes a number of layers. With reference to Fig. 1 and Fig. 2, the decoder 10 / encoder 11 may be configured to decode / encode, for each layer of the number of layers, a respective update parameter set including one or more update parameters for the NN parameters associated with the respective layer. The decoder 10 / encoder 11 may be configured to activate or deactivate a selection of a probability model for entropy decoding / encoding the update parameters for each layer in response to, for example, a notification in the data stream 14. The decoder 10 / encoder 11 may be configured to decode / encode, for each layer, a notification indicating whether the selection of the probability model for the respective layer should be activated or deactivated. In other words, the decoder 10 / encoder 11 may be configured to derive from / encode into the data stream a syntax element, e.g., a flag, indicating whether the selection of the probability model should be activated or deactivated for the update parameters of one or more layers to which the notification, e.g., syntax element, refers.
[0178] According to an embodiment, the decoder 10 / encoder 11 may be configured to use a predefined probability model 142, e.g. a default probability model, e.g. a second probability model, for entropy decoding / encoding of all update parameters of one of the layers if the selection is deactivated for the layer. Otherwise, if the selection is activated for the layer, the decoder 10 / encoder 11 may be configured to select, for each of the update parameters of the layer, a respective probability model 142 depending on one or more previous update parameters 132′, 132″ for the NN parameters associated with the respective update parameter 132.
[0179] 4.3.2 Special Probability Models In another preferred embodiment, the special model, for example the first probabilistic model, is a context model, or an adaptive model, or an adaptive context model.
[0180] In another preferred embodiment, the probability model selector 140 selects from a set of probability models, and not just between a default probability model and a special probability model.
[0181] 4.3.3 Alternative History Derivation In a variant (V1) of the invention, the history deriver stores the received coefficients (e.g., can store information about previous update parameters 132′, 132″) or their derived values, such that h(x, y, k) represents a set of coefficients (or derived values). The probabilistic model selector 140 then uses h(x, y, k) to select a probabilistic model 142m(x, y, k), for example, by logical and / or arithmetic operations (e.g., on previous update parameters 132′, 132″), or by determining the number, e.g., count, of non-zero coefficients (e.g., coefficients that meet a predetermined criterion, e.g., coefficients that have a predetermined value, or alternatively, coefficients that do not have a predetermined value, such as non-zero in this case), or by determining whether any coefficient is non-zero, or by determining whether any of the previous update parameters do not meet a predetermined criterion, or by comparing with a threshold (e.g., comparing each of the previous update parameters 132′, 132″ with a threshold), or for example based on the value or absolute value of the coefficient, or based on a combination of any of the means previously described.
[0182] A variant (V2) of the invention operates similarly to variant V1, but discards coefficients from the set of coefficients, for example depending on the index of the update to which they belong or based on how many update layers have been received since they were added to the set of coefficients. The decoder 10 / encoder 11 is configured, for example, to store information about a limited number of previous update parameters 132', 132'' in the historical data and to discard information about the earliest of the previous update parameters (e.g. 132'') if a limit is reached. In other words, the sequence of previous update parameters can include a limited number of previous update parameters.
[0183] In a variant of the invention, the history deriver counts the number of previous coefficients q(x,y,k) that satisfy a certain condition (e.g., not equal to 0). The history data may include a parameter (see 132', 132'') indicating a count of previous update parameters that satisfy a predetermined criterion, e.g., a predetermined criterion related to a parameter having a predetermined value, or that does not have a predetermined value. Alternatively, the history data may include a parameter (e.g., h(x,y,k), e.g., the number counted, e.g., the result of a binary decision) indicating whether a sequence of previous update parameters (see 132', 132'') satisfies a predetermined criterion, e.g., the predetermined criterion is met if all previous update parameters are equal to a predetermined value, such as 0.
[0184] In a variant of the invention, the history deriver derives h(x,y,k) using an infinite impulse response (IIR) filter, e.g. taking an average of absolute values, or deriving h(x,y,k) by any combination of h(x,y,k) and q(x,y,k) or values derived therefrom. The decoder 10 / encoder 11 is configured to determine the parameters of the history data, e.g. by filtering a number of previous update parameters, e.g. 132′ and 132″, with an infinite impulse response (IIR) filter, e.g. taking an average of absolute values.
[0185] 4.3.4 History Reset The history deriver resets h(x,y,k) to the initial history. In preferred embodiment E1, h(x,y,k) is set to 0. In variants V1 and V2, h(x,y,k) is set to the empty set. The history deriver resets the history (e.g., the decoder 10 / encoder 11 may be configured to reset the history data to a predefined state), for example, if one or more of the following are true:
[0186] -When explicitly signaled (for example, the decoder 10 may be configured to derive a notification from the data stream 14 indicating the reset of the historical data, the notification being encoded into the data stream 14 by the encoder 11, for example when a reset condition is met).
[0187] -If a flag is received indicating that the history deriver and probability model selector 140 has been disabled (for example, the decoder 10 may be configured to derive from the data stream 14 a notification indicating deactivation of the selection of the probability model 142. The encoder 11 may be configured to deactivate the selection of the probability model 142 when a deactivation condition is met, reset the history data to a predetermined state, and encode a notification indicating deactivation of the selection of the probability model 142 into the data stream 14).
[0188] - After the decoder has received a certain number of model updates (e.g. the count of one or more previous update parameters 132', 132'' received by the decoder 10 / encoder 11 is equal to or greater than a predefined count).
[0189] - after q(x,y,k) becomes equal to 0 for a certain number of (e.g., consecutive) layer updates (e.g., the count of previous update parameters 132', 132'' that satisfy a certain criterion, e.g., have a certain value, or alternatively do not have a certain value, falls below a certain threshold, e.g., update parameter 132 becomes equal to 0 for a certain number of (e.g., consecutive) layer updates).
[0190] A reset condition is true, for example, if any of the conditions in the condition set are satisfied, or if every condition in a subset of the condition set is satisfied.
[0191] 4.3.5 Other In a variation of the invention, the probability model selector 140 selects a probability model 142 for other bins that are not associated with sig_flag.
[0192] 4.4 Exemplary embodiments based on the ICNN standard The following specification text presents an exemplary embodiment of the invention in the working draft of the upcoming ICNN standard [8]. The following variables / syntax elements are defined by the following standard:
[0193] -QuantParam[ j ]: the currently decoded quantization parameter -sig_flag Significance flag -sign_flag Sign flag -ctxInc Variable that specifies the context model, i.e. the probabilistic model 4.4.1 Specification changes 4.4.1.1 Additional definitions Parameter Identifier: A value that uniquely identifies a parameter within an incremental update such that the same parameter in different incremental updates has the same parameter identifier.
[0194] NOTE: Parameters with the same parameter identifier are at the same position in the same tensor in different incremental updates, which means they are located in the same place.
[0195] 4.4.1.2 Additional Processing after Decoding of Quantization Parameter (QuantParam[ j ]) The variable curParaId is set equal to the parameter identifier of the currently decoded parameter: QuantParam[i].If no parameter with a parameter identifier equal to curParaId has been previously decoded, then the variable AnySigBeforeFlag[curParaId] is set equal to 0.The variable AnySigBeforeFlag[curParaId] is modified as follows:
[0196] AnySigBeforeFlag[curParaId]=AnySigBeforeFlag[ curParaId ]| |(QuantParam[ I ]!=0) 4.4.1.3 Change in derivation process of ctxInc for syntax element sig_flag The inputs to this process are the sig_flag decoded before the current sig_flag, the state value stateId, the associated sign_flag if present, and the co-located parameter level (coLocParam) from the incremental update decoded before the current incremental update, if present. If a sig_flag was not decoded before the current sig_flag, it is inferred to be 0. If a sign_flag associated with the previously decoded sig_flag was not decoded, it is inferred to be 0. If a co-located parameter level from an incremental update decoded before the current incremental update is not available, it is inferred to be 0. Co-located parameter level means a parameter level in the same tensor at the same position in the previously decoded incremental update.
[0197] The output of this process is the variable ctxInc.
[0198] The variable curParaId is set equal to the parameter identifier of the currently decoded parameter.
[0199] The variable ctxInc is derived as follows. -If AnySigBeforeFlag[ curParaId ] is equal to 1, the following applies: -Let ctxInc be stateId+40. - Otherwise (AnySigBeforeFlag[ curParaId ] is equal to 0), the following applies: If -coLocParam is equal to 0, the following applies: -If sig_flag is equal to 0, let ctxInc be stateId*3. - Else, if sign_flag is equal to 0, let ctxInc be stateId*3+1. - Otherwise, let ctxInc be stateId*3+2. If -coLocParam is not equal to 0, the following applies: If -coLocParam is greater than 1 or less than -1, let ctxInc be stateId*2+24. - Otherwise, let ctxInc be stateId*2+25.
[0200] 4.4.2 Alternative Modifications Instead of 4.4.1.2, after decoding sig_flag, we get:
[0201] The variable curParaId is set equal to the parameter identifier of the currently decoded sig_flag. If no parameter with a parameter identifier equal to curParaId has been previously decoded, then the variable AnySigBeforeFlag[curParaId] is set equal to 0. The variable AnySigBeforeFlag[curParaId] is modified as follows:
[0202] AnySigBeforeFlag[curParaId]=AnySigBeforeFlag[ curParaId ]| |sig_flag) 5. Methods based on the above principles Although some aspects have been described in the context of an apparatus, it will be apparent that these aspects also represent corresponding method descriptions, where a block or device corresponds to a method step or feature of a method step.
[0203] 12 shows a method 200 for decoding neural network (NN) parameters defining a neural network from a data stream, the method 200 including obtaining 210 a mapping scheme for mapping quantization indexes to reconstruction levels from the data stream. The method 200 further includes checking 220 whether the mapping scheme satisfies a predetermined criterion and reconstructing 230 one of the NN parameters. The reconstruction 230 of one of the NN parameters includes: inferring 232 a state of a given syntax element from the mapping scheme if the mapping scheme satisfies a predetermined criterion; deriving 234 a predetermined syntax element from the data stream if the mapping scheme does not meet a predetermined criterion; applying 236 the quantization indexes derived using the predetermined syntax elements to a mapping scheme to obtain reconstruction levels of the NN parameters; This is carried out by.
[0204] The method 200 is based on the same principles as described with respect to the decoder 10 in section 3 above, and the method 200 may, for example, include method steps corresponding to the functionality of the decoder 10 .
[0205] 13 shows a method 300 for encoding neural network (NN) parameters defining a neural network into a data stream, the method 300 including obtaining 310 a mapping scheme for mapping reconstruction levels to quantization indexes, encoding 320 the mapping scheme into the data stream, and encoding 330 one of the NN parameters. The encoding 330 of one of the NN parameters includes subjecting the reconstruction levels of the NN parameters to the mapping scheme to obtain a quantization index; skipping 334 encoding of certain syntax elements into the data stream if the mapping scheme satisfies a predetermined criterion, where the certain syntax elements are part of a representation of a quantization index; encoding 336 the predetermined syntax element into the data stream if the mapping scheme does not meet the predetermined criteria; This is carried out by.
[0206] The method 300 is based on the same principles as described with respect to the encoder 11 in section 3 above, and the method 300 may, for example, include method steps corresponding to the functionality of the encoder 11 .
[0207] FIG. 14 shows a method 400 for decoding neural network (NN) parameters defining a neural network from a data stream, the method 400 including receiving 410 an update parameter for one of the NN parameters and updating 420 the NN parameter using the update parameter by entropy decoding the update parameter from the data stream by selecting a probability model for entropy decoding of the update parameter depending on a sequence of previous update parameters for the NN parameter and / or depending on the NN parameter.
[0208] The method 400 is based on the same principles as described with respect to the decoder 10 in section 4 above, and the method 400 may, for example, include method steps corresponding to the functionality of the decoder 10 .
[0209] FIG. 15 shows a method 500 for encoding neural network (NN) parameters defining a neural network into a data stream, the method 500 including obtaining an update parameter for one of the NN parameters 510 and entropy encoding the update parameter into the data stream 520 by selecting a probability model for entropy encoding of the update parameter depending on a sequence of previous update parameters for the NN parameter and / or depending on the NN parameter.
[0210] The method 500 is based on the same principles as described with respect to the encoder 11 in section 4 above, and the method 500 may, for example, include method steps corresponding to the functionality of the encoder 11 .
[0211] 6 Alternative embodiments This section describes alternative implementations of the embodiments described in the previous section and described by the claims.
[0212] Although some aspects are described as features in the context of an apparatus, it will be apparent that such description may also be considered as a description of the corresponding features of a method. Although some aspects are described as features in the context of a method, it will be apparent that such description may also be considered as a description of the corresponding features with respect to the functionality of the apparatus.
[0213] Some or all of the method steps may be performed by (or using) a hardware apparatus, such as, for example, a microprocessor, a programmable computer, or an electronic circuit. In some embodiments, one or more of the most important method steps may be performed by such an apparatus.
[0214] The inventive encoded signal can be stored on a digital storage medium and can be transmitted over a transmission medium, such as the Internet, a wireless transmission medium or a wired transmission medium, etc. In other words, a further embodiment provides a bitstream product, e.g. a digital storage medium having stored thereon a video bitstream, comprising a bitstream according to any of the embodiments described herein.
[0215] Depending on the specific implementation requirements, embodiments of the present invention can be implemented in hardware or software, or at least partly in hardware, or at least partly in software. The implementation can be performed using a digital storage medium, such as a floppy disk, DVD, Blu-Ray, CD, ROM, PROM, EPROM, EEPROM or flash memory, on which electronically readable control signals are stored, which cooperate (or can cooperate) with a programmable computer system to execute the respective method. The digital storage medium may therefore be computer readable.
[0216] Some embodiments according to the invention include a data carrier having electronically readable control signals capable of cooperating with a programmable computer system to cause one of the methods described herein to be performed.
[0217] Generally, embodiments of the present invention can be implemented as a computer program product having program code that operates to perform one of the methods when the computer program product is run on a computer. The program code can, for example, be stored on a machine readable carrier.
[0218] Other embodiments comprise the computer program for performing one of the methods described herein, stored on a machine readable carrier.
[0219] In other words, therefore, an embodiment of the inventive methods is a computer program having a program code for performing one of the methods described herein, when the computer program runs on a computer.
[0220] A further embodiment of the inventive method is therefore a data carrier (or digital storage medium, or computer readable medium) having recorded thereon a computer program for performing one of the methods described herein. The data carrier, digital storage medium, or recording medium is typically tangible and / or non-transitory.
[0221] A further embodiment of the inventive method is therefore a data stream or a sequence of signals representing the computer program for performing one of the methods described herein, The data stream or the sequence of signals can for example be arranged to be transferred via a data communication connection, for example via the Internet.
[0222] A further embodiment comprises a processing means, for example a computer, or a programmable logic device, configured to or adapted to perform one of the methods described herein.
[0223] A further embodiment comprises a computer having installed thereon the computer program for performing one of the methods described herein.
[0224] Further embodiments according to the invention comprise an apparatus or a system arranged to transfer (e.g. electronically or optically) a computer program for performing one of the methods described herein to a receiver. The receiver may for example be a computer, a mobile device, a memory device, etc. The apparatus or system may for example comprise a file server for transferring the computer program to the receiver.
[0225] In some embodiments, a programmable logic device (e.g., a field programmable gate array) may be used to perform some or all of the functions of the methods described herein. In some embodiments, a field programmable gate array may cooperate with a microprocessor to perform one of the methods described herein. In general, the methods are preferably performed by any hardware apparatus.
[0226] The apparatus described herein may be implemented using a hardware apparatus, or using a computer, or using a combination of a hardware apparatus and a computer.
[0227] The methods described herein may be performed using a hardware apparatus, or using a computer, or using a combination of a hardware apparatus and a computer.
[0228] In the above detailed description, it can be seen that various features have been grouped together in the examples for the purpose of streamlining the disclosure. This method of disclosure should not be interpreted as reflecting an intention that the claimed examples require more features than are expressly recited in each claim. Rather, as the appended claims reflect, subject matter may reside in less than all features of a single disclosed example. Accordingly, the appended claims are hereby incorporated into the detailed description, with each claim standing on its own as a separate example. Although each claim may stand on its own as a separate example, it should be noted that although a dependent claim may refer to a specific combination with one or more other claims in a claim, other examples may also include a combination of the dependent claim with the subject matter of each of the other dependent claims, or a combination of each feature with other dependent or independent claims. Such combinations are suggested herein unless it is stated that a specific combination is not intended. Furthermore, the inclusion of a feature of a claim in any other independent claim is also contemplated, even if that claim is not directly dependent on the independent claim.
[0229] The above-described embodiments are merely illustrative of the principles of the present disclosure. It is understood that modifications and variations of the arrangements and details described herein will be apparent to those skilled in the art. It is therefore intended to be limited only by the scope of the appended claims and not by the specific details presented as descriptions and explanations of the embodiments herein.
[0230] 7 References [1] S. Chetlur et al., "cuDNN:Efficient Primitives for Deep Learning," arXiv:1410.0759, 2014 [2] MPEG, "Text of ISO / IEC FDIS 15938-17 Compression of Neural Networks for Multimedia Content Description and Analysis", Document of ISO / IEC JTC1 / SC29 / WG11, w20331, OnLine, Apr.2021 [3] D. Marpe, H. Schwarz und T. Wiegand, "Context-Based Adaptive Binary Arithmetic Coding in the H.264 / AVC Video Compression Standard," IEEE transactions on circuits and systems for video technology, Vol. 13, No. 7, pp.620-636, July 2003. [4] H.Kirchhoffer, J.Stegemann, D.Marpe, H.Schwarz und T.Wiegand, "JVET-K0430-v3 - CE5-related:State-based probality estimator," in JVET, Ljubljana, 2018. [5] ITU - International Telecommunication Union, "ITU-T H.265 High efficiency video coding," Series H:Audiovisual and multimedia systems - Infrastructure of audiovisual services - Coding of moving video, April 2015. [6] B.Bross, J.Chen und S.Liu, "JVET-M1001-v6 - Versatile Video Coding (Draft 4)," in JVET, Marrakech, 2019. [7] S.Wiedemann et al., "DeepCABAC:A Universal Compression Algorithm for Deep Neural Networks," in IEEE Journal of Selected Topics in Signal Processing, vol. 14, no. 4, pp.700-714, May 2020, doi:10.1109 / JSTSP.2020.2969554. [8] "Working Draft 2 on Incremental Compression of Neural Networks" ISO / IEC / JTC29 / WG4, w20933, October 2021.
Claims
1. An apparatus (10) for decoding neural network (NN) parameters defining a neural network from a data stream, comprising: obtaining from the data stream (14) a mapping scheme (44) for mapping (40) quantization indexes (32) to reconstruction levels (42); checking (34) whether said mapping scheme satisfies predetermined criteria; One of the NN parameters is inferring the state of a given syntax element (22) from said mapping scheme (44) if said mapping scheme (44) satisfies said predetermined criteria; deriving the predetermined syntax element (22) from the data stream (14) if the mapping scheme (44) does not satisfy the predetermined criteria; applying (40) the quantization indexes (32) derived using the predetermined syntax elements (22) to the mapping scheme to obtain reconstruction levels (42) of the NN parameters; and reconstructing it by An apparatus (10) configured to:
2. The apparatus of claim 1 , wherein the mapping scheme (44) associates each of a finite set of quantization indexes with one of a set of reconstruction levels.
3. 3. The apparatus of claim 1, wherein the quantization index is an integer.
4. The quantization indexes included in the mapping scheme (44) form a monotonic sequence of integers, and the device derives from the data stream: the size of said sequence of quantization indexes; the position in said sequence of integers at which a quantization index having a predetermined value is located; 4. The apparatus of claim 1, configured to obtain information relating to one or more of:
5. The device extracts from the data stream: - a predetermined reconstruction level associated with a quantization index having said predetermined value; the distance between two levels associated with adjacent quantization indices of said sequence; The apparatus of claim 4 , further configured to obtain information regarding one or more of:
6. 6. The apparatus of claim 1, wherein if the mapping scheme (44) includes exactly one quantization index (32) having the value 0, the apparatus is configured to infer that the quantization index (32) is 0.
7. If the mapping scheme (44) includes exactly one quantization index having the value 0, the predetermined criterion is met, and the predetermined syntax element (22) is a significance flag indicating whether the quantization index (32) has the value 0; the device is configured to infer that the quantization index (32) is 0 if the mapping scheme (44) satisfies the predetermined criterion.
7. An apparatus according to any one of claims 1 to 6.
8. 8. The apparatus according to claim 6 or 7, wherein if the mapping scheme (44) includes exactly one quantization index having the value 0, the apparatus is configured to derive the quantization index (32) independently of syntax elements of the data stream, which syntax elements are dedicated to signaling the quantization index (32).
9. the quantization indexes included in the mapping scheme (44) form a monotonic sequence of integers; the size of the sequence is 2 and the quantization index having the value 0 has the first position in said sequence of quantization indexes, or the size of the sequence is 2 and the quantization index having the value 0 has the second position in said sequence of quantization indexes, or the size of the sequence is 3 and the quantization index having the value 0 has the first position in said sequence of quantization indexes, or the size of the sequence is 3 and the quantization index having the value 0 has the second position in said sequence of quantization indexes, or the size of the sequence is 3 and the quantization index having the value 0 has the third position in said sequence of quantization indexes, 6. An apparatus according to any one of claims 1 to 5.
10. 10. The apparatus of claim 1, wherein the predetermined syntax element is a sign flag indicating whether the quantization index has a non-negative value or whether the quantization index has a non-positive value.
11. 11. The apparatus of claim 10, wherein the predetermined criterion is met if the quantization indexes included in the mapping scheme (44) do not include both positive and negative quantization indexes.
12. if the mapping scheme (44) satisfies the predetermined criteria, and inferring that the sign flag indicates that the quantization index (32) is non-negative if all quantization indexes included in the mapping scheme (44) are non-negative; inferring that the sign flag indicates that the quantization index (32) is non-positive if all quantization indexes included in the mapping scheme (44) are non-positive; The apparatus of claim 11 , configured to reconstruct the NN parameters by:
13. deriving a significance flag indicating whether the quantization index (32) has a value of 0; If the significance flag indicates that the value of the quantization index (32) is not 0, decoding the code flag from the data stream if the predetermined criterion is not met; if the predetermined criterion is met, inferring the state of the sign flag and continuing the derivation of the quantization indexes (32) by deriving one or more threshold flags, each of the one or more threshold flags indicating whether an absolute value of the quantization index (32) is greater than a threshold associated with the threshold flag; 13. The device according to claim 11 or 12, configured to derive the quantization indexes (32) for reconstructing the NN parameters by:
14. 14. The device according to claim 10, wherein the quantization indexes included in the mapping scheme (44) form a monotonic sequence of integers, and the device is configured to check the predetermined criterion upon notification of a position in the sequence of integers at which a quantization index having the value 0 is located.
15. 5. The apparatus of claim 1, wherein the predetermined syntax element is a predetermined threshold flag indicating whether an absolute value of the quantization index is greater than a threshold associated with the predetermined threshold flag.
16. configured to reconstruct the NN parameters by deriving a sign flag indicating whether the quantization indexes (32) have non-negative values or whether the quantization indexes (32) have non-positive values; The predetermined criteria are: if the quantization index (32) has a non-negative value, if none of the quantization indexes included in the mapping scheme (44) is greater than the threshold associated with the predetermined threshold flag; and if the quantization indexes (32) have non-positive values, then none of the quantization indexes included in the mapping scheme (44) is less than the negative value of the threshold associated with the predetermined threshold flag; 16. The device of claim 15, wherein the
17. 17. The apparatus of claim 16, configured to infer that if the mapping scheme (44) satisfies the predetermined criterion, the predetermined threshold flag indicates that the absolute value of the quantization index (32) is less than or equal to the threshold.
18. The device, checking whether said mapping scheme (44) satisfies further predetermined criteria; inferring that a further predetermined syntax element (22) has a predetermined state if said mapping scheme (44) satisfies said further predetermined criterion; deriving said further predetermined syntax element (22) from said data stream if said mapping scheme (44) does not satisfy said further predetermined criterion; deriving the quantization indexes (32) using the predetermined syntax and the further predetermined syntax elements (22); Reconstructing the NN parameters by configured to the further predetermined syntax element (22) is a predetermined threshold flag indicating whether the absolute value of the quantization index (32) is greater than a threshold associated with the predetermined threshold flag; the further predetermined criterion is met if none of the quantization indexes included in the mapping scheme (44) has an absolute value greater than the threshold associated with the predetermined threshold flag; the predetermined state indicates that the quantization index (32) is equal to or less than the threshold value; 15. Apparatus according to any one of claims 10 to 14.
19. determining the maximum value among the absolute values of the quantization indexes included in said mapping scheme (44); selecting a predetermined threshold flag from one or more threshold flags such that a threshold associated with the predetermined threshold flag is equal to a maximum value among the absolute values of the quantization indexes; 19. Apparatus according to any one of claims 15 to 18, configured to:
20. 20. The apparatus of claim 19, wherein the quantization indexes included in the mapping scheme (44) form a monotonic sequence of integers, and the apparatus is configured to determine the maximum of the absolute values of the quantization indexes based on an indication of the number of the quantization indexes included in the mapping scheme (44).
21. deriving a significance flag indicating whether the quantization index (32) has a value of 0; If the significance flag indicates that the value of the quantization index (32) is not 0, deriving a sign flag indicating whether the quantization index (32) has a non-negative or non-positive value; deriving a first one of the threshold flags; continuing the sequential reading of the threshold flags if the first threshold flag indicates that the absolute value of the quantization index (32) is greater than a threshold associated with the first threshold flag; stopping the sequential derivation of the threshold flags if the first threshold flag indicates that the absolute value of the quantization index (32) is less than or equal to the threshold associated with the first threshold flag; successively deriving one or more threshold flags, each of the one or more threshold flags indicating whether an absolute value of the quantization index (32) is greater than a threshold associated with a respective one of the threshold flags, by The device, deriving a next one of the threshold flags; and if the next threshold flag indicates that the absolute value of the quantization index (32) is greater than a threshold associated with the next threshold flag, continuing the sequential derivation of the threshold flag; stopping the sequential derivation of the threshold flags if the next threshold flag indicates that the absolute value of the quantization index (32) is less than or equal to the threshold associated with the next threshold flag; and configured to perform the continuation of the sequential derivation of the threshold flag by Sequentially deriving one or more threshold flags; continuing the derivation of the quantization indexes (32) by decoding remaining values of the quantization indexes (32) from the data stream; 21. The apparatus of claim 1, configured to derive quantization indexes (32) for reconstructing the NN parameters by:
22. 22. The apparatus of claim 1, configured to dequantize the reconstruction levels to obtain reconstructed values of the NN parameters.
23. An apparatus (11) for encoding neural network (NN) parameters defining a neural network into a data stream (14), comprising: obtaining a mapping scheme (44) for mapping reconstruction levels to quantization indexes; encoding said mapping scheme (44) into said data stream; subjecting the reconstruction levels of said NN parameters to said mapping scheme (44) to obtain quantization indexes (32); skipping encoding of predetermined syntax elements (22) into the data stream if the mapping scheme (44) satisfies a predetermined criterion, wherein the predetermined syntax elements (22) are part of a representation of the quantization indexes (32); if the mapping scheme (44) does not satisfy the predetermined criteria, encoding the predetermined syntax element (22) into the data stream; encoding one of the NN parameters by An apparatus (11) configured to:
24. 24. The apparatus of claim 23, configured to check whether the mapping scheme (44) meets predetermined criteria.
25. 25. Apparatus according to claim 23 or 24, wherein the mapping scheme (44) associates each of a finite set of quantization indexes with one of a set of reconstruction levels.
26. 26. The apparatus of claim 23, wherein the quantization index is an integer.
27. The quantization indexes included in the mapping scheme (44) form a monotonic sequence of integers, and the device derives from the data stream: the size of said sequence of quantization indexes; the position in said sequence of integers at which a quantization index having a predetermined value is located; 27. An apparatus according to any one of claims 23 to 26, configured to obtain information relating to one or more of:
28. The device extracts from the data stream: - a predetermined reconstruction level associated with a quantization index having said predetermined value; the distance between two levels associated with adjacent quantization indices of said sequence; 28. The apparatus of claim 27, further configured to obtain information regarding one or more of:
29. 29. The apparatus of claim 23, wherein the predetermined criterion is met if the mapping scheme (44) includes exactly one quantization index having the value 0, and the predetermined syntax element (22) is a significance flag indicating whether the quantization index (32) has the value 0 or not.
30. 30. The apparatus of claim 23, further configured to: suppress coding of a syntax element into the data stream if the mapping scheme (44) includes exactly one quantization index having a value of 0, the syntax element being dedicated to signaling the quantization index (32).
31. the quantization indexes included in the mapping scheme (44) form a monotonic sequence of integers; the size of the sequence is 2 and the quantization index having the value 0 has the first position in said sequence of quantization indexes, or the size of the sequence is 2 and the quantization index having the value 0 has the second position in said sequence of quantization indexes, or the size of the sequence is 3 and the quantization index having the value 0 has the first position in said sequence of quantization indexes, or the size of the sequence is 3 and the quantization index having the value 0 has the second position in said sequence of quantization indexes, or the size of the sequence is 3 and the quantization index having the value 0 has the third position in said sequence of quantization indexes, 29. Apparatus according to any one of claims 23 to 28.
32. 32. The apparatus of claim 23, wherein the predetermined syntax element (22) is a sign flag indicating whether the quantization index (32) has a non-negative value or whether the quantization index (32) has a non-positive value.
33. 33. The apparatus of claim 32, wherein the predetermined criterion is met if the quantization indexes included in the mapping scheme (44) do not include both positive and negative quantization indexes.
34. If the value of the quantization index (32) is not 0, encoding said code flag into said data stream if said predetermined criterion is not met; if the predetermined criterion is met, skipping the encoding of the predetermined syntax element (22) and continuing the encoding of the quantization index (32); 34. The apparatus of claim 33, configured to encode the quantization indexes (32) to encode the NN parameters by:
35. The quantization indexes included in the mapping scheme (44) form a monotonic sequence of integers, and the device checking said predetermined criterion based on the position in said sequence of integers at which a quantization index having a value of 0 is located; encoding into the data stream an indication of the position within the sequence of integers at which a quantization index having a value of 0 is located; 35. Apparatus according to any one of claims 32 to 34, configured to:
36. 28. The apparatus of claim 23, wherein the predetermined syntax element (22) is a predetermined threshold flag indicating whether the absolute value of the quantization index (32) is greater than a threshold associated with the predetermined threshold flag.
37. if the quantization index (32) has a non-negative value, if none of the quantization indexes included in the mapping scheme (44) is greater than the threshold associated with the predetermined threshold flag; and if the quantization indexes (32) have non-positive values, then none of the quantization indexes included in the mapping scheme (44) is less than the negative value of the threshold associated with the predetermined threshold flag; 37. Apparatus according to any one of claims 23 to 36, wherein the predetermined criteria are met.
38. 38. The apparatus of claim 37, configured to skip encoding the predetermined threshold flag into the data stream if the mapping scheme (44) satisfies the predetermined criterion.
39. The device, checking whether said mapping scheme (44) satisfies further predetermined criteria; skipping encoding of further predetermined syntax elements into the data stream if the mapping scheme (44) satisfies further predetermined criteria, wherein the further predetermined syntax elements are part of a representation of the quantization indexes (32); if the mapping scheme (44) does not satisfy the further predetermined criterion, encoding the further predetermined syntax element into the data stream (14); encoding the NN parameters by configured to the further predetermined syntax element is a predetermined threshold flag indicating whether the absolute value of the quantization index (32) is greater than a threshold associated with the predetermined threshold flag; the further predetermined criterion is met if none of the quantization indexes included in the mapping scheme (44) has an absolute value greater than the threshold associated with the predetermined threshold flag; the predetermined state indicates that the quantization index (32) is equal to or less than the threshold value; 36. Apparatus according to any one of claims 32 to 35.
40. 40. The apparatus of any one of claims 36 to 39, configured to select a predetermined threshold flag from among one or more threshold flags such that a threshold associated with the predetermined threshold flag is equal to the maximum absolute value of quantization indexes included in the mapping scheme (44).
41. 41. The apparatus of claim 40, wherein the quantization indexes included in the mapping scheme (44) form a monotonic sequence of integers, and the apparatus is configured to encode an indication of the number of quantization indexes included in the mapping scheme (44) into the data stream.
42. If the value of the quantization index (32) is not 0, If a first threshold flag of one or more threshold flags is the predetermined threshold flag, suppressing encoding of the first threshold flag into the data stream and skipping encoding of the threshold flag; if the first threshold flag is not the predetermined threshold flag, encoding the first threshold flag into the data stream; if the absolute value of the quantization index (32) is greater than a threshold associated with the first threshold flag, continuing to encode a next threshold flag of the one or more threshold flags; skipping encoding of the threshold flag if the absolute value of the quantization index (32) is less than or equal to the threshold associated with the first threshold flag; The quantization index (32) for encoding the NN parameters is configured to: The device, If the next threshold flag is the predetermined threshold flag, inhibiting encoding of the next threshold flag into the data stream and stopping encoding of the threshold flag; if the next threshold flag is not the predetermined threshold flag, encoding the next threshold flag into the data stream; if the absolute value of the quantization index (32) is greater than a threshold associated with the next threshold flag, continuing to encode a further next one of the one or more threshold flags; stopping encoding of the threshold flag if the absolute value of the quantization index (32) is less than or equal to the threshold associated with the next threshold flag; and configured to perform the encoding of the next threshold flag by 42. Apparatus according to any one of claims 36 to 41.
43. 43. Apparatus according to any one of claims 23 to 42, configured to quantize the NN parameters to obtain the reconstruction levels of the NN parameters.
44. 1. An apparatus (10) for decoding neural network (NN) parameters defining a neural network from a data stream (14), the apparatus (10) being configured to receive an update parameter (132) for one of the NN parameters and to update the NN parameter using the update parameter (132), the apparatus (10) comprising: entropy decoding the update parameters (132) from the data stream (14), wherein the device (10) is configured to select a probability model (142) for entropy decoding of the update parameters (132) depending on a sequence of previous update parameters (132', 132'') for the NN parameters and / or depending on the NN parameters; The apparatus (10) is configured to:
45. 45. The apparatus of claim 44, wherein the update parameter (132) and the one or more previous update parameters (132', 132'') are part of a sequence of update parameters for the NN parameters, and the apparatus is configured to sequentially update the NN parameters based on the sequence of update parameters.
46. 46. The apparatus of claim 44 or 45, wherein the probabilistic model (142) is a context model, or an adaptive model, or an adaptive context model.
47. The device, selecting the probability model (142) for entropy coding of the update parameters (132) in response to historical data, and entropy decoding the update parameters (132) using the probability model (142); updating the history data in response to the decoded update parameters; 47. Apparatus according to any one of claims 44 to 46, configured to:
48. updating the historical data; and / or performing logical and / or arithmetic operations on said previously updated parameters (132', 132''); determining the number of said previously updated parameters (132', 132'') that satisfy a further predetermined criterion; determining whether any of the previously updated parameters (132', 132'') do not meet the predetermined criteria; comparing each of said previously updated parameters (132', 132'') with a threshold value; selecting the probabilistic model (142) according to one or more of:
48. Apparatus according to any one of claims 44 to 47, configured to:
49. 49. Apparatus according to claim 47 or 48, configured to store information about said previously updated parameters (132', 132'') in said historical data.
50. 50. The device of claim 49, configured to store information about a limited number of previous update parameters (132', 132'') in the historical data.
51. 51. The apparatus of any one of claims 47 to 50, configured to determine the parameters of the historical data by filtering a plurality of previously updated parameters (132', 132'') with an infinite impulse response (IIR) filter.
52. 52. Apparatus according to any one of claims 47 to 51, wherein said historical data comprises a parameter indicative of whether said sequence of previous updated parameters (132', 132'') satisfies a predetermined criterion.
53. 53. Apparatus according to any one of claims 47 to 52, wherein the historical data comprises a parameter indicative of a count of previous updated parameters (132', 132'') that meet a predetermined criterion.
54. configured to reset the history data to a predetermined state when a reset condition is met, the reset condition comprising: - the device deriving from the data stream a notification indicating the resetting of the historical data; - the device deriving from the data stream a notification indicating the deactivation of the selection of the probabilistic model (142); - the count of said one or more previous update parameters (132', 132'') received by said device is greater than or equal to a predetermined count; - the count of previous update parameters (132', 132'') that meet further predetermined criteria falls below a predetermined threshold; depends on a set of conditions including one or more of: the reset condition is true if any of the conditions in the set of conditions is satisfied, or if each condition in a subset of the set of conditions is satisfied; 54. Apparatus according to any one of claims 47 to 53.
55. 54. The apparatus according to any one of claims 44 to 53, wherein the apparatus is configured to select a first probability model for entropy decoding of the update parameters if the sequence of previous update parameters (132', 132'') does not satisfy a predetermined criterion.
56. 56. Apparatus according to any one of claims 52 to 55, wherein the predetermined criterion is met if all of the previously updated parameters (132', 132'') of the sequence have a predetermined value.
57. The device, selecting a first probability model for entropy decoding of said update parameters if said sequence of previous update parameters (132', 132'') does not satisfy a predetermined criterion; If the history parameter has a first value indicating that the predetermined criterion is not met or if the update parameter (132) does not have a predetermined value, setting the history parameter to the first value; if the update parameter (132) has the predetermined value and the history parameter has a second value indicating that the predetermined criterion has been met, setting the history parameter to the second value; updating a history parameter indicative of whether the sequence of previous update parameters (132', 132'') satisfies the predetermined criterion or not, depending on the update parameters (132) by 47. Apparatus according to any one of claims 44 to 46, configured to:
58. 58. The apparatus of claim 57, configured to select a first probability model for entropy decoding of a next update parameter (132) of the NN parameters if the history parameter has the first value, and to select a second probability model for the entropy decoding of the next update parameter of the NN parameters if the history parameter has the second value.
59. 59. The apparatus of claim 53 or any one of claims 56 to 58, configured to check whether one of the previous update parameters (132', 132'') has the predetermined value by considering a significance flag of the previous update parameter indicating whether the update parameter (132) is zero or not zero, the significance flag indicating whether the update parameter (132) is zero or not zero.
60. 60. The apparatus of any one of claims 55 to 59, wherein the first probability model is a constant probability model.
61. 60. The apparatus of any one of claims 52 to 59, wherein the first probability model is a constant probability model that indicates a probability of zero or a minimum probability representable in entropy decoding for a given syntax element (22) having a given state.
62. 60. The apparatus of any one of claims 55 to 59, wherein the first probabilistic model is a context model, or an adaptive model, or an adaptive context model.
63. 63. The apparatus of any one of claims 55 to 62, wherein the apparatus is configured to select a second probabilistic model as the probabilistic model (142) if the sequence of previous update parameters (132', 132'') satisfies the predetermined criterion.
64. 64. The apparatus of claim 63, wherein the second probabilistic model is a context model, or an adaptive model, or an adaptive context model.
65. 65. The apparatus of claim 52, configured to check whether the sequence of previous update parameters (132′, 132″) satisfies the predetermined criterion by considering a significance flag of each of the previous update parameters (132′, 132″), the significance flag of one of the previous update parameters indicating whether the update parameter (132) is 0 or not 0.
66. 65. The apparatus according to any one of claims 52 to 64, configured to check, based on the NN parameters, whether the sequence of previous update parameters (132', 132'') meets the predetermined criteria.
67. the apparatus is configured to derive, from the data stream, an update parameter set (20) including a plurality of respective update parameters for a plurality of the NN parameters, and to update the NN parameters using the respective update parameters; the device is configured to select, for each of the update parameters, a respective probabilistic model (142) depending on one or more previous update parameters (132', 132'') for the respective NN parameter; 67. Apparatus according to any one of claims 44 to 66.
68. 68. The apparatus of claim 44, wherein the neural network includes a plurality of layers, each update parameter set (20) for each of the layers including one or more of the NN parameters, and wherein the apparatus is configured to activate or deactivate a selection of a probability model (142) for entropy decoding the update parameters for each layer.
69. 69. The apparatus of claim 68, wherein the apparatus is configured to derive from the data stream a syntax element that indicates whether the selection of a probabilistic model (142) should be activated or deactivated for update parameters of one or more of the layers to which the notification refers.
70. The device, if the selection is deactivated for the layer, using a predetermined probability model for the entropy decoding of all update parameters of one of the layers; selecting, when the selection is activated, for each of the update parameters of the layer, a respective probabilistic model (142) depending on one or more previous update parameters (132', 132'') for the NN parameter associated with the respective update parameter; 70. Apparatus according to claim 68 or 69, configured to:
71. 71. The apparatus of any one of claims 44 to 70, configured to use the probability model (142) to entropy decode a significance flag indicating whether the update parameter (132) is zero or not zero.
72. - combining the NN parameters with the update parameters, or - multiplying the NN parameters by the update parameters, or - replacing said NN parameters with said updated parameters; 72. The apparatus of any one of claims 44 to 71, configured to update the NN parameters using the update parameters (132) by
73. 1. An apparatus for encoding neural network (NN) parameters defining a neural network into a data stream, the apparatus being configured to obtain (51) an update parameter (132) for one of the NN parameters, the apparatus comprising: entropy coding the update parameters (132) into the data stream, the device being configured to select (40) a probability model (142) for the entropy coding of the update parameters (132) depending on a sequence of previous update parameters (132', 132'') for the NN parameters and / or depending on the NN parameters.
1. An apparatus configured to:
74. 74. The apparatus of claim 73, wherein the update parameter (132) and the one or more previous update parameters (132', 132'') are part of a sequence of update parameters for the NN parameter.
75. 75. The apparatus of claim 73 or 74, wherein the probabilistic model (142) is a context model, or an adaptive model, or an adaptive context model.
76. The device, selecting the probability model (142) for entropy coding of the update parameters (132) in response to the historical data, and entropy coding the update parameters (132) using the probability model (142); updating the historical data in accordance with the encoded update parameters; 76. Apparatus according to any one of claims 73 to 75, configured to:
77. updating the historical data; and / or performing logical and / or arithmetic operations on said previously updated parameters (132', 132''); determining the number of said previously updated parameters (132', 132'') that satisfy a further predetermined criterion; determining whether any of the previously updated parameters (132', 132'') do not meet the predetermined criteria; comparing each of said previously updated parameters (132', 132'') with a threshold value; selecting the probabilistic model (142) according to one or more of:
77. The apparatus of claim 76 configured to:
78. 78. Apparatus according to claim 76 or 77, configured to store information about said previously updated parameters (132', 132'') in said historical data.
79. 79. The apparatus of claim 78, configured to store information about a limited number of previous update parameters (132', 132'') in the historical data.
80. 80. The apparatus of any one of claims 76 to 79, configured to determine the parameters of the historical data by filtering a plurality of previous updated parameters (132', 132'') with an infinite impulse response (IIR) filter.
81. 81. Apparatus according to any one of claims 76 to 80, wherein the historical data comprises a parameter indicative of whether the sequence of previous updated parameters (132', 132'') satisfies a predetermined criterion.
82. 82. Apparatus according to any one of claims 76 to 81, wherein the historical data comprises a parameter indicative of a count of previous updated parameters (132', 132'') that meet a predetermined criterion.
83. configured to reset the history data to a predetermined state when a reset condition is met, the reset condition comprising: the count of said one or more previous update parameters (132', 132'') received by said device is equal to a predetermined count; - the count of previous update parameters (132', 132'') that meet further predetermined criteria falls below a predetermined threshold; depends on a set of conditions including one or more of: the reset condition is true if any of the conditions in the set of conditions is satisfied, or if each condition in a subset of the set of conditions is satisfied; 83. Apparatus according to any one of claims 76 to 82.
84. 84. An apparatus according to any one of claims 76 to 83, configured to reset the historical data to a predetermined state if a reset condition is met, and to encode into the data stream a notification indicating the resetting of the historical data.
85. 85. The apparatus of claim 76, further configured to: deactivate the selection of the probabilistic model (142) that resets the historical data to a predetermined state when a deactivation condition is met; and encode a notification into the data stream indicating the deactivation of the selection of the probabilistic model (142).
86. 86. The apparatus of any one of claims 73 to 85, wherein the apparatus is configured to select a first probability model (142) for entropy coding of the update parameters if the sequence of the previous update parameters (132', 132'') does not satisfy a predetermined criterion.
87. 87. Apparatus according to any one of claims 81 to 86, wherein the predetermined criterion is met if all of the previously updated parameters (132', 132'') of the sequence have a predetermined value.
88. The device, selecting a first probability model for the entropy coding of the update parameters if the sequence of the previous update parameters (132', 132'') does not satisfy a predetermined criterion; If the history parameter has a first value indicating that the predetermined criterion is not met or if the update parameter (132) does not have a predetermined value, setting the history parameter to the first value; if the update parameter (132) has the predetermined value and the history parameter has a second value indicating that the predetermined criterion has been met, setting the history parameter to the second value; updating a history parameter indicative of whether the sequence of previous update parameters (132', 132'') satisfies the predetermined criterion or not, depending on the update parameters (132) by 76. Apparatus according to any one of claims 73 to 75, configured to:
89. 90. The apparatus of claim 88, configured to select a first probability model for entropy coding of a next update parameter of the NN parameters if the history parameter has the first value, and to select a second probability model for the entropy coding of the next update parameter of the NN parameters (132) if the history parameter has the second value.
90. 88. The apparatus of claim 86 or 87, wherein the first probability model is a constant probability model.
91. 90. The apparatus of any one of claims 81 to 89, wherein the first probability model is a constant probability model that indicates a probability of 0 or a minimum probability representable in entropy coding for a given syntax element (22) having a given state.
92. 90. The apparatus of any one of claims 86 to 89, wherein the first probabilistic model is a context model, or an adaptive model, or an adaptive context model.
93. 93. The apparatus of any one of claims 86 to 92, wherein the apparatus is configured to select a second probabilistic model as the probabilistic model (142) if the sequence of previous update parameters (132', 132'') satisfies the predetermined criterion.
94. 94. The apparatus of claim 93, wherein the second probabilistic model is a context model, or an adaptive model, or an adaptive context model.
95. 95. The apparatus of claim 81, configured to check whether the sequence of previous update parameters (132′, 132″) satisfies the predetermined criterion by considering a significance flag of each of the previous update parameters (132′, 132″), the significance flag of one of the previous update parameters indicating whether the update parameter (132) is 0 or not 0.
96. 95. The apparatus according to any one of claims 81 to 94, configured to check, based on the NN parameters, whether the sequence of previous update parameters (132', 132'') meets the predetermined criteria.
97. the apparatus is configured to obtain, for a plurality of the NN parameters, an update parameter set (132) including a plurality of respective update parameters, and to encode the update parameter set (20) into the data stream; the device is configured to select, for each of the update parameters, a respective probabilistic model (142) depending on one or more previous update parameters (132', 132'') for the respective NN parameter; 97. Apparatus according to any one of claims 73 to 96.
98. 98. The apparatus of any one of claims 73 to 97, wherein the neural network includes a plurality of layers, each update parameter set (20) of each of the layers including one or more of the NN parameters, and the apparatus is configured to activate or deactivate a selection of a probability model (142) for entropy coding the update parameters for each layer.
99. 99. The apparatus of claim 98, wherein the apparatus is configured to encode a syntax element into the data stream indicating whether the selection of a probabilistic model (142) should be activated or deactivated for update parameters of one or more of the layers to which the notification refers.
100. The device, if the selection is deactivated for the layer, using a predetermined probability model for the entropy coding of all update parameters of one of the layers; selecting, when the selection is activated, for each of the update parameters of the layer, a respective probabilistic model (142) depending on one or more previous update parameters (132', 132'') for the NN parameter associated with the respective update parameter; 100. Apparatus according to claim 98 or 99, configured to:
101. 101. The apparatus of any one of claims 73 to 100, configured to use the probability model (142) to entropy code a significance flag indicating whether the update parameter (132) is zero or not zero.
102. updating the NN parameters, - combining the NN parameters with the update parameters, or - multiplying the NN parameters by the update parameters, or - replacing said NN parameters with said updated parameters; 102. The apparatus of any one of claims 73 to 101, configured to obtain the update parameters (132), such that the update parameters (132) are operable by:
103. 1. A method for decoding neural network (NN) parameters defining a neural network from a data stream, comprising: obtaining from the data stream (14) a mapping scheme (44) for mapping (40) quantization indexes (32) to reconstruction levels (42); checking (34) whether said mapping scheme satisfies predetermined criteria; One of the NN parameters is inferring the state of a given syntax element (22) from said mapping scheme (44) if said mapping scheme (44) satisfies said predetermined criteria; deriving the predetermined syntax element (22) from the data stream (14) if the mapping scheme (44) does not satisfy the predetermined criteria; applying (40) the quantization indexes (32) derived using the predetermined syntax elements (22) to the mapping scheme to obtain reconstruction levels (42) of the NN parameters; and reconstructing it by A method comprising:
104. A method for encoding neural network (NN) parameters defining a neural network into a data stream (14), comprising: obtaining a mapping scheme for mapping reconstruction levels to quantization indexes; encoding the mapping scheme into the data stream; One of the NN parameters is subjecting the reconstruction levels of the NN parameters to the mapping scheme to obtain quantization indexes; skipping encoding of predetermined syntax elements into the data stream if the mapping scheme satisfies a predetermined criterion, where the predetermined syntax elements are part of a representation of the quantization indexes; encoding the predetermined syntax element into the data stream if the mapping scheme does not satisfy the predetermined criterion; and encoding by A method comprising:
105. 1. A method for decoding neural network (NN) parameters defining a neural network from a data stream, comprising: receiving an updated parameter for one of the NN parameters; entropy decoding the update parameters from the data stream by selecting a probability model for entropy decoding of the update parameters depending on a sequence of previous update parameters for the NN parameters and / or depending on the NN parameters. updating the NN parameters using the updated parameters by A method comprising:
106. 1. A method for encoding neural network (NN) parameters defining a neural network into a data stream, comprising: Obtaining an update parameter for one of the NN parameters; - entropy coding the update parameters into the data stream by selecting a probability model for entropy coding of the update parameters depending on a sequence of previous update parameters for the NN parameters and / or depending on the NN parameters; A method comprising:
107. a data stream (14) having neural network parameters that define a neural network encoded therein; obtaining a mapping scheme for mapping reconstruction levels to quantization indexes; encoding the mapping scheme into the data stream; subjecting the reconstruction levels of the NN parameters to the mapping scheme to obtain quantization indexes; skipping encoding of predetermined syntax elements into the data stream if the mapping scheme satisfies a predetermined criterion, where the predetermined syntax elements are part of a representation of the quantization indexes; encoding the predetermined syntax element into the data stream if the mapping scheme does not satisfy the predetermined criterion; encoding one of the NN parameters by A data stream (14) according to
108. A data stream (14) having update parameters encoded therein for encoding neural network (NN) parameters defining a neural network, the update parameters comprising: Obtaining an update parameter for one of the NN parameters; - entropy coding the update parameters into the data stream by selecting a probability model for entropy coding of the update parameters depending on a sequence of previous update parameters for the NN parameters and / or depending on the NN parameters; a data stream (14) encoded into said data stream by
109. 107. A computer program for performing the method of any one of claims 103 to 106 when the computer program is run on a computer or signal processor.
Citation Information
Patent Citations
Methods and apparatuses for compressing parameters of neural networks
WO2020188004A1
Concepts for coding neural networks parameters
WO2021123438A1