A cause-effect relationship determination method and related device

By generating and enriching causal relationships in each iteration using a generative flow model, the problem of low efficiency in causal relationship identification in existing technologies is solved, and more efficient causal relationship identification is achieved.

CN115034379BActive Publication Date: 2025-12-23HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210521841.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-13
Publication Date
2025-12-23
Estimated Expiration
2042-05-13

AI Technical Summary

Technical Problem

Existing reinforcement learning-based causal relationship identification methods require significant computational power and runtime on large-scale datasets, resulting in low efficiency.

Method used

A generative flow model is adopted to identify causal relationships through sequence generation. By generating and enriching causal relationships in each iteration, the sampling of a large number of causal sequences is reduced, thus improving the convergence speed of the model.

Benefits of technology

It reduces the computational cost of causal relationship identification and improves the convergence speed and identification efficiency of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115034379B_ABST
    Figure CN115034379B_ABST
Patent Text Reader

Abstract

The application relates to the field of artificial intelligence, and relates to a cause-effect relationship determination method, which comprises the following steps: acquiring first information indicating a cause-effect relationship between a plurality of variables predicted by a generative flow model, and predicting second information of the plurality of variables by the generative flow model according to the first information; wherein the second information indicates that a first cause-effect relationship exists between a first variable and a second variable in the plurality of variables, and the first information indicates that the first cause-effect relationship does not exist between the first variable and the second variable. The application identifies the cause-effect relationship between variables in a sequence generation mode, and the generative flow model can generate an optimal cause-effect relationship sequence through iterative updating, so that the optimal cause-effect sequence is selected from a plurality of cause-effect sequences without sampling a large number of cause-effect sequences, the calculation power consumption is reduced, and the convergence speed of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence, and in particular to a causality determination method and related equipment. BACKGROUND

[0002] Causality (or causation) is a relationship of action between a first variable (i.e., a “cause”) and a second variable (i.e., an “effect”), in which the latter variable is considered to be a result of the former variable.

[0003] In existing implementations, causality recognition between variables in a data set is implemented based on reinforcement learning, which uses reinforcement learning to search for a causality sequence with the highest score. The technology first encodes the data set, encoding each column as a state, at which time the order of all states is random. Then, the order is determined using a Markov chain to decode and generate an action sequence (a0, a1, …, a T ), which corresponds to a certain causality sequence. A directed acyclic constraint function can constrain the graph corresponding to each causality sequence to be a directed acyclic graph. That is, the existing technology selects a more accurate causality relationship by traversing a large number of causality sequences and scoring each causality sequence. In order to obtain a more accurate causality relationship, a large number of causality sequences need to be traversed. As the search space (i.e., the amount of data and the number of variables) increases, a large amount of computing power and runtime consumption is required. SUMMARY

[0004] The present application provides a causality determination method, which can reduce the computing power consumption and improve the convergence speed of the model.

[0005] In a first aspect, the present application provides a causality determination method, which includes: obtaining first information of a plurality of variables, the first information being an intermediate output of a first neural network in a generative flow model for causality prediction of a plurality of variables of a data set, the first information indicating a causality relationship between the plurality of variables; predicting second information of the plurality of variables by the first neural network in the generative flow model according to the first information; wherein the second information indicates that a first causality relationship exists between a first variable and a second variable in the plurality of variables; the first information indicates that the first causality relationship does not exist between the first variable and the second variable, the first variable and the second variable are different, which means that the second information is another causality relationship predicted based on the first information, and the second information contains more causality relationships than the first information.

[0006] In order to identify the causal relationship between the variables of the data set (including multiple data), the data set (including multiple data) to be identified can be obtained, and the data set (or multiple variables in the data set) is input into a model (for example, the generation flow model (or referred to as the flow-based generation flow model or the generation model) in the embodiment of the present application) for determining the causal relationship. In one iteration, the generation flow model can predict the causal relationship between multiple variables multiple times. Based on the last predicted causal relationship, the next causal relationship can be predicted. The result of the next causal relationship prediction includes the existing causal relationship in the last causal relationship prediction, and also includes the newly predicted causal relationship between one variable pair. The prediction result satisfies the termination condition of one iteration. In one iteration, the first neural network predicts the next causal relationship based on the causal relationship predicted in the last time, for example, the causal relationship predicted in the last time is the first information, and the first neural network can predict the second information between multiple variables based on the first information (for example, input the first information (or the embedding representation corresponding to the first information) into the first neural network). Compared with the first information, the second information includes more variable pairs with existing causal relationship (for example, one more or more than one).

[0007] In a possible implementation, the causal relationship between multiple variables can include the causal relationship between each variable pair in the multiple variables, and the variable pair can include two variables. The causal relationship between the variable pair can be understood as the causal relationship between the variables included in the variable pair.

[0008] In a possible implementation, the causal relationship between variables (taking variable A and variable B as an example) can be understood as variable A causing variable B, that is, variable A as the dependent variable of variable B, and variable B as the fruit variable of variable A. That is, under the condition that other conditions remain unchanged, the change of variable A will cause the change of variable B.

[0009] In a possible implementation, the first information can indicate the direct causal relationship between variables, or the indirect causal relationship between variables. For example, the first information can indicate that variable A causes variable B, and variable B causes variable C. Then, based on the direct causal relationship of “variable A causes variable B, and variable B causes variable C”, the first information can obtain the indirect causal relationship of “variable A causes variable C”, which is equivalent to the first information indicating that variable A causes variable C. The indirect causal relationship between variables can be understood as one variable being the ancestor node (non-directly connected parent node) of another variable.

[0010] It can be seen that, in the generation flow model in the embodiment of the application, instead of directly sampling multiple candidate causal relationships and then selecting a better one from the multiple candidate causal relationships, multiple causal relationships between variables are sequentially generated in each iteration process in a sequence generation manner, each generation is based on the generation result of the last time, and the causal relationship is constantly enriched as the causal relationship generation process proceeds. In this embodiment, the causal relationship between variables is identified in a sequence generation manner, and as the generation flow model is iteratively updated, the generation flow model can have the ability to generate a better causal relationship sequence without the need to sample a large number of causal sequences and select a better one from the multiple causal sequences, thereby reducing the computing power overhead and improving the convergence speed of the model.

[0011] In a possible implementation, the first information indicates that there is a causal relationship between X variable pairs in the multiple variables, and the second information indicates that there is a causal relationship between X+1 variable pairs, where the X+1 variable pairs include the X variable pairs and a variable pair composed of the first variable and the second variable, and X is a positive integer. That is, the second information contains the causal relationship indicated by the first information and the newly predicted causal relationship (the first causal relationship).

[0012] In a possible implementation, the variable can be a feature of data.

[0013] In a possible implementation, the variable can be a feature dimension of image data, for example, can be a certain semantic in an image, for example, an ear area, a glasses area, etc. in an image including a portrait, and can also be a pixel channel in an image, for example, an R channel, a G channel, a B channel, etc. Correspondingly, the data of the variable can be data of the image data in the feature dimension, for example, pixel values of the ear area in the image of the portrait, pixel values of the glasses area, etc., and can also be pixel values of the R channel of the image, pixel values of the G channel, pixel values of the B channel, etc. For another example, the variable can be a certain type of local segment of a chip, and the data of the variable can be an image of a certain type of local segment of the chip.

[0014] In a possible implementation, the variable can be a feature dimension of text data, for example, can be a root cause of a fault. For example, can be a KPI of a communication network, a called node of a computer transaction, and correspondingly, the data of the variable can be a specific value of the KPI of the communication network, information of the called node of the computer transaction, etc.

[0015] In a possible implementation, in a recommendation scenario, the variable can be attribute information of an item, attribute information of a user, operation behavior of a user, etc.

[0016] In a possible implementation, the variable can also be a feature dimension of audio data, a feature dimension of video data, etc.

[0017] In a possible implementation, the second information of the plurality of data is predicted according to the first information by generating the first neural network in the flow model, including: obtaining, according to the first information by generating the first neural network in the flow model, a probability that each variable pair in the plurality of variable pairs has a causal relationship; and obtaining the second information based on the probability that the variable pair composed of the first data and the second data in the plurality of variable pairs has the first causal relationship. That is, the first neural network can select a variable pair from a plurality of variable pairs composed of a plurality of variables (the plurality of variable pairs do not have a causal relationship in the first information), and the selected variable pair can have a causal relationship in the second information.

[0018] In order to ensure that the selected variable pair (for example, 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 acyclic graph, the variable pair with a causal relationship can be selected based on certain constraint rules. Or even if the selected variable pair can make the graph corresponding to the second information a directed graph with a cycle, the second information will not be adopted. Next, the two ways are introduced respectively:

[0019] Method 1: based on target constraint

[0020] In a possible implementation, the target constraint can be obtained according to the first information; wherein the target constraint is used to constrain that the plurality of variable pairs in the second information do not have a causal relationship; each variable is represented as a node in the graph, and the node where the variable as the dependent variable points to the node where the variable as the dependent variable; the target constraint is used to constrain that the graph corresponding to the second information is a directed acyclic graph. Correspondingly, the second information of the plurality of variables can be predicted according to the first information and the target constraint by generating the first neural network in the flow model.

[0021] That is, through the target constraint, the selection of the variable pair by the first neural network can be constrained, so that the causal relationship added in the second information does not cause the graph corresponding to the second information to become a directed graph with a cycle.

[0022] In a possible implementation, the plurality of variable pairs includes 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 in the second information that cannot have a causal relationship indicated in the target constraint.

[0023] In a possible implementation, in a case where the first information indicates that the third variable is a dependent variable of the fourth variable and the fourth variable is a consequent variable of the third variable, the target constraint restricts the second information from indicating that the third variable is not a consequent variable of the fourth variable and the fourth variable is not a dependent variable of the third variable. It should be understood that the first information can indicate that there is a direct causal relationship between the third variable and the fourth variable, and the first information can also indicate that there is an indirect causal relationship between the third variable and the fourth variable.

[0024] That is, the causal relationship in the second information is not looped with the causal relationship in the first information.

[0025] In a possible implementation, it can be determined that the iteration of the current round has ended (that is, the second information is a termination node) based on the second information indicating that there is a causal relationship between any one of the plurality of variables and at least one variable.

[0026] In a possible implementation, whether the termination node is reached can be determined according to 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 termination node is reached.

[0027] In the embodiments of the present application, a loss function can be constructed (minimization of difference) according to the difference between the input flow and the output flow of each intermediate state (for example, the first information) and the difference between the input flow and the reward value of the termination node (for example, the second information), and the generated flow model can be updated according to the loss function, so that the generated flow model can gradually have the ability to find more accurate causal relationships between the plurality of variables.

[0028] Specifically, in a possible implementation, the generated flow model can take the causal relationship between the plurality of variables as the state of the node and sequentially perform state transition, and after reaching the termination node, the input flow and the output flow of the intermediate node and the input flow and the reward value of the termination node can be obtained based on the state of each node, and then a loss function can be constructed based on the input flow and the output flow of the intermediate node and the input flow and the reward value of the termination node, and the generated flow model is updated.

[0029] The updated generated flow model can repeatedly take the causal relationship between the plurality of variables as the state of the node and sequentially perform state transition to construct a loss function, and update the generated flow model multiple times until the generated flow model converges. The converged generated flow model can take the causal relationship between the plurality of variables as the state of the node and sequentially perform state transition, and the causal relationship represented by the state of the termination node can be output as the causal relationship between the plurality of variables.

[0030] In a possible implementation, the first input flow of the first information can be obtained by generating a second neural network in the flow model according to the first information (for example, the first information (for example, an embedding representation of the first information) can be input into the second neural network; or a parent node (for example, an embedding representation of the parent node) related to the first information is input into the second neural network); the first output flow of the first information can be obtained by generating a third neural network in the flow model according to the first information; and a difference between the first input flow and the first output flow is used to obtain a loss function, and the first neural network, the second neural network, and the third neural network are updated according to the loss function.

[0031] In a possible implementation, a plurality of third information (that is, parent nodes of the first information) can be obtained according to the first information, where the first information indicates that there is a causal relationship between M variable pairs in a plurality of variables, each third information indicates that there is a causal relationship between part of group variables in the M variable pairs, M is a positive integer greater than 1, and each third information can be used as a parent node of the first information. The first input flow of the plurality of third information can be obtained by generating a second neural network in the flow model according to the plurality of third information, where an embedding representation of each third information can be obtained according to the plurality of third information, and the embedding representation of each third information is input into the second neural network to obtain an input flow of each third information, and a sum of the input flows of the third information can be the first input flow of the plurality of third information. The first input flow can be understood as a flow input to the first information.

[0032] In a possible implementation, the first output flow of the first information can be obtained by generating a third neural network in the flow model according to the first information, where an embedding representation of the first information can be obtained according to the first information, and the embedding representation of the first information is input into the third neural network to obtain an output flow of the first information.

[0033] In a possible implementation, a difference between the first input flow and the first output flow (for example, the difference is minimized) is used to construct a loss function, and the first neural network, the second neural network, and the third neural network can be updated according to the loss function.

[0034] When the second information is a terminal node (the judgment logic of the terminal node can refer to the description in the above embodiments, which will not be described here), the input flow and the reward value of the second information can be calculated, and a loss function can be constructed based on a difference between the input flow and the reward value.

[0035] In a possible implementation, the second input flow of the second information can be obtained by generating the second neural network in the generative flow model according to the second information; the first reward value of the second information can be obtained by generating the third neural network in the generative flow model according to the second information; a difference between the second input flow and the first reward value is used to construct a loss function; and the first neural network, the second neural network, and the third neural network are updated according to the loss function.

[0036] In a possible implementation, a plurality of fourth information can be obtained according to the first information, where the second information indicates that there is a causal relationship between variables in N variable pairs, each fourth information indicates that there is a causal relationship between variables in part of the N variable pairs, N is a positive integer greater than 1, and the second input flow of the plurality of fourth information is obtained by generating the second neural network in the generative flow model according to the plurality of fourth information. The calculation of the input flow of the second information can refer to the calculation of the input flow of the first information described above, which will not be repeated here.

[0037] In a possible implementation, the first reward value of the second information can be obtained according to the second information, where the first reward value represents a degree of fit of the second information to a joint distribution of the data set of the plurality of variables; a difference between the second input flow and the first reward value is used to construct a loss function; and the first neural network, the second neural network, and the third neural network are updated according to the loss function.

[0038] In a possible implementation, when the first neural network performs prediction of the second information based on the first information, the target constraint that can ensure that the second information is a directed acyclic graph can not be used, and therefore, the second information can become a directed cyclic graph or other graphs that do not meet the requirements.

[0039] In a possible implementation, when the first neural network performs prediction of the second information based on the first information, a data pair with a causal relationship can be predicted from a variable pair in the first information that does not have a causal relationship to obtain the second information. If the second information is a directed acyclic graph and the termination node condition in the target constraint described above is not met, the first neural network can continue to perform causal relationship prediction of the plurality of variables based on the second information.

[0040] If the second information is a directed cyclic graph or other graphs that do not meet the requirements, the second information can be considered as a termination node to end the current iteration, and the generative flow model is updated by using the constructed loss.

[0041] For the intermediate node, taking the first information as an example, in a possible implementation, a plurality of third information can be acquired according to the first information, wherein the first information indicates that there is a causal relationship between M pairs of variables in a plurality of variables, each third information indicates that there is a causal relationship between part of group variables in the M pairs of variables; M is a positive integer greater than 1; according to the plurality of third information, a first input flow of the plurality of third information is obtained through a second neural network in the generative flow model, a second reward value of the first information is obtained according to the first information, and the second reward value represents the degree of fit of the joint distribution of the first information and the data set of the plurality of variables; according to the first information, a first output flow of the first information is obtained through a third neural network in the generative flow model; 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 first neural network, the second neural network and the third neural network can be updated according to the loss function.

[0042] For the terminal node, taking the second information as an example, in a possible implementation, a plurality of fourth information can be acquired according to the second information, wherein the third information indicates that there is a causal relationship between N pairs of variables in a plurality of variables, each fourth information indicates that there is a causal relationship between part of group variables in the N pairs of variables; N is a positive integer greater than 1; according to the plurality of fourth information, a second input flow of the plurality of fourth information is obtained through a second neural network in the generative flow model; a first reward value of the second information is obtained according to the second information, and the first reward value represents the degree of fit of the joint distribution of the second information and the data set of the plurality of variables; wherein the difference between the second input flow and the first reward value is used to construct a loss function; the first neural network, the second neural network and the third neural network are updated according to the loss function.

[0043] In a second aspect, the present application provides a causal relationship determination method, the method comprising:

[0044] Obtaining first information of a plurality of variables, the first information indicating a causal relationship between the plurality of variables, the variables including an operation type of a user and at least one target variable, the target variable being at least one of:

[0045] Attribute information of an article and attribute information of a user;

[0046] According to the first information, a second information of the plurality of variables is predicted through a first neural network in the generative flow model; wherein,

[0047] The second information indicates that there is a first causal relationship between a first variable and a second variable in 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.

[0048] In a possible implementation, the attribute information of the user includes at least one of the following: gender, age, occupation, income, hobby, and education level.

[0049] In a possible implementation, the attribute information of the item includes at least one of the following: item name, developer, installation package size, category, and degree of praise.

[0050] The attribute information of the user can be an attribute related to a user preference feature, and at least one of the following: gender, age, occupation, income, hobby, and education level. The gender can be male or female, the age can be a number between 0 and 100, the occupation can be a teacher, a programmer, a chef, etc., the hobby can be basketball, tennis, running, etc., and the education level can be primary school, junior high school, high school, college, etc. The application does not limit the specific type of attribute information of the user.

[0051] The item can be a physical item or a virtual item, for example, an APP, an audio / video, a webpage, news information, or the like. The attribute information of the item can be at least one of the following: item name, developer, installation package size, category, and degree of praise. For example, when the item is an application, the category of the item can be a chat type, a running type game, an office type, or the like, and the degree of praise can be a score or a comment for the item. The application does not limit the specific type of attribute information of the item.

[0052] The operation type can be a behavior operation type of the user for the item. On a network platform and an application, the user often has various interaction forms (that is, various operation types) with the item, such as browsing, clicking, adding to a shopping cart, and purchasing on an e-commerce platform.

[0053] It should be understood that the causal relationship between the plurality of variables finally obtained by generating the flow model can include a causal relationship between at least one target variable and the operation type of the user.

[0054] Other descriptions about the second aspect can refer to the causal relationship determination method introduced in the first aspect, which will not be described here.

[0055] In a third aspect, the application provides a causal relationship determination method, which includes:

[0056] obtaining first information of a plurality of variables, the first information indicating a causal relationship between the plurality of variables, and the variables including attribute information of a target object; and

[0057] The target object is a chip, and the attribute information is a local segment or fault information of the chip; or

[0058] The target object is a node of a communication network, and the target variable is a key performance indicator (KPI), operation data, or alarm information of a network element.

[0059] According to the first information, the second information of the plurality of variables is predicted by generating a first neural network in the flow model; wherein,

[0060] The second information indicates that there is a first causal relationship between a first variable and a second variable in 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.

[0061] The local segment of the chip can be a local area of the chip surface, and the plurality of local segments can be a plurality of local areas of the chip surface. The area size and the external contour shape of any two local segments in the plurality of local segments are the same. The area size between the local segments can be understood as the same area of the region where the local segments are located. The external contour shape between the local segments can be understood as the same external contour shape of the region where the local segments are located, for example, both are squares or rectangles with consistent length-width ratios, and the like. In one possible implementation, the area of each local segment in the plurality of local segments is within a preset range. The area of each local segment cannot be too large or too small. The area size of the local segment can be related to the size of the chip. The larger the size of the chip is, the larger the area of the local segment is. For example, the area of the local segment and the area of the chip can maintain a certain proportion. The area size of the local segment can also be related to the interval length between the basic units on the chip. For example, the side length of the local segment can be set as a preset multiple, for example, 3 times, 4 times, 5 times, or the like, of the interval length between the basic units (for example, the copper polygon area on the chip). In the embodiments of the present application, the local segment can include arranged devices and / or connection lines between the devices. In the embodiments of the present application, the local segment can be image information of each local segment or other information capable of expressing the arrangement of devices or the structure of connection lines on the local segment. Based on the information, the structural features of the local segment can be uniquely determined.

[0062] The fault information of the chip can include the number of occurrences of each local segment in the diagnosis report, or the probability of causing the chip fault of the faulty chip, and the like.

[0063] The KPI can be used to measure the running state of the network element in the communication network. In general, the abnormality detection device collects observation data of each KPI at different time points.

[0064] Other descriptions about the third aspect can refer to the causal relationship determination method introduced in the first aspect, which will not be described herein.

[0065] In a fourth aspect, the present application provides a cause-effect relationship determination apparatus, the apparatus comprising:

[0066] an acquisition module configured to acquire first information of a plurality of variables, the first information indicating a cause-effect relationship between the plurality of variables;

[0067] a cause-effect prediction module configured to predict second information of the plurality of variables by generating a first neural network in a flow model according to the first information; wherein

[0068] the second information indicates that there is a first cause-effect relationship between a first variable and a second variable in the plurality of variables; the first information indicates that there is no first cause-effect relationship between the first variable and the second variable, and the first variable and the second variable are different.

[0069] In a possible implementation, the first information indicates that there is a cause-effect relationship between X variable pairs in the plurality of variables, and the second information indicates that there is a cause-effect relationship between X+1 variable pairs, wherein the X+1 variable pairs include the X variable pairs and a variable pair composed of the first variable and the second variable.

[0070] In a possible implementation, each variable is one of the following:

[0071] a feature dimension of image data, a feature dimension of text data, a feature dimension of audio data, and a feature dimension of video data.

[0072] In a possible implementation, the apparatus further comprises:

[0073] a model updating module configured to obtain a first input flow of the first information by generating a second neural network in the flow model according to the first information;

[0074] obtain a first output flow of the first information by generating a third neural network in the flow model according to the first information; wherein a difference degree between the first input flow and the first output flow is used to obtain a loss function;

[0075] update the first neural network, the second neural network, and the third neural network according to the loss function.

[0076] In a possible implementation, the model updating module is specifically configured to:

[0077] acquire a plurality of third information according to the first information, wherein the first information indicates that there is a cause-effect relationship between variables of M variable pairs, each third information indicates that there is a cause-effect relationship between variables of part of the M variable pairs, and M is a positive integer greater than 1;

[0078] obtain a first input flow of the first information by generating a second neural network in the flow model according to the plurality of third information.

[0079] In a possible implementation, the part of the variable pairs is M-1 of the M variable pairs.

[0080] In a possible implementation, the apparatus further includes:

[0081] The model updating module is configured to obtain a second reward value of the first information according to the first information, the second reward value indicating a degree of fitting of the first information to a joint distribution of the data set of the plurality of variables.

[0082] The difference between the first input flow and the first output flow is used to construct the loss function, including:

[0083] The sum of the first output flow and the second reward value is used to construct the loss function.

[0084] In a possible implementation, the apparatus further includes:

[0085] The model updating module is configured to obtain a second input flow of the second information by generating a second neural network in the generative flow model.

[0086] The model updating module is configured to obtain a first reward value of the second information by generating a third neural network in the generative flow model according to the second information, and a difference between the second input flow and the first reward value is used to construct the loss function.

[0087] The model updating module is configured to update the first neural network, the second neural network, and the third neural network according to the loss function.

[0088] In a possible implementation, the model updating module is configured to obtain the second input flow of the second information by generating the second neural network in the generative flow model according to the second information, including:

[0089] The model updating module is configured to obtain a plurality of fourth information according to the first information, where the second information indicates that there is a causal relationship between variables of the N variable pairs, each fourth information indicates that there is a causal relationship between variables of a part of the N variable pairs, and N is a positive integer greater than 1.

[0090] The model updating module is configured to obtain the second input flow of the second information by generating the second neural network in the generative flow model according to the plurality of fourth information.

[0091] In a possible implementation, the model updating module is further configured to:

[0092] Based on the second information indicating that there is a causal relationship between any one variable and at least one variable of the plurality of variables, the model updating module is triggered to execute the step of obtaining the first reward value of the second information according to the second information.

[0093] In a possible implementation, the second information corresponds to a first graph, each variable corresponds to a node in the first graph, and a node corresponding to a variable as a cause variable in the second information points to a node corresponding to a variable as an effect variable; the model updating module is further configured to:

[0094] the first graph is a directed cyclic graph; and the step of obtaining the first reward value of the second information according to the second information is triggered to be performed.

[0095] In a possible implementation, the apparatus further includes:

[0096] the constraint obtaining module is configured to obtain a target constraint according to the first information; and the target constraint is used to constrain a plurality of variable pairs in the second information that do not have a causal relationship;

[0097] the causal prediction module is configured to predict the second information of the plurality of variables according to the first information and by using the first neural network in the generative flow model, including:

[0098] the causal prediction module is configured to predict the second information of the plurality of variables according to the first information and the target constraint and by using the first neural network in the generative flow model.

[0099] In a possible implementation, the second information corresponds to a first graph, each variable corresponds to a node in the first graph, and a node corresponding to a variable as a cause variable in the second information points to a node corresponding to a variable as an effect variable; and the target constraint is used to constrain the first graph to be a directed acyclic graph.

[0100] In a possible implementation, the plurality of variable pairs includes a target variable pair, and the target variable pair is composed of a third variable and a fourth variable.

[0101] in a case where the first information indicates that the third variable is a cause variable of the fourth variable and the fourth variable is an effect variable of the third variable, the target constraint is configured to constrain the second information to indicate that the third variable is not an effect variable of the fourth variable and the fourth variable is not a cause variable of the third variable; or

[0102] in a case where the third variable and the fourth variable are the same, the target constraint is configured to constrain the second information to indicate that there is no causal relationship between the third variable and the fourth variable.

[0103] In a possible implementation, the causal prediction module is specifically configured to:

[0104] obtain, according to the first information and by using the first neural network in the generative flow model, a probability that each variable pair in the plurality of variable pairs has a causal relationship;

[0105] obtain the second information based on the probability that a variable pair composed of the first variable and the second variable in the plurality of variable pairs has the first causal relationship.

[0106] In a fifth aspect, the present application provides a cause-effect relationship determination apparatus, the apparatus comprising:

[0107] an acquisition module configured to acquire first information of a plurality of variables, the first information indicating a cause-effect relationship between the plurality of variables, the variables comprising an operation type of a user and at least one target variable, the target variable being at least one of:

[0108] attribute information of an item and attribute information of the user;

[0109] a cause-effect prediction module configured to predict second information of the plurality of variables by generating a first neural network in a flow model according to the first information; wherein

[0110] the second information indicates that there is a first cause-effect relationship between a first variable and a second variable in the plurality of variables; the first information indicates that there is no first cause-effect relationship between the first variable and the second variable, and the first variable and the second variable are different.

[0111] In a possible implementation, the attribute information of the user comprises at least one of: gender, age, occupation, income, hobby, and education level.

[0112] In a possible implementation, the attribute information of the item comprises at least one of: item name, developer, installation package size, category, and praise degree.

[0113] In a possible implementation, the first information indicates that there is a cause-effect relationship between X variable pairs in the plurality of variables, and the second information indicates that there is a cause-effect relationship between X+1 variable pairs, wherein the X+1 variable pairs comprise the X variable pairs and a variable pair composed of the first variable and the second variable.

[0114] In a possible implementation, each variable is one of:

[0115] a feature dimension of image data, a feature dimension of text data, a feature dimension of audio data, and a feature dimension of video data.

[0116] In a possible implementation, the apparatus further comprises:

[0117] a model update module configured to obtain a first input flow of the first information by generating a second neural network in the flow model according to the first information;

[0118] obtain a first output flow of the first information by generating a third neural network in the flow model according to the first information; wherein a difference degree between the first input flow and the first output flow is used to obtain a loss function;

[0119] update the first neural network, the second neural network, and the third neural network according to the loss function.

[0120] In a possible implementation, the model updating module is specifically configured to:

[0121] According to the first information, a plurality of third information is obtained, where the first information indicates that there is a causal relationship between variables in M variable pairs, each third information indicates that there is a causal relationship between variables in part of the M variable pairs, and M is a positive integer greater than 1.

[0122] According to the plurality of third information, a second neural network in the flow model is generated to obtain a first input flow of the first information.

[0123] In a possible implementation, the part of the variable pairs is M-1 variable pairs in the M variable pairs.

[0124] In a possible implementation, the apparatus further includes:

[0125] The model updating module is configured to obtain, according to the first information, a second reward value of the first information, where the second reward value represents a goodness of fit of the first information to a joint distribution of the data set of the plurality of variables.

[0126] The difference between the first input flow and the first output flow is used to construct a loss function, including:

[0127] The sum of the first output flow and the second reward value is used to construct the loss function together with the first input flow.

[0128] In a possible implementation, the apparatus further includes:

[0129] The model updating module is configured to obtain, by generating a second neural network in the flow model, a second input flow of the second information.

[0130] According to the second information, a first reward value of the second information is obtained by generating a third neural network in the flow model, where the difference between the second input flow and the first reward value is used to construct a loss function.

[0131] According to the loss function, the first neural network, the second neural network, and the third neural network are updated.

[0132] In a possible implementation, the second input flow of the second information is obtained by generating the second neural network in the flow model according to the second information, including:

[0133] According to the first information, a plurality of fourth information is obtained, where the second information indicates that there is a causal relationship between variables in N variable pairs, each fourth information indicates that there is a causal relationship between variables in part of the N variable pairs, and N is a positive integer greater than 1.

[0134] According to the plurality of fourth information, a second input flow of the second information is obtained by generating a second neural network in the flow model.

[0135] In a possible implementation, the model updating module is further configured to:

[0136] The second information indicates that there is a causal relationship between any one of the plurality of variables and at least one variable; and the step of obtaining the first reward value of the second information according to the second information is triggered.

[0137] In a possible implementation, the second information corresponds to a first graph, each variable corresponds to a node in the first graph, and a node corresponding to a variable as a dependent variable in the second information points to a node corresponding to a variable as a consequent variable; and the model updating module is further configured to:

[0138] The first graph is a directed cyclic graph; and the step of obtaining the first reward value of the second information according to the second information is triggered.

[0139] In a possible implementation, the apparatus further includes:

[0140] The constraint obtaining module is configured to obtain a target constraint according to the first information; and the target constraint is used to constrain a plurality of variable pairs in the second information that do not have a causal relationship.

[0141] According to the first information, a second information of the plurality of variables is predicted by generating a first neural network in the flow model, including:

[0142] According to the first information and the target constraint, the second information of the plurality of variables is predicted by generating the first neural network in the flow model.

[0143] In a possible implementation, the second information corresponds to a first graph, each variable corresponds to a node in the first graph, and a node corresponding to a variable as a dependent variable in the second information points to a node corresponding to a variable as a consequent variable; and the target constraint is used to constrain the first graph to be a directed acyclic graph.

[0144] In a possible implementation, the plurality of variable pairs includes a target variable pair, and the target variable pair is composed of a third variable and a fourth variable.

[0145] In a case where the first information indicates that the third variable is a dependent variable of the fourth variable and the fourth variable is a consequent variable of the third variable, the target constraint is used to constrain the second information to indicate that the third variable is not a consequent variable of the fourth variable and the fourth variable is not a dependent variable of the third variable; or

[0146] In a case where the third variable and the fourth variable are the same, the target constraint is used to constrain the second information to indicate that there is no causal relationship between the third variable and the fourth variable.

[0147] In a possible implementation, the cause-effect prediction module is specifically configured to:

[0148] According to the first information, the probability that each variable pair in the plurality of variable pairs has the cause-effect relationship is obtained by generating the first neural network in the flow model.

[0149] Based on the fact that the variable pair composed of the first variable and the second variable in the plurality of variable pairs has the highest probability of the first cause-effect relationship, the second information is obtained.

[0150] In a sixth aspect, the present application provides a cause-effect relationship determination device, the device comprising:

[0151] The acquisition module is configured to acquire first information of a plurality of variables, the first information indicating a cause-effect relationship between the plurality of variables, the variables including attribute information of a target object; wherein,

[0152] The target object is a chip, and the attribute information is a local segment or fault information of the chip; or,

[0153] The target object is a node of a communication network, and the target variable is a key performance indicator (KPI) of a network element, operation data, or alarm information.

[0154] The cause-effect prediction module is configured to predict second information of the plurality of variables according to the first information by generating a first neural network in a flow model; wherein,

[0155] The second information indicates that there is a first cause-effect relationship between a first variable and a second variable in the plurality of variables; the first information indicates that there is no first cause-effect relationship between the first variable and the second variable, and the first variable and the second variable are different.

[0156] In a possible implementation, the first information indicates that there is a cause-effect relationship between X variable pairs in the plurality of variables, and the second information indicates that there is a cause-effect relationship between X+1 variable pairs, wherein the X+1 variable pairs include the X variable pairs and a variable pair composed of the first variable and the second variable.

[0157] In a possible implementation, each variable is one of the following:

[0158] A feature dimension of image data, a feature dimension of text data, a feature dimension of audio data, and a feature dimension of video data.

[0159] In a possible implementation, the device further comprises:

[0160] The model update module is configured to obtain a first input flow of the first information by generating a second neural network in the flow model according to the first information.

[0161] According to the first information, a first output flow of the first information is obtained by generating a third neural network in the flow model; wherein a difference degree between the first input flow and the first output flow is used to obtain a loss function;

[0162] According to the loss function, the first neural network, the second neural network and the third neural network are updated.

[0163] In a possible implementation, the model updating module is specifically configured to:

[0164] According to the first information, a plurality of third information is obtained, wherein the first information indicates that there is a causal relationship between variables of M variable pairs, each third information indicates that there is a causal relationship between variables of part of the M variable pairs, and M is a positive integer greater than 1;

[0165] According to the plurality of third information, a first input flow of the first information is obtained by generating a second neural network in the flow model.

[0166] In a possible implementation, the part of the variable pairs is M-1 variable pairs in the M variable pairs.

[0167] In a possible implementation, the apparatus further includes:

[0168] The model updating module is configured to obtain a second reward value of the first information according to the first information, and the second reward value represents a goodness of fit of a joint distribution of the first information and a data set of the plurality of variables;

[0169] The difference degree between the first input flow and the first output flow is used to construct the loss function, including:

[0170] The sum of the first output flow and the second reward value and the first input flow are used to construct the loss function.

[0171] In a possible implementation, the apparatus further includes:

[0172] The model updating module is configured to obtain a second input flow of the second information by generating a second neural network in the flow model.

[0173] According to the second information, a first reward value of the second information is obtained by generating a third neural network in the flow model; wherein a difference degree between the second input flow and the first reward value is used to construct a loss function;

[0174] According to the loss function, the first neural network, the second neural network and the third neural network are updated.

[0175] In a possible implementation, the second input flow of the second information is obtained by generating the second neural network in the flow model according to the second information, including:

[0176] According to the first information, a plurality of fourth information is obtained, wherein the second information indicates that there is a causal relationship between variables of N variable pairs, each fourth information indicates that there is a causal relationship between variables of part of the N variable pairs; N is a positive integer greater than 1;

[0177] According to the plurality of fourth information, a second input flow of the second information is obtained by generating a second neural network in the flow model.

[0178] In a possible implementation, the model updating module is further configured to:

[0179] Based on the second information indicating that there is a causal relationship between any one variable and at least one variable in the plurality of variables, the step of obtaining the first reward value of the second information according to the second information is triggered to be performed.

[0180] In a possible implementation, the second information corresponds to a first graph, each variable corresponds to a node in the first graph, and a node corresponding to a variable as a cause variable in the second information points to a node corresponding to a variable as an effect variable; the model updating module is further configured to:

[0181] Based on the first graph being a directed cyclic graph, the step of obtaining the first reward value of the second information according to the second information is triggered to be performed.

[0182] In a possible implementation, the apparatus further includes:

[0183] The constraint obtaining module is configured to obtain a target constraint according to the first information; wherein the target constraint is used to constrain a plurality of variable pairs in the second information in which there is no causal relationship;

[0184] According to the first information, a second information of the plurality of variables is predicted by generating a first neural network in the flow model, including:

[0185] According to the first information and the target constraint, a second information of the plurality of variables is predicted by generating a first neural network in the flow model.

[0186] In a possible implementation, the second information corresponds to a first graph, each variable corresponds to a node in the first graph, and a node corresponding to a variable as a cause variable in the second information points to a node corresponding to a variable as an effect variable; the target constraint is used to constrain the first graph to be a directed acyclic graph.

[0187] In a possible implementation, the plurality of variable pairs includes a target variable pair, and the target variable pair is composed of a third variable and a fourth variable;

[0188] In a case where the first information indicates that the third variable is a dependent variable of the fourth variable and the fourth variable is an independent variable of the third variable, the target constraint restricts the second information to indicate that the third variable is not an independent variable of the fourth variable and the fourth variable is not a dependent variable of the third variable; or,

[0189] In a case where the third variable and the fourth variable are the same, the target constraint restricts the second information to indicate that there is no causal relationship between the third variable and the fourth variable.

[0190] In a possible implementation, the causal prediction module is specifically configured to:

[0191] According to the first information, the probability that each variable pair in the plurality of variable pairs has a causal relationship is obtained by generating the first neural network in the flow model.

[0192] Based on the fact that the variable pair composed of the first variable and the second variable in the plurality of variable pairs has the highest probability of the first causal relationship, the second information is obtained.

[0193] In a seventh aspect, an embodiment of the present application provides a causal relationship determination apparatus, which can include a memory, a processor, and a bus system, wherein the memory is configured to store a program, and the processor is configured to execute the program in the memory to perform the method of the first aspect and any optional method thereof, or the method of the second aspect and any optional method thereof, or the method of the third aspect and any optional method thereof.

[0194] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is run on a computer, the computer is caused to execute the method of the first aspect and any optional method thereof, or the method of the second aspect and any optional method thereof, or the method of the third aspect and any optional method thereof.

[0195] In a ninth aspect, an embodiment of the present application provides a computer program product including instructions, and when the computer program product is run on a computer, the computer is caused to execute the method of the first aspect and any optional method thereof, or the method of the second aspect and any optional method thereof, or the method of the third aspect and any optional method thereof.

[0196] In a tenth aspect, the present application provides a chip system, which includes a processor configured to support the causal relationship determination apparatus to implement part or all of the functions involved in the above aspects, for example, to send or process data involved in the above methods; or, information. In a possible design, the chip system further includes a memory configured to save necessary program instructions and data for the execution device or the training device. The chip system can be composed of a chip, or can include a chip and other discrete devices. BRIEF DESCRIPTION OF DRAWINGS

[0197] Figure 1 is a schematic diagram of an application architecture;

[0198] Figure 2 is a schematic diagram of an application architecture;

[0199] Figure 3 is a schematic diagram of an application architecture;

[0200] Figure 4 is a schematic diagram of an application architecture;

[0201] Figure 5 is a schematic diagram of an application architecture;

[0202] Figure 6 is a schematic diagram of a generation process for generating a flow model;

[0203] Figure 7 is a schematic diagram of an embodiment of a cause-effect relationship determination method provided in an embodiment of the present application;

[0204] Figure 8 is a schematic diagram of an embodiment of cause-effect relationship sequence generation provided in an embodiment of the present application;

[0205] Figure 9 is a schematic diagram of determination of a target constraint in an embodiment of the present application;

[0206] Figure 10 is a schematic diagram of a closure matrix in an embodiment of the present application;

[0207] Figure 11 is a schematic diagram of transposition of a closure matrix in an embodiment of the present application;

[0208] Figure 12 is a schematic diagram of determination of a target constraint in an embodiment of the present application;

[0209] Figure 13 is a schematic diagram of solution of a parent node in an embodiment of the present application;

[0210] Figure 14 is a schematic diagram of a determination process of a cause-effect relationship in an embodiment of the present application;

[0211] Figure 15 is a schematic diagram of an embodiment of cause-effect relationship sequence generation provided in an embodiment of the present application;

[0212] Figure 16 is a schematic diagram of a determination process of a cause-effect relationship in an embodiment of the present application;

[0213] Figure 17 is a schematic diagram of an embodiment of a cause-effect relationship determination apparatus provided in an embodiment of the present application;

[0214] Figure 18A structural schematic diagram of an execution device provided by an embodiment of the present application is shown in the figure;

[0215] Figure 19 A structural schematic diagram of a server provided by an embodiment of the present application is shown in the figure;

[0216] Figure 20 A structural schematic diagram of a chip provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0217] The embodiments of the present application will be described below in conjunction with the accompanying drawings. The terms used in the embodiments section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0218] The embodiments of the present application will be described below in conjunction with the accompanying drawings. The skilled person can know that, with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0219] The terms "first", "second", and the like in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, which is only a distinguishing way used in the description of the embodiments of the present application to describe the objects with the same attribute. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, so that the processes, methods, systems, products or equipment containing a series of units do not have to be limited to those units, but can include other units not clearly listed or inherent to these processes, methods, products or equipment.

[0220] The terms "substantially", "about" and the like used herein are used as approximate terms, not as degree terms, and are intended to take into account the inherent deviations of measured or calculated values known by those skilled in the art. In addition, the use of "may" in the description of the embodiments of the present application means "one or more embodiments". The terms "use", "using", and "used" used herein can be considered as synonymous with the terms "utilize", "utilizing", and "utilized", respectively. In addition, the term "exemplary" is intended to refer to an example or an illustration.

[0221] First, the application scenario of the present application is introduced, which can be but is not limited to applied in image processing, audio processing, text processing or video processing and other scenarios requiring causal relationship identification, which will be introduced in turn:

[0222] In a possible implementation, the fault identification in various scenarios can be performed through the causal relationship identification, which can be used for performing the fault identification of a communication network, the systematic defect identification of a chip, the fault node identification of a computer transaction, the identification of a mechanical fault, and the like, which are described in the following respectively.

[0223] In a possible implementation, the fault identification of a communication network can be performed through the causal relationship identification.

[0224] A key performance indicator (KPI) of a communication network can be used to measure the running state of a network element in the communication network. Generally, an abnormality detection device collects observation data of each KPI at different time points. If the observation data of the KPI is abnormal, it indicates that the running state of the network element in the communication network is abnormal. A network operation and maintenance engineer needs to find the cause according to the KPI that is abnormal, so as to troubleshoot the fault.

[0225] In a possible implementation, the causal relationship between certain abnormal KPIs can be determined based on the causal relationship determination method, for example, the root cause of the abnormality of a first KPI is caused by the abnormality of a second KPI, so that the network operation and maintenance engineer can determine the network element with the fault according to the second KPI, to troubleshoot the fault.

[0226] In a possible implementation, the KPI is equivalent to the variable in the embodiment of the present application, the observation data of the KPI at different time points is equivalent to the data of the variable in the embodiment of the present application, and the causal relationship between the KPIs can be obtained through the causal relationship determination method in the embodiment of the present application.

[0227] In a possible implementation, the systematic defect identification of a chip can be performed through the causal relationship identification.

[0228] With the development of the functions of electronic products and the expansion of application fields, as the core component of electronic products, a chip has become an indispensable part of people's life. Chip production mainly includes layout design and manufacturing. The layout design usually includes multi-layer circuit function design, and the manufacturing includes production, packaging, testing and the like. When the same chip design adopts different manufacturing processes, some circuit structures in the chip design that are normal under the original process may have defects, resulting in a lower-than-expected chip yield. Such circuit structures with design defects due to process changes are referred to as systematic defects.

[0229] The presence of systemic defects increases the likelihood of chip circuit failure. Chips with malfunctioning circuits cannot function properly, leading to a decrease in chip yield. A decline in yield increases production costs and may even cause products to miss their sales window. Therefore, identifying the root causes of systemic defects is crucial for improving product yield. To identify systemic defects, the chip's design structure can be analyzed to determine the types of local segments on the chip that may lead to potential chip failure.

[0230] In one possible implementation, the type of local segment that may cause chip failure can be determined by using causal relationship analysis based on images of various segments on the chip.

[0231] In one possible implementation, fault nodes in computer transactions can be identified through causal relationship identification.

[0232] With the development of computer technology, the number of transactions that computer devices can handle has increased rapidly. Furthermore, computer devices can execute the same transaction multiple times a day to meet the needs of a large number of users. To improve the performance of transaction execution, it is necessary to analyze transaction issues in order to better execute transactions.

[0233] Currently, the transaction analysis process typically involves: during transaction execution, real-time collection of execution records; extraction of information about each node called by the transaction from these records, including the node's name, call duration, status code, and call relationships between different nodes; and then displaying this information on the interface. Based on this information, causal identification methods can be used to determine if any issues exist with these nodes, ultimately identifying the node causing the transaction problem.

[0234] In one possible implementation, mechanical faults can be identified through causal relationship identification.

[0235] For machining systems, if the causal relationship between each attribute and whether the product is qualified has been determined, the attributes that have the greatest impact on unqualified products can be adjusted first based on the causal relationship found.

[0236] In one possible implementation, for a power transmission system, if the intermediate voltage at each transmission device, the operating state of the transmission system, and the causal relationship between current and power loss have been determined, then the variables with the greatest impact on power loss can be prioritized for adjustment based on the found causal relationships. This approach can improve the performance of the power transmission system.

[0237] In one possible implementation, causal identification related to user behavior in the recommendation field can be performed using causal relationship determination methods.

[0238] In a possible implementation, an operation log of a user can be acquired, which can include operation behaviors of the user on an item, attribute information of the item, and attribute information of the user, and a causal relationship between each attribute information and the operation behavior of the user can be determined through causal relationship identification.

[0239] From the aspect of product implementation, the embodiments of the present application can be applied to a causal relationship identification application program (or other types of computer program products), a cloud service related to causal relationship identification provided by a cloud server, and the like.

[0240] Next, the causal relationship identification application program in the embodiments of the present application is introduced from the functional architecture and the product architecture implementing the function respectively.

[0241] Reference Figure 1 , Figure 1 The functional architecture of the causal relationship identification application program in the embodiments of the present application is as follows:

[0242] In a possible implementation, the embodiments of the present application include a system (for example, a causal relationship identification application program) capable of automatically identifying the causal relationship between variables of input data. As shown in FIG. 1, the causal relationship identification application program 102 can receive input data 101 (optionally, the variables of the data can also be covered, or the variables of the data can be obtained automatically) and output the causal relationship identification result 103 between the variables. The causal relationship identification application program 102 can be executed on at least one computer system, for example, and includes computer code that, when executed by one or more computers, causes the computers to perform the causal relationship determination method described herein. Figure 1

[0243] In a possible implementation, the causal relationship identification application program can run in a terminal device on the terminal side or a server on the cloud side.

[0244] For example, the terminal device can be installed with the causal relationship identification application program, and the actions of data input, data processing (for example, the causal relationship determination method in the embodiments of the present application), and data output can be performed by the terminal device.

[0245] ​For example, the terminal device can be installed with a client of the causality recognition type application program, the actions of data input and data output can be performed by the terminal device, and the action of data processing (for example, the causality determination method in the embodiments of the present application) can be performed by the server on the cloud side, that is, the terminal device can transmit the data required for data processing (for example, the causality determination method in the embodiments of the present application) to the server on the cloud side, and the server on the cloud side can return the data processing result to the terminal device on the terminal side after performing the data processing action, and the terminal device can output based on the processing result.

[0246] Next, the entity architecture for running the causality recognition type application program in the embodiments of the present application is introduced.

[0247] Referring to Figure 2 , Figure 2 The entity architecture for running the causality recognition type application program in the embodiments of the present application is shown:

[0248] Referring to Figure 2 , Figure 2 A system architecture diagram is shown. The system can include a terminal 100 and a server 200. The server 200 can include one or more servers (for example, one server is described in the embodiments of the present application as an example), and the server 200 can provide a causality recognition program for one or more terminals. Figure 2

[0249] The terminal 100 can be installed with a causality recognition type application program, or open a webpage related to causality recognition. The above application program and webpage can provide a causality recognition interface, the terminal 100 can receive the relevant data input by the user on the causality recognition interface, and send the above data to the server 200, the server 200 can obtain the processing result (the causality recognition result of the data) based on the received data, and return the processing result to the terminal 100.

[0250] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the data processing result based on the received data by itself, without the cooperation of the server, and the embodiments of the present application are not limited.

[0251] Next, the product form of the terminal 100 in the embodiments of the present application is described. Figure 2

[0252] ​​The terminal 100 in the embodiments 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, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), and the like, and the embodiments of the present application do not make any limitation in this regard.

[0253] Figure 3 An optional hardware structure schematic diagram of the terminal 100 is shown.

[0254] Reference Figure 3 As shown, the terminal 100 can 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), a microphone 162 (optional), a processor 170, an external interface 180, a power supply 190, and the like. Those skilled in the art can understand that the terminal 100 can include more or less components, or combine certain components, or different components, without departing from the scope of the present application. Figure 3 The above-mentioned terminal or multi-functional device is merely an example and does not constitute a limitation on the terminal or multi-functional device, which can include more or less components, or combine certain components, or different components.

[0255] The input unit 130 can be used to receive inputted digital or character information, and to generate key signal input related to user settings and function control of the portable multi-functional device. Specifically, the input unit 130 can include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can collect touch operations of a user thereon or adjacent thereto (such as operations of the user using a finger, a joint, a stylus, or any suitable object on or adjacent to the touch screen), and drive corresponding connected devices according to a pre-set program. The touch screen can detect touch actions of the user on the touch screen, convert the touch actions into touch signals and send the touch signals to the processor 170, and can receive commands from the processor 170 and execute the commands; the touch signals at least include touch point coordinate information. The touch screen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, the touch screen can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch screen 131, the input unit 130 can also include other input devices. Specifically, the other input devices 132 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, on-off keys 133, and the like), a trackball, a mouse, a joystick, and the like.

[0256] The other input device 132 can receive parameters related to the causality recognition, such as multiple data (and optionally, multiple variables) in the embodiments of the present application, and the like.

[0257] The display unit 140 can be configured to display information input by a user or information provided to the user, various menus of the terminal 100, an interactive interface, file display, and / or playing of any multimedia file. In the embodiments of the present application, the display unit 140 can be configured to display an interface of a causality recognition application, a causality result, and the like.

[0258] The storage 120 can be configured to store instructions and data. The storage 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, texts, and the like. The storage instruction area can store software units, such as an operating system, an application, and instructions required by at least one function, or a subset, an extended set thereof. The storage 120 can further include a non-volatile random access memory. The storage 120 can provide the processor 170 with software and applications, including management of hardware, software, and data resources in a computing processing device, support for control software, and the like. The storage 120 can also be used for storage of multimedia files, and storage of running programs and applications.

[0259] The processor 170 is a control center of the terminal 100. The processor 170 connects each part of the terminal 100 through various interfaces and lines, executes various functions of the terminal 100 and processes data by running or executing instructions stored in the storage 120 and calling data stored in the storage 120, and thus controls the terminal device as a whole. Optionally, the processor 170 can include one or more processing units. Preferably, the processor 170 can integrate an application processor and a modem processor. The application processor mainly processes an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 170. In some embodiments, the processor, the storage, and the like can be implemented on a single chip, and in some embodiments, they can also be implemented on separate chips respectively. The processor 170 can also be configured to generate corresponding operation control signals and send the operation control signals to corresponding components of the computing processing device, read and process data in the software, and especially read and process data and programs in the storage 120, so that each functional module therein performs corresponding functions, and thus controls the corresponding components to act according to the requirements of the instructions.

[0260] The storage 120 can be configured to store software codes related to the causality determination method, and the processor 170 can execute steps of the causality determination method of the chip, and can also dispatch other units (such as the above-mentioned input unit 130 and the display unit 140) to realize corresponding functions.

[0261] The RF unit 110 (optional) can be used for transmitting and receiving information or signals in the process of information or communication, for example, receiving the downlink information of the base station, and processing by the processor 170. In addition, the uplink data is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF 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 for Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0262] In the embodiments of the present application, the RF unit 110 can send data to the server 200 and receive the causal relationship identification result sent by the server 200.

[0263] It should be understood that the RF unit 110 is optional, which can be replaced by other communication interfaces, for example, a network interface.

[0264] The terminal 100 also includes a power supply 190 (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the processor 170 through a power management system, so as to realize the functions of managing charging, discharging, and power consumption management through the power management system.

[0265] The terminal 100 also includes an external interface 180, which can be a standard Micro USB interface or a multi-pin connector, and can be used for connecting the terminal 100 and other devices for communication, or for connecting a charger to charge the terminal 100.

[0266] Although not shown, the terminal 100 can also include a flash, a wireless fidelity (WiFi) module, a Bluetooth module, different function sensors, etc., which will not be described here. Part or all of the methods described below can be applied in the terminal 100 as shown. Figure 3 ​

[0267] Next, the product form of the server 200 is described. Figure 2

[0268] Figure 4 A structural diagram of the server 200 is provided, as shown in the figure. Figure 4 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.

[0269] The bus 201 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 In the figure, only one thick line is used, but it does not mean that there is only one bus or one type of bus.

[0270] The processor 202 can be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP), etc.

[0271] The memory 204 can include a volatile memory, such as a random access memory (RAM). The memory 204 can also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a mechanical hard drive (HDD), or a solid state drive (SSD).

[0272] The memory 204 can be used to store software code related to the causal relationship determination method, and the processor 202 can execute the steps of the chip causal relationship determination method, or can schedule other units to realize the corresponding functions.

[0273] ​It should be understood that the aforementioned terminal 100 and server 200 can be centralized or distributed devices. The processors (e.g., processor 170 and processor 202) in the aforementioned terminal 100 and server 200 can be hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the processor can be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.

[0274] It should be understood that the causal relationship determination method in the embodiments of this application involves AI-related calculations. When performing AI calculations, the instruction execution architecture of the terminal device and the server is not limited to... Figure 3 as well as Figure 4 The processor and memory architecture shown is illustrated below. Figure 5 The system architecture provided in the embodiments of this application will be described in detail.

[0275] Figure 5 This is a schematic diagram of the system architecture provided for an embodiment of this application. Figure 5 As shown, 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 acquisition system 560.

[0276] The execution device 510 includes a calculation module 511, an I / O interface 512, a preprocessing module 513, and a preprocessing module 514. The calculation module 511 may include a target model / rule 501, while the preprocessing modules 513 and 514 are optional.

[0277] The execution device 510 can be a terminal device or a server that runs the aforementioned causal relationship identification application.

[0278] The data acquisition device 560 is used to collect training samples. Training samples can include information about I / O units, bump information, and the total number of connections, etc. After collecting the training samples, the data acquisition device 560 stores these training samples in the database 530.

[0279] The training device 520 can train the neural network to be trained (for example, the generation flow model in the embodiments of the present application) based on the database 530 or the training samples (for example, the plurality of data and the plurality of variables in the embodiments of the present application) from the client device 540, to obtain the target model / rule 501 and the causal identification result.

[0280] It should be noted that in actual application, the training samples maintained in the database 530 do not necessarily come from the collection of the data collection device 560, but can also be received from other devices (for example, from the client device 540). In addition, it should be noted that the training device 520 does not necessarily train the target model / rule 501 based on the training samples maintained in the database 530, but can also obtain training samples from the cloud or other places for model training, and the above description should not be regarded as a limitation of the embodiments of the present application.

[0281] Optionally, the target model / rule 501 trained by the training device 520 can be applied to different systems or devices, such as the execution device 510 shown in the figure. Figure 5 The execution device 510 can be a terminal, such as a mobile phone terminal, a tablet computer, a notebook computer, an augmented reality (AR) / virtual reality (VR) device, a vehicle-mounted terminal, etc., and can also be a server, etc.

[0282] Specifically, the training device 520 can deliver the trained model or the causal identification result to the execution device 510.

[0283] In the Figure 5 , the execution device 510 is configured with an input / output (I / O) interface 512 for data interaction with external devices, and a user can input data (for example, the plurality of data or the plurality of variables in the embodiments of the present application) to the I / O interface 512 through the client device 540.

[0284] The preprocessing modules 513 and 514 are used for preprocessing the input data received by the I / O interface 512. It should be understood that there can be no preprocessing modules 513 and 514 or only one preprocessing module. When there is no preprocessing module 513 and 514, the input data can be directly processed by the calculation module 511.

[0285] During the preprocessing of input data by the execution device 510, or during the calculation module 511 of the execution device 510 performing calculations and other related processes, the execution device 510 can call data, code, etc. in the data storage system 550 for corresponding processing, or store the data, instructions, etc. obtained from the corresponding processing into the data storage system 550.

[0286] Finally, I / O interface 512 provides the processing results (e.g., causal identification results) to client device 540, thereby providing them to the user.

[0287] exist Figure 5 In the illustrated scenario, the user can manually provide input data, which can be done through the interface provided by I / O interface 512. Alternatively, the client device 540 can automatically send input data to I / O interface 512. If user authorization is required for the client device 540 to automatically send input data, the user can set the corresponding permissions in the client device 540. The user can view the output results of the execution device 510 on the client device 540, which can be presented in various forms such as display, sound, or animation. The client device 540 can also act as a data acquisition terminal, collecting the input data and output results of the input I / O interface 512 as shown in the figure, and storing them as new sample data in database 530. Alternatively, data can be collected directly from the I / O interface 512 without going through the client device 540, using the input data and output results of the input I / O interface 512 as shown in the figure, and storing them as new sample data in database 530.

[0288] It is worth noting that, Figure 5 This is merely a schematic diagram of a system architecture provided in an embodiment of this application. The positional relationships between the devices, components, modules, etc., shown in the diagram do not constitute any limitation. For example, in Figure 5 In this context, the data storage system 550 is an external storage device relative to the execution device 510. However, in other cases, the data storage system 550 may also be placed within the execution device 510. It should be understood that the aforementioned execution device 510 may be deployed within the client device 540.

[0289] From the training side of the model:

[0290] In this embodiment of the application, the training device 520 can access the memory ( Figure 5 (Not shown in the diagram, but can be integrated into the training device 520 or deployed separately from the training device 520) The code stored in the diagram can be used to implement the steps related to model training in the embodiments of this application.

[0291] In an embodiment of the present application, the training device 520 can include a hardware circuit (such as an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a general processor, a digital signal processor (DSP), a microprocessor or a microcontroller, etc.), or a combination of these hardware circuits. For example, the training device 520 can be a hardware system with an instruction execution function, such as a CPU, a DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, an FPGA, etc., or a combination of the hardware system without an instruction execution function and the hardware system with an instruction execution function.

[0292] It should be understood that the training device 520 can be a combination of a hardware system without an instruction execution function and a hardware system with an instruction execution function. The part of the steps related to the training of the neutralization model provided in the embodiments of the present application can also be implemented by the hardware system without an instruction execution function in the training device 520, which is not limited here.

[0293] II. Cloud services provided by the server

[0294] In a possible implementation, the server can provide the terminal with a service for determining the causal relationship through an application programming interface (API).

[0295] The terminal device can send relevant parameters (such as a plurality of data, etc.) to the server through the API provided by the cloud, the server can obtain a processing result based on the received data, and return the processing result (such as a causal recognition result, etc.) to the terminal.

[0296] The description of the terminal and the server can be described in the above embodiments, which will not be repeated here.

[0297] Since the embodiments of the present application involve the application of a large number of neural networks, in order to facilitate understanding, the related terms and concepts related to neural networks involved in the embodiments of the present application will be introduced first.

[0298] (1) Neural network

[0299] The neural network can be composed of neural units, and the neural unit can be an operation unit with xs (i.e. input data) and intercept 1 as input. The output of the operation unit can be:

[0300]

[0301] where 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 non-linear characteristics into the neural network to convert the input signal in the neural unit into an output signal. The output signal of the activation function can be used as the input of the next convolutional layer, and the activation function can be a sigmoid function. The neural network is a network formed by connecting a plurality of the above single neural units, 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, and the local receptive field can be a region composed of a plurality of neural units.

[0302] (2) Deep neural network

[0303] Deep neural network (DNN), also known as multi-layer neural network, can be understood as a neural network with many layers of hidden layers, where "many" has no special measurement standard. From the division of DNN according to the position of different layers, the neural network inside the DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally, the first layer is the input layer, and the last layer is the output layer, and the number of layers in between is the hidden layer. The layers are fully connected, that is, any neuron in the i-th layer is connected to any neuron in the i+1-th layer. Although DNN looks very complex, in terms of the work of each layer, it is actually not complex, which can be simply expressed as the following linear relationship expression: wherein, is the input vector, is the output vector, is the offset vector, W is the weight matrix (also called coefficient), and α() is the activation function. Each layer only performs the following simple operation on the input vector to obtain the output vector Since the number of layers of DNN is large, the number of coefficients W and offset vectors is also large. These parameters in DNN are defined as follows: taking the coefficient W as an example: assuming in a three-layer DNN, the linear coefficient from the fourth neuron of the second layer to the second neuron of the third layer is defined as The superscript 3 represents the layer number of the coefficient W, and the subscript corresponds to the output third layer index 2 and the input second layer index 4. In summary: the coefficient from the k-th neuron of the L-1-th layer to the j-th neuron of the L-th layer is defined as It is noted that the input layer does not have a W parameter. In deep neural networks, more hidden layers allow the network to better capture the complexity of real-world situations. In theory, the more parameters a model has, the higher its complexity, and the greater its "capacity" to perform more complex learning tasks. Training a deep neural network is essentially the process of learning the weight matrices, and the ultimate goal is to obtain the weight matrices of all layers of the trained deep neural network (the weight matrices formed by the vectors W of many layers).

[0304] (3) Graph:

[0305] A graph is a data structure that includes at least one vertex and at least one edge. In some scenarios, the vertices in a graph can be mapped to entities, and the edges in a graph can be mapped to relationships between entities. A graph can be a directed graph or an undirected graph. Of course, a graph can also include other data in addition to vertices and edges, such as labels for vertices and labels for edges, etc.

[0306] (4) Loss function

[0307] During the training of a deep neural network, because the output of the deep neural network is expected to be as close as possible to the value that is truly intended to be predicted, the weight vectors of each layer of the neural network can be updated by comparing the predicted value of the current network with the truly intended target value, and then adjusting the weight vectors based on the difference between the two. (Of course, before the first update, there is usually an initialization process, i.e., pre-configuring parameters for each layer in the deep neural network), for example, if the predicted value of the network is too high, adjust the weight vectors to make it predict lower, and keep adjusting until the deep neural network can predict the truly intended target value or a value very close to the truly intended target value. Therefore, it is necessary to define "how to compare the difference between the predicted value and the target value" in advance, which is the loss function or the objective function, which is an important equation for measuring the difference between the predicted value and the target value. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, and then the training of the deep neural network becomes a process of trying to minimize this loss.

[0308] (5) Backpropagation algorithm

[0309] The convolutional neural network can adopt a back propagation (BP) algorithm to correct the size of the parameters in the initial super-resolution model in the training process, so that the reconstruction error loss of the super-resolution model becomes smaller and smaller. Specifically, the forward transmission of the input signal until the output will generate an error loss, and the error loss information is propagated backward to update the parameters in the initial super-resolution model, so as to make the error loss converge. The back propagation algorithm is a back propagation movement dominated by error loss, aiming to obtain the optimal parameters of the super-resolution model, such as the weight matrix.

[0310] (6) Causal relationship

[0311] The causal relationship between a variable pair (for example, variable A and variable B) can be understood as that variable A causes variable B, that is, variable A is the dependent variable of variable B, and variable B is the result variable of variable A. Specifically, under the condition that other conditions remain unchanged, the change of variable A will cause the change of variable B.

[0312] (7) Variable

[0313] The variable can be a feature of data. For example, the variable can be a feature dimension of image data, for example, can be a certain semantic in the image, for example, the ear area, the glasses area and the like in the image including a portrait, and can also be a pixel channel in the image, for example, R channel, G channel, B channel and the like. For another example, the variable can be a certain type of local segment of a chip, and the data of the variable can be an image of a certain type of local segment of the chip. For another example, the variable can be a feature dimension of text data, for example, can be a root cause of a fault. The variable can also be a feature dimension of audio data, a feature dimension of video data, and the like.

[0314] (8) Reinforcement learning

[0315] Reinforcement learning is one of the paradigms and methodologies of machine learning, which is used to describe and solve the problem that an agent learns a strategy through interaction with the environment to maximize the reward or achieve a specific goal.

[0316] (9) Generative flow model

[0317] A generative flow model (or flow-based generative flow model or generative flow model) is a flow model that samples in a sequential decision manner and constructs a composite structure such that the probability of generating the structure is proportional to the reward value of the structure. The generative flow model constructs a composite structure in a sequential decision manner, and constructs a flow model in a directed acyclic graph, i.e., each state node has multiple parent nodes, which is different from the tree structure in which each state node has only one parent node. The model has a unique initial node and multiple termination nodes. The model starts sampling from the initial node to generate an action sequence, completes the transition between states, and ends sampling until it reaches the termination node. The termination node corresponds to the generated composite structure.

[0318] The initial node can include output flow, the intermediate node can include input flow and output flow (or reward value), and the termination node can include input flow and reward value. Imagine the flow model as a water pipe, the water flow of the initial node is the total inflow of the model, and the sum of the water flows of all termination nodes is the total outflow of the model. For each intermediate node, the inflow is equal to the outflow. The inflow and outflow values of the nodes are predicted by a neural network, and by optimizing the flow matching constraint as an objective function, the model can learn a strategy (i.e., optimize the neural network) such that the probability of sampling the generated composite structure is proportional to its reward value, and the structure with higher reward value is more likely to be sampled. In this way, the generative flow model can sample a series of structures with high reward value.

[0319] An exemplary diagram of a generative flow model can be referred to Figure 6 , as shown in the following figure: T where s i represents a state, x j represents a composite structure. s0 is the initial node, s5, s8, s 11 , s 13 , s 16 are termination nodes because they correspond to composite structures x5, x8, x 11 , x 13 , x 16 .

[0320] (10) Bayesian network structure learning

[0321] Bayesian network structure learning is to find a causal relationship network structure that best matches the training sample set given a set of data samples.

[0322] (11) Directed acyclic graph

[0323] In graph theory, a directed graph is a directed acyclic graph if it is not possible to return to a vertex from any vertex by following a number of edges.

[0324] (12) Transitive closure

[0325] In graph theory, the transitive closure C can describe whether a node can reach another node through a directed arrow. If there is a valid directed path from a node A to another node B, the (B, A) position in the adjacency matrix is marked as 1.

[0326] (13) Adjacency matrix

[0327] The adjacency matrix is a square matrix representing the adjacency relationship between vertices, with values of 0 or 1, where 0 represents no direct relationship and 1 represents a relationship; the adjacency matrix of a directed acyclic graph cannot have 1 in the symmetric and diagonal position.

[0328] (14) Topological sequence

[0329] The topological sequence is a kind of arrangement of activities in a vertex activity network according to the order of occurrence. Topological sorting is a topological sorting of a directed acyclic graph G, which arranges all vertices in G into a linear sequence, such 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.

[0330] In existing implementations, the causal relationship between variables in a dataset is identified based on reinforcement learning, which uses reinforcement learning to search for the highest-scoring causal sequence. This technology first encodes the dataset, encoding each column as a state, at which point the order of all states is random, then uses Markov chains to determine the order of decoding to generate the action sequence (a0, a1, …, a T ), which corresponds to a certain causal sequence, and the directed acyclic constraint function can constrain the graph corresponding to each causal sequence to be a directed acyclic graph. That is, the prior art selects more accurate causal relationships by traversing a large number of causal sequences and scoring each causal sequence. In order to obtain more accurate causal relationships, a large number of causal sequences need to be traversed. As the search space (i.e. data volume, variable quantity) increases, more computing power and runtime consumption are required.

[0331] To solve the above problems, with reference to Figure 7 , Figure 7 The flowchart of a causal relationship determination method provided by an embodiment of the present application is shown in FIG. 1. The causal relationship determination method provided by the embodiment of the present application includes the following steps. Figure 7

[0332] 701、Obtain first information of a plurality of variables, the first information indicating a causal relationship between the plurality of variables.

[0333] ​In a possible implementation, an embodiment of the present application aims to identify the causal relationship between multiple variables of a data set (including multiple data), and can obtain the data set (including multiple data) to be identified, and input the data set (or multiple variables in the data set) into a model (for example, the generative flow model (or referred to as the flow-based generative flow model or the generative flow model) in the embodiment of the present application) for determining the causal relationship, to obtain a causal relationship determination result.

[0334] The causal relationship of the multiple variables can include the causal relationship of each variable pair in the multiple variables, and the variable pair can include two variables. The causal relationship of the variable pair can be understood as the causal relationship between the variables included in the variable pair.

[0335] The causal relationship between the variable pair (for example, variable A and variable B) can be understood as that variable A causes variable B, that is, variable A is the dependent variable of variable B, and variable B is the resulting variable of variable A. Specifically, under the condition that other conditions remain unchanged, the change of variable A will cause the change of variable B.

[0336] The causal relationship between the variable pair (for example, variable B and variable A) can be understood as that variable B causes variable A, that is, variable B is the dependent variable of variable A, and variable A is the resulting variable of variable B.

[0337] In a possible implementation, the causal relationship (for example, 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 representing the adjacent relationship between vertices, and the value is 0 or 1, 0 representing no direct relationship and 1 representing a relationship; the adjacency matrix of the directed acyclic graph cannot appear in the symmetric and diagonal line position with 1, for example, the causal relationship of the multiple variables (for example, the first information in the embodiment of the present application) is that variable 1 causes variable 2, and there is no causal relationship between the remaining variables, and the first information can be represented as:

[0338]

[0339] Regarding the multiple variables:

[0340] In a possible implementation, the variable can be a feature of data.

[0341] In a possible implementation, the variable can be a feature dimension of the image data, for example, can be a certain semantic in the image, for example, an ear area, a glasses area, and the like in the image including a portrait, and can also be a pixel channel in the image, for example, an R channel, a G channel, a B channel, and the like. Correspondingly, the data of the variable can be data of the image data in the feature dimension, for example, a pixel value of the ear area in the image of the portrait, a pixel value of the glasses area, and the like, and can also be a pixel value of the R channel of the image, a pixel value of the G channel, a pixel value of the B channel, and the like.

[0342] For another example, the variable can be a certain type of local fragment of a chip, and the data of the variable can be an image of the certain type of local fragment of the chip.

[0343] In a possible implementation, the variable can be a feature dimension of the text data, for example, can be a root cause of a fault. For example, can be a KPI of a communication network, a called node of a computer transaction, and correspondingly, the data of the variable can be a specific value of the KPI of the communication network, information of the called node of the computer transaction, and the like.

[0344] In a possible implementation, the variable can also be a feature dimension of audio data, a feature dimension of video data, and the like.

[0345] In the embodiments of the present application, the causal relationship between the multiple variables can be predicted by generating a flow model according to the multiple variables of the data set.

[0346] In a possible implementation, the flow model can predict the causal relationship between the multiple variables multiple times in the process of one iteration, wherein the causal relationship can be predicted next time based on the causal relationship predicted last time, wherein the result of the causal relationship prediction next time includes the causal relationship existing in the causal relationship prediction last time, and further includes a newly predicted causal relationship between a pair of variables, until the result of the prediction meets a termination condition of one iteration.

[0347] For example, the plurality of variables can include variable 1, variable 2, and variable 3. In one iteration, the generative flow model can first predict (for example, by the first neural network in the generative flow model) the causal relationships (for example, the first information in the embodiments of the present application) among the plurality of variables as: variable 1 causes variable 2, and there is no causal relationship between the remaining variables. If the first information does not satisfy the termination condition, the generative flow model (for example, by the first neural network in the generative flow model) can predict more abundant causal relationships (for example, the second information in the embodiments of the present application) among the plurality of variables according to the first information as: variable 1 causes variable 2, variable 2 causes variable 3, and there is no causal relationship between the remaining variables (equivalent to the second information adds the causal relationship between variable 2 and variable 3 to the first information).

[0348] As described above, in one iteration, the generative flow model (for example, by the first neural network in the generative flow model) can predict the first information of the plurality of variables in one prediction process. The first information can indicate the causal relationships among the plurality of variables.

[0349] 702、According to the first information, the second information of the plurality of variables is predicted by the first neural network in the generative flow model. The second information indicates that there is a first causal relationship between a first variable and a second variable in the plurality of variables. The first causal relationship indicates that the first variable is used as a dependent variable of the second variable, and the second variable is used as a result 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.

[0350] In one possible implementation, the generative flow model can include the first neural network.

[0351] In one possible implementation, the first neural network, the second neural network, and the third neural network can be multi-layer perceptrons (MLPs). The MLP is a feedforward artificial neural network model that maps a plurality of input data sets to a single output data set.

[0352] In one possible implementation, the generative flow model can further include an embedding layer. The embedding layer can perform embedding processing on the causal relationships among the plurality of variables to obtain corresponding embedding representations.

[0353] The first neural network predicts a causal relationship between the variables in the next iteration according to a causal relationship predicted in one iteration, for example, the "causal relationship predicted in one iteration" can be the first information, and the first neural network can predict second information between the variables according to the first information (for example, input the first information (or an embedding representation corresponding to the first information) into the first neural network), and the second information includes more variable pairs having a causal relationship (for example, one more or more than one) than the first information.

[0354] It can be seen that the generation flow model in the embodiment of the present application is not directly sampled to obtain multiple candidate causal relationships and then select a better one, but through a sequence generation manner, a causal relationship between multiple variables is generated in each iteration, each generation is based on the generation result of the last time, and the causal relationship is constantly enriched as the causal relationship generation process proceeds.

[0355] In the embodiment of the present application, the causal discovery is converted into a process of sampling a series of actions (that is, discovering new causal relationships) to generate a composite object (that is, a causal relationship between multiple variables) through a generation flow model. Optionally, the embodiment of the present application can use a DAG structure-based generation flow model to connect states (that is, adjacency matrices). Figure 8 The action a is to mark the value of a position in the adjacency matrix as 1. The flow model has a unique initial node S0, which is an all-0 adjacency matrix, corresponding to nodes connected by no edges.

[0356] Next, how to obtain the second information from the first information through the first neural network in the generation flow model is introduced.

[0357] In one possible implementation, the first neural network in the generation flow model can be used to obtain a probability that each variable pair in the multiple variable pairs has a causal relationship according to the first information; and the second information is obtained based on the probability that the variable pair composed of the first variable and the second variable has the first causal relationship being the highest.

[0358] That is, the first neural network can select a variable pair from the multiple variable pairs composed of multiple variables (the multiple variable pairs do not have a causal relationship in the first information), and the selected variable pair can have a causal relationship in the second information.

[0359] In one possible implementation, the first information indicates a causal relationship between M pairs of variables among the plurality of variables, and the second information indicates a causal relationship between M+1 pairs of variables, wherein the M+1 pairs of variables include the M pairs of variables and a pair of variables consisting of the first variable and the second variable.

[0360] exist Figure 8 In the diagram, the first column represents the initial node S0, the second column represents the edges x1→x2 (above) and x4→x1 (below) added to the two causal graphs, and the third column represents the edges added based on the second column. It can be seen that the two matrices in the second column can both point to the matrix in the middle of the third column, indicating that the state node can have multiple parent nodes.

[0361] To ensure that the selected variable pairs (e.g., the first and second variables in this embodiment) make the graph corresponding to the second information a directed acyclic graph, variable pairs with causal relationships can be selected based on certain constraint rules. Alternatively, even if the selected variable pairs (e.g., the first and second variables in this embodiment) make the graph corresponding to the second information a directed cyclic graph, the second information will not be used. The following sections will describe these two methods respectively:

[0362] Method 1: Based on target constraints

[0363] In one possible implementation, a target constraint can be obtained based on the first information; wherein the target constraint is used to constrain multiple variable pairs in the second information to have no causal relationship; each variable is represented as a node in a graph, with the node containing the dependent variable pointing to the node containing the effect variable; the target constraint is used to constrain the graph corresponding to the second information to be a directed acyclic graph. Accordingly, based on the first information and the target constraint, the second information of the multiple variables can be predicted by a first neural network in a generative flow model.

[0364] In other words, by constraining the objective, the first neural network can be constrained in its choice of variable pairs, thereby preventing the causal relationships added in the second information from causing the graph corresponding to the second information to become a directed cyclic graph.

[0365] Next, we will introduce how to obtain target constraints based on the first information, which possess the above-mentioned capabilities (can constrain the first neural network's selection of variable pairs, thereby ensuring that the causal relationships added in the second information do not cause the graph corresponding to the second information to become a directed cyclic graph):

[0366] In one possible implementation, the plurality of variable pairs includes a target variable pair, which includes a third variable and a fourth variable. It should be understood that the target variable pair can be any pair of variables in the second information indicated in the target constraint that cannot have a causal relationship.

[0367] In a possible implementation, in a case where the first information indicates that the third variable is an independent variable of the fourth variable and the fourth variable is a dependent variable of the third variable, the target constraint restricts the second information from indicating that the third variable is the dependent variable of the fourth variable and the fourth variable is the independent variable of the third variable.

[0368] That is, the second information does not include the causal relationship that is repeated in the first information.

[0369] For example, refer to Figure 9 wherein the gray boxes in the first information represent variable pairs with causal relationships, for example, the causal relationship represented by the shaded box on the left side of the first information is that variable 1 causes variable 2, and the causal relationship represented by the shaded box on the right side of the first information is that variable 2 causes variable 3, and accordingly, the box composed of the upper-right to lower-left line segment in the target constraint represents a causal relationship that cannot exist in the second information, for example, the target constraint can restrict the second information from including the causal relationship that variable 1 causes variable 2, and from including the causal relationship that variable 3 causes variable 2.

[0370] In a possible implementation, in a case where the first information indicates that the third variable is an independent variable of the fourth variable and the fourth variable is a dependent variable of the third variable, the target constraint restricts the second information from indicating that the third variable is the dependent variable of the fourth variable and the fourth variable is the independent variable of the third variable.

[0371] That is, the second information does not include a case opposite to the causal relationship that exists in the first information.

[0372] For example, refer to Figure 9 wherein the gray boxes in the first information represent variable pairs with causal relationships, for example, the causal relationship represented by the shaded box on the left side of the first information is that variable 1 causes variable 2, and the causal relationship represented by the shaded box on the right side of the first information is that variable 2 causes variable 3, and accordingly, the box composed of the upper-left to lower-right line segment in the target constraint represents a causal relationship that cannot exist in the second information, for example, the target constraint can restrict the second information from including the causal relationship that variable 2 causes variable 1, and from including the causal relationship that variable 3 causes variable 2.

[0373] In a possible implementation, in a case where the third variable and the fourth variable are the same, the target constraint restricts the second information from indicating that there is no causal relationship between the third variable and the fourth variable.

[0374] That is, the second information does not appear the same data between the existence of a causal relationship.

[0375] For example, referring to Figure 9 In which, the box composed of vertical line segment in the target constraint represents the causal relationship that cannot exist in the second information, for example, the target constraint can constrain 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.

[0376] In a possible implementation, each variable is represented as a node in a graph, and the node where the variable as the dependent variable points to the node where the variable as the independent variable; in the case where the graph corresponding to the first information indicates that there is a connected path between the third variable and the fourth variable, the target constraint constrains the second information to indicate that the third variable is not the dependent variable of the fourth variable, and the fourth variable is not the independent variable of the third variable.

[0377] That is, the second information does not appear the first information in the presence of a causal relationship path (the same direction on the path) of the head and tail nodes opposite.

[0378] For example, referring to Figure 9 In which, the gray box in the first information represents the variable pair that exists a causal relationship, for example, the causal relationship represented by the left shaded box in the first information is that variable 1 causes variable 2, and the causal relationship represented by the right shaded box in the first information is that variable 2 causes variable 3, that is, there is a connection path from variable 1 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 indirectly cause variable 3, and the box composed of cross line segments in the target constraint represents the causal relationship that cannot exist in the second information, for example, the target constraint can constrain the second information cannot include the causal relationship that variable 3 causes variable 1.

[0379] Next, how to determine the above-mentioned variables that exist a connected path is introduced:

[0380] In graph theory, the transitive closure C can describe whether a node can reach another node through a directed arrow (that is, whether there is a connection path).

[0381] In Figure 10 , the actual directed acyclic graph is v1→v2→v3→v4, and in the transitive closure, there are arrows between v1 and v3, v4, and v2, v3. A1 is the adjacency matrix corresponding to the actual DAG, and A2 is the adjacency matrix corresponding to the transitive closure.

[0382] Therefore, according to the transitive closure, it can be found that v3 and v4 are "descendants" of v1, and neither of them has an arrow pointing to v1.

[0383] According to the transitive closure, the causal relationship repeated in the first information, the first node of the connection path existing in the first information, and the causal relationship existing between the same variable and itself can be determined. After obtaining the transitive closure, 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 constraint can be obtained.

[0384] In the case where the target constraint is represented as a mask matrix, the mask matrix can be defined as follows:

[0385]

[0386] According to the updated mask matrix, the set of valid actions 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, refer to Figure 11 ).

[0387] For example, the calculation process of the target constraint in the embodiment of the application will be introduced as follows:

[0388] Referring to Figure 12 , the first information can indicate that variable 1 causes variable 2, and variable 2 causes variable 3. After obtaining the adjacency matrix representing the causal relationship repeated in the first information, the adjacency matrix representing the causal relationship existing between the same variable and itself, and the adjacency matrix representing the causal relationship existing in the connection path in the first information, the intersection of the above adjacency matrices can be obtained to obtain a closure matrix. After transposing the closure matrix, the intersection of the transposed closure matrix and the adjacency matrix representing the causal relationship repeated in the first information can be obtained, and then the target constraint can be obtained.

[0389] It should be understood that the complexity of each step of the calculation process (such as intersection, transposition, and matrix multiplication) in the above solution to obtain the target matrix is O(1), and in the existing implementation, in order to obtain the causal relationship of the directed acyclic graph, a calculation process with a complexity of O(d 3 ) is required, where d is the number of variables, that is, in the embodiment of the application, by using the target constraint in the first neural network to predict the causal relationship, the complexity of the operation can be greatly reduced while ensuring that the graph of the predicted causal relationship is a directed acyclic graph.

[0390] In one possible implementation, when the first neural network predicts the causal relationship of multiple variables according to the first information, the first neural network can select at least one variable pair satisfying the target constraint from multiple variable pairs composed of multiple variables according to the target constraint, and select a variable pair having a causal relationship in the second information from the at least one variable pair.

[0391] In a possible implementation, when the first neural network performs the causal relationship prediction of the plurality of variables according to the first information, the first neural network can assign a value of 0 or close to 0, for example, 1, to the selected probability of the pair of variables that does not meet the target constraint according to the target constraint. -5 -4 -5 -6 In addition, when the first neural network performs the causal relationship prediction of the plurality of variables according to the first information, the at least one pair of variables that does not meet the target constraint is not sampled.

[0392] For example, the first information S i As the state enters the network of the generative flow model, the first neural network that has been masked by the embedding matrix is input, and then an action a is sampled, so that another position of the adjacency matrix is marked as 1 (1 indicates that the pair of variables has a causal relationship), and the second information is obtained, and then one state transition can be completed.

[0393] In a possible implementation, after the second information is obtained, whether the iteration of the current round has ended (that is, whether the second information is a terminal node) can be determined based on the second information.

[0394] If the second information indicates that the iteration of the current round has not ended, the first neural network can continue to perform the causal relationship prediction of the plurality of variables according to the second information.

[0395] It should be understood that if the above generative flow model is a trained model, if the second information indicates that the iteration of the current round has ended, the causal relationship identification result can be obtained and output.

[0396] It should be understood that during the training of the model, if the second information indicates that the iteration of the current round has ended, the loss function can be determined, and the generative flow model can be updated based on the loss function (or updated after the iteration of the batch of other data is completed), and the iteration process of the next round is started.

[0397] In a possible implementation, it can be determined that the iteration of the current round has ended (that is, the second information is a terminal node) based on the second information indicating that there is a causal relationship between any one of the plurality of variables and at least one variable.

[0398] In a possible implementation, whether the terminal node is reached can be determined according to 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.

[0399] ​​​In the embodiments of the present application, the loss function can be constructed according to the difference (difference minimization) between the input flow and the output flow of each intermediate state (for example, the first information) and the difference between the input flow and the reward value of the terminal node (for example, the second information), and the generated flow model can be updated according to the loss function, so that the generated flow model can gradually have the ability to find more accurate causal relationships between multiple variables.

[0400] Specifically, in a possible implementation, the generated flow model can take the causal relationship between multiple variables as the state of a node and sequentially perform state transition. After reaching the terminal node, the input flow and the output flow of the intermediate node and the input flow and the reward value of the terminal node can be obtained based on the state of each node, and then the loss function can be constructed based on the input flow and the output flow of the intermediate node and the input flow and the reward value of the terminal node, and the generated flow model can be updated.

[0401] The updated generated flow model can repeatedly take the causal relationship between multiple variables as the state of a node and sequentially perform state transition to construct the loss function, and update the generated flow model multiple times until the generated flow model converges. The converged generated flow model can take the causal relationship between multiple variables as the state of a node and sequentially perform state transition, and the causal relationship represented by the state of the terminal node can be output as the causal relationship between multiple variables.

[0402] Next, the calculation process of the input flow and the output flow of the first information is introduced.

[0403] In a possible implementation, a plurality of third information can be obtained according to the first information, where the first information indicates that there is a causal relationship between M variable pairs in the plurality of variables, each third information indicates that there is a causal relationship between part of the group variables in the M variable pairs, and M is a positive integer greater than 1.

[0404] Each third information can be a parent node of the first information.

[0405] The first information can include M causal relationships, and the number of third information is also M, and each third information is obtained by removing one causal relationship from the M causal relationships in the first information, that is, each third information can indicate M-1 causal relationships.

[0406] For example, referring to Figure 13 The first information can indicate the following causal relationships: variable 1 causes variable 2, and variable 2 causes variable 3. The third information can include third information 1 and third information 2. The third information 1 can indicate that variable 1 causes variable 2, and the third information 1 can indicate that variable 2 causes variable 3.

[0407] In a possible implementation, the first input flow of the plurality of third information (or the probability of the third information) can be obtained by the second neural network in the generation flow model according to the plurality of third information; wherein the embedding representation of each third information can be obtained according to the plurality of third information, and the embedding representation of each third information is input into the second neural network to obtain the input flow of each third information, and the sum of the input flow of each third information can be the first input flow of the plurality of third information, and the first input flow can be understood as the flow input to the first information.

[0408] For example, for the first information S i , all parent nodes S p of the first information S i are found. i After embedding the parent nodes, the parent nodes and the action set (a1,…,a n ) are jointly input into the second neural network to calculate the flow F(S i →S p ) of the second neural network. i

[0409] In a possible implementation, the first output flow of the first information (or the probability of the first information) can be obtained by the third neural network in the generation flow model according to the first information; wherein the embedding representation of the first information can be obtained according to the first information, and the embedding representation of the first information is input into the third neural network to obtain the output flow of the first information.

[0410] In a possible implementation, the difference (for example, the difference is minimized) between the first input flow and the first output flow is used to construct a loss function, and then the first neural network, the second neural network and the third neural network can be updated according to the loss function.

[0411] When the second information is a terminal node (the judgment logic of the terminal node can refer to the description in the above embodiment, which will not be described here), the input flow and the reward value of the second information can be calculated, and a loss function can be constructed based on the difference between the input flow and the reward value. Next, the calculation process of the input flow and the reward value of the second information is introduced:

[0412] In a possible implementation, the second information can be used to obtain a plurality of fourth information, where the third information indicates that there is a causal relationship between N variable pairs in the plurality of variables, each of the fourth information indicates that there is a causal relationship between part of the group variables in the N variable pairs, and N is a positive integer greater than 1. According to the plurality of fourth information, a second input flow of the plurality of fourth information is obtained by using the second neural network in the generation flow model. The calculation of the input flow of the second information can refer to the calculation of the input flow of the first information in the above embodiments, which will not be described here.

[0413] In a possible implementation, the second information can be used to obtain a first reward value of the second information, where the first reward value represents a degree of fitting of the joint distribution of the second information and the data set of the plurality of variables. The difference between the second input flow and the first reward value is used to construct a loss function, and the first neural network, the second neural network, and the third neural network are updated according to the loss function.

[0414] In the embodiments of the present application, the inflow and outflow of the intermediate nodes (non-starting node S0 and non-terminating node S f ) are calculated by using the neural network; for S0, only the outflow of the node is calculated; for S f , only the inflow is calculated, and S f corresponds to the G calculation reward value as the reward value of the terminating node. The objective function of the invention is to satisfy the flow matching constraint, so that the inflow of the node is equal to the outflow. The formula can be as follows:

[0415]

[0416] For each node, the difference between the inflow value and the outflow value or the reward value can be calculated, and then the total loss is calculated by summing all nodes.

[0417] The inflow of the node can be:

[0418] ∑ s,a:T(s,a)=s′ F θ (s,a);The method is to find all parent nodes of the node and their actions, which are collectively transmitted to the neural network for calculation.

[0419] The outflow of the node can be:

[0420] ∏a′∈Α(s′)∑ a′∈Α(s′) F θ (s′,a′);

[0421] The method is to transmit the node to the neural network for calculation, and there is an indicator function here to determine whether the node is an intermediate node.

[0422] The reward value of the termination node can be: Πs'∈s f R(s').

[0423] Wherein the definition of the reward function can be:

[0424]

[0425]

[0426] In a possible implementation, the Bayesian information criterion can be used to determine the fitting degree of the model, and the exponential function is used to avoid the influence of negative values on the inflow equal to outflow constraint.

[0427] It should be understood that after it is determined that the second information satisfies the condition of the termination node, the complete connected causal result corresponding to the second information can be obtained through the closure matrix, and the reward value thereof is calculated based on the complete connected causal structure.

[0428] In the foregoing manner, a loss can be determined in each iteration, and the generative flow model is updated based on the loss. After multiple rounds of iterative updating, the generative flow model can have an accurate identification capability for the causal relationship of multiple variables, and thus a relatively accurate causal relationship between the multiple variables can be obtained.

[0429] Next, a method of predicting a causal relationship based on a target constraint is introduced by combining a specific example:

[0430] Taking the target constraint as a mask matrix, refer to Figure 14 , Figure 14 The single-step update framework of the embodiment is shown, the reward value of the termination node is calculated, and the inflow and outflow values of the intermediate node are calculated. In the example, the judgment condition of the termination node is that a unique topological sequence between all nodes is identified.

[0431] First, S i is input into the network of the generative flow model, and is transmitted into the neural network that has been masked by the mask matrix through embedding, and then an action a is sampled to make another position of the adjacency matrix marked as 1, and one state transition is completed. For S i+1 , all parent nodes S p of S i+1 are found, and the action set of the parent nodes is transmitted into the neural network together with the embedding of the parent nodes and the action set (a1,…,a n ) to calculate the inflow F(S i+1 →S p ) of the node S i+1 .

[0432] Meanwhile, the mask matrix and the adjacency matrix of the transitive closure need to be updated, see Figure 14 the right side. In this update, if it is found that the adjacency matrix of the transitive closure can already help to identify a unique topological sequence, the termination node is reached, and the transitive closure with the diagonal elements masked is returned as S f The reward value is calculated; if the sequence cannot be identified, sampling is continued, and in the judgment branch, the left side is walked, and S i+1 is embedded and passed into the neural network to calculate the outflow F(S i+1 ) of the node S i+1 → S c . In the network, the loss is calculated by using the flow matching constraint.

[0433] 2. Not based on target constraints

[0434] In a possible implementation, when the first neural network makes a prediction of the second information based on the first information, the target constraint that can guarantee that the second information is a directed acyclic graph can not be used, and therefore, the second information can become a directed cyclic graph or other graphs that do not meet the requirements.

[0435] In a possible implementation, when the first neural network makes a prediction of the second information based on the first information, a data pair with a causal relationship can be predicted from a variable pair without a causal relationship indicated in the first information to obtain the second information. If the second information is a directed acyclic graph and the termination node condition in the above target constraint is not met, the first neural network can continue to make a causal relationship prediction of multiple variables based on the second information.

[0436] If the second information is a directed cyclic graph or other graphs that do not meet the requirements, it can be considered that the second information is a termination node to end the current iteration, and the generated flow model is updated through the constructed loss.

[0437] For the intermediate node, taking the first information as an example, in a possible implementation, a plurality of third information can be acquired according to the first information, wherein the first information indicates that there is a causal relationship between M variable pairs in the plurality of variables, and each third information indicates that there is a causal relationship between part of group variables in the M variable pairs; the M is a positive integer greater than 1; a first input flow of the plurality of third information is obtained through a second neural network in the generative flow model according to the plurality of third information, a second reward value of the first information is obtained according to the first information, and the second reward value represents a degree of fitting of a joint distribution of the first information and a data set of the plurality of variables; a first output flow of the first information is obtained through a third neural network in the generative flow model according to the first information; and a sum of the first output flow and the second reward value is used to construct a loss function together with the first input flow, and then the first neural network, the second neural network and the third neural network can be updated according to the loss function.

[0438] For the terminal node, taking the second information as an example, in a possible implementation, a plurality of fourth information can be acquired according to the second information, wherein the third information indicates that there is a causal relationship between N variable pairs in the plurality of variables, and each fourth information indicates that there is a causal relationship between part of group variables in the N variable pairs; the N is a positive integer greater than 1; a second input flow of the plurality of fourth information is obtained through a second neural network in the generative flow model according to the plurality of fourth information; a first reward value of the second information is obtained according to the second information, and the first reward value represents a degree of fitting of a joint distribution of the second information and a data set of the plurality of variables; and a difference degree of the second input flow and the first reward value is used to construct a loss function; the first neural network, the second neural network and the third neural network are updated according to the loss function.

[0439] The difference between the constraint-free and the constraint-based is the judgment condition of the terminal node, the reward value calculation of the state node and the single-step update framework. As shown in Figure 15 , similar to the dense reward in reinforcement learning, the framework calculates the reward value and the outflow for each generated DAG, and the judgment condition of the terminal node becomes: generate a looped graph, for example Figure 15 , the red position in the fourth column matrix. Therefore, the reward value of each intermediate node state can be calculated in this embodiment, and the constraint of the intermediate node of the flow matching model is also changed to: inflow value = outflow value + reward value.

[0440] Figure 16The single-step update framework of the embodiment not based on target constraints is shown, S as state first enters the network (such as MLP) of the generation flow model, a action is sampled, and then it is judged whether a is in the valid action set, if not, all parent nodes S of a are directly found p and the action set of the parent nodes is transferred to S, which is collectively transmitted into the inflow of the neural network calculation node S, and the reward value of S is calculated by the reward function; if the action is valid, a state transition S→S` is completed. The reward value, inflow and outflow of S` are calculated in the same way. Finally, the loss function loss is calculated by the flow matching target function.

[0441] Embodiments of the present application provide a causal relationship determination method, which comprises: acquiring first information of a plurality of variables, the first information indicating a causal relationship between the plurality of variables; and predicting second information of the plurality of variables by a first neural network in a generation flow model according to the first information, wherein the second information indicates that a first causal relationship exists between a first variable and a second variable in the plurality of variables; and the first information indicates that the first causal relationship does not exist 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 in a sequence generation manner, and with iterative update of the generation flow model, the generation flow model can have the ability to generate an optimal causal relationship sequence, without the need to sample a large number of causal sequences to select an optimal one from the plurality of causal sequences, thereby reducing the computing power cost and improving the convergence speed of the model.

[0442] Embodiments of the present application also provide a causal relationship determination method, which comprises:

[0443] acquiring first information of a plurality of variables, the first information indicating a causal relationship between the plurality of variables, the variables comprising an operation type of a user and at least one target variable, the target variable being at least one of:

[0444] attribute information of an article and attribute information of the user;

[0445] predicting second information of the plurality of variables by a first neural network in a generation flow model according to the first information, wherein

[0446] the second information indicates that a first causal relationship exists between a first variable and a second variable in the plurality of variables; and the first information indicates that the first causal relationship does not exist between the first variable and the second variable, and the first variable and the second variable are different.

[0447] In a possible implementation, the attribute information of the user comprises at least one of the following: gender, age, occupation, income, hobby and education level.

[0448] In a possible implementation, the attribute information of the item includes at least one of the following: an item name, a developer, an installation package size, a category, and a degree of praise.

[0449] The attribute information of the user can be at least one of a user preference feature, a gender, an age, an occupation, an income, a hobby, and an education level. The gender can be male or female, the age can be a number between 0 and 100, the occupation can be a teacher, a programmer, a chef, or the like, the hobby can be basketball, tennis, running, or the like, and the education level can be primary school, junior high school, high school, college, or the like. The application does not limit the specific type of the attribute information of the user.

[0450] The item can be a physical item or a virtual item, for example, an APP, an audio / video, a webpage, news information, or the like. The attribute information of the item can be at least one of an item name, a developer, an installation package size, a category, and a degree of praise. For example, for an application, the category of the item can be a chat type, a running type game, an office type, or the like, and the degree of praise can be a score or a comment for the item. The application does not limit the specific type of the attribute information of the item.

[0451] The operation type can be a behavior operation type of the user for the item. On a network platform and an application, the user often has various interaction forms (that is, various operation types) with the item, such as browsing, clicking, adding to a shopping cart, and purchasing on an e-commerce platform.

[0452] It should be understood that the causal relationship between the plurality of variables ultimately obtained by generating the flow model can include a causal relationship between at least one target variable and the operation type of the user.

[0453] Other descriptions of the embodiments of the application can refer to the causal relationship determination method in the above embodiments, which are not described herein.

[0454] The embodiments of the application further provide a causal relationship determination method, which includes:

[0455] Obtaining 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 a target object; and

[0456] The target object is a chip, and the attribute information is local segment or fault information of the chip; or

[0457] The target object is a node of a communication network, and the target variable is a key performance indicator (KPI) of a network element, running data, or alarm information.

[0458] According to the first information, second information of the plurality of variables is predicted by generating a first neural network in a flow model; wherein

[0459] The second information indicates that there is a first causal relationship between a first variable and a second variable in the plurality of variables; and 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.

[0460] Wherein, the local segment of the chip can be a local area of the chip surface, and the plurality of local segments can be a plurality of local areas of the chip surface, and the area size and the external contour shape of any two local segments in the plurality of local segments are the same, wherein the area size between the local segments can be understood as the area of the region where the local segment is located being the same, and the external contour shape between the local segments can be understood as the external contour shape of the region where the local segment is located being the same, for example, both being a square or a rectangle with consistent length-width ratio, etc.; wherein, in a possible implementation, the area of each local segment in the plurality of local segments is within a preset range, and the area of each local segment cannot be too large or too small, and the area size of the local segment can be related to the size of the chip, and the larger the size of the chip is, the larger the area of the local segment is, for example, the area of the local segment and the area of the chip can maintain a certain proportion, and the area size of the local segment can also be related to the spacing length between the basic units on the chip, for example, the side length of the local segment can be set to a preset multiple of the spacing length between the basic units (for example, the copper-polygon area on the chip), such as 3 times, 4 times, 5 times, etc. Wherein, each local segment can include arranged devices and / or connection lines between the devices, and in the embodiments of the present application, the local segment can be image information or other information capable of expressing the arrangement of devices or the structure of connection lines on the local segment, and the structure characteristics of the local segment can be uniquely determined based on the information;

[0461] Wherein, the fault information of the chip can include the number of occurrences of each local segment in the diagnostic report; or, the probability of each local segment causing the fault chip to appear chip failure, etc.

[0462] Wherein, the KPI can be used to measure the running state of the network element in the communication network. Under normal circumstances, the abnormality detection device will collect the observation data of each KPI at different times.

[0463] Other descriptions of the embodiments of the present application can refer to the causal relationship determination method in the above embodiments, which will not be described here.

[0464] Referring to Figure 17 , Figure 17A structure of a cause-effect relationship determination apparatus provided by an embodiment of the present application is shown in the figure. The apparatus 1700 comprises:

[0465] An obtaining module 1701 is configured to obtain first information of a plurality of variables, the first information indicating a cause-effect relationship between the plurality of variables.

[0466] The specific description of the obtaining module 1701 can refer to the description of step 701 in the above embodiment, which is not repeated here.

[0467] A cause-effect prediction module 1702 is configured to predict second information of the plurality of variables by generating a first neural network in a generative flow model according to the first information, wherein

[0468] The second information indicates that there is a first cause-effect relationship between a first variable and a second variable in the plurality of variables; the first information indicates that there is no first cause-effect relationship between the first variable and the second variable, and the first variable and the second variable are different.

[0469] The specific description of the cause-effect prediction module 1702 can refer to the description of step 702 in the above embodiment, which is not repeated here.

[0470] In a possible implementation, the first information indicates that there is a cause-effect relationship between X variable pairs in the plurality of variables, and the second information indicates that there is a cause-effect relationship between X+1 variable pairs, wherein the X+1 variable pairs include the X variable pairs and a variable pair composed of the first variable and the second variable.

[0471] In a possible implementation, each of the variables is one of the following:

[0472] A feature dimension of image data, a feature dimension of text data, a feature dimension of audio data, and a feature dimension of video data.

[0473] In a possible implementation, the apparatus further comprises:

[0474] A model updating module 1703 is configured to obtain a first input flow of the first information by a second neural network in the generative flow model according to the first information.

[0475] Obtain a first output flow of the first information by a third neural network in the generative flow model according to the first information, wherein the difference between the first input flow and the first output flow is used to obtain a loss function.

[0476] Update the first neural network, the second neural network, and the third neural network according to the loss function.

[0477] In a possible implementation, the model updating module 1703 is specifically configured to:

[0478] obtain a plurality of third information according to the first information, wherein the first information indicates that there is a causal relationship between variables in M variable pairs, each of the third information indicates that there is a causal relationship between variables in part of the M variable pairs; the M is a positive integer greater than 1;

[0479] obtain a first input flow of the first information by using a second neural network in the generative flow model according to the plurality of third information.

[0480] In a possible implementation, the part of the variable pairs is M-1 of the M variable pairs.

[0481] In a possible implementation, the apparatus further includes:

[0482] the model updating module 1703 is configured to obtain a second reward value of the first information according to the first information, the second reward value representing a degree of fitting of the first information to a joint distribution of the data set of the plurality of variables;

[0483] the difference between the first input flow and the first output flow is used to construct a loss function, including:

[0484] the sum of the first output flow and the second reward value and the first input flow are used to construct a loss function.

[0485] In a possible implementation, the apparatus further includes:

[0486] the model updating module 1703 is configured to obtain a second input flow of the second information by using a second neural network in the generative flow model;

[0487] obtain a first reward value of the second information by using a third neural network in the generative flow model according to the second information; wherein the difference between the second input flow and the first reward value is used to construct a loss function;

[0488] update the first neural network, the second neural network, and the third neural network according to the loss function.

[0489] In a possible implementation, the obtaining, by using the second neural network in the generative flow model, of the second input flow of the second information according to the second information includes:

[0490] According to the first information, a plurality of fourth information is obtained, wherein the second information indicates that there is a causal relationship between variables in N variable pairs, each fourth information indicates that there is a causal relationship between variables in part of the N variable pairs; N is a positive integer greater than 1;

[0491] According to the plurality of fourth information, a second input flow of the second information is obtained through a second neural network in the generation flow model.

[0492] In a possible implementation, the model updating module 1703 is further configured to:

[0493] Based on the second information indicating that there is a causal relationship between any one variable and at least one variable in the plurality of variables, triggering the step of obtaining the first reward value of the second information according to the second information.

[0494] In a possible implementation, the second information corresponds to a first graph, each variable corresponds to a node in the first graph, and a node corresponding to a variable as a dependent variable in the second information points to a node corresponding to a variable as a dependent variable. The model updating module 1703 is further configured to:

[0495] Based on the first graph being a directed cyclic graph, triggering the step of obtaining the first reward value of the second information according to the second information.

[0496] In a possible implementation, the apparatus further includes:

[0497] A constraint obtaining module configured to obtain a target constraint according to the first information, wherein the target constraint is used to constrain a plurality of variable pairs in the second information in which there is no causal relationship;

[0498] The step of predicting the second information of the plurality of variables according to the first information through a first neural network in the generation flow model includes:

[0499] The step of predicting the second information of the plurality of variables according to the first information through a first neural network in the generation flow model includes:

[0500] In a possible implementation, the second information corresponds to a first graph, each variable corresponds to a node in the first graph, and a node corresponding to a variable as a dependent variable in the second information points to a node corresponding to a variable as a dependent variable. The target constraint is used to constrain the first graph to be a directed acyclic graph.

[0501] In a possible implementation, the plurality of variable pairs includes a target variable pair, and the target variable pair is composed of a third variable and a fourth variable.

[0502] In a case where the first information indicates that the third variable is a dependent variable of the fourth variable and the fourth variable is a result variable of the third variable, the target constraint restricts the second information from indicating that the third variable is not a result variable of the fourth variable and the fourth variable is not a dependent variable of the third variable; or,

[0503] In a case where the third variable and the fourth variable are the same, the target constraint restricts the second information from indicating that there is no causal relationship between the third variable and the fourth variable.

[0504] In a possible implementation, the causal prediction module is specifically configured to:

[0505] According to the first information, a first neural network in a flow model is generated to obtain a probability that there is a causal relationship between each variable pair in the plurality of variable pairs.

[0506] Based on the probability that the variable pair composed of the first variable and the second variable in the plurality of variable pairs has the first causal relationship being the highest, the second information is obtained.

[0507] Embodiments of the present application also provide a causal relationship determination apparatus, and the apparatus comprises:

[0508] An acquisition module is configured to acquire first information of a plurality of variables, the first information indicating a causal relationship between the plurality of variables, the variables comprising an operation type of a user and at least one target variable, the target variable being at least one of:

[0509] attribute information of an item and attribute information of the user;

[0510] A causal prediction module is configured to predict, according to the first information, second information of the plurality of variables by generating a first neural network in a flow model; wherein

[0511] The second information indicates that there is a first causal relationship between a first variable and a second variable in 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.

[0512] In a possible implementation, the attribute information of the user comprises at least one of the following: gender, age, occupation, income, hobby, and education level.

[0513] In a possible implementation, the attribute information of the item comprises at least one of the following: item name, developer, installation package size, category, and praise degree.

[0514] In a possible implementation, the first information indicates that there is a causal relationship between X variable pairs in the plurality of variable pairs, and the second information indicates that there is a causal relationship between X+1 variable pairs, where the X+1 variable pairs include the X variable pairs and a variable pair composed of the first variable and the second variable.

[0515] In a possible implementation, each of the variables is one of the following:

[0516] one feature dimension of image data, one feature dimension of text data, one feature dimension of audio data, one feature dimension of video data.

[0517] In a possible implementation, the apparatus further includes:

[0518] a model updating module, configured to obtain, according to the first information, first input traffic of the first information through a second neural network in the generative flow model;

[0519] obtain, according to the first information, first output traffic of the first information through a third neural network in the generative flow model, where a difference degree between the first input traffic and the first output traffic is used to obtain a loss function;

[0520] update the first neural network, the second neural network, and the third neural network according to the loss function.

[0521] In a possible implementation, the model updating module is specifically configured to:

[0522] obtain a plurality of third information according to the first information, where the first information indicates that there is a causal relationship between variables of M variable pairs, each of the third information indicates that there is a causal relationship between variables of part of the M variable pairs, and M is a positive integer greater than 1;

[0523] obtain, according to the plurality of third information, first input traffic of the first information through a second neural network in the generative flow model.

[0524] In a possible implementation, the part of the variable pairs are M-1 variable pairs in the M variable pairs.

[0525] In a possible implementation, the apparatus further includes:

[0526] a model updating module, configured to obtain, according to the first information, a second reward value of the first information, where the second reward value represents a goodness of fit of the first information and a joint distribution of a data set of the plurality of variables;

[0527] The difference between the first input flow and the first output flow is used to construct a loss function, including:

[0528] The sum of the first output flow and the second reward value is used to construct a loss function with the first input flow.

[0529] In a possible implementation, the apparatus further includes:

[0530] a model updating module configured to obtain, according to the second information, a second input flow of the second information by a second neural network in the generative flow model;

[0531] obtain, according to the second information, a first reward value of the second information by a third neural network in the generative flow model; wherein the difference between the second input flow and the first reward value is used to construct a loss function;

[0532] update the first neural network, the second neural network, and the third neural network according to the loss function.

[0533] In a possible implementation, the obtaining, according to the second information, a second input flow of the second information by a second neural network in the generative flow model includes:

[0534] obtain a plurality of fourth information according to the first information, wherein the second information indicates that there is a causal relationship between variables in N variable pairs, each fourth information indicates that there is a causal relationship between variables in part of the N variable pairs; and N is a positive integer greater than 1;

[0535] obtain, according to the plurality of fourth information, a second input flow of the second information by a second neural network in the generative flow model.

[0536] In a possible implementation, the model updating module is further configured to:

[0537] trigger the step of obtaining, according to the second information, a first reward value of the second information, based on the second information indicating that there is a causal relationship between any one variable and at least one variable in the plurality of variables.

[0538] In a possible implementation, the second information corresponds to a first graph, each variable corresponds to a node in the first graph, and a variable corresponding to a node as a dependent variable in the second information points to a variable corresponding to a node as a dependent variable; the model updating module is further configured to:

[0539] trigger the step of obtaining, according to the second information, a first reward value of the second information, based on the first graph being a directed cyclic graph.

[0540] In a possible implementation, the apparatus further includes:

[0541] a constraint obtaining module configured to obtain a target constraint according to the first information, wherein the target constraint is used to constrain a plurality of variable pairs in the second information that do not have a causal relationship;

[0542] the predicting the second information of the plurality of variables according to the first information by generating a first neural network in a flow model includes:

[0543] the predicting the second information of the plurality of variables according to the first information and the target constraint by generating a first neural network in a flow model.

[0544] In a possible implementation, the second information corresponds to a first graph, each of the variable pairs corresponds to a node in the first graph, and a node corresponding to a variable that is a dependent variable in the second information points to a node corresponding to a variable that is a cause variable; and the target constraint is used to constrain the first graph to be a directed acyclic graph.

[0545] In a possible implementation, the plurality of variable pairs includes a target variable pair, and the target variable pair is composed of a third variable and a fourth variable.

[0546] in a case where the first information indicates that the third variable is a cause variable of the fourth variable and the fourth variable is a cause variable of the third variable, the target constraint constrains the second information to indicate that the third variable is not a cause variable of the fourth variable and the fourth variable is not a cause variable of the third variable; or

[0547] in a case where the third variable and the fourth variable are the same, the target constraint constrains the second information to indicate that there is no causal relationship between the third variable and the fourth variable.

[0548] In a possible implementation, the causal prediction module is specifically configured to:

[0549] obtain, according to the first information, a probability that each of the plurality of variable pairs has a causal relationship by generating a first neural network in a flow model;

[0550] obtain the second information based on the probability that the variable pair composed of the first variable and the second variable in the plurality of variable pairs has the first causal relationship being the highest.

[0551] Embodiments of the present application further provide a causal relationship determination apparatus, the apparatus comprising:

[0552] An acquisition module is configured to acquire 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 a target object; wherein

[0553] The target object is a chip, and the attribute information is local segment or fault information of the chip; or

[0554] The target object is a node of a communication network, and the target variable is a key performance indicator (KPI), operation data or alarm information of a network element;

[0555] A causal prediction module is configured to predict second information of the plurality of variables by generating a first neural network in a generative flow model according to the first information; wherein

[0556] The second information indicates that there is a first causal relationship between a first variable and a second variable in 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.

[0557] In a possible implementation, the first information indicates that there is a causal relationship between X variable pairs in the plurality of variables, and the second information indicates that there is a causal relationship between X+1 variable pairs, wherein the X+1 variable pairs include the X variable pairs and a variable pair composed of the first variable and the second variable.

[0558] In a possible implementation, each of the variables is one of the following:

[0559] A feature dimension of image data, a feature dimension of text data, a feature dimension of audio data, and a feature dimension of video data.

[0560] In a possible implementation, the apparatus further includes:

[0561] A model update module is configured to obtain a first input flow of the first information by a second neural network in the generative flow model according to the first information;

[0562] Obtain a first output flow of the first information by a third neural network in the generative flow model according to the first information; wherein a difference degree between the first input flow and the first output flow is used to obtain a loss function;

[0563] Update the first neural network, the second neural network and the third neural network according to the loss function.

[0564] In a possible implementation, the model update module is specifically configured to:

[0565] According to the first information, a plurality of third information is obtained, wherein the first information indicates that there is a causal relationship between variables of M variable pairs, each of the third information indicates that there is a causal relationship between variables of part of the M variable pairs; the M is a positive integer greater than 1;

[0566] According to the plurality of third information, a first input flow of the first information is obtained by a second neural network in the generative flow model.

[0567] In a possible implementation, the part of the variable pairs is M-1 of the M variable pairs.

[0568] In a possible implementation, the apparatus further includes:

[0569] A model updating module is configured to obtain a second reward value of the first information according to the first information, the second reward value representing a degree of fitting of a joint distribution of the first information and a data set of the plurality of variables;

[0570] The difference between the first input flow and the first output flow is used to construct a loss function, including:

[0571] The sum of the first output flow and the second reward value and the first input flow are used to construct a loss function.

[0572] In a possible implementation, the apparatus further includes:

[0573] A model updating module is configured to obtain a second input flow of the second information by a second neural network in the generative flow model.

[0574] According to the second information, a first reward value of the second information is obtained by a third neural network in the generative flow model; wherein the difference between the second input flow and the first reward value is used to construct a loss function.

[0575] According to the loss function, the first neural network, the second neural network and the third neural network are updated.

[0576] In a possible implementation, the obtaining, according to the second information, of the second input flow of the second information by the second neural network in the generative flow model includes:

[0577] According to the first information, a plurality of fourth information is obtained, wherein the second information indicates that there is a causal relationship between variables of N variable pairs, each of the fourth information indicates that there is a causal relationship between variables of part of the N variable pairs; the N is a positive integer greater than 1;

[0578] According to the plurality of fourth information, a second input flow of the second information is obtained through a second neural network in the generation flow model.

[0579] In a possible implementation, the model updating module is further configured to:

[0580] based on the second information indicating that there is a causal relationship between any one of the plurality of variables and at least one variable, trigger the step of obtaining the first reward value of the second information according to the second information.

[0581] In a possible implementation, the second information corresponds to a first graph, each of the variables corresponds to a node in the first graph, and a node corresponding to a variable as a dependent variable in the second information points to a node corresponding to a variable as a dependent variable. The model updating module is further configured to:

[0582] based on the first graph being a directed cyclic graph, trigger the step of obtaining the first reward value of the second information according to the second information.

[0583] In a possible implementation, the apparatus further includes:

[0584] a constraint obtaining module configured to obtain a target constraint according to the first information, wherein the target constraint is used to constrain a plurality of variable pairs in the second information that do not have a causal relationship.

[0585] the step of predicting the second information of the plurality of variables according to the first information through a first neural network in the generation flow model includes:

[0586] the step of predicting the second information of the plurality of variables according to the first information through a first neural network in the generation flow model includes:

[0587] In a possible implementation, the second information corresponds to a first graph, each of the variables corresponds to a node in the first graph, and a node corresponding to a variable as a dependent variable in the second information points to a node corresponding to a variable as a dependent variable. The target constraint is used to constrain the first graph to be a directed acyclic graph.

[0588] In a possible implementation, 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.

[0589] in a case where the first information indicates that the third variable is a dependent variable of the fourth variable and the fourth variable is a dependent variable of the third variable, 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 dependent variable of the third variable.

[0590] In a case where the third variable and the fourth variable are identical, the target constraint constrains the second information to indicate that there is no causal relationship between the third variable and the fourth variable.

[0591] In a possible implementation, the causal prediction module is specifically configured to:

[0592] According to the first information, a first neural network in a flow model is generated to obtain a probability that there is a causal relationship between each variable pair in the plurality of variable pairs;

[0593] Based on the fact that the probability that there is the first causal relationship between the variable pair composed of the first variable and the second variable in the plurality of variable pairs is the highest, the second information is obtained.

[0594] Next, an execution device provided by an embodiment of the present application is introduced. Please refer to Figure 18 , Figure 18 A structural schematic diagram of the execution device provided by the embodiment of the present application is shown in FIG. 18. The execution device 1800 can be a mobile phone, a tablet, a notebook computer, a smart wearable device, etc., which is not limited here. Specifically, the execution device 1800 includes a receiver 1801, a transmitter 1802, a processor 1803 and a memory 1804 (wherein the number of processors 1803 in the execution device 1800 can be one or more, and one processor is taken as an example in the embodiment). Figure 18 The processor 1803 can include an application processor 18031 and a communication processor 18032. In some embodiments of the present application, the receiver 1801, the transmitter 1802, the processor 1803 and the memory 1804 can be connected through a bus or other means.

[0595] The memory 1804 can include a read-only memory and a random access memory, and provide the processor 1803 with instructions and data. A part of the memory 1804 can also include a non-volatile random access memory (NVRAM). The memory 1804 stores processor and operation instructions, executable modules or data structures, or subsets thereof, or expanded sets thereof, wherein the operation instructions can include various operation instructions for implementing various operations.

[0596] The processor 1803 controls the operation of the execution device. In a specific application, various components of the execution device are coupled together through a bus system, which can include a data bus, a power supply bus, a control bus and a state signal bus, etc. However, for the sake of clarity, all kinds of buses are referred to as a bus system in the figure.

[0597] The method disclosed in the embodiments of the present application can be applied to the processor 1803 or implemented by the processor 1803. The processor 1803 can be an integrated circuit chip having a signal processing capability. In the implementation process, the steps of the above method can be completed by hardware integrated logic circuits in the processor 1803 or by instructions in the form of software. The processor 1803 described above can be a general processor, a digital signal processor (DSP), a microprocessor or a microcontroller. It can further include an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The processor 1803 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general processor can be a microprocessor or the processor can also be any conventional processor or the like. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the storage 1804, and the processor 1803 reads the information in the storage 1804 and combines the hardware to complete the steps of the above method.

[0598] The receiver 1801 can be used to receive input digital or character information, and generate signal input related to the relevant settings and function control of the execution device. The transmitter 1802 can be used to output digital or character information; the transmitter 1802 can also be used to send instructions to the disk group to modify the data in the disk group.

[0599] In an embodiment of the present application, in one case, the processor 1803 is configured to execute Figure 7 the steps of the causality determination method in the corresponding embodiment.

[0600] The embodiments of the present application also provide a server, please refer to Figure 19 , Figure 19Fig. 1 is a schematic diagram of a structure of a server provided in an embodiment of the present application. Specifically, the server 1900 is implemented by one or more servers. The server 1900 can be quite different due to different configurations or performances, and can include one or more central processing units (CPUs) 1919 (for example, one or more processors) and a memory 1932, and one or more storage media 1930 (for example, one or more mass storage devices) storing application programs 1942 or data 1944. The memory 1932 and the storage media 1930 can be temporary storage or persistent storage. The programs stored in the storage media 1930 can include one or more modules (not shown in the figure), each of which can include a series of instruction operations in the server. Further, the central processing unit 1919 can be configured to communicate with the storage media 1930 and execute the series of instruction operations in the storage media 1930 on the server 1900.

[0601] The server 1900 can also include one or more power supplies 1920, one or more wired or wireless network interfaces 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.

[0602] In an embodiment of the present application, the central processing unit 1919 is configured to perform the steps of the method for determining the causal relationship. Figure 7 corresponding embodiments.

[0603] In an embodiment of the present application, a computer program product including computer readable instructions is also provided, which, when running on a computer, causes the computer to perform the steps performed by the aforementioned execution device, or causes the computer to perform the steps performed by the aforementioned training device.

[0604] In an embodiment of the present application, a computer readable storage medium is also provided, which stores a program for signal processing, and when running on a computer, causes the computer to perform the steps performed by the aforementioned execution device, or causes the computer to perform the steps performed by the aforementioned training device.

[0605] The execution device, the training device or the terminal device provided by the embodiments of the present application can be a chip, which includes a processing unit, for example, a processor, and a communication unit, for example, an input / output interface, a pin or a circuit, etc. The processing unit can execute computer execution instructions stored in a storage unit, so that the chip in the execution device executes the causal relationship determination method described in the above embodiments, or so that the chip in the training device executes the steps related to model training in the above embodiments. Alternatively, the storage unit is a storage unit in the chip, such as a register, a cache, etc., and the storage unit can also be a storage unit outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.

[0606] Specifically, refer to Figure 20 , Figure 20 A structural schematic diagram of the chip provided by the embodiments of the present application is shown in FIG. 2. The chip can be a neural network processor NPU 2000, which is mounted on a host CPU (Host CPU) as a coprocessor and is assigned tasks by the Host CPU. The core part of the NPU is an operation circuit 2003, which extracts matrix data in a memory and performs multiplication operation under the control of a controller 2004.

[0607] In some implementations, the operation circuit 2003 internally includes a plurality of processing units (PEs). In some implementations, the operation circuit 2003 is a two-dimensional systolic array. The operation circuit 2003 can also be a one-dimensional systolic array or other electronic circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, the operation circuit 2003 is a general-purpose matrix processor.

[0608] For example, assuming that there are an input matrix A, a weight matrix B and an output matrix C. The operation circuit takes the corresponding data of the matrix B from the weight memory 2002 and caches it on each PE in the operation circuit. The operation circuit takes the matrix A data from the input memory 2001 and performs matrix operation with the matrix B, and the partial result or final result of the obtained matrix is saved in an accumulator 2008.

[0609] The unified memory 2006 is used to store input data and output data. The weight data is transferred to the weight memory 2002 through a Direct Memory Access Controller (DMAC) 2005. The input data is also transferred to the unified memory 2006 through the DMAC.

[0610] The BIU is a Bus Interface Unit 2010 for the interaction between the AXI bus and the DMAC and the instruction fetch buffer (IFB) 2009.

[0611] The BIU 2010 is used for the instruction fetch buffer 2009 to fetch instructions from the external memory, and is also used for the DMAC 2005 to fetch the original data of the input matrix A or the weight matrix B from the external memory.

[0612] The DMAC is mainly used to transfer the input data in the external memory DDR to the unified memory 2006, or to transfer the weight data to the weight memory 2002, or to transfer the input data to the input memory 2001.

[0613] The vector calculation unit 2007 includes a plurality of operation processing units, which further process the output of the operation circuit as needed, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / full connection layer network calculation in neural networks, such as batch normalization, pixel-level summation, upsampling of feature planes, etc.

[0614] In some implementations, the vector calculation unit 2007 can store the processed output vector to the unified memory 2006. For example, 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 planes extracted by the convolutional layer, and further, for example, a vector of accumulated values to generate activation values. In some implementations, the vector calculation unit 2007 generates normalized values, pixel-level summation values, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 2003, for example, for use in subsequent layers in the neural network.

[0615] The instruction fetch buffer 2009 connected to the controller 2004 is used to store instructions used by the controller 2004;

[0616] The unified memory 2006, the input memory 2001, the weight memory 2002, and the instruction memory 2009 are on-chip memories. The external memory is private to the NPU hardware architecture.

[0617] The processor mentioned in any of the above can be a general central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling execution of the above programs.

[0618] In addition, it should be noted that the above-described device embodiments are merely illustrative, and the units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e., they can be located in one place or distributed on multiple network units. Some or all of the modules can be selected to achieve the purpose of the embodiment according to actual needs. In addition, the device embodiments provided in the drawings of the present application indicate that there is a communication connection between the modules, which can be implemented as one or more communication buses or signal lines.

[0619] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and necessary general hardware, and of course can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure for implementing the same function can also be various, such as analog circuits, digital circuits, or special circuits. However, for the present application, software program implementation is a better embodiment. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including a plurality of instructions for making a computer device (which can be a personal computer, a training device, or a network device, etc.) execute the methods described in various embodiments of the present application.

[0620] In the above embodiments, all or part can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, it can be implemented in the form of a computer program product in whole or in part.

[0621] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, training device or data center to another website, computer, training device or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be stored by the computer or a data storage device such as a training device, a data center, etc. integrated with one or more available media sets. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc.

Claims

1. A cause-effect relationship determination method characterized by comprising: The method comprises: obtaining first information of a plurality of variables, the first information indicating a causal relationship between the plurality of variables, each of the variables being one of: a feature dimension of image data, a feature dimension of text data, a feature dimension of audio data, a feature dimension of video data; predicting, according to the first information, second information of the plurality of variables by a first neural network in a generative flow model; wherein the number of variable pairs having a causal relationship included in the second information is greater than the number of variable pairs having a causal relationship included in the first information; obtaining, according to the first information, a first input flow of the first information by a second neural network in the generative flow model, the first input flow indicating a probability of third information; wherein the third information is obtained according to the first information, the first information indicating that there is a causal relationship between variables in M variable pairs, and the third information indicating that there is a causal relationship between variables in part of the M variable pairs; the M is a positive integer greater than 1; obtaining, according to the first information, a first output flow of the first information by a third neural network in the generative flow model, the first output flow indicating a probability of the first information; wherein a difference degree between the first input flow and the first output flow is used to obtain a loss function; updating the first neural network, the second neural network and the third neural network according to the loss function.

2. The method of claim 1, wherein, The obtaining, according to the first information, of the first input flow of the first information by the second neural network in the generative flow model comprises: obtaining a plurality of the third information according to the first information; obtaining the first input flow of the first information by the second neural network in the generative flow model according to the plurality of the third information.

3. The method according to claim 1 or 2, characterized in that, The part of the variable pairs is M-1 variable pairs in the M variable pairs.

4. The method according to claim 1 or 2, characterized in that, The method further comprises: obtaining, according to the first information, a second reward value of the first information, the second reward value representing a goodness of fit of a joint distribution of the first information and a data set of the plurality of variables; The difference degree between the first input flow and the first output flow is used to construct a loss function, comprising: the sum of the first output flow and the second reward value and the first input flow are used to construct a loss function.

5. The method according to claim 1 or 2, characterized in that, The method further comprises: obtaining, according to the second information, a second input flow of the second information by the second neural network in the generative flow model, the second input flow indicating a probability of fourth information, wherein the fourth information is obtained according to the second information, the second information indicating that there is a causal relationship between variables in N variable pairs, and the fourth information indicating that there is a causal relationship between variables in part of the N variable pairs; the N is a positive integer greater than 1; obtaining, according to the second information, a first reward value of the second information by the third neural network in the generative flow model; wherein a difference degree 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.

6. The method of claim 5, wherein, According to the second information, a second input flow of the second information is obtained through a second neural network in the generative flow model, including: According to the second information, a plurality of fourth information is obtained; According to the plurality of fourth information, a second input flow of the second information is obtained through a second neural network in the generative flow model.

7. The method according to claim 1 or 2, characterized in that, The method further comprises: Based on the second information indicating that there is a causal relationship between any one of the plurality of variables and at least one variable, triggering the step of obtaining the first reward value of the second information according to the second information.

8. The method of claim 1 or 2, wherein, The second information corresponds to a first graph, each of the variables corresponds to a node in the first graph, and the node corresponding to the variable as the dependent variable in the second information points to the node corresponding to the variable as the independent variable; The method further comprises: Based on the first graph being a directed cyclic graph, triggering the step of obtaining the first reward value of the second information according to the second information.

9. The method of claim 1 or 2, wherein, The method further comprises: According to the first information, a target constraint is obtained; wherein the target constraint is used to constrain a plurality of variable pairs in the second information that do not have a causal relationship; According to the first information, a second information of the plurality of variables is predicted through a first neural network in the generative flow model, including: According to the first information and the target constraint, a second information of the plurality of variables is predicted through a first neural network in the generative flow model.

10. The method of claim 9, wherein, The second information corresponds to a first graph, each of the variables corresponds to a node in the first graph, and the node corresponding to the variable as the dependent variable in the second information points to the node corresponding to the variable as the independent variable; The target constraint is used to constrain the first graph to be a directed acyclic graph.

11. The method of claim 9, wherein, The plurality of variable pairs includes a target variable pair, which is composed of a third variable and a fourth variable; In the case where the first information indicates that the third variable is the independent variable of the fourth variable and the fourth variable is the dependent variable of the third variable, the target constraint restricts the second information to indicate that the third variable is not the dependent variable of the fourth variable and the fourth variable is not the independent variable of the third variable; Or, In the case where the third variable and the fourth variable are the same, the target constraint restricts the second information to indicate that there is no causal relationship between the third variable and the fourth variable.

12. The method of claim 1 or 2, wherein, According to the first information, a second information of the plurality of variables is predicted through a first neural network in the generative flow model, including: According to the first information, a probability that each variable pair in the plurality of variable pairs has a causal relationship is obtained through a first neural network in the generative flow model; Based on the probability that the variable pair composed of the first variable and the second variable in the plurality of variable pairs has the first causal relationship being the highest, the second information is obtained.

13. A cause-effect relationship determining apparatus characterized by comprising: The device comprises: The acquisition module is configured to acquire first information of a plurality of variables, the first information indicating a causal relationship between the plurality of variables, each of the variables being one of a feature dimension of image data, a feature dimension of text data, a feature dimension of audio data, and a feature dimension of video data. The causal prediction module is configured to predict second information of the plurality of variables by generating a first neural network in a generative flow model according to the first information, wherein a number of variable pairs having the causal relationship included in the second information is greater than a number of variable pairs having the causal relationship included in the first information. The model updating module is configured to obtain a first input flow of the first information by a second neural network in the generative flow model according to the first information, the first input flow indicating a probability of third information, wherein the third information is acquired according to the first information, the first information indicating that there is a causal relationship between variables of M variable pairs, the third information indicating that there is a causal relationship between variables of part of the M variable pairs, and the M is a positive integer greater than 1. The model updating module is configured to obtain a first output flow of the first information by a third neural network in the generative flow model according to the first information, the first output flow indicating a probability of the first information, wherein a difference between the first input flow and the first output flow is used to obtain a loss function. The model updating module is configured to update the first neural network, the second neural network, and the third neural network according to the loss function.

14. The apparatus of claim 13, wherein, The model updating module is configured to: acquire a plurality of the third information according to the first information; and obtain the first input flow of the first information by the second neural network in the generative flow model according to the plurality of the third information.

15. The apparatus of claim 13 or 14, wherein, The part of the variable pairs is M-1 variable pairs of the M variable pairs.

16. The apparatus of claim 13 or 14, wherein, The device further includes: The model updating module is configured to obtain a second reward value of the first information according to the first information, the second reward value representing a goodness of fit of a joint distribution of the first information and a data set of the plurality of variables. The difference between the first input flow and the first output flow is used to construct the 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.

17. The apparatus of claim 13 or 14, wherein, The device further includes: The model updating module is configured to obtain a second input flow of the second information by the second neural network in the generative flow model, the second input flow indicating a probability of fourth information, wherein the fourth information is acquired according to the second information, the second information indicating that there is a causal relationship between variables of N variable pairs, the fourth information indicating that there is a causal relationship between variables of part of the N variable pairs, and the N is a positive integer greater than 1. The model updating module is configured to obtain a first reward value of the second information by a third neural network in the generative flow model according to the second information, wherein a 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.

18. The apparatus of claim 17, wherein, According to the second information, a second input flow of the second information is obtained through a second neural network in the generative flow model, including: According to the second information, a plurality of fourth information is obtained; According to the plurality of fourth information, a second input flow of the second information is obtained through a second neural network in the generative flow model.

19. The apparatus of claim 13 or 14, wherein, The model updating module is further configured to: Based on the second information indicating that any one of the plurality of variables and at least one variable exist a causal relationship, triggering the step of obtaining the first reward value of the second information according to the second information.

20. The apparatus of claim 13 or 14, wherein, The second information corresponds to a first graph, each of the variables corresponds to a node in the first graph, and a node corresponding to a variable as a dependent variable in the second information points to a node corresponding to a variable as a dependent variable; the model updating module is further configured to: Based on the first graph being a directed cyclic graph, triggering the step of obtaining the first reward value of the second information according to the second information.

21. The apparatus of claim 13 or 14, wherein, The device further includes: A constraint obtaining module configured to obtain a target constraint according to the first information; wherein the target constraint is used to constrain a plurality of variable pairs in the second information that do not exist a causal relationship; According to the first information, a second information of the plurality of variables is predicted through a first neural network in a generative flow model, including: According to the first information and the target constraint, a second information of the plurality of variables is predicted through a first neural network in a generative flow model.

22. The apparatus of claim 21, wherein, The second information corresponds to a first graph, each of the variables corresponds to a node in the first graph, and a node corresponding to a variable as a dependent variable in the second information points to a node corresponding to a variable as a dependent variable; the target constraint is used to constrain the first graph to be a directed acyclic graph.

23. The apparatus of claim 21, wherein, The plurality of variable pairs includes a target variable pair composed of a third variable and a fourth variable; In a case where the first information indicates that the third variable is a dependent variable of the fourth variable and the fourth variable is a dependent variable of the third variable, the target constraint restricts 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 dependent variable of the third variable; Or, In a case where the third variable and the fourth variable are the same, the target constraint restricts the second information to indicate that there is no causal relationship between the third variable and the fourth variable.

24. The apparatus of claim 13 or 14, wherein, The causal prediction module is specifically configured to: According to the first information, a first neural network in a generative flow model is used to obtain a probability that each variable pair in the plurality of variable pairs exists a causal relationship; Based on a probability that a variable pair composed of a first variable and a second variable in the plurality of variable pairs exists a first causal relationship being the highest, the second information is obtained.

25. A causality determining apparatus characterized by comprising: The device includes a memory and a processor; the memory stores code, and the processor is configured to obtain the code and execute the method of any one of claims 1 to 12.

26. A computer-readable storage medium, characterized in that, computer readable instructions, which, when executed on a computer device, cause the computer device to perform the method of any one of claims 1 to 12.

27. A computer program product, characterised in that, computer readable instructions, which, when executed on a computer device, cause the computer device to perform the method of any one of claims 1 to 12.

Citation Information

Patent Citations

  • Information processing method and device, equipment and storage medium

    CN113469363A

  • Intelligent agent behavior interpretation method based on causal relationship inference

    CN114358247A