Data processing device, data processing system and data processing method

By encoding the model and layer unit edge weight information of the neural network, the problem of high encoding load and large data size in data transmission of NN in a multi-client environment is solved, and more efficient data transmission is achieved.

CN113454654BActive Publication Date: 2024-08-23MITSUBISHI ELECTRIC CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980092550.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-02-28
Publication Date
2024-08-23
Estimated Expiration
2039-02-28

AI Technical Summary

Technical Problem

When a large number of clients use the neural network (NN) learned by the server for data processing, the existing technology is difficult to effectively compress the model and parameter data of the NN, resulting in high encoding processing load and large transmission data size, especially when the number of clients When huge, the transferred data size becomes huge.

Method used

By generating and encoding the model header information, layer header information, and layer-unit edge weight information that identifies NN, only the layer-related information required on the decoding side is transmitted, reducing the encoding processing load and reducing the transmission data size.

Benefits of technology

This reduces the coding processing load and transmission data size of neural network-related information, and improves data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113454654B
    Figure CN113454654B
Patent Text Reader

Abstract

The data processing device comprises: a data processing unit (10) which learns a neural network; and an encoding unit (11) which generates encoded data by encoding model header information of a model identifying the neural network, layer header information of a layer identifying the neural network, and weight information of edges of layer units.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data processing device, a data processing system, and a data processing method for generating encoded data by encoding information related to the structure of a neural network. Background Art

[0002] As a method for solving the classification (recognition) and regression problems of input data, there is machine learning. In machine learning, there is a method called a neural network that simulates the neural circuits (neurons) of the brain. In a neural network (hereinafter referred to as NN), the classification (recognition) or regression of input data is performed by a probability model (recognition model, generation model) represented by a network composed of neurons connected to each other.

[0003] In addition, NN can achieve high performance by optimizing NN parameters through learning using a large amount of data. However, in recent years, NN has become larger in size, and the data size of NN has tended to increase in capacity, and the computational load of computers using NN has also increased.

[0004] For example, a technique for encoding edge weights, which is information indicating the structure of a NN, after scalar quantization is described in Non-Patent Document 1. By encoding edge weights after scalar quantization, the data size of data related to the edges is compressed.

[0005] Prior art literature

[0006] Non-patent literature

[0007] Non-patent literature 1: Vincent Vanhoucke, Andrew Senior, Mark Z.Mao, "Improving thespeed of neural networks on CPUs", Proc.Deep Learning and Unsupervised FeatureLearning NIPS Workshop, 2011. Summary of the invention

[0008] Problems to be solved by the invention

[0009] In a system where a large number of clients are connected to a server via a data transmission network, when a large number of clients respectively use the NN learned by the server to process data, the data size of the NN model and parameters and the value representing the appropriate performance vary according to the processing performance of each client, the storage capacity and the transmission band of the data transmission network between the server and the client. Therefore, even if the technology described in non-patent document 1 is used to encode the model and parameters of the NN, it is necessary to compress them into data sizes suitable for a large number of clients, respectively, and there is a problem that the processing load of the encoding becomes high. In addition, when the number of clients is large, even if the data transmitted to each client is compressed, there is a problem that the data size transmitted to all clients is large.

[0010] The present invention is used to solve the above-mentioned problems, and its purpose is to obtain a data processing device, a data processing system and a data processing method that can reduce the processing load of encoding information related to NN and reduce the size of transmitted data.

[0011] Means for solving problems

[0012] The data processing device of the present invention comprises: a data processing unit which learns NN; and an encoding unit which generates encoded data by encoding model header information of a model identifying the NN, layer header information of a layer identifying the NN, and weight information of edges of layer units.

[0013] Effects of the Invention

[0014] According to the present invention, the coding unit generates coded data by coding model header information for identifying a model of the NN, layer header information for identifying a layer of the NN, and weight information of edges of the layer unit. The coding unit can code information related to the layer required by the decoding side in the NN, thereby reducing the processing load of coding information related to the NN and reducing the size of transmitted data. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 This is a block diagram showing the structure of the data processing system according to the first embodiment.

[0016] Figure 2 It is a diagram showing a configuration example of NN.

[0017] Figure 3 This is a block diagram showing the structure of the data processing device (encoder) according to the first embodiment.

[0018] Figure 4 This is a block diagram showing the structure of the data processing device (decoder) according to the first embodiment.

[0019] Figure 5 This is a flowchart showing the operation of the data processing device (encoder) according to the first embodiment.

[0020] Figure 6 This is a flowchart showing the operation of the data processing device (decoder) according to the first embodiment.

[0021] Figure 7 This is a diagram showing an example of encoded data in embodiment 1.

[0022] Figure 8 This is a diagram showing another example of encoded data in Implementation Example 1.

[0023] Fig. 9 This is a diagram showing an example of convolution processing of one-dimensional data in the first embodiment.

[0024] Fig.10 This is a diagram showing an example of convolution processing of two-dimensional data in the first embodiment.

[0025] Fig.11 ] is a diagram showing a matrix of edge weight information of each node in the layer of the lth layer of the NN.

[0026] Fig.12 is a diagram showing a matrix of quantization steps of edge weight information of each node in the layer of the lth layer of the NN.

[0027] Fig.13 is a diagram showing a matrix of edge weight information in a convolutional layer.

[0028] Fig.14 is a diagram showing a matrix of quantization steps of edge weight information in a convolutional layer.

[0029] 15A is a block diagram showing a hardware configuration for realizing the functions of the data processing device according to Embodiment 1. FIG15B is a block diagram showing a hardware configuration for executing software for realizing the functions of the data processing device according to Embodiment 1.

[0030] Fig.16 This is a block diagram showing the structure of a data processing device (encoder) according to the second embodiment. DETAILED DESCRIPTION

[0031] Implementation Method 1

[0032] Figure 1 1 is a block diagram showing the structure of the data processing system of Embodiment 1. Figure 1 In the data processing system shown in the figure, the server 1 is connected to the clients 3-1, 3-2, ..., 3-N via the data transmission network 2. N is a natural number greater than 2. The server 1 is a data processing device that generates a high-performance NN (neural network) by optimizing the parameters of the NN by learning with a large amount of data. Figure 1The data processing system shown includes a first data processing device.

[0033] The data transmission network 2 is a network for transmitting data exchanged between the server 1 and the clients 3-1, 3-2, ..., 3-N, and is the Internet or an intranet. For example, in the data transmission network 2, information for generating a NN is transmitted from the server 1 to the clients 3-1, 3-2, ..., 3-N.

[0034] The clients 3-1, 3-2, ..., 3-N are devices that generate the NN learned by the server 1 and use the generated NN to perform data processing. For example, the clients 3-1, 3-2, ..., 3-N are devices such as personal computers (PCs), cameras, or robots that have communication functions and data processing functions. The clients 3-1, 3-2, ..., 3-N are respectively Figure 1 The data processing system shown has a second data processing device.

[0035] exist Figure 1 In the data processing system shown, the data sizes of the NN models and parameters and the values ​​indicating appropriate performance are different in the clients 3-1, 3-2, ..., 3-N. Therefore, even if the NN models and parameters are encoded using the technology described in Non-Patent Document 1, they need to be compressed to data sizes suitable for the clients 3-1, 3-2, ..., 3-N, respectively, and the processing load of encoding increases.

[0036] Therefore, in the data processing system of the first embodiment, the server 1 generates coded data by encoding the model header information of the model identifying the NN, the layer header information of the layer identifying the NN, and the weight information of the edge of the layer unit, and transmits it to the clients 3-1, 3-2, ..., 3-N via the data transmission network 2. The clients 3-1, 3-2, ..., 3-N can respectively decode only the information related to the necessary layer in the coded data transmitted from the server 1 via the data transmission network 2. Thus, the processing load of the encoding in the server 1 can be reduced, and the size of the data transmitted from the server 1 to the data transmission network 2 can be reduced.

[0037] Here, the structure of NN is described.

[0038] Figure 2 is a diagram showing an example of the structure of a NN. Figure 2 As shown, the input data (x1, x2, ..., x N1 ) is processed in each layer of NN and the processing results (y1, ..., y NL ). l (l=1, 2, ..., L) represents the number of nodes in the lth layer, and L represents the number of layers in the NN. Figure 2As shown, NN has an input layer, a hidden layer, and an output layer, and each of these layers is a structure in which multiple nodes are connected by edges. The output values ​​of each of the multiple nodes can be calculated based on the output values ​​of the nodes of the layer before the edge connection, the weight information of the edge, and the activation function set according to each layer.

[0039] In NN, for example, there is a convolutional neural network (CNN) that has not only a fully-connected layer but also a convolutional layer and a pooling layer. In CNN, a network that realizes data filtering processing and other data processing other than classification and regression can be generated.

[0040] For example, it is possible to use an image or sound as input, and use CNN to implement noise removal or high-quality image or sound filtering of the input signal, high-frequency restoration of compressed sound with lost high frequencies, restoration of an image with a partially missing image area (inpainting), or super-resolution of an image. In CNN, it is also possible to construct a NN that combines a generative model and a recognition model to determine the authenticity of data using a recognition model that determines whether the data was generated by the generative model.

[0041] In recent years, a new NN, Generative Adversarial Network, has been proposed. This Generative Adversarial Network learns in an adversarial way so that the generative model does not generate data that is recognized as not real data by the recognition model, and the recognition model recognizes the data generated by the generative model as not real data. In this NN, a high-precision generative model and recognition model can be generated.

[0042] Figure 3 This is a block diagram showing the structure of the data processing device (encoder) according to the first embodiment. Figure 3 The data processing device shown is a first data processing device that uses a learning data set and an evaluation data set to learn a NN and generate coded data of model information (hereinafter referred to as model information) representing the structure of the NN, for example Figure 1 Server 1 is shown.

[0043] Figure 3The data processing device shown has a data processing unit 10 and an encoding unit 11. The data processing unit 10 is a first data processing unit for learning NN, and has a learning unit 101, an evaluation unit 102, and a control unit 103. The encoding unit 11 generates encoded data by encoding model header information for identifying a model of the NN learned by the learning unit 101, layer header information for identifying a layer of the NN, and weight information of edges of layer units.

[0044] The learning unit 101 implements the learning process of the NN using the learning data set, and generates model information of the learned NN. The model information is output from the learning unit 101 to the evaluation unit 102. Furthermore, the learning unit 101 has model information for encoding controlled by the control unit 103 described later, and when the control unit 103 receives a learning completion instruction, the model information for encoding is output to the encoding unit 11. The evaluation unit 102 generates the NN using the model information, and uses the generated NN to implement inference processing based on the evaluation data set. The value of the evaluation index obtained as a result of the inference processing is the evaluation result, and the evaluation result is output from the evaluation unit 102 to the control unit 103. The evaluation index is pre-set in the evaluation unit 102, for example, the output value of the inference accuracy or loss function.

[0045] The control unit 103 determines whether the model of the NN learned by the learning unit 101 is updated and whether the learning unit 101 can complete the learning of the NN based on the evaluation value obtained as the evaluation result by the evaluation unit 102, and controls the learning unit 101 based on the determination result. For example, the control unit 103 compares the evaluation value with the model update determination criterion, and determines whether the model information is updated to the encoding model information based on the comparison result. In addition, the control unit 103 compares the evaluation value with the learning completion determination criterion, and determines whether the learning unit 101 has completed the learning of the NN based on the comparison result. In addition, these determination criteria are determined based on the history of the evaluation value.

[0046] Figure 4 This is a block diagram showing the structure of the data processing device (decoder) according to the first embodiment. Figure 4 The data processing device shown is a second data processing device, for example Figure 1 The clients 3-1, 3-2, ..., 3-N shown in FIG. Figure 3 The coding unit 11 shown decodes the coded data generated to generate an NN, and uses the generated NN to perform inference processing on one or more evaluation data.

[0047] Figure 4 The data processing device shown in FIG. 1 includes a decoding unit 201 and an inference unit 202. The decoding unit 201 decodes the model information from the coded data generated by the coding unit 11. For example, the decoding unit 201 can decode only the model information from the coded data. Figure 4The data processing device shown decodes the required information.

[0048] The inference unit 202 is a second data processing unit that generates an NN using the model information decoded by the decoding unit 201 and performs data processing using the generated NN. For example, the data processing is an inference process on the evaluation data using the NN. The inference unit 202 performs an inference process on the evaluation data using the NN and outputs an inference result.

[0049] Next, the operation of the data processing system according to the first embodiment will be described.

[0050] Figure 5 is a flowchart showing the operation of the data processing device (encoder) of Embodiment 1, showing Figure 3 The data processing method of the data processing device shown.

[0051] The learning unit 101 learns the NN (step ST1 ). For example, the learning unit 101 performs NN learning using a learning data set, and outputs model information obtained by the learning to the evaluation unit 102 .

[0052] Model information is information indicating the model structure of NN, and is composed of layer structure information indicating the structure of each layer and weight information of each edge belonging to the layer. Layer structure information includes layer category information, structural information related to layer category, and information required to constitute the layer other than edge weights. Information required to constitute the layer other than edge weights includes, for example, activation functions. Layer category information is information indicating the category of the layer. By referring to the layer category information, the category of the layer such as convolutional layer, pooling layer, or fully connected layer can be identified.

[0053] The structural information related to the layer category is information indicating the structure of the layer of the category corresponding to the layer category information. For example, in the case where the category of the layer corresponding to the layer category information is a convolution layer, the structural information related to the layer category includes the data size and shape (including the number of filter coefficients) of the filter (kernel) for convolution, the number of filters, the convolution interval (stride), the presence or absence of padding for the input signal boundary, and the padding method when padding is present. In addition, in the case where the category of the layer corresponding to the layer category information is a pooling layer, the structural information related to the layer category includes a pooling method such as maximum pooling or average pooling, the shape of the kernel for pooling processing, the pooling interval (stride), the presence or absence of padding for the input signal boundary, and the padding method when padding is present.

[0054] In the information representing the weight of each edge, the weight is sometimes set independently for each edge as in a fully connected layer, while on the other hand, the weight of the edge is sometimes shared in units of convolution filters (kernels) as in a convolution layer, that is, the weight of the edge is shared in one filter.

[0055] The evaluation unit 102 evaluates the NN (step ST2). For example, the evaluation unit 102 generates the NN using the model information generated by the learning unit 101, and uses the generated NN to perform inference processing based on the evaluation data set. The evaluation result is output from the evaluation unit 102 to the control unit 103. The evaluation result is, for example, the inference accuracy or the output value of the loss function.

[0056] Next, the control unit 103 determines whether to update the model information (step ST3). For example, if the evaluation value generated by the evaluation unit 102 does not satisfy the model update determination criterion, the control unit 103 determines not to update the encoding model information held by the learning unit 101, and if the evaluation value satisfies the model update determination criterion, the control unit 103 determines to update the encoding model information.

[0057] As an example of a model update judgment criterion, there is the following example: when the evaluation value is the output value of the loss function, the evaluation value of the current learning is less than the minimum evaluation value of the learning history since the start of learning. As another example, there is the following example: when the evaluation value is the inference accuracy, the evaluation value of the current learning is greater than the maximum evaluation value of the learning history since the start of learning.

[0058] In addition, the switching unit of the learning history can also be arbitrary. For example, it is assumed that each model index described later has a learning history. In this case, when the model does not have the reference model index described later, it is assumed that there is no learning history and learning is started. That is, in the first step ST3, the model information must be updated. On the other hand, when the model has a reference model index, the learning history (history A) of the model indicated by the reference model index is referred to. In this way, it is possible to prevent the model from being updated to a model whose evaluation value is worse than the model indicated by the reference model index (low inference accuracy, large value of loss function, etc.) during the learning of the model. At this time, when the model index and the reference model index of the model are the same, each time the learning of the model is implemented, the learning history (history A) corresponding to the reference model index is updated. On the other hand, when the model index and the reference model index of the model are different, the learning history (history A) corresponding to the reference model index is copied as the initial value of the learning history (history B) of the model index of the model, and then, each time the learning of the model is implemented, the learning history (history B) of the model is updated.

[0059] When the control unit 103 determines that the model information is to be updated (step ST3: Yes), the learning unit 101 updates the encoding model information to the model information (step ST4). For example, the control unit 103 generates model update instruction information indicating that the model information is to be updated, and outputs the learning control information including the model update instruction information to the learning unit 101. The learning unit 101 updates the encoding model information to the model information according to the model update instruction information included in the learning control information.

[0060] On the other hand, when it is determined that the model information is not to be updated (step ST3: No), the control unit 103 generates model update instruction information indicating that the model information is not to be updated, and outputs the learning control information including the model update instruction information to the learning unit 101. The learning unit 101 does not update the encoding model information according to the model update instruction information included in the learning control information.

[0061] Next, the control unit 103 compares the evaluation value with the learning completion judgment criterion, and determines whether the learning of the NN by the learning unit 101 is completed based on the comparison result (step ST5). For example, when the learning completion judgment criterion is whether the evaluation value generated by the evaluation unit 102 reaches a specific value, the control unit 103 determines that the learning of the NN by the learning unit 101 is completed when the evaluation value generated by the evaluation unit 102 satisfies the learning completion judgment criterion, and determines that the learning of the NN by the learning unit 101 is not completed when the evaluation value does not satisfy the learning completion judgment criterion. Alternatively, when the learning completion judgment criterion is based on the most recent learning history, such as when the model information is selected not to be updated M times in a row (M is a predetermined integer greater than 1) (step ST3: No), the control unit 103 determines that the learning of the NN by the learning unit 101 is not completed when the learning history does not satisfy the learning completion judgment criterion.

[0062] When the control unit 103 determines that the learning of the NN is completed (step ST5: Yes), the learning unit 101 outputs the encoding model information to the encoding unit 11 and transfers to the processing of step ST6. On the other hand, when the control unit 103 determines that the learning of the NN is not completed (step ST5: No), the processing returns to step ST1.

[0063] The encoder 11 encodes the encoding model information input from the learning unit 101 (step ST6). The encoder 11 encodes the encoding model information generated by the learning unit 101 in units of NN layers, and generates encoded data consisting of header information and encoded data in units of layers.

[0064] Figure 6 is a flowchart showing the operation of the data processing device (decoder) of Embodiment 1, showing Figure 4 The operation of the data processing device shown.

[0065] The decoding unit 201 decodes the model information from the coded data coded by the coding unit 11 (step ST11). Next, the inference unit 202 generates NN based on the model information decoded by the decoding unit 201 (step ST12). The inference unit 202 performs inference processing on the evaluation data using the generated NN and outputs the inference result (step ST13).

[0066] Next, Figure 5 The encoding of the model information by the encoding unit 11 in step ST6 is described in detail.

[0067] Regarding the encoding of the model information by the encoding unit 11, for example, the encoding method (1) or (2) can be used.

[0068] (1) When there is header information, data in which a bit string including the header information is arranged in a predetermined order is set as coded data. The bit string itself is obtained by describing the parameters of each information included in the configuration model information with the bit precision defined in the parameter. The bit precision is, for example, the bit precision defined in the parameter such as 8 bits for int type or 32 bits for float type.

[0069] (2) Data in which a bit string including header information is arranged in a predetermined order is set as coded data. The bit string is obtained by encoding parameters of each information included in the model information using a variable length coding method set for each parameter.

[0070] Figure 7 is a diagram showing an example of coded data in Implementation 1. The coded data in (1) or (2) above may also be Figure 7 Arranged in the order shown. Figure 7 The coded data shown is composed of a set of data called data units, and the data units include non-layer data units and layer data units. The layer data unit is a data unit storing coded data of layer units, that is, layer data.

[0071] The layer data consists of a start code, a data unit type, a layer information header, and weight data. The layer information header is obtained by encoding the layer header information that identifies the layer of the NN. The weight data is obtained by encoding the weight information of the edge belonging to the layer indicated by the layer information header. Figure 7 In the coded data shown, the arrangement order of the data units of each layer does not have to be the same as the arrangement order of each layer of the NN, but is arbitrary. This is because the layer index described later can identify the layer of the NN to which the data unit of each layer belongs.

[0072] The non-layer data unit is a data unit storing data other than layer data. For example, the non-layer data unit stores a start code, a data unit type, and a model information header. The model information header is obtained by encoding model header information for identifying the model of the NN.

[0073] The start code is a code stored at the beginning of the data unit and used to identify the beginning of the data unit. The client 3-1, 3-2, ..., 3-N (hereinafter referred to as the decoding side) can determine the beginning of the non-layer data unit or the layer data unit by referring to the start code. For example, when 0x000001 is defined as the start code, the data other than the start code stored in the data unit is set so as not to generate 0x000001. Thus, the beginning of the data unit can be determined based on the start code.

[0074] In order to set it so that 0x000001 is not generated, for example, 03 is inserted into the third byte of the coded data of 0x000000 to 0x000003 to become 0x00000300 to 0x00000303. When decoding, 0x000003 is converted into 0x0000, thereby enabling restoration. In addition, the start code can be a bit string that can be uniquely identified, and a bit string other than 0x000001 can also be defined as the start code. In addition, as long as the method can identify the starting position of the data unit, the start code may not be used. For example, a bit string that can identify the end of the data unit may be added to the end of the data unit. Alternatively, the start code may be added only to the beginning of the non-layer data unit, and the data size of each layer data unit may be encoded as part of the model information header. In this way, the division position of each layer data unit can be identified based on the above information.

[0075] The data unit type is data for identifying the type of the data unit and is stored after the start code in the data unit. The data unit type predefines a value for each type of the data unit. The decoding side can identify whether the data unit is a non-layer data unit or a layer data unit by referring to the data unit type stored in the data unit, and further, can identify what kind of non-layer data unit or layer data unit it is.

[0076] The model information header in the non-layer data unit includes a model index, the number of layer data units within the model, and the number of coding layer data units. The model index is an index for identifying the model of the NN. Therefore, basically, each model has an index independent of each other, but, assuming that the data processing device (decoder) of implementation mode 1 newly receives a model with the same model index as a model received in the past, the model with the model index is overwritten. The number of layer data units within the model is the number of layer data units constituting the model identified by the model index. The number of coding layer data units is the number of layer data units actually existing in the coded data. Figure 7 In the example of , there are layer data units (1) to (n), so the number of coded layer data units is n. In addition, the number of coded layer data units must be less than the number of layer data units in the model.

[0077] The layer information header in the layer data unit includes a layer index and layer structure information. The layer index is an index for identifying a layer. The method of assigning the layer index value is pre-defined so that the layer can be identified by the layer index. For example, the input layer of the NN is indexed as 0, and the next layer is indexed as 1, and the indexes are assigned in sequence from the layer closest to the input layer. The layer structure information is information representing the structure of each layer of the NN, and as described above, includes information required to constitute the layer other than layer category information, structure information related to the layer category, and edge weights.

[0078] In addition, the layer information header including the layer structure information is shown above, but the model information header may also include all the layer structure information included in the coded data and the layer index corresponding to the layer structure information. The decoding side can determine the layer structure of each layer index by referring to the model information header.

[0079] Furthermore, in the above case, the structure of the layer of each layer index can be determined by referring to the model information header, so the layer information header may only have the layer index. Thus, when the data size of the layer data unit is larger than the data size of the non-layer data unit, the data size of each layer data unit can be reduced, and the maximum data size of the data unit in the coded data can be reduced.

[0080] In the layer data unit, weight data encoded in layers is stored after the layer information header. The weight data contains a non-zero flag and non-zero weight data. The non-zero flag is a flag indicating whether the weight value of the edge is zero, and the non-zero flag related to the weight of all edges belonging to the corresponding layer is set.

[0081] The non-zero weight data is the data set next to the non-zero flag in the weight data, and the non-zero flag indicates a non-zero (meaningful) weight, and the weight value is set. Figure 7In the example, weight data (1) to weight data (m) representing non-zero weight values ​​are set as non-zero weight data. The number m of non-zero weight data is the number M of all weights corresponding to layer l. l In addition, regarding weight data related to edge-sparse layers whose weight values ​​are non-zero, there is less non-zero weight data and almost only non-zero flags, so the data size of the weight data can be greatly reduced.

[0082] Figure 8 is a diagram showing another example of the coded data in the first embodiment. The coded data in (1) or (2) above may also be Figure 8 Arranged in the order shown. Figure 8 The data structure of the encoded data and weight data shown is the same as Figure 7 Differently, in non-zero weight data, the weights of all edges belonging to the corresponding layer are uniformly arranged in order from the upper bit in each bit plane. Furthermore, bit plane data position identification information indicating the starting position of each bit showing the weight of the edge is set in the layer information header.

[0083] For example, when the bit precision defined in the edge weight is X, the weights of all edges belonging to the corresponding layer are described using the bit precision X. The encoding unit 11 sets the non-zero weight data of the first bit in the bit string of these weights, i.e., the weight data (1) of the first bit, the weight data (2) of the first bit, ..., the weight data (m) of the first bit, to the non-zero weight data of the first bit. This process is repeated from the non-zero weight data of the second bit to the non-zero weight data of the Xth bit. In addition, the weight data (1) of the first bit, the weight data (2) of the first bit, ..., the weight data (m) of the first bit are non-zero weight data constituting the bit plane of the first bit.

[0084] The decoding side can determine the necessary coded data in the coded data of the layer unit according to the bit plane data position identification information, and decode the determined coded data with an arbitrary bit accuracy. That is, the decoding side can select only the necessary coded data from the coded data, and can decode the model information of the NN corresponding to the environment of the decoding side. In addition, the bit plane data position identification information can be any information as long as it can identify the division position between the bit plane data, and can also be information indicating the starting position of each bit plane data, or can also be information indicating the data size of each bit plane data.

[0085] In order to transmit all the encoded data representing the structure of the NN to the decoding side, when the transmission bandwidth of the data transmission network 2 is insufficient, the encoding unit 11 may also limit the non-zero weight data in the encoded data transmitted according to the transmission bandwidth of the data transmission network 2.

[0086] For example, the upper 8 bits of non-zero weight data in the bit string of weight information described with 32-bit precision are set as the transmission object. The decoding side can recognize that the layer data unit corresponding to the next layer is arranged after the 8th bit of non-zero weight data in the encoded data based on the start code arranged after the non-zero weight data. In addition, the decoding side can correctly decode the weight with a value of zero by referring to the non-zero flag in the weight data.

[0087] When the weight data is decoded at an arbitrary bit precision on the decoding side, the encoder 11 may include an offset added to the weight when it is decoded at each bit precision in the layer information header in order to improve the inference accuracy at the bit precision. For example, the encoder 11 adds the same offset to the bit string of the weight described at the bit precision in units of layers, obtains the offset that achieves the highest accuracy, and includes the obtained offset in the layer information header for encoding.

[0088] In addition, the coding unit 11 may include the bias of the weights of the edges in all layers of the NN in the model information header for coding. Furthermore, the coding unit 11 may set a flag indicating whether the bias is included in the layer information header or the model information header, for example, including the bias in the coded data only when the flag is valid.

[0089] The encoding unit 11 may set the difference between the weight value of the edge and a specific value as the encoding target.

[0090] As a specific value, for example, the weight of the previous encoding order can be cited. In addition, the weight of the corresponding edge belonging to a higher layer (a layer close to the input layer) can be set to a specific value, and the weight of the corresponding edge of the model before the update can also be set to a specific value.

[0091] Furthermore, the encoding unit 11 has the functions shown in (A), (B), and (C).

[0092] (A) The encoding unit 11 has a scalable encoding function of encoding the base encoded data and the enhanced encoded data separately.

[0093] (B) The encoding unit 11 has a function of encoding the difference between the weight of the edge in the reference NN and the weight of the edge in the reference NN.

[0094] (C) The encoding unit 11 has a function of encoding only partial information (for example, information on a layer basis) in a reference NN as information for updating the NN.

[0095] The example of (A) is described.

[0096] The encoding unit 11 quantizes the weight of the edge using a quantization method predefined for the weight of the edge, sets the data obtained by encoding the quantized weight as the basic encoded data, and sets the data obtained by encoding the quantization error as the weight as the enhanced encoded data. Through quantization, the bit accuracy of the weight that becomes the basic encoded data is lower than the bit accuracy of the weight before quantization, so the data size can be reduced. In the case where the transmission band for transmitting the encoded data to the decoding side is insufficient, the data processing device of embodiment 1 transmits only the basic encoded data to the decoding side. On the other hand, in the case where the transmission band for transmitting the encoded data to the decoding side is sufficient, the data processing device of embodiment 1 transmits the enhanced encoded data to the decoding side in addition to the basic encoded data.

[0097] The enhanced coded data can be set to more than two. For example, the coding unit 11 sets the quantization value when the quantization error is further quantized as the first enhanced coded data, and sets the quantization error as the second enhanced coded data. Furthermore, it is also possible to further quantize the quantization value of the quantization error of the second enhanced coded data and encode the quantization error to become the number of target enhanced coded data. In this way, by using scalable coding, it is possible to transmit coded data corresponding to the transmission band and transmission allowable time of the data transmission network 2.

[0098] In addition, the encoding unit 11 may also Figure 8 The upper M bits of the non-zero weight data shown are encoded as basic coded data, and the remaining bit string is divided into one or more bits, which are set as one or more enhanced coded data. In this case, the coding unit 11 sets the non-zero flag again in the basic coded data and the enhanced coded data. The weight that becomes 0 in the enhanced coded data of the upper bit must become 0.

[0099] The example of (B) is described.

[0100] The encoding unit 11 may encode the difference between the weight of the edge in the model of the NN after relearning and the weight of the corresponding edge in the model before relearning, when there is a model of the NN before relearning of the learning unit 101. In addition, relearning includes transfer learning or additional learning. In the data processing system, when the structure of the NN is updated at a high frequency or the distribution of the learning data changes little each time relearning, the difference in the weight of the edge is small, so the data size of the encoded data after relearning can be reduced.

[0101] In addition, the encoder 11 may include a reference model index for identifying a model before update to be referenced in the model information header based on the model index. In the case of example (B), the model before relearning can be identified based on the reference model index. Furthermore, the encoder 11 may set a flag indicating whether a reference source exists in the coded data in the model information header. The encoder 11 sets the reference model index in the model information header only when the flag indicates that the coded data is for model update.

[0102] For example, in Figure 1 In the data processing system shown, when the update frequency of the NN differs between clients or when data processing is performed using NNs of different models, the client can correctly identify which model the updated coded data is for by referring to the reference model index. When the reference model index identifies that the coded data is for updating a model that is not on the client side, the client can also communicate this to the server 1.

[0103] The example of (C) is described.

[0104] When there is a model of the NN before re-learning, the learning unit 101 sometimes fixes one or more arbitrary layers from the upper level (input layer side) of the NN for the purpose of fine-tuning, and re-learns only some of the layers. In this case, the encoding unit 11 encodes only the information indicating the structure of the layer updated by re-learning. As a result, in the update of the NN, the data size of the encoded data transmitted to the decoding side can be reduced. In addition, the number of encoded layer data units in the encoded data is less than the number of layer data units in the model. On the decoding side, the layer to be updated can be determined by referring to the reference model index contained in the model information header and the layer index contained in the layer information header.

[0105] Next, data processing by the learning unit 101 , the evaluation unit 102 , and the inference unit 202 will be described.

[0106] Fig. 9 This is a diagram showing an example of convolution processing of one-dimensional data in Embodiment 1, and shows a convolution layer that performs convolution processing of one-dimensional data. One-dimensional data includes, for example, audio data and time series data. Fig. 9The convolutional layer shown has 9 nodes 10-1 to 10-9 in the previous layer and 3 nodes 11-1 to 11-3 in the next layer. The same weight is given to edges 12-1, 12-6, and 12-11, the same weight is given to edges 12-2, 12-7, and 12-12, the same weight is given to edges 12-3, 12-8, and 12-13, the same weight is given to edges 12-4, 12-9, and 12-14, and the same weight is given to edges 12-5, 12-10, and 12-15. In addition, the weights of edges 12-1 to 12-5 may all be different values, and sometimes multiple weights may be the same value.

[0107] Five of the nine nodes 10-1 to 10-9 in the previous layer are connected to one node in the next layer with the above weights. The kernel size K is 5, and the kernel is determined by the combination of these weights. For example, Fig. 9 As shown, node 10-1 is connected to node 11-1 via edge 12-1, node 10-2 is connected to node 11-1 via edge 12-2, node 10-3 is connected to node 11-1 via edge 12-3, node 10-4 is connected to node 11-1 via edge 12-4, and node 10-5 is connected to node 11-1 via edge 12-5. The core is defined by the combination of weights of edges 12-1 to 12-5.

[0108] Node 10-3 is connected to node 11-2 via edge 12-6, node 10-4 is connected to node 11-2 via edge 12-7, node 10-5 is connected to node 11-2 via edge 12-8, node 10-6 is connected to node 11-2 via edge 12-9, and node 10-7 is connected to node 11-2 via edge 12-10. The core is defined by the combination of weights of edges 12-6 to 12-10.

[0109] Node 10-5 is connected to node 11-3 via edge 12-11, node 10-6 is connected to node 11-3 via edge 12-12, node 10-7 is connected to node 11-3 via edge 12-13, node 10-8 is connected to node 11-3 via edge 12-14, and node 10-9 is connected to node 11-3 via edge 12-15. The core is defined by the combination of weights of edges 12-11 to 12-15.

[0110] The learning unit 101, the evaluation unit 102, and the inference unit 202 process the input data using the CNN, using a combination of weights of the edges of the convolutional layer, and performing the convolution operation at intervals of the number of steps (in steps) for each kernel. Fig. 9 The convolution operation is performed with S=2). The combination of edge weights is determined by learning for each kernel. In addition, in CNNs used for image recognition, NN is often constructed using convolution layers with multiple kernels.

[0111] Fig.10 This is a diagram showing an example of convolution processing of two-dimensional data in the first embodiment, and shows convolution processing of two-dimensional data such as image data. Fig.10 The kernel 20 in the two-dimensional data shown is K in the x direction. x, The size in the y direction is K y The kernel size K is K=K x ×K y The learning unit 101, the evaluation unit 102 or the inference unit 202 calculates the number of steps S in the x direction in the two-dimensional data. x The interval and the number of steps in the y direction S y The convolution operation of each kernel 20 data is performed at intervals of x , S y is an integer greater than 1.

[0112] Fig.11 1 is a diagram showing a matrix of edge weight information of each node in the lth (l=1, 2, ..., L) layer in the fully connected layer of the NN. Fig.12 1 is a diagram showing a matrix of quantization steps of edge weight information of each node in the lth (l=1, 2, ..., L) layer in the fully connected layer of the NN.

[0113] In NN, Fig.11 The weights w of each layer are shown ij The combination of becomes the data that constitutes the network. Therefore, in a multi-layer NN such as a deep neural network, the data volume generally becomes hundreds of Mbytes or more, requiring a large storage size. Here, i is the node index, i = 1, 2, ..., N l j is the edge index, j = 1, 2, ..., N l-1 .

[0114] Therefore, in the data processing device of the first embodiment, in order to reduce the amount of data of the edge weight information, the weight information is quantized. Fig.12 As shown, the quantization step size q ij According to the weight w of each edge ij The quantization step size can be a plurality of node indices or a plurality of edge indices, and a plurality of node indices and edge indices can also be common. Thus, the quantization information to be encoded can be reduced.

[0115] Fig.13 is a diagram showing a matrix of edge weight information in a convolutional layer. Fig.14 This is a diagram showing the matrix of quantization steps of edge weight information in the convolution layer. In the convolution layer, the edge weight for one core is common to all nodes, which can reduce the number of edges connected to each node, that is, the core size K, making the core a small area. Fig.13The weight w of the edge is set according to each core i’j’ The data obtained, Fig.14 The quantization step size q is set according to each kernel i’j’ In addition, i' is the kernel index, i' = 1, 2, ..., M l (l = 1, 2, ..., L). j' is the edge index, j' = 1, 2, ..., K l .

[0116] The quantization step size may also be made common among multiple core indices, multiple edge indices, or multiple core indices and edge indices. This can reduce the quantization information to be encoded. For example, all quantization step sizes within a layer may be made common, with one quantization step size set in one layer, or all quantization step sizes within a model may be made common, with one quantization step size set in one model.

[0117] Next, the hardware structure for realizing the functions of the data processing device of Embodiment 1 is described. The functions of the data processing unit 10 and the encoding unit 11 in the data processing device of Embodiment 1 are realized by a processing circuit. That is, the data processing device of Embodiment 1 has a hardware structure for executing Figure 5 The processing circuit may be dedicated hardware or a CPU (Central Processing Unit) that executes a program stored in a memory.

[0118] FIG15A is a block diagram showing a hardware configuration for realizing the functions of the data processing device of Embodiment 1. In FIG15A, a processing circuit 300 is provided as Figure 3 Fig. 15B is a block diagram showing a hardware configuration for executing software that realizes the functions of the data processing device of Embodiment 1. In Fig. 15B, a processor 301 and a memory 302 are connected to each other via a signal bus.

[0119] In the case where the processing circuit 300 is dedicated hardware as shown in FIG15A, the processing circuit 300 is, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a combination thereof. In addition, the functions of the data processing unit 10 and the encoding unit 11 may be implemented by different processing circuits, or these functions may be implemented uniformly by one processing circuit.

[0120] In the case where the processing circuit is a processor as shown in FIG. 15B , the functions of the data processing unit 10 and the encoding unit 11 are implemented by software, firmware, or a combination of software and firmware. The software or firmware is referred to as a program and is stored in the memory 302. The processor 301 reads out and executes the program stored in the memory 302, thereby implementing the functions of the data processing unit 10 and the encoding unit 11. That is, the data processing device of Embodiment 1 has a memory 302, which is used to store the program that is executed by the processor 301. Figure 5 The program for the processing of steps ST1 to ST6 shown in the figure. These programs cause the computer to execute the steps or methods of the data processing unit 10 and the encoding unit 11. The memory 302 may be a computer-readable storage medium storing a program for causing the computer to function as the data processing unit 10 and the encoding unit 11.

[0121] The memory 302 is, for example, a non-volatile or volatile semiconductor memory such as RAM (Random Access Memory), ROM (Read Only Memory), flash memory, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically-EPROM), a magnetic disk, a floppy disk, an optical disk, a high-density disk, a mini disk, a DVD, etc.

[0122] In addition, the functions of the data processing unit 10 and the encoding unit 11 may be partially implemented by dedicated hardware and partially implemented by software or firmware. For example, the data processing unit 10 may be implemented by a processing circuit as dedicated hardware, and the encoding unit 11 may be implemented by the processor 301 reading and executing a program stored in the memory 302. In this way, the processing circuit can implement the above functions respectively by hardware, software, firmware or a combination thereof.

[0123] In addition, Figure 3 The data processing apparatus shown is described, however, Figure 4 The same is true for the data processing device shown. For example, Figure 4 The data processing device shown has a Figure 6 The processing circuit for performing the processing of steps ST11 to ST13 may be dedicated hardware or a CPU that executes a program stored in a memory.

[0124] When the processing circuit 300 is dedicated hardware as shown in FIG15A, the processing circuit 300 is, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC, an FPGA, or a combination thereof. In addition, the functions of the decoding unit 201 and the inference unit 202 may be implemented by different processing circuits, or these functions may be implemented uniformly by one processing circuit.

[0125] When the processing circuit is a processor as shown in FIG. 15B , the functions of the decoding unit 201 and the inference unit 202 are implemented by software, firmware, or a combination of software and firmware. The software or firmware is recorded as a program and stored in the memory 302. The processor 301 reads out and executes the program stored in the memory 302, thereby implementing the functions of the decoding unit 201 and the inference unit 202. That is, Figure 4 The data processing apparatus shown has a memory 302 for storing data which, when executed by the processor 301, results in execution of the data. Figure 6 The program for the processing of steps ST11 to ST13 shown in the figure. These programs cause the computer to execute the steps or methods of the decoding unit 201 and the inference unit 202. The memory 302 may be a computer-readable storage medium storing a program for causing the computer to function as the decoding unit 201 and the inference unit 202.

[0126] In addition, the functions of the decoding unit 201 and the inference unit 202 may be partially realized by dedicated hardware and partially realized by software or firmware. For example, the decoding unit 201 may be realized by a processing circuit as dedicated hardware, and the inference unit 202 may be realized by the processor 301 reading and executing a program stored in the memory 302.

[0127] As described above, in the data processing device of Embodiment 1, the encoding unit 11 encodes the information indicating the structure of the NN and generates the encoded data consisting of the header information and the encoded data of the layer unit. It is possible to encode only the information related to the layer required by the decoding side, so that the processing load of encoding the information related to the structure of the NN can be reduced, and the size of the data transmitted to the decoding side can be reduced.

[0128] In the data processing device of Embodiment 1, the coding unit 11 codes the weight information of the edges belonging to the layers of the NN in bit-plane units starting from the most significant bit. This can reduce the data size of the coded data transmitted to the decoding side.

[0129] In the data processing device of Embodiment 1, the coding unit 11 codes information on one or more layers specified by the header information. This can reduce the data size of the coded data transmitted to the decoding side by coding only the information on the layers required by the decoding side.

[0130] In the data processing device of Embodiment 1, the coding unit 11 codes the difference between the weight value of the edge belonging to the layer specified by the header information and the specific value. This can reduce the data size of the coded data transmitted to the decoding side.

[0131] In the data processing device of Embodiment 1, the coding unit 11 divides the edge weight information into basic coded data and enhanced coded data for coding. This enables coded data transmission corresponding to the transmission band and transmission allowable time of the data transmission network 2.

[0132] Implementation Method 2

[0133] Fig.16 This is a block diagram showing the structure of a data processing device (encoder) according to the second embodiment. Fig.16 The data processing device shown is a first data processing device for learning NN using a learning data set and an evaluation data set and generating encoded data of model information of NN, for example Figure 1 Server 1 is shown. Fig.16 The data processing device shown has a data processing unit 10A, an encoding unit 11 and a decoding unit 12 .

[0134] The data processing unit 10A is a data processing unit that generates and learns the NN, and includes a learning unit 101A, an evaluation unit 102, and a control unit 103. The encoding unit 11 encodes the model information generated by the learning unit 101, and generates encoded data consisting of header information and encoded data of layer units. The decoding unit 12 decodes the model information from the encoded data generated by the encoding unit 11. In addition, the decoding unit 12 outputs the decoded model information to the learning unit 101A.

[0135] Similar to Embodiment 1, the learning unit 101A learns the NN using the learning data set and generates model information indicating the structure of the learned NN. In addition, the learning unit 101A generates the NN using the decoded model information and re-learns the parameters of the generated NN using the learning data set.

[0136] During the above re-learning, the weights of some edges are fixed for re-learning, thereby keeping the data size of the coded data small to achieve high precision. For example, re-learning is performed in a state where the weights with non-zero flags are fixed to 0, thereby preventing the data size of the coded data from becoming larger than the weights of the edges before re-learning, and optimizing the weights.

[0137] As described above, the data processing device of the second embodiment includes the decoding unit 12, and the data processing unit 10A learns the NN using the information decoded by the decoding unit 12. Thus, for example, when the encoding unit 11 performs irreversible encoding that generates coding distortion, the data processing device of the second embodiment can generate and learn the NN based on the actual decoding result of the encoded data, and can perform NN learning that minimizes the influence of the coding error under the condition that the data size of the encoded data is restricted.

[0138] Implementation 3

[0139] The data processing system of the third embodiment has Figure 1 The same structure as server 1, with Figure 3 The data processing devices shown in the figure are clients 3-1, 3-2, ..., 3-N, having Figure 4 In the data processing system of the third embodiment, data output from the intermediate layer of the NN is used as a feature quantity for data processing on image data and audio data, for example, image retrieval or matching described in the following references.

[0140] (Reference) ISO / IEC JTC1 / SC29 / WG11 / m39219, “Improved retrieval and matching with CNN feature for CDVA”, Chengdu, China, Oct. 2016.

[0141] For example, when using the output data of the intermediate layer of the NN as an image feature quantity for image processing such as image retrieval, matching, or object tracking, the image feature quantity used in the existing image processing, i.e., HOG (Histogram of Oriented Gradients), SIFT (Scale Invariant Feature Transform), or SURF (Speeded Up Robust Features), is replaced or added. Thus, the image processing can be implemented with the same processing steps as the image processing using the existing image feature quantity. In the data processing system of the third embodiment, the encoding unit 11 encodes the model information representing the structure of the NN up to the intermediate layer that outputs the image feature quantity.

[0142] Furthermore, the data processing device functioning as the server 1 uses the feature quantity of the above data processing to perform data processing such as image retrieval. The data processing device functioning as the client generates a NN from the encoded data to the intermediate layer, uses the data output from the intermediate layer of the generated NN as the feature quantity, and performs data processing such as image retrieval.

[0143] As described above, in the data processing system of Embodiment 3, the encoding unit 11 encodes the model information representing the structure up to the middle layer of the NN. As a result, the compression rate of the parameter data based on quantization is improved, so the amount of data of the weight information before encoding can be reduced. The client generates the NN using the model information decoded by the decoding unit 201, and performs data processing using the data output from the middle layer of the generated NN as the feature amount.

[0144] The present invention is not limited to the above-described embodiments, and free combinations of the embodiments, modifications of arbitrary components of the embodiments, or omissions of arbitrary components of the embodiments are possible within the scope of the present invention.

[0145] Industrial Applicability

[0146] The data processing device of the present invention can reduce the processing load of encoding information related to the structure of a neural network and reduce the size of data transmitted to the decoding side, and therefore can be used in image recognition technology, for example.

[0147] Description of symbols

[0148] 1: server; 2: data transmission network; 3-1~3-N: client; 10, 10A: data processing unit; 10-1~10-9, 11-1~11-3: node; 11: encoding unit; 12: decoding unit; 12-1~12-15: edge; 20: core; 101, 101A: learning unit; 102: evaluation unit; 103: control unit; 201: decoding unit; 202: inference unit; 300: processing circuit; 301: processor; 302: memory.

Claims

1. A data processing device, characterized in that: The data processing device comprises: a data processing unit that learns a neural network; and An encoding unit generates encoded data by encoding model header information for identifying the model of the neural network, layer header information for identifying the layers of the neural network, and weight information of edges in layer units.

2. The data processing device according to claim 1, characterized in that: The encoding unit encodes weight information of edges belonging to a layer in units of bit planes starting from a high-order bit.

3. The data processing device according to claim 1 or 2, characterized in that: The encoding unit encodes weight information of edges belonging to one or more layers identified by the layer header information.

4. The data processing device according to claim 1 or 2, characterized in that: The encoding unit encodes a difference between a weight value of an edge and a specific value.

5. The data processing device according to claim 1 or 2, characterized in that: The encoding unit divides the edge weight information into basic encoding data and enhanced encoding data for encoding.

6. The data processing device according to claim 1 or 2, characterized in that: The data processing device includes a decoding unit that decodes the encoded data generated by the encoding unit. The data processing unit learns the neural network using the information decoded by the decoding unit.

7. A data processing system, characterized in that: The data processing system comprises a first data processing device and a second data processing device. The first data processing device comprises: a first data processing unit that learns a neural network; and an encoding unit that generates encoded data by encoding model header information for identifying the model of the neural network, layer header information for identifying the layers of the neural network, and weight information of edges in layers, The second data processing device comprises: a decoding unit that decodes the encoded data generated by the encoding unit; and The second data processing unit generates the neural network using the information decoded by the decoding unit and performs data processing using the neural network.

8. The data processing system according to claim 7, characterized in that: The encoding unit encodes information related to up to the intermediate layer of the neural network, The second data processing device performs data processing using data output from an intermediate layer of the neural network as a feature amount.

9. A data processing method, characterized in that: The data processing method comprises the following steps: The data processing unit learns neural networks; and The encoding unit generates encoded data by encoding model header information for identifying a model of the neural network, layer header information for identifying a layer of the neural network, and weight information of edges in layers.