A method for constructing judicial causal Bayesian networks based on hierarchical additive noise model

By adopting a hierarchical additive noise model and variational autoencoder framework in judicial causal Bayesian network, the failure problem in identifying many-to-one causal relationships in the existing technology is solved, and more accurate and reliable causal relationship recognition is achieved. .

CN116432759BActive Publication Date: 2025-02-21BEIJING INST OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310405263.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-17
Publication Date
2025-02-21
Estimated Expiration
2043-04-17

AI Technical Summary

Technical Problem

The prior art has failures in identifying the causal relationship when multiple variables collectively affect one variable, especially methods based on additive noise models cannot accurately infer the causal relationship of many to one.

Method used

Using the judicial causal Bayesian network construction method based on hierarchical additive noise model, a causal undirected structure diagram is generated by preprocessing judicial data, and a variational autoencoder framework generalizes non-center nodes as intermediate variables, combining positive and negative Towards the causal recognition framework, learn the causal direction between variables in each sub-graph.

Benefits of technology

Effectively identifying and transforming the many-to-one causal relationship into an approximate one-to-one causal relationship, avoiding the combined effect of ignoring multiple causes and improving the accuracy and reliability of the causal Bayesian network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116432759B_ABST
    Figure CN116432759B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for constructing a judicial causal Bayesian network based on a hierarchical additive noise model, and belongs to the technical field of data mining. The causal Bayesian network skeleton is learned using pre-processed judicial data to obtain a causal undirected structure graph between judicial data samples; the causal undirected structure graph is traversed with the traversed variable as the center, all variables that have a direct dependency relationship with the traversed variable are extracted, and the causal undirected structure graph between judicial data samples is decomposed into multiple subgraphs; the non-central nodes in the multiple subgraphs are generalized as intermediate variables, the causal direction between the variables in each subgraph is learned, and the subgraph is restored to the causal undirected structure graph to obtain a judicial causal Bayesian network. The method of the present invention, in the process of converting a many-to-one causal relationship into an approximate one-to-one causal relationship, minimizes Z when learning the intermediate variable Z using a variational method to construct each X i The minimum error of , enables the model to take into account statistical correlation while satisfying the causal additive noise condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for constructing a judicial causal Bayesian network based on a hierarchical additive noise model, belonging to the technical field of data mining. The method utilizes a variational method and an additive noise model to realize causal relationship learning in judicial data, and assists in prison sentence prediction by modeling a causal Bayesian network of events in judicial cases, thereby providing decision support for judicial sentencing. Background Art

[0002] Bayesian network is a graphical model for modeling probabilistic reasoning, which has been widely used in judicial data analysis in recent years. Causal Bayesian network is a type of Bayesian network that focuses on representing and inferring causal relationships. Causal Bayesian network assumes that there is a causal relationship between variables, and describes the conditional probability dependency and causal relationship between variables through a probability model, which can be used to infer how the change of a variable affects the probability distribution of other variables. Causal Bayesian network can be used to predict future results or change variables to obtain desired results. Through causal Bayesian network, different variables and their causal relationships can be represented in a graphical way. The nodes in the graph are variables, and the edges between the nodes represent the causal relationship between them. In judicial data analysis, causal Bayesian network can be used to model the relationship between different variables, such as evidence, characteristics of criminals, crime types, etc., so as to predict the possible identity of criminals or crime types. In addition, causal Bayesian network can also be used for judgment prediction, evidence evaluation, witness credibility analysis and other aspects.

[0003] Causal Bayesian network learning algorithms can be divided into two categories: constraint-based causal Bayesian learning algorithms and causal Bayesian structural algorithms based on functional causal models.

[0004] Constrained causal Bayesian network learning algorithms use conditional independence between variables in the data to determine the existence of a specific structure. The most classic algorithms are the SGS algorithm, the PC algorithm, and the FCI algorithm. When the node order is unknown, the SGS algorithm selects an undirected complete graph as the initial network, and then eliminates redundant edges in the network through conditional independence tests, but it requires exponential conditional independence tests. The PC algorithm is an extension of the SGS algorithm. Compared with the SGS algorithm, the PC algorithm improves the method of searching for conditional variable subsets in the undirected graph determination process, thereby achieving better results in high-dimensional sparse causal relationships. However, the complexity of network structure learning is very high, and it depends on the order of variable processing. The order of variable processing seriously affects the accuracy of the final causal network. Based on the PC algorithm, Spirtes et al. proposed the FCI algorithm, and Colombo et al. improved the FCI and proposed the RFCI algorithm, which mainly uses the maximum ancestor graph to realize the discovery of causal relationships containing hidden variables. Reliable conditional independence assumptions are the core of constraint-based causal inference methods.

[0005] All of the above algorithms are based on the Markov assumption. Although they can discover the causal structure in the Bayesian network, these algorithms need to combine certain rules to infer the conditional independence relationship between causal analysis variables, and do not fully consider the data distribution of variables and some specific properties of data distribution caused by the causal mechanism between variables. At the same time, since the constraint-based method cannot give the direction of the edge in the Markov equivalence class, the number of Markov equivalence classes in the causal Bayesian network directly determines the application effect of the causal Bayesian network.

[0006] The causal Bayesian structural learning algorithm based on the functional causal model is based on the structural equation model. The structural equation model is a framework for multivariate analysis, which includes a variable set and an equation set. The variable set includes the observed random variable set and the unobserved implicit variable set, which corresponds to each node in the causal graph. The equation set represents the data generation mechanism between the variables, which corresponds to each edge in the causal graph. As a new research method, the functional causal model is mainly divided into two categories. One is the causal inference algorithm based on information entropy, which can obtain causal relationship inference results when there is little or no noise, but cannot process high-dimensional data. The other is the causal reasoning method based on the additive noise model. The causal reasoning method based on the additive noise model finds the statistical independence relationship between the noise term and the factor, thereby breaking the symmetric relationship between cause and effect, and then can identify the causal direction. Shohei et al. proposed the LiNGAM algorithm, which solves the problem of Markov equivalence class not being able to be identified in traditional structural learning, but the function model is linear and the noise distribution must be non-Gaussian noise. Hoyer et al. proposed the ANM algorithm based on LiNGAM, which solves the causal reasoning problem under nonlinear and Gaussian distribution, and has a wider range of applicable conditions. The proposed CANM algorithm solves the non-transferability based on the additive noise model and can effectively identify indirect causal relationships.

[0007] The above methods have made a lot of research in one-to-one causal reasoning, but they ignore the joint effect of multiple causes on the result when multiple variables jointly affect one variable. Even if each pair of data in this case where multiple variables jointly affect one variable follows the additive noise model, the previous additive noise model still cannot accurately infer it, so it loses reliability in testing and practical applications. How to solve many-to-one causal reasoning is the next key problem that the causal Bayesian structure learning algorithm based on the functional causal model needs to face. Summary of the invention

[0008] The technical problem solved by the present invention is: to overcome the shortcomings of the prior art, to propose a method for constructing a judicial causal Bayesian network based on a hierarchical additive noise model, based on the current causal Bayesian structure learning algorithm based on a functional causal model, to address the problem that the constraint-based causal Bayesian network learning algorithm cannot effectively identify Markov equivalence classes and the causal Bayesian structure learning algorithm based on a functional causal model cannot effectively discover many-to-one causal relationships, a method for constructing a judicial causal Bayesian network based on a hierarchical additive noise model is designed.

[0009] The technical solution of the present invention is:

[0010] A method for constructing a judicial causal Bayesian network based on a hierarchical additive noise model, the method comprising the following steps:

[0011] The first step is to use the pre-processed judicial data to perform causal Bayesian network skeleton learning to obtain the causal undirected structure graph between judicial data samples;

[0012] The second step is to traverse the causal undirected structure graph obtained in the first step with the traversed variable as the center, extract all variables that have a direct dependency relationship with the traversed variable, and decompose the causal undirected structure graph between judicial data samples into multiple subgraphs;

[0013] The third step is to generalize the non-central nodes in the multiple subgraphs obtained in the second step into intermediate variables, learn the causal direction between the variables in each subgraph, and restore the subgraph to a causal undirected structure graph to obtain a judicial causal Bayesian network.

[0014] In the first step, preprocessing judicial data refers to modifying the judicial data format, removing duplicate data, screening and extracting elements in the judicial data to form judicial data variables.

[0015] In the first step, the method for generating a causal undirected structure graph comprises the following steps:

[0016] (1) Generate a complete graph of judicial data variables. A complete graph means that there is an edge between each variable in the graph. Then calculate the correlation coefficient between the variables. Use a pre-set threshold to determine the correlation between the variables. By permuting the judicial data, check whether the variables still have correlation, and thus determine whether there is a conditional independence relationship between them. If there is a conditional independence relationship, it means that there is no dependency relationship between the two variables. Therefore, delete the edge between the two variables in the complete graph. If there is no conditional independence relationship, do not make any changes.

[0017] (2) Remove unnecessary edges. Unnecessary edges refer to those whose conditional independence relationship between variables remains unchanged after removal, thus obtaining a causal undirected structure graph.

[0018] In the third step, the non-central nodes in the multiple subgraphs obtained in the second step are generalized into intermediate variables using the variational autoencoder framework, and then the forward and reverse causal recognition framework of the hierarchical additive noise model is used to learn the causal direction between the variables in each subgraph, and finally the subgraph is restored to a causal undirected structure graph to obtain a causal Bayesian network.

[0019] The method of generalizing non-central nodes in a subgraph using the variational autoencoder framework is:

[0020] For the proposed subgraph, the many-to-one causal relationship is generalized to an approximate one-to-one relationship through the variational autoencoder framework to identify the causal relationship. This process is called a hierarchical additive noise model, where the central node is represented as Y, the non-central node is represented as X, and the generalized variable is Z. The constructed variational autoencoder is responsible for positively converting multiple non-central variables Xi It is converted into an intermediate variable Z to transform a set of many-to-one relationships into an approximate one-to-one relationship; then the many-to-one relationship is reversed to construct a reverse one-to-one relationship. Finally, the additive noise model is used to calculate the independence between the noise and the cause and to use the asymmetry to obtain the direction of the causal relationship.

[0021] Let the non-central variable X i (i=1,2,…n) are the multiple causes (X i →Y), n is the number of non-central variables, assuming that data generation follows nonlinear additive noise, then the many-to-one causal relationship in the hierarchical additive noise model is defined as:

[0022] Y=f(X1,X2,…,X n )+ε x

[0023] Given a joint distribution P(X1,X2,…,X n ,Y), each X i follows the same distribution and is similar to the residual ε x independent.

[0024] The method of converting to intermediate variables is: with the help of variational autoencoder, using q λ (Z|X) is used to approximate the posterior distribution, λ is a parameter, the posterior distribution is defined as a normal distribution, and KL divergence is introduced to measure the q used λ The similarity between (Z|X) and the true posterior distribution p(Z|X) is as follows

[0025] KL(q λ (Z|X)||p(Z|X))=E q [logq λ (Z|X)]-E q [logp(X,Z)]+logp(X)

[0026] Since logp(X) is a constant, the KL divergence is greater than or equal to 0, and the problem of minimizing the KL divergence is equivalent to maximizing the ELBO:

[0027]

[0028] Further decomposition of L(λ;X) is performed:

[0029]

[0030] For maximizing ELBO, that is, minimizing L1 and maximizing L2.

[0031] By building an encoder through a multi-layer perceptron to learn λ so that q λ(Z|X) and the true posterior distribution p(Z|X) are as similar as possible, where L1 obtains the best result through the loss function, and L2 uses reparameterization to make the obtained parameters differentiable and thus participate in the optimization process of the multi-layer perceptron. By combining the regularization term with the loss function of the reconstruction error, an encoder Encoder q is obtained using the variational autoencoder framework. λ (Z|X), and a decoder Decoderp θ (X|Z).

[0032] In the third step, the method for identifying many-to-one causal relationships by the intermediate variable Z generated by the non-central node in the subgraph is:

[0033] Obtain an encoder Encoderq through the variational autoencoder framework λ (Z|X) and a decoder Decoderp θ (X|Z), through Decoderp θ (X|Z) constructs the intermediate variable Z to form the relationship between X i The one-to-many causal relationship adds the intermediate variable Z to the causal inference model. In the many-to-one causal relationship, each cause X i can all pass through the intermediate variable Z through p θ (X i |Z) construction, p θ (X i |Z) as follows:

[0034] p θ (X|Z)=p θ (X1|Z)p θ (X2|Z)…p θ (X n |Z)

[0035] That is, there exists a function of the form such that X i By i (Z) means:

[0036] Then in the new many-to-one causal relationship, X i The formal representation of , Z, and Y is as follows:

[0037]

[0038] Therefore, the many-to-one causal inference problem is solved by X i →Y(i=1,2,…,n) is generalized into an approximate one-to-one reasoning problem Z→Y,X i →Y is transformed into Z→Y;

[0039] The hierarchical additive noise model will infer multiple X i→The problem of Y is transformed into the distribution problem of constructing intermediate variables, and constructing intermediate variables Z to achieve X i →Z→Y, that is

[0040] Y=f(X1,X2,…,X n )+ε X Transformed into Y = f Z (Z)+ε Z .

[0041] In the third step, the method of using the forward and reverse causal identification framework of the hierarchical additive noise model to learn the causal direction between the variables in each subgraph is:

[0042] Using Y = f Z (Z)+ε Z and X i =g i (Y)+ε i The obtained residual ε Z and ε i To obtain asymmetric relationships for causal identification;

[0043] In the forward causal relationship identification, the intermediate variable Z is constructed forwardly through the variational autoencoder to transform multiple factors X i (i=1,2,…,n) is converted into an intermediate variable Z, and the relationship between Z and factor Y is used to approximate X i The relationship between (i=1,2,…,n) and Y, and the residual ε for positive causal identification is obtained Z This part is mainly implemented through the variational autoencoder framework, and a fitting loss is added to construct a model that can represent X i (i=1,2,…,n) distributes the intermediate variable Z while making Z fit X i distribution, that is, there exists X i =f i (Z; ε i );

[0044] In reverse causal identification, construct Y about X i The fitting function g i (Y), obtain the corresponding reverse causal identification residual, for each X i =g i (Y)+ε i , and obtain the corresponding residual ε i ;

[0045] By testing the residual ε Z The independence relationship between Z and the residual ε i The independence relationship between X and Y is determined by using the causal direction discrimination method based on the additive noise model and taking advantage of asymmetry to identify each X. iThe causal direction with Y;

[0046] ε Z =f Z (Z)-Yε i =g i (Y)-X i

[0047] X i →Y HSIC(Z,ε Z ) <HSIC(Y,ε i )

[0048] Y→X i HSIC(Y,ε i ) <HSIC(Z,ε Z )

[0049] Finally, each X in the learned subgraph i The causal direction between and Y is restored to the original causal undirected structure graph, and the corresponding causal Bayesian network is obtained.

[0050] Beneficial Effects

[0051] (1) The method of the present invention, in the process of converting a many-to-one causal relationship into an approximate one-to-one causal relationship, minimizes Z to construct each X when learning the intermediate variable Z using a variational method i The minimum error enables the model to take into account statistical correlation while satisfying the causal additive noise condition, making up for the deficiency of variational autoencoder in causal relationship learning.

[0052] (2) In the method of the present invention, in the process of constructing the forward and reverse causal relationship identification, the hierarchical additive noise model converts multiple X i It is generalized into an approximate intermediate variable Z, which transforms the many-to-one causal relationship into an approximate one-to-one causal relationship, avoiding the problem that the additive noise model ignores the joint effect of multiple causes when transforming the many-to-one causal relationship into multiple one-to-one causal relationships. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A schematic diagram for converting a many-to-one causal relationship into an approximate one-to-one causal relationship;

[0054] Figure 2 For X i →Y is transformed into Z→Y schematic diagram;

[0055] Figure 3 Schematic diagram of forward causal relationship identification and reverse causal relationship identification. DETAILED DESCRIPTION

[0056] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0057] Example

[0058] A method for constructing a judicial causal Bayesian network based on a hierarchical additive noise model, the method comprising the following steps:

[0059] The first step is to use the pre-processed judicial data to perform causal Bayesian network skeleton learning to obtain the causal undirected structure graph between judicial data samples;

[0060] The second step is to traverse the causal undirected structure graph obtained in the first step, take the traversed variable as the center, extract all variables that have a direct dependency relationship with the traversed variable, and obtain a new subgraph, thereby decomposing the causal undirected structure graph between judicial data samples into multiple subgraphs;

[0061] In the third step, the variational autoencoder framework is used to generalize the non-central nodes in the multiple subgraphs obtained in the second step into intermediate variables. Then, the forward and reverse causal identification framework of the hierarchical additive noise model is used to learn the causal direction between the variables in each subgraph. Finally, the subgraph is restored to a causal undirected structure graph to obtain a causal Bayesian network.

[0062] In the first step, preprocessing judicial data refers to modifying the format of judicial data, removing duplicate data, screening and extracting elements in judicial data to form judicial data variables;

[0063] In the first step, the method for generating a causal undirected structure graph refers to using the PC algorithm to learn the dependency relationship between variables in the undirected graph learning of judicial data variables to obtain a graph in which the edges do not have directions. The specific steps include:

[0064] In the first stage, the conditional independence relationship between variables is evaluated. In this stage, the PC algorithm will determine whether there is a conditional independence relationship between variables based on the correlation and independence relationship between variables in the judicial data. Specifically, a complete graph of judicial data variables is generated. A complete graph means that there is an edge between each variable in the graph. Then, the correlation coefficient between the variables is calculated, and the correlation between the variables is determined using a pre-set threshold. By permuting the judicial data, it is checked whether the variables are still correlated, thereby determining whether there is a conditional independence relationship between them. If there is a conditional independence relationship, it means that there is no dependency relationship between the two variables, so the edge between the two variables is deleted in the complete graph; if there is no conditional independence relationship, no change is made;

[0065] In the second stage, unnecessary edges in the first stage are removed. In the first stage, some unnecessary edges may remain. These edges may be caused by misjudgment of the correlation between variables or insufficient data samples. Therefore, in the second stage, these unnecessary edges are removed. This stage mainly checks whether there are some edges. After removing these edges, the conditional independence relationship between variables can still remain unchanged. If such edges exist, they will be removed, thereby obtaining a more streamlined undirected graph structure, that is, the causal Bayesian network skeleton.

[0066] In the second step, the method of decomposing into multiple subgraphs is:

[0067] For the given pre-processed judicial data and causal Bayesian network skeleton, each variable is traversed, and all variables with direct dependencies are extracted with the traversed variable as the center to obtain a new subgraph, thereby decomposing the judicial data-like causal undirected structure graph into multiple subgraphs;

[0068] In the third step, the specific steps are: using the variational method to generate intermediate variables through generalization learning, identifying the causal reverse in each subgraph by comparing the independence between the variables and noise of the forward model and the reverse model, and finally, restoring each subgraph to a causal undirected structure graph;

[0069] In the third step, the method of generalizing the non-central nodes in the subgraph using the variational autoencoder framework is:

[0070] For the proposed subgraph, the many-to-one causal relationship is generalized to an approximate one-to-one relationship through the variational autoencoder framework, such as Figure 1 As shown in Figure 2, the causal relationship is identified. This process is called a hierarchical additive noise model, where the central node is represented as Y, the non-central node is represented as X, and the generalized variable is Z. The constructed variational autoencoder is responsible for forward transforming multiple non-central variables X i Convert it into an intermediate variable Z to transform a many-to-one relationship into an approximate one-to-one relationship; then reverse the many-to-one relationship to construct a reverse one-to-one relationship (Y→X i ), finally, using the additive noise model, the direction of causal relationship is obtained by calculating the independence between noise and cause and exploiting the asymmetry;

[0071] Without loss of generality, let the non-central variable X i (i=1,2,…n) are the multiple causes (X i →Y), n is the number of non-central variables, assuming that data generation follows nonlinear additive noise, then the many-to-one causal relationship in the hierarchical additive noise model is defined as:

[0072] Y=f(X1,X2,…,X n )+εx

[0073] Given a joint distribution P(X1,X2,…,X n ,Y), each X i follows the same distribution and is similar to the residual ε x independent.

[0074] The goal of this invention is to generalize the many-to-one causal direction identification problem and identify multiple causes X i It is transformed into a representative intermediate variable Z, thereby transforming a many-to-one causal relationship inference model into an approximate one-to-one causal identification problem, and then the asymmetric relationship is used to correctly identify the causal direction.

[0075] The method of converting to intermediate variables is: using the idea of ​​variational autoencoder, using q λ (Z|X) is used to approximate the posterior distribution, and λ is a parameter. The posterior distribution is defined as a normal distribution, so λ here represents the mean and variance of the intermediate variable Z. KL divergence is introduced to measure the q used λ The similarity between (Z|X) and the true posterior distribution p(Z|X) is as follows

[0076] KL(q λ (Z|X)||p(Z|X))=E q [logq λ (Z|X)]-E q [logp(X,Z)]+logp(X)

[0077] Since logp(X) is a constant, the KL divergence is greater than or equal to 0, so the problem of minimizing the KL divergence is equivalent to maximizing the ELBO (Evidence Lower BOund):

[0078]

[0079] For L(λ;X), it can be further decomposed as follows:

[0080]

[0081] For maximizing ELBO, that is, minimizing L1 and maximizing L2.

[0082] By building an encoder through a multi-layer perceptron to learn λ so that q λ(Z|X) and the true posterior distribution p(Z|X) are as similar as possible, where L1 can obtain the best result through the loss function, and L2 uses the reparameterization technique to make the obtained parameters differentiable and thus participate in the optimization process of the multilayer perceptron. By combining the above regularization term with the loss function of the reconstruction error, the present invention uses the variational autoencoder framework to obtain an encoder Encoderq λ (Z|X), and a decoderDecoderp θ (X|Z).

[0083] In the third step, the method in which the intermediate variable Z generated by the non-central node in the subgraph helps to identify the many-to-one causal relationship is:

[0084] Through the variational autoencoder framework, we can obtain an encoder Encoderq λ (Z|X) and a decoder Decoderp θ (X|Z). Through Decoderp θ (X|Z) constructs the intermediate variable Z to form the relationship between X i The one-to-many causal relationship adds the intermediate variable Z to the causal inference model - in the many-to-one causal relationship, each cause X i can all be obtained through the intermediate variable Z through p θ (X i |Z) Construction i.e. p θ (X|Z)=p θ (X1|Z)p θ (X2|Z)…p θ (X n |Z), that is, there exists a function of the form such that X i Can be f i (Z) indicates.

[0085] Then in the new many-to-one causal relationship, X i The formal representation of Z and Y is as follows

[0086]

[0087] Therefore, the many-to-one causal inference problem can be solved by X i →Y(i=1,2,…,n) is generalized to an approximate one-to-one reasoning problem Z→Y, such as Figure 2 As shown, X i →Y is transformed into Z→Y;

[0088] The hierarchical additive noise model will infer multiple X i →The problem of Y is transformed into the distribution problem of constructing intermediate variables, and constructing intermediate variables Z to achieve X i→Z→Y (from many-to-one reasoning problem to approximate one-to-one reasoning problem).

[0089] Y=f(X1,X2,…,X n )+ε X Transformed into Y = f Z (Z)+ε Z

[0090] In the third step, the method of using the forward and reverse causal identification framework of the hierarchical additive noise model to learn the causal direction between the variables in each subgraph is:

[0091] The hierarchical additive noise model is mainly divided into two parts. The first part is responsible for the identification of positive causal relationships, and the second part is responsible for calculating reverse causal relationships. Z (Z)+ε Z and X i =g i (Y)+ε i The obtained residual ε Z and ε i To obtain asymmetric relationships for causal identification;

[0092] In the forward causal relationship identification, the intermediate variable Z is constructed forwardly through the variational autoencoder to transform multiple factors X i (i=1,2,…,n) is converted into an intermediate variable Z, and the relationship between Z and factor Y is used to approximate X i The relationship between (i=1,2,…,n) and Y, and the residual ε for positive causal identification is obtained Z This part is mainly implemented through the variational autoencoder framework, and a fitting loss is added to construct a model that can represent X i (i=1,2,…,n) distributes the intermediate variable Z while making Z fit X i The distribution of X i =f i (Z; ε i ));

[0093] In reverse causal identification, construct Y about X i The fitting function g i (Y), the corresponding reverse causal identification residual can be obtained. i =g i (Y)+ε i , we can get the corresponding residual ε i .

[0094] The present invention uses the Hilbert-Schmidt independence criterion (HSIC) as the independence evaluation index. Z The independence relationship between Z and the residual εi The independence relationship between X and Y is determined by using the causal direction discrimination method based on the additive noise model and taking advantage of the asymmetry, so that each X can be identified. i The causal direction between and Y, such as Figure 3 shown.

[0095] ε Z =f Z (Z)-Yε i =g i (Y)-X i

[0096] X i →Y HSIC(Z,ε Z ) <HSIC(Y,ε i )

[0097] Y→X i HSIC(Y,ε i ) <HSIC(Z,ε Z )

[0098] Finally, each X in the learned subgraph i By restoring the causal direction between y and Y to the original causal undirected structure graph, the corresponding causal Bayesian network can be obtained.

[0099] In the process of converting many-to-one causal relationships into approximate one-to-one causal relationships, when using variational methods to learn the intermediate variable Z, minimize Z to construct each X i The minimum error enables the model to take into account statistical correlation while satisfying the causal additive noise condition, making up for the deficiency of variational autoencoder in causal relationship learning.

[0100] In the process of constructing the forward and reverse causal relationship identification, the hierarchical additive noise model adds multiple X i It is generalized into an approximate intermediate variable Z, which transforms the many-to-one causal relationship into an approximate one-to-one causal relationship, avoiding the problem that the additive noise model ignores the joint effect of multiple causes when transforming the many-to-one causal relationship into multiple one-to-one causal relationships.

[0101] The present invention generalizes the multi-cause variable into an intermediate variable, thereby overcoming the deficiency that the additive noise model cannot directly analyze the many-to-one causal relationship.

[0102] When the variational method generalizes the multi-cause variables into intermediate variables, the present invention minimizes Z to construct each X i It has the minimum error, takes into account both statistical correlation and causality, and is more capable of generalizing learning intermediate variables than variational autoencoders.

[0103] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for constructing a judicial causal Bayesian network based on a hierarchical additive noise model, characterized in that The steps of the method include: The first step is to use the pre-processed judicial data to perform causal Bayesian network skeleton learning to obtain the causal undirected structure graph between judicial data samples; The second step is to traverse the causal undirected structure graph obtained in the first step with the traversed variable as the center, extract all variables that have a direct dependency relationship with the traversed variable, and decompose the causal undirected structure graph between judicial data samples into multiple subgraphs; The third step is to generalize the non-central nodes in the multiple subgraphs obtained in the second step into intermediate variables, learn the causal direction between the variables in each subgraph, and restore the subgraph to a causal undirected structure graph to obtain a judicial causal Bayesian network; In the third step, the non-central nodes in the multiple subgraphs obtained in the second step are generalized into intermediate variables using the variational autoencoder framework, and then the forward and reverse causal identification framework of the hierarchical additive noise model is used to learn the causal direction between the variables in each subgraph, and finally the subgraph is restored to a causal undirected structure graph to obtain a causal Bayesian network; The method of generalizing non-central nodes in a subgraph using the variational autoencoder framework is: For the proposed subgraph, the many-to-one causal relationship is generalized to an approximate one-to-one relationship through the variational autoencoder framework to identify the causal relationship. This process is called a hierarchical additive noise model, where the central node is represented as Y, the non-central node is represented as X, and the generalized variable is Z. The constructed variational autoencoder is responsible for positively converting multiple non-central variables X i It is converted into an intermediate variable Z to transform a set of many-to-one relationships into an approximate one-to-one relationship; then the many-to-one relationship is reversed to construct a reverse one-to-one relationship. Finally, the additive noise model is used to calculate the independence between the noise and the cause and to use the asymmetry to obtain the direction of the causal relationship.

2. According to claim 1, a method for constructing a judicial causal Bayesian network based on a hierarchical additive noise model is characterized by: In the first step, preprocessing judicial data refers to modifying the judicial data format, removing duplicate data, screening and extracting elements in the judicial data to form judicial data variables.

3. The method for constructing a judicial causal Bayesian network based on a hierarchical additive noise model according to claim 1 or 2, characterized in that: In the first step, the method for generating a causal undirected structure graph comprises the following steps: (1) Generate a complete graph of judicial data variables. A complete graph means that there is an edge between each variable in the graph. Then calculate the correlation coefficient between the variables. Use a pre-set threshold to determine the correlation between the variables. By permuting the judicial data, check whether the variables still have correlation, and thus determine whether there is a conditional independence relationship between them. If there is a conditional independence relationship, it means that there is no dependency relationship between the two variables. Therefore, delete the edge between the two variables in the complete graph. If there is no conditional independence relationship, do not make any changes. (2) Remove unnecessary edges. Unnecessary edges refer to those whose conditional independence relationship between variables remains unchanged after removal, thus obtaining a causal undirected structure graph.

4. The method for constructing a judicial causal Bayesian network based on a hierarchical additive noise model according to claim 1 is characterized by: set up Non-central variable X i (i=1,2,…n) are the multiple causes (X i →Y), n is the number of non-central variables, assuming that data generation follows nonlinear additive noise, then the many-to-one causal relationship in the hierarchical additive noise model is defined as: Y=f(X1,X2,…,X n )+ε x Given a joint distribution P(X1,X2,…,X n ,Y), each X i follows the same distribution and is similar to the residual ε x independent.

5. The method for constructing a judicial causal Bayesian network based on a hierarchical additive noise model according to claim 4 is characterized by: The method of converting to intermediate variables is: with the help of variational autoencoder, using q λ (Z|X) is used to approximate the posterior distribution, λ is a parameter, the posterior distribution is defined as a normal distribution, and KL divergence is introduced to measure the q used λ The similarity between (Z|X) and the true posterior distribution p(Z|X) is as follows KL(q λ (Z|X)||p(Z|X))=E q [logq λ (Z|X)]-E q [logp(X,Z)]+logp(X) Since logp(X) is a constant, the KL divergence is greater than or equal to 0, and the problem of minimizing the KL divergence is equivalent to maximizing the ELBO: Further decomposition of L(λ;X) is performed: For maximizing ELBO, that is, minimizing L1 and maximizing L2.

6. The method for constructing a judicial causal Bayesian network based on a hierarchical additive noise model according to claim 5 is characterized by: By building an encoder through a multi-layer perceptron to learn λ so that q λ (Z|X) and the true posterior distribution p(Z|X) are as similar as possible, where L1 obtains the best result through the loss function, and L2 uses reparameterization to make the obtained parameters differentiable and thus participate in the optimization process of the multi-layer perceptron. By combining the regularization term with the loss function of the reconstruction error, an encoder Encoder q is obtained using the variational autoencoder framework. λ (Z|X), and a decoder Decoderp θ (X|Z).

7. The method for constructing a judicial causal Bayesian network based on a hierarchical additive noise model according to claim 6 is characterized by: In the third step, the method for identifying many-to-one causal relationships by the intermediate variable Z generated by the non-central node in the subgraph is: Obtain an encoder Encoderq through the variational autoencoder framework λ (Z|X) and a decoder Decoderp θ (X|Z), through Decoderp θ (X|Z) constructs the intermediate variable Z to form the relationship between X i The one-to-many causal relationship adds the intermediate variable Z to the causal inference model. In the many-to-one causal relationship, each cause X i can all pass through the intermediate variable Z through p θ (X i |Z) construction, p θ (X i |Z) as follows: p θ (X|Z)=p θ (X1|Z)p θ (X2|Z)…p θ (X n |Z) That is, there exists a function of the form such that X i By i (Z) means: Then in the new many-to-one causal relationship, X i The formal representation of , Z, and Y is as follows: Therefore, the many-to-one causal inference problem is solved by X i →Y(i=1,2,…,n) is generalized into an approximate one-to-one reasoning problem Z→Y,X i →Y is transformed into Z→Y; The hierarchical additive noise model will infer multiple X i →The problem of Y is transformed into the distribution problem of constructing intermediate variables, and constructing intermediate variables Z to achieve X i →Z→Y, that is Y=f(X1,X2,…,X n )+ε X Transformed into Y = f Z (Z)+ε Z ; ε Z and ε i is the residual.

8. The method for constructing a judicial causal Bayesian network based on a hierarchical additive noise model according to claim 7 is characterized by: In the third step, the method of using the forward and reverse causal identification framework of the hierarchical additive noise model to learn the causal direction between the variables in each subgraph is: Using Y = f Z (Z)+ε Z and X i =g i (Y)+ε i The obtained residual ε Z and ε i To obtain asymmetric relationships for causal identification; In the forward causal relationship identification, the intermediate variable Z is constructed forwardly through the variational autoencoder to transform multiple factors X i (i=1,2,…,n) is converted into an intermediate variable Z, and the relationship between Z and factor Y is used to approximate X i The relationship between (i=1,2,…,n) and Y, and the residual ε for positive causal identification is obtained Z This part is mainly implemented through the variational autoencoder framework, and a fitting loss is added to construct a model that can represent X i (i=1,2,…,n) distributes the intermediate variable Z while making Z fit X i distribution, that is, there exists X i =f i (Z; ε i ); In reverse causal identification, construct Y about X i The fitting function g i (Y), obtain the corresponding reverse causal identification residual, for each X i =g i (Y)+ε i , and obtain the corresponding residual ε i ; By testing the residual ε Z The independence relationship between Z and the residual ε i The independence relationship between X and Y is determined by using the causal direction discrimination method based on the additive noise model and taking advantage of asymmetry to identify each X. i The causal direction with Y; ε Z =f Z (Z)-Yε i =g i (Y)-X i X i →Y HSIC(Z,ε Z )<HSIC(Y,ε i ) Y→X i HSIC(Y,ε i )<HSIC(Z,ε Z ) Finally, each X in the learned subgraph i The causal direction between and Y is restored to the original causal undirected structure graph, and the corresponding causal Bayesian network is obtained.

Citation Information

Patent Citations

  • Method, system and apparatus for data processing

    US20120185172A1

  • Systems and Methods for Causal Inference in Network Structures Using Belief Propagation

    US20170206460A1