Network model visualization method, device, electronic device and storage medium

By receiving model visualization requests, obtaining and parsing the network parameters and training data of the deep learning network model, and using forward output data and reverse correction gradients to display the network topology in the visualization interface, the problem of determining the location of network model defects is solved, and a reliable basis for model optimization is achieved.

CN113887101BActive Publication Date: 2025-09-23BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111161916.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2025-09-23
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

In complex deep learning network models, it is difficult to quickly and accurately determine where defects exist for optimization.

Method used

By receiving model visualization requests, obtaining network parameters and training data, parsing the network topology, using forward output data and reverse correction gradients to determine the display status of network nodes, and displaying the network topology in the visualization interface, the defect location is intuitively indicated.

Benefits of technology

It can intuitively and accurately indicate the location of defects in the network model, providing a reliable basis for model optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113887101B_ABST
    Figure CN113887101B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device, electronic device and storage medium for visualizing a network model, which relates to the field of computer technology, and in particular to the field of artificial intelligence technology such as big data processing and deep learning. The method comprises: receiving a model visualization request; obtaining network parameters and training data corresponding to the target model according to the identifier of the target model and the data storage address, wherein the training data includes the forward output data and reverse correction gradient of the network node; parsing the network parameters to determine the network topology corresponding to the target model; determining the target display state of the network node according to the training data; and displaying the network topology in a visualization interface according to the target display state of the network node. Thus, by displaying each network node in a targeted manner in the visualization interface, the location of defects in the target model is intuitively and accurately indicated, providing a reliable basis for model optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, in particular to the field of artificial intelligence technologies such as big data processing and deep learning, and specifically to a method, device, electronic device, and storage medium for visualizing a network model. Background Art

[0002] With the continuous development of artificial intelligence technology, the structure of deep learning network models has become increasingly complex, with an increasing number of parameters. When the resulting network model fails to achieve the expected results, it is difficult to quickly and accurately locate the defects from the extensive data to further optimize the network model. Therefore, how to intuitively and accurately locate the defects in the network model has become a key research direction. Summary of the Invention

[0003] The present disclosure provides a method, device, electronic device, and storage medium for visualizing a network model.

[0004] According to a first aspect of the present disclosure, a method for visualizing a network model is provided, comprising:

[0005] receiving a model visualization request, wherein the visualization request includes an identifier of a target model and a corresponding data storage address;

[0006] According to the identifier of the target model and the data storage address, obtaining network parameters and training data corresponding to the target model, wherein the training data includes forward output data and reverse corrected gradients of network nodes of the target model during training;

[0007] Parsing the network parameters to determine the network topology corresponding to the target model;

[0008] determining a target display state of the network node according to the forward output data and the reverse correction gradient of the network node;

[0009] The network topology is displayed in a visualization interface according to the target display status of the network nodes.

[0010] According to a second aspect of the present disclosure, a device for visualizing a network model is provided, comprising:

[0011] A receiving module, configured to receive a model visualization request, wherein the visualization request includes an identifier of a target model and a corresponding data storage address;

[0012] A first acquisition module is configured to acquire network parameters and training data corresponding to the target model according to the identifier of the target model and the data storage address, wherein the training data includes forward output data and reverse corrected gradients of network nodes of the target model during training;

[0013] A first determining module is used to parse the network parameters to determine the network topology corresponding to the target model;

[0014] a second determining module, configured to determine a target display state of the network node according to the forward output data and the reverse correction gradient of the network node;

[0015] The display module is configured to display the network topology in a visual interface according to the target display status of the network nodes.

[0016] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the network model visualization method according to the first aspect.

[0020] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the network model visualization method as described in the first aspect.

[0021] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising computer instructions, which, when executed by a processor, implement the steps of the method for visualizing a network model as described in the first aspect.

[0022] The embodiments of the present disclosure can intuitively and accurately indicate the locations of defects in the target model, providing a reliable basis for model optimization.

[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings are used to better understand the present invention and do not constitute a limitation of the present invention.

[0025] Figure 1 is a flowchart of a method for visualizing a network model provided according to an embodiment of the present disclosure;

[0026] Figure 2 is a flowchart of a method for visualizing a network model according to another embodiment of the present disclosure;

[0027] Figure 2a is an index distribution diagram of a neuron dimension provided according to an embodiment of the present disclosure;

[0028] Figure 3 is a structural diagram of a network model visualization device provided according to an embodiment of the present disclosure;

[0029] Figure 4 is a block diagram of an electronic device for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0031] The embodiments of the present disclosure relate to the fields of artificial intelligence technologies such as big data processing and deep learning.

[0032] Artificial Intelligence (AI) is a new technical science that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence.

[0033] Big data processing technology involves collecting large amounts of data through various channels and using cloud computing to deeply mine and analyze it, ensuring timely identification of patterns and characteristics within the data and summarizing and analyzing its value. Big data technology is crucial for understanding data characteristics and predicting development trends.

[0034] Deep learning involves learning the inherent patterns and representational hierarchies of sample data. The information gained from this learning process is highly helpful in interpreting data such as text, images, and sounds. The ultimate goal of deep learning is to enable machines to have the same analytical and learning capabilities as humans, enabling them to recognize data such as text, images, and sounds.

[0035] Figure 1This is a flowchart of a method for visualizing a network model provided according to an embodiment of the present disclosure.

[0036] It should be noted that the executor of the network model visualization method of this embodiment is a network model visualization device, which can be implemented by software and / or hardware. The device can be configured in an electronic device, which may include but is not limited to a terminal, a server, etc.

[0037] like Figure 1 As shown in Figure 2, the visualization methods of the network model include:

[0038] S101: Receive a model visualization request, wherein the visualization request includes an identifier of a target model and a corresponding data storage address.

[0039] The target model may be a network model that needs to analyze the data in the model and perform visualization. The target model may be a paddle-type network model or an abacus-type network model, and the present disclosure does not limit this.

[0040] The identifier of the target model may be the name of the target model, the storage address of the network parameters, etc., which is not limited in the present disclosure.

[0041] S102: According to the identifier and data storage address of the target model, obtain the network parameters and training data corresponding to the target model, wherein the training data includes the forward output data and reverse correction gradient of the network nodes of the target model during the training process.

[0042] The network parameters may include: names of network nodes included in the target model, parameters of the network nodes, relationships between various network nodes, etc. This disclosure does not limit this.

[0043] Optionally, the data storage address can store all forward output data and reverse corrected gradients for each network node of the target model during training. Random sampling or equal sampling can then be used to retrieve the forward output data and reverse corrected gradients for the target model's network nodes during training from the entire stored training data. This ensures sufficient coverage of the acquired training data while minimizing data processing volume and increasing processing speed.

[0044] For example, the data storage address stores 1,000 pieces of data of the target model during the training process. Then, the 1,000 pieces of data are equally sampled or randomly sampled, and 100 pieces of data are obtained as visualization data of the target model, and so on.

[0045] It should be noted that the above examples are merely illustrative and cannot be used as specific limitations on the training data in the embodiments of the present disclosure.

[0046] S103: Analyze the network parameters to determine the network topology corresponding to the target model.

[0047] Optionally, because different target models correspond to configuration files in different formats, the process of parsing them, obtaining network parameters, and determining the network topology based on the network parameters is also different. Therefore, the network parameter parsing mode can be determined based on the target model type. Then, based on the parsing mode, the network parameters are parsed to determine the associations between various network nodes. Finally, the network topology is generated based on the associations between various network nodes.

[0048] For example, when the target model is of the abacus type, the configuration file corresponding to the target model is first parsed to read the key values ​​of each layer. Then, the key values ​​of the layer are parsed one by one to determine the relationship between each network node. Finally, the network topology is generated based on the relationship between each network node.

[0049] Alternatively, when the target model is of paddle type, the configuration file in the network parameters is first deserialized, and then the file generated after deserialization is parsed, the ops structure in the file blocks is read, and the ops structure is parsed one by one to determine the relationship between each network node. Finally, the network topology is generated based on the relationship between each network node.

[0050] S104: Determine the target display state of the network node according to the forward output data of the network node and the reverse correction gradient.

[0051] The target display state of the network node may include normal display, abnormal display, etc., which is not limited in the present disclosure.

[0052] It is understood that if neither the forward output data nor the reverse corrected gradient of a network node show any abnormalities, the network node is normal and will be displayed normally. If either the forward output data or the reverse corrected gradient of a network node shows any abnormalities, the network node may be abnormal, which may lead to defects in the target model. Therefore, the network node will be displayed abnormally to alert the user to the location of the defect in the target model, allowing the user to optimize the target model in a targeted manner.

[0053] S105: Displaying the network topology in a visualization interface according to the target display status of the network nodes.

[0054] It can be understood that displaying the network topology of the target model in the visual interface and displaying abnormal network nodes in the network topology as abnormalities can enable users to intuitively and quickly identify abnormal network nodes and then correct the network nodes to improve the performance of the target model.

[0055] In the disclosed embodiment, a model visualization request is first received, wherein the visualization request includes the identifier of the target model and the corresponding data storage address. Then, based on the identifier and data storage address of the target model, the network parameters and training data corresponding to the target model are obtained, the network parameters are parsed to determine the network topology corresponding to the target model, and then the target display state of the network node is determined based on the forward output data and reverse correction gradient of the network node. Finally, based on the target display state of the network node, the network topology is displayed in the visualization interface. Thus, the display state of the network node is determined by the forward output data and reverse correction gradient of the network node, and then each network node is displayed in a targeted manner in the visualization interface, thereby intuitively and accurately indicating the location of defects in the target model, providing a reliable basis for model optimization.

[0056] Figure 2 This is a flowchart of a method for visualizing a network model provided according to another embodiment of the present disclosure.

[0057] like Figure 2 As shown in Figure 2, the visualization methods of the network model include:

[0058] S201: Receive a model visualization request, wherein the visualization request includes an identifier of a target model and a corresponding data storage address.

[0059] S202: Obtain network parameters and training data corresponding to the target model according to the identifier of the target model and the data storage address.

[0060] The training data includes the forward output data and reverse correction gradient of the network nodes of the target model during the training process.

[0061] The specific implementation of step 201 and step 202 can be referred to the detailed description in other embodiments of the present disclosure, and will not be described in detail here.

[0062] S203: Analyze the network parameters to determine the network topology corresponding to the target model.

[0063] Optionally, since the functions of various network nodes are different in different types of network models, in the present disclosure, when determining the network topology corresponding to the target model, the network nodes in the target model can be pruned according to the type of the target model, thereby minimizing the amount of data for subsequent network topology and training data processing without affecting the analysis results of the model.

[0064] For example, since the network nodes in the input layer of a Paddle network model are used to read and preprocess sample data, the network nodes in the input layer can be pruned to generate the network topology before determining the network topology corresponding to the target model. This not only reduces redundant network nodes in the network topology, making it more portable, but also reduces the workload during data analysis.

[0065] It is understood that the data corresponding to the pruned input layer network nodes will not be deleted and will remain in the database. This ensures that if an anomaly occurs in a network node in the network topology after the pruning operation and the anomaly is traced back to a network node in the input layer, the data corresponding to the input layer network node can still be retrieved from the database for anomaly analysis.

[0066] Optionally, for abacus type network models, pruning operations may not be performed, and this disclosure does not limit this.

[0067] S204: Determine a data distribution graph corresponding to the network node according to the forward output data and the reverse correction gradient corresponding to the network node.

[0068] Optionally, in the present disclosure, each network node in the target model may be composed of multiple neurons. Therefore, the forward output data of the network node may include the forward output data of each neuron in the network node for each training sample. Thus, the data distribution map corresponding to the network node can be determined based on the forward output data of each neuron for each training sample and the reverse corrected gradient.

[0069] The data distribution diagram may include at least one of the following: deactivation rate, mean, variance, fluctuation distribution diagram of absolute value mean at different times, index distribution diagram of neuron dimension, and numerical distribution diagram of neuron dimension.

[0070] Among them, the mean can be the mean of the forward output data of each neuron in the network node under each training sample; the variance can be the variance of the forward output data of each neuron in the network node under each training sample; the absolute value mean can be the absolute value mean of the forward output data of each neuron in the network node under each training sample.

[0071] The deactivation rate can be the ratio of the number of neurons in a network node that are not activated by a sample to the total number of neurons in the network node.

[0072] It is understandable that, when many training samples pass through the network node, if a certain neuron of the network node has not been activated, it is considered that the neuron is in an inactivated state.

[0073] For example, if a network node consists of 10 neurons, and 2 neurons have never been activated, the deactivation rate of the network node is 0.2.

[0074] It should be noted that the above examples are merely illustrative and cannot be used as specific limitations on the number of neurons in a network node and the deactivation rate in the embodiments of the present disclosure.

[0075] Optionally, the index distribution graph of the neuron dimension may include forward output data corresponding to each neuron in the network node when the sample data passes through the network node.

[0076] For example, if Figure 2a As shown, the network node can contain m+1 neurons, and the index position corresponding to each neuron is 0-m. A total of n sample data pass through the network node. When sample 1 enters the network node, the forward output data corresponding to the neuron with index position 0 is P 01 , the forward output data corresponding to the neuron at index position n is P n1 ; When sample n is input into the network node, the forward output data corresponding to the neuron at index position 2 is P 2n , the forward output data corresponding to the neuron at index position 5 is P 5n etc.

[0077] Optionally, the specific steps of determining the numerical distribution map of neuron dimensions may include:

[0078] (1) Determine the data distribution interval based on the maximum and minimum values ​​of the forward output data of each neuron in the network node.

[0079] (2) Divide the data distribution interval into N subintervals, where N is a positive integer greater than 1.

[0080] (3) Based on the forward output data of each neuron, determine the number of neurons that fall within each subinterval.

[0081] (4) According to the number of neurons falling in each subinterval, determine the numerical distribution map of the neuron dimension corresponding to the network node.

[0082] It is understood that the numerical distribution graph can reflect the distribution of the forward output data of each neuron in the network node. For example, if the numerical distribution graph shows a normal distribution, it indicates that the forward output data of the network node is normal. Alternatively, if the numerical distribution graph is a straight line, it means that the forward output data of each neuron is concentrated in a certain sub-interval, which indicates that the sample data is relatively simple and lacks diversity, or the number of neurons in the network node is set too high. Alternatively, if the numerical distribution graph shows multiple fluctuations, it indicates that the network node is a node that can be optimized.

[0083] S205: Determine a target display state of the network node according to the data distribution graph corresponding to the network node.

[0084] Optionally, when the data distribution graph matches any abnormal condition, the target display state of the network node is determined to be abnormal display.

[0085] Optionally, the data distribution graph matching any abnormal condition may include at least one of the following:

[0086] At least one distribution value in the data distribution graph is greater than a first threshold;

[0087] At least one distribution value in the data distribution graph is smaller than a second threshold; and

[0088] The difference between the distribution values ​​in the data distribution graph is greater than a third threshold.

[0089] Optionally, determining whether a network node is abnormal may include: directly hitting an abnormality, possibly hitting an abnormality, and associated abnormality.

[0090] A direct anomaly hit can mean that any distribution value in any distribution graph of the network node, such as the deactivation rate, mean, variance, or absolute mean, is greater than a first threshold, or less than a second threshold. For example, if the forward output data of a neuron in the index distribution graph of any network node is abnormally large or small, the node is considered an anomaly.

[0091] Optionally, an anomaly may be detected if the difference between the distribution values ​​in the data distribution graph is greater than a third threshold. For example, in a fluctuation distribution graph, the inactivation rate, mean, variance, or absolute mean value of each time period fluctuates significantly; or the difference between neurons is greater than a third threshold; or the value distribution graph does not follow a normal distribution, etc., and the network node is judged to be an anomaly.

[0092] A chain anomaly can be caused by anomalies in other network nodes in the network topology, leading to an anomaly in the current network node. For example, if network node A is currently anomaly, using the network topology anomaly tracing method, it is determined that the anomaly in network node A is caused by network node B. After repairing network node B, network node A returns to normal. In this case, network node A is considered to be a chain anomaly.

[0093] Optionally, when the data distribution graph does not match any abnormal condition, it is determined that the target display state of the network node is normal display.

[0094] S206: Displaying the network topology in the visualization interface according to the target display status of the network nodes.

[0095] The specific implementation of step S206 can refer to the detailed descriptions in other embodiments of the present disclosure and will not be described in detail here.

[0096] S207: In response to receiving a selection operation for any network node, displaying an output data distribution graph and a reverse gradient distribution graph corresponding to any network node in a visualization interface.

[0097] It can be understood that when any network node is selected, the output data distribution graph and reverse gradient distribution graph corresponding to the network node are displayed in the visualization interface, which helps users to quickly and intuitively obtain the data of the network node, and then determine the cause of the abnormality of the network node and repair the target model in a targeted manner.

[0098] In the disclosed embodiment, the network topology corresponding to the target model and the data distribution graph corresponding to each network node are first determined based on the network parameters and training data corresponding to the target model. Then, the target display state of the network node is determined based on the data distribution graph. Finally, the abnormal situation of each network node in the network topology is displayed in the visualization interface, and when any network node is selected, the output data distribution graph and reverse gradient distribution graph corresponding to any network node are displayed. Thus, by displaying the abnormal situation of each network node in the network topology and the output data distribution graph and reverse gradient distribution graph corresponding to the network node in the visualization interface, the user can not only intuitively and accurately determine the location of the defect in the target model from the visualization interface, but also further analyze the cause of the defect and repair the target model in a targeted manner.

[0099] Figure 3 FIG. 1 is a schematic diagram of a network model visualization device according to an embodiment of the present disclosure. Figure 3As shown, the network model visualization device 300 includes: a receiving module 310 , a first obtaining module 320 , a first determining module 330 , a second determining module 340 , and a display module 350 .

[0100] The receiving module 310 is configured to receive a model visualization request, wherein the visualization request includes an identifier of the target model and a corresponding data storage address;

[0101] A first acquisition module 320 is configured to acquire network parameters and training data corresponding to the target model according to the identifier of the target model and the data storage address, wherein the training data includes forward output data and reverse corrected gradients of network nodes of the target model during training;

[0102] A first determination module 330 is configured to analyze network parameters to determine a network topology corresponding to a target model;

[0103] A second determination module 340 is configured to determine a target display state of the network node based on the forward output data of the network node and the reverse correction gradient;

[0104] The display module 350 is configured to display the network topology in a visual interface according to the target display status of the network nodes.

[0105] Optionally, the second determining module 340 includes:

[0106] A first determining unit is configured to determine a data distribution graph corresponding to a network node according to the forward output data and the reverse correction gradient corresponding to the network node;

[0107] The second determining unit is configured to determine a target display state of the network node according to a data distribution graph corresponding to the network node.

[0108] Optionally, the forward output data of the network node includes forward output data of each neuron in the network node under each training sample. The first determining unit is specifically configured to:

[0109] Determine the data distribution interval based on the maximum and minimum values ​​of the forward output data of each neuron in the network node;

[0110] Divide the data distribution interval into N subintervals, where N is a positive integer greater than 1;

[0111] According to the forward output data of each neuron, the number of neurons falling into each subinterval is determined;

[0112] According to the number of neurons falling in each subinterval, the numerical distribution map of the neuron dimension corresponding to the network node is determined.

[0113] Optionally, the forward output data of the network node includes forward output data of each neuron in the network node under each training sample. The first determining unit is specifically configured to:

[0114] According to the forward output data and reverse corrected gradient of each neuron under each training sample, the data distribution map corresponding to the network node is determined, wherein the data distribution map includes at least one of the following items: deactivation rate, mean, variance, fluctuation distribution map of absolute value mean at different times, index distribution map of neuron dimension, and numerical distribution map of neuron dimension.

[0115] Optionally, the second determining module 340 is specifically configured to:

[0116] In the case where the data distribution graph matches any abnormal condition, determining the network node target display state as abnormal display;

[0117] In the case that the data distribution graph does not match any of the abnormal conditions, it is determined that the target display state of the network node is normal display.

[0118] Optionally, the data distribution graph matches any abnormal condition including at least one of the following:

[0119] At least one distribution value in the data distribution graph is greater than a first threshold;

[0120] At least one distribution value in the data distribution graph is smaller than a second threshold; and

[0121] The difference between the distribution values ​​in the data distribution graph is greater than a third threshold.

[0122] Optionally, the display module 350 is further configured to:

[0123] In response to receiving a selection operation for any network node, an output data distribution graph and a reverse gradient distribution graph corresponding to any network node are displayed in a visualization interface.

[0124] Optionally, the first determining module 330 is specifically configured to:

[0125] Determine the parsing mode of network parameters according to the type of target model;

[0126] Based on the analysis mode, the network parameters are analyzed to determine the relationship between each network node;

[0127] Generate network topology based on the association relationship between each network node.

[0128] It should be noted that the above explanation of the method for visualizing a network model is also applicable to the apparatus for visualizing a network model in this embodiment, and will not be repeated here.

[0129] The device 300 in the embodiment of the present disclosure first receives a model visualization request, wherein the visualization request includes the identifier of the target model and the corresponding data storage address. Then, based on the identifier and data storage address of the target model, the network parameters and training data corresponding to the target model are obtained, the network parameters are parsed to determine the network topology corresponding to the target model, and then the target display state of the network node is determined based on the forward output data and reverse correction gradient of the network node. Finally, based on the target display state of the network node, the network topology is displayed in a visualization interface. Thus, the display state of the network node is determined by the forward output data and reverse correction gradient of the network node, and then each network node is displayed in a targeted manner in the visualization interface, thereby intuitively and accurately indicating the location of defects in the target model, providing a reliable basis for model optimization.

[0130] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0131] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0132] like Figure 4 As shown, the device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. Various programs and data required for the operation of the device 400 can also be stored in the RAM 403. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0133] Various components in device 400 are connected to I / O interface 405, including an input unit 406, such as a keyboard, mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a magnetic disk, optical disk, etc.; and a communication unit 409, such as a network card, modem, wireless communication transceiver, etc. Communication unit 409 allows device 400 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0134] The computing unit 401 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as the network model visualization method. For example, in some embodiments, the network model visualization method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the computing unit 401, one or more steps of the network model visualization method described above can be performed. Alternatively, in other embodiments, the computing unit 401 can be configured to perform the network model visualization method by any other appropriate means (e.g., by means of firmware).

[0135] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0136] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0137] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0138] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0139] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0140] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. This client-server relationship is established by computer programs running on the respective computers, establishing a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and VPS services ("Virtual Private Servers" or simply "VPS"). The server may also be a server in a distributed system or a server integrated with blockchain.

[0141] In this embodiment, a model visualization request is first received, wherein the visualization request includes the identifier of the target model and the corresponding data storage address. Then, based on the identifier and data storage address of the target model, the network parameters and training data corresponding to the target model are obtained, the network parameters are parsed to determine the network topology corresponding to the target model, and the target display state of the network node is determined based on the forward output data and reverse correction gradient of the network node. Finally, based on the target display state of the network node, the network topology is displayed in a visualization interface. Thus, the display state of the network node is determined based on the forward output data and reverse correction gradient of the network node, and then each network node is displayed in a targeted manner in the visualization interface, thereby intuitively and accurately indicating the location of defects in the target model, providing a reliable basis for model optimization.

[0142] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.

[0143] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A method for visualizing a network model, comprising: receiving a model visualization request, wherein the visualization request includes an identifier of a target model and a corresponding data storage address; According to the identifier of the target model and the data storage address, obtaining network parameters and training data corresponding to the target model, wherein the training data includes forward output data and reverse corrected gradients of network nodes of the target model during training; Parsing the network parameters to determine the network topology corresponding to the target model; Determine a data distribution graph corresponding to the network node based on the forward output data and the reverse corrected gradient corresponding to the network node, respectively. The forward output data of the network node includes the forward output data of each neuron in the network node under each training sample. The data distribution graph includes at least one of the following: a deactivation rate, a mean, a variance, a fluctuation distribution graph of the absolute value mean at different times, an index distribution graph of the neuron dimension, and a numerical distribution graph of the neuron dimension. In the case where the data distribution graph matches any abnormal condition, determining that the target display state of the network node is an abnormal display; In the case that the data distribution graph does not match any of the abnormal conditions, determining that the target display state of the network node is a normal display; The network topology is displayed in a visualization interface according to the target display status of the network nodes.

2. The method according to claim 1, wherein The forward output data of the network node includes the forward output data of each neuron in the network node under each training sample, and determining the data distribution graph corresponding to the network node includes: Determining a data distribution interval based on the maximum and minimum values ​​of the forward output data of each neuron in the network node; Divide the data distribution interval into N subintervals, where N is a positive integer greater than 1; Determining the number of neurons falling within each subinterval based on the forward output data of each neuron; According to the number of neurons falling within each subinterval, a numerical distribution diagram of the neuron dimension corresponding to the network node is determined.

3. The method according to claim 1, wherein The forward output data of the network node includes the forward output data of each neuron in the network node under each training sample, and determining the data distribution graph corresponding to the network node includes: According to the forward output data and reverse correction gradient of each neuron under each training sample, the data distribution map corresponding to the network node is determined.

4. The method according to claim 1, wherein The data distribution graph matches any abnormal condition, including at least one of the following: At least one distribution value in the data distribution graph is greater than a first threshold; At least one distribution value in the data distribution graph is smaller than a second threshold; and The difference between the distribution values ​​in the data distribution graph is greater than a third threshold.

5. The method according to any one of claims 1 to 4, wherein: After displaying the network topology, the method further includes: In response to receiving a selection operation for any network node, an output data distribution graph and a reverse gradient distribution graph corresponding to the any network node are displayed in the visualization interface.

6. The method according to any one of claims 1 to 4, wherein: The parsing of the network parameters to determine the network topology corresponding to the target model includes: Determining a parsing mode for the network parameters according to the type of the target model; parsing the data based on the parsing mode to determine the association relationship between the network nodes; The network topology is generated according to the association relationship between the various network nodes.

7. A network model visualization device, comprising: A receiving module, configured to receive a model visualization request, wherein the visualization request includes an identifier of a target model and a corresponding data storage address; A first acquisition module is configured to acquire network parameters and training data corresponding to the target model according to the identifier of the target model and the data storage address, wherein the training data includes forward output data and reverse corrected gradients of network nodes of the target model during training; A first determining module is used to parse the network parameters to determine the network topology corresponding to the target model; The second determination module includes: a first determination unit, configured to determine a data distribution graph corresponding to the network node based on the forward output data and the reverse corrected gradient corresponding to the network node, respectively, wherein the forward output data of the network node includes the forward output data of each neuron in the network node under each training sample, wherein the data distribution graph includes at least one of the following: a deactivation rate, a mean, a variance, a fluctuation distribution graph of the absolute value mean at different times, an index distribution graph of the neuron dimension, and a numerical distribution graph of the neuron dimension; a second determining unit, configured to determine that the target display state of the network node is an abnormal display if the data distribution graph matches any abnormal condition; In the case that the data distribution graph does not match any of the abnormal conditions, determining that the target display state of the network node is a normal display; The display module is configured to display the network topology in a visual interface according to the target display status of the network nodes.

8. The device according to claim 7, wherein The forward output data of the network node includes the forward output data of each neuron in the network node under each training sample, and the first determining unit is specifically configured to: Determining a data distribution interval based on the maximum and minimum values ​​of the forward output data of each neuron in the network node; Divide the data distribution interval into N subintervals, where N is a positive integer greater than 1; Determining the number of neurons falling within each subinterval based on the forward output data of each neuron; According to the number of neurons falling within each subinterval, a numerical distribution diagram of the neuron dimension corresponding to the network node is determined.

9. The device according to claim 7, wherein The forward output data of the network node includes the forward output data of each neuron in the network node under each training sample, and the first determining unit is specifically configured to: According to the forward output data and reverse correction gradient of each neuron under each training sample, the data distribution map corresponding to the network node is determined.

10. The device according to claim 7, wherein The data distribution graph matches any abnormal condition, including at least one of the following: At least one distribution value in the data distribution graph is greater than a first threshold; At least one distribution value in the data distribution graph is smaller than a second threshold; and The difference between the distribution values ​​in the data distribution graph is greater than a third threshold.

11. The device according to any one of claims 7 to 10, wherein: The display module is further specifically used for: In response to receiving a selection operation for any network node, an output data distribution graph and a reverse gradient distribution graph corresponding to the any network node are displayed in the visualization interface.

12. The device according to any one of claims 7 to 10, wherein: The first determining module is specifically configured to: Determining a parsing mode for the network parameters according to the type of the target model; Parsing the network parameters based on the parsing mode to determine the association relationship between the various network nodes; The network topology is generated according to the association relationship between the various network nodes.

13. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.

15. A computer program product comprising computer instructions, wherein when the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Depth neural network interpretability-oriented visual analysis system

    CN112884021A