A data auditing model updating method and device and electronic equipment
By associating deep and shallow feature maps in a deep learning model and updating the feature maps and loss function, the uncertainty caused by feature map deviation after the neural network depth increases is solved, thus improving the forward inference accuracy of the model.
Patent Information
- Application Number
- CN202111353439.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-16
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2041-11-16
AI Technical Summary
As the depth of neural networks increases, the feature map space output by deeper convolutional layers deviates from that of shallower convolutional layers in existing deep learning models. This causes uncertainty in the softmax loss function during forward inference, reducing the accuracy of the inference results.
After the neural network structure feature output layer of the model to be updated, the deep feature map output by the deep convolutional layer is associated with the shallow feature map output by the shallow convolutional layer to update the deep feature map. Then, the decision feature operator is calculated based on the updated feature map to update the loss function of the model, so as to improve the forward inference accuracy.
By associating deep and shallow feature maps, the forward decision-making of the model is enhanced, the accuracy of the model in the forward inference process is improved, and attention is ensured to focus on more valuable data.
Smart Images

Figure CN114049498B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of deep learning, in particular to a data auditing model updating method and device and electronic equipment. BACKGROUND
[0002] At present, with the continuous development of deep learning technology, using deep learning models to solve problems in daily life has become an efficient and convenient choice. In particular, in the process of blocking the spread of harmful information on the Internet, for the auditing work of data circulating on the Internet, deep learning models are gradually replacing manual auditing work as the main auditing tool due to their high-speed and efficient data processing capabilities, greatly improving auditing efficiency and saving labor costs.
[0003] In the decision-making process of existing deep learning models, a softmax loss function is generally used to infer the input data of the model. However, as the depth of the neural network increases, the feature map space output by the deep convolution layer gradually deviates from the feature map space output by the shallow convolution layer, affecting the uncertainty inference result of the softmax loss function in the forward inference process, and further leading to low accuracy of the inference result. SUMMARY
[0004] The embodiments of the present disclosure at least provide a data auditing model updating method, device and electronic equipment, which can improve the forward inference accuracy of the deep learning model.
[0005] The embodiments of the present disclosure provide a data auditing model updating method, which comprises:
[0006] Obtaining a to-be-updated model and a preset input vector, wherein the preset input vector comprises picture data used to train the to-be-updated model and its corresponding auditing label;
[0007] Inputting the preset input vector into the to-be-updated model to determine a shallow feature map and a deep feature map corresponding to the preset input vector;
[0008] Updating the deep feature map according to the shallow feature map, and determining a decision feature operator corresponding to the to-be-updated model according to the updated deep feature map, wherein the decision feature operator is used to describe the decision feature of the preset input vector;
[0009] Determining a loss function corresponding to the to-be-updated model according to the decision feature operator, and updating the to-be-updated model according to the loss function.
[0010] In an optional implementation, the updating the deep feature map according to the shallow feature map specifically comprises:
[0011] determining an associated feature operator between the shallow-level feature map and the deep-level feature map according to the shallow-level feature map and the deep-level feature map, wherein the associated feature operator is used to describe the association between the shallow-level feature map and the deep-level feature map;
[0012] determining an updated deep-level feature map according to a product of the associated feature operator and the deep-level feature map.
[0013] In an optional implementation, the associated feature operator between the shallow-level feature map and the deep-level feature map is determined based on the following method:
[0014] determining a first vector dimension corresponding to the shallow-level feature map and a second vector dimension corresponding to the deep-level feature map;
[0015] determining the associated feature operator according to the first vector dimension, the second vector dimension, the shallow-level feature map and the deep-level feature map.
[0016] In an optional implementation, the decision feature operator corresponding to the to-be-updated model is determined according to the updated deep-level feature map, and specifically includes:
[0017] determining a channel number, a feature map height and a feature map width corresponding to the updated deep-level feature map;
[0018] dividing the updated deep-level feature map into a plurality of sub-feature maps according to the channel number;
[0019] for each of the sub-feature maps, determining a feature mean value corresponding to the sub-feature map according to the feature map height, the feature map width and the sub-feature map;
[0020] determining the decision feature operator according to the sub-feature map, the feature map height, the feature map width and the feature mean value.
[0021] In an optional implementation, after the decision feature operator corresponding to the to-be-updated model is determined according to the updated deep-level feature map, the method further includes:
[0022] obtaining a first hyperparameter and a second hyperparameter corresponding to the to-be-updated model, and performing normalization processing on the decision feature operator according to the first hyperparameter and the second hyperparameter.
[0023] In an optional implementation, the loss function corresponding to the to-be-updated model is determined based on the following method:
[0024] obtain a third hyperparameter corresponding to the to-be-updated model and the audit label;
[0025] determine an updated loss function of the to-be-updated model according to the decision feature operator after normalization processing, the third hyperparameter, the audit label, the preset input vector, and the to-be-updated model.
[0026] In an optional implementation, after the loss function corresponding to the to-be-updated model is determined according to the decision feature operator, and the to-be-updated model is updated according to the loss function, the method further includes:
[0027] obtain to-be-audited data;
[0028] input the to-be-audited data into the updated to-be-updated model, and determine an audit result corresponding to the to-be-audited data.
[0029] The embodiments of the present disclosure further provide an updating device of a data audit model, and the device includes:
[0030] an obtaining module, configured to obtain a to-be-updated model and a preset input vector, wherein the preset input vector includes picture data used for training the to-be-updated model and an audit label corresponding to the picture data;
[0031] a first determining module, configured to input the preset input vector into the to-be-updated model, and determine a shallow-level feature map and a deep-level feature map corresponding to the preset input vector;
[0032] a second determining module, configured to update the deep-level feature map according to the shallow-level feature map, and determine a decision feature operator corresponding to the to-be-updated model according to the updated deep-level feature map, wherein the decision feature operator is used to describe a decision feature of the preset input vector;
[0033] an updating module, configured to determine a loss function corresponding to the to-be-updated model according to the decision feature operator, and update the to-be-updated model according to the loss function.
[0034] In an optional implementation, the first determining module is further configured to:
[0035] determine an association feature operator between the shallow-level feature map and the deep-level feature map according to the shallow-level feature map and the deep-level feature map, wherein the association feature operator is used to describe an association between the shallow-level feature map and the deep-level feature map;
[0036] determine an updated deep-level feature map according to a product of the association feature operator and the deep-level feature map.
[0037] In an alternative implementation, the first determining module is further configured to:
[0038] determine a first vector dimension corresponding to the shallow-level feature map and a second vector dimension corresponding to the deep-level feature map;
[0039] determine the correlation feature operator according to the first vector dimension, the second vector dimension, the shallow-level feature map and the deep-level feature map.
[0040] In an alternative implementation, the second determining module is further configured to:
[0041] determine a channel number, a feature map height and a feature map width corresponding to the updated deep-level feature map;
[0042] divide the updated deep-level feature map into a plurality of sub-feature maps according to the channel number;
[0043] for each of the sub-feature maps, determine a feature mean value corresponding to the sub-feature map according to the feature map height, the feature map width and the sub-feature map;
[0044] determine the decision feature operator according to the sub-feature map, the feature map height, the feature map width and the feature mean value.
[0045] In an alternative implementation, the apparatus further comprises a processing module configured to:
[0046] obtain a first hyper-parameter and a second hyper-parameter corresponding to the to-be-updated model, and perform normalization processing on the decision feature operator according to the first hyper-parameter and the second hyper-parameter.
[0047] In an alternative implementation, the updating module is further configured to:
[0048] obtain a third hyper-parameter and the audit label corresponding to the to-be-updated model;
[0049] determine an updated loss function according to the decision feature operator after normalization processing, the third hyper-parameter, the audit label, the preset input vector and the to-be-updated model.
[0050] In an alternative implementation, the apparatus further comprises an auditing module configured to:
[0051] obtain to-be-audited data;
[0052] input the to-be-audited data into the updated to-be-updated model, and determine an audit result corresponding to the to-be-audited data.
[0053] The embodiment of the present disclosure further provides an electronic device, comprising a processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, the machine readable instructions are executed by the processor to perform the updating method of the data auditing model or the steps in any possible implementation manner of the updating method of the data auditing model.
[0054] The embodiment of the present disclosure further provides a computer readable storage medium, the computer readable storage medium stores a computer program, when the computer program is executed by the processor, the steps of the updating method of the data auditing model or the steps in any possible implementation manner of the updating method of the data auditing model are executed.
[0055] The embodiment of the present disclosure provides an updating method, device and electronic device of a data auditing model, after the feature output layer of the model to be updated, the deep-level feature map output by the deep-level convolution layer and the shallow-level feature map output by the shallow-level convolution layer are associated, the deep-level feature map is updated, the updated deep-level feature map has better forward decision characteristic, and the decision feature operator used for describing the decision feature of the input data is calculated according to the updated deep-level feature map, and the loss function of the model is updated according to the decision feature operator, so that the model can refer to the loss after the decision of the decision feature operator, and pay attention to more valuable data, and the accuracy of the forward inference of the model is improved.
[0056] In order to make the above-mentioned purpose, features and advantages of the present disclosure more obvious and easy to understand, the following preferred embodiments are specifically described below, and the accompanying drawings are described in detail as follows. BRIEF DESCRIPTION OF DRAWINGS
[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following will briefly introduce the drawings needed to be used in the embodiments, the drawings herein are incorporated into the description and form a part of the description, the drawings show the embodiments consistent with the present disclosure, and are used to illustrate the technical solutions of the present disclosure together with the description. It should be understood that the following drawings only show some embodiments of the present disclosure, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of the drawings.
[0058] Figure 1 A flow chart of an updating method of a data auditing model provided by the embodiment of the present disclosure is shown;
[0059] Figure 2 A flow chart of another updating method of a data auditing model provided by the embodiment of the present disclosure is shown;
[0060] Figure 3 FIG. 4 shows a flowchart of another method for updating a data auditing model according to an embodiment of the present disclosure;
[0061] Figure 4 FIG. 5 shows a schematic diagram of an apparatus for updating a data auditing model according to an embodiment of the present disclosure;
[0062] Figure 5 FIG. 6 shows another schematic diagram of an apparatus for updating a data auditing model according to an embodiment of the present disclosure;
[0063] Figure 6 FIG. 7 shows a third schematic diagram of an apparatus for updating a data auditing model according to an embodiment of the present disclosure;
[0064] Figure 7 FIG. 8 shows a schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0065] In order to make the objectives, technical solutions and advantages of the embodiments of the present disclosure clearer, the following will be combined with the accompanying drawings for the embodiments of the present disclosure to make a clear and complete description of the technical solutions of the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. The components of the embodiments of the present disclosure described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed present disclosure, but only represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present disclosure.
[0066] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0067] The term “and / or” herein is only used to describe an associated relationship, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the term “at least one” herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B and C can mean including any one or more elements selected from the set consisting of A, B and C.
[0068] It is found through research that in the decision-making process of existing deep learning models, a softmax loss function is generally used to infer the input data of the model, but as the depth of the neural network increases, the feature map space output by the deep convolutional layer gradually deviates from the feature map space output by the shallow convolutional layer, affecting the uncertainty inference result of the softmax loss function in the process of forward inference, and further leading to low accuracy of the inference result.
[0069] Based on the above research, the present disclosure provides a data auditing model updating method, device and electronic equipment. After the feature output layer of the neural network structure of the model to be updated, the deep-level feature map output by the deep-level convolutional layer and the shallow-level feature map output by the shallow-level convolutional layer are associated, the deep-level feature map is updated, the updated deep-level feature map has better forward decision-making characteristics, and the decision feature operator for describing the decision-making characteristics of the input data is calculated according to the updated deep-level feature map. The loss function of the model is updated according to the decision feature operator. In this way, the model can refer to the loss after the decision of the decision feature operator, pay attention to more valuable data, and improve the accuracy of the forward inference of the model.
[0070] To facilitate the understanding of the present embodiment, first, a data auditing model updating method disclosed by the present embodiment is described in detail. The execution subject of the data auditing model updating method provided by the present embodiment is generally a computer device with certain computing power, which may, for example, include a terminal device or a server or other processing device. The terminal device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementation manners, the data auditing model updating method can be realized by calling computer readable instructions stored in the memory by the processor.
[0071] Referring to Figure 1 The method includes steps S101-S104, wherein:
[0072] S101, obtaining a model to be updated and a preset input vector, wherein the preset input vector includes picture data used to train the model to be updated and its corresponding audit label.
[0073] In this step, the picture data used to train the model to be updated and its corresponding audit label are input to the model to be updated in the form of a vector.
[0074] Here, the model to be updated can be a neural network model for auditing image data, and the picture data for training can be picture data. The content of the audit label can include "normal data" and "violation data".
[0075] The audit label corresponding to the picture data can be manually labeled before being input into the model to be updated.
[0076] S102, input the preset input vector into the model to be updated, and determine the shallow feature map and the deep feature map corresponding to the preset input vector.
[0077] In this step, after the picture data for training the model to be updated and the corresponding audit label are input into the model to be updated in the form of a preset input vector, the shallow feature map corresponding to the preset input vector is output by the shallow convolutional layer after the feature output layer in the neural network structure in the model to be updated, and the deep feature map corresponding to the preset input vector is output by the deep convolutional layer after the shallow convolutional layer.
[0078] Here, as the depth of the neural network gradually increases, the feature map space output by the deep convolutional layer gradually deviates from the feature map space output by the shallow convolutional layer, which leads to uncertain inference results in the process of forward inference of the model and reduces the inference accuracy of the model. Therefore, it is necessary to consider fusing the deep feature map and the shallow feature map to increase the deep and shallow attention of the model and thus increase the accuracy of the forward inference of the model.
[0079] S103, update the deep feature map according to the shallow feature map, and determine the decision feature operator corresponding to the model to be updated according to the updated deep feature map, wherein the decision feature operator is used to describe the decision feature of the preset input vector.
[0080] In this step, by calculating the correlation between the deep feature map and the shallow feature map, the deep feature map and the shallow feature map are fused to obtain a deep feature map with better forward decision, and after the deep feature map is output by the last deep convolutional layer of the neural network structure, the decision feature operator corresponding to the model to be updated is calculated according to the updated deep feature map of the last layer.
[0081] Here, the decision feature operator can describe the decision feature of the preset input vector, which represents the basis for the to-be-updated model to make a judgment on the preset input vector and give an inference result. The stronger the decision feature carried by the preset input vector, the more important the data is as an inference basis in the process of the model making an inference judgment. Conversely, if the decision feature carried by the preset input vector is weaker, it means that the data cannot have a decisive influence on the inference result of the model and is a secondary inference basis.
[0082] In this way, the updated model can reasonably allocate attention during operation according to the decision feature operators corresponding to different preset input vectors, and pay more attention to data with stronger decision features. Instead of uniformly inferring and judging all input data, the model's inference efficiency and accuracy can be improved.
[0083] In a possible implementation, the specific steps of updating the deep-level feature map can include:
[0084] (1) determining an associated feature operator between the shallow-level feature map and the deep-level feature map according to the shallow-level feature map and the deep-level feature map, wherein the associated feature operator is used to describe the association between the shallow-level feature map and the deep-level feature map.
[0085] In this step, the associated feature operator between the shallow-level feature map and the deep-level feature map is calculated according to the deep-level feature map output by the deep-level convolutional layer and the shallow-level feature map output by the shallow-level convolutional layer in the neural network structure of the to-be-updated model.
[0086] Specifically, the associated feature operator between the shallow-level feature map and the deep-level feature map is calculated based on the following formula:
[0087]
[0088] wherein a ij is the associated feature operator; S i is the shallow-level feature map; r j is the deep-level feature map; m represents the dimension of the shallow-level feature map; n represents the dimension of the deep-level feature map; the shallow-level feature map belongs to an m-dimensional vector space; and the deep-level feature map belongs to an n-dimensional vector space.
[0089] Here, first, a first vector dimension corresponding to the shallow-level feature map and a second vector dimension corresponding to the deep-level feature map are determined. The first vector dimension corresponds to the m term in the above formula, and the second vector dimension corresponds to the n term in the above formula. According to the first vector dimension m, the second vector dimension n, the shallow-level feature map Si and the deep feature map r j Determine the associated feature operator α ij .
[0090] (2) Determine the updated deep feature map based on the product of the associated feature operator and the deep feature map.
[0091] Specifically, the updated deep feature map is calculated based on the following formula:
[0092]
[0093] in, For the updated deep feature map; α ij For correlation feature operators; r j This is the deep feature map before the update.
[0094] In this way, by employing a deep and shallow attention mechanism, deep feature maps are fused with shallow feature maps, and the deep feature maps output by the deep convolutional layers of the neural network structure of the model to be updated are updated. This makes the updated deep feature maps more forward decision-making, which can serve as an important decision basis when the model makes forward inference judgments, thus helping to increase the accuracy of the model's forward inference.
[0095] In one possible implementation, the specific steps for determining the decision feature operator corresponding to the model to be updated can be as follows:
[0096] (1) Determine the number of channels, feature map height and feature map width corresponding to the updated deep feature map.
[0097] In this step, we first obtain the number of channels c, feature map height h, and feature map width w of the updated deep feature map output layer of the last deep feature map output layer in the neural network structure of the model to be updated.
[0098] The updated deep feature map belongs to a c×w×h dimensional vector space.
[0099] (2) Based on the number of channels, the updated deep feature map is divided into multiple sub-feature maps.
[0100] In this step, based on the number of channels c corresponding to the updated deep feature map, the updated deep feature map is divided into sub-feature maps a with the number of channels c. i , where sub-feature map a i It belongs to a vector space of dimensions c×w×h, and
[0101] (3) For each of the sub-feature maps, determining a feature mean corresponding to the sub-feature map according to the feature map height, the feature map width, and the sub-feature map.
[0102] Specifically, the feature mean corresponding to the sub-feature map is calculated based on the following formula:
[0103]
[0104] is the feature mean corresponding to the sub-feature map; a ij is the sub-feature map; h is the height of the updated deep-level feature map; and w is the width of the updated deep-level feature map.
[0105] (4) Determining the decision feature operator according to the sub-feature map, the feature map height, the feature map width, and the feature mean.
[0106] In this step, the decision feature operator is calculated according to the sub-feature map a i , the height h of the updated deep-level feature map, and the width w of the updated deep-level feature map.
[0107] Specifically, the decision feature operator is calculated based on the following formula:
[0108]
[0109] i is the decision feature operator; h is the height of the updated deep-level feature map; and w is the width of the updated deep-level feature map.
[0110] S104, determining a loss function corresponding to the to-be-updated model according to the decision feature operator, and updating the to-be-updated model according to the loss function.
[0111] In this step, the loss function in the to-be-updated model is updated according to the decision feature operator calculated in step S103, and the updating process of the to-be-updated model is completed.
[0112] The updating method of the data auditing model provided by the embodiments of the present disclosure associates the deep-level feature map output by the deep-level convolutional layer and the shallow-level feature map output by the shallow-level convolutional layer after the feature output layer of the neural network structure of the to-be-updated model, updates the deep-level feature map, makes the updated deep-level feature map have better forward decision-making characteristics, calculates a decision feature operator for describing the decision features of the input data according to the updated deep-level feature map, and updates the loss function of the model according to the decision feature operator. In this way, the model can refer to the loss after the decision of the decision feature operator, pay attention to more valuable data, and improve the accuracy of the forward inference of the model.
[0113] Referring to Figure 2 As shown in FIG. 13, which is a flowchart of another method for updating a data auditing model according to an embodiment of the present disclosure, the method comprises steps S201-S205, wherein:
[0114] S201, obtaining a model to be updated and a preset input vector, wherein the preset input vector comprises picture data and corresponding auditing labels used for training the model to be updated.
[0115] S202, inputting the preset input vector into the model to be updated to determine a shallow-level feature map and a deep-level feature map corresponding to the preset input vector.
[0116] S203, updating the deep-level feature map according to the shallow-level feature map, and determining a decision feature operator corresponding to the model to be updated according to the updated deep-level feature map, wherein the decision feature operator is used to describe a decision feature of the preset input vector.
[0117] Here, the implementation process of steps S201-S203 is the same as that of steps S101-S103, and the same technical effects can be achieved, which will not be repeated here.
[0118] S204, obtaining a first hyperparameter and a second hyperparameter corresponding to the model to be updated, and performing normalization processing on the decision feature operator according to the first hyperparameter and the second hyperparameter.
[0119] In this step, before updating the loss function in the model to be updated according to the decision feature operator, the decision feature operator needs to be normalized, and the normalized decision feature operator is used as the final decision feature operator value for updating the loss function corresponding to the model to be updated.
[0120] Specifically, the decision feature operator is normalized based on the following formula:
[0121]
[0122] wherein p i is the normalized decision feature operator; a is the first hyperparameter; b is the second hyperparameter; Z i is the decision feature operator before normalization.
[0123] Here, the values of the first hyperparameter and the second hyperparameter can be set according to actual needs, which are not specifically limited here.
[0124] S205, determining a loss function corresponding to the to-be-updated model according to the decision feature operator, and updating the to-be-updated model according to the loss function.
[0125] In a possible implementation, the loss function corresponding to the to-be-updated model is updated based on the following method:
[0126] The third hyperparameter corresponding to the to-be-updated model and the audit label are obtained, and the updated loss function is determined according to the decision feature operator after normalization processing, the third hyperparameter, the audit label, the preset input vector, and the to-be-updated model.
[0127] Here, the audit label is the correct classification or judgment result manually labeled for the picture data in the preset input vector, as a possible implementation, when the to-be-updated model is a neural network model for auditing image data, the audit label can be "normal data 1" and "violation data 0", and the specific form can be set according to actual needs, which is not limited here.
[0128] Wherein, the value of the third hyperparameter can be set according to actual needs, which is not limited here.
[0129] Specifically, the loss function corresponding to the to-be-updated model is updated based on the following formula according to the decision feature operator.
[0130]
[0131] Wherein, L is the updated loss function; h is the height of the updated deep feature map; w is the width of the updated deep feature map; c is the channel number corresponding to the updated deep feature map; y i is the audit label, p i is the decision feature operator after normalization processing; f j is the to-be-updated model; x i is the preset input vector; and θ is the third hyperparameter corresponding to the to-be-input model.
[0132] In this way, the loss of the decision feature operator after the decision feature operator decision, the updated model can refer to the data decision feature described by the decision feature operator, and then the model training is more targeted, and the accuracy of the model forward inference is improved.
[0133] Referring to Figure 3 The flowchart of another method for updating a data auditing model provided by the embodiments of the present disclosure is shown, and the method comprises steps S301-S305, wherein:
[0134] S301, acquire a to-be-updated model and a preset input vector, wherein the preset input vector comprises picture data and a corresponding audit label used for training the to-be-updated model.
[0135] S302, input the preset input vector into the to-be-updated model, and determine a shallow-level feature map and a deep-level feature map corresponding to the preset input vector.
[0136] S303, update the deep-level feature map according to the shallow-level feature map, and determine a decision feature operator corresponding to the to-be-updated model according to the updated deep-level feature map, wherein the decision feature operator is used to describe a decision feature of the preset input vector.
[0137] S304, determine a loss function corresponding to the to-be-updated model according to the decision feature operator, and update the to-be-updated model according to the loss function.
[0138] Here, the implementation process of steps S301-S304 is the same as that of steps S101-S104, and the same technical effects can be achieved, and details are not repeated here.
[0139] S305, acquire to-be-audited data; input the to-be-audited data into the updated to-be-updated model, and determine an audit result corresponding to the to-be-audited data.
[0140] In this step, the model updating method provided by the embodiments of the present application is applied to the field of data auditing. As a possible implementation manner, the to-be-updated model can be an image auditing model used for auditing whether picture data circulating on the Internet is in violation of rules. The to-be-audited data acquired can be picture data. After the model updating process based on steps S301-S304, the picture data to be audited is input into the updated model, the picture data to be audited is inferred and judged by the updated model, and finally an audit result is given: the data is normal or the data is in violation of rules.
[0141] The updating method of the data auditing model provided by the embodiments of the present application is to associate a deep-level feature map output by a deep-level convolutional layer and a shallow-level feature map output by a shallow-level convolutional layer after a feature output layer of a neural network structure of a to-be-updated model, update the deep-level feature map, make the updated deep-level feature map have better forward decision characteristics, calculate a decision feature operator used to describe decision features of input data according to the updated deep-level feature map, and update a loss function of the model according to the decision feature operator. In this way, the model can refer to the loss after the decision by the decision feature operator, pay attention to more valuable data, and improve the accuracy of forward inference of the model.
[0142] Those skilled in the art can understand that the sequence of writing each step in the above method of the specific embodiment does not mean a strict execution sequence and does not constitute any limitation on the implementation process. The specific execution sequence of each step should be determined by its function and possible internal logic.
[0143] Based on the same inventive concept, the disclosure embodiments also provide a data auditing model updating device corresponding to the data auditing model updating method. Since the principle of solving problems in the device of the disclosure embodiments is similar to the above-mentioned data auditing model updating method of the disclosure embodiments, the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be described here.
[0144] Please refer to Figure 4 , Figure 5 and Figure 6 , Figure 4 is one of the schematic diagrams of a data auditing model updating device provided by the disclosure embodiments, Figure 5 is a schematic diagram of a data auditing model updating device provided by the disclosure embodiments, Figure 6 is a schematic diagram of a data auditing model updating device provided by the disclosure embodiments. As shown in Figure 4 , the updating device 400 provided by the disclosure embodiments includes an acquisition module 410, a first determination module 420, a second determination module 430, and an updating module 440.
[0145] The acquisition module 410 is configured to acquire a to-be-updated model and a preset input vector, wherein the preset input vector includes picture data used for training the to-be-updated model and a corresponding auditing label thereof.
[0146] The first determination module 420 is configured to input the preset input vector into the to-be-updated model to determine a shallow-level feature map and a deep-level feature map corresponding to the preset input vector.
[0147] The second determination module 430 is configured to update the deep-level feature map according to the shallow-level feature map, and determine a decision feature operator corresponding to the to-be-updated model according to the updated deep-level feature map, wherein the decision feature operator is used to describe a decision feature of the preset input vector.
[0148] The updating module 440 is configured to determine a loss function corresponding to the to-be-updated model according to the decision feature operator, and update the to-be-updated model according to the loss function.
[0149] Optionally, the first determination module 420 is further configured to:
[0150] According to the shallow-level feature map and the deep-level feature map, a correlation feature operator between the shallow-level feature map and the deep-level feature map is determined, wherein the correlation feature operator is used to describe the correlation between the shallow-level feature map and the deep-level feature map.
[0151] According to a product of the correlation feature operator and the deep-level feature map, an updated deep-level feature map is determined.
[0152] Optionally, the first determining module 420 is further configured to:
[0153] determine a first vector dimension corresponding to the shallow-level feature map and a second vector dimension corresponding to the deep-level feature map;
[0154] According to the first vector dimension, the second vector dimension, the shallow-level feature map and the deep-level feature map, the correlation feature operator is determined.
[0155] Optionally, the second determining module 430 is further configured to:
[0156] determine a channel number, a feature map height and a feature map width corresponding to the updated deep-level feature map;
[0157] According to the channel number, the updated deep-level feature map is divided into a plurality of sub-feature maps;
[0158] For each of the sub-feature maps, according to the feature map height, the feature map width and the sub-feature map, a feature mean value corresponding to the sub-feature map is determined;
[0159] According to the sub-feature map, the feature map height, the feature map width and the feature mean value, the decision feature operator is determined.
[0160] Optionally, the updating module 440 is further configured to:
[0161] obtain a third hyper-parameter corresponding to the to-be-updated model and the audit label;
[0162] According to the decision feature operator after the normalization processing, the third hyper-parameter, the audit label, the preset input vector and the to-be-updated model, an updated loss function is determined.
[0163] Optionally, as shown in the Figure 5 The updating device 400 further includes a processing module 450, which is configured to:
[0164] The first hyperparameter and the second hyperparameter corresponding to the to-be-updated model are obtained, and the decision feature operator is normalized according to the first hyperparameter and the second hyperparameter.
[0165] Optionally, as shown in Figure 6 The updating device 400 further includes an auditing module 460, configured to:
[0166] Obtain to-be-audited data;
[0167] Input the to-be-audited data into the updated to-be-updated model, and determine an auditing result corresponding to the to-be-audited data.
[0168] The processing flow of each module in the device and the interaction flow between the modules can refer to the related description in the above method embodiments, and will not be described in detail here.
[0169] The updating device of the data auditing model provided in the embodiments of the present disclosure associates deep-level feature maps output by a deep-level convolutional layer and shallow-level feature maps output by a shallow-level convolutional layer after a feature output layer of a neural network structure of a to-be-updated model, updates the deep-level feature maps, so that the updated deep-level feature maps have better forward decision-making characteristics, calculates a decision feature operator for describing decision features of input data according to the updated deep-level feature maps, and updates a loss function of the model according to the decision feature operator. In this way, the model can refer to the loss after decision-making by the decision feature operator, and pay attention to more valuable data, thereby improving the accuracy of forward reasoning of the model.
[0170] Corresponding to the data auditing model updating method in Figure 1 The embodiments of the present disclosure further provide an electronic device 700, as shown in Figure 7 The structural schematic diagram of the electronic device 700 provided in the embodiments of the present disclosure includes:
[0171] A processor 71, a memory 72, and a bus 73; the memory 72 is configured to store execution instructions, including an internal memory 721 and an external memory 722; the internal memory 721 is also called an internal memory, and is used to temporarily store operation data in the processor 71 and exchange data with the external memory 722 such as a hard disk; the processor 71 exchanges data with the external memory 722 through the internal memory 721; when the electronic device 700 is running, the processor 71 and the memory 72 communicate through the bus 73, so that the processor 71 executes Figures 1 to 3 the steps of the data auditing model updating method in
[0172] The embodiment of the present disclosure further provides a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program is run by a processor, steps of the method for updating the data auditing model are executed. The storage medium can be a volatile or non-volatile computer readable storage medium.
[0173] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the foregoing method embodiments, and will not be described here. In several embodiments provided by the present disclosure, it should be understood that the disclosed devices and methods can be implemented by other ways. The device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some communication interfaces, devices or units, and can be electrical, mechanical or other forms.
[0174] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0175] In addition, each functional unit in each embodiment of the present disclosure can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.
[0176] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present disclosure essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present disclosure. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0177] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than limit the same. The protection scope of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that any modification or easy-to-think change or equivalent replacement of some technical features of the technical solutions recorded in the foregoing embodiments can be made within the technical range disclosed by the present disclosure by any person skilled in the art. The modification, change or replacement does not make the corresponding technical solution deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims
1. A method for updating a data auditing model, characterized in that, The method includes: Obtain the model to be updated and the preset input vector, wherein the preset input vector includes image data used to train the model to be updated and its corresponding review tags; The preset input vector is input into the model to be updated to determine the shallow feature map and deep feature map corresponding to the preset input vector; The deep feature map is updated based on the shallow feature map, and the decision feature operator corresponding to the model to be updated is determined based on the updated deep feature map, wherein the decision feature operator is used to describe the decision features of the preset input vector. Based on the decision feature operator, determine the loss function corresponding to the model to be updated, update the model to be updated based on the loss function, obtain the data to be reviewed, the data to be reviewed is image data, input the data to be reviewed into the updated model to be updated, and determine the review result corresponding to the data to be reviewed. The step of updating the deep feature map based on the shallow feature map specifically includes: Based on the shallow feature map and the deep feature map, a correlation feature operator is determined between the shallow feature map and the deep feature map, wherein the correlation feature operator is used to describe the correlation between the shallow feature map and the deep feature map; based on the product of the correlation feature operator and the deep feature map, the updated deep feature map is determined. The correlation feature operator between the shallow feature map and the deep feature map is determined based on the following method: Determine the first vector dimension corresponding to the shallow feature map and the second vector dimension corresponding to the deep feature map; determine the correlation feature operator based on the first vector dimension, the second vector dimension, the shallow feature map, and the deep feature map; The step of determining the decision feature operator corresponding to the model to be updated based on the updated deep feature map specifically includes: The updated deep feature map is divided into multiple sub-feature maps based on the number of channels, feature map height, and feature map width. For each sub-feature map, the feature mean is determined based on the feature map height, feature map width, and the sub-feature map itself. The decision feature operator is determined based on the sub-feature map, feature map height, feature map width, and feature mean.
2. The method according to claim 1, characterized in that, After determining the decision feature operator corresponding to the model to be updated based on the updated deep feature map, the method further includes: Obtain the first hyperparameter and the second hyperparameter corresponding to the model to be updated, and perform normalization processing on the decision feature operator based on the first hyperparameter and the second hyperparameter.
3. The method according to claim 1, characterized in that, The loss function corresponding to the model to be updated is determined based on the following method: Obtain the third hyperparameter corresponding to the model to be updated and the review tag; The updated loss function is determined based on the normalized decision feature operator, the third hyperparameter, the audit label, the preset input vector, and the model to be updated.
4. A data auditing model update device, characterized in that, The device includes: The acquisition module is used to acquire the model to be updated and the preset input vector, wherein the preset input vector includes image data used to train the model to be updated and its corresponding review tags; The first determining module is used to input the preset input vector into the model to be updated and determine the shallow feature map and deep feature map corresponding to the preset input vector. The second determining module is used to update the deep feature map according to the shallow feature map, and determine the decision feature operator corresponding to the model to be updated according to the updated deep feature map, wherein the decision feature operator is used to describe the decision features of the preset input vector. The update module is used to determine the loss function corresponding to the model to be updated based on the decision feature operator, update the model to be updated based on the loss function, obtain the data to be reviewed, the data to be reviewed being image data, input the data to be reviewed into the updated model to be updated, and determine the review result corresponding to the data to be reviewed. The first determining module is specifically used to: determine the correlation feature operator between the shallow feature map and the deep feature map based on the shallow feature map and the deep feature map, wherein the correlation feature operator is used to describe the correlation between the shallow feature map and the deep feature map; and determine the updated deep feature map based on the product of the correlation feature operator and the deep feature map. Determine the first vector dimension corresponding to the shallow feature map and the second vector dimension corresponding to the deep feature map; determine the correlation feature operator based on the first vector dimension, the second vector dimension, the shallow feature map, and the deep feature map; The second determining module is specifically used to: determine the number of channels, feature map height, and feature map width corresponding to the updated deep feature map; divide the updated deep feature map into multiple sub-feature maps according to the number of channels; for each sub-feature map, determine the feature mean corresponding to the sub-feature map according to the feature map height, the feature map width, and the sub-feature map; and determine the decision feature operator according to the sub-feature map, the feature map height, the feature map width, and the feature mean.
5. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the data audit model update method as described in any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the data audit model update method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Message detection method and device, network equipment and computer readable storage medium
CN110855632A
Video detection method, video detection device and electronic equipment
CN111383245A