Causal discovery method and device based on continuous optimization, equipment and medium

Dynamically adjusting the weight matrix through Gaussian mixture kernel clustering and course learning mechanism solves the problem of insufficient accuracy and noise sensitivity of existing causal discovery methods in large networks and complex data, achieving higher causality accuracy and generalization. ability.

CN118569379AActive Publication Date: 2024-08-30NAT UNIV OF DEFENSE TECH

Patent Information

Application Number
CN202411040098.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-08-30
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

Existing causal discovery methods have insufficient accuracy, sensitivity to noise, and low computational efficiency in large networks and complex data. Especially in fields such as disease diagnosis, it is difficult to effectively handle the causal relationships of a large number of variables.

Method used

Using a method based on continuous optimization, disease diagnosis data is clustered and adaptively trained through Gaussian mixture kernel clustering and course learning mechanisms, and the weight matrix is ​​dynamically adjusted to obtain the causal structure, reduce noise interference, and improve the accuracy of causal relationships.

Benefits of technology

It significantly reduces the impact of data noise, improves the accuracy and generalization ability of causal relationships, and is suitable for networks of different sizes and complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569379A
    Figure CN118569379A
Patent Text Reader

Abstract

The invention provides a causal discovery method and device based on continuous optimization, equipment and a medium. The method comprises the following steps: acquiring a disease diagnosis data sample set; clustering the disease diagnosis data sample set through Gaussian mixture kernel clustering to obtain a plurality of sample sets; performing adaptive training on the sample set by using a course learning mechanism, dividing the samples into course samples and candidate samples according to the performance of different samples in the training process, continuously updating and determining the course samples in the next stage according to the performance of the candidate samples in each stage along with the iteration of the training process, and finally learning all training samples; dynamically adjusting the weight of a learning edge according to course learning results of different course learning stages through dynamic weight pruning; and obtaining a causal structure according to the weight matrix, and obtaining a causal relationship between the influence factors related to the disease according to the causal structure. According to the method, the influence of sample noise in the data is reduced, and the method has good generalization ability and relatively high accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of causal discovery, and in particular to a causal discovery method, device, equipment and medium based on continuous optimization. Background Art

[0002] In causal inference, it is usually assumed that the causal graph is known, that is, we know what kind of causal relationship may exist between variables, but we need to use natural experiments or observational data to determine whether the causal relationship is established. However, in the real world, the causal chain is often not a priori knowledge, so it is necessary to find the causal relationship.

[0003] The traditional method of finding causal relationships is through randomized controlled experiments. However, this experimental method may involve some ethical issues in practical problems and usually requires a lot of manpower and material resources. Therefore, we hope to find a more practical method: causal discovery, that is, discovering causal relationships from observational data. The main purpose of causal discovery is to recover the underlying causal structure and the related conditional probability distribution. The learned causal structure is usually expressed as a directed acyclic graph (DAG), which is represented by ,in represents a collection of nodes (or features), It is a set of edges, representing the causal relationship between different variables.

[0004] In past studies, experts mainly constructed DAGs through domain knowledge and randomized controlled experiments, which had the disadvantages of being too subjective and time-consuming. For example, in the medical field or disease diagnosis, there are complex scenarios such as finding causal graphs between different brain regions based on brain imaging time series data, and inferring gene regulatory networks based on changes in protein concentrations in cells. Because there are many variables involved, if traditional randomized controlled experiments are used for verification, the number of experiments required will increase exponentially, which is unacceptable in reality.

[0005] Relatively speaking, observational data is easier to obtain, especially in the era of big data. With the explosion of data volume, learning causal structures from pure data observation has received considerable attention. Causal discovery is different from finding dependencies between data. If, through observation, it is found that when the value of variable A is different, the distribution of variable B is also different, then there is a dependency (correlation) between the two variables. However, only when variable A can "actively" make different choices and the distribution of variable B changes, can it be said that there is a causal relationship between variables A and B.

[0006] There are two main categories of methods for learning causal structure from observational data: (1) Constraint-based methods: Formulated as a constraint satisfaction problem, they mainly mine causal skeletons through conditional independence tests between different variables, and then direct edges to Markov equivalence classes. Some notable algorithms in this category are the PC algorithm, the IC algorithm, and the IAMB algorithm. Constraint-based methods can handle a wider range of data types and distributions, and they are computationally efficient, making them highly interpretable. However, the accuracy of the learning process depends on the number of conditional independence tests performed and the size of the constraint set. They are sensitive to conditional independence tests and data noise, and high-order dependencies are unreliable for large networks and complex data.

[0007] (2) Methods based on scoring functions: The scoring function is mainly used to judge the degree of fit between the network structure and the data, and the search algorithm is used to search for the optimal structure. Common scoring functions include BIC, BDeu, MDL, AIC and other scoring functions. The structure learning algorithm based on scoring search mainly consists of two parts: the scoring function and the search algorithm. The scoring function is used to measure the degree of fit between the structure and the sample data. The better the structure fits, the higher the score value obtained. The search algorithm is used to search for the network structure with the highest scoring function, that is, to find the structure that best matches the data set by learning the observed data set. In essence, it is to find a network structure that satisfies:

[0008] Many studies have proposed to solve combinatorial problems and improve algorithm performance by using greedy search and heuristic search, such as genetic algorithm, particle swarm algorithm, ant colony algorithm, bee colony algorithm, etc. Due to the heuristic nature of these algorithms, they often fall into local optimality.

[0009] In addition, the training learning algorithms based on observational data all show a performance difference when training: the performance varies greatly with the increase of sample size and sample sampling. It can be seen that the impact of data quality and scale on algorithm performance is relatively serious. Summary of the invention

[0010] In view of this, the embodiments of the present disclosure provide a causal discovery method, apparatus, device and medium based on continuous optimization, which at least partially solve the problems existing in the prior art.

[0011] In a first aspect, an embodiment of the present disclosure provides a causal discovery method based on continuous optimization, which includes: S101, obtaining a disease diagnosis data sample set to be learned; wherein the disease diagnosis data sample set is modeled by a structural equation model, and the structural equation model is determined by a weight matrix.

[0012] S102, clustering the disease diagnosis data sample set by using a Gaussian mixture kernel clustering method to obtain multiple sample sets with high similarity between features; S103, using the course learning mechanism to perform adaptive training on the sample set, dividing the samples into course samples and candidate samples according to the performance of different samples in the training process, and continuously updating and determining the course samples for the next course learning stage according to the performance of the candidate samples in each course learning stage as the training process iterates, and finally learning all the training samples; wherein, in the iterative process, through dynamic weight pruning, the weights of the learning edges are dynamically adjusted according to the course learning results of different course learning stages, and the final weight matrix is ​​obtained after the iteration ends; S104, obtaining a causal structure based on the final weight matrix, and obtaining the causal relationship between the influencing factors related to the disease to be diagnosed based on the causal structure, so as to find the direct and indirect influencing factors of the disease to be diagnosed, so as to assist the diagnosis process of the disease.

[0013] According to a specific implementation of the embodiment of the present disclosure, the causal learning sample is a data set of high-dimensional features; then in step S102, assuming that the disease diagnosis data sample set is ,in ,and is a sample drawn from a mixture density composed of c Gaussian components, then the probability density function is:

[0014] in, is the Gaussian parameter, , and Respectively The mixing coefficients, mean components and covariance matrices of the Gaussian components; For the The density function of Gaussian components; Introducing information entropy into the extended Gaussian mixture model, specializing the covariance matrix of the Gaussian vector:

[0015] in, The diagonal elements are The matrix of Representation characteristics Cluster relevance; It is a cluster The local variance of The probability density function of the Gaussian components is expressed as:

[0016] Among them, P is the number of features j, It is On the feature dimension The mean of the Gaussian components, Representation sample Medium Features The value of is the local weight vector, satisfying ; Parameters are estimated by minimizing the KL divergence ,have to:

[0017] That is, we get a sample set with high similarity between features; is the fuzzy membership value The vector composed of is the Gaussian component The number of .

[0018] According to a specific implementation of the embodiment of the present disclosure, in step S103, the performance of different samples is evaluated by a course loss function designed based on acyclicity constraints; the course loss function is expressed as:

[0019] in, Indicates The first candidate sample in the course learning stage samples, Represents the weighted adjacency matrix, which also represents the sample exist The graph learned on the nodes, represents the number of samples in the candidate sample set, Indicates the course learning stage, Indicates The weight matrix of the course learning stage, Indicates A sample set of courses for each course learning phase.

[0020] According to a specific implementation of the embodiment of the present disclosure, step S103 specifically includes: The loss in the sample training process is obtained according to the course loss function, and the sample learning order is adjusted according to the loss update, thereby updating the course samples and candidate samples; among them, the sample with the smallest loss value is used as the course sample for the next course learning stage, and the sample is removed from the candidate sample set:

[0021] At each stage of the course sample, from the course sample set Learning , and its constraint equation is as follows:

[0022] The augmented Lagrangian method is used to transform the constraint equations into a sequence of unconstrained equations, and the score function is constructed using the augmented Lagrangian method. To optimize the above constraint equations, the corresponding augmented Lagrangian formula is as follows:

[0023] represents the penalty parameter, represents an estimate of the Lagrange multiplier; when As it approaches infinity, minimize Needs to be satisfied , by gradually increasing , minimize the augmented Lagrangian, and update the Lagrangian multiplier to converge to the optimal condition.

[0024] According to a specific implementation method of the embodiment of the present disclosure, in the augmented Lagrangian formula, In the special case of , the non-smooth term disappears and the problem is simplified to an unconstrained smooth minimization problem, which is solved by the L-BFGS approximation algorithm; when When , the problem is approximately solved using the PQN method.

[0025] According to a specific implementation of the embodiment of the present disclosure, in step S103, during the iteration process, the weights of the learning edges are dynamically adjusted according to the course learning results of different course learning stages through dynamic weight pruning, and the final weight matrix is ​​obtained after the iteration, which specifically includes: First, calculate the edge weight and weight coefficient; among them, set the edge weight ,but:

[0026] in, Indicates the course learning stage The weight matrix of Indicates that it always appears in The weight matrix of the edge at and before the stage; The weight matrix representing the new edges that appear in the next learning phase of the curriculum; represents the weight matrix with edges that appeared and then disappeared in the previous curriculum learning phase; Calculating the score , where the BIC scoring function is as follows:

[0027] By calculating the score Confirm to update and The weight of the middle edge:

[0028] Among them, S represents the node DAG, It is added in S and The extra edges whose edge weights are not 0, U is the weight update matrix, Corresponding side The weight update coefficient of ; According to the updated and The updated weight matrix is ​​obtained, and the final weight matrix is ​​obtained after the iteration.

[0029] According to a specific implementation method of an embodiment of the present disclosure, when dynamically calculating the weight of an edge, a larger weight is set for the new edge to avoid being discarded instantly; for the edges that disappear before and after the appearance, a smaller weight is assigned to reduce the error caused by data distribution fluctuations; for the edges that are always displayed, the corresponding weight will not be updated.

[0030] In a second aspect, the present disclosure provides a causal discovery device based on continuous optimization, which includes: A sample set acquisition unit is used to acquire a disease diagnosis data sample set to be learned; wherein the disease diagnosis data sample set is obtained by modeling a structural equation model, and the structural equation model is determined by a weight matrix; A clustering unit, used for clustering the disease diagnosis data sample set by using a Gaussian mixture kernel clustering method to obtain multiple sample sets with high similarity between features; The adaptive training unit is used to perform adaptive training on the sample set using the course learning mechanism. According to the performance of different samples in the training process, the samples are divided into course samples and candidate samples. With the iteration of the training process, the course samples of the next course learning stage are continuously updated and determined according to the performance of the candidate samples in each course learning stage, and all the training samples are finally learned. In the iterative process, the weights of the learning edges are dynamically adjusted according to the course learning results of different course learning stages through dynamic weight pruning, and the final weight matrix is ​​obtained after the iteration. The causal discovery unit is used to obtain the causal structure according to the final weight matrix, and obtain the causal relationship between the influencing factors related to the disease to be diagnosed according to the causal structure, so as to find the direct and indirect influencing factors of the disease to be diagnosed to assist the diagnosis process of the disease.

[0031] In a third aspect, an embodiment of the present disclosure provides a causal discovery device based on continuous optimization, the device comprising: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned causal discovery method based on continuous optimization.

[0032] In a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the causal discovery method based on continuous optimization as described above.

[0033] In summary, compared with the prior art, this embodiment has at least the following improvements: 1. In order to evaluate the difficulty of learning data samples, a similarity clustering method based on sample features is proposed, which combines the similarity and entropy value between the sample features to divide different types of samples.

[0034] 2. In order to reduce the interference of data noise, a dynamic loss function between samples is designed. The order of model sample learning is adaptively adjusted through the learning of different types of samples, and the causal structure of course samples is incrementally learned at different stages.

[0035] 3. Through dynamic weight pruning, the weights of learning edges are dynamically adjusted according to the results of different course learning stages, and the final causal structure is filtered out.

[0036] This embodiment has been tested on disease diagnosis data sets of multiple different sizes. The test results show that this embodiment significantly reduces the impact of sample noise in the data and has good generalization ability and high accuracy on networks of different sizes and complexities. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0038] Figure 1 A schematic diagram of a process of causal discovery based on continuous optimization provided by the first embodiment of the present invention; Figure 2 A schematic diagram of the overall structure of the Kubernetes Pod startup process provided by an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a causal discovery device based on continuous optimization provided in the second embodiment of the present invention; Figure 4 An exemplary structural diagram of a device capable of implementing the method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0039] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0040] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0041] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0042] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0043] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0044] The first embodiment of the present invention provides a causal discovery method based on continuous optimization, which can be performed by a causal discovery device based on continuous optimization (hereinafter referred to as a discovery device), and in particular, by one or more processors in the discovery device to implement the following steps: S101, obtaining a disease diagnosis data sample set to be learned; wherein the disease diagnosis data sample set is modeled by a structural equation model, and the structural equation model is determined by a weight matrix.

[0045] In this embodiment, the discovery device may be a device with data processing capabilities such as a desktop computer, a laptop computer, a tablet, a server, a workstation, etc., and the present invention does not make any specific limitation.

[0046] In this embodiment, the disease diagnosis data sample set may include specific consultation information, such as the patient's physiological characteristics data, past medical history, etc.; and the patient's first visit examination data, such as blood pressure, blood routine data, etc. The data types involve discrete data, continuous data, and time series data types. The disease diagnosis data sample set can be medical clinical data, disease diagnosis data, etc., and the present invention does not make specific limitations.

[0047] In this embodiment, the disease diagnosis data sample set is obtained by modeling with a structural equation model, and the structural equation model is determined by a weight matrix, specifically: Let DAG be represented as , where d is the number of nodes, Represents a collection of nodes. It is a slave node To Node The probability model related to G assumes data independence. When the parent node is known, Independent of its non-child nodes. Data The joint probability distribution of can be decomposed into the product of the conditional probabilities of each individual node given its parent nodes, following the probability chain rule:

[0048] Expressed as given The parent node is The joint distribution probability of The parent node of .

[0049] Considering the traditional SEM, some variables can only be observed and measured in practice. Inspired by the recent progress in the field of continuous optimization, this example models X through a structural equation model (SEM), which consists of a weight matrix Therefore, this embodiment is not in the discrete space On the operation, but in On operation, Represents a continuous space of real matrices.

[0050] set up Define the adjacency matrix of DAG, where In addition to DAG, pass A linear SEM is defined where is a random vector, is an arbitrary noise vector.

[0051] Assumptions are independent of each other and there are no unobserved confounding factors. Denote element-wise multiplication, using Represents a square matrix The matrix exponential of .

[0052] Studies have shown that if and only if When established, Denotes a DAG. The resulting continuous constrained optimization problem is:

[0053] in and Respectively represent the element form and norm, is the regularization coefficient. Here, is the least squares objective and is equal to the log-likelihood of a linear Gaussian DAG assuming equal noise variances, up to a constant; to ensure that the matrix is ​​sparse.

[0054] S102, clustering the disease diagnosis data sample set by using a Gaussian mixture kernel clustering method to obtain multiple sample sets with high similarity between features.

[0055] Gaussian distribution is widely used in production and scientific experiments. The probability distribution of many random variables can be approximately described by Gaussian distribution. , the variance is The Gaussian distribution of is:

[0056] in is the Gaussian distribution parameter. Gaussian mixture model has the advantages of strong probabilistic interpretation and robustness to noise, and has been widely used.

[0057] In this embodiment, based on the characteristics of causal learning sample modeling, a Gaussian mixture model is used to cluster the samples to be learned and divide the data sample sets into different learning difficulties.

[0058] Assume that the disease diagnosis data sample set is ,in ,and Is The probability density function of the sample drawn from the mixed density composed of Gaussian components is:

[0059] in , and Respectively The mixing coefficients, mean components and covariance matrices of the components; For the Gaussian density function of components; since causal learning samples involve a large number of features, they belong to high-dimensional data; traditional clustering methods are difficult to directly apply to these data; therefore, this embodiment introduces information entropy into the extended Gaussian mixture model and specializes the covariance matrix of the Gaussian vector:

[0060] in The diagonal elements are The matrix of Representation characteristics Cluster The relevance of It is a cluster The local variance of The probability density function of the Gaussian components is:

[0061] Parameters are estimated by minimizing the KL divergence , we can get:

[0062] In this way, based on the above-mentioned Gaussian mixture kernel clustering method, the causal learning sample data set with high-dimensional features is clustered to obtain a sample set with high similarity between features, such as Figure 2 shown.

[0063] According to S101, the disease diagnosis data sample set of this embodiment is obtained by SEM modeling. Therefore, it can be considered that the higher the similarity of the samples, the similar the sample quality, and the closer the impact on the causal structure learning algorithm. Therefore, the quality of the course sample division of the divided course sample set will directly affect the effect of the subsequent course sample adaptive training.

[0064] S103, using the course learning mechanism to perform adaptive training on the sample set, dividing the samples into course samples and candidate samples according to the performance of different samples in the training process, and continuously updating and determining the course samples for the next course learning stage according to the performance of the candidate samples in each course learning stage as the training process iterates, and finally learning all the training samples; wherein, in the iterative process, through dynamic weight pruning, the weights of the learning edges are dynamically adjusted according to the course learning results of different course learning stages, and the final weight matrix is ​​obtained after the iteration.

[0065] In this embodiment, course learning refers to A series of training criteria over training steps: , each standard is the target training distribution Reweighting of:

[0066] The following conditions must be met: (1) The entropy value in the distribution increases:

[0067] (2) The weight of any example is increased:

[0068] (3)

[0069] Curriculum learning is a training strategy for training machine learning models using a curriculum. Condition (1) means that the diversity and information content of the training set should gradually increase, i.e., reweighting the examples in later steps increases the probability of sampling slightly more difficult examples. Condition (2) means that more training samples are gradually added, so the size of the training set increases. Condition (3) means that in the end, the weights of all samples are consistent.

[0070] Inspired by course learning, in order to reduce the impact of noise in samples, this embodiment uses the course learning mechanism to perform adaptive training of training samples. According to the performance of different samples in the training process, the training samples are divided into course samples. and candidate samples As the training process iterates, the course samples for the next course learning stage are continuously updated and determined based on the performance of the candidate samples at each stage, and finally all the training samples are learned. .

[0071] In order to achieve adaptive training of course samples, this embodiment designs a course loss function of samples based on acyclic constraints to evaluate the performance of different samples during the training process.

[0072] Specifically, this example studies the linear SEM and least squares (LS) loss , although everything in the loss function applies to the definition in The statistical properties of the LS loss in scoring DAGs have been extensively studied: minimization of the LS loss can be shown to be effective in finite samples and high dimensions. The above recovers the true DAG with high probability, so it is consistent for both Gaussian SEM and non-Gaussian SEM:

[0073] in Indicates The first candidate sample in the course learning stage samples, Representative samples exist The graph learned on the nodes, represents the number of samples in the candidate sample set, Indicates the course learning stage.

[0074] The model adjusts the sample learning order according to the loss obtained during the training sample process, updates the course samples and candidate samples, and uses the sample with the smallest loss value as the course learning sample for the next stage, and removes the changed sample from the candidate sample set:

[0075] At each stage of the course sample, from the course sample set Learning , and its constraint equation is as follows:

[0076] Inspired by NOTEARS, this embodiment uses the augmented Lagrangian method to transform the constraint equations into a sequence of unconstrained equations.

[0077] This embodiment uses the augmented Lagrangian method to construct the score function To optimize the above constraint formula, the corresponding augmented Lagrangian formula is as follows:

[0078] represents the penalty parameter, represents an estimate of the Lagrange multiplier. As it approaches infinity. Minimize Needs to be satisfied By gradually increasing , minimize the augmented Lagrangian. Update the Lagrangian multiplier To converge to the optimal condition. In the special case of , the non-smooth term disappears and the problem is simplified to an unconstrained smooth minimization problem, which can be solved by the L-BFGS approximation algorithm. When , the problem can be approximately solved using the PQN method.

[0079] To handle the course iteration process, this embodiment dynamically updates the edge weights to determine the causal edges required to generate new samples in the next round, and then adds the new causal edges to the previously trained edge set. After each training update, a probability threshold is used to determine whether to keep or discard.

[0080] To iteratively learn the causal structure in the curriculum learning phase, edge weights and weight coefficients are first calculated.

[0081] (1) Setting edge weights .

[0082]

[0083] in, Indicates the course learning stage The weight matrix of Indicates that it always appears in The weight matrix of the edges during and before the course learning phase; The weight matrix representing the new edges that appear in the next learning phase of the curriculum; Represents the weight matrix of edges that appeared and then disappeared in the previous course learning stage. When dynamically calculating the weights of edges, a larger weight is set for new edges to avoid being discarded instantly; for edges that appeared before and disappeared after, a smaller weight is assigned to reduce the error caused by data distribution fluctuations. For edges that are always displayed, the corresponding weights are not updated.

[0084] (2) Calculate the score BIC uses the log-likelihood method to measure the degree of match between the structure and the data, under the premise that the samples meet the independent and identically distributed assumptions. The BIC scoring function is as follows:

[0085] Updated by calculating the BIC score and The weight of the middle edge:

[0086] Among them, S represents the node DAG, is Added and The extra edges whose edge weights are not 0. U is the weight update matrix, Corresponding side The weight update coefficient of .

[0087] In this embodiment, according to the updated and The updated weight matrix is ​​obtained, and the final weight matrix is ​​obtained after the iteration.

[0088] S104, obtaining a causal structure based on the final weight matrix, and obtaining the causal relationship between the influencing factors related to the disease to be diagnosed based on the causal structure, so as to find the direct and indirect influencing factors of the disease to be diagnosed, so as to assist the diagnosis process of the disease.

[0089] As can be seen from step S101, in this embodiment, represents DAG, so in this embodiment, the final weight matrix is ​​obtained, that is, the causal structure is obtained. Therefore, causal discovery can be performed based on the causal structure. For example, the causal relationship between the influencing factors related to the disease to be diagnosed is obtained, so as to find the direct and indirect influencing factors of the disease to be diagnosed, so as to assist the diagnosis process of the disease.

[0090] In summary, compared with the prior art, this embodiment has at least the following improvements: 1. In order to evaluate the difficulty of learning data samples, a similarity clustering method based on sample features is proposed, which combines the similarity and entropy value between the sample features to divide different types of samples.

[0091] 2. In order to reduce the interference of data noise, a dynamic loss function between samples is designed. The order of model sample learning is adaptively adjusted through the learning of different types of samples, and the causal structure of course samples is incrementally learned at different course learning stages.

[0092] 3. Through dynamic weight pruning, the weights of learning edges are dynamically adjusted according to the results of different course learning stages, and the final causal structure is filtered out.

[0093] This embodiment has been tested on disease diagnosis data sets of multiple different sizes. The test results show that this embodiment significantly reduces the impact of sample noise in the data and has good generalization ability and high accuracy on networks of different sizes and complexities.

[0094] See also Figure 3 The second embodiment of the present invention provides a causal discovery device based on continuous optimization, which includes: The sample set acquisition unit 210 is used to acquire a disease diagnosis data sample set to be learned; wherein the disease diagnosis data sample set is obtained by modeling with a structural equation model, and the structural equation model is determined by a weight matrix; A clustering unit 220 is used to cluster the disease diagnosis data sample set by using a Gaussian mixture kernel clustering method to obtain multiple sample sets with high similarity between features; The adaptive training unit 230 is used to perform adaptive training on the sample set using the course learning mechanism, and divide the samples into course samples and candidate samples according to the performance of different samples in the training process. With the iteration of the training process, the course samples of the next course learning stage are continuously updated and determined according to the performance of the candidate samples in each course learning stage, and all the training samples are finally learned. In the iterative process, the weights of the learning edges are dynamically adjusted according to the course learning results of different course learning stages through dynamic weight pruning, and the final weight matrix is ​​obtained after the iteration. The causal discovery unit 240 is used to obtain a causal structure based on the final weight matrix, and obtain the causal relationship between the influencing factors related to the disease to be diagnosed based on the causal structure, so as to find the direct and indirect influencing factors of the disease to be diagnosed to assist the diagnosis process of the disease.

[0095] A third embodiment of the present invention provides a causal discovery device based on continuous optimization, the device comprising: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned causal discovery method based on continuous optimization.

[0096] A fourth embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions for causing the computer to execute the continuous optimization-based causal discovery method as described above.

[0097] The fifth embodiment of the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the causal discovery method based on continuous optimization of any of the aforementioned embodiments.

[0098] Figure 4 A schematic diagram of a method or device 1000 that can implement an embodiment of the present invention is shown, which may include more or fewer devices than shown in the figure in some embodiments. In some embodiments, it can be implemented using a single or multiple devices. In some embodiments, it can be implemented using cloud or distributed devices.

[0099] like Figure 4As shown, the device 1000 includes a processor 1001, which can perform various appropriate operations and processes according to the program and / or data stored in the read-only memory (ROM) 1002 or the program and / or data loaded from the storage part 1008 to the random access memory (RAM) 1003. Processor 1001 can be a multi-core processor or include multiple processors. In some embodiments, processor 1001 can include a general main processor and one or more special coprocessors, such as a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), a digital signal processor (DSP), etc. In RAM 1003, various programs and data required for the operation of device 1000 are also stored. Processor 1001, ROM 1002 and RAM 1003 are connected to each other via bus 1004. Input / output (I / O) interface 1005 is also connected to bus 1004.

[0100] The processor and the memory are used together to execute the program stored in the memory. When the program is executed by the computer, the methods, steps or functions described in the above embodiments can be implemented.

[0101] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, a touch screen, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed. Figure 4 Only some components are schematically shown in the figure, which does not mean that the device 1000 only includes Figure 4 Components shown.

[0102] The systems, devices, modules or units described in the above embodiments may be implemented by a computer or its associated components. The computer may be, for example, a mobile terminal, a smart phone, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a personal digital assistant, a media player, a navigation device, a game console, a tablet computer, a wearable device, a smart TV, an Internet of Things system, a smart home, an industrial computer, a server or a combination thereof.

[0103] Although not shown, in an embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the method described in Embodiment 1 is implemented.

[0104] Storage media in embodiments of the present invention include permanent and non-permanent, removable and non-removable items that can be used to store information by any method or technology. Examples of storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0105] Although not shown, an embodiment of the present invention further provides a computer program product, including: a computer program / instruction, which implements the method described in Embodiment 1 when executed by a processor.

[0106] The methods, programs, systems, devices, etc. of the embodiments of the present invention may be executed or implemented in a single or multiple networked computers, or may be practiced in a distributed computing environment. In the embodiments of this specification, in these distributed computing environments, tasks may be performed by remote processing devices connected via a communication network.

[0107] Those skilled in the art should understand that the embodiments of the present specification may be provided as methods, systems or computer program products. Therefore, those skilled in the art may imagine that the functional modules / units or controllers and related method steps described in the above embodiments may be implemented in software, hardware or a combination of software / hardware.

[0108] Unless explicitly stated, the actions or steps of the methods, programs, and embodiments of the present invention do not have to be performed in a specific order and can still achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.

[0109] In this article, multiple embodiments of the present invention are described, but for the sake of simplicity, the description of each embodiment is not exhaustive, and the same or similar features or parts between the embodiments may be omitted. In this article, "one embodiment", "some embodiments", "example", "specific example", or "some examples" are intended to be applicable to at least one embodiment or example of the present invention, but not all embodiments. The above terms do not necessarily mean to refer to the same embodiment or example. In the absence of contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples.

[0110] The exemplary systems and methods of the present invention have been specifically shown and described with reference to the above embodiments, which are merely examples of the best modes for implementing the present systems and methods. It will be appreciated by those skilled in the art that various changes may be made to the embodiments of the systems and methods described herein when implementing the present systems and / or methods without departing from the spirit and scope of the present invention as defined in the appended claims.

Claims

1. A causal discovery method based on continuous optimization, characterized in that: include: S101, obtaining a sample set of disease diagnosis data to be learned; wherein the sample set of disease diagnosis data is obtained by modeling with a structural equation model, and the structural equation model is determined by a weight matrix; S102, clustering the disease diagnosis data sample set by using a Gaussian mixture kernel clustering method to obtain multiple sample sets with high similarity between features; S103, using the course learning mechanism to perform adaptive training on the sample set, dividing the samples into course samples and candidate samples according to the performance of different samples in the training process, and continuously updating and determining the course samples for the next course learning stage according to the performance of the candidate samples in each course learning stage as the training process iterates, and finally learning all the training samples; wherein, in the iterative process, through dynamic weight pruning, the weights of the learning edges are dynamically adjusted according to the course learning results of different course learning stages, and the final weight matrix is ​​obtained after the iteration ends; S104, obtaining a causal structure based on the final weight matrix, and obtaining the causal relationship between the influencing factors related to the disease to be diagnosed based on the causal structure, so as to find the direct and indirect influencing factors of the disease to be diagnosed, so as to assist the diagnosis process of the disease.

2. The causal discovery method based on continuous optimization according to claim 1, characterized in that: The causal learning sample is a data set with high-dimensional features; then in step S102, assuming that the disease diagnosis data sample set is ,in ,and Is The sample is drawn from the mixture density composed of Gaussian components, then the probability density function of the Gaussian mixture model is: ; in, is the Gaussian parameter, , and Respectively The mixing coefficients, mean components and covariance matrices of the Gaussian components; For the The density function of Gaussian components; Introducing information entropy into the Gaussian mixture model, the covariance matrix of the Gaussian vector is specialized: ; in, The diagonal elements are The matrix of Representation characteristics Cluster relevance; It is a cluster The local variance of The probability density function of the Gaussian components is expressed as: ; Among them, P is the number of features j, is the mean of the i-th Gaussian component on the j-th feature dimension, Representation sample The value of feature j in , is the local weight vector, satisfying ; Parameters are estimated by minimizing the KL divergence ,have to: ; That is, we get a sample set with high similarity between features; is the fuzzy membership value The vector composed of is the number of Gaussian components i.

3. The causal discovery method based on continuous optimization according to claim 2, characterized in that: In step S103, the performance of different samples is evaluated by a course loss function designed based on acyclicity constraints; the course loss function is expressed as: ; in, Indicates The first candidate sample in the course learning stage samples, Represents the weight matrix, which also represents the sample The graph learned on d nodes, represents the number of samples in the candidate sample set, Indicates the course learning stage, Indicates The weight matrix of the course learning stage, Indicates A sample set of courses for each course learning phase.

4. The causal discovery method based on continuous optimization according to claim 3, characterized in that: Step S103 specifically includes: The loss in the sample training process is obtained according to the course loss function, and the sample learning order is adjusted according to the loss update, thereby updating the course samples and candidate samples; among them, the sample with the smallest loss value is used as the course sample for the next course learning stage, and the sample is removed from the candidate sample set: ; in Indicates Candidate sample sets for each course learning stage; In each course learning stage of the course sample, from the course sample set Learning , and its constraint equation is as follows: ; The augmented Lagrangian method is used to transform the constraint equations into a sequence of unconstrained equations, and the score function is constructed using the augmented Lagrangian method. To optimize the above constraint equations, the corresponding augmented Lagrangian formula is as follows: ; represents the penalty parameter, represents an estimate of the Lagrange multiplier; when As it approaches infinity, minimize Needs to be satisfied , by gradually increasing , minimize the augmented Lagrangian, and update the Lagrangian multiplier to converge to the optimal condition.

5. The causal discovery method based on continuous optimization according to claim 4, characterized in that: In the augmented Lagrangian formula, In the special case of , the non-smooth term disappears and the problem is simplified to an unconstrained smooth minimization problem, which is solved by the L-BFGS approximation algorithm; when When , the problem is approximately solved using the PQN method.

6. The causal discovery method based on continuous optimization according to claim 4, characterized in that: In step S103, during the iteration process, the weights of the learning edges are dynamically adjusted according to the course learning results of different course learning stages through dynamic weight pruning, and the final weight matrix is ​​obtained after the iteration, which specifically includes: First, calculate the edge weight and weight coefficient; among them, set the edge weight ,but: ; in, Indicates the course learning stage The weight matrix of Indicates that it always appears in The weight matrix of the edges before and after the course learning stage; The weight matrix representing the new edges that appear in the next learning phase of the curriculum; represents the weight matrix with edges that appeared and then disappeared in the previous curriculum learning phase; Calculating the score , where the BIC scoring function is as follows: ; By calculating the score Confirm to update and The weight of the middle edge: ; Among them, S represents the node DAG, It is added in S and The extra edges whose edge weights are not 0, U is the weight update matrix, Corresponding side The weight update coefficient of ; According to the updated and The updated weight matrix is ​​obtained, and the final weight matrix is ​​obtained after the iteration.

7. The causal discovery method based on continuous optimization according to claim 6, characterized in that: When dynamically calculating edge weights, larger weights are set for new edges to avoid being discarded instantly; smaller weights are assigned to edges that appear before and disappear after, to reduce errors caused by data distribution fluctuations; for edges that are always displayed, the corresponding weights are not updated.

8. A causal discovery device based on continuous optimization, characterized in that: include: A sample set acquisition unit is used to acquire a disease diagnosis data sample set to be learned; wherein the disease diagnosis data sample set is obtained by modeling a structural equation model, and the structural equation model is determined by a weight matrix; A clustering unit, used for clustering the disease diagnosis data sample set by using a Gaussian mixture kernel clustering method to obtain multiple sample sets with high similarity between features; The adaptive training unit is used to perform adaptive training on the sample set using the course learning mechanism. According to the performance of different samples in the training process, the samples are divided into course samples and candidate samples. With the iteration of the training process, the course samples of the next course learning stage are continuously updated and determined according to the performance of the candidate samples in each course learning stage, and all the training samples are finally learned. In the iterative process, the weights of the learning edges are dynamically adjusted according to the course learning results of different course learning stages through dynamic weight pruning, and the final weight matrix is ​​obtained after the iteration. The causal discovery unit is used to obtain the causal structure according to the final weight matrix, and obtain the causal relationship between the influencing factors related to the disease to be diagnosed according to the causal structure, so as to find the direct and indirect influencing factors of the disease to be diagnosed to assist the diagnosis process of the disease.

9. A causal discovery device based on continuous optimization, characterized in that: The equipment includes: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the causal discovery method based on continuous optimization as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which are used to enable the computer to execute the causal discovery method based on continuous optimization as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Grouping model construction method based on causal inference and medical data processing method

    CN113782192A

  • Causal discovery method based on conditional independence test and continuous optimization

    CN116756381A

  • Climate causal discovery method based on deep reinforcement learning

    CN117407763A

  • Causal structure learning method and system based on large language model guidance

    CN117474087A

  • Coordinated multiple worker node casual inference framework

    US20200401915A1

Cited By

  • Zero sample anomaly detection method based on causal learning

    CN121459081A

  • Zero-shot anomaly detection method based on causal learning

    CN121459081B