WO2023217127A1 - 一种因果关系确定方法及相关设备 - Google Patents

一种因果关系确定方法及相关设备 Download PDF

Info

Publication number
WO2023217127A1
WO2023217127A1 PCT/CN2023/092961 CN2023092961W WO2023217127A1 WO 2023217127 A1 WO2023217127 A1 WO 2023217127A1 CN 2023092961 W CN2023092961 W CN 2023092961W WO 2023217127 A1 WO2023217127 A1 WO 2023217127A1
Authority
WO
WIPO (PCT)
Prior art keywords
variable
information
neural network
causal relationship
variables
Prior art date
Application number
PCT/CN2023/092961
Other languages
English (en)
French (fr)
Inventor
李银川
邵云峰
李文倩
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023217127A1 publication Critical patent/WO2023217127A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of artificial intelligence, and in particular to a causal relationship determination method and related equipment.
  • Causality or causation is the relationship between one variable (i.e. "cause") and a second variable (i.e. "effect"), where the latter variable is considered to be the result of the previous variable.
  • the identification of causal relationships between variables in the data set is based on reinforcement learning.
  • This technology uses reinforcement learning to search for the highest-scoring causal sequence.
  • This technology first encodes the data set and encodes each column into a state. At this time, the order of all states is random, and then uses the Markov chain to determine the order for decoding to generate an action sequence (a 0 ,a 1 ,..., a T ), this sequence corresponds to a certain causal sequence, and the graph corresponding to each causal sequence can be constrained to be a directed acyclic graph through the directed acyclic constraint function. That is to say, the existing technology traverses a large number of causal sequences and selects a more accurate causal relationship based on the scores of each causal sequence. In order to obtain a more accurate causal relationship, a large number of causal sequences need to be traversed. As the search space (that is, the amount of data and the number of variables) increases, greater computing power consumption and running time consumption are required.
  • This application provides a causal relationship determination method that can reduce computing power overhead and improve the convergence speed of the model.
  • this application provides a method for determining causality.
  • the method includes: obtaining first information of multiple variables.
  • the first information can be used to perform causality on multiple variables of the data set for the first neural network in the generative flow model.
  • An intermediate output of relationship prediction, the first information indicates the causal relationship between multiple variables; according to the first information, the second information of multiple variables is predicted through the first neural network in the generative flow model; where, the second information Indicates that there is a first causal relationship between the first variable and the second variable among the plurality of variables; the first information indicates that there is no first causal relationship between the first variable and the second variable, and the first variable and the second variable are different,
  • the second information is equivalent to another causal relationship predicted based on the first information, and the second information contains richer causal relationships than the first information.
  • the data set (including multiple data) to be identified can be obtained, and the data set (or multiple variables in the data set) can be input
  • a model used to determine causality such as the generative flow model in the embodiment of the present application (also called a flow-based generative flow model or a generative model)
  • the generative flow model can generate multiple Predict the causal relationship between multiple variables at one time.
  • the next causal relationship can be predicted based on the causal relationship predicted last time.
  • the results of the "next" causal relationship prediction include the "last" causal relationship.
  • the causal relationship exists in the prediction, and also includes the causal relationship between a newly predicted variable pair, until the predicted result meets the termination condition of an iteration.
  • the first neural network predicts the next causal relationship based on the causal relationship predicted in an iterative process.
  • the above-mentioned "causal relationship of a certain prediction" can be the first information
  • the first neural network can input the first information (or the embedded representation corresponding to the first information) into the first neural network based on the first information.
  • the second information includes a greater number of variable pairs with causal relationships (for example, one more, or more than one more).
  • the causal relationship of multiple variables may include the causal relationship of each variable pair among the multiple variables, and the variable pair may be composed of two variables.
  • the causal relationship of a variable pair can be understood as the causal relationship between the variables included in the variable pair.
  • variable A serves as the dependent variable of variable B
  • variable B serves as the dependent variable of variable A. result variable. That is, when other conditions remain unchanged, changes in variable A will lead to changes in variable B.
  • the first information may indicate a direct causal relationship between variables or an indirect causal relationship between variables.
  • the first information may indicate that variable A causes variable B, and variable B causes variable C.
  • the first information may be based on the direct causal relationship of "variable A causes variable B, and variable B causes variable C" to obtain: variable A
  • variable A causes variable B
  • variable B causes variable C
  • variable A causes variable A causes variable B
  • variable B causes variable C
  • variable A causes variable A
  • the indirect causal relationship leading to variable C is equivalent to the first information also indicating that variable A leads to variable C.
  • the indirect causal relationship between variables can be understood as one variable being the ancestor node (indirectly connected parent node) of another variable.
  • the generative flow model in the embodiment of the present application does not directly sample multiple candidate causal relationships, and then selects the better one from the multiple candidate causal relationships. Instead, through sequence generation, in each iteration During the process, causal relationships between multiple variables are generated sequentially. Each generation is based on the previous generation result, and as the causal relationship generation process proceeds, the causal relationships are continuously enriched.
  • This embodiment uses sequence generation to identify causal relationships between variables. With the iterative update of the generative flow model, the generative flow model can be equipped with the ability to generate better causal relationship sequences without the need to sample a large number of causal sequences. Selecting the better one from multiple causal sequences can reduce computing power overhead and improve the convergence speed of the model.
  • the first information indicates that there is a causal relationship between X pairs of variables among the multiple variables
  • the second information indicates that there is a causal relationship between X+1 pairs of variables, where X+1 variables For X variable pairs and a variable pair consisting of the first variable and the second variable, X is a positive integer. That is to say, the second information will contain the causal relationship indicated by the first information and the newly predicted causal relationship (first causal relationship).
  • variable can be a feature of the data.
  • the variable can be a feature dimension of the image data, for example, it can be a certain semantics in the image, such as the ear area, glasses area, etc. in the image including a portrait, or it can also be a pixel in the image. Channels, such as R channel, G channel, B channel, etc.
  • the data of the variable can be the data of the image data in the feature dimension, such as the pixel value of the ear area in the portrait image, the pixel value of the glasses area, etc., or it can also be the pixel value of the R channel and G channel of the image. pixel value, pixel value of B channel, etc.
  • the variable can be a certain type of local fragment of the chip, and the data of the variable can be the image of a certain type of local fragment of the chip.
  • the variable can be a characteristic dimension of the text data, for example, it can be a root cause of a fault.
  • it can be the KPI of the communication network, the node called by the computer transaction.
  • the data of the variable can be the specific value of the KPI of the communication network, the information of the node called by the computer transaction, etc.
  • the variables can be the attribute information of the item, the attribute information of the user, the user's operation behavior, etc.
  • variable can also be a characteristic dimension of audio data, a characteristic dimension of video data, and so on.
  • predicting the second information of the plurality of data according to the first information by generating a first neural network in the flow model includes: according to the first information, by generating a first neural network in the flow model , obtain the probability of a causal relationship for each of the multiple variable pairs; based on the highest probability of the first causal relationship for the variable pair consisting of the first data and the second data among the multiple variable pairs, obtain the second information. That is to say, the first neural network can select a variable pair from multiple variable pairs composed of multiple variables (the multiple variable pairs have no causal relationship in the first information), and the selected variable pair can be used in the second There is a causal relationship in the information.
  • a causal relationship can be selected based on certain constraint rules. variable pair. Or even if the selected variable pair can make the graph corresponding to the second information a directed cyclic graph, the second information will not be used.
  • the target constraint can be obtained based on the first information; where the target constraint is used to constrain that multiple variable pairs in the second information do not have a causal relationship; each variable is represented as a node in the graph, as The node where the variable of the dependent variable is located points to the node where the variable of the effect variable is located; the target constraint is used to constrain the graph corresponding to the second information to be a directed acyclic graph.
  • the second information of multiple variables can be predicted by generating the first neural network in the flow model according to the first information and the target constraints.
  • the first neural network's selection of variable pairs can be constrained, so that the causal relationship added in the second information will not cause the graph corresponding to the second information to become a directed cyclic graph.
  • the plurality of variable pairs include a target variable pair, and the target variable pair includes a third variable and a fourth variable. It should be understood that the target variable pair can be any variable pair that cannot have a causal relationship in any second information indicated in the target constraint.
  • the target constraint constrains the second information indicating that the third variable does not as the effect variable of the fourth variable, and the fourth variable does not serve as the dependent variable of the third variable.
  • the first information may indicate that there is a direct causal relationship between the third variable and the fourth variable, and the first information may also indicate that there is an indirect causal relationship between the third variable and the fourth variable.
  • the second information will not appear in a loop that is opposite to the causal relationship that appears in the first information.
  • any one variable and at least one of the plurality of variables can be indicated based on the second information.
  • the second information is the termination node.
  • whether the terminal node is reached can be determined based on the adjacency matrix of the transitive closure calculated above. For example, when the adjacency matrix of the transitive closure can help identify a unique topological sequence, the terminal node is reached.
  • the difference between the input flow and the output flow of each intermediate state for example, the first information
  • difference minimization the difference between the input flow and the reward value of the termination node
  • the generative flow model can be updated according to this loss function, so that the generative flow model can gradually have the ability to find more accurate causal relationships between multiple variables.
  • the generative flow model can use the causal relationship between multiple variables as the state of the node, and transfer the state in sequence.
  • the intermediate state can be obtained based on the state of each node.
  • the updated generative flow model can repeatedly use the causal relationship between multiple variables as the state of the node, and transfer the states in sequence to construct a loss function, and update the generative flow model multiple times until the generative flow model converges.
  • the converged generative flow model can use the causal relationship between multiple variables as the state of the node, and transfer the state in sequence.
  • the causal relationship represented by the state of the termination node can be used as the causal relationship of multiple variables and output.
  • the first input flow of the first information (for example, the first information (for example, the embedding representation of the first information) can be obtained by generating a second neural network in the flow model based on the first information) ) is input into the second neural network; or the parent node related to the first information (for example, the embedded representation of the parent node) is input into the second neural network); according to the first information, by generating the third node in the flow model
  • the neural network obtains the first output flow of the first information; wherein the difference between the first input flow and the first output flow is used to obtain the loss function; according to the loss function, the first neural network, the second neural network and the third neural network are updated.
  • a plurality of third information (that is, the parent node of the first information) can be obtained based on the first information, where the first information indicates that M variable pairs among the plurality of variables have a causal relationship, Each third information indicates that there is a causal relationship between partial group variables in the M variable pairs; M is a positive integer greater than 1.
  • each third information can serve as a parent node of the first information.
  • the first input flow of the plurality of third information can be obtained according to the plurality of third information through the second neural network in the generated flow model; wherein, the embedded representation of each third information can be obtained according to the plurality of third information, And input the embedded representation of each third information into the second neural network to obtain the input flow of each third information.
  • the sum of the input flow of each third information can be the first input of the plurality of third information. Traffic, the first input traffic can be understood as the traffic input to the first information.
  • the first output flow of the first information can be obtained according to the first information through the third neural network in the generated flow model; wherein, the embedded representation of the first information can be obtained according to the first information, And input the embedded representation of the first information into the third neural network to obtain the output flow of the first information.
  • the difference between the first input flow and the first output flow (for example, minimizing the difference) is used to construct a loss function, and then the first neural network, the second neural network, and the like can be updated according to the loss function.
  • the third neural network is used to construct a loss function, and then the first neural network, the second neural network, and the like can be updated according to the loss function.
  • the input flow and reward value of the second information can be calculated, and based on the difference between the input flow and the reward value degree to construct the loss function.
  • the second input flow of the second information can be obtained according to the second information through the second neural network in the generated flow model; according to the second information, through the third neural network in the generated flow model , obtain the first reward value of the second information; wherein the difference between the second input flow and the first reward value is used to construct a loss function; according to the loss function, the first neural network, the second neural network and the third neural network are updated .
  • a plurality of fourth information can be obtained according to the first information, wherein the second information indicates that there is a causal relationship between the variables of the N variable pairs, and each fourth information indicates that there is a causal relationship between the N variable pairs.
  • N is a positive integer greater than 1;
  • the second input flow of the plurality of fourth information is obtained through the second neural network in the generative flow model.
  • the calculation of the input flow rate of the second information reference may be made to the calculation of the input flow rate of the first information in the above description, which will not be described again here.
  • the first reward value of the second information can be obtained according to the second information, and the first reward value represents the consistency between the second information and the joint distribution of the data set of multiple variables; wherein, the second The difference between the input flow and the first reward value is used to construct a loss function; according to the loss function, the first neural network, the second neural network and the third neural network are updated.
  • the target constraint that can ensure that the second information is a directed acyclic graph may not be used. Therefore, the second information may It will become a directed cyclic graph or other graph that does not meet the requirements.
  • the first neural network when the first neural network predicts the second information based on the first information, data pairs with causal relationships can be predicted from the variable pairs indicating that there is no causal relationship in the first information, to obtain Second information, if the second information is a directed acyclic graph and does not meet the above-mentioned termination node conditions based on the target constraints, the first neural network can continue to predict the causal relationship of multiple variables based on the second information.
  • the second information is a directed cyclic graph or other graph that does not meet the requirements, the second information can be considered as the termination node and the current iteration ends, and the generated flow model is updated with the constructed loss.
  • multiple third information can be obtained according to the first information, where the first information indicates M variables among the multiple variables. There is a causal relationship between pairs, and each third information indicates that there is a causal relationship between partial group variables in the M variable pairs; M is a positive integer greater than 1; according to multiple third information, through the second neural network in the generative flow model
  • the network obtains a first input flow of a plurality of third information, and obtains a second reward value of the first information based on the first information.
  • the second reward value represents the degree of consistency between the first information and the joint distribution of the data set of multiple variables.
  • the loss function can then update the first neural network, the second neural network and the third neural network according to the loss function.
  • multiple fourth information can be obtained according to the second information, where the third information indicates N variables among the multiple variables. There is a causal relationship between pairs, and each fourth information indicates that there is a causal relationship between partial group variables in the N variable pairs; N is a positive integer greater than 1;
  • the second input flow of the plurality of fourth information is obtained through the second neural network in the generated flow model;
  • the first reward value of the second information is obtained, and the first reward value represents The consistency between the second information and the joint distribution of the data set of multiple variables; wherein, the difference between the second input flow and the first reward value is used to construct a loss function; according to the loss function, update the first neural network, the second neural network network as well as a third neural network.
  • this application provides a method for determining causality, which includes:
  • the first information indicates the causal relationship between the multiple variables.
  • the variables include the user's operation type and at least one target variable.
  • the target variable is at least one of the following:
  • the attribute information of the item and the attribute information of the user are the attribute information of the item and the attribute information of the user.
  • the second information of multiple variables is predicted through the first neural network in the generative flow model;
  • the second information indicates that there is a first causal relationship between the first variable and the second variable among the plurality of variables; the first information indicates that there is no first causal relationship between the first variable and the second variable, and the first variable and the second variable
  • the variables are different.
  • the user's attribute information includes at least one of the following: gender, age, occupation, income, hobbies, and education level.
  • the attribute information of the item includes at least one of the following: item name, developer, installation package size, category, and favorable rating.
  • the user's attribute information may be attributes related to the user's preference characteristics, including at least one of gender, age, occupation, income, hobbies, and educational level.
  • the gender may be male or female, and the age may be 0-100.
  • the number between, the occupation can be teachers, programmers, chefs, etc.
  • the hobbies can be basketball, tennis, running, etc.
  • the education level can be elementary school, junior high school, high school, university, etc.; this application does not limit the user's The specific type of attribute information;
  • the items can be physical items or virtual items, such as APP, audio and video, web pages, news information, etc.
  • the attribute information of the item can be the item name, developer, installation package size, category, and praise rating. At least one.
  • the category of the item can be chatting, parkour games, office, etc., and the favorable rating can be ratings, comments, etc. for the item; this application is not limited to The specific type of attribute information of the item;
  • the operation type can be the user's behavior operation type for items.
  • items On network platforms and applications, users often have various forms of interaction with items (that is, there are multiple operation types), such as user behavior on e-commerce platforms.
  • the types of operations such as browsing, clicking, adding to shopping cart, and purchasing.
  • causal relationship between multiple variables finally obtained by generating the flow model may include a causal relationship between at least one target variable and the user's operation type.
  • this application provides a method for determining causality, which includes:
  • the first information indicates the causal relationship between the multiple variables, and the variables include attribute information of the target object;
  • the target object is a chip, and the attribute information is a partial fragment or fault information of the chip; or,
  • the target object is the node of the communication network, and the target variable is the key performance indicator KPI, operating data or report of the network element. Alert information;
  • the second information of multiple variables is predicted through the first neural network in the generative flow model;
  • the second information indicates that there is a first causal relationship between the first variable and the second variable among the plurality of variables; the first information indicates that there is no first causal relationship between the first variable and the second variable, and the first variable and the second variable
  • the variables are different.
  • the local segment of the chip can be a local area of the chip surface
  • the multiple local segments can be multiple local areas of the chip surface
  • the area size and the outer contour shape of any two local segments among the multiple local segments are the same.
  • the same area size between local segments can be understood as the same area of the area where the local segments are located
  • the same external outline shape between local segments can be understood as the same external outline shape of the area where the local segments are located, for example, they are all squares. , or a rectangle with the same aspect ratio, etc.; among them
  • the area of each local segment among the multiple local segments is within a preset range, and the area of each local segment cannot be too large or too large.
  • the area size of the local fragment can be related to the size of the chip.
  • the larger the size of the chip the larger the area of the local fragment.
  • the area of the local fragment and the area of the chip can maintain a certain ratio, and the area size of the local fragment is okay.
  • the side length of the local segment can be set to a preset multiple of the spacing length between the basic units (such as the copper-plated polygon area on the chip), such as 3 times, 4 times, 5 times, etc.
  • Each local segment may include arranged devices and/or connecting lines between devices.
  • the local segment may specifically obtain image information of each local segment or other information that can express the local segment. Information on the device arrangement or connection line structure, based on which the structural characteristics of the local fragment can be uniquely determined;
  • the chip's fault information may include the number of occurrences of each local segment in the diagnostic report; or the probability that each local segment causes a chip failure in the faulty chip, etc.;
  • KPI can be used to measure the operating status of network elements in the communication network.
  • anomaly detection equipment collects observation data of each KPI at different times.
  • this application provides a causal relationship determination device, which includes:
  • the acquisition module is used to acquire the first information of multiple variables, where the first information indicates the causal relationship between the multiple variables;
  • the causal prediction module is used to predict the second information of multiple variables based on the first information through the first neural network in the generative flow model;
  • the second information indicates that there is a first causal relationship between the first variable and the second variable among the plurality of variables; the first information indicates that there is no first causal relationship between the first variable and the second variable, and the first variable and the second variable
  • the variables are different.
  • the first information indicates that there is a causal relationship between X pairs of variables among the multiple variables
  • the second information indicates that there is a causal relationship between X+1 pairs of variables, where X+1 variables A pair includes X variable pairs and a variable pair consisting of a first variable and a second variable.
  • each variable is one of the following:
  • a characteristic dimension of image data a characteristic dimension of text data, a characteristic dimension of audio data, and a characteristic dimension of video data.
  • the device further includes:
  • a model update module configured to obtain the first input flow of the first information by generating the second neural network in the flow model based on the first information
  • the first output flow of the first information is obtained through the third neural network in the generated flow model; wherein the difference between the first input flow and the first output flow is used to obtain the loss function;
  • the first neural network, the second neural network and the third neural network are updated.
  • model update module is specifically used to:
  • a plurality of third information is obtained, wherein the first information indicates that there is a causal relationship between variables of M variable pairs, and each third information indicates that there is a causal relationship between variables of some of the M variable pairs.
  • Causal relationship M is a positive integer greater than 1;
  • the first input flow of the first information is obtained through the second neural network in the generated flow model.
  • variable pairs are M-1 variable pairs among the M variable pairs.
  • the device further includes:
  • the model update module is used to obtain a second reward value of the first information based on the first information, where the second reward value represents the degree of consistency between the first information and the joint distribution of the data set of multiple variables;
  • the difference between the first input flow and the first output flow is used to construct a loss function, including:
  • the sum of the first output flow and the second reward value and the first input flow are used to construct the loss function.
  • the device further includes:
  • the model update module is used to obtain the second input flow of the second information by generating the second neural network in the flow model;
  • the first reward value of the second information is obtained through the third neural network in the generated flow model; wherein the difference between the second input flow and the first reward value is used to construct the loss function;
  • the first neural network, the second neural network and the third neural network are updated.
  • the second input flow of the second information is obtained through the second neural network in the generative flow model, including:
  • a plurality of fourth information is obtained, wherein the second information indicates that there is a causal relationship between the variables of the N variable pairs, and each fourth information indicates that there is a causal relationship between the variables of some of the N variable pairs.
  • Causal relationship N is a positive integer greater than 1;
  • a second input flow of the second information is obtained through the second neural network in the generated flow model.
  • model update module is also used to:
  • the second information corresponds to the first graph
  • each variable corresponds to a node in the first graph
  • the node corresponding to the variable as the dependent variable in the second information points to the node corresponding to the variable as the effect variable.
  • Model update module also used for:
  • the device further includes:
  • the constraint acquisition module is used to obtain target constraints based on the first information; wherein the target constraints are used to constrain multiple variable pairs that do not have causal relationships in the second information;
  • the second information of multiple variables is predicted, including:
  • the second information of multiple variables is predicted through the first neural network in the generative flow model.
  • the second information corresponds to the first graph
  • each variable corresponds to a node in the first graph
  • the node corresponding to the variable as the dependent variable in the second information points to the node corresponding to the variable as the effect variable.
  • the target constraint is used to constrain the first graph to be a directed acyclic graph.
  • the multiple variable pairs include a target variable pair, and the target variable pair is composed of a third variable and a fourth variable;
  • the target constraint constrains the second information indicating that the third variable does not serve as the effect variable of the fourth variable, And the fourth variable does not serve as the dependent variable of the third variable;
  • the target constraint constrains the second information indicating that there is no causal relationship between the third variable and the fourth variable.
  • the causal prediction module is specifically used to:
  • the probability of a causal relationship for each of the multiple variable pairs is obtained;
  • the second information is obtained based on the fact that the variable pair consisting of the first variable and the second variable among the plurality of variable pairs has the highest probability of having the first causal relationship.
  • this application provides a causal relationship determination device, which includes:
  • the acquisition module is used to obtain the first information of multiple variables.
  • the first information indicates the causal relationship between the multiple variables.
  • the variables include the user's operation type and at least one target variable.
  • the target variable is at least one of the following:
  • the attribute information of the item and the attribute information of the user are the attribute information of the item and the attribute information of the user.
  • the causal prediction module is used to predict the second information of multiple variables based on the first information through the first neural network in the generative flow model;
  • the second information indicates that there is a first causal relationship between the first variable and the second variable among the plurality of variables; the first information indicates that there is no first causal relationship between the first variable and the second variable, and the first variable and the second variable
  • the variables are different.
  • the user's attribute information includes at least one of the following: gender, age, occupation, income, hobbies, and education level.
  • the attribute information of the item includes at least one of the following: item name, developer, installation package size, category, and favorable rating.
  • the first information indicates that there is a causal relationship between X pairs of variables among the multiple variables
  • the second information indicates that there is a causal relationship between X+1 pairs of variables, where X+1 variables A pair includes X variable pairs and a variable pair consisting of a first variable and a second variable.
  • each variable is one of the following:
  • a characteristic dimension of image data a characteristic dimension of text data, a characteristic dimension of audio data, and a characteristic dimension of video data.
  • the device further includes:
  • a model update module configured to obtain the first input flow of the first information by generating the second neural network in the flow model based on the first information
  • the first output flow of the first information is obtained through the third neural network in the generated flow model; wherein the difference between the first input flow and the first output flow is used to obtain the loss function;
  • the first neural network, the second neural network and the third neural network are updated.
  • model update module is specifically used to:
  • a plurality of third information is obtained, wherein the first information indicates that there is a causal relationship between the variables of the M variable pairs, and each third information indicates that there is a causal relationship between the variables of some of the M variable pairs.
  • Causal relationship M is a positive integer greater than 1;
  • the first input flow of the first information is obtained through the second neural network in the generated flow model.
  • variable pairs are M-1 variable pairs among the M variable pairs.
  • the device further includes:
  • a model update module configured to obtain a second reward value of the first information based on the first information, where the second reward value represents the degree of consistency between the first information and the joint distribution of the data set of multiple variables;
  • the difference between the first input flow and the first output flow is used to construct a loss function, including:
  • the sum of the first output flow and the second reward value and the first input flow are used to construct the loss function.
  • the device further includes:
  • the model update module is used to obtain the second input flow of the second information by generating the second neural network in the flow model;
  • the first reward value of the second information is obtained through the third neural network in the generated flow model; wherein the difference between the second input flow and the first reward value is used to construct the loss function;
  • the first neural network, the second neural network and the third neural network are updated.
  • the second input flow of the second information is obtained through the second neural network in the generative flow model, including:
  • a plurality of fourth information is obtained, wherein the second information indicates that there is a causal relationship between the variables of the N variable pairs, and each fourth information indicates that there is a causal relationship between the variables of some of the N variable pairs.
  • Causal relationship N is a positive integer greater than 1;
  • a second input flow of the second information is obtained through the second neural network in the generated flow model.
  • model update module is also used to:
  • the second information corresponds to the first graph
  • each variable corresponds to a node in the first graph
  • the node corresponding to the variable as the dependent variable in the second information points to the node corresponding to the variable as the effect variable.
  • Model update module also used for:
  • the device further includes:
  • the constraint acquisition module is used to obtain target constraints based on the first information; wherein the target constraints are used to constrain multiple variable pairs that do not have causal relationships in the second information;
  • the second information of multiple variables is predicted, including:
  • the second information of multiple variables is predicted through the first neural network in the generative flow model.
  • the second information corresponds to the first graph
  • each variable corresponds to a node in the first graph
  • the node corresponding to the variable as the dependent variable in the second information points to the node corresponding to the variable as the effect variable.
  • the target constraint is used to constrain the first graph to be a directed acyclic graph.
  • the multiple variable pairs include a target variable pair, and the target variable pair is composed of a third variable and a fourth variable;
  • the target constraint constrains the second information indicating that the third variable does not serve as the effect variable of the fourth variable, And the fourth variable does not serve as the dependent variable of the third variable;
  • the target constraint constrains the second information indicating that there is no causal relationship between the third variable and the fourth variable.
  • the causal prediction module is specifically used to:
  • the probability of a causal relationship for each of the multiple variable pairs is obtained;
  • the second information is obtained based on the fact that the variable pair consisting of the first variable and the second variable among the plurality of variable pairs has the highest probability of having the first causal relationship.
  • this application provides a causal relationship determination device, which includes:
  • the acquisition module is used to obtain the first information of multiple variables, the first information indicates the causal relationship between the multiple variables, and the variables include attribute information of the target object; wherein,
  • the target object is a chip, and the attribute information is a partial fragment or fault information of the chip; or,
  • the target object is the node of the communication network, and the target variable is the key performance indicator KPI, operating data or alarm information of the network element;
  • the causal prediction module is used to predict the second information of multiple variables based on the first information through the first neural network in the generative flow model;
  • the second information indicates that there is a first causal relationship between the first variable and the second variable among the plurality of variables; the first information indicates that there is no first causal relationship between the first variable and the second variable, and the first variable and the second variable
  • the variables are different.
  • the first information indicates that there is a causal relationship between X pairs of variables among the multiple variables
  • the second information indicates that there is a causal relationship between X+1 pairs of variables, where X+1 variables A pair includes X variable pairs and a variable pair consisting of a first variable and a second variable.
  • each variable is one of the following:
  • a characteristic dimension of image data a characteristic dimension of text data, a characteristic dimension of audio data, and a characteristic dimension of video data.
  • the device further includes:
  • a model update module configured to obtain the first input flow of the first information by generating the second neural network in the flow model based on the first information
  • the first output flow of the first information is obtained through the third neural network in the generated flow model; wherein the difference between the first input flow and the first output flow is used to obtain the loss function;
  • the first neural network, the second neural network and the third neural network are updated.
  • model update module is specifically used to:
  • a plurality of third information is obtained, wherein the first information indicates that there is a causal relationship between variables of M variable pairs, and each third information indicates that there is a causal relationship between variables of some of the M variable pairs.
  • Causal relationship M is a positive integer greater than 1;
  • the first input flow of the first information is obtained through the second neural network in the generated flow model.
  • variable pairs are M-1 variable pairs among the M variable pairs.
  • the device further includes:
  • the model update module is used to obtain a second reward value of the first information based on the first information, where the second reward value represents the degree of consistency between the first information and the joint distribution of the data set of multiple variables;
  • the difference between the first input flow and the first output flow is used to construct a loss function, including:
  • the sum of the first output flow and the second reward value and the first input flow are used to construct the loss function.
  • the device further includes:
  • the model update module is used to obtain the second input flow of the second information by generating the second neural network in the flow model;
  • the first reward value of the second information is obtained through the third neural network in the generated flow model; wherein the difference between the second input flow and the first reward value is used to construct the loss function;
  • the first neural network, the second neural network and the third neural network are updated.
  • the second input flow of the second information is obtained through the second neural network in the generative flow model, including:
  • a plurality of fourth information is obtained, wherein the second information indicates that there is a causal relationship between the variables of the N variable pairs, and each fourth information indicates that there is a causal relationship between the variables of some of the N variable pairs.
  • Causal relationship N is a positive integer greater than 1;
  • a second input flow of the second information is obtained through the second neural network in the generated flow model.
  • model update module is also used to:
  • the second information corresponds to the first graph
  • each variable corresponds to a node in the first graph
  • the node corresponding to the variable as the dependent variable in the second information points to the node corresponding to the variable as the effect variable.
  • Model update module also used for:
  • the device further includes:
  • the constraint acquisition module is used to obtain target constraints based on the first information; wherein the target constraints are used to constrain multiple variable pairs that do not have causal relationships in the second information;
  • the second information of multiple variables is predicted, including:
  • the second information of multiple variables is predicted through the first neural network in the generative flow model.
  • the second information corresponds to the first graph
  • each variable corresponds to a node in the first graph
  • the node corresponding to the variable as the dependent variable in the second information points to the node corresponding to the variable as the effect variable.
  • the target constraint is used to constrain the first graph to be a directed acyclic graph.
  • the multiple variable pairs include a target variable pair, and the target variable pair is composed of a third variable and a fourth variable;
  • the target constraint constrains the second information indicating that the third variable does not serve as the effect variable of the fourth variable, And the fourth variable does not serve as the dependent variable of the third variable;
  • the target constraint constrains the second information indicating that there is no causal relationship between the third variable and the fourth variable.
  • the causal prediction module is specifically used to:
  • the probability of a causal relationship for each of the multiple variable pairs is obtained;
  • the second information is obtained based on the fact that the variable pair consisting of the first variable and the second variable among the plurality of variable pairs has the highest probability of having the first causal relationship.
  • embodiments of the present application provide a device for determining causality, which may include a memory, a processor, and a bus system.
  • the memory is used to store programs
  • the processor is used to execute programs in the memory to perform the above.
  • inventions of the present application provide a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to execute the above-mentioned first aspect and any of its options. method, or the above-mentioned second aspect and any optional method thereof, or the above-mentioned third aspect and any optional method thereof.
  • embodiments of the present application provide a computer program product including instructions that, when run on a computer, cause the computer to execute the above-mentioned first aspect and any of its optional methods, or the above-mentioned second aspect and any of its optional methods. Any optional method, or the above third aspect and any optional method thereof.
  • the present application provides a chip system, which includes a processor and is used to support the causal relationship determination device to implement some or all of the functions involved in the above aspects, for example, sending or processing the functions involved in the above methods. Data; or, information.
  • the chip system also includes a memory, which is used to save necessary program instructions and data for executing the device or training the device.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • Figure 1 is a schematic diagram of an application architecture
  • Figure 2 is a schematic diagram of an application architecture
  • Figure 3 is a schematic diagram of an application architecture
  • Figure 4 is a schematic diagram of an application architecture
  • Figure 5 is a schematic diagram of an application architecture
  • Figure 6 is a schematic diagram of the generation process of a generative flow model
  • Figure 7 is a schematic diagram of an embodiment of a causal relationship determination method provided by an embodiment of the present application.
  • Figure 8 is a schematic diagram of an embodiment of causal relationship sequence generation provided by an embodiment of the present application.
  • Figure 9 is a schematic diagram of determining a target constraint in an embodiment of the present application.
  • Figure 10 is a schematic diagram of a closure matrix in an embodiment of the present application.
  • Figure 11 is a schematic diagram of the transposition of a closure matrix in an embodiment of the present application.
  • Figure 12 is a schematic diagram of determining a target constraint in an embodiment of the present application.
  • Figure 13 is a schematic diagram of solving a parent node in the embodiment of the present application.
  • Figure 14 is a schematic diagram of a causal relationship determination process in an embodiment of the present application.
  • Figure 15 is a schematic diagram of an embodiment of causal relationship sequence generation provided by the embodiment of the present application.
  • Figure 16 is a schematic diagram of a causal relationship determination process in an embodiment of the present application.
  • Figure 17 is a schematic diagram of an embodiment of a causal relationship determination device provided by an embodiment of the present application.
  • Figure 18 is a schematic structural diagram of an execution device provided by an embodiment of the present application.
  • Figure 19 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • Figure 20 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • the terms “substantially”, “about” and similar terms are used as terms of approximation, not as terms of degree, and are intended to take into account measurements or values that would be known to one of ordinary skill in the art. The inherent bias in calculated values.
  • the use of “may” when describing embodiments of the present invention refers to “one or more possible embodiments.”
  • the terms “use”, “using”, and “used” may be deemed to be the same as the terms “utilize”, “utilizing”, and “utilize”, respectively. Synonymous with “utilized”.
  • the term “exemplary” is intended to refer to an example or illustration.
  • This application can be, but is not limited to, applied in image processing, audio processing, text processing or video processing and other scenarios that require causal relationship identification. Next, they will be introduced respectively:
  • fault identification in various scenarios can be carried out through causal relationship identification, such as fault identification of communication networks, systematic defect identification of chips, fault node identification of computer transactions, and mechanical faults.
  • causal relationship identification such as fault identification of communication networks, systematic defect identification of chips, fault node identification of computer transactions, and mechanical faults. The identification, etc. will be explained separately below:
  • fault identification of the communication network can be performed through causal relationship identification.
  • the key performance indicator (KPI) of a communication network can be used to measure the operating status of network elements in the communication network. Normally, the anomaly detection equipment will collect the observation data of each KPI at different times. If the observation data of the KPI is abnormal, it indicates that the operating status of the network elements in the communication network is abnormal. Network operation and maintenance engineers need to find the cause based on the abnormal KPI to eliminate the fault.
  • KPI key performance indicator
  • the causal relationship between certain abnormal KPIs can be determined based on the causality determination method.
  • the root cause of the abnormality of the first KPI is caused by the abnormality of the second KPI, thus network operation and maintenance Engineers can determine the faulty network element based on the second KPI to eliminate the fault.
  • the KPI is equivalent to the variable in the embodiment of the present application, and the observation data of the KPI at different times is equivalent to the data of the variable in the embodiment of the present application, which can be obtained through the causal relationship determination method in the embodiment of the present application.
  • systematic defect identification of chips can be performed through causal relationship identification.
  • Chip production is mainly divided into two parts: layout design and manufacturing.
  • Layout design usually includes multi-layer circuit function design, and manufacturing includes production, packaging, testing and other processes.
  • manufacturing includes production, packaging, testing and other processes.
  • the normal circuit structure of some chip designs may have defects under the original process, resulting in chip yield Lower than expected. This type of circuit structure with design defects due to process changes is called a systemic defect.
  • systemic defects will increase the probability of chip circuit function failure. Chips with circuit function failure will not be able to be used normally, resulting in a reduction in chip yield. The decline in yield will increase production costs and even cause related products to miss the sales window. Therefore, root cause identification of systemic defects is crucial to product yield.
  • the design structure of the chip can be analyzed to determine the types of local fragments on the chip that lead to potential chip failures.
  • the types of local fragments that cause hidden dangers of chip failure can be obtained through the causal relationship determination method based on the images of each fragment on the chip.
  • fault node identification of computer transactions can be performed through causal relationship identification.
  • the transaction analysis process is usually as follows: during the execution of the transaction, the current execution record is collected in real time, and the information of each node called by the execution transaction is extracted from the execution record.
  • the node information includes the name of the node, the calling node The duration, status code, calling relationship between different nodes, etc.; after that, the information of each node is displayed in the interface. Based on the information of each node, we can use the causal identification method to determine whether there are problems with these nodes, and finally find the node that caused the transaction problems.
  • identification of mechanical faults can be performed through causal relationship identification.
  • the attributes that have the greatest impact on the unqualified product can be adjusted first based on the found causal relationship.
  • the causal relationship can be based on the found To prioritize the variables that have the greatest impact on power loss. In this way, the performance of the power transmission system can be improved.
  • causality identification related to the user's operation behavior in the recommendation field can be performed through a causality determination method.
  • the user's operation log can be obtained.
  • the operation log can include the user's operation behavior for the item, the item's attribute information, and the user's attribute information.
  • Each attribute information can be determined through causal relationship identification. The causal relationship between user actions.
  • embodiments of the present application can be applied to causal relationship identification applications (or other types of computer program products), cloud services related to causal relationship identification provided by cloud-side servers, etc.
  • Figure 1 is a schematic diagram of the functional architecture of a causal relationship identification application in an embodiment of the present application:
  • embodiments of the present application include a system that can automatically identify causal relationships between variables in the data based on input data (for example, a causal relationship identification application).
  • the causal relationship identification application 102 can receive input data 101 (optionally, the variables of the data can also be included in it, or the variables of the data can be automatically identified) and output the causal relationship between the variables. Relationship recognition results 103.
  • Cause and effect identification class Application 102 may execute, for example, on at least one computer system and includes computer code that, when executed by one or more computers, causes the computers to perform the cause-and-effect relationships described herein. Determine the method.
  • the causality identification application can be run on a terminal device on the end side or in a server on the cloud side.
  • the terminal device may be installed with a causal relationship identification application, and actions including data input, data processing (such as the causal relationship determination method in the embodiment of the present application), and data output may be performed by the terminal device.
  • actions including data input, data processing (such as the causal relationship determination method in the embodiment of the present application), and data output may be performed by the terminal device.
  • the terminal device can be installed with a client of a causal relationship identification application, and the actions including data input and data output can be performed by the terminal device, and the actions of data processing (such as the causal relationship determination method in the embodiment of the present application) It can be executed by a server on the cloud side. That is to say, the terminal device can transmit the data required for data processing (such as the causality determination method in the embodiment of the present application) to the server on the cloud side. After the execution, the server on the cloud side After the data processing action, the data processing results can be returned to the terminal device on the end side, and the terminal device outputs based on the processing results.
  • data processing such as the causal relationship determination method in the embodiment of the present application
  • Figure 2 is a schematic diagram of the entity architecture for running a causal relationship identification application in an embodiment of the present application:
  • FIG. 2 shows a schematic diagram of a system architecture.
  • the system may include a terminal 100 and a server 200.
  • the server 200 may include one or more servers (one server is used as an example in FIG. 2 for illustration), and the server 200 may provide a causal relationship identification program for one or more terminals.
  • the terminal 100 can be installed with a causal relationship identification application, or open a web page related to causal relationship identification.
  • the above-mentioned applications and web pages can provide a causal relationship identification interface, and the terminal 100 can receive user input on the causal relationship identification interface.
  • the relevant data is sent to the server 200.
  • the server 200 can obtain the processing result (the causal correlation identification result of the data) based on the received data, and return the processing result to the terminal 100.
  • the terminal 100 can also complete the action of obtaining data processing results based on the received data by itself without requiring the cooperation of the server, which is not limited by the embodiments of this application.
  • the terminal 100 in the embodiment of the present application can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR)/virtual reality (VR) device, a notebook computer, or an ultra mobile personal computer (ultra mobile personal computer).
  • - mobile personal computer UMPC
  • netbook personal digital assistant
  • PDA personal digital assistant
  • FIG. 3 shows an optional hardware structure diagram of the terminal 100.
  • the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), Microphone 162 (optional), processor 170, external interface 180, power supply 190 and other components.
  • a radio frequency unit 110 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), Microphone 162 (optional), processor 170, external interface 180, power supply 190 and other components.
  • Figure 3 is only an example of a terminal or a multi-function device, and does not constitute a limitation to the terminal or multi-function device. It may include more or fewer components than shown in the figure, or some components may be combined. Or different parts.
  • the input unit 130 may be used to receive input numeric or character information and generate key signal input related to user settings and function control of the portable multi-function device.
  • the input unit 130 may include a touch screen 131 (optional) and/or other input devices 132.
  • the touch screen 131 can collect the user's touch operations on or near it (such as the user's operations on or near the touch screen using fingers, knuckles, stylus, or any other suitable objects), and drive the corresponding according to the preset program. Connect the device.
  • the touch screen can detect the user's touch action on the touch screen, convert the touch action into a touch signal and send it to the processor 170, and can receive and execute commands from the processor 170; the touch signal at least includes contact point coordinate information.
  • the touch screen 131 can provide an input interface and an output interface between the terminal 100 and the user.
  • touch screens can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the input unit 130 may also include other input devices.
  • other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys 133, etc.), trackball, mouse, joystick, etc.
  • other input devices 132 may receive parameters related to causal relationship identification, such as multiple data in the embodiment of the present application (optionally, multiple variables may also be included) and so on.
  • the display unit 140 may be used to display information input by the user or information provided to the user, various menus of the terminal 100, interactive interfaces, file display, and/or playback of any kind of multimedia files.
  • the display unit 140 may be used to display the interface of a causal relationship identification application program, causal relationship results, etc.
  • the memory 120 can be used to store instructions and data.
  • the memory 120 can mainly include a storage instruction area and a storage data area.
  • the storage data area can store various data, such as multimedia files, text, etc.;
  • the storage instruction area can store operating systems, applications, at least Software units such as instructions required for a function, or their subsets or extensions.
  • Non-volatile random access memory may also be included; providing the processor 170 with management of hardware, software and data resources in the computing processing device and supporting control software and applications. It is also used for storage of multimedia files, as well as storage of running programs and applications.
  • the processor 170 is the control center of the terminal 100. It uses various interfaces and lines to connect various parts of the entire terminal 100, and executes various functions of the terminal 100 by running or executing instructions stored in the memory 120 and calling data stored in the memory 120. functions and process data to provide overall control of the terminal device.
  • the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, where the application processor mainly processes operating systems, user interfaces, application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 170 .
  • the processor and memory can be implemented on a single chip, and in some embodiments, they can also be implemented on separate chips.
  • the processor 170 can also be used to generate corresponding operation control signals, send them to corresponding components of the computing processing device, read and process data in the software, especially read and process the data and programs in the memory 120, so that the Each functional module performs a corresponding function, thereby controlling the corresponding components to act according to the instructions.
  • the memory 120 can be used to store software codes related to the causality determination method, and the processor 170 can execute the steps of the causality determination method of the chip, and can also schedule other units (such as the above-mentioned input unit 130 and the display unit 140) to implement the corresponding function.
  • the radio frequency unit 110 (optional) can be used to send and receive information or receive and send signals during calls. For example, after receiving downlink information from the base station, it is processed by the processor 170; in addition, the designed uplink data is sent to the base station.
  • the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier (LNA), duplexer, etc.
  • the radio frequency unit 110 can also communicate with network devices and other devices through wireless communication.
  • the wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • SMS Short Messaging Service
  • the radio frequency unit 110 can send data to the server 200 and receive the causal relationship identification result sent by the server 200.
  • radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.
  • the terminal 100 also includes a power supply 190 (such as a battery) that supplies power to various components.
  • a power supply 190 such as a battery
  • the power supply can be logically connected to the processor 170 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system.
  • the terminal 100 also includes an external interface 180, which can be a standard Micro USB interface or a multi-pin connector, which can be used to connect the terminal 100 to communicate with other devices, or can be used to connect a charger to charge the terminal 100. .
  • an external interface 180 can be a standard Micro USB interface or a multi-pin connector, which can be used to connect the terminal 100 to communicate with other devices, or can be used to connect a charger to charge the terminal 100.
  • the terminal 100 may also include a flash light, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which will not be described again here. Some or all of the methods described below may be applied in the terminal 100 shown in FIG. 3 .
  • WiFi wireless fidelity
  • Bluetooth Bluetooth
  • FIG 4 provides a schematic structural diagram of a server 200.
  • the server 200 includes a bus 201, a processor 202, a communication interface 203 and a memory 204.
  • the processor 202, the memory 204 and the communication interface 203 communicate through the bus 201.
  • the bus 201 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in Figure 4, but it does not mean that there is only one bus or one type of bus.
  • the processor 202 may be a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP) or a digital signal processor (DSP). any one or more of them.
  • CPU central processing unit
  • GPU graphics processing unit
  • MP microprocessor
  • DSP digital signal processor
  • Memory 204 may include volatile memory, such as random access memory (RAM).
  • RAM random access memory
  • the memory 204 may also include non-volatile memory (non-volatile memory), such as read-only memory (ROM), flash memory, mechanical hard drive (hard drive drive, HDD) or solid state drive (solid state drive). ,SSD).
  • ROM read-only memory
  • HDD hard drive drive
  • SSD solid state drive
  • the memory 204 can be used to store software codes related to the causality determination method, and the processor 202 can execute the steps of the chip's causality determination method, and can also schedule other units to implement corresponding functions.
  • the terminal 100 and the server 200 may be centralized or distributed devices, and the processors (such as the processor 170 and the processor 202) in the terminal 100 and the server 200 may be hardware circuits (such as dedicated processors).
  • the processors such as the processor 170 and the processor 202
  • the terminal 100 and the server 200 may be hardware circuits (such as dedicated processors).
  • ASIC Application specific integrated circuit
  • FPGA field-programmable gate array
  • DSP digital signal processing
  • microprocessor or microcontroller etc. etc.
  • the processor can be a hardware system with the function of executing instructions, such as CPU, DSP, etc., or a hardware system without the function of executing instructions, such as ASIC, FPGA, etc., or the above A combination of a hardware system that does not have the function of executing instructions and a hardware system that has the function of executing instructions.
  • the causal relationship determination method in the embodiments of the present application involves AI-related operations.
  • the instruction execution architecture of the terminal device and the server is not limited to the processor combined with the memory shown in Figures 3 and 4. architecture.
  • the system architecture provided by the embodiment of the present application will be introduced in detail below with reference to Figure 5 .
  • FIG. 5 is a schematic diagram of the system architecture provided by the embodiment of the present application.
  • the system architecture 500 includes an execution device 510, a training device 520, a database 530, a client device 540, a data storage system 550 and a data collection system 560.
  • the execution device 510 includes a computing module 511, an I/O interface 512, a preprocessing module 513 and a preprocessing module 514.
  • the target model/rule 501 may be included in the calculation module 511, and the preprocessing module 513 and the preprocessing module 514 are optional.
  • the execution device 510 may be the above-mentioned terminal device or server running the causal relationship identification application.
  • Data collection device 560 is used to collect training samples. Training samples can be I/O unit information, bump information, total number of connections, etc. After collecting the training samples, the data collection device 560 stores the training samples into the database 530 .
  • the training device 520 can be based on the database 530 or the training samples from the client device 540 (such as multiple data and multiple variables in the embodiment of the present application), the neural network to be trained (such as the generative flow model in the embodiment of the present application, etc.) , to obtain the target model/rule 501 and the causal identification results.
  • the training samples maintained in the database 530 are not necessarily collected from the data collection device 560, and may also be received from other devices (for example, from the client device 540).
  • the training device 520 may not necessarily train the target model/rules 501 based entirely on the training samples maintained by the database 530. It may also obtain training samples from the cloud or other places for model training. The above description should not be used as a guarantee for this application. Limitations of Examples.
  • the target model/rules 501 trained according to the training device 520 can be applied to different systems or devices, such as to the execution device 510 shown in Figure 5.
  • the execution device 510 can be a terminal, such as a mobile phone terminal, Tablets, laptops, augmented reality (AR)/virtual reality (VR) devices, vehicle-mounted terminals, etc., or servers, etc.
  • AR augmented reality
  • VR virtual reality
  • the training device 520 may transfer the trained model or causal identification results to the execution device 510 .
  • the execution device 510 is configured with an input/output (I/O) interface 512 for data interaction with external devices.
  • the user can input data to the I/O interface 512 through the client device 540 (for example, this Multiple data or multiple variables in the application embodiment, etc.).
  • the preprocessing module 513 and the preprocessing module 514 are used to perform preprocessing according to the input data received by the I/O interface 512. It should be understood that there may be no preprocessing module 513 and 514 or only one preprocessing module. When the preprocessing module 513 and the preprocessing module 514 do not exist, the computing module 511 can be directly used to process the input data.
  • the execution device 510 When the execution device 510 preprocesses input data, or when the calculation module 511 of the execution device 510 performs calculations and other related processes, the execution device 510 can call data, codes, etc. in the data storage system 550 for corresponding processing. , the data, instructions, etc. obtained by corresponding processing can also be stored in the data storage system 550.
  • the I/O interface 512 provides the processing results (eg, cause-and-effect identification results) to the client device 540 and thereby to the user.
  • the user can manually set the input data, and the "manually set input data" can be operated through the interface provided by the I/O interface 512 .
  • the client device 540 can automatically send input data to the I/O interface 512. If requiring the client device 540 to automatically send the input data requires the user's authorization, the user can set corresponding permissions in the client device 540. The user can view the results output by the execution device 510 on the client device 540, and the specific presentation form may be display, sound, action, etc.
  • the client device 540 can also be used as a data collection terminal to collect the input data of the input I/O interface 512 and the output results of the output I/O interface 512 as new sample data, and store them in the database 530.
  • the I/O interface 512 directly uses the input data input to the I/O interface 512 and the output result of the output I/O interface 512 as a new sample as shown in the figure.
  • the data is stored in database 530.
  • Figure 5 is only a schematic diagram of a system architecture provided by an embodiment of the present application.
  • the positional relationship between the devices, devices, modules, etc. shown in the figure does not constitute any limitation.
  • the data The storage system 550 is an external memory relative to the execution device 510. In other cases, the data storage system 550 can also be placed in the execution device 510. It should be understood that the above execution device 510 may be deployed in the client device 540.
  • the above-mentioned training device 520 can obtain the code stored in the memory (not shown in Figure 5, which can be integrated with the training device 520 or deployed separately from the training device 520) to implement the model training in the embodiment of the present application. Related steps.
  • the training device 520 may include hardware circuits (such as application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (digital signal processing, DSP, microprocessor or microcontroller, etc.), or a combination of these hardware circuits.
  • ASICs application specific integrated circuits
  • FPGAs field-programmable gate arrays
  • DSP digital signal processors
  • the training device 520 can be a hardware system with the function of executing instructions, such as a CPU, DSP, etc., or a combination of other hardware circuits.
  • a hardware system with the function of executing instructions such as ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without the function of executing instructions and a hardware system with the function of executing instructions.
  • the training device 520 can be a combination of a hardware system that does not have the function of executing instructions and a hardware system that has the function of executing instructions. Some of the steps related to model training provided by the embodiments of the present application can also be implemented by the training device 520 that does not have the function of executing instructions. It is implemented by the hardware system that executes the instruction function, which is not limited here.
  • the server can provide causality-determined services for the client side through an application programming interface (API).
  • API application programming interface
  • the terminal device can send relevant parameters (such as multiple data, etc.) to the server through the API provided by the cloud.
  • the server can obtain the processing results based on the received data and return the processing results (such as cause-effect identification results, etc.) to to the terminal.
  • the neural network can be composed of neural units.
  • the neural unit can refer to an operation unit that takes xs (ie, input data) and intercept 1 as input.
  • the output of the operation unit can be:
  • s 1, 2,...n, n is a natural number greater than 1
  • Ws is the weight of xs
  • b is the bias of the neural unit.
  • f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into an output signal.
  • the output signal of this activation function can be used as the input of the next convolutional layer, and the activation function can be a sigmoid function.
  • a neural network is a network formed by connecting multiple above-mentioned single neural units together, that is, the output of one neural unit can be the input of another neural unit.
  • the input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field.
  • the local receptive field can be an area composed of several neural units.
  • Deep Neural Network also known as multi-layer neural network
  • DNN Deep Neural Network
  • the neural network inside DNN can be divided into three categories: input layer, hidden layer, and output layer.
  • the first layer is the input layer
  • the last layer is the output layer
  • the layers in between are hidden layers.
  • the layers are fully connected, that is to say, any neuron in the i-th layer must be connected to any neuron in the i+1-th layer.
  • the coefficient from the k-th neuron in layer L-1 to the j-th neuron in layer L is defined as It should be noted that the input layer has no W parameter.
  • more hidden layers make the network more capable of describing complex situations in the real world. Theoretically, a model with more parameters has higher complexity and greater "capacity", which means it can complete more complex learning tasks.
  • Training a deep neural network is the process of learning the weight matrix. The ultimate goal is to obtain the weight matrix of all layers of the trained deep neural network (a weight matrix formed by the vectors W of many layers).
  • a graph is a data structure that includes at least one vertex and at least one edge.
  • the vertices in the graph can Mapping to entities, the edges in the graph can be mapped to relationships between entities.
  • Graphs can be directed or undirected.
  • the graph can also include other data besides vertices and edges, such as vertex labels and edge labels.
  • the convolutional neural network can use the error back propagation (BP) algorithm to modify the size of the parameters in the initial super-resolution model during the training process, so that the reconstruction error loss of the super-resolution model becomes smaller and smaller.
  • BP error back propagation
  • forward propagation of the input signal until the output will produce an error loss
  • the parameters in the initial super-resolution model are updated by back-propagating the error loss information, so that the error loss converges.
  • the backpropagation algorithm is a backpropagation movement dominated by error loss, aiming to obtain the optimal parameters of the super-resolution model, such as the weight matrix.
  • variable A serves as the dependent variable of variable B
  • variable B serves as the effect variable of variable A.
  • changes in variable A will lead to changes in variable B.
  • a variable can be a feature of the data.
  • the variable can be a feature dimension of the image data, such as a certain semantics in the image, such as the ear area, glasses area, etc. in images including portraits, or a pixel channel in the image, such as R channel, G channel, B channel, etc.
  • the variable can be a certain type of local fragment of the chip, and the data of the variable can be the image of a certain type of local fragment of the chip.
  • a variable can be a characteristic dimension of text data, such as a root cause of a fault.
  • the variable can also be a characteristic dimension of audio data, a characteristic dimension of video data, and so on.
  • Reinforcement learning is one of the paradigms and methodologies of machine learning, which is used to describe and solve problems in which an agent learns strategies to maximize returns or achieve specific goals during its interaction with the environment.
  • the generative flow model (also called the flow-based generative flow model or the generative flow model) is a flow model that uses sequential decision-making to sample and build composite structures, so that the probability of generating a structure is proportional to the reward value of the structure. .
  • the generative flow model builds a composite structure in a sequential decision-making manner. It builds a flow model as a directed acyclic graph, that is, each state node has multiple parent nodes, which is different from each state node in a tree structure that has only a unique parent node.
  • the model has a unique initial section points, multiple termination nodes. The model starts sampling from the initial node to generate an action sequence and completes the transition between states until it reaches the termination node and ends sampling.
  • the termination node corresponds to the generated composite structure.
  • the initial node can include output flow
  • the intermediate node can include input flow and output flow (or reward value)
  • the termination node can include input flow and reward value.
  • the flow model as a water pipe
  • the water flow at the initial node is the total inflow of the model.
  • the sum of all terminal nodes is the total outflow of the model.
  • inflow equals outflow.
  • the inflow and outflow values of nodes are predicted by a neural network.
  • the model can learn a strategy (i.e., optimize the neural network) such that the probability of sampling a composite structure is proportional to its reward value. Proportionally, structures with higher reward values are more likely to be sampled. In this way, the generative flow model can sample a range of structures with high reward values.
  • FIG. 6 An exemplary diagram of the generative flow model can be referred to Figure 6, as shown in Figure 6, where s i represents the state and x j represents the composite structure.
  • S 0 is the initial node
  • s 16 are the terminal nodes, because they correspond to the composite structure x 5 , x 8 , x 11 , x 13 , x 16 .
  • Bayesian network structure learning is to find a causal network structure that best matches the training sample set given a data sample set.
  • transitive closure C can describe whether a node can reach another node through a directed arrow. If there is an effective directed path from node A to another node B, the (B, A) position in the adjacency matrix is marked as 1.
  • the adjacency matrix is a square matrix that represents the adjacent relationship between vertices.
  • the value is 0 or 1. 0 means no direct relationship and 1 means there is a relationship; the adjacency matrix of a directed acyclic graph cannot have symmetry and diagonal lines.
  • the position has 1.
  • Topological sequence is an arrangement of activities in the vertex activity network in the order of occurrence.
  • Topological sorting is to perform topological sorting on a directed acyclic graph G. It is to arrange all the vertices in G into a linear sequence, so that for any pair of vertices u and v in the graph, if edge (u, v) ⁇ E(G ), then u appears before v in the linear sequence.
  • the identification of causal relationships between variables in the data set is based on reinforcement learning.
  • This technology uses reinforcement learning to search for the highest-scoring causal sequence.
  • This technology first encodes the data set and encodes each column into a state. At this time, the order of all states is random, and then uses the Markov chain to determine the order for decoding to generate an action sequence (a 0 ,a 1 ,..., a T ), this sequence corresponds to a certain causal sequence, and the graph corresponding to each causal sequence can be constrained to be a directed acyclic graph through the directed acyclic constraint function. That is to say, the existing technology traverses a large number of causal sequences and selects a more accurate causal relationship based on the scores of each causal sequence. In order to obtain a more accurate causal relationship, a large number of causal sequences need to be traversed. As the search space (that is, the amount of data and the number of variables) increases, greater computing power is required. consumption and running time consumption.
  • Figure 7 is a flow diagram of a method for determining a causal relationship provided by an embodiment of the present application.
  • a method of determining a causal relationship provided by an embodiment of the present application includes:
  • the purpose of the embodiments of the present application is to identify the causal relationship between multiple variables in a data set (including multiple data), and the data set (including multiple data) to be identified can be obtained , and input the data set (or multiple variables in the data set) into a model for determining causality (such as the generative flow model in the embodiment of the present application (also called a flow-based generative flow model or a generative flow model) )) in order to obtain the causal relationship to determine the result.
  • a model for determining causality such as the generative flow model in the embodiment of the present application (also called a flow-based generative flow model or a generative flow model)
  • the causal relationship of multiple variables may include the causal relationship of each pair of variables among the multiple variables, and the pair of variables may include two variables.
  • the causal relationship of a variable pair can be understood as the causal relationship between the variables included in the variable pair.
  • variable A serves as the dependent variable of variable B
  • variable B serves as the effect variable of variable A.
  • changes in variable A will lead to changes in variable B.
  • variable B the causal relationship between a pair of variables (for example, variable B and variable A) can be understood as variable B causing variable A, that is, variable B serves as the dependent variable of variable A, and variable A serves as the effect variable of variable B.
  • the causal relationship (such as the first information and the second information in the embodiment of the present application) can be represented by an adjacency matrix: the adjacency matrix is a square matrix that represents the adjacent relationship between vertices. , the value is 0 or 1, 0 means no direct relationship, 1 means there is a relationship; the adjacency matrix of the directed acyclic graph cannot have symmetry and diagonal positions with 1, for example, the causal relationship of multiple variables (such as this The first information in the application embodiment) is: variable 1 causes variable 2, and there is no causal relationship between the other variables, then the first information can be expressed as:
  • variable can be a feature of the data.
  • the variable can be a feature dimension of the image data, for example, it can be a certain semantics in the image, such as the ear area, glasses area, etc. in the image including a portrait, or it can also be a pixel in the image.
  • Channels such as R channel, G channel, B channel, etc.
  • the data of the variable can be the data of the image data in the feature dimension, such as the pixel value of the ear area in the portrait image, the pixel value of the glasses area, etc., or it can also be the pixel value of the R channel and G channel of the image. pixel value, pixel value of B channel, etc.
  • variable can be a certain type of local fragment of the chip
  • data of the variable can be the image of a certain type of local fragment of the chip
  • the variable can be a characteristic dimension of the text data, for example, it can be a root cause of a fault.
  • it can be the KPI of the communication network, the node called by the computer transaction.
  • the data of the variable can be the specific value of the KPI of the communication network, the information of the node called by the computer transaction, etc.
  • variable can also be a characteristic dimension of audio data, a characteristic dimension of video data, and so on.
  • the causal relationship between multiple variables can be predicted by generating a flow model based on multiple variables of the data set.
  • the generative flow model can predict the causal relationship between multiple variables multiple times during an iteration, where the next causal relationship can be predicted based on the causal relationship predicted last time.
  • the result of the "next" causal relationship prediction includes the existing causal relationship in the "previous” causal relationship prediction, and also includes the causal relationship between a newly predicted variable pair, until one of the predicted results is satisfied. Termination condition for iteration.
  • the multiple variables may include variable 1, variable 2 and variable 3.
  • the generative flow model may first predict multiple variables (for example, through the first neural network in the generative flow model).
  • the causal relationship between variables (such as the first information in the embodiment of this application) is: variable 1 causes variable 2, and there is no causal relationship between the other variables. If the first information does not meet the termination condition, a flow model is generated (example sexually, the richer causal relationship of multiple variables (such as the second information in the embodiment of the present application) can be predicted based on the first information through the first neural network in the generative flow model: variable 1 causes variable 2.
  • Variable 2 causes variable 3, and there is no causal relationship between the other variables (equivalent to the second information adding the causal relationship of "variable 2 causes variable 3" to the first information).
  • the generative flow model (for example, through the first neural network in the generative flow model) can predict the first information of multiple variables in a prediction process.
  • the first The information may indicate causal relationships between the multiple variables.
  • the first information predict the second information of the multiple variables through the first neural network in the generative model; wherein the second information indicates the second information of the multiple variables.
  • the first causal relationship means that the first variable is used as the dependent variable of the second variable, and the second variable is used as the dependent variable of the second variable.
  • the causal variable of the first variable; the first information indicates that there is no first causal relationship between the first variable and the second variable, and the first variable and the second variable are different.
  • the generative flow model may include a first neural network.
  • the first neural network, the second neural network, and the third neural network may be multi-layer perceptrons (MLP).
  • MLP is a feedforward artificial neural network model that maps multiple input data sets to a single output data set.
  • the generative flow model may also include an embedding layer, which may embed causal relationships between multiple variables to obtain corresponding embedding representations.
  • the first neural network predicts the next causal relationship based on the causal relationship predicted in an iteration process.
  • the above "causal relationship predicted in a certain time" can be the first information
  • the first neural network can predict the next causal relationship based on the causal relationship predicted in the iteration process.
  • a piece of information for example, inputting the first information (or the embedded representation corresponding to the first information) into the first neural network
  • predicting the second information between multiple variables, and compared with the first information, the second information includes The number of causally related variable pairs is greater (for example, one more, or more than one).
  • the generative flow model in the embodiment of the present application does not directly sample multiple candidate causal relationships, and then selects the better one from the multiple candidate causal relationships. Instead, through sequence generation, in each iteration In the process, causal relationships between multiple variables are generated sequentially. Each generation is based on the previous generation result, and as the cause and effect As the relationship generation process proceeds, the causal relationships are continuously enriched.
  • causal discovery is transformed into a process of sampling a series of actions (that is, discovering new causal relationships) to generate composite objects (that is, causal relationships between multiple variables) by generating flow models.
  • the generated flow model based on the DAG structure can be used to connect the states (that is).
  • the state S is the adjacency matrix corresponding to the directed acyclic graph (the value is 0/1).
  • Action a is to mark the value of a certain position of the adjacency matrix as 1.
  • This flow model has a unique initial node S 0 , which is an adjacency matrix of all 0s, corresponding to nodes with no edge connections.
  • the probability that each of the multiple variable pairs has a causal relationship can be obtained by generating the first neural network in the flow model based on the first information; based on the multiple variable pairs The variable pair consisting of the first variable and the second variable has the highest probability of having the first causal relationship, and the second information is obtained.
  • the first neural network can select a variable pair from multiple variable pairs composed of multiple variables (the multiple variable pairs have no causal relationship in the first information), and the selected variable pair can be used in the second There is a causal relationship in the information.
  • the first information indicates that there is a causal relationship between M variable pairs among the plurality of variables
  • the second information indicates that there is a causal relationship between M+1 variable pairs
  • the M+1 variable pairs include the M variable pairs and a variable pair composed of the first variable and the second variable.
  • the first column represents the initial node S 0
  • the second column represents the edges that add x 1 ⁇ x 2 (top) and x 4 ⁇ x 1 (bottom) to the two causal graphs
  • the third column is Continuing to add edges based on the second column, you can find that the two matrices in the second column can point to the matrix in the middle of the third column, indicating that this status node can have multiple parent nodes.
  • a causal relationship can be selected based on certain constraint rules. variable pair. Or even if the selected variable pair (such as the first variable and the second variable in the embodiment of the present application) can make the graph corresponding to the second information a directed cyclic graph, the second information will not be used.
  • the target constraint can be obtained according to the first information; wherein the target constraint is used to constrain that there is no causal relationship between multiple variable pairs in the second information; each variable is expressed as Among the nodes in the graph, the node where the variable as the dependent variable is located points to the node where the variable as the effect variable is located; the target constraint is used to constrain the graph corresponding to the second information to be a directed acyclic graph.
  • the second information of the plurality of variables can be predicted by generating the first neural network in the flow model according to the first information and the target constraints.
  • the first neural network's selection of variable pairs can be constrained, so that the causal relationship added in the second information will not cause the graph corresponding to the second information to become a directed cyclic graph.
  • the plurality of variable pairs include a target variable pair, and the target variable pair includes a third variable and a fourth variable. It should be understood that the target variable pair can be any variable pair that cannot have a causal relationship in any second information indicated in the target constraint.
  • the The target constraint constrains the second information to indicate that the third variable is not a dependent variable of the fourth variable, and the fourth variable is not a result variable of the third variable.
  • the second information will not have the same causal relationship as the first information.
  • the gray box in the first information represents a variable pair with a causal relationship.
  • the shaded box on the left side of the first information represents the causal relationship: variable 1 causes variable 2, and the right side of the first information
  • variable 2 causes variable 3.
  • the box composed of the upper right to lower left line segments in the target constraint represents the causal relationship that cannot exist in the second information.
  • the target constraint can constrain the second The information cannot include the causal relationship that variable 1 causes variable 2, and it cannot include the causal relationship that variable 2 causes variable 3.
  • the The target constraint constrains the second information to indicate that the third variable does not serve as an effect variable of the fourth variable, and the fourth variable does not serve as a dependent variable of the third variable.
  • the gray box in the first information represents a variable pair with a causal relationship.
  • the shaded box on the left side of the first information represents the causal relationship: variable 1 causes variable 2, and the right side of the first information
  • variable 2 causes variable 3.
  • the box composed of line segments from the upper left to the lower right in the target constraint represents the causal relationship that cannot exist in the second information.
  • the target constraint can constrain the second information.
  • the second information cannot include the causal relationship that variable 2 causes variable 1, and it cannot include the causal relationship that variable 3 causes variable 2.
  • the target constraint constrains the second information to indicate that there is no relationship between the third variable and the fourth variable. There is a causal relationship.
  • the box composed of vertical lines in the target constraint represents a causal relationship that cannot exist in the second information.
  • the target constraint can constrain that the second information cannot include the causal relationship that variable 1 causes variable 1. , and cannot include the causal relationship that variable 2 causes variable 2, and cannot include the causal relationship that variable 3 causes variable 3.
  • each variable is represented as a node in the graph, and the node where the variable as the dependent variable is located points to the node where the variable as the effect variable is located; the graph corresponding to the first information indicates the third In the case where there is a connected path between a variable and the fourth variable, the target constraint constrains the second information to indicate that the third variable does not serve as the effect variable of the fourth variable, and the fourth variable does not as the dependent variable of the third variable.
  • the gray box in the first information represents a variable pair with a causal relationship.
  • the shaded box on the left side of the first information represents the causal relationship: variable 1 causes variable 2, and the right side of the first information shadow square
  • the causal relationship represented by the box is: variable 2 leads to variable 3, that is to say, there is a connection path from variable 1, variable 2 to variable 3 in the first information, the head is variable 1, and the tail is variable 3, which is equivalent to variable 1 can be indirect
  • the box composed of cross-line segments in the target constraint represents the causal relationship that cannot exist in the second information.
  • the target constraint can constrain that the second information cannot include the causal relationship that variable 3 leads to variable 1.
  • transitive closure C can describe whether a node can reach another node through a directed arrow (that is, whether there is a connecting path).
  • the actual directed acyclic graph is v 1 ⁇ v 2 ⁇ v 3 ⁇ v 4 , and in the transitive closure, there are arrows between v 1 and v 3, v 4 , v 2 , v 3 Same reason.
  • a 1 is the adjacency matrix corresponding to the actual DAG
  • a 2 is the adjacency matrix corresponding to the transitive closure.
  • v 3 and v 4 are the "descendants" of v 1 , and neither of them can have an arrow pointing to v 1 .
  • the adjacency matrix corresponding to the transitive closure can be transposed and intersected with the adjacency matrix of the first information, and then the target constraints can be obtained.
  • the mask matrix can be defined as:
  • the effective action set in this state is the position with a value of 0 in the mask matrix, and the position with a value of 1 cannot perform the action (for example, see Figure 11).
  • the first information can indicate the causal relationship that variable 1 leads to variable 2, and variable 2 leads to variable 3.
  • An adjacency matrix representing the causal relationship that repeats the first information, and an adjacency matrix representing the causal relationship of the variable itself are obtained respectively.
  • the adjacency matrix represents the causal relationship that connects the path in the first information.
  • the above adjacency matrices can be intersected to obtain the closure matrix.
  • the closure matrix can be transposed to obtain the adjacency matrix of the causal relationship that can be repeated with the first information and then intersect. Then the target constraints are obtained.
  • the complexity of each calculation step in the above solution to obtain the target matrix is O(1), and in the existing implementation, in order to be able to obtain
  • the causal relationship of a directed acyclic graph requires a calculation process of complexity O(d 3 ), where d is the number of variables. That is to say, in the embodiment of this application, the causal relationship is performed by using target constraints in the first neural network. Prediction can greatly reduce the complexity of operations while ensuring that the predicted causal relationship graph is a directed acyclic graph.
  • the first neural network when the first neural network predicts the causal relationship of multiple variables based on the first information, it can select at least one variable pair that satisfies the target constraint from multiple variable pairs composed of multiple variables according to the target constraint. variable pairs, and select a variable pair with a causal relationship in the second information from at least one variable pair.
  • the first neural network when the first neural network predicts the causal relationship of multiple variables based on the first information, the first neural network can select multiple variable pairs according to the target constraints and does not select multiple variable pairs that satisfy the target constraints.
  • the selection probability is assigned to 0 or a value close to 0, for example, it can be assigned to 1-5 , 1-4 , 1-5 , 1-6 , etc.
  • the first neural network predicts the causal relationship of multiple variables based on the first information, at least one variable pair that does not satisfy the target constraints will not be sampled.
  • the first information S i enters the network of the generated flow model as a state, and is passed in through embedding.
  • the first neural network masked by the mask matrix then samples an action a, so that another position of the adjacency matrix is marked as 1 (1 indicates that the variable pair has a causal relationship), and the second information is obtained, and then a state transition can be completed. .
  • the second information after obtaining the second information, it can be determined based on the second information whether the current round of iteration has ended (that is, whether the second information is a termination node).
  • the causal relationship prediction of multiple variables can be continued through the first neural network based on the second information.
  • the loss function can be determined and the generated flow model can be updated based on the loss function (or updated after other data of the batch complete the iteration) ), and start the next iteration process.
  • whether the terminal node is reached can be determined based on the adjacency matrix of the transitive closure calculated above. For example, when the adjacency matrix of the transitive closure can help identify a unique topological sequence, the terminal node is reached.
  • the difference between the input flow and the output flow of each intermediate state for example, the first information
  • difference minimization the difference between the input flow and the reward value of the termination node
  • the generative flow model can be updated according to this loss function, so that the generative flow model can gradually have the ability to find more accurate causal relationships between multiple variables.
  • the generative flow model can use the causal relationship between multiple variables as the state of the node, and transfer the state in sequence.
  • the intermediate state can be obtained based on the state of each node.
  • the updated generative flow model can repeatedly use the causal relationship between multiple variables as the state of the node, and transfer the states in sequence to construct a loss function, and update the generative flow model multiple times until the generative flow model converges.
  • the converged generative flow model can use the causal relationship between multiple variables as the state of the node, and transfer the state in sequence.
  • the causal relationship represented by the state of the termination node can be used as the causal relationship of multiple variables and output.
  • a plurality of third information can be obtained according to the first information, wherein the first information indicates that M variable pairs among the plurality of variables have a causal relationship, and each of the The third information indicates that there is a causal relationship between some group variables in the M variable pairs; the M is a positive integer greater than 1.
  • each third information can serve as a parent node of the first information.
  • the first information can contain M causal relationships, and the number of third information is also M.
  • Each third information is obtained by removing one causal relationship from the M causal relationships in the first information, that is, each third information
  • Three messages can indicate M-1 causal relationships.
  • the first information may indicate the following causal relationship: variable 1 causes variable 2, and variable 2 causes variable 3, the third information may include third information 1 and third information 2, and the third information 1 may indicate the variable 1 leads to variable 2, and the third information 1 may indicate that variable 2 leads to variable 3.
  • the first input flow (input flow) of the plurality of third information can be obtained through the second neural network in the generated flow model according to the plurality of third information, or the first input flow can be obtained (called the probability of the third information); wherein, the embedded representation of each third information can be obtained according to multiple third information, and the embedded representation of each third information is input to the second neural network to obtain each
  • the input traffic of the third information, and the sum of the input traffic of each third information may be the first input traffic of the plurality of third information, and the first input traffic may be understood as the traffic input to the first information.
  • the first output flow (output flow, or it can be called the third output flow) of the first information can be obtained through the third neural network in the generative flow model based on the first information. probability of a piece of information); wherein, the embedded representation of the first information can be obtained according to the first information, and the embedded representation of the first information can be input to the third neural network to obtain the output flow of the first information.
  • the difference between the first input flow and the first output flow (for example, minimizing the difference) is used to construct a loss function, and then the first can be updated according to the loss function.
  • neural network, the second neural network and the third neural network is used to construct a loss function, and then the first can be updated according to the loss function.
  • the input flow and reward value of the second information can be calculated, and based on the difference between the input flow and the reward value degree to construct the loss function.
  • the calculation process of the input flow and reward value of the second information is introduced:
  • a plurality of fourth information can be obtained according to the second information, wherein the third information indicates that N variable pairs among the plurality of variables have a causal relationship, and each of the The fourth information indicates that there is a causal relationship between some group variables in the N variable pairs; the N is a positive integer greater than 1; according to the plurality of fourth information, through the second step in the generative flow model
  • the neural network obtains the second input flow of the plurality of fourth information.
  • the calculation of the input flow rate of the second information reference may be made to the calculation of the input flow rate of the first information in the above embodiment, which will not be described again here.
  • a first reward value of the second information can be obtained according to the second information, where the first reward value represents the difference between the second information and the data set of the multiple variables.
  • the neural network is used to calculate the inflow and outflow of the node; for S 0 , only the outflow of the node is calculated; for S f , only the inflow is calculated , we take the G corresponding to S f Calculate the reward value as the reward value of the termination node.
  • the objective function of this invention is to satisfy the flow matching constraints so that the inflow of the node is equal to the outflow. The formula can be as follows:
  • the difference between its inflow value and outflow value or reward value can be calculated, and then the total loss is calculated for all nodes.
  • the inflow of nodes can be:
  • ⁇ s,a:T(s,a) s′ F ⁇ (s,a);
  • the method is to find all the parent nodes of the node and their actions, and pass them to the neural network for calculation.
  • the outflow from the node can be: ⁇ a′ ⁇ (s′) ⁇ a′ ⁇ (s′) F ⁇ (s′,a′);
  • the method is to pass the node into the neural network for calculation. There is an indicator function here to determine whether the node is an intermediate node.
  • the reward value of the termination node can be: ⁇ s′ ⁇ s f R(s′);
  • the reward function can be defined as:
  • the Bayesian information criterion can be used to judge the fitting degree of the model, and the exponential function is used to avoid the impact of negative values on the inflow equals outflow constraint.
  • the fully connected causal result corresponding to the second information can be obtained through the closure matrix, and its reward value can be calculated based on the fully connected causal structure.
  • a loss can be determined during each iteration, and the generative flow model can be updated based on the loss.
  • the generative flow model can have the ability to accurately identify the causal relationships of multiple variables. , and then a more accurate causal relationship between multiple variables can be obtained.
  • Figure 14 shows the single-step update framework of this embodiment.
  • the reward value is calculated for the termination node, and the intermediate node only calculates the inflow and outflow values.
  • the termination The judgment condition of a node is: identifying the unique topological sequence between all nodes.
  • S i enters the network of the generative flow model as a state, passes in the neural network that has been covered by the mask matrix through embedding, and then samples an action a, so that another position of the adjacency matrix is marked as 1, and it is completed once State transfer.
  • Si +1 we need to find all its parent nodes Sp and the action sets transferred from these parent nodes to Si +1 . After embedding the parent nodes, combine them with the action sets (a 1 ,..., an )
  • the incoming neural network calculates the inflow F(S p ⁇ S i+1 ) of node Si +1 .
  • the mask matrix and the adjacency matrix of the transfer closure need to be updated, as shown on the right side of Figure 14.
  • the termination node is reached, and the transitive closure covering the diagonal elements is returned as S f to calculate the reward value; if the sequence cannot be identified, then Continue sampling, go to the left in the judgment branch, embedding Si +1 , and pass it into the neural network to calculate the outflow F(S i +1 ⁇ Sc ) of node Si+1. Loss is calculated using flow matching constraints in the network.
  • the target constraint that can ensure that the second information is a directed acyclic graph may not be used. Therefore, the second information may It will become a directed cyclic graph or other graph that does not meet the requirements.
  • the first neural network when the first neural network predicts the second information based on the first information, data pairs with causal relationships can be predicted from the variable pairs indicating that there is no causal relationship in the first information, to obtain Second information, if the second information is a directed acyclic graph and does not meet the above-mentioned termination node conditions based on the target constraints, the first neural network can continue to predict the causal relationship of multiple variables based on the second information.
  • the second information is a directed cyclic graph or other graph that does not meet the requirements, the second information can be considered as the termination node and the current iteration ends, and the generated flow model is updated with the constructed loss.
  • a plurality of third information can be obtained according to the first information, wherein the first information indicates that the plurality of third information There is a causal relationship among the M variable pairs, and each of the third information indicates that there is a causal relationship between some of the M variable pairs; the M is a positive integer greater than 1; according to the multiple third information, through the second neural network in the generated flow model, the first input flow of the plurality of third information is obtained, and according to the first information, the second reward value of the first information is obtained , the second reward value represents the consistency between the first information and the joint distribution of the data set of multiple variables; according to the first information, through the third neural network in the generative flow model, we obtain The first output flow of the first information; wherein, the sum of the first output flow and the second reward value and the first input flow are used to construct a loss function, and then the loss function can be , update the first neural network, the second neural network and the third neural network.
  • a plurality of fourth information can be obtained according to the second information, wherein the third information indicates the plurality of There is a causal relationship between N variable pairs among the variables, and each of the fourth information indicates that there is a causal relationship between some group variables among the N variable pairs; the N is a positive integer greater than 1; according to the multiple fourth information, through the second neural network in the generated flow model, the second input flow of the plurality of fourth information is obtained; according to the second information, the first reward value of the second information is obtained , the first reward value represents the consistency between the second information and the joint distribution of the data set of multiple variables; wherein the difference between the second input flow and the first reward value is used to construct Loss function; update the first neural network, the second neural network and the third neural network according to the loss function.
  • Figure 16 shows a single-step update framework that is not based on the target constraint embodiment.
  • S enters the network that generates the flow model (such as MLP) as a state, samples an action a, and then determines whether a is in the valid action set. , if invalid, directly find all its parent nodes S p and the set of actions transferred from these parent nodes to S, pass them together to the neural network to calculate the inflow of node S, and use the reward function to calculate the reward value of S; if the action If it is valid, a state transition S ⁇ S ⁇ is completed. Calculate the reward value, inflow and outflow of S ⁇ in the same way. Finally, the flow matching objective function is used to calculate the loss function loss.
  • the flow model such as MLP
  • Embodiments of the present application provide a method for determining a causal relationship, which method includes: obtaining first information of multiple variables, where the first information indicates a causal relationship between the multiple variables; according to the first information , by generating the first neural network in the flow model, predicting the second information of the plurality of variables; wherein the second information indicates that there is a first difference between the first variable and the second variable in the plurality of variables.
  • Causal relationship the first information indicates that there is no first causal relationship between the first variable and the second variable, and the first variable and the second variable are different.
  • the causal relationship between variables is identified through sequence generation.
  • the generative flow model can be equipped with the ability to generate better causal relationship sequences without the need to sample a large number of causal sequences from multiple causal sequences. Select the better one from the causal sequence to reduce the computational cost and improve the convergence speed of the model.
  • the embodiment of the present application also provides a method for determining causality, which method includes:
  • the variables include the user's operation type and at least one target variable, the target variable is at least one of the following :
  • the attribute information of the item and the attribute information of the user are the attribute information of the item and the attribute information of the user.
  • the second information of the plurality of variables is predicted by generating a first neural network in the flow model;
  • the second information indicates that there is a first causal relationship between the first variable and the second variable among the plurality of variables; the first information indicates that there is no such relationship between the first variable and the second variable. In the first causal relationship, the first variable and the second variable are different.
  • the user's attribute information includes at least one of the following: gender, age, occupation, income, hobbies, and education level.
  • the attribute information of the item includes at least one of the following: item name, developer, installation package size, category, and favorable rating.
  • the user's attribute information may be attributes related to the user's preference characteristics, including at least one of gender, age, occupation, income, hobbies, and educational level.
  • the gender may be male or female, and the age may be 0-100.
  • the number between, the occupation can be teachers, programmers, chefs, etc.
  • the hobbies can be basketball, tennis, running, etc.
  • the education level can be elementary school, junior high school, high school, university, etc.; this application does not limit the user's The specific type of attribute information;
  • the items can be physical items or virtual items, such as APPs, audio and video, web pages, and
  • the attribute information of the item can be at least one of the item name, developer, installation package size, category, and rating.
  • the item category can be chat, run, etc. Cool games, office games, etc., the favorable rating can be ratings, comments, etc. for the item; this application does not limit the specific type of attribute information of the item;
  • the operation type can be the user's behavior operation type for items.
  • items On network platforms and applications, users often have various forms of interaction with items (that is, there are multiple operation types), such as user behavior on e-commerce platforms.
  • the types of operations such as browsing, clicking, adding to shopping cart, and purchasing.
  • causal relationship between multiple variables finally obtained by generating the flow model may include a causal relationship between at least one target variable and the user's operation type.
  • the embodiment of the present application also provides a method for determining causality, which method includes:
  • first information of a plurality of variables the first information indicating a causal relationship between the plurality of variables, the variables including attribute information of the target object;
  • the target object is a chip, and the attribute information is a partial fragment or fault information of the chip; or,
  • the target object is a node of the communication network, and the target variable is the key performance indicator KPI, operating data or alarm information of the network element;
  • the second information of the plurality of variables is predicted by generating a first neural network in the flow model;
  • the second information indicates that there is a first causal relationship between the first variable and the second variable among the plurality of variables; the first information indicates that there is no such relationship between the first variable and the second variable. In the first causal relationship, the first variable and the second variable are different.
  • the local segment of the chip can be a local area of the chip surface
  • the multiple local segments can be multiple local areas of the chip surface
  • the area size and the outer contour shape of any two local segments among the multiple local segments are the same.
  • the same area size between local segments can be understood as the same area of the area where the local segments are located
  • the same external outline shape between local segments can be understood as the same external outline shape of the area where the local segments are located, for example, they are all squares. , or a rectangle with a consistent aspect ratio, etc.; wherein, in a possible implementation, the area of each local segment among the plurality of local segments is within a preset range, and the area of each local segment cannot be too large. It cannot be too small.
  • the area size of the local fragment can be related to the size of the chip.
  • the larger the size of the chip the larger the area of the local fragment.
  • the area of the local fragment and the area of the chip can maintain a certain ratio.
  • the area size of the local fragment It can also be related to the gap length between the basic units on the chip.
  • the side length of the local segment can be set to a preset multiple of the gap length between the basic units (such as the copper-plated polygon area on the chip), such as 3 times. , 4 times, 5 times, etc.
  • Each local segment may include arranged devices and/or connecting lines between devices.
  • the local segment may specifically obtain image information of each local segment or other information that can express the local segment. Information on the device arrangement or connection line structure, based on which the structural characteristics of the local fragment can be uniquely determined;
  • the fault information of the chip may include the number of occurrences of each local segment in the diagnostic report; or, the probability that each local segment causes a chip failure in the faulty chip, etc.;
  • KPI can be used to measure the operating status of network elements in the communication network.
  • anomaly detection equipment collects observation data of each KPI at different times.
  • Figure 17 is a structural diagram of a causal relationship determination device provided by an embodiment of the present application.
  • the device 1700 includes:
  • the acquisition module 1701 is used to acquire first information of multiple variables, where the first information indicates the causal relationship between the multiple variables;
  • step 701 For a specific description of the acquisition module 1701, reference may be made to the description of step 701 in the above embodiment, which will not be described again here.
  • the causal prediction module 1702 is configured to predict the second information of the plurality of variables according to the first information by generating the first neural network in the flow model; wherein,
  • the second information indicates that there is a first causal relationship between the first variable and the second variable among the plurality of variables; the first information indicates that there is no such relationship between the first variable and the second variable. In the first causal relationship, the first variable and the second variable are different.
  • causal prediction module 1702 For a specific description of the causal prediction module 1702, reference may be made to the description of step 702 in the above embodiment, which will not be described again here.
  • the first information indicates that there is a causal relationship between X pairs of variables among the multiple variables
  • the second information indicates that there is a causal relationship between X+1 pairs of variables, where X+1 variables A pair includes X variable pairs and a variable pair consisting of a first variable and a second variable.
  • each variable is one of the following:
  • a characteristic dimension of image data a characteristic dimension of text data, a characteristic dimension of audio data, and a characteristic dimension of video data.
  • the device further includes:
  • the model update module 1703 is configured to obtain the first input flow of the first information through the second neural network in the generated flow model according to the first information;
  • the first output flow of the first information is obtained through the third neural network in the generated flow model; wherein the difference between the first input flow and the first output flow is Used to get the loss function;
  • the first neural network, the second neural network and the third neural network are updated.
  • model update module 1703 is specifically used to:
  • a plurality of third information is obtained, wherein the first information indicates that there is a causal relationship between variables of M variable pairs, and each of the third information indicates that among the M variable pairs There is a causal relationship between the variables of some variable pairs;
  • the M is a positive integer greater than 1;
  • the first input flow of the first information is obtained through the second neural network in the generated flow model.
  • the partial variable pairs are M-1 variable pairs among the M variable pairs.
  • the device further includes:
  • Model update module 1703 configured to obtain a second reward value of the first information based on the first information, where the second reward value represents the joint distribution of the first information and the data set of the multiple variables. degree of agreement;
  • the difference between the first input flow and the first output flow is used to construct a loss function, including:
  • the sum of the first output flow and the second reward value and the first input flow are used to construct a loss function.
  • the device further includes:
  • the model update module 1703 is used to obtain the second input flow of the second information through the second neural network in the generated flow model
  • the first reward value of the second information is obtained through the third neural network in the generated flow model; wherein the difference between the second input flow and the first reward value Used to construct the loss function;
  • the first neural network, the second neural network and the third neural network are updated.
  • obtaining the second input flow of the second information through the second neural network in the generative flow model according to the second information includes:
  • a plurality of fourth information is obtained, wherein the second information indicates that there is a causal relationship between variables of N variable pairs, and each of the fourth information indicates that among the N variable pairs There is a causal relationship between the variables of some variable pairs; the N is a positive integer greater than 1;
  • a second input flow of the second information is obtained through the second neural network in the generated flow model.
  • model update module 1703 is also used to:
  • the second information corresponds to the first graph
  • each variable corresponds to a node in the first graph
  • the node corresponding to the variable as the dependent variable in the second information points to The node corresponding to the variable as the fruit variable
  • the model update module 1703 is also used to:
  • the step of obtaining the first reward value of the second information according to the second information is triggered.
  • the device further includes:
  • a constraint acquisition module configured to acquire target constraints according to the first information; wherein the target constraints are used to constrain multiple variable pairs that do not have causal relationships in the second information;
  • Predicting the second information of the plurality of variables based on the first information by generating the first neural network in the flow model includes:
  • second information of the plurality of variables is predicted by generating a first neural network in the flow model.
  • the second information corresponds to the first graph, and each variable corresponds to the first graph.
  • the node in the node corresponding to the variable as the dependent variable in the second information points to the node corresponding to the variable as the effect variable; the target constraint is used to constrain the first graph to be a directed acyclic graph.
  • the plurality of variable pairs include a target variable pair, and the target variable pair is composed of a third variable and a fourth variable;
  • the target constraint constrains the second
  • the information indicates that the third variable is not a causal variable of the fourth variable, and the fourth variable is not a dependent variable of the third variable;
  • the target constraint constrains the second information to indicate that there is no causal relationship between the third variable and the fourth variable.
  • the causal prediction module is specifically used to:
  • the probability of the existence of a causal relationship for each of the plurality of variable pairs is obtained;
  • the second information is obtained based on the fact that the variable pair consisting of the first variable and the second variable among the plurality of variable pairs has the highest probability of having the first causal relationship.
  • the embodiment of the present application also provides a causal relationship determination device, which includes:
  • Obtaining module configured to obtain first information of multiple variables, the first information indicating the causal relationship between the multiple variables, the variables include the user's operation type and at least one target variable, the target variable is At least one of the following:
  • the attribute information of the item and the attribute information of the user are the attribute information of the item and the attribute information of the user.
  • a causal prediction module configured to predict second information of the plurality of variables based on the first information by generating a first neural network in the flow model;
  • the second information indicates that there is a first causal relationship between the first variable and the second variable among the plurality of variables; the first information indicates that there is no such relationship between the first variable and the second variable. In the first causal relationship, the first variable and the second variable are different.
  • the user's attribute information includes at least one of the following: gender, age, occupation, income, hobbies, and education level.
  • the attribute information of the item includes at least one of the following: item name, developer, installation package size, category, and favorable rating.
  • the first information indicates that there is a causal relationship between X pairs of variables among the multiple variables
  • the second information indicates that there is a causal relationship between X+1 pairs of variables, where X+1 variables A pair includes X variable pairs and a variable pair consisting of a first variable and a second variable.
  • each variable is one of the following:
  • a characteristic dimension of image data a characteristic dimension of text data, a characteristic dimension of audio data, and a characteristic dimension of video data.
  • the device further includes:
  • a model update module configured to obtain the first input flow of the first information through the second neural network in the generated flow model according to the first information
  • the first output flow of the first information is obtained through the third neural network in the generated flow model; wherein the difference between the first input flow and the first output flow is Used to get the loss function;
  • the first neural network, the second neural network and the third neural network are updated.
  • model update module is specifically used to:
  • a plurality of third information is obtained, wherein the first information indicates that there is a causal relationship between variables of M variable pairs, and each of the third information indicates that among the M variable pairs There is a causal relationship between the variables of some variable pairs;
  • the M is a positive integer greater than 1;
  • the first input flow of the first information is obtained through the second neural network in the generated flow model.
  • the partial variable pairs are M-1 variable pairs among the M variable pairs.
  • the device further includes:
  • a model update module configured to obtain a second reward value of the first information based on the first information, where the second reward value represents the joint distribution of the first information and the data set of the multiple variables. Goodness of fit;
  • the difference between the first input flow and the first output flow is used to construct a loss function, including:
  • the sum of the first output flow and the second reward value and the first input flow are used to construct a loss function.
  • the device further includes:
  • a model update module configured to obtain the second input flow of the second information through the second neural network in the generated flow model
  • the first reward value of the second information is obtained through the third neural network in the generated flow model; wherein the difference between the second input flow and the first reward value Used to construct the loss function;
  • the first neural network, the second neural network and the third neural network are updated.
  • obtaining the second input flow of the second information through the second neural network in the generative flow model according to the second information includes:
  • a plurality of fourth information is obtained, wherein the second information indicates that there is a causal relationship between variables of N variable pairs, and each of the fourth information indicates that among the N variable pairs There is a causal relationship between the variables of some variable pairs; the N is a positive integer greater than 1;
  • a second input flow of the second information is obtained through the second neural network in the generated flow model.
  • model update module is also used to:
  • the second information corresponds to the first graph
  • each variable corresponds to a node in the first graph
  • the node corresponding to the variable serving as the dependent variable in the second information points to The node corresponding to the variable as the fruit variable
  • the model update module is also used to:
  • the step of obtaining the first reward value of the second information according to the second information is triggered.
  • the device further includes:
  • a constraint acquisition module configured to acquire target constraints according to the first information; wherein the target constraints are used to constrain multiple variable pairs that do not have causal relationships in the second information;
  • Predicting the second information of the plurality of variables based on the first information by generating the first neural network in the flow model includes:
  • second information of the plurality of variables is predicted by generating a first neural network in the flow model.
  • the second information corresponds to the first graph
  • each variable corresponds to a node in the first graph
  • the node corresponding to the variable as the dependent variable in the second information points to The node corresponding to the variable that is the effect variable
  • the target constraint is used to constrain the first graph to be a directed acyclic graph.
  • the plurality of variable pairs include a target variable pair, and the target variable pair is composed of a third variable and a fourth variable;
  • the target constraint constrains the second
  • the information indicates that the third variable is not a causal variable of the fourth variable, and the fourth variable is not a dependent variable of the third variable;
  • the target constraint constrains the second information to indicate that there is no causal relationship between the third variable and the fourth variable.
  • the causal prediction module is specifically used to:
  • the probability of the existence of a causal relationship for each of the plurality of variable pairs is obtained;
  • the second information is obtained based on the fact that the variable pair consisting of the first variable and the second variable among the plurality of variable pairs has the highest probability of having the first causal relationship.
  • the embodiment of the present application also provides a causal relationship determination device, which includes:
  • An acquisition module configured to acquire first information of multiple variables, where the first information indicates the causal relationship between the multiple variables, where the variables include attribute information of the target object; wherein,
  • the target object is a chip, and the attribute information is a partial fragment or fault information of the chip; or,
  • the target object is a node of the communication network, and the target variable is the key performance indicator KPI, operating data or alarm information of the network element;
  • a causal prediction module configured to predict second information of the plurality of variables based on the first information by generating a first neural network in the flow model;
  • the second information indicates that there is a first causal relationship between the first variable and the second variable among the plurality of variables; the first information indicates that there is no such relationship between the first variable and the second variable. In the first causal relationship, the first variable and the second variable are different.
  • the first information indicates that there is a causal relationship between X pairs of variables among the multiple variables
  • the second information indicates that there is a causal relationship between X+1 pairs of variables, where X+1 variables
  • the pair consists of X pairs of variables and is represented by A variable pair consisting of the first variable and the second variable.
  • each variable is one of the following:
  • a characteristic dimension of image data a characteristic dimension of text data, a characteristic dimension of audio data, and a characteristic dimension of video data.
  • the device further includes:
  • a model update module configured to obtain the first input flow of the first information through the second neural network in the generated flow model according to the first information
  • the first output flow of the first information is obtained through the third neural network in the generated flow model; wherein the difference between the first input flow and the first output flow is Used to obtain the loss function;
  • the first neural network, the second neural network and the third neural network are updated.
  • model update module is specifically used to:
  • a plurality of third information is obtained, wherein the first information indicates that there is a causal relationship between variables of M variable pairs, and each of the third information indicates that among the M variable pairs There is a causal relationship between the variables of some variable pairs;
  • the M is a positive integer greater than 1;
  • the first input flow of the first information is obtained through the second neural network in the generated flow model.
  • the partial variable pairs are M-1 variable pairs among the M variable pairs.
  • the device further includes:
  • a model update module configured to obtain a second reward value of the first information based on the first information, where the second reward value represents the joint distribution of the first information and the data set of the multiple variables. Goodness of fit;
  • the difference between the first input flow and the first output flow is used to construct a loss function, including:
  • the sum of the first output flow and the second reward value and the first input flow are used to construct a loss function.
  • the device further includes:
  • a model update module configured to obtain the second input flow of the second information through the second neural network in the generated flow model
  • the first reward value of the second information is obtained through the third neural network in the generated flow model; wherein the difference between the second input flow and the first reward value Used to construct the loss function;
  • the first neural network, the second neural network and the third neural network are updated.
  • obtaining the second input flow of the second information through the second neural network in the generative flow model according to the second information includes:
  • a plurality of fourth information is obtained, wherein the second information indicates that there is a causal relationship between variables of N variable pairs, and each of the fourth information indicates that among the N variable pairs There is a causal relationship between the variables of some variable pairs; the N is a positive integer greater than 1;
  • the second information is obtained through the second neural network in the generative flow model of the second input flow.
  • model update module is also used to:
  • the second information corresponds to the first graph
  • each variable corresponds to a node in the first graph
  • the node corresponding to the variable as the dependent variable in the second information points to The node corresponding to the variable as the fruit variable
  • the model update module is also used to:
  • the step of obtaining the first reward value of the second information according to the second information is triggered.
  • the device further includes:
  • a constraint acquisition module configured to acquire target constraints according to the first information; wherein the target constraints are used to constrain multiple variable pairs that do not have causal relationships in the second information;
  • Predicting the second information of the plurality of variables based on the first information by generating the first neural network in the flow model includes:
  • second information of the plurality of variables is predicted by generating a first neural network in the flow model.
  • the second information corresponds to the first graph
  • each variable corresponds to a node in the first graph
  • the node corresponding to the variable as the dependent variable in the second information points to The node corresponding to the variable that is the effect variable
  • the target constraint is used to constrain the first graph to be a directed acyclic graph.
  • the plurality of variable pairs include a target variable pair, and the target variable pair is composed of a third variable and a fourth variable;
  • the target constraint constrains the second
  • the information indicates that the third variable is not a causal variable of the fourth variable, and the fourth variable is not a dependent variable of the third variable;
  • the target constraint constrains the second information to indicate that there is no causal relationship between the third variable and the fourth variable.
  • the causal prediction module is specifically used to:
  • the probability of the existence of a causal relationship for each of the plurality of variable pairs is obtained;
  • the second information is obtained based on the fact that the variable pair consisting of the first variable and the second variable among the plurality of variable pairs has the highest probability of having the first causal relationship.
  • FIG. 18 is a schematic structural diagram of an execution device provided by an embodiment of the present application.
  • the execution device 1800 can be embodied as a mobile phone, a tablet, a notebook computer, Smart wearable devices, etc. are not limited here.
  • the execution device 1800 includes: a receiver 1801, a transmitter 1802, a processor 1803 and a memory 1804 (the number of processors 1803 in the execution device 1800 may be one or more, one processor is taken as an example in Figure 18) , wherein the processor 1803 may include an application processor 18031 and a communication processor 18032.
  • receiver 1801, transmitter 1802, processor 1803 and Memory 1804 may be connected via a bus or other means.
  • Memory 1804 may include read-only memory and random access memory and provides instructions and data to processor 1803 .
  • a portion of memory 1804 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • the memory 1804 stores processor and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, where the operating instructions may include various operating instructions for implementing various operations.
  • the processor 1803 controls the execution of operations of the device.
  • various components of the execution device are coupled together through a bus system.
  • the bus system may also include a power bus, a control bus, a status signal bus, etc.
  • various buses are called bus systems in the figure.
  • the methods disclosed in the above embodiments of the present application can be applied to the processor 1803 or implemented by the processor 1803.
  • the processor 1803 may be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above method can be completed by instructions in the form of hardware integrated logic circuits or software in the processor 1803 .
  • the above-mentioned processor 1803 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, and can further include an application specific integrated circuit (ASIC), a field programmable Gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field-programmable gate array
  • the processor 1803 can implement or execute each method, step and logical block diagram disclosed in the embodiment of this application.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • the steps of the method disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field.
  • the storage medium is located in the memory 1804.
  • the processor 1803 reads the information in the memory 1804 and completes the steps of the above method in combination with its hardware.
  • the receiver 1801 may be used to receive input numeric or character information and generate signal inputs related to performing relevant settings and functional controls of the device.
  • the transmitter 1802 can be used to output numeric or character information; the transmitter 1802 can also be used to send instructions to the disk group to modify data in the disk group.
  • the processor 1803 is configured to execute the steps of the causal relationship determination method in the corresponding embodiment of FIG. 7 .
  • FIG. 19 is a schematic structural diagram of the server provided by the embodiment of the present application.
  • the server 1900 is implemented by one or more servers.
  • the server 1900 can be configured or There is a relatively large difference due to different performance, which may include one or more central processing units (CPU) 1919 (for example, one or more processors) and memory 1932, and one or more storage applications 1942 or data 1944 storage medium 1930 (eg, one or more mass storage devices).
  • the memory 1932 and the storage medium 1930 may be short-term storage or persistent storage.
  • the program stored in the storage medium 1930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server.
  • the central processor 1919 may be configured to communicate with the storage medium 1930 and execute a series of instruction operations in the storage medium 1930 on the server 1900 .
  • Server 1900 may also include one or more power supplies 1920, one or more wired or wireless networks Interface 1950, one or more input and output interfaces 1958; or, one or more operating systems 1941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • one or more operating systems 1941 such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • the central processor 1919 is used to execute the steps of the causal relationship determination method in the corresponding embodiment of FIG. 7 .
  • An embodiment of the present application also provides a computer program product including computer readable instructions, which when run on a computer causes the computer to perform the steps performed by the foregoing execution device, or causes the computer to perform the steps performed by the foregoing training device. A step of.
  • Embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium stores a program for performing signal processing.
  • the program When the program is run on a computer, it causes the computer to perform the steps performed by the aforementioned execution device. , or, causing the computer to perform the steps performed by the aforementioned training device.
  • the execution device, training device or terminal device provided by the embodiment of the present application may specifically be a chip.
  • the chip includes: a processing unit and a communication unit.
  • the processing unit may be, for example, a processor.
  • the communication unit may be, for example, an input/output interface. Pins or circuits, etc.
  • the processing unit can execute the computer execution instructions stored in the storage unit, so that the chip in the execution device performs the causal relationship determination method described in the above embodiment, or so that the chip in the training device executes the method related to model training in the above embodiment. step.
  • the storage unit is a storage unit within the chip, such as a register, cache, etc.
  • the storage unit may also be a storage unit located outside the chip in the wireless access device, such as Read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM), etc.
  • ROM Read-only memory
  • RAM random access memory
  • Figure 20 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • the chip can be represented as a neural network processor NPU 2000.
  • the NPU 2000 serves as a co-processor and is mounted to the main CPU (Host). CPU), tasks are allocated by the Host CPU.
  • the core part of the NPU is the arithmetic circuit 2003.
  • the arithmetic circuit 2003 is controlled by the controller 2004 to extract the matrix data in the memory and perform multiplication operations.
  • the computing circuit 2003 includes multiple processing units (Process Engine, PE).
  • arithmetic circuit 2003 is a two-dimensional systolic array.
  • the arithmetic circuit 2003 may also be a one-dimensional systolic array or other electronic circuit capable of performing mathematical operations such as multiplication and addition.
  • arithmetic circuit 2003 is a general-purpose matrix processor.
  • the arithmetic circuit obtains the corresponding data of matrix B from the weight memory 2002 and caches it on each PE in the arithmetic circuit.
  • the operation circuit takes matrix A data and matrix B from the input memory 2001 to perform matrix operations, and the partial result or final result of the obtained matrix is stored in an accumulator (accumulator) 2008.
  • the unified memory 2006 is used to store input data and output data.
  • the weight data directly passes through the storage unit access controller (Direct Memory Access Controller, DMAC) 2005, and the DMAC is transferred to the weight memory 2002.
  • the input data is also transferred to unified memory 2006 via DMAC.
  • DMAC Direct Memory Access Controller
  • BIU is the Bus Interface Unit, that is, the bus interface unit 2010, which is used for the interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 2009.
  • IFB Instruction Fetch Buffer
  • the Bus Interface Unit 2010 (BIU for short) is used to fetch the memory 2009 to obtain instructions from the external memory, and is also used for the storage unit access controller 2005 to obtain the input matrix A or weight moment from the external memory. The original data of array B.
  • DMAC is mainly used to transfer the input data in the external memory DDR to the unified memory 2006 or the weight data to the weight memory 2002 or the input data to the input memory 2001 .
  • the vector calculation unit 2007 includes multiple arithmetic processing units, and if necessary, further processes the output of the arithmetic circuit, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc.
  • vector calculation unit 2007 can store the processed output vectors to unified memory 2006 .
  • the vector calculation unit 2007 can apply a linear function; or a nonlinear function to the output of the operation circuit 2003, such as linear interpolation on the feature plane extracted by the convolution layer, or a vector of accumulated values, to generate an activation value.
  • vector calculation unit 2007 generates normalized values, pixel-wise summed values, or both.
  • the processed output vector can be used as an activation input to the arithmetic circuit 2003, such as for use in a subsequent layer in a neural network.
  • the instruction fetch buffer 2009 connected to the controller 2004 is used to store instructions used by the controller 2004;
  • the unified memory 2006, the input memory 2001, the weight memory 2002 and the fetch memory 2009 are all On-Chip memories. External memory is private to the NPU hardware architecture.
  • the processor mentioned in any of the above places can be a general central processing unit, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of the above programs.
  • the device embodiments described above are only illustrative.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physically separate.
  • the physical unit can be located in one place, or it can be distributed across multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • the connection relationship between modules indicates that there are communication connections between them, which can be specifically implemented as one or more communication buses or signal lines.
  • the present application can be implemented by software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including dedicated integrated circuits, dedicated CPUs, dedicated memories, Special components, etc. to achieve. In general, all functions performed by computer programs can be easily implemented with corresponding hardware. Moreover, the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special-purpose circuits. circuit etc. However, for this application, software program implementation is a better implementation in most cases. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or that contributes to the existing technology.
  • the computer software product is stored in a readable storage medium, such as a computer floppy disk. , U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to cause a computer device (which can be a personal computer, training device, or network device, etc.) to execute the steps described in various embodiments of this application. method.
  • a computer device which can be a personal computer, training device, or network device, etc.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, the computer instructions may be transferred from a website, computer, training device, or data
  • the center transmits to another website site, computer, training equipment or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means.
  • wired such as coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless such as infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that a computer can store, or a data storage device such as a training device or a data center integrated with one or more available media.
  • the available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk (Solid State Disk, SSD)), etc.

Abstract

一种因果关系确定方法,涉及人工智能领域,方法包括:获取生成流模型对多个变量预测的指示多个变量之间的因果关系的第一信息,并根据第一信息,通过生成流模型,预测多个变量的第二信息;其中,第二信息指示多个变量中的第一变量和第二变量之间存在第一因果关系,且第一信息指示第一变量和第二变量之间不存在第一因果关系。本申请通过序列生成的方式来识别变量之间的因果关系,随着生成流模型的迭代更新,可以使得生成流模型具备生成较优的因果关系序列的能力,而无需采样大量的因果序列而从多个因果序列中选择较优的,降低算力开销,提高模型的收敛速度。

Description

一种因果关系确定方法及相关设备
本申请要求于2022年5月13日提交中国专利局、申请号为202210521841.1、发明名称为“一种因果关系确定方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能领域,尤其涉及一种因果关系确定方法及相关设备。
背景技术
因果关系(causality或causation)是一个变量(即“因”)和第二个变量(即“果”)之间的作用关系,其中后一变量被认为是前一变量的结果。
在现有的实现中,基于强化学习来实现数据集中变量之间的因果关系识别,该技术利用强化学习搜索到打分最高的因果序列。该技术首先对数据集进行编码,将每一列编码为一个状态,此时所有状态的顺序是随机的,然后利用马尔科夫链确定顺序进行解码,生成动作序列(a0,a1,…,aT),该序列即对应某一因果序列,通过有向无环约束函数可以约束每个因果序列对应的图为有向无环图。也就是说,现有技术通过遍历大量的因果序列,并基于各个因果序列的打分来选择较准确的因果关系,而为了得到更准确的因果关系则需要遍历大量的因果序列。随着搜索空间(也就是数据量、变量数量)的上涨,需要较大的算力消耗和运行时长消耗。
发明内容
本申请提供了一种因果关系确定方法,可以降低算力开销,提高模型的收敛速度。
第一方面,本申请提供了一种因果关系确定方法,方法包括:获取多个变量的第一信息,第一信息可以为生成流模型中的第一神经网络对数据集的多个变量进行因果关系预测的一个中间输出,第一信息指示多个变量之间的因果关系;根据第一信息,通过生成流模型中的第一神经网络,预测多个变量的第二信息;其中,第二信息指示多个变量中的第一变量和第二变量之间存在第一因果关系;第一信息指示第一变量和第二变量之间不存在第一因果关系,第一变量和第二变量不同,相当于第二信息是基于第一信息预测的另一个因果关系,且第二信息包含比第一信息更丰富的因果关系。
为了识别出数据集(包括多个数据)的多个变量之间的因果关系,可以获取到待识别的数据集(包括多个数据),并将数据集(或者数据集中的多个变量)输入到用于进行因果关系确定的模型(例如本申请实施例中的生成流模型(或者称之为基于流的生成流模型或者生成模型))中,生成流模型在一次迭代的过程中,可以多次预测多个变量之间的因果关系,其中,可以基于上一次预测的因果关系,进行下一次因果关系的预测,其中,“下一次”因果关系预测的结果中包括了“上一次”因果关系预测中的存在的因果关系,且还包括新预测的一个变量对之间的因果关系,直到预测的结果中满足一次迭代的终止条件。其中,第一神经网络根据一次迭代过程中某一次预测的因果关系,进行下一次因果关系的预测, 例如,上述“某一次预测的因果关系”可以为第一信息,第一神经网络可以根据第一信息(例如将第一信息(或者第一信息对应的嵌入表示)输入到第一神经网络中),预测多个变量之间的第二信息,第二信息相比第一信息,所包括的存在因果关系的变量对的数量更多(示例性的,数量多一个,或者数量多超过一个)。
在一种可能的实现中,多个变量的因果关系可以包括多个变量中各个变量对的因果关系,变量对可以由两个变量组成。变量对的因果关系可以理解为变量对包括的变量之间的因果关系。
在一种可能的实现中,变量之间的因果关系(以变量A和变量B为例)可以理解为变量A导致变量B,也就是变量A作为变量B的因变量,变量B作为变量A的果变量。也就是,在其他条件均不变的情况下,变量A的改变会导致变量B的改变。
在一种可能的实现中,第一信息可以指示变量之间的直接因果关系,也可以指示变量之间的间接因果关系。例如,第一信息可以指示变量A导致变量B,以及变量B导致变量C,进而,第一信息可以基于“变量A导致变量B,以及变量B导致变量C”的直接因果关系,得到:变量A导致变量C的间接因果关系,相当于第一信息也可以指示变量A导致变量C。变量之间的间接因果关系可以理解为一个变量为另一个变量的始祖节点(非直接相连的父节点)。
可见,本申请实施例中的生成流模型不是直接采样得到多个候选的因果关系,然后从多个候选的因果关系中选择较好的,而是,通过序列生成的方式,在每一次迭代的过程中,依次生成多个变量之间的因果关系,每一次生成都是基于上次一的生成结果,且随着因果关系生成过程的进行,因果关系是不断丰富的。本实施例通过序列生成的方式来识别变量之间的因果关系,随着生成流模型的迭代更新,可以使得生成流模型具备生成较优的因果关系序列的能力,而无需采样大量的因果序列而从多个因果序列中选择较优的,进而可以降低算力开销,提高模型的收敛速度。
在一种可能的实现中,第一信息指示多个变量中的X个变量对之间存在因果关系,第二信息指示X+1个变量对之间存在因果关系,其中,X+1个变量对包括X个变量对以及由第一变量和第二变量构成的变量对,X为正整数。也就是说,第二信息会包含第一信息指示的因果关系以及新预测得到的因果关系(第一因果关系)。
在一种可能的实现中,变量可以为数据的一个特征。
在一种可能的实现中,变量可以为图像数据的一个特征维度,例如可以为图像中的某一个语义,例如包括人像的图像中的耳朵区域、眼镜区域等,还可以为图像中的一个像素通道,例如R通道、G通道、B通道等。相应的,变量的数据可以为图像数据在该特征维度上的数据,例如人像的图像中的耳朵区域的像素值、眼镜区域的像素值等,还可以为图像的R通道的像素值、G通道的像素值、B通道的像素值等。又例如,变量可以为芯片的某一类局部片段,变量的数据可以为芯片的某一类局部片段的图像。
在一种可能的实现中,变量可以为文本数据的一个特征维度,例如可以为故障的一个根因。例如可以为通信网络的KPI、计算机事务的所调用的节点,相应地,变量的数据可以为通信网络的KPI的具体数值,计算机事务的所调用的节点的信息等。
在一种可能的实现中,在推荐场景中,变量可以为物品的属性信息、用户的属性信息、用户的操作行为等。
在一种可能的实现中,变量还可以为音频数据的一个特征维度、视频数据的一个特征维度等等。
在一种可能的实现中,根据第一信息,通过生成流模型中的第一神经网络,预测多个数据的第二信息,包括:根据第一信息,通过生成流模型中的第一神经网络,得到多个变量对中每个变量对存在因果关系的概率;基于多个变量对中由第一数据和第二数据构成的变量对存在第一因果关系的概率最高,得到第二信息。也就是说,第一神经网络可以从多个变量构成的多个变量对(多个变量对在第一信息中不具备因果关系)中选择一个变量对,该选择出的变量对可以在第二信息中具备因果关系。
为了保证选择出的变量对(例如本申请实施例中的第一变量和第二变量)能够使得第二信息对应的图为有向无环图,可以基于一定的约束规则来选择具备因果关系的变量对。或者即使选择出的变量对能够使得第二信息对应的图为有向有环图,但是第二信息不会被采用。接下来分别针对于这两种方式进行介绍:
方式1:基于目标约束
在一种可能的实现中,可以根据第一信息,获取目标约束;其中,目标约束用于约束第二信息中的多个变量对不存在因果关系;每个变量表示为图中的节点,作为因变量的变量所在的节点指向作为果变量的变量所在的节点;目标约束用于约束第二信息对应的图为有向无环图。相应的,可以根据第一信息以及目标约束,通过生成流模型中的第一神经网络,预测多个变量的第二信息。
也就是说,通过目标约束,可以约束第一神经网络对变量对的选择,进而使得第二信息中增加的因果关系不会导致第二信息对应的图成为有向有环图。
在一种可能的实现中,多个变量对包括目标变量对,目标变量对包括第三变量和第四变量。应理解,目标变量对可以为目标约束中指示的任意一个第二信息中不能存在因果关系的变量对。
在一种可能的实现中,在第一信息指示第三变量作为第四变量的因变量、且第四变量作为第三变量的果变量的情况下,目标约束约束第二信息指示第三变量不作为第四变量的果变量、且第四变量不作为第三变量的因变量。应理解,第一信息可以指示第三变量和第四变量之间存在直接的因果关系,第一信息也可以指示第三变量和第四变量之间存在间接的因果关系。
也就是说,在第二信息中不会出现和第一信息中出现的因果关系相反而成环的情况。
在一种可能的实现中,可以基于第二信息指示多个变量中的任意一个变量和至少一个 变量之间存在因果关系,确定当前轮次的迭代已经结束(也就是第二信息为终止节点)。
在一种可能的实现中,可以根据上述计算得到的传递闭包的邻接矩阵来确定是否到达终止节点,例如当传递闭包的邻接矩阵已经能够帮助识别唯一的拓扑序列,则到达终止节点。
本申请实施例中,可以根据各个中间状态(例如第一信息)的输入流量和输出流量之间的差异(差异最小化)、以及终止节点(例如第二信息)的输入流量和奖励值的差异来构建损失函数(差异最小化),根据该损失函数可以更新生成流模型,以便生成流模型可以逐渐具备寻找到多个变量之间更准确的因果关系的能力。
具体的,在一种可能的实现中,生成流模型可以将多个变量之间的因果关系作为节点的状态,并依次进行状态的转移,在到达终止节点后,可以基于各个节点的状态得到中间节点的输入流量和输出流量,以及终止节点的输入流量和奖励值,进而基于中间节点的输入流量和输出流量、以及终止节点的输入流量和奖励值来构建损失函数,进行生成流模型的更新。
更新后的生成流模型可以重复将多个变量之间的因果关系作为节点的状态,并依次进行状态的转移,以构建损失函数,多次进行生成流模型的更新,直到生成流模型收敛。收敛后的生成流模型可以将多个变量之间的因果关系作为节点的状态,并依次进行状态的转移,终止节点的状态所表示的因果关系可以作为多个变量的因果关系并输出。
在一种可能的实现中,可以根据第一信息,通过生成流模型中的第二神经网络,得到第一信息的第一输入流量(例如可以将第一信息(例如,第一信息的嵌入表示)输入到第二神经网络中;或者是将第一信息相关的父节点(例如,父节点的嵌入表示)输入到第二神经网络中);根据第一信息,通过生成流模型中的第三神经网络,得到第一信息的第一输出流量;其中,第一输入流量与第一输出流量的差异度用于得到损失函数;根据损失函数,更新第一神经网络、第二神经网络以及第三神经网络。
在一种可能的实现中,可以根据第一信息,获取多个第三信息(也就是第一信息的父节点),其中,第一信息指示多个变量中的M个变量对存在因果关系,每个第三信息指示M个变量对中的部分组变量之间存在因果关系;M为大于1的正整数。其中,每个第三信息可以作为第一信息的父节点。可以根据多个第三信息,通过生成流模型中的第二神经网络,得到多个第三信息的第一输入流量;其中,可以根据多个第三信息得到每个第三信息的嵌入表示,并将每个第三信息的嵌入表示输入至第二神经网络,以得到每个第三信息的输入流量,各个第三信息的输入流量的加和可以为上述多个第三信息的第一输入流量,第一输入流量可以理解为输入到第一信息的流量。
在一种可能的实现中,可以根据第一信息,通过生成流模型中的第三神经网络,得到第一信息的第一输出流量;其中,可以根据第一信息得到第一信息的嵌入表示,并将第一信息的嵌入表示输入至第三神经网络,以得到第一信息的输出流量。
在一种可能的实现中,第一输入流量与第一输出流量的差异度(例如差异度最小化)用于构建损失函数,进而可以根据损失函数,更新第一神经网络、第二神经网络以及第三神经网络。
在第二信息为终止节点(终止节点的判断逻辑可以参照上述实施例中的描述,这里不再赘述)时,可以计算第二信息的输入流量以及奖励值,并基于输入流量和奖励值的差异度来构建损失函数。
在一种可能的实现中,可以根据第二信息,通过生成流模型中的第二神经网络,得到第二信息的第二输入流量;根据第二信息,通过生成流模型中的第三神经网络,得到第二信息的第一奖励值;其中,第二输入流量与第一奖励值的差异度用于构建损失函数;根据损失函数,更新第一神经网络、第二神经网络以及第三神经网络。
在一种可能的实现中,可以根据第一信息,获取多个第四信息,其中,第二信息指示N个变量对的变量之间存在因果关系,每个第四信息指示N个变量对中的部分变量对的变量之间存在因果关系;N为大于1的正整数;根据多个第四信息,通过生成流模型中的第二神经网络,得到多个第四信息的第二输入流量。关于第二信息的输入流量的计算可以参照上述描述中关于第一信息的输入流量的计算,这里不再赘述。
在一种可能的实现中,可以根据第二信息,得到第二信息的第一奖励值,第一奖励值表示第二信息与多个变量的数据集的联合分布的吻合度;其中,第二输入流量与第一奖励值的差异度用于构建损失函数;根据损失函数,更新第一神经网络、第二神经网络以及第三神经网络。
在一种可能的实现中,在第一神经网络基于第一信息进行第二信息的预测时,可以不采用可以保证第二信息为有向无环图的目标约束,因此,第二信息有可能会成为有向有环图或者其他不满足要求的图。
在一种可能的实现中,在第一神经网络基于第一信息进行第二信息的预测时,可以从第一信息中指示不存在因果关系的变量对中预测存在因果关系的数据对,以得到第二信息,若第二信息为有向无环图,且未满足上述基于目标约束中的终止节点条件,则第一神经网络可以继续基于第二信息进行多个变量的因果关系预测。
若第二信息为有向有环图或者其他不满足要求的图,则可以认为第二信息为终止节点而结束当前次的迭代,并通过构建的损失来更新生成流模型。
针对于中间节点,以第一信息为中间节点为例,在一种可能的实现中,可以根据第一信息,获取多个第三信息,其中,第一信息指示多个变量中的M个变量对存在因果关系,每个第三信息指示M个变量对中的部分组变量之间存在因果关系;M为大于1的正整数;根据多个第三信息,通过生成流模型中的第二神经网络,得到多个第三信息的第一输入流量,根据第一信息,得到第一信息的第二奖励值,第二奖励值表示第一信息与多个变量的数据集的联合分布的吻合度;根据第一信息,通过生成流模型中的第三神经网络,得到第一信息的第一输出流量;其中,第一输出流量和第二奖励值的加和结果与第一输入流量用于构建损失函数,进而可以根据损失函数,更新第一神经网络、第二神经网络以及第三神经网络。
针对于终止节点,以第二信息为终止节点为例,在一种可能的实现中,可以根据第二信息,获取多个第四信息,其中,第三信息指示多个变量中的N个变量对存在因果关系,每个第四信息指示N个变量对中的部分组变量之间存在因果关系;N为大于1的正整数; 根据多个第四信息,通过生成流模型中的第二神经网络,得到多个第四信息的第二输入流量;根据第二信息,得到第二信息的第一奖励值,第一奖励值表示第二信息与多个变量的数据集的联合分布的吻合度;其中,第二输入流量与第一奖励值的差异度用于构建损失函数;根据损失函数,更新第一神经网络、第二神经网络以及第三神经网络。
第二方面,本申请提供了一种因果关系确定方法,方法包括:
获取多个变量的第一信息,第一信息指示多个变量之间的因果关系,变量包括用户的操作类型以及至少一个目标变量,目标变量为如下的至少一种:
物品的属性信息以及用户的属性信息;
根据第一信息,通过生成流模型中的第一神经网络,预测多个变量的第二信息;其中,
第二信息指示多个变量中的第一变量和第二变量之间存在第一因果关系;第一信息指示第一变量和第二变量之间不存在第一因果关系,第一变量和第二变量不同。
在一种可能的实现中,用户的属性信息包括如下的至少一种:性别,年龄,职业,收入,爱好,教育程度。
在一种可能的实现中,物品的属性信息包括如下的至少一种:物品名称,开发者,安装包大小,品类,好评度。
其中,用户的属性信息可以为与用户喜好特征相关的属性,性别、年龄、职业、收入、爱好以及受教育程度中的至少一种,其中,性别可以为男或者女,年龄可以为0-100之间的数字,职业可以为教师、程序员、厨师等等,爱好可以为篮球、网球、跑步等等,受教育程度可以为小学、初中、高中、大学等等;本申请并不限定用户的属性信息的具体类型;
其中,物品可以为实体物品,或者是虚拟物品,例如可以为APP、音视频、网页以及新闻资讯等物品,物品的属性信息可以为物品名称、开发者、安装包大小、品类以及好评度中的至少一种,其中,以物品为应用程序为例,物品的品类可以为聊天类、跑酷类游戏、办公类等等,好评度可以为针对于物品的打分、评论等;本申请并不限定物品的属性信息的具体类型;
其中,操作类型可以为用户针对于物品的行为操作类型,在网络平台和应用上,用户往往和物品有多种多样的交互形式(也就是有多种操作类型),比如用户在电商平台行为中的浏览、点击、加入购物车、购买等操作类型。
应理解,通过生成流模型最终得到的多个变量之间的因果关系可以包括至少一个目标变量与用户的操作类型之间因果关系。
关于第二方面的其他描述可以参照第一方面介绍的因果关系确定方法,这里不再赘述。
第三方面,本申请提供了一种因果关系确定方法,方法包括:
获取多个变量的第一信息,第一信息指示多个变量之间的因果关系,变量包括目标对象的属性信息;其中,
目标对象为芯片,属性信息为芯片的局部片段或者故障信息;或者,
目标对象为通信网络的节点,目标变量为网元的关键表现指标KPI、运行数据或者告 警信息;
根据第一信息,通过生成流模型中的第一神经网络,预测多个变量的第二信息;其中,
第二信息指示多个变量中的第一变量和第二变量之间存在第一因果关系;第一信息指示第一变量和第二变量之间不存在第一因果关系,第一变量和第二变量不同。
其中,芯片的局部片段可以为芯片表面的局部区域,多个局部片段可以为芯片表面的多个局部区域,且多个局部片段中的任意两个局部片段之间的面积大小和外部轮廓形状相同,其中,局部片段之间的面积大小相同可以理解为局部片段所在的区域的面积相同,局部片段之间的外部轮廓形状相同可以理解为局部片段所在的区域的外部轮廓形状相同,例如都为正方形,或者长宽比一致的矩形等等;其中,在一种可能的实现中,多个局部片段中的每个局部片段的面积在预设范围内,每个局部片段的面积不能过大也不能过小,局部片段的面积大小可以与芯片的大小有关,芯片的大小越大,则局部片段的面积越大,例如局部片段的面积和芯片的面积可以保持一定比例,局部片段的面积大小还可以与芯片上的基础单元之间的间隔长度有关,例如可以将局部片段的边长设置为基础单元(例如芯片上的铺铜polygon区域)之间的间隔长度的预设倍数,例如3倍、4倍、5倍等等。其中,每个局部片段可以包括排布的器件和/或器件之间的连接线,本申请实施例中,局部片段,具体可以是获取到每个局部片段的图像信息或者是其他能够表达局部片段上器件排布或者连接线结构的信息,基于该信息可以唯一确定局部片段的结构特征;
其中,芯片的的故障信息可以包括每个局部片段在诊断报告中的出现次数;或,每个局部片段导致故障芯片出现芯片故障的概率等;
其中,KPI可以用来衡量通信网络中网元的运行状态。通常情况下,异常检测设备会采集每个KPI在不同时刻的观测数据。
关于第三方面的其他描述可以参照第一方面介绍的因果关系确定方法,这里不再赘述。
第四方面,本申请提供了一种因果关系确定装置,装置包括:
获取模块,用于获取多个变量的第一信息,第一信息指示多个变量之间的因果关系;
因果预测模块,用于根据第一信息,通过生成流模型中的第一神经网络,预测多个变量的第二信息;其中,
第二信息指示多个变量中的第一变量和第二变量之间存在第一因果关系;第一信息指示第一变量和第二变量之间不存在第一因果关系,第一变量和第二变量不同。
在一种可能的实现中,第一信息指示多个变量中的X个变量对之间存在因果关系,第二信息指示X+1个变量对之间存在因果关系,其中,X+1个变量对包括X个变量对以及由第一变量和第二变量构成的变量对。
在一种可能的实现中,每个变量为如下的一种:
图像数据的一个特征维度、文本数据的一个特征维度、音频数据的一个特征维度、视频数据的一个特征维度。
在一种可能的实现中,装置还包括:
模型更新模块,用于根据第一信息,通过生成流模型中的第二神经网络,得到第一信息的第一输入流量;
根据第一信息,通过生成流模型中的第三神经网络,得到第一信息的第一输出流量;其中,第一输入流量与第一输出流量的差异度用于得到损失函数;
根据损失函数,更新第一神经网络、第二神经网络以及第三神经网络。
在一种可能的实现中,模型更新模块,具体用于:
根据第一信息,获取多个第三信息,其中,第一信息指示M个变量对的变量之间存在因果关系,每个第三信息指示M个变量对中的部分变量对的变量之间存在因果关系;M为大于1的正整数;
根据多个第三信息,通过生成流模型中的第二神经网络,得到第一信息的第一输入流量。
在一种可能的实现中,部分变量对为M个变量对中的M-1个变量对。
在一种可能的实现中,装置还包括:
模型更新模块,用于根据第一信息,得到第一信息的第二奖励值,第二奖励值表示第一信息与多个变量的数据集的联合分布的吻合度;
第一输入流量与第一输出流量的差异度用于构建损失函数,包括:
第一输出流量和第二奖励值的加和结果与第一输入流量用于构建损失函数。
在一种可能的实现中,装置还包括:
模型更新模块,用于通过生成流模型中的第二神经网络,得到第二信息的第二输入流量;
根据第二信息,通过生成流模型中的第三神经网络,得到第二信息的第一奖励值;其中,第二输入流量与第一奖励值的差异度用于构建损失函数;
根据损失函数,更新第一神经网络、第二神经网络以及第三神经网络。
在一种可能的实现中,根据第二信息,通过生成流模型中的第二神经网络,得到第二信息的第二输入流量,包括:
根据第一信息,获取多个第四信息,其中,第二信息指示N个变量对的变量之间存在因果关系,每个第四信息指示N个变量对中的部分变量对的变量之间存在因果关系;N为大于1的正整数;
根据多个第四信息,通过生成流模型中的第二神经网络,得到第二信息的第二输入流量。
在一种可能的实现中,模型更新模块,还用于:
基于第二信息指示多个变量中的任意一个变量和至少一个变量之间存在因果关系;触发执行根据第二信息,得到第二信息的第一奖励值的步骤。
在一种可能的实现中,第二信息对应于第一图,每个变量对应于第一图中的节点,第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;模型更新模块,还用于:
基于第一图为有向有环图;触发执行根据第二信息,得到第二信息的第一奖励值的步骤。
在一种可能的实现中,装置还包括:
约束获取模块,用于根据第一信息,获取目标约束;其中,目标约束用于约束第二信息中不存在因果关系的多个变量对;
根据第一信息,通过生成流模型中的第一神经网络,预测多个变量的第二信息,包括:
根据第一信息以及目标约束,通过生成流模型中的第一神经网络,预测多个变量的第二信息。
在一种可能的实现中,第二信息对应于第一图,每个变量对应于第一图中的节点,第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;目标约束用于约束第一图为有向无环图。
在一种可能的实现中,多个变量对包括目标变量对,目标变量对是由第三变量和第四变量构成的;
在第一信息指示第三变量作为第四变量的因变量、且第四变量作为第三变量的果变量的情况下,目标约束约束第二信息指示第三变量不作为第四变量的果变量、且第四变量不作为第三变量的因变量;或者,
在第三变量和第四变量相同的情况下,目标约束约束第二信息指示第三变量和第四变量之间不存在因果关系。
在一种可能的实现中,因果预测模块,具体用于:
根据第一信息,通过生成流模型中的第一神经网络,得到多个变量对中每个变量对存在因果关系的概率;
基于多个变量对中由第一变量和第二变量构成的变量对存在第一因果关系的概率最高,得到第二信息。
第五方面,本申请提供了一种因果关系确定装置,装置包括:
获取模块,用于获取多个变量的第一信息,第一信息指示多个变量之间的因果关系,变量包括用户的操作类型以及至少一个目标变量,目标变量为如下的至少一种:
物品的属性信息以及用户的属性信息;
因果预测模块,用于根据第一信息,通过生成流模型中的第一神经网络,预测多个变量的第二信息;其中,
第二信息指示多个变量中的第一变量和第二变量之间存在第一因果关系;第一信息指示第一变量和第二变量之间不存在第一因果关系,第一变量和第二变量不同。
在一种可能的实现中,用户的属性信息包括如下的至少一种:性别,年龄,职业,收入,爱好,教育程度。
在一种可能的实现中,物品的属性信息包括如下的至少一种:物品名称,开发者,安装包大小,品类,好评度。
在一种可能的实现中,第一信息指示多个变量中的X个变量对之间存在因果关系,第二信息指示X+1个变量对之间存在因果关系,其中,X+1个变量对包括X个变量对以及由第一变量和第二变量构成的变量对。
在一种可能的实现中,每个变量为如下的一种:
图像数据的一个特征维度、文本数据的一个特征维度、音频数据的一个特征维度、视频数据的一个特征维度。
在一种可能的实现中,装置还包括:
模型更新模块,用于根据第一信息,通过生成流模型中的第二神经网络,得到第一信息的第一输入流量;
根据第一信息,通过生成流模型中的第三神经网络,得到第一信息的第一输出流量;其中,第一输入流量与第一输出流量的差异度用于得到损失函数;
根据损失函数,更新第一神经网络、第二神经网络以及第三神经网络。
在一种可能的实现中,模型更新模块,具体用于:
根据第一信息,获取多个第三信息,其中,第一信息指示M个变量对的变量之间存在因果关系,每个第三信息指示M个变量对中的部分变量对的变量之间存在因果关系;M为大于1的正整数;
根据多个第三信息,通过生成流模型中的第二神经网络,得到第一信息的第一输入流量。
在一种可能的实现中,部分变量对为M个变量对中的M-1个变量对。
在一种可能的实现中,装置还包括:
模型更新模块,用于根据第一信息,得到第一信息的第二奖励值,第二奖励值表示第一信息与多个变量的数据集的联合分布的吻合度;
第一输入流量与第一输出流量的差异度用于构建损失函数,包括:
第一输出流量和第二奖励值的加和结果与第一输入流量用于构建损失函数。
在一种可能的实现中,装置还包括:
模型更新模块,用于通过生成流模型中的第二神经网络,得到第二信息的第二输入流量;
根据第二信息,通过生成流模型中的第三神经网络,得到第二信息的第一奖励值;其中,第二输入流量与第一奖励值的差异度用于构建损失函数;
根据损失函数,更新第一神经网络、第二神经网络以及第三神经网络。
在一种可能的实现中,根据第二信息,通过生成流模型中的第二神经网络,得到第二信息的第二输入流量,包括:
根据第一信息,获取多个第四信息,其中,第二信息指示N个变量对的变量之间存在因果关系,每个第四信息指示N个变量对中的部分变量对的变量之间存在因果关系;N为大于1的正整数;
根据多个第四信息,通过生成流模型中的第二神经网络,得到第二信息的第二输入流量。
在一种可能的实现中,模型更新模块,还用于:
基于第二信息指示多个变量中的任意一个变量和至少一个变量之间存在因果关系;触发执行根据第二信息,得到第二信息的第一奖励值的步骤。
在一种可能的实现中,第二信息对应于第一图,每个变量对应于第一图中的节点,第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;模型更新模块,还用于:
基于第一图为有向有环图;触发执行根据第二信息,得到第二信息的第一奖励值的步骤。
在一种可能的实现中,装置还包括:
约束获取模块,用于根据第一信息,获取目标约束;其中,目标约束用于约束第二信息中不存在因果关系的多个变量对;
根据第一信息,通过生成流模型中的第一神经网络,预测多个变量的第二信息,包括:
根据第一信息以及目标约束,通过生成流模型中的第一神经网络,预测多个变量的第二信息。
在一种可能的实现中,第二信息对应于第一图,每个变量对应于第一图中的节点,第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;目标约束用于约束第一图为有向无环图。
在一种可能的实现中,多个变量对包括目标变量对,目标变量对是由第三变量和第四变量构成的;
在第一信息指示第三变量作为第四变量的因变量、且第四变量作为第三变量的果变量的情况下,目标约束约束第二信息指示第三变量不作为第四变量的果变量、且第四变量不作为第三变量的因变量;或者,
在第三变量和第四变量相同的情况下,目标约束约束第二信息指示第三变量和第四变量之间不存在因果关系。
在一种可能的实现中,因果预测模块,具体用于:
根据第一信息,通过生成流模型中的第一神经网络,得到多个变量对中每个变量对存在因果关系的概率;
基于多个变量对中由第一变量和第二变量构成的变量对存在第一因果关系的概率最高,得到第二信息。
第六方面,本申请提供了一种因果关系确定装置,装置包括:
获取模块,用于获取多个变量的第一信息,第一信息指示多个变量之间的因果关系,变量包括目标对象的属性信息;其中,
目标对象为芯片,属性信息为芯片的局部片段或者故障信息;或者,
目标对象为通信网络的节点,目标变量为网元的关键表现指标KPI、运行数据或者告警信息;
因果预测模块,用于根据第一信息,通过生成流模型中的第一神经网络,预测多个变量的第二信息;其中,
第二信息指示多个变量中的第一变量和第二变量之间存在第一因果关系;第一信息指示第一变量和第二变量之间不存在第一因果关系,第一变量和第二变量不同。
在一种可能的实现中,第一信息指示多个变量中的X个变量对之间存在因果关系,第二信息指示X+1个变量对之间存在因果关系,其中,X+1个变量对包括X个变量对以及由第一变量和第二变量构成的变量对。
在一种可能的实现中,每个变量为如下的一种:
图像数据的一个特征维度、文本数据的一个特征维度、音频数据的一个特征维度、视频数据的一个特征维度。
在一种可能的实现中,装置还包括:
模型更新模块,用于根据第一信息,通过生成流模型中的第二神经网络,得到第一信息的第一输入流量;
根据第一信息,通过生成流模型中的第三神经网络,得到第一信息的第一输出流量;其中,第一输入流量与第一输出流量的差异度用于得到损失函数;
根据损失函数,更新第一神经网络、第二神经网络以及第三神经网络。
在一种可能的实现中,模型更新模块,具体用于:
根据第一信息,获取多个第三信息,其中,第一信息指示M个变量对的变量之间存在因果关系,每个第三信息指示M个变量对中的部分变量对的变量之间存在因果关系;M为大于1的正整数;
根据多个第三信息,通过生成流模型中的第二神经网络,得到第一信息的第一输入流量。
在一种可能的实现中,部分变量对为M个变量对中的M-1个变量对。
在一种可能的实现中,装置还包括:
模型更新模块,用于根据第一信息,得到第一信息的第二奖励值,第二奖励值表示第一信息与多个变量的数据集的联合分布的吻合度;
第一输入流量与第一输出流量的差异度用于构建损失函数,包括:
第一输出流量和第二奖励值的加和结果与第一输入流量用于构建损失函数。
在一种可能的实现中,装置还包括:
模型更新模块,用于通过生成流模型中的第二神经网络,得到第二信息的第二输入流量;
根据第二信息,通过生成流模型中的第三神经网络,得到第二信息的第一奖励值;其中,第二输入流量与第一奖励值的差异度用于构建损失函数;
根据损失函数,更新第一神经网络、第二神经网络以及第三神经网络。
在一种可能的实现中,根据第二信息,通过生成流模型中的第二神经网络,得到第二信息的第二输入流量,包括:
根据第一信息,获取多个第四信息,其中,第二信息指示N个变量对的变量之间存在因果关系,每个第四信息指示N个变量对中的部分变量对的变量之间存在因果关系;N为大于1的正整数;
根据多个第四信息,通过生成流模型中的第二神经网络,得到第二信息的第二输入流量。
在一种可能的实现中,模型更新模块,还用于:
基于第二信息指示多个变量中的任意一个变量和至少一个变量之间存在因果关系;触发执行根据第二信息,得到第二信息的第一奖励值的步骤。
在一种可能的实现中,第二信息对应于第一图,每个变量对应于第一图中的节点,第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;模型更新模块,还用于:
基于第一图为有向有环图;触发执行根据第二信息,得到第二信息的第一奖励值的步骤。
在一种可能的实现中,装置还包括:
约束获取模块,用于根据第一信息,获取目标约束;其中,目标约束用于约束第二信息中不存在因果关系的多个变量对;
根据第一信息,通过生成流模型中的第一神经网络,预测多个变量的第二信息,包括:
根据第一信息以及目标约束,通过生成流模型中的第一神经网络,预测多个变量的第二信息。
在一种可能的实现中,第二信息对应于第一图,每个变量对应于第一图中的节点,第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;目标约束用于约束第一图为有向无环图。
在一种可能的实现中,多个变量对包括目标变量对,目标变量对是由第三变量和第四变量构成的;
在第一信息指示第三变量作为第四变量的因变量、且第四变量作为第三变量的果变量的情况下,目标约束约束第二信息指示第三变量不作为第四变量的果变量、且第四变量不作为第三变量的因变量;或者,
在第三变量和第四变量相同的情况下,目标约束约束第二信息指示第三变量和第四变量之间不存在因果关系。
在一种可能的实现中,因果预测模块,具体用于:
根据第一信息,通过生成流模型中的第一神经网络,得到多个变量对中每个变量对存在因果关系的概率;
基于多个变量对中由第一变量和第二变量构成的变量对存在第一因果关系的概率最高,得到第二信息。
第七方面,本申请实施例提供了一种因果关系确定装置,可以包括存储器、处理器以及总线系统,其中,存储器用于存储程序,处理器用于执行存储器中的程序,以执行如上 述第一方面及其任一可选的方法、或者上述第二方面及其任一可选的方法、或者上述第三方面及其任一可选的方法。
第八方面,本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行上述第一方面及其任一可选的方法、或者上述第二方面及其任一可选的方法、或者上述第三方面及其任一可选的方法。
第九方面,本申请实施例提供了一种包括指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面及其任一可选的方法、或者上述第二方面及其任一可选的方法、或者上述第三方面及其任一可选的方法。
第十方面,本申请提供了一种芯片系统,该芯片系统包括处理器,用于支持因果关系确定装置实现上述方面中所涉及的部分或全部功能,例如,发送或处理上述方法中所涉及的数据;或,信息。在一种可能的设计中,芯片系统还包括存储器,存储器,用于保存执行设备或训练设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。
附图说明
图1为一种应用架构示意;
图2为一种应用架构示意;
图3为一种应用架构示意;
图4为一种应用架构示意;
图5为一种应用架构示意;
图6为一种生成流模型的生成过程示意;
图7为本申请实施例提供的一种因果关系确定方法的实施例示意;
图8为本申请实施例提供的因果关系序列生成的实施例示意;
图9为本申请实施例中一种目标约束的确定示意;
图10为本申请实施例中一种闭包矩阵的示意;
图11为本申请实施例中一种闭包矩阵的转置示意;
图12为本申请实施例中一种目标约束的确定示意;
图13为本申请实施例中一种父节点的求解示意;
图14为本申请实施例中一种因果关系的确定流程示意;
图15为本申请实施例提供的因果关系序列生成的实施例示意;
图16为本申请实施例中一种因果关系的确定流程示意;
图17为本申请实施例提供的一种因果关系确定装置的实施例示意;
图18为本申请实施例提供的执行设备的一种结构示意图;
图19是本申请实施例提供的服务器一种结构示意图;
图20为本申请实施例提供的芯片的一种结构示意图。
具体实施方式
下面结合本发明实施例中的附图对本发明实施例进行描述。本发明的实施方式部分使用的术语仅用于对本发明的具体实施例进行解释,而非旨在限定本发明。
下面结合附图,对本申请的实施例进行描述。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。
本文中所用用语“基本(substantially)”、“大约(about)”及类似用语用作近似用语、而并非用作程度用语,且旨在考虑到所属领域中的普通技术人员将知的测量值或计算值的固有偏差。此外,在阐述本发明实施例时使用“可(may)”是指“可能的一个或多个实施例”。本文中所用用语“使用(use)”、“正使用(using)”、及“被使用(used)”可被视为分别与用语“利用(utilize)”、“正利用(utilizing)”、及“被利用(utilized)”同义。另外,用语“示例性(exemplary)”旨在指代实例或例示。
首先介绍本申请的应用场景,本申请可以但不限于应用在图像处理、音频处理、文本处理或者视频处理等需要因果关系识别的场景中,接下来分别进行介绍:
在一种可能的实现中,可以通过因果关系识别来进行各种场景下的故障识别,例如可以用于进行通信网络的故障识别、芯片的系统性缺陷识别、计算机事务的故障节点识别、机械故障的识别等,接下来分别进行说明:
在一种可能的实现中,可以通过因果关系识别来进行通信网络的故障识别。
通信网络的关键表现指标(key performance indicator,KPI)可以用来衡量通信网络中网元的运行状态。通常情况下,异常检测设备会采集每个KPI在不同时刻的观测数据,若KPI的观测数据发生了异常,则表明通信网络中的网元的运行状态发生异常。网络运维工程师需要根据发生异常的KPI查找原因,从而排除故障。
在一种可能的实现中,可以基于因果关系确定方法来确定某些异常KPI之间的因果关系,如第一KPI发生异常的根本原因是由于第二KPI发生异常而引起的,从而网络运维工程师可以根据第二KPI确定故障的网元,以排除故障。
在一种可能的实现中,KPI相当于本申请实施例中的变量,KPI在不同时刻的观测数据相当于本申请实施例中变量的数据,通过本申请实施例中的因果关系确定方法可以得到KPI之间的因果关系。
在一种可能的实现中,可以通过因果关系识别来进行芯片的系统性缺陷识别。
随着电子产品功能的发展和应用领域的扩大,作为电子产品的核心部件,芯片成为了人们生活中不可或缺的一部分。芯片生产主要分为布局设计和制造两部分。布局设计通常包含多层的电路功能设计,制造包含生产、封装、测试等流程。相同的芯片设计采用不同制造工艺时,一些芯片设计中在原工艺下正常的电路结构可能会出现缺陷,导致芯片良率 低于预期。这类因工艺变化而出现设计缺陷的电路结构被称为系统性缺陷。
系统性缺陷的存在会增加芯片电路功能失效的几率,存在电路功能失效的芯片会无法正常使用,从而导致芯片良率降低。良率的下滑会增加生产成本,甚至导致相关产品错过销售窗口期。因此系统性缺陷的根因识别对产品的良率至关重要。为了识别出系统性缺陷,可以针对于芯片的设计结构进行分析,来确定芯片上存在导致芯片故障隐患的局部片段类型。
在一种可能的实现中,可以根据芯片上各个片段的图像,通过因果关系确定方法,来得到导致芯片故障隐患的局部片段类型。
在一种可能的实现中,可以通过因果关系识别来进行计算机事务的故障节点识别。
随着计算机技术的发展,计算机设备能够处理的事务飞速增长,同时计算机设备每天都可以多次执行同一事务,以满足大量用户的需求。为了提高执行事务的性能,需要对事务的问题进行分析,以便更好的执行事务。
目前,事务分析过程通常为:在事务的执行过程中,实时采集当前的执行记录,从执行记录中,提取执行事务所调用的每个节点的信息,该节点的信息包括节点的名称、调用节点的时长、状态码、不同节点之间的调用关系等;之后,在界面中显示每个节点的信息。可以根据每个节点的信息,通过因果识别方法来判断这些节点是否存在问题,最终找到导致事务出现问题的节点。
在一种可能的实现中,可以通过因果关系识别来进行机械故障的识别。
对于机械加工系统而言,如果已经确定了各个属性与产品是否合格之间的因果关系,则可以基于找到的因果关系来优先调整对于不合格产品影响最大的属性。
在一种可能的实现中,对于电力传输系统而言,如果已经确定了各个传输设备处的中间电压、传输系统的工作状态、电流与电能损耗之间的因果关系,则可以基于找到的因果关系来优先调整对于电能损耗影响最大的变量。以此方式,可以提高电力传输系统的性能。
在一种可能的实现中,可以通过因果关系确定方法来进行推荐领域中和用户的操作行为相关的因果识别。
在一种可能的实现中,可以获取到用户的操作日志,该操作日志可以包括用户针对于物品的操作行为、物品的属性信息、以及用户的属性信息,可以通过因果关系识别来确定各个属性信息对于用户发生操作行为的因果关系。
从产品实现的形态上,本申请实施例可以应用在因果关系识别类应用程序(或者其他类型的计算机程序产品)、云侧服务器提供的与因果关系识别相关的云服务等。
接下来分别从功能架构以及实现功能的产品架构介绍本申请实施例中的因果关系识别类应用程序。
参照图1,图1为本申请实施例中因果关系识别类应用程序的功能架构示意:
在一种可能的实现中,本申请实施例包含能够基于输入的数据而自动识别出数据的变量之间的因果关系的系统(例如因果关系识别类应用程序)。如图1所示,因果关系识别类应用程序102可接收输入的数据101(可选的,数据的变量也可以涵盖其中,或者数据的变量可以为自动识别得到的)且输出变量之间的因果关系识别结果103。因果关系识别类 应用程序102可在(举例来说)至少一个计算机系统上执行,且包括计算机代码,所述计算机代码在由一或多个计算机执行时致使所述计算机执行用于执行本文中所描述的因果关系确定方法。
在一种可能的实现中,因果关系识别类应用程序可以运行在端侧的终端设备或者运行在云侧的服务器中。
例如,终端设备可以安装有因果关系识别类应用程序,包括数据输入、数据处理(例如本申请实施例中的因果关系确定方法)以及数据输出的动作可以为终端设备执行的。
例如,终端设备可以安装有因果关系识别类应用程序的客户端,包括数据输入以及数据输出的动作可以为终端设备执行的,而数据处理(例如本申请实施例中的因果关系确定方法)的动作可以为云侧的服务器执行的,也就是说,终端设备可以将数据处理(例如本申请实施例中的因果关系确定方法)所需的数据传输到云侧的服务器,云侧的服务器在执行完数据处理动作后,可以将数据处理结果返回至端侧的终端设备,由终端设备基于处理结果进行输出。
接下来介绍本申请实施例中运行因果关系识别类应用程序的实体架构。
参照图2,图2为本申请实施例中运行因果关系识别类应用程序的实体架构示意:
参见图2,图2示出了一种系统架构示意图。该系统可以包括终端100、以及服务器200。其中,服务器200可以包括一个或者多个服务器(图2中以包括一个服务器作为示例进行说明),服务器200可以为一个或者多个终端提供因果关系识别程序。
其中,终端100上可以安装有因果关系识别类应用程序,或者打开与因果关系识别相关的网页,上述应用程序和网页可以提供一个因果关系识别界面,终端100可以接收用户在因果关系识别界面上输入的相关数据,并将上述数据发送至服务器200,服务器200可以基于接收到的数据,得到处理结果(数据的因果关识别结果),并将处理结果返回至至终端100。
应理解,在一些可选的实现中,终端100也可以由自身完成基于接收到的数据,得到数据处理结果的动作,而不需要服务器配合实现,本申请实施例并不限定。
接下来描述图2中终端100的产品形态;
本申请实施例中的终端100可以为手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等,本申请实施例对此不作任何限制。
图3示出了终端100的一种可选的硬件结构示意图。
参考图3所示,终端100可以包括射频单元110、存储器120、输入单元130、显示单元140、摄像头150(可选的)、音频电路160(可选的)、扬声器161(可选的)、麦克风162(可选的)、处理器170、外部接口180、电源190等部件。本领域技术人员可以理解,图3仅仅是终端或多功能设备的举例,并不构成对终端或多功能设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件。
输入单元130可用于接收输入的数字或字符信息,以及产生与该便携式多功能装置的用户设置以及功能控制有关的键信号输入。具体地,输入单元130可包括触摸屏131(可选的)和/或其他输入设备132。该触摸屏131可收集用户在其上或附近的触摸操作(比如用户使用手指、关节、触笔等任何适合的物体在触摸屏上或在触摸屏附近的操作),并根据预先设定的程序驱动相应的连接装置。触摸屏可以检测用户对触摸屏的触摸动作,将该触摸动作转换为触摸信号发送给该处理器170,并能接收该处理器170发来的命令并加以执行;该触摸信号至少包括触点坐标信息。该触摸屏131可以提供该终端100和用户之间的输入界面和输出界面。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触摸屏。除了触摸屏131,输入单元130还可以包括其他输入设备。具体地,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键133等)、轨迹球、鼠标、操作杆等中的一种或多种。
其中,其他输入设备132可以接收到因果关系识别相关的参数,例如本申请实施例中的多个数据(可选的,还可以包括多个变量)等等。
该显示单元140可用于显示由用户输入的信息或提供给用户的信息、终端100的各种菜单、交互界面、文件显示和/或任意一种多媒体文件的播放。在本申请实施例中,显示单元140可用于显示因果关系识别类应用程序的界面、因果关系结果等。
该存储器120可用于存储指令和数据,存储器120可主要包括存储指令区和存储数据区,存储数据区可存储各种数据,如多媒体文件、文本等;存储指令区可存储操作系统、应用、至少一个功能所需的指令等软件单元,或者他们的子集、扩展集。还可以包括非易失性随机存储器;向处理器170提供包括管理计算处理设备中的硬件、软件以及数据资源,支持控制软件和应用。还用于多媒体文件的存储,以及运行程序和应用的存储。
处理器170是终端100的控制中心,利用各种接口和线路连接整个终端100的各个部分,通过运行或执行存储在存储器120内的指令以及调用存储在存储器120内的数据,执行终端100的各种功能和处理数据,从而对终端设备进行整体控制。可选的,处理器170可包括一个或多个处理单元;优选的,处理器170可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器170中。在一些实施例中,处理器、存储器、可以在单一芯片上实现,在一些实施例中,他们也可以在独立的芯片上分别实现。处理器170还可以用于产生相应的操作控制信号,发给计算处理设备相应的部件,读取以及处理软件中的数据,尤其是读取和处理存储器120中的数据和程序,以使其中的各个功能模块执行相应的功能,从而控制相应的部件按指令的要求进行动作。
其中,存储器120可以用于存储因果关系确定方法相关的软件代码,处理器170可以执行芯片的因果关系确定方法的步骤,也可以调度其他单元(例如上述输入单元130以及显示单元140)以实现相应的功能。
该射频单元110(可选的)可用于收发信息或通话过程中信号的接收和发送,例如,将基站的下行信息接收后,给处理器170处理;另外,将设计上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low  Noise Amplifier,LNA)、双工器等。此外,射频单元110还可以通过无线通信与网络设备和其他设备通信。该无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。
其中,在本申请实施例中,该射频单元110可以将数据发送至服务器200,并接收到服务器200发送的因果关系识别结果。
应理解,该射频单元110为可选的,其可以被替换为其他通信接口,例如可以是网口。
终端100还包括给各个部件供电的电源190(比如电池),优选的,电源可以通过电源管理系统与处理器170逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
终端100还包括外部接口180,该外部接口可以是标准的Micro USB接口,也可以使多针连接器,可以用于连接终端100与其他装置进行通信,也可以用于连接充电器为终端100充电。
尽管未示出,终端100还可以包括闪光灯、无线保真(wireless fidelity,WiFi)模块、蓝牙模块、不同功能的传感器等,在此不再赘述。下文中描述的部分或全部方法均可以应用在如图3所示的终端100中。
接下来描述图2中服务器200的产品形态;
图4提供了一种服务器200的结构示意图,如图4所示,服务器200包括总线201、处理器202、通信接口203和存储器204。处理器202、存储器204和通信接口203之间通过总线201通信。
总线201可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图4中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
处理器202可以为中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)、微处理器(micro processor,MP)或者数字信号处理器(digital signal processor,DSP)等处理器中的任意一种或多种。
存储器204可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM)。存储器204还可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器,机械硬盘(hard drive drive,HDD)或固态硬盘(solid state drive,SSD)。
其中,存储器204可以用于存储因果关系确定方法相关的软件代码,处理器202可以执行芯片的因果关系确定方法的步骤,也可以调度其他单元以实现相应的功能。
应理解,上述终端100和服务器200可以为集中式或者是分布式的设备,上述终端100和服务器200中的处理器(例如处理器170以及处理器202)可以为硬件电路(如专用集 成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)、通用处理器、数字信号处理器(digital signal processing,DSP)、微处理器或微控制器等等)、或这些硬件电路的组合,例如,处理器可以为具有执行指令功能的硬件系统,如CPU、DSP等,或者为不具有执行指令功能的硬件系统,如ASIC、FPGA等,或者为上述不具有执行指令功能的硬件系统以及具有执行指令功能的硬件系统的组合。
应理解,本申请实施例中的因果关系确定方法涉及AI相关的运算,在执行AI运算时,终端设备和服务器的指令执行架构不仅仅局限在图3以及图4所示的处理器结合存储器的架构。下面结合图5对本申请实施例提供的系统架构进行详细的介绍。
图5为本申请实施例提供的系统架构示意图。如图5所示,系统架构500包括执行设备510、训练设备520、数据库530、客户设备540、数据存储系统550以及数据采集系统560。
执行设备510包括计算模块511、I/O接口512、预处理模块513和预处理模块514。计算模块511中可以包括目标模型/规则501,预处理模块513和预处理模块514是可选的。
其中,执行设备510可以为上述运行因果关系识别类应用程序的终端设备或者服务器。
数据采集设备560用于采集训练样本。训练样本可以为I/O单元的信息、bump的信息以及总连接数量等。在采集到训练样本之后,数据采集设备560将这些训练样本存入数据库530。
训练设备520可以基于数据库530或者来自客户设备540的训练样本(例如本申请实施例中的多个数据以及多个变量),对待训练的神经网络(例如本申请实施例中的生成流模型等),以得到目标模型/规则501以及因果识别结果。
需要说明的是,在实际应用中,数据库530中维护的训练样本不一定都来自于数据采集设备560的采集,也有可能是从其他设备(例如来自客户设备540)接收得到的。另外需要说明的是,训练设备520也不一定完全基于数据库530维护的训练样本进行目标模型/规则501的训练,也有可能从云端或其他地方获取训练样本进行模型训练,上述描述不应该作为对本申请实施例的限定。
可选的,根据训练设备520训练得到的目标模型/规则501可以应用于不同的系统或设备中,如应用于图5所示的执行设备510,该执行设备510可以是终端,如手机终端,平板电脑,笔记本电脑,增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备,车载终端等,还可以是服务器等。
具体的,训练设备520可以将训练后的模型或者因果识别结果传递至执行设备510。
在图5中,执行设备510配置输入/输出(input/output,I/O)接口512,用于与外部设备进行数据交互,用户可以通过客户设备540向I/O接口512输入数据(例如本申请实施例中的多个数据或者多个变量等)。
预处理模块513和预处理模块514用于根据I/O接口512接收到的输入数据进行预处理。应理解,可以没有预处理模块513和预处理模块514或者只有的一个预处理模块。当不存在预处理模块513和预处理模块514时,可以直接采用计算模块511对输入数据进行处理。
在执行设备510对输入数据进行预处理,或者在执行设备510的计算模块511执行计算等相关的处理过程中,执行设备510可以调用数据存储系统550中的数据、代码等以用于相应的处理,也可以将相应处理得到的数据、指令等存入数据存储系统550中。
最后,I/O接口512将处理结果(例如因果识别结果)提供给客户设备540,从而提供给用户。
在图5所示情况下,用户可以手动给定输入数据,该“手动给定输入数据”可以通过I/O接口512提供的界面进行操作。另一种情况下,客户设备540可以自动地向I/O接口512发送输入数据,如果要求客户设备540自动发送输入数据需要获得用户的授权,则用户可以在客户设备540中设置相应权限。用户可以在客户设备540查看执行设备510输出的结果,具体的呈现形式可以是显示、声音、动作等具体方式。客户设备540也可以作为数据采集端,采集如图所示输入I/O接口512的输入数据及输出I/O接口512的输出结果作为新的样本数据,并存入数据库530。当然,也可以不经过客户设备540进行采集,而是由I/O接口512直接将如图所示输入I/O接口512的输入数据及输出I/O接口512的输出结果,作为新的样本数据存入数据库530。
值得注意的是,图5仅是本申请实施例提供的一种系统架构的示意图,图中所示设备、器件、模块等之间的位置关系不构成任何限制,例如,在图5中,数据存储系统550相对执行设备510是外部存储器,在其它情况下,也可以将数据存储系统550置于执行设备510中。应理解,上述执行设备510可以部署于客户设备540中。
从模型的训练侧来说:
本申请实施例中,上述训练设备520可以获取到存储器(图5中未示出,可以集成于训练设备520或者与训练设备520分离部署)中存储的代码来实现本申请实施例中和模型训练相关的步骤。
本申请实施例中,训练设备520可以包括硬件电路(如专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)、通用处理器、数字信号处理器(digital signal processing,DSP)、微处理器或微控制器等等)、或这些硬件电路的组合,例如,训练设备520可以为具有执行指令功能的硬件系统,如CPU、DSP等,或者为不具有执行指令功能的硬件系统,如ASIC、FPGA等,或者为上述不具有执行指令功能的硬件系统以及具有执行指令功能的硬件系统的组合。
应理解,训练设备520可以为不具有执行指令功能的硬件系统以及具有执行指令功能的硬件系统的组合,本申请实施例提供的中和模型训练相关的部分步骤还可以通过训练设备520中不具有执行指令功能的硬件系统来实现,这里并不限定。
二、服务器提供的云服务:
在一种可能的实现中,服务器可以通过应用程序编程接口(application programming interface,API)为端侧提供因果关系确定的服务。
其中,终端设备可以通过云端提供的API,将相关参数(例如多个数据等)发送至服务器,服务器可以基于接收到的数据,得到处理结果,并将处理结果(例如因果识别结果等)返回至至终端。
关于终端以及服务器的描述可以上述实施例的描述,这里不再赘述。
由于本申请实施例涉及大量神经网络的应用,为了便于理解,下面先对本申请实施例涉及的相关术语及神经网络等相关概念进行介绍。
(1)神经网络
神经网络可以是由神经单元组成的,神经单元可以是指以xs(即输入数据)和截距1为输入的运算单元,该运算单元的输出可以为:
其中,s=1、2、……n,n为大于1的自然数,Ws为xs的权重,b为神经单元的偏置。f为神经单元的激活函数(activation functions),用于将非线性特性引入神经网络中,来将神经单元中的输入信号转换为输出信号。该激活函数的输出信号可以作为下一层卷积层的输入,激活函数可以是sigmoid函数。神经网络是将多个上述单一的神经单元联结在一起形成的网络,即一个神经单元的输出可以是另一个神经单元的输入。每个神经单元的输入可以与前一层的局部接受域相连,来提取局部接受域的特征,局部接受域可以是由若干个神经单元组成的区域。
(2)深度神经网络
深度神经网络(Deep Neural Network,DNN),也称多层神经网络,可以理解为具有很多层隐含层的神经网络,这里的“很多”并没有特别的度量标准。从DNN按不同层的位置划分,DNN内部的神经网络可以分为三类:输入层,隐含层,输出层。一般来说第一层是输入层,最后一层是输出层,中间的层数都是隐含层。层与层之间是全连接的,也就是说,第i层的任意一个神经元一定与第i+1层的任意一个神经元相连。虽然DNN看起来很复杂,但是就每一层的工作来说,其实并不复杂,简单来说就是如下线性关系表达式:其中,是输入向量,是输出向量,是偏移向量,W是权重矩阵(也称系数),α()是激活函数。每一层仅仅是对输入向量经过如此简单的操作得到输出向量由于DNN层数多,则系数W和偏移向量的数量也就很多了。这些参数在DNN中的定义如下所述:以系数W为例:假设在一个三层的DNN中,第二层的第4个神经元到第三层的第2个神经元的线性系数定义为上标3代表系数W所在的层数,而下标对应的是输出的第三层索引2和输入的第二层索引4。总结就是:第L-1层的第k个神经元到第L层的第j个神经元的系数定义为需要注意的是,输入层是没有W参数的。在深度神经网络中,更多的隐含层让网络更能够刻画现实世界中的复杂情形。理论上而言,参数越多的模型复杂度越高,“容量”也就越大,也就意味着它能完成更复杂的学习任务。训练深度神经网络的也就是学习权重矩阵的过程,其最终目的是得到训练好的深度神经网络的所有层的权重矩阵(由很多层的向量W形成的权重矩阵)。
(3)图(Graph):
图为包括至少一个顶点以及至少一条边的数据结构。在一些场景中,图中的顶点可以 映射为实体,图中的边可以映射为实体与实体之间的关系。图可以是有向图或无向图。当然,图还可以包括顶点以及边以外的其他数据,例如顶点的标签以及边的标签等。
(4)损失函数
在训练深度神经网络的过程中,因为希望深度神经网络的输出尽可能的接近真正想要预测的值,所以可以通过比较当前网络的预测值和真正想要的目标值,再根据两者之间的差异情况来更新每一层神经网络的权重向量(当然,在第一次更新之前通常会有初始化的过程,即为深度神经网络中的各层预先配置参数),比如,如果网络的预测值高了,就调整权重向量让它预测低一些,不断的调整,直到深度神经网络能够预测出真正想要的目标值或与真正想要的目标值非常接近的值。因此,就需要预先定义“如何比较预测值和目标值之间的差异”,这便是损失函数(loss function)或目标函数(objective function),它们是用于衡量预测值和目标值的差异的重要方程。其中,以损失函数举例,损失函数的输出值(loss)越高表示差异越大,那么深度神经网络的训练就变成了尽可能缩小这个loss的过程。
(5)反向传播算法
卷积神经网络可以采用误差反向传播(back propagation,BP)算法在训练过程中修正初始的超分辨率模型中参数的大小,使得超分辨率模型的重建误差损失越来越小。具体地,前向传递输入信号直至输出会产生误差损失,通过反向传播误差损失信息来更新初始的超分辨率模型中参数,从而使误差损失收敛。反向传播算法是以误差损失为主导的反向传播运动,旨在得到最优的超分辨率模型的参数,例如权重矩阵。
(6)因果关系
变量对(示例性的,变量A和变量B)存在因果关系可以理解为变量A导致变量B,也就是变量A作为变量B的因变量,变量B作为变量A的果变量。具体的,在其他条件均不变的情况下,变量A的改变会导致变量B的改变。
(7)变量
变量可以为数据的一个特征。例如,变量可以为图像数据的一个特征维度,例如可以为图像中的某一个语义,例如包括人像的图像中的耳朵区域、眼镜区域等,还可以为图像中的一个像素通道,例如R通道、G通道、B通道等。又例如,变量可以为芯片的某一类局部片段,变量的数据可以为芯片的某一类局部片段的图像。又例如,变量可以为文本数据的一个特征维度,例如可以为故障的一个根因。变量还可以为音频数据的一个特征维度、视频数据的一个特征维度等等。
(8)强化学习
强化学习是机器学习的范式和方法论之一,用于描述和解决智能体(agent)在与环境的交互过程中通过学习策略以达成回报最大化或实现特定目标的问题。
(9)生成流模型
生成流模型(或者称之为基于流的生成流模型或者生成流模型)是一种以序列决策的方式采样,并构建复合结构的流模型,使得生成结构的概率与该结构奖励回报值成正比。生成流模型以序列决策的方式构建复合结构,它以有向无环图构建流模型,即每一个状态节点有多个父节点,这与树结构中每个状态节点仅有唯一父节点不同。模型有唯一初始节 点,多个终止节点。模型从初始节点开始采样生成动作序列,完成状态之间的转移,直至到达终止节点,结束采样。终止节点对应生成的复合结构。
初始节点可以包括输出流量,中间节点可以包括输入流量以及输出流量(或者奖励值),终止节点可以包括输入流量以及奖励值,将该流模型想象成水管,初始节点的水流量为模型的总流入,所有终止节点(如的水流量之和为模型的总流出)。对于每一个中间节点,流入等于流出。节点的流入值和流出值用神经网络来预测,通过将流匹配约束作为目标函数进行优化,模型可以学习一个策略(即优化该神经网络),使得采样生成复合结构的概率与它的奖励值成正比,奖励值越高的结构更容易被采样到。通过这样的方式,生成流模型可以采样到一系列高奖励值的结构。
生成流模型的一个示例性的图示可以参照图6,如图6所示,其中si代表状态,xj代表复合结构。s0为初始节点,s5,s8,s11,s13,s16为终止节点,因为它们对应了复合结构x5,x8,x11,x13,x16
(10)贝叶斯网络结构学习
贝叶斯网络结构学习就是在给定一个数据样本集合的前提下,寻找一个与训练样本集匹配最好的因果关系网络结构。
(11)有向无环图
在图论中,如果一个有向图从任意顶点出发无法经过若干条边回到该点,则这个图是一个有向无环图。
(12)传递闭包
在图论中,传递闭包C能够描述一个节点是否能够通过有向箭头到达另一个节点。如果一个节点A到另一个节点B存在一条有效的有向途径,则在邻接矩阵中该(B,A)位置标为1。
(13)邻接矩阵
邻接矩阵(adjacency matrix)是表示顶点之间相邻关系的方阵,值为0或1,0表示无直接关系,1表示有关系;有向无环图的邻接矩阵不能出现对称和对角线位置有1的情况。
(14)拓扑序列
拓扑序列是顶点活动网中将活动按发生的先后次序进行的一种排列。拓扑排序,是对一个有向无环图G进行拓扑排序,是将G中所有顶点排成一个线性序列,使得图中任意一对顶点u和v,若边(u,v)∈E(G),则u在线性序列中出现在v之前。
在现有的实现中,基于强化学习来实现数据集中变量之间的因果关系识别,该技术利用强化学习搜索到打分最高的因果序列。该技术首先对数据集进行编码,将每一列编码为一个状态,此时所有状态的顺序是随机的,然后利用马尔科夫链确定顺序进行解码,生成动作序列(a0,a1,…,aT),该序列即对应某一因果序列,通过有向无环约束函数可以约束每个因果序列对应的图为有向无环图。也就是说,现有技术通过遍历大量的因果序列,并基于各个因果序列的打分来选择较准确的因果关系,而为了得到更准确的因果关系则需要遍历大量的因果序列。随着搜索空间(也就是数据量、变量数量)的上涨,需要较大的算力消 耗和运行时长消耗。
为了解决上述问题,参照图7,图7为本申请实施例提供的一种因果关系确定方法的流程示意,如图7所示,本申请实施例提供的一种因果关系确定方法包括:
701、获取多个变量的第一信息,所述第一信息指示所述多个变量之间的因果关系。
在一种可能的实现中,本申请实施例的目的是为了识别出数据集(包括多个数据)的多个变量之间的因果关系,可以获取到待识别的数据集(包括多个数据),并将数据集(或者数据集中的多个变量)输入到用于进行因果关系确定的模型(例如本申请实施例中的生成流模型(或者称之为基于流的生成流模型或者生成流模型))中,以得到因果关系确定结果。
其中,多个变量的因果关系可以包括多个变量中各个变量对的因果关系,变量对可以包括两个变量。变量对的因果关系可以理解为变量对包括的变量之间的因果关系。
其中,变量对(示例性的,变量A和变量B)存在因果关系可以理解为变量A导致变量B,也就是变量A作为变量B的因变量,变量B作为变量A的果变量。具体的,在其他条件均不变的情况下,变量A的改变会导致变量B的改变。
其中,变量对(示例性的,变量B和变量A)存在因果关系可以理解为变量B导致变量A,也就是变量B作为变量A的因变量,变量A作为变量B的果变量。
在一种可能的实现中,因果关系(例如本申请实施例中的第一信息和第二信息)可以通过邻接矩阵来表示:邻接矩阵(adjacency matrix)是表示顶点之间相邻关系的方阵,值为0或1,0表示无直接关系,1表示有关系;有向无环图的邻接矩阵不能出现对称和对角线位置有1的情况,例如,多个变量的因果关系(例如本申请实施例中的第一信息)为:变量1导致变量2,其余变量之间均不存在因果关系,则第一信息可以表示为:
关于多个变量:
在一种可能的实现中,变量可以为数据的一个特征。
在一种可能的实现中,变量可以为图像数据的一个特征维度,例如可以为图像中的某一个语义,例如包括人像的图像中的耳朵区域、眼镜区域等,还可以为图像中的一个像素通道,例如R通道、G通道、B通道等。相应的,变量的数据可以为图像数据在该特征维度上的数据,例如人像的图像中的耳朵区域的像素值、眼镜区域的像素值等,还可以为图像的R通道的像素值、G通道的像素值、B通道的像素值等。
又例如,变量可以为芯片的某一类局部片段,变量的数据可以为芯片的某一类局部片段的图像。
在一种可能的实现中,变量可以为文本数据的一个特征维度,例如可以为故障的一个根因。例如可以为通信网络的KPI、计算机事务的所调用的节点,相应地,变量的数据可以为通信网络的KPI的具体数值,计算机事务的所调用的节点的信息等。
在一种可能的实现中,变量还可以为音频数据的一个特征维度、视频数据的一个特征维度等等。
本申请实施例中,可以根据数据集的多个变量,通过生成流模型来预测多个变量之间的因果关系。
在一种可能的实现中,生成流模型在一次迭代的过程中,可以多次预测多个变量之间的因果关系,其中,可以基于上一次预测的因果关系,进行下一次因果关系的预测,其中,“下一次”因果关系预测的结果中包括了“上一次”因果关系预测中的存在的因果关系,且还包括新预测的一个变量对之间的因果关系,直到预测的结果中满足一次迭代的终止条件。
示例性的,多个变量可以包括变量1、变量2以及变量3,生成流模型在一次迭代的过程中,可以(示例性的,可以通过生成流模型中的第一神经网络)首先预测出多个变量的因果关系(例如本申请实施例中的第一信息)为:变量1导致变量2,其余变量之间均不存在因果关系,若第一信息不满足终止条件,则生成流模型(示例性的,可以通过生成流模型中的第一神经网络)可以根据第一信息,预测出多个变量的更丰富的因果关系(例如本申请实施例中的第二信息)为:变量1导致变量2,变量2导致变量3,其余变量之间均不存在因果关系(相当于第二信息相比于第一信息,增加了“变量2导致变量3”这一个变量对的因果关系)。
如上所述,在一次迭代的过程中,生成流模型(示例性的,可以通过生成流模型中的第一神经网络)可以在一次预测过程中预测出多个变量的第一信息,该第一信息可以指示所述多个变量之间的因果关系。
702、根据所述第一信息,通过生成流模型(generative model)中的第一神经网络,预测所述多个变量的第二信息;其中,所述第二信息指示所述多个变量中的第一变量和第二变量之间存在第一因果关系,所述第一因果关系表示所述第一变量用于作为所述第二变量的因变量、且所述第二变量用于作为所述第一变量的果变量;所述第一信息指示所述第一变量和所述第二变量之间不存在所述第一因果关系,所述第一变量和所述第二变量不同。
在一种可能的实现中,生成流模型可以包括第一神经网络。
在一种可能的实现中,第一神经网络、第二神经网络、第三神经网络可以为多层感知机(multi-layer perceptron,MLP)。MLP是一种前馈人工神经网络模型,其将输入的多个数据集映射到单一的输出的数据集上。
在一种可能的实现中,生成流模型还可以包括嵌入层,嵌入层可以对多个变量之间的因果关系进行嵌入处理,以得到对应的嵌入表示。
其中,第一神经网络根据一次迭代过程中某一次预测的因果关系,进行下一次因果关系的预测,例如,上述“某一次预测的因果关系”可以为第一信息,第一神经网络可以根据第一信息(例如将第一信息(或者第一信息对应的嵌入表示)输入到第一神经网络中),预测多个变量之间的第二信息,第二信息相比第一信息,所包括的存在因果关系的变量对的数量更多(示例性的,数量多一个,或者数量多超过一个)。
可见,本申请实施例中的生成流模型不是直接采样得到多个候选的因果关系,然后从多个候选的因果关系中选择较好的,而是,通过序列生成的方式,在每一次迭代的过程中,依次生成多个变量之间的因果关系,每一次生成都是基于上次一的生成结果,且随着因果 关系生成过程的进行,因果关系是不断丰富的。
本申请实施例中,将因果发现转化为通过生成流模型来采样一系列动作(也就是发现新的因果关系)生成复合对象(也就是多个变量之间的因果关系)的过程。可选的,本申请实施例中可以利用基于DAG结构的生成流模型将状态(也就是)连接起来。其中状态S为有向无环图对应的邻接矩阵(取值为0/1),例如可以见图8,动作a是将邻接矩阵某一位置的值标为1。该流模型有唯一初始节点S0,为一个全0的邻接矩阵,对应的是没有边连接的节点。
接下来介绍如何根据所述第一信息,通过生成流模型中的第一神经网络,得到第二信息:
在一种可能的实现中,可以根据所述第一信息,通过生成流模型中的第一神经网络,得到多个变量对中每个变量对存在因果关系的概率;基于所述多个变量对中由所述第一变量和所述第二变量构成的变量对存在所述第一因果关系的概率最高,得到所述第二信息。
也就是说,第一神经网络可以从多个变量构成的多个变量对(多个变量对在第一信息中不具备因果关系)中选择一个变量对,该选择出的变量对可以在第二信息中具备因果关系。
在一种可能的实现中,所述第一信息指示所述多个变量中的M个变量对之间存在因果关系,所述第二信息指示M+1个变量对之间存在因果关系,其中,所述M+1个变量对包括所述M个变量对以及由所述第一变量和所述第二变量构成的变量对。
在图8中,第一列为初始节点S0,第二列分别代表在两个因果图中加入x1→x2(上)和x4→x1(下面)的边,第三列是在第二列的基础上继续加边,可以发现第二列的两个矩阵都可以指向第三列中间的矩阵,说明该状态节点可以有多个父节点。
为了保证选择出的变量对(例如本申请实施例中的第一变量和第二变量)能够使得第二信息对应的图为有向无环图,可以基于一定的约束规则来选择具备因果关系的变量对。或者即使选择出的变量对(例如本申请实施例中的第一变量和第二变量)能够使得第二信息对应的图为有向有环图,但是第二信息不会被采用。接下来分别针对于这两种方式进行介绍:
方式1:基于目标约束
在一种可能的实现中,可以根据所述第一信息,获取目标约束;其中,所述目标约束用于约束所述第二信息中的多个变量对不存在因果关系;每个变量表示为图中的节点,作为因变量的变量所在的节点指向作为果变量的变量所在的节点;所述目标约束用于约束所述第二信息对应的图为有向无环图。相应的,可以根据所述第一信息以及所述目标约束,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息。
也就是说,通过目标约束,可以约束第一神经网络对变量对的选择,进而使得第二信息中增加的因果关系不会导致第二信息对应的图成为有向有环图。
接下来介绍如何根据第一信息,获取具备上述能力(可以约束第一神经网络对变量对的选择,进而使得第二信息中增加的因果关系不会导致第二信息对应的图成为有向有环图)的目标约束:
在一种可能的实现中,所述多个变量对包括目标变量对,所述目标变量对包括第三变量和第四变量。应理解,目标变量对可以为目标约束中指示的任意一个第二信息中不能存在因果关系的变量对。
在一种可能的实现中,在所述第一信息指示所述第三变量作为所述第四变量的因变量、且所述第四变量作为所述第三变量的果变量的情况下,所述目标约束约束所述第二信息指示所述第三变量不作为所述第四变量的因变量、且所述第四变量不作为所述第三变量的果变量。
也就是说,第二信息中不会出现和第一信息中重复的因果关系。
例如,参照图9,其中,第一信息中的灰色方框表示存在因果关系的变量对,例如第一信息左边的阴影方框表示的因果关系为:变量1导致变量2,第一信息中右边的阴影方框表示的因果关系为:变量2导致变量3,相应地,目标约束中由右上到左下线段组成的方框表示第二信息中不能存在的因果关系,例如,目标约束可以约束第二信息中不能包括变量1导致变量2的因果关系,且不能包括变量2导致变量3的因果关系。
在一种可能的实现中,在所述第一信息指示所述第三变量作为所述第四变量的因变量、且所述第四变量作为所述第三变量的果变量的情况下,所述目标约束约束所述第二信息指示所述第三变量不作为所述第四变量的果变量、且所述第四变量不作为所述第三变量的因变量。
也就是说,在第二信息中不会出现和第一信息中出现的因果关系相反的情况。
例如,参照图9,其中,第一信息中的灰色方框表示存在因果关系的变量对,例如第一信息左边的阴影方框表示的因果关系为:变量1导致变量2,第一信息中右边的阴影方框表示的因果关系为:变量2导致变量3,相应地,目标约束中由左上到右下线段组成的方框表示第二信息中不能存在的因果关系,例如,目标约束可以约束第二信息中不能包括变量2导致变量1的因果关系,且不能包括变量3导致变量2的因果关系。
在一种可能的实现中,在所述第三变量和所述第四变量相同的情况下,所述目标约束约束所述第二信息指示所述第三变量和所述第四变量之间不存在因果关系。
也就是说,第二信息中不会出现相同数据之间存在因果关系的情况。
例如,参照图9,其中,目标约束中由竖直线段组成的方框表示第二信息中不能存在的因果关系,例如,目标约束可以约束第二信息中不能包括变量1导致变量1的因果关系,且不能包括变量2导致变量2的因果关系,且不能包括变量3导致变量3的因果关系。
在一种可能的实现中,每个变量表示为图中的节点,作为因变量的变量所在的节点指向作为果变量的变量所在的节点;在所述第一信息对应的图指示所述第三变量和所述第四变量之间存在连通路径的情况下,所述目标约束约束所述第二信息指示所述第三变量不作为所述第四变量的果变量、且所述第四变量不作为所述第三变量的因变量。
也就是说,第二信息中不会出现第一信息中存在因果关系通路(该通路上的指向是相同的)的首尾节点相反的情况。
例如,参照图9,其中,第一信息中的灰色方框表示存在因果关系的变量对,例如第一信息左边的阴影方框表示的因果关系为:变量1导致变量2,第一信息中右边的阴影方 框表示的因果关系为:变量2导致变量3,也就是说第一信息中存在变量1、变量2到变量3的连接通路,首部为变量1,尾部为变量3,相当于变量1可以间接的导致变量3,目标约束中由交叉线段组成的方框表示第二信息中不能存在的因果关系,例如,目标约束可以约束第二信息中不能包括变量3导致变量1的因果关系。
接下来介绍如何确定上述存在连通路径的变量的方式:
在图论中,传递闭包C能够描述一个节点是否能够通过有向箭头到达另一个节点(也就是是否存在连接通路)。
在图10中,实际的有向无环图为v1→v2→v3→v4,而传递闭包里,v1和v3,v4之间均有箭头,v2,v3同理。A1为实际DAG对应的邻接矩阵,A2为传递闭包对应的邻接矩阵。
因此根据传递闭包可以发现v3和v4是v1的“后代”,均不能有箭头指向v1
相当于通过传递闭包可以确定出和第一信息中重复的因果关系、第一信息中存在连接通路的首位节点、以及自身和自身存在的因果关系。在得到传递闭包后可以对传递闭包对应的邻接矩阵进行转置并和第一信息的邻接矩阵求交集,进而可以得到目标约束。
在目标约束表示为mask矩阵的情况下,可以定义mask矩阵为:
根据更新的mask矩阵,该状态下的有效动作集为mask矩阵中取值为0的位置,取值为1的位置则无法执行动作(例如可以参照图11所示)。
示例性的,接下来结合一个示例介绍本申请实施例中目标约束的计算过程:
参照图12,第一信息可以指示变量1导致变量2、变量2导致变量3的因果关系,在分别得到表示和第一信息重复的因果关系的邻接矩阵、表示变量自身存在因果关系的邻接矩阵、表示第一信息中存在连接通路的因果关系的邻接矩阵,可以将上述邻接矩阵求交集得到闭包矩阵,闭包矩阵求转置后可以和第一信息重复的因果关系的邻接矩阵再求交集,进而得到目标约束。
应理解,上述求解得到目标矩阵中的每一步计算过程(例如求交集、求转置、求矩阵的乘积等)的复杂度均为O(1),而在现有的实现中,为了能够得到有向无环图的因果关系,则需要复杂度O(d3)的计算过程,其中,d为变量数量,也就是说,本申请实施例中通过在第一神经网络采用目标约束进行因果关系预测,可以在保证预测得到的因果关系的图为有向无环图的情况下,大大降低运算的复杂度。
在一种可能的实现中,第一神经网络在根据第一信息进行多个变量的因果关系预测时,可以根据目标约束,从多个变量构成的多个变量对中选择满足目标约束的至少一个变量对,并从至少一个变量对中选择第二信息中存在因果关系的变量对。
在一种可能的实现中,第一神经网络在根据第一信息进行多个变量的因果关系预测时,可以根据目标约束,将多个变量对中不选择满足目标约束的多个变量对的被选择概率赋予为0或者接近0的数值,例如可以赋予为1-5、1-4、1-5、1-6等等。进而,第一神经网络在根据第一信息进行多个变量的因果关系预测时,不满足目标约束的至少一个变量对不会被采样到。
示例性的,第一信息Si作为状态进入生成流模型的网络中,通过embedding传入已经 被mask矩阵掩盖了的第一神经网络,然后采样得到一个动作a,使得邻接矩阵的另一个位置标为了1(1表示该变量对存在因果关系),得到第二信息,进而可以完成一次状态转移。
在一种可能的实现中,在得到第二信息之后,可以基于第二信息来确定当前轮次的迭代是否已经结束(也就是第二信息是否为终止节点)。
若第二信息指示当前轮次的迭代已经未结束,则可以根据第二信息,通过第一神经网络继续进行多个变量的因果关系预测。
应理解,若上述生成流模型为已经训练好的模型,若第二信息指示当前轮次的迭代已经结束,则可以得到因果关系识别结果并输出。
应理解,在模型的训练过程中,若第二信息指示当前轮次的迭代已经结束,则可以确定损失函数,并基于损失函数来更新生成流模型(或者等batch的其他数据完成迭代后再更新),并开始下一轮的迭代过程。
在一种可能的实现中,可以基于所述第二信息指示所述多个变量中的任意一个变量和至少一个变量之间存在因果关系,确定当前轮次的迭代已经结束(也就是第二信息为终止节点)。
在一种可能的实现中,可以根据上述计算得到的传递闭包的邻接矩阵来确定是否到达终止节点,例如当传递闭包的邻接矩阵已经能够帮助识别唯一的拓扑序列,则到达终止节点。
本申请实施例中,可以根据各个中间状态(例如第一信息)的输入流量和输出流量之间的差异(差异最小化)、以及终止节点(例如第二信息)的输入流量和奖励值的差异来构建损失函数(差异最小化),根据该损失函数可以更新生成流模型,以便生成流模型可以逐渐具备寻找到多个变量之间更准确的因果关系的能力。
具体的,在一种可能的实现中,生成流模型可以将多个变量之间的因果关系作为节点的状态,并依次进行状态的转移,在到达终止节点后,可以基于各个节点的状态得到中间节点的输入流量和输出流量,以及终止节点的输入流量和奖励值,进而基于中间节点的输入流量和输出流量、以及终止节点的输入流量和奖励值来构建损失函数,进行生成流模型的更新。
更新后的生成流模型可以重复将多个变量之间的因果关系作为节点的状态,并依次进行状态的转移,以构建损失函数,多次进行生成流模型的更新,直到生成流模型收敛。收敛后的生成流模型可以将多个变量之间的因果关系作为节点的状态,并依次进行状态的转移,终止节点的状态所表示的因果关系可以作为多个变量的因果关系并输出。
接下来介绍第一信息的输入流量和输出流量的计算过程:
在一种可能的实现中,可以根据所述第一信息,获取多个第三信息,其中,所述第一信息指示所述多个变量中的M个变量对存在因果关系,每个所述第三信息指示所述M个变量对中的部分组变量之间存在因果关系;所述M为大于1的正整数。
其中,每个第三信息可以作为第一信息的父节点。
其中,第一信息可以包含M个因果关系,第三信息的数量也为M个,每个第三信息为将第一信息中的M个因果关系去掉一个因果关系得到的,也就是每个第三信息可以指示 M-1个因果关系。
例如,参照图13,第一信息可以指示如下因果关系:变量1导致变量2、以及变量2导致变量3,第三信息可以包括第三信息1和第三信息2,第三信息1可以指示变量1导致变量2,第三信息1可以指示变量2导致变量3。
在一种可能的实现中,可以根据所述多个第三信息,通过所述生成流模型中的第二神经网络,得到所述多个第三信息的第一输入流量(input flow,或者可以称之为第三信息的概率);其中,可以根据多个第三信息得到每个第三信息的嵌入表示,并将每个第三信息的嵌入表示输入至第二神经网络,以得到每个第三信息的输入流量,各个第三信息的输入流量的加和可以为上述多个第三信息的第一输入流量,第一输入流量可以理解为输入到第一信息的流量。
示例性的,对于第一信息Si,要寻找到其所有父节点Sp以及这些父节点转移到Si的动作集合,对父节点进行embedding之后将它们和动作集(a1,…,an)共同传入第二神经网络计算节点Si的流入F(Sp→Si)。
在一种可能的实现中,可以根据所述第一信息,通过所述生成流模型中的第三神经网络,得到所述第一信息的第一输出流量(output flow,或者可以称之为第一信息的概率);其中,可以根据第一信息得到第一信息的嵌入表示,并将第一信息的嵌入表示输入至第三神经网络,以得到第一信息的输出流量。
在一种可能的实现中,所述第一输入流量与所述第一输出流量的差异度(例如差异度最小化)用于构建损失函数,进而可以根据所述损失函数,更新所述第一神经网络、所述第二神经网络以及所述第三神经网络。
在第二信息为终止节点(终止节点的判断逻辑可以参照上述实施例中的描述,这里不再赘述)时,可以计算第二信息的输入流量以及奖励值,并基于输入流量和奖励值的差异度来构建损失函数,接下来介绍第二信息的输入流量和奖励值的计算过程:
在一种可能的实现中,可以根据所述第二信息,获取多个第四信息,其中,所述第三信息指示所述多个变量中的N个变量对存在因果关系,每个所述第四信息指示所述N个变量对中的部分组变量之间存在因果关系;所述N为大于1的正整数;根据所述多个第四信息,通过所述生成流模型中的第二神经网络,得到所述多个第四信息的第二输入流量。关于第二信息的输入流量的计算可以参照上述实施例中关于第一信息的输入流量的计算,这里不再赘述。
在一种可能的实现中,可以根据所述第二信息,得到所述第二信息的第一奖励值,所述第一奖励值表示所述第二信息与所述多个变量的数据集的联合分布的吻合度;其中,所述第二输入流量与所述第一奖励值的差异度用于构建损失函数;根据所述损失函数,更新所述第一神经网络、所述第二神经网络以及所述第三神经网络。
本申请实施例中,对于中间节点(非起始节点S0和终止节点Sf),利用神经网络计算节点的流入和流出;对于S0,仅计算节点的流出;对于Sf,仅计算流入,我们将Sf对应的G 计算奖励值,作为终止节点的奖励值。该发明的目标函数为满足流匹配约束,使得节点的流入等于流出,公式可以如下所示:
对于每一个节点,可以计算它的流入值和流出值或者奖励值的差值,然后对所有节点加和计算总损失。
其中,节点的流入可以为:
s,a:T(s,a)=s′Fθ(s,a);方法是寻找到该节点的所有父节点及它们的动作,共同传入到神经网络进行计算。
节点的流出可以是:
∏a′∈Α(s′)∑a′∈Α(s′)Fθ(s′,a′);
方法是将该节点传入神经网络进行计算,这里有一个指示函数,用于判断该节点是否为中间节点。
终止节点的奖励值可以是:∏s′∈sfR(s′);
其中奖励函数的定义可以为:

在一种可能的实现中,可以用贝叶斯信息准则来判断模型的拟合程度,用指数函数是为了避免负值对流入等于流出约束的影响。
应理解,在确定出第二信息满足终止节点的条件之后,可以通过闭包矩阵得到第二信息对应的完全连接的因果结果,并基于完全连接的因果结构计算其奖励值。
通过上述方式,每次迭代的过程中,可以确定出一个损失,并基于损失更新生成流模型,经过多轮的迭代更新,可以使得生成流模型具备针对于多个变量的因果关系的准确识别能力,进而可以得到多个变量之间的较为准确的因果关系。
接下来结合一个具体的示例介绍一种基于目标约束进行的因果关系预测的方法:
以目标约束为mask矩阵为例,参照图14,图14示出的是本实施实施例的单步更新框架,对终止节点计算奖励值,中间节点仅计算流入流出值,在该示例中,终止节点的判断条件为:识别到所有节点之间唯一的拓扑序列。
首先Si作为状态进入生成流模型的网络中,通过embedding传入已经被mask矩阵掩盖了的神经网络,然后采样得到一个动作a,使得邻接矩阵的另一个位置标为了1,完成一次 状态转移。对于Si+1,我们要寻找到其所有父节点Sp以及这些父节点转移到Si+1的动作集合,对父节点embedding之后将它们和动作集(a1,…,an)共同传入神经网络计算节点Si+1的流入F(Sp→Si+1)。
同时,需要更新mask矩阵和传递闭包的邻接矩阵,见图14的右侧所示。在此更新中如果发现传递闭包的邻接矩阵已经能够帮助识别唯一的拓扑序列,则到达终止节点,返回掩盖了对角线元素的传递闭包作为Sf计算奖励值;若无法识别序列,则继续采样,在判断分支中向左边走,将Si+1进行embedding,传入神经网络计算节点Si+1的流出F(Si+1→Sc)。在网络中利用流匹配约束计算损失loss。
2、不基于目标约束
在一种可能的实现中,在第一神经网络基于第一信息进行第二信息的预测时,可以不采用可以保证第二信息为有向无环图的目标约束,因此,第二信息有可能会成为有向有环图或者其他不满足要求的图。
在一种可能的实现中,在第一神经网络基于第一信息进行第二信息的预测时,可以从第一信息中指示不存在因果关系的变量对中预测存在因果关系的数据对,以得到第二信息,若第二信息为有向无环图,且未满足上述基于目标约束中的终止节点条件,则第一神经网络可以继续基于第二信息进行多个变量的因果关系预测。
若第二信息为有向有环图或者其他不满足要求的图,则可以认为第二信息为终止节点而结束当前次的迭代,并通过构建的损失来更新生成流模型。
针对于中间节点,以第一信息为中间节点为例,在一种可能的实现中,可以根据所述第一信息,获取多个第三信息,其中,所述第一信息指示所述多个变量中的M个变量对存在因果关系,每个所述第三信息指示所述M个变量对中的部分组变量之间存在因果关系;所述M为大于1的正整数;根据所述多个第三信息,通过所述生成流模型中的第二神经网络,得到所述多个第三信息的第一输入流量,根据所述第一信息,得到所述第一信息的第二奖励值,所述第二奖励值表示所述第一信息与所述多个变量的数据集的联合分布的吻合度;根据所述第一信息,通过所述生成流模型中的第三神经网络,得到所述第一信息的第一输出流量;其中,所述第一输出流量和所述第二奖励值的加和结果与所述第一输入流量用于构建损失函数,进而可以根据所述损失函数,更新所述第一神经网络、所述第二神经网络以及所述第三神经网络。
针对于终止节点,以第二信息为终止节点为例,在一种可能的实现中,可以根据所述第二信息,获取多个第四信息,其中,所述第三信息指示所述多个变量中的N个变量对存在因果关系,每个所述第四信息指示所述N个变量对中的部分组变量之间存在因果关系;所述N为大于1的正整数;根据所述多个第四信息,通过所述生成流模型中的第二神经网络,得到所述多个第四信息的第二输入流量;根据所述第二信息,得到所述第二信息的第一奖励值,所述第一奖励值表示所述第二信息与所述多个变量的数据集的联合分布的吻合度;其中,所述第二输入流量与所述第一奖励值的差异度用于构建损失函数;根据所述损失函数,更新所述第一神经网络、所述第二神经网络以及所述第三神经网络。
不基于目标约束与基于目标约束的区别在于终止节点的判定条件、状态节点的奖励值计算和单步更新框架。如图15所示,类似于强化学习中的dense reward,该框架对每一个生成的DAG计算奖励值和流出,而终止节点的判断条件变为:生成一个有环的图,例如图15中第四列矩阵中有红色的位置。因此本实施例中可以计算到每一个中间节点状态的奖励值,流匹配模型的中间节点的约束也改为:流入值=流出值+奖励值。
图16展示的是不基于目标约束实施例的单步更新框架,首先S作为状态进入生成流模型的网络(如MLP)中,采样得到一个动作a,接下来对a判断是否在有效动作集内,若无效,则直接寻找到其所有父节点Sp以及这些父节点转移到S的动作集合,将其共同传入神经网络计算节点S的流入,用奖励函数计算S的奖励值;若该动作有效,则完成一次状态转移S→S`。计算S`的奖励值、流入和流出,方法同理。最后用流匹配目标函数计算损失函数loss。
本申请实施例提供了一种因果关系确定方法,所述方法包括:获取多个变量的第一信息,所述第一信息指示所述多个变量之间的因果关系;根据所述第一信息,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息;其中,所述第二信息指示所述多个变量中的第一变量和第二变量之间存在第一因果关系;所述第一信息指示所述第一变量和所述第二变量之间不存在所述第一因果关系,所述第一变量和所述第二变量不同。通过序列生成的方式来识别变量之间的因果关系,随着生成流模型的迭代更新,可以使得生成流模型具备生成较优的因果关系序列的能力,而无需采样大量的因果序列而从多个因果序列中选择较优的,降低算力开销,提高模型的收敛速度。
本申请实施例还提供了一种因果关系确定方法,所述方法包括:
获取多个变量的第一信息,所述第一信息指示所述多个变量之间的因果关系,所述变量包括用户的操作类型以及至少一个目标变量,所述目标变量为如下的至少一种:
物品的属性信息以及所述用户的属性信息;
根据所述第一信息,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息;其中,
所述第二信息指示所述多个变量中的第一变量和第二变量之间存在第一因果关系;所述第一信息指示所述第一变量和所述第二变量之间不存在所述第一因果关系,所述第一变量和所述第二变量不同。
在一种可能的实现中,所述用户的属性信息包括如下的至少一种:性别,年龄,职业,收入,爱好,教育程度。
在一种可能的实现中,物品的属性信息包括如下的至少一种:物品名称,开发者,安装包大小,品类,好评度。
其中,用户的属性信息可以为与用户喜好特征相关的属性,性别、年龄、职业、收入、爱好以及受教育程度中的至少一种,其中,性别可以为男或者女,年龄可以为0-100之间的数字,职业可以为教师、程序员、厨师等等,爱好可以为篮球、网球、跑步等等,受教育程度可以为小学、初中、高中、大学等等;本申请并不限定用户的属性信息的具体类型;
其中,物品可以为实体物品,或者是虚拟物品,例如可以为APP、音视频、网页以及 新闻资讯等物品,物品的属性信息可以为物品名称、开发者、安装包大小、品类以及好评度中的至少一种,其中,以物品为应用程序为例,物品的品类可以为聊天类、跑酷类游戏、办公类等等,好评度可以为针对于物品的打分、评论等;本申请并不限定物品的属性信息的具体类型;
其中,操作类型可以为用户针对于物品的行为操作类型,在网络平台和应用上,用户往往和物品有多种多样的交互形式(也就是有多种操作类型),比如用户在电商平台行为中的浏览、点击、加入购物车、购买等操作类型。
应理解,通过生成流模型最终得到的多个变量之间的因果关系可以包括至少一个目标变量与用户的操作类型之间因果关系。
关于本申请实施例的其他描述可以参照上述实施例中的因果关系确定方法,这里不再赘述。
本申请实施例还提供了一种因果关系确定方法,所述方法包括:
获取多个变量的第一信息,所述第一信息指示所述多个变量之间的因果关系,所述变量包括目标对象的属性信息;其中,
所述目标对象为芯片,所述属性信息为所述芯片的局部片段或者故障信息;或者,
所述目标对象为通信网络的节点,所述目标变量为网元的关键表现指标KPI、运行数据或者告警信息;
根据所述第一信息,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息;其中,
所述第二信息指示所述多个变量中的第一变量和第二变量之间存在第一因果关系;所述第一信息指示所述第一变量和所述第二变量之间不存在所述第一因果关系,所述第一变量和所述第二变量不同。
其中,芯片的局部片段可以为芯片表面的局部区域,多个局部片段可以为芯片表面的多个局部区域,且多个局部片段中的任意两个局部片段之间的面积大小和外部轮廓形状相同,其中,局部片段之间的面积大小相同可以理解为局部片段所在的区域的面积相同,局部片段之间的外部轮廓形状相同可以理解为局部片段所在的区域的外部轮廓形状相同,例如都为正方形,或者长宽比一致的矩形等等;其中,在一种可能的实现中,所述多个局部片段中的每个局部片段的面积在预设范围内,每个局部片段的面积不能过大也不能过小,局部片段的面积大小可以与芯片的大小有关,芯片的大小越大,则局部片段的面积越大,例如局部片段的面积和芯片的面积可以保持一定比例,局部片段的面积大小还可以与芯片上的基础单元之间的间隔长度有关,例如可以将局部片段的边长设置为基础单元(例如芯片上的铺铜polygon区域)之间的间隔长度的预设倍数,例如3倍、4倍、5倍等等。其中,每个局部片段可以包括排布的器件和/或器件之间的连接线,本申请实施例中,局部片段,具体可以是获取到每个局部片段的图像信息或者是其他能够表达局部片段上器件排布或者连接线结构的信息,基于该信息可以唯一确定局部片段的结构特征;
其中,芯片的的故障信息可以包括每个局部片段在所述诊断报告中的出现次数;或,所述每个局部片段导致所述故障芯片出现芯片故障的概率等;
其中,KPI可以用来衡量通信网络中网元的运行状态。通常情况下,异常检测设备会采集每个KPI在不同时刻的观测数据。
关于本申请实施例的其他描述可以参照上述实施例中的因果关系确定方法,这里不再赘述。
参照图17,图17为本申请实施例提供的一种因果关系确定装置的结构示意,其中,所述装置1700,包括:
获取模块1701,用于获取多个变量的第一信息,所述第一信息指示所述多个变量之间的因果关系;
其中,关于获取模块1701的具体描述可以参照上述实施例中步骤701的描述,这里不再赘述。
因果预测模块1702,用于根据所述第一信息,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息;其中,
所述第二信息指示所述多个变量中的第一变量和第二变量之间存在第一因果关系;所述第一信息指示所述第一变量和所述第二变量之间不存在所述第一因果关系,所述第一变量和所述第二变量不同。
其中,关于因果预测模块1702的具体描述可以参照上述实施例中步骤702的描述,这里不再赘述。
在一种可能的实现中,第一信息指示多个变量中的X个变量对之间存在因果关系,第二信息指示X+1个变量对之间存在因果关系,其中,X+1个变量对包括X个变量对以及由第一变量和第二变量构成的变量对。
在一种可能的实现中,每个所述变量为如下的一种:
图像数据的一个特征维度、文本数据的一个特征维度、音频数据的一个特征维度、视频数据的一个特征维度。
在一种可能的实现中,所述装置还包括:
模型更新模块1703,用于根据所述第一信息,通过所述生成流模型中的第二神经网络,得到所述第一信息的第一输入流量;
根据所述第一信息,通过所述生成流模型中的第三神经网络,得到所述第一信息的第一输出流量;其中,所述第一输入流量与所述第一输出流量的差异度用于得到损失函数;
根据所述损失函数,更新所述第一神经网络、所述第二神经网络以及所述第三神经网络。
在一种可能的实现中,所述模型更新模块1703,具体用于:
根据所述第一信息,获取多个第三信息,其中,所述第一信息指示M个变量对的变量之间存在因果关系,每个所述第三信息指示所述M个变量对中的部分变量对的变量之间存在因果关系;所述M为大于1的正整数;
根据所述多个第三信息,通过所述生成流模型中的第二神经网络,得到所述第一信息的第一输入流量。
在一种可能的实现中,所述部分变量对为所述M个变量对中的M-1个变量对。
在一种可能的实现中,所述装置还包括:
模型更新模块1703,用于根据所述第一信息,得到所述第一信息的第二奖励值,所述第二奖励值表示所述第一信息与所述多个变量的数据集的联合分布的吻合度;
所述第一输入流量与所述第一输出流量的差异度用于构建损失函数,包括:
所述第一输出流量和所述第二奖励值的加和结果与所述第一输入流量用于构建损失函数。
在一种可能的实现中,所述装置还包括:
模型更新模块1703,用于通过所述生成流模型中的第二神经网络,得到所述第二信息的第二输入流量;
根据所述第二信息,通过所述生成流模型中的第三神经网络,得到所述第二信息的第一奖励值;其中,所述第二输入流量与所述第一奖励值的差异度用于构建损失函数;
根据所述损失函数,更新所述第一神经网络、所述第二神经网络以及所述第三神经网络。
在一种可能的实现中,所述根据所述第二信息,通过所述生成流模型中的第二神经网络,得到所述第二信息的第二输入流量,包括:
根据所述第一信息,获取多个第四信息,其中,所述第二信息指示N个变量对的变量之间存在因果关系,每个所述第四信息指示所述N个变量对中的部分变量对的变量之间存在因果关系;所述N为大于1的正整数;
根据所述多个第四信息,通过所述生成流模型中的第二神经网络,得到所述第二信息的第二输入流量。
在一种可能的实现中,所述模型更新模块1703,还用于:
基于所述第二信息指示所述多个变量中的任意一个变量和至少一个变量之间存在因果关系;触发执行所述根据所述第二信息,得到所述第二信息的第一奖励值的步骤。
在一种可能的实现中,所述第二信息对应于第一图,每个所述变量对应于所述第一图中的节点,所述第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;所述模型更新模块1703,还用于:
基于所述第一图为有向有环图;触发执行所述根据所述第二信息,得到所述第二信息的第一奖励值的步骤。
在一种可能的实现中,所述装置还包括:
约束获取模块,用于根据所述第一信息,获取目标约束;其中,所述目标约束用于约束所述第二信息中不存在因果关系的多个变量对;
所述根据所述第一信息,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息,包括:
根据所述第一信息以及所述目标约束,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息。
在一种可能的实现中,所述第二信息对应于第一图,每个所述变量对应于所述第一图 中的节点,所述第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;所述目标约束用于约束所述第一图为有向无环图。
在一种可能的实现中,所述多个变量对包括目标变量对,所述目标变量对是由第三变量和第四变量构成的;
在所述第一信息指示所述第三变量作为所述第四变量的因变量、且所述第四变量作为所述第三变量的果变量的情况下,所述目标约束约束所述第二信息指示所述第三变量不作为所述第四变量的果变量、且所述第四变量不作为所述第三变量的因变量;或者,
在所述第三变量和所述第四变量相同的情况下,所述目标约束约束所述第二信息指示所述第三变量和所述第四变量之间不存在因果关系。
在一种可能的实现中,所述因果预测模块,具体用于:
根据所述第一信息,通过生成流模型中的第一神经网络,得到多个变量对中每个变量对存在因果关系的概率;
基于所述多个变量对中由所述第一变量和所述第二变量构成的变量对存在所述第一因果关系的概率最高,得到所述第二信息。
本申请实施例还提供了一种因果关系确定装置,所述装置包括:
获取模块,用于获取多个变量的第一信息,所述第一信息指示所述多个变量之间的因果关系,所述变量包括用户的操作类型以及至少一个目标变量,所述目标变量为如下的至少一种:
物品的属性信息以及所述用户的属性信息;
因果预测模块,用于根据所述第一信息,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息;其中,
所述第二信息指示所述多个变量中的第一变量和第二变量之间存在第一因果关系;所述第一信息指示所述第一变量和所述第二变量之间不存在所述第一因果关系,所述第一变量和所述第二变量不同。
在一种可能的实现中,所述用户的属性信息包括如下的至少一种:性别,年龄,职业,收入,爱好,教育程度。
在一种可能的实现中,物品的属性信息包括如下的至少一种:物品名称,开发者,安装包大小,品类,好评度。
在一种可能的实现中,第一信息指示多个变量中的X个变量对之间存在因果关系,第二信息指示X+1个变量对之间存在因果关系,其中,X+1个变量对包括X个变量对以及由第一变量和第二变量构成的变量对。
在一种可能的实现中,每个所述变量为如下的一种:
图像数据的一个特征维度、文本数据的一个特征维度、音频数据的一个特征维度、视频数据的一个特征维度。
在一种可能的实现中,所述装置还包括:
模型更新模块,用于根据所述第一信息,通过所述生成流模型中的第二神经网络,得到所述第一信息的第一输入流量;
根据所述第一信息,通过所述生成流模型中的第三神经网络,得到所述第一信息的第一输出流量;其中,所述第一输入流量与所述第一输出流量的差异度用于得到损失函数;
根据所述损失函数,更新所述第一神经网络、所述第二神经网络以及所述第三神经网络。
在一种可能的实现中,所述模型更新模块,具体用于:
根据所述第一信息,获取多个第三信息,其中,所述第一信息指示M个变量对的变量之间存在因果关系,每个所述第三信息指示所述M个变量对中的部分变量对的变量之间存在因果关系;所述M为大于1的正整数;
根据所述多个第三信息,通过所述生成流模型中的第二神经网络,得到所述第一信息的第一输入流量。
在一种可能的实现中,所述部分变量对为所述M个变量对中的M-1个变量对。
在一种可能的实现中,所述装置还包括:
模型更新模块,用于根据所述第一信息,得到所述第一信息的第二奖励值,所述第二奖励值表示所述第一信息与所述多个变量的数据集的联合分布的吻合度;
所述第一输入流量与所述第一输出流量的差异度用于构建损失函数,包括:
所述第一输出流量和所述第二奖励值的加和结果与所述第一输入流量用于构建损失函数。
在一种可能的实现中,所述装置还包括:
模型更新模块,用于通过所述生成流模型中的第二神经网络,得到所述第二信息的第二输入流量;
根据所述第二信息,通过所述生成流模型中的第三神经网络,得到所述第二信息的第一奖励值;其中,所述第二输入流量与所述第一奖励值的差异度用于构建损失函数;
根据所述损失函数,更新所述第一神经网络、所述第二神经网络以及所述第三神经网络。
在一种可能的实现中,所述根据所述第二信息,通过所述生成流模型中的第二神经网络,得到所述第二信息的第二输入流量,包括:
根据所述第一信息,获取多个第四信息,其中,所述第二信息指示N个变量对的变量之间存在因果关系,每个所述第四信息指示所述N个变量对中的部分变量对的变量之间存在因果关系;所述N为大于1的正整数;
根据所述多个第四信息,通过所述生成流模型中的第二神经网络,得到所述第二信息的第二输入流量。
在一种可能的实现中,所述模型更新模块,还用于:
基于所述第二信息指示所述多个变量中的任意一个变量和至少一个变量之间存在因果关系;触发执行所述根据所述第二信息,得到所述第二信息的第一奖励值的步骤。
在一种可能的实现中,所述第二信息对应于第一图,每个所述变量对应于所述第一图中的节点,所述第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;所述模型更新模块,还用于:
基于所述第一图为有向有环图;触发执行所述根据所述第二信息,得到所述第二信息的第一奖励值的步骤。
在一种可能的实现中,所述装置还包括:
约束获取模块,用于根据所述第一信息,获取目标约束;其中,所述目标约束用于约束所述第二信息中不存在因果关系的多个变量对;
所述根据所述第一信息,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息,包括:
根据所述第一信息以及所述目标约束,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息。
在一种可能的实现中,所述第二信息对应于第一图,每个所述变量对应于所述第一图中的节点,所述第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;所述目标约束用于约束所述第一图为有向无环图。
在一种可能的实现中,所述多个变量对包括目标变量对,所述目标变量对是由第三变量和第四变量构成的;
在所述第一信息指示所述第三变量作为所述第四变量的因变量、且所述第四变量作为所述第三变量的果变量的情况下,所述目标约束约束所述第二信息指示所述第三变量不作为所述第四变量的果变量、且所述第四变量不作为所述第三变量的因变量;或者,
在所述第三变量和所述第四变量相同的情况下,所述目标约束约束所述第二信息指示所述第三变量和所述第四变量之间不存在因果关系。
在一种可能的实现中,所述因果预测模块,具体用于:
根据所述第一信息,通过生成流模型中的第一神经网络,得到多个变量对中每个变量对存在因果关系的概率;
基于所述多个变量对中由所述第一变量和所述第二变量构成的变量对存在所述第一因果关系的概率最高,得到所述第二信息。
本申请实施例还提供了一种因果关系确定装置,所述装置包括:
获取模块,用于获取多个变量的第一信息,所述第一信息指示所述多个变量之间的因果关系,所述变量包括目标对象的属性信息;其中,
所述目标对象为芯片,所述属性信息为所述芯片的局部片段或者故障信息;或者,
所述目标对象为通信网络的节点,所述目标变量为网元的关键表现指标KPI、运行数据或者告警信息;
因果预测模块,用于根据所述第一信息,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息;其中,
所述第二信息指示所述多个变量中的第一变量和第二变量之间存在第一因果关系;所述第一信息指示所述第一变量和所述第二变量之间不存在所述第一因果关系,所述第一变量和所述第二变量不同。
在一种可能的实现中,第一信息指示多个变量中的X个变量对之间存在因果关系,第二信息指示X+1个变量对之间存在因果关系,其中,X+1个变量对包括X个变量对以及由 第一变量和第二变量构成的变量对。
在一种可能的实现中,每个所述变量为如下的一种:
图像数据的一个特征维度、文本数据的一个特征维度、音频数据的一个特征维度、视频数据的一个特征维度。
在一种可能的实现中,所述装置还包括:
模型更新模块,用于根据所述第一信息,通过所述生成流模型中的第二神经网络,得到所述第一信息的第一输入流量;
根据所述第一信息,通过所述生成流模型中的第三神经网络,得到所述第一信息的第一输出流量;其中,所述第一输入流量与所述第一输出流量的差异度用于得到损失函数;
根据所述损失函数,更新所述第一神经网络、所述第二神经网络以及所述第三神经网络。
在一种可能的实现中,所述模型更新模块,具体用于:
根据所述第一信息,获取多个第三信息,其中,所述第一信息指示M个变量对的变量之间存在因果关系,每个所述第三信息指示所述M个变量对中的部分变量对的变量之间存在因果关系;所述M为大于1的正整数;
根据所述多个第三信息,通过所述生成流模型中的第二神经网络,得到所述第一信息的第一输入流量。
在一种可能的实现中,所述部分变量对为所述M个变量对中的M-1个变量对。
在一种可能的实现中,所述装置还包括:
模型更新模块,用于根据所述第一信息,得到所述第一信息的第二奖励值,所述第二奖励值表示所述第一信息与所述多个变量的数据集的联合分布的吻合度;
所述第一输入流量与所述第一输出流量的差异度用于构建损失函数,包括:
所述第一输出流量和所述第二奖励值的加和结果与所述第一输入流量用于构建损失函数。
在一种可能的实现中,所述装置还包括:
模型更新模块,用于通过所述生成流模型中的第二神经网络,得到所述第二信息的第二输入流量;
根据所述第二信息,通过所述生成流模型中的第三神经网络,得到所述第二信息的第一奖励值;其中,所述第二输入流量与所述第一奖励值的差异度用于构建损失函数;
根据所述损失函数,更新所述第一神经网络、所述第二神经网络以及所述第三神经网络。
在一种可能的实现中,所述根据所述第二信息,通过所述生成流模型中的第二神经网络,得到所述第二信息的第二输入流量,包括:
根据所述第一信息,获取多个第四信息,其中,所述第二信息指示N个变量对的变量之间存在因果关系,每个所述第四信息指示所述N个变量对中的部分变量对的变量之间存在因果关系;所述N为大于1的正整数;
根据所述多个第四信息,通过所述生成流模型中的第二神经网络,得到所述第二信息 的第二输入流量。
在一种可能的实现中,所述模型更新模块,还用于:
基于所述第二信息指示所述多个变量中的任意一个变量和至少一个变量之间存在因果关系;触发执行所述根据所述第二信息,得到所述第二信息的第一奖励值的步骤。
在一种可能的实现中,所述第二信息对应于第一图,每个所述变量对应于所述第一图中的节点,所述第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;所述模型更新模块,还用于:
基于所述第一图为有向有环图;触发执行所述根据所述第二信息,得到所述第二信息的第一奖励值的步骤。
在一种可能的实现中,所述装置还包括:
约束获取模块,用于根据所述第一信息,获取目标约束;其中,所述目标约束用于约束所述第二信息中不存在因果关系的多个变量对;
所述根据所述第一信息,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息,包括:
根据所述第一信息以及所述目标约束,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息。
在一种可能的实现中,所述第二信息对应于第一图,每个所述变量对应于所述第一图中的节点,所述第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;所述目标约束用于约束所述第一图为有向无环图。
在一种可能的实现中,所述多个变量对包括目标变量对,所述目标变量对是由第三变量和第四变量构成的;
在所述第一信息指示所述第三变量作为所述第四变量的因变量、且所述第四变量作为所述第三变量的果变量的情况下,所述目标约束约束所述第二信息指示所述第三变量不作为所述第四变量的果变量、且所述第四变量不作为所述第三变量的因变量;或者,
在所述第三变量和所述第四变量相同的情况下,所述目标约束约束所述第二信息指示所述第三变量和所述第四变量之间不存在因果关系。
在一种可能的实现中,所述因果预测模块,具体用于:
根据所述第一信息,通过生成流模型中的第一神经网络,得到多个变量对中每个变量对存在因果关系的概率;
基于所述多个变量对中由所述第一变量和所述第二变量构成的变量对存在所述第一因果关系的概率最高,得到所述第二信息。
接下来介绍本申请实施例提供的一种执行设备,请参阅图18,图18为本申请实施例提供的执行设备的一种结构示意图,执行设备1800具体可以表现为手机、平板、笔记本电脑、智能穿戴设备等,此处不做限定。具体的,执行设备1800包括:接收器1801、发射器1802、处理器1803和存储器1804(其中执行设备1800中的处理器1803的数量可以一个或多个,图18中以一个处理器为例),其中,处理器1803可以包括应用处理器18031和通信处理器18032。在本申请的一些实施例中,接收器1801、发射器1802、处理器1803和 存储器1804可通过总线或其它方式连接。
存储器1804可以包括只读存储器和随机存取存储器,并向处理器1803提供指令和数据。存储器1804的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。存储器1804存储有处理器和操作指令、可执行模块或者数据结构,或者它们的子集,或者它们的扩展集,其中,操作指令可包括各种操作指令,用于实现各种操作。
处理器1803控制执行设备的操作。具体的应用中,执行设备的各个组件通过总线系统耦合在一起,其中总线系统除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都称为总线系统。
上述本申请实施例揭示的方法可以应用于处理器1803中,或者由处理器1803实现。处理器1803可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1803中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1803可以是通用处理器、数字信号处理器(digital signal processing,DSP)、微处理器或微控制器,还可进一步包括专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。该处理器1803可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1804,处理器1803读取存储器1804中的信息,结合其硬件完成上述方法的步骤。
接收器1801可用于接收输入的数字或字符信息,以及产生与执行设备的相关设置以及功能控制有关的信号输入。发射器1802可用于输出数字或字符信息;发射器1802还可用于向磁盘组发送指令,以修改磁盘组中的数据。
本申请实施例中,在一种情况下,处理器1803,用于执行图7对应实施例中的因果关系确定方法的步骤。
本申请实施例还提供了一种服务器,请参阅图19,图19是本申请实施例提供的服务器一种结构示意图,具体的,服务器1900由一个或多个服务器实现,服务器1900可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)1919(例如,一个或一个以上处理器)和存储器1932,一个或一个以上存储应用程序1942或数据1944的存储介质1930(例如一个或一个以上海量存储设备)。其中,存储器1932和存储介质1930可以是短暂存储或持久存储。存储在存储介质1930的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器1919可以设置为与存储介质1930通信,在服务器1900上执行存储介质1930中的一系列指令操作。
服务器1900还可以包括一个或一个以上电源1920,一个或一个以上有线或无线网络 接口1950,一个或一个以上输入输出接口1958;或,一个或一个以上操作系统1941,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
本申请实施例中,中央处理器1919,用于执行图7对应实施例中的因果关系确定方法的步骤。
本申请实施例中还提供一种包括计算机可读指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如前述执行设备所执行的步骤,或者,使得计算机执行如前述训练设备所执行的步骤。
本申请实施例中还提供一种计算机可读存储介质,该计算机可读存储介质中存储有用于进行信号处理的程序,当其在计算机上运行时,使得计算机执行如前述执行设备所执行的步骤,或者,使得计算机执行如前述训练设备所执行的步骤。
本申请实施例提供的执行设备、训练设备或终端设备具体可以为芯片,芯片包括:处理单元和通信单元,所述处理单元例如可以是处理器,所述通信单元例如可以是输入/输出接口、管脚或电路等。该处理单元可执行存储单元存储的计算机执行指令,以使执行设备内的芯片执行上述实施例描述的因果关系确定方法,或者,以使训练设备内的芯片执行上述实施例中与模型训练相关的步骤。可选地,所述存储单元为所述芯片内的存储单元,如寄存器、缓存等,所述存储单元还可以是所述无线接入设备端内的位于所述芯片外部的存储单元,如只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)等。
具体的,请参阅图20,图20为本申请实施例提供的芯片的一种结构示意图,所述芯片可以表现为神经网络处理器NPU 2000,NPU 2000作为协处理器挂载到主CPU(Host CPU)上,由Host CPU分配任务。NPU的核心部分为运算电路2003,通过控制器2004控制运算电路2003提取存储器中的矩阵数据并进行乘法运算。
在一些实现中,运算电路2003内部包括多个处理单元(Process Engine,PE)。在一些实现中,运算电路2003是二维脉动阵列。运算电路2003还可以是一维脉动阵列或者能够执行例如乘法和加法这样的数学运算的其它电子线路。在一些实现中,运算电路2003是通用的矩阵处理器。
举例来说,假设有输入矩阵A,权重矩阵B,输出矩阵C。运算电路从权重存储器2002中取矩阵B相应的数据,并缓存在运算电路中每一个PE上。运算电路从输入存储器2001中取矩阵A数据与矩阵B进行矩阵运算,得到的矩阵的部分结果或最终结果,保存在累加器(accumulator)2008中。
统一存储器2006用于存放输入数据以及输出数据。权重数据直接通过存储单元访问控制器(Direct Memory Access Controller,DMAC)2005,DMAC被搬运到权重存储器2002中。输入数据也通过DMAC被搬运到统一存储器2006中。
BIU为Bus Interface Unit即,总线接口单元2010,用于AXI总线与DMAC和取指存储器(Instruction Fetch Buffer,IFB)2009的交互。
总线接口单元2010(Bus Interface Unit,简称BIU),用于取指存储器2009从外部存储器获取指令,还用于存储单元访问控制器2005从外部存储器获取输入矩阵A或者权重矩 阵B的原数据。
DMAC主要用于将外部存储器DDR中的输入数据搬运到统一存储器2006或将权重数据搬运到权重存储器2002中或将输入数据数据搬运到输入存储器2001中。
向量计算单元2007包括多个运算处理单元,在需要的情况下,对运算电路的输出做进一步处理,如向量乘,向量加,指数运算,对数运算,大小比较等等。主要用于神经网络中非卷积/全连接层网络计算,如Batch Normalization(批归一化),像素级求和,对特征平面进行上采样等。
在一些实现中,向量计算单元2007能将经处理的输出的向量存储到统一存储器2006。例如,向量计算单元2007可以将线性函数;或,非线性函数应用到运算电路2003的输出,例如对卷积层提取的特征平面进行线性插值,再例如累加值的向量,用以生成激活值。在一些实现中,向量计算单元2007生成归一化的值、像素级求和的值,或二者均有。在一些实现中,处理过的输出的向量能够用作到运算电路2003的激活输入,例如用于在神经网络中的后续层中的使用。
控制器2004连接的取指存储器(instruction fetch buffer)2009,用于存储控制器2004使用的指令;
统一存储器2006,输入存储器2001,权重存储器2002以及取指存储器2009均为On-Chip存储器。外部存储器私有于该NPU硬件架构。
其中,上述任一处提到的处理器,可以是一个通用中央处理器,微处理器,ASIC,或一个或多个用于控制上述程序执行的集成电路。
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、ROM、RAM、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,训练设备,或者网络设备等)执行本申请各个实施例所述的方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、训练设备或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、训练设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的训练设备、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。

Claims (31)

  1. 一种因果关系确定方法,其特征在于,所述方法包括:
    获取多个变量的第一信息,所述第一信息指示所述多个变量之间的因果关系;
    根据所述第一信息,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息;其中,
    所述第二信息指示所述多个变量中的第一变量和第二变量之间存在第一因果关系;所述第一信息指示所述第一变量和所述第二变量之间不存在所述第一因果关系,所述第一变量和所述第二变量不同。
  2. 根据权利要求1所述的方法,其特征在于,每个所述变量为如下的一种:
    图像数据的一个特征维度、文本数据的一个特征维度、音频数据的一个特征维度、视频数据的一个特征维度。
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:
    根据所述第一信息,通过所述生成流模型中的第二神经网络,得到所述第一信息的第一输入流量;
    根据所述第一信息,通过所述生成流模型中的第三神经网络,得到所述第一信息的第一输出流量;其中,所述第一输入流量与所述第一输出流量的差异度用于得到损失函数;
    根据所述损失函数,更新所述第一神经网络、所述第二神经网络以及所述第三神经网络。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述第一信息,通过所述生成流模型中的第二神经网络,包括:
    根据所述第一信息,获取多个第三信息,其中,所述第一信息指示M个变量对的变量之间存在因果关系,每个所述第三信息指示所述M个变量对中的部分变量对的变量之间存在因果关系;所述M为大于1的正整数;
    根据所述多个第三信息,通过所述生成流模型中的第二神经网络,得到所述第一信息的第一输入流量。
  5. 根据权利要求3或4所述的方法,其特征在于,所述部分变量对为所述M个变量对中的M-1个变量对。
  6. 根据权利要求3至5任一所述的方法,其特征在于,所述方法还包括:
    根据所述第一信息,得到所述第一信息的第二奖励值,所述第二奖励值表示所述第一信息与所述多个变量的数据集的联合分布的吻合度;
    所述第一输入流量与所述第一输出流量的差异度用于构建损失函数,包括:
    所述第一输出流量和所述第二奖励值的加和结果与所述第一输入流量用于构建损失函 数。
  7. 根据权利要求1至5任一所述的方法,其特征在于,所述方法还包括:
    根据所述第二信息,通过所述生成流模型中的第二神经网络,得到所述第二信息的第二输入流量;
    根据所述第二信息,通过所述生成流模型中的第三神经网络,得到所述第二信息的第一奖励值;其中,所述第二输入流量与所述第一奖励值的差异度用于构建损失函数;
    根据所述损失函数,更新所述第一神经网络、所述第二神经网络以及所述第三神经网络。
  8. 根据权利要求1至7任一所述的方法,其特征在于,所述根据所述第二信息,通过所述生成流模型中的第二神经网络,得到所述第二信息的第二输入流量,包括:
    根据所述第一信息,获取多个第四信息,其中,所述第二信息指示N个变量对的变量之间存在因果关系,每个所述第四信息指示所述N个变量对中的部分变量对的变量之间存在因果关系;所述N为大于1的正整数;
    根据所述多个第四信息,通过所述生成流模型中的第二神经网络,得到所述第二信息的第二输入流量。
  9. 根据权利要求1至8任一所述的方法,其特征在于,所述方法还包括:
    基于所述第二信息指示所述多个变量中的任意一个变量和至少一个变量之间存在因果关系;触发执行所述根据所述第二信息,得到所述第二信息的第一奖励值的步骤。
  10. 根据权利要求1至9任一所述的方法,其特征在于,所述第二信息对应于第一图,每个所述变量对应于所述第一图中的节点,所述第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;所述方法还包括:
    基于所述第一图为有向有环图;触发执行所述根据所述第二信息,得到所述第二信息的第一奖励值的步骤。
  11. 根据权利要求1至10任一所述的方法,其特征在于,所述方法还包括:
    根据所述第一信息,获取目标约束;其中,所述目标约束用于约束所述第二信息中不存在因果关系的多个变量对;
    所述根据所述第一信息,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息,包括:
    根据所述第一信息以及所述目标约束,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息。
  12. 根据权利要求11所述的方法,其特征在于,所述第二信息对应于第一图,每个所述变量对应于所述第一图中的节点,所述第二信息中作为因变量的变量对应的节点指向作 为果变量的变量对应的节点;所述目标约束用于约束所述第一图为有向无环图。
  13. 根据权利要求11或12所述的方法,其特征在于,所述多个变量对包括目标变量对,所述目标变量对是由第三变量和第四变量构成的;
    在所述第一信息指示所述第三变量作为所述第四变量的因变量、且所述第四变量作为所述第三变量的果变量的情况下,所述目标约束约束所述第二信息指示所述第三变量不作为所述第四变量的果变量、且所述第四变量不作为所述第三变量的因变量;或者,
    在所述第三变量和所述第四变量相同的情况下,所述目标约束约束所述第二信息指示所述第三变量和所述第四变量之间不存在因果关系。
  14. 根据权利要求1至13任一所述的方法,其特征在于,所述根据所述第一信息,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息,包括:
    根据所述第一信息,通过生成流模型中的第一神经网络,得到多个变量对中每个变量对存在因果关系的概率;
    基于所述多个变量对中由所述第一变量和所述第二变量构成的变量对存在所述第一因果关系的概率最高,得到所述第二信息。
  15. 一种因果关系确定装置,其特征在于,所述装置包括:
    获取模块,用于获取多个变量的第一信息,所述第一信息指示所述多个变量之间的因果关系;
    因果预测模块,用于根据所述第一信息,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息;其中,
    所述第二信息指示所述多个变量中的第一变量和第二变量之间存在第一因果关系;所述第一信息指示所述第一变量和所述第二变量之间不存在所述第一因果关系,所述第一变量和所述第二变量不同。
  16. 根据权利要求15所述的装置,其特征在于,每个所述变量为如下的一种:
    图像数据的一个特征维度、文本数据的一个特征维度、音频数据的一个特征维度、视频数据的一个特征维度。
  17. 根据权利要求15或16所述的装置,其特征在于,所述装置还包括:
    模型更新模块,用于根据所述第一信息,通过所述生成流模型中的第二神经网络,得到所述第一信息的第一输入流量;
    根据所述第一信息,通过所述生成流模型中的第三神经网络,得到所述第一信息的第一输出流量;其中,所述第一输入流量与所述第一输出流量的差异度用于得到损失函数;
    根据所述损失函数,更新所述第一神经网络、所述第二神经网络以及所述第三神经网络。
  18. 根据权利要求17所述的装置,其特征在于,所述模型更新模块,具体用于:
    根据所述第一信息,获取多个第三信息,其中,所述第一信息指示M个变量对的变量之间存在因果关系,每个所述第三信息指示所述M个变量对中的部分变量对的变量之间存在因果关系;所述M为大于1的正整数;
    根据所述多个第三信息,通过所述生成流模型中的第二神经网络,得到所述第一信息的第一输入流量。
  19. 根据权利要求17或18所述的装置,其特征在于,所述部分变量对为所述M个变量对中的M-1个变量对。
  20. 根据权利要求17至19任一所述的装置,其特征在于,所述装置还包括:
    模型更新模块,用于根据所述第一信息,得到所述第一信息的第二奖励值,所述第二奖励值表示所述第一信息与所述多个变量的数据集的联合分布的吻合度;
    所述第一输入流量与所述第一输出流量的差异度用于构建损失函数,包括:
    所述第一输出流量和所述第二奖励值的加和结果与所述第一输入流量用于构建损失函数。
  21. 根据权利要求15至20任一所述的装置,其特征在于,所述装置还包括:
    模型更新模块,用于通过所述生成流模型中的第二神经网络,得到所述第二信息的第二输入流量;
    根据所述第二信息,通过所述生成流模型中的第三神经网络,得到所述第二信息的第一奖励值;其中,所述第二输入流量与所述第一奖励值的差异度用于构建损失函数;
    根据所述损失函数,更新所述第一神经网络、所述第二神经网络以及所述第三神经网络。
  22. 根据权利要求15至21任一所述的装置,其特征在于,所述根据所述第二信息,通过所述生成流模型中的第二神经网络,得到所述第二信息的第二输入流量,包括:
    根据所述第一信息,获取多个第四信息,其中,所述第二信息指示N个变量对的变量之间存在因果关系,每个所述第四信息指示所述N个变量对中的部分变量对的变量之间存在因果关系;所述N为大于1的正整数;
    根据所述多个第四信息,通过所述生成流模型中的第二神经网络,得到所述第二信息的第二输入流量。
  23. 根据权利要求15至22任一所述的装置,其特征在于,所述模型更新模块,还用于:
    基于所述第二信息指示所述多个变量中的任意一个变量和至少一个变量之间存在因果 关系;触发执行所述根据所述第二信息,得到所述第二信息的第一奖励值的步骤。
  24. 根据权利要求15至23任一所述的装置,其特征在于,所述第二信息对应于第一图,每个所述变量对应于所述第一图中的节点,所述第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;所述模型更新模块,还用于:
    基于所述第一图为有向有环图;触发执行所述根据所述第二信息,得到所述第二信息的第一奖励值的步骤。
  25. 根据权利要求15至24任一所述的装置,其特征在于,所述装置还包括:
    约束获取模块,用于根据所述第一信息,获取目标约束;其中,所述目标约束用于约束所述第二信息中不存在因果关系的多个变量对;
    所述根据所述第一信息,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息,包括:
    根据所述第一信息以及所述目标约束,通过生成流模型中的第一神经网络,预测所述多个变量的第二信息。
  26. 根据权利要求25所述的装置,其特征在于,所述第二信息对应于第一图,每个所述变量对应于所述第一图中的节点,所述第二信息中作为因变量的变量对应的节点指向作为果变量的变量对应的节点;所述目标约束用于约束所述第一图为有向无环图。
  27. 根据权利要求25或26所述的装置,其特征在于,所述多个变量对包括目标变量对,所述目标变量对是由第三变量和第四变量构成的;
    在所述第一信息指示所述第三变量作为所述第四变量的因变量、且所述第四变量作为所述第三变量的果变量的情况下,所述目标约束约束所述第二信息指示所述第三变量不作为所述第四变量的果变量、且所述第四变量不作为所述第三变量的因变量;或者,
    在所述第三变量和所述第四变量相同的情况下,所述目标约束约束所述第二信息指示所述第三变量和所述第四变量之间不存在因果关系。
  28. 根据权利要求15至27任一所述的装置,其特征在于,所述因果预测模块,具体用于:
    根据所述第一信息,通过生成流模型中的第一神经网络,得到多个变量对中每个变量对存在因果关系的概率;
    基于所述多个变量对中由所述第一变量和所述第二变量构成的变量对存在所述第一因果关系的概率最高,得到所述第二信息。
  29. 一种因果关系确定装置,其特征在于,所述装置包括存储器和处理器;所述存储器存储有代码,所述处理器被配置为获取所述代码,并执行如权利要求1至14任一所述的方法。
  30. 一种计算机可读存储介质,其特征在于,包括计算机可读指令,当所述计算机可读指令在计算机设备上运行时,使得所述计算机设备执行权利要求1至14任一项所述的方法。
  31. 一种计算机程序产品,其特征在于,包括计算机可读指令,当所述计算机可读指令在计算机设备上运行时,使得所述计算机设备执行如权利要求1至14任一所述的方法。
PCT/CN2023/092961 2022-05-13 2023-05-09 一种因果关系确定方法及相关设备 WO2023217127A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210521841.1 2022-05-13
CN202210521841.1A CN115034379A (zh) 2022-05-13 2022-05-13 一种因果关系确定方法及相关设备

Publications (1)

Publication Number Publication Date
WO2023217127A1 true WO2023217127A1 (zh) 2023-11-16

Family

ID=83121141

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/092961 WO2023217127A1 (zh) 2022-05-13 2023-05-09 一种因果关系确定方法及相关设备

Country Status (2)

Country Link
CN (1) CN115034379A (zh)
WO (1) WO2023217127A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115034379A (zh) * 2022-05-13 2022-09-09 华为技术有限公司 一种因果关系确定方法及相关设备
CN115565104A (zh) * 2022-09-28 2023-01-03 华为技术有限公司 一种动作预测方法及其相关设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111709225A (zh) * 2020-05-09 2020-09-25 北京明略软件系统有限公司 一种事件因果关系判别方法、装置和计算机可读存储介质
CN112307268A (zh) * 2019-07-25 2021-02-02 巴比伦合伙有限公司 生成图模型的系统和方法
CN113159292A (zh) * 2021-04-26 2021-07-23 广东工业大学 一种基于神经网络最小化熵的因果网络发现方法及系统
CN115034379A (zh) * 2022-05-13 2022-09-09 华为技术有限公司 一种因果关系确定方法及相关设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112307268A (zh) * 2019-07-25 2021-02-02 巴比伦合伙有限公司 生成图模型的系统和方法
CN111709225A (zh) * 2020-05-09 2020-09-25 北京明略软件系统有限公司 一种事件因果关系判别方法、装置和计算机可读存储介质
CN113159292A (zh) * 2021-04-26 2021-07-23 广东工业大学 一种基于神经网络最小化熵的因果网络发现方法及系统
CN115034379A (zh) * 2022-05-13 2022-09-09 华为技术有限公司 一种因果关系确定方法及相关设备

Also Published As

Publication number Publication date
CN115034379A (zh) 2022-09-09

Similar Documents

Publication Publication Date Title
WO2021078027A1 (zh) 构建网络结构优化器的方法、装置及计算机可读存储介质
WO2021233199A1 (zh) 搜索推荐模型的训练方法、搜索结果排序的方法及装置
WO2023217127A1 (zh) 一种因果关系确定方法及相关设备
WO2022068623A1 (zh) 一种模型训练方法及相关设备
US20220351019A1 (en) Adaptive Search Method and Apparatus for Neural Network
EP4283520A1 (en) Pruning processing method for convolutional neural network, data processing method and devices
WO2023207487A1 (zh) 一种电路走线确定方法及相关设备
WO2023185925A1 (zh) 一种数据处理方法及相关装置
WO2024002167A1 (zh) 一种操作预测方法及相关装置
WO2024041483A1 (zh) 一种推荐方法及相关装置
CN113162787B (zh) 电信网络中故障定位的方法、节点分类方法以及相关设备
CN115686908A (zh) 一种数据处理方法及相关设备
WO2023246735A1 (zh) 一种项目推荐方法及其相关设备
WO2023197857A1 (zh) 一种模型切分方法及其相关设备
CN115618065A (zh) 一种数据处理方法及相关设备
WO2023197910A1 (zh) 一种用户行为预测方法及其相关设备
WO2023143570A1 (zh) 一种连接关系预测方法及相关设备
CN116204709A (zh) 一种数据处理方法及相关装置
WO2022052647A1 (zh) 一种数据处理方法、神经网络的训练方法以及相关设备
WO2023050143A1 (zh) 一种推荐模型训练方法及装置
CN115545738A (zh) 一种推荐方法及相关装置
CN114494933A (zh) 基于边缘智能的水文监测站图像识别监测系统
WO2024000512A1 (zh) 一种模型训练方法以及相关设备
WO2023051678A1 (zh) 一种推荐方法及相关装置
WO2023236900A1 (zh) 一种项目推荐方法及其相关设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23802896

Country of ref document: EP

Kind code of ref document: A1