Bayesian network structure learning method and device based on reverse learning

By introducing reverse learning and differential evolution algorithms in Bayesian network structure learning and combining particle swarm optimization, the problems of huge search space, low efficiency, strong randomness, slow learning speed and insufficient support for discrete networks in Bayesian network structure learning are solved, and more efficient structural learning is achieved.

CN119808969APending Publication Date: 2025-04-11HARBIN ENG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411753179.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The prior art has problems such as huge search space, low efficiency, strong randomness, slow learning speed and insufficient support for discrete Bayesian networks in Bayesian network structure learning.

Method used

A Bayesian network structure learning method based on reverse learning is proposed, combining particle swarm optimization and differential evolution algorithm, generating the reverse solution of the initial solution through reverse learning, sorting the optimal solution, and introducing a differential evolution algorithm to deal with discretization problems in the PSO algorithm.

Benefits of technology

It effectively avoids the problem of huge search space and inefficiency, improves the convergence speed and learning effect, and enhances the ability to support discrete Bayesian network structure learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808969A_ABST
    Figure CN119808969A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a Bayesian network structure learning method and device based on reverse learning, and the method comprises the steps: 1, obtaining a training sample; 2, generating an initial solution according to the training sample based on a PC algorithm, generating a reverse solution corresponding to the initial solution based on reverse learning, sorting the initial solution and the reverse solution, determining an optimal solution really used for optimization according to a sorting result, updating initial parameters of a population based on the optimal solution, and completing population initialization; step 3, searching an optimal solution based on a PSO algorithm, and introducing a differential evolution algorithm to a discretization problem in a search process for processing; and step 4, repeatedly executing the step 2 to the step 4 to carry out iterative learning until an optimal network structure is searched. According to the embodiment of the invention, the accuracy and efficiency of discrete Bayesian network structure learning are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of computer technology, and in particular to a Bayesian network structure learning method and device based on reverse learning. Background Art

[0002] In real life, people always encounter various uncertain decision-making tasks, which are characterized by the fact that reliable conclusions cannot be drawn from existing information before the results come out. With the continuous development of big data and computer science, the relationship between data obtained from the Internet and the real world has become more and more complex, which has brought challenges to the analysis and processing of uncertainty problems by artificial intelligence.

[0003] As a combination of probability statistics and graphical models, Bayesian networks are an important tool for dealing with uncertainty problems in the current field of artificial intelligence. A complete Bayesian network consists of network structure and network parameters. Its network structure can intuitively represent the causal relationship and conditional dependency between random variables, and network parameters can represent the correlation between random variables. Therefore, Bayesian network learning algorithms can also be divided into structural learning algorithms and parameter learning algorithms. In the learning algorithm of Bayesian networks, structural learning is the basis for subsequent parameter learning, but the computational complexity of structural learning will increase exponentially with the increase in the number of network nodes. As an NP-hard problem, it cannot be solved by general mathematical optimization algorithms, which also brings certain limitations to the application of Bayesian networks. Therefore, how to effectively solve the structural learning problem of Bayesian networks is still a research hotspot in the field of machine learning.

[0004] Bayesian network structure learning algorithms can be roughly divided into three types, namely constraint-based structure learning methods, score search-based structure learning methods, and hybrid-based structure learning methods. Constraint-based structure learning methods use conditional independence (CI) tests to determine the conditional dependencies between different nodes, and determine the direction of the edges between nodes according to certain rules, thereby obtaining a complete network topology; score search-based structure learning methods use search algorithms based on the score function to search in the solution space to obtain the network topology that makes the score function optimal; and hybrid-based structure learning methods combine the advantages of constraint-based and score-based algorithms, first using conditional independence tests to obtain partial network structures, reducing the solution space to be searched, and then searching for the optimal network structure in the remaining solution space based on the score function. Since Bayesian network structure learning is a non-convex combinatorial optimization problem, that is, the learning process involves both the optimization of non-convex functions and the selection of discrete combinations, traditional algorithms often have poor performance and high computational costs when solving such problems. When using Bayesian networks to handle classified decision-making tasks, the classification model should have a certain generalization ability, and the learned network does not need to be exactly the same as the real network. Against this background, heuristic-based Bayesian network learning algorithms have been proposed and developed in recent years.

[0005] In previous studies, many researchers have applied various heuristic algorithms to the learning of Bayesian network structures. Traditional heuristic algorithms include Hill Climbing, Simulated Annealing, Ant Colony Optimization, Particle Swarm Optimization, etc. In addition, there are many innovative Bayesian network structure learning algorithms based on heuristic algorithms, such as: Haoran Liu et al. proposed an improved Harris Hawk optimization method, Kareem et al. proposed an elephant water search algorithm, Awla et al. created a falcon optimization algorithm through reversal, movement and deletion operations, and Wang et al. proposed a new discrete firefly algorithm to solve the problem of Bayesian network structure learning. These studies show that using heuristic algorithms to search for the optimal structure of Bayesian networks is an effective method, but it also faces problems such as the need for completely random search and too large a search space. Therefore, it is necessary to conduct in-depth research on these heuristic algorithms to improve their performance. The present invention studies the performance issues of heuristic Bayesian network structure learning and proposes a Bayesian network structure algorithm based on reverse learning. The idea of ​​reverse learning is introduced into the process of particle swarm optimization, and the discrete problems in the optimization process are solved by the differential evolution algorithm, which effectively improves the performance of the heuristic algorithm in learning the Bayesian network structure.

[0006] Currently, there is a Bayesian network structure learning algorithm based on particle swarm in the industry, which integrates the PC algorithm and the particle swarm optimization algorithm (PSO). First, the PC algorithm is used to generate the initial structure of the network to be learned, and the directed graph part of the initial structure is used as the structural prior to generate the initial solution of the particle swarm optimization algorithm. Using the particle swarm optimization algorithm to search for the initial solution can achieve higher performance. The particle swarm optimization algorithm is suitable for solving continuous optimization problems. In practical applications, Bayesian networks are often used to solve discrete decision-making problems. Therefore, this technical solution introduces the crossover operator and mutation operator of the genetic algorithm to discretize continuous problems. After continuous learning and iteration of the particle swarm optimization algorithm, the optimal Bayesian network structure is finally obtained. Although this technical solution obtains the structural prior with the help of the PC algorithm, thereby improving the search efficiency of the particle swarm optimization, the computational complexity is still high. When dealing with large networks, the running time of the algorithm may increase significantly.

[0007] Specific technical solutions in the existing technical solutions:

[0008] 1. Use PC algorithm to obtain structural prior.

[0009] Before using particle swarm optimization to search for the optimal solution, this study first uses the PC algorithm to obtain the structural prior of the network to be learned to avoid the problem of excessive computational complexity caused by completely random search. The PC algorithm selects an empty graph as the initial network and adds edges to the network structure through a conditional independence test. Since the conditional independence test cannot completely determine the direction of all edges, the final output is a network structure containing directed and undirected graphs. In order to facilitate the subsequent learning of the network structure and reduce the error rate of the conditional independence test, only the directed graph part is selected as the initial solution for particle swarm optimization.

[0010] 2. Discrete processing of optimization process

[0011] This study is based on the particle swarm optimization algorithm to learn the discrete Bayesian network structure, but the particle swarm optimization algorithm mainly solves continuous optimization problems, so this study uses a genetic algorithm (GA) that can handle discrete problems to update particle parameters. First, the adjacency matrix representing the directed acyclic graph is converted into a genome representation of the genetic algorithm, and then the UMAD mutation operator is used to randomly add and delete elements in the genome to search for more offspring. The Uniform Crossover operator is used to randomly select elements from the parent generation to form new offspring, which helps to find more candidate solutions during the search process, thereby completing the discrete form of particle swarm optimization.

[0012] 3. Improved Particle Swarm Optimization

[0013] The optimal solution search process of this study uses an improved algorithm based on particle swarm optimization, BNC-PSO. Compared with the standard particle swarm optimization algorithm, this study performs two crossover operations and one mutation operation on particles in each generation of iteration. The two crossovers are the crossover between the current solution of the particle and the individual optimal solution, and the crossover with the global optimal solution. Through the crossover and mutation operations from the genetic algorithm, the optimization of the continuous problem by the particle swarm optimization algorithm is transformed into the optimization of the discrete network structure. According to the process of particle swarm optimization, iterative learning is carried out until the pre-set number of iterations is reached, and the result of optimal Bayesian network structure learning is obtained.

[0014] The technical problems existing in the prior art are as follows:

[0015] 1) Many existing methods have a large search space in the learning process of Bayesian network structure and low efficiency. When there are a large number of network nodes to be learned, it is difficult for traditional methods to find the optimal solution within a reasonable time. Although many learning methods based on heuristic algorithms can effectively explore the solution space to a certain extent, the search process is highly random and it is easy to obtain the local optimal result while ignoring the global optimal solution, resulting in reduced search efficiency.

[0016] 2) Many existing heuristic algorithms have strong randomness and slow learning speed for Bayesian network structure learning. Existing heuristic algorithms have great randomness in the search process, resulting in different results each time they are run, and unstable learning speed, especially for complex network structures, which takes a long time to learn. Moreover, heuristic search methods are usually sensitive to the initial solution, and the quality of the initial solution will affect the final learning effect, which means that researchers must ensure the quality of the initial solution.

[0017] 3) Existing learning methods do not provide sufficient support for learning discrete Bayesian networks. Many optimization algorithms used for Bayesian network structure learning, such as particle swarm optimization (PSO), are mainly designed for continuous optimization problems. Their application on discrete Bayesian networks requires complex transformation, otherwise it is difficult to effectively solve discretization problems. Summary of the invention

[0018] The purpose of the present invention is to provide a Bayesian network structure learning method and device based on reverse learning, aiming to solve the above-mentioned problems in the prior art.

[0019] The present invention provides a Bayesian network structure learning method based on reverse learning, comprising:

[0020] Step 1, obtain training samples;

[0021] Step 2: Generate an initial solution based on the training sample based on the PC algorithm, generate a reverse solution corresponding to the initial solution based on reverse learning, sort the initial solution and the reverse solution, determine the optimal solution truly used for optimization based on the sorting result, update the initial parameters of the population based on the optimal solution, and complete the population initialization;

[0022] Step 3: Search for the optimal solution based on the PSO algorithm, and introduce the differential evolution algorithm to deal with the discretization problem of the search process;

[0023] Step 4: Repeat steps 2 to 4 for iterative learning until the optimal network structure is found.

[0024] The present invention provides a Bayesian network structure learning device based on reverse learning, comprising:

[0025] An acquisition module, used to acquire training samples;

[0026] A population initialization module is used to generate an initial solution according to the training sample based on the PC algorithm, generate a reverse solution corresponding to the initial solution based on reverse learning, sort the initial solution and the reverse solution, determine the optimal solution truly used for optimization according to the sorting result, update the initial parameters of the population based on the optimal solution, and complete population initialization;

[0027] The algorithm module is used to search for the optimal solution based on the PSO algorithm. The differential evolution algorithm is introduced to deal with the discretization problem of the search process. The population initialization module and the algorithm module are repeatedly called for iterative learning until the optimal network structure is found.

[0028] An embodiment of the present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the above-mentioned Bayesian network structure learning method based on reverse learning are implemented.

[0029] An embodiment of the present invention further provides a computer-readable storage medium, on which a program for implementing information transmission is stored. When the program is executed by a processor, the steps of the above-mentioned Bayesian network structure learning method based on reverse learning are implemented.

[0030] The embodiment of the present invention can approach the global optimal solution more quickly, effectively avoiding the problem of large search space and low efficiency in the process of learning the Bayesian network structure in the prior art. Through reverse learning combined with particle swarm optimization and differential evolution strategies, the convergence speed is greatly improved in the process of learning the Bayesian network structure. The mutation operator and crossover operator of the differential evolution algorithm are introduced to process the discrete Bayesian network, which improves the accuracy and efficiency of discrete Bayesian network structure learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0032] Figure 1 is a flow chart of a Bayesian network structure learning method based on reverse learning according to an embodiment of the present invention;

[0033] Figure 2 It is a detailed processing schematic diagram of Bayesian network structure learning based on reverse learning in an embodiment of the present invention;

[0034] Figure 3 is a schematic diagram of the Bayesian network structure of CANCER and ASIA in an embodiment of the present invention;

[0035] Figure 4 is a schematic diagram of the PC algorithm learning result of an embodiment of the present invention;

[0036] Figure 5 is a schematic diagram of the corresponding relationship between the directed acyclic graph and the adjacency matrix of an embodiment of the present invention;

[0037] Figure 6 is a schematic diagram of the OP-PSO-DE algorithm process of an embodiment of the present invention;

[0038] Figure 7 It is a schematic diagram of the iterative process of the OP-PSO-DE algorithm on the CANCER network according to an embodiment of the present invention;

[0039] Figure 8 It is a schematic diagram of the iterative process of the OP-PSO-DE algorithm of an embodiment of the present invention on the ASIA network;

[0040] Fig. 9 It is a schematic diagram of the iterative process of the OP-PSO-DE algorithm on the INSURANCE network according to an embodiment of the present invention;

[0041] Fig.10 is a schematic diagram of a Bayesian network structure learning device based on reverse learning according to an embodiment of the present invention;

[0042] Fig.11 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.

[0044] Method Embodiment

[0045] According to an embodiment of the present invention, a Bayesian network structure learning method based on reverse learning is provided. Figure 1 is a flow chart of a Bayesian network structure learning method based on reverse learning according to an embodiment of the present invention, such as Figure 1 As shown, the Bayesian network structure learning method based on reverse learning according to an embodiment of the present invention specifically includes:

[0046] Step S101, obtaining training samples; specifically comprising:

[0047] One or more networks for generating training samples are determined, and data sets with different sample sizes are generated according to the one or more networks corresponding to respective network structures and probability distributions, and the data sets are used as training samples.

[0048] Step S102, generating an initial solution according to the training sample based on the PC algorithm, generating a reverse solution corresponding to the initial solution based on reverse learning, sorting the initial solution and the reverse solution, determining the optimal solution truly used for optimization according to the sorting result, updating the initial parameters of the population based on the optimal solution, and completing population initialization; specifically comprising:

[0049] Taking each possible network structure in the learning process as a particle, treating each particle in the learning population, and initializing the learning parameters of the Bayesian network structure learning algorithm; based on the initialized learning parameters, randomly generating a directed acyclic graph of each particle according to the training sample, and using the PC algorithm to generate a directed subgraph based on the directed acyclic graph; combining the directed subgraph generated by the PC algorithm with its corresponding directed acyclic graph to obtain an initial solution with partial structural priors;

[0050] Based on reverse learning, a reverse solution corresponding to the initial solution is generated, and the initial solution and the reverse solution are arranged from high to low using the BIC scoring standard, and the top N solutions with the highest scores are taken as the optimal solutions for optimization, where N is the preset number of population particles;

[0051] Determine the initial position of the optimal solution, use the BIC score as the particle score of the optimal solution, update the individual best position and individual best score of each particle in the population based on the initial position and particle score of each particle, and determine the global best position and global best score of the population based on the individual best position and individual best score of each particle, wherein the global best position is the individual best position of all particles, and the global best score is the individual best score of all particles, complete the population initialization operation before Bayesian network structure learning, and obtain the first generation of individual particles and their learning parameters.

[0052] Step S103, searching for the optimal solution based on the PSO algorithm, introducing a differential evolution algorithm to process the discretization problem in the search process; specifically including:

[0053] According to formula 1-5, the optimal solution is searched based on the PSO algorithm. The differential evolution algorithm performs one mutation operation and two crossover operations in the process of updating particles in the PSO algorithm. The particle speed is updated through the mutation operation, and the particle position is updated through the crossover operation: First, the particle speed V is calculated according to formula 1 of the mutation operator. i (t), then perform two crossovers: cross the current position of the particle with the individual best solution to obtain a new solution S i (t), and then compare the current solution of each particle with the global optimal solution G best Do a cross update of the particle's position X i (t):

[0054]

[0055] X i (t) = (x i,1 (t),x i,2 (t),…,x i,d (t)) Formula 2;

[0056] S i (t)=(s i,1 (t),s i,2 (t),…,s i,d (t)) Formula 3;

[0057]

[0058] Among them, V i (t) represents the particle speed after the mutation operation, S i (t) represents the intermediate quantity after the crossover, X i (t) represents the particle position, X best (t) is the best vector among the three vectors randomly selected by the mutation operator, X r1 (t), X r2(t) represents the remaining two vectors in the three vectors. rand is the mutation probability, which is a random number in [0,1]. CR is the crossover probability. h is a random number to ensure that the algorithm can i (t) selects at least one element, s ij (t) represents the value of the i-th particle in the j-th dimension when the crossover operation is performed in the t-th iteration, v ij (t) represents the value of the velocity of the i-th particle in the j-th dimension during the t-th iteration, x ij (t) represents the value of the position of the i-th particle in the j-th dimension during the t-th iteration, d represents the dimension of the search space, i represents the i-th particle, j represents the j-th dimension, and C i =(c i,1 (t), i,2 (t),…,c i,d (t)) is the probability vector, represents the XOR operation, F is the scaling parameter used to control the learning rate, and its value is between [0,1]. σ is the perturbation parameter, and its value is between [0.001,0.01].

[0059] Step S104, repeating steps S102 to S104 to perform iterative learning until the optimal network structure is found. Specifically including:

[0060] Repeat steps S102 to S104, and continue searching until the iterative process reaches a preset number of iterations, the iterative learning ends, and the final result is output, wherein the final result specifically includes: the global optimal solution, the global best score, and the global optimal position.

[0061] The embodiment of the present invention uses the PC algorithm to obtain structural priors to improve the initial solution, and also introduces the idea of ​​reverse learning. In the process of particle swarm optimization, a reverse solution is generated, which increases the diversity of solutions while reducing random exploration, thereby improving the efficiency of the algorithm and greatly improving the convergence speed of the algorithm. Ultimately, better learning effects are achieved on some data sets than those of existing technical solutions.

[0062] In summary, the technical solution of the embodiment of the present invention is adopted to solve the problem of huge search space and low efficiency in the learning process of Bayesian network structure. The present invention introduces reverse learning to increase the diversity of solutions in the learning process of the optimal network structure, which can approach the global optimal solution faster, effectively reduce the search space of the algorithm, and improve the efficiency of the algorithm. In view of the problem that the traditional heuristic algorithm has strong randomness and slow learning speed in searching, the present invention combines reverse learning with the particle swarm optimization algorithm to greatly improve the convergence speed in the learning process of the Bayesian network structure. At the same time, the present invention adopts a method of adaptively adjusting the inertia weight and the acceleration coefficient to make the search process more stable and the learning speed faster. In view of the problem that the existing method has poor performance, the present invention generates an initial solution with a partial structure with the help of the PC algorithm in the initialization stage, improves the quality of the initial solution, reduces the process of particle swarm optimization completely randomly exploring the solution space, and thus enhances the learning effect of the algorithm in large-scale networks. In view of the problem that the existing optimization algorithm does not support discrete optimization problems enough, the present invention performs special optimization for discretization. In the learning process of the particle swarm optimization algorithm, the mutation and crossover operations of differential evolution are used to apply the particle swarm optimization algorithm that can only handle continuous problems to the learning of discrete Bayesian network structures.

[0063] The above technical solution of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings.

[0064] like Figure 2 As shown, the embodiment of the present invention first extracts the network required for research from an online open source database and generates a data set, and then obtains the initial solution of iterative optimization learning based on the PC algorithm and reverse learning. After initializing the population, the optimal network structure is searched based on the particle swarm optimization algorithm PSO, and the processing effect of the discrete Bayesian network of PSO is improved by combining the differential evolution algorithm DE. After each iteration, the particle parameters are updated, and the next generation of population is generated based on reverse learning until the optimal solution is obtained at the end of the iteration. The above process is described in detail below.

[0065] Step 1: Obtain training set samples.

[0066] The embodiment of the present invention is to learn the Bayesian network structure on different discrete networks. First, it is necessary to obtain a data set sample for learning. Specifically, the following operations are included:

[0067] 1) Select the network that generates training samples

[0068] The training set samples of the embodiment of the present invention are generated by randomly extracting networks from the Bayesian Network Repository of the R package bnlearn. The Bayesian Network Repository contains more than 31 discrete Bayesian networks of different scales and distribution types. The embodiment of the present invention randomly extracts three of the networks CANCER, ASIA, and INSURANCE to guide the probability distribution of the generated training set samples. Figure 3 As shown in the figure, CANCER and ASIA belong to small Bayesian networks with less than 20 nodes. The CANCER network has 5 nodes and 4 edges representing node relationships, describing the probability relationship between risk factors such as gene mutation and smoking and cancer occurrence. The ASIA network has 5 nodes and 8 edges, describing the association between whether the patient has been to Asia and possible lung disease. The INSURANCE network is a medium-sized Bayesian network with 27 nodes and 52 edges, which simulates the relationship between various variables in insurance risk assessment, such as age, driving experience, and vehicle type.

[0069] 2) Generate sample data

[0070] According to the randomly selected CANCER, ASIA, and INSURANCE networks, data sets with sample sizes of 500, 100, 1500, and 2000 are generated corresponding to their respective network structures and probability distributions as input data for the next stage of Bayesian network structure learning.

[0071] Step 2: Initialize the population.

[0072] In the embodiment of the present invention, each possible network structure in the learning process is regarded as a particle, and the stage of initializing the population is to obtain the first generation of particle individuals and their parameters. Each particle of the population to be learned is initialized according to the following steps.

[0073] 1) Initialize algorithm parameters

[0074] The name of the Bayesian network structure learning algorithm based on reverse learning proposed in the embodiment of the present invention is OP-PSO-DE. First, all the parameters of the OP-PSO-DE algorithm need to be set. The maximum number of iterations MaxIt is set to 100, the number of particles in the population nPop is set to 50, the number of elite individuals eli_num is set to 25, the initial value wstart and the termination value wend of the inertia weight in the particle swarm optimization are set to 0.9 and 0.35, and the acceleration coefficient parameters c10, c11, c20, and c21 in the particle swarm optimization are set to 0.84, 0.52, 0.38, and 0.81, respectively.

[0075] 2) Generate an initial solution with structural priors

[0076] In the prior art, when learning the Bayesian network structure, most of them directly randomly generate a directed acyclic graph (DAG) as an initial solution based on a sample data set. However, after randomly generating the directed acyclic graph, the embodiment of the present invention also introduces a PC algorithm to obtain a structural prior to improve the quality of the initial solution.

[0077] As a constraint-based Bayesian network structure learning algorithm, the PC algorithm determines the dependencies between nodes in the Bayesian network through the conditional independence test CI. The algorithm starts with an empty graph, gradually adds edges and performs conditional independence tests to determine which edges should be retained or deleted. After the PC algorithm is processed, a mixed structure containing directed and undirected edges is obtained, such as Figure 4 As shown, the undirected edges are not helpful for the subsequent particle swarm optimization process, so the embodiment of the present invention only selects the directed subgraph part of the PC algorithm output structure.

[0078] Specifically, after obtaining the sample data set in the previous stage, the embodiment of the present invention randomly generates a directed acyclic graph of 50 particles according to the population size nPop set in the initialization parameters, and uses the PC algorithm to learn these 50 directed acyclic graphs. The 50 directed subgraphs generated by the PC algorithm are combined with their corresponding random directed acyclic graphs to obtain an initial solution with partial structural priors. By using the PC algorithm to improve the initial solution, it is avoided that the particles search in a completely random solution space when it is not improved, and redundant calculations and explorations are significantly reduced.

[0079] In the research process of the embodiment of the present invention, Figure 5 As shown in the figure, all directed acyclic graphs corresponding to network structures are represented by adjacency matrices. This is a concept in graph theory. Specifically, the i-th node in a directed acyclic graph corresponds to the i-th row and i-th column in the adjacency matrix. If there is an edge from i to j between the i-th node and the j-th node, then the element A[i][j] in the adjacency matrix A is 1; otherwise, if there is no edge from i to j, then A[i][j] is 0.

[0080] 3) Obtaining the true initial solution based on reverse learning

[0081] Reverse learning is an effective solution to improve the convergence speed of the algorithm. Its basic principle is: first generate a solution that is opposite to the existing solution, then evaluate the existing solution and the reverse solution at the same time, and select the better individual of the two solutions as the next generation, thereby improving the algorithm's search efficiency and global optimization ability. Let X = (x1, x2, ... xd) be a solution in d-dimensional space, where xi is a real number in [ai, bi], then its opposite solution can be written as: in

[0082] Original reverse learning is often used to improve the search process of continuous optimization problems, but it can also be applied to solve binary domains. Studies have shown that reverse learning on binary domains can find candidate solutions that are closer to the global optimum. Since the solution space of the discrete Bayesian network studied in the present invention is binary, when reverse learning is applied to the search space of the present invention, the reverse solution of each particle can be written as:

[0083] The embodiment of the present invention introduces reverse learning in the initialization population, mainly to increase the diversity of solutions. Considering the existing solutions and reverse solutions and generating the next generation of individuals is conducive to improving the quality of the initial solution and accelerating the algorithm process. The specific approach is: first determine the evaluation index. The present invention uses the Bayesian Information Criterion BIC score to evaluate the quality of the network structure represented by the particle. Calculate the BIC scores of the 50 initial solutions with structural priors obtained in the previous step, generate reverse solutions of the 50 initial solutions, and thus obtain a set of 50 initial solutions and 50 corresponding reverse solutions. Since the number of particles in the population of each iteration is set to 50, the set containing 100 particles is arranged from high to bottom according to the BIC score, and the first 50 particles are selected as the true initial solution for the next stage of PSO algorithm optimization. Here, the present invention refers to the first 50 particles obtained by reverse learning according to the BIC score in each iteration as "elite individuals".

[0084] 4) Update the parameters of the initial population

[0085] After obtaining the true initial solution of the population in the previous step, the initial parameters of the population can be updated to complete the initialization. First, generate the initial position particle_position of the initial solution obtained in the previous step, and use the BIC scores of these 50 particles as the particle score particle_score. Then you need to update two parameters of each particle: the individual best position and the individual best score. For the initial solution, the current position particle_position of all particles is the individual best position particle_best_position, and the current best score particle_score of all particles is the individual best score particle_best_score. After the individual best position and score are updated, the global best position GlobalBest_Position of the population is the best position of all particles, and the global best score GlobalBest_Score is the best score of all particles. This completes the population initialization process before Bayesian network structure learning.

[0086] Step 3: Learning the optimal Bayesian network structure

[0087] The learning of the Bayesian network structure in the embodiment of the present invention is to obtain the true initial solution based on reverse learning, and then search for the optimal solution in the search space through the particle swarm optimization algorithm PSO. The present invention introduces the differential evolution algorithm to solve the problem that PSO cannot handle discrete Bayesian networks. The overall search process is iterated according to the number of iterations MaxIt set when the parameters are initialized, and the optimal solution is output after the iteration is completed. The algorithm flow of this stage is as follows Figure 5 As shown, the population initialization has been completed in the previous stage:

[0088] 1) Initialize the particle swarm optimization algorithm parameters

[0089] Particle Swarm Optimization (PSO) solves optimization problems by simulating the process of particles in a group moving in a search space. Each particle updates itself through two pieces of information: the individual optimal solution (P best ) is the optimal position of the particle itself and the global optimal solution (G best ) is the best position found by the entire particle swarm.

[0090] Each particle in the PSO algorithm search process has two properties: speed and position. The speed of the i-th particle in the d-dimensional search space is Vi = (V i 1. V i 2, ..., V i d), the position of the i-th particle is X i =(X i 1,X i 2,...,X i d) The process of finding the optimal solution of the PSO algorithm is actually to find the optimal position X of the particle i Each particle searches for the optimal solution in the search space and represents it as the extreme value P of the current individual best At the same time, each particle shares its own individual optimal solution with other particles in the entire population, and finds the optimal individual extreme value G best As the global optimal solution of the current population. In the original PSO algorithm, the equations for updating the particle's velocity and position are as follows:

[0091] V i (t+1)=V i (t)+c1r1(P best (t)-x i (t))+c2r2(G best -x i (t))

[0092] X i (t+1)=X i (t)+Vi (t+1)

[0093] Where t is the number of iterations, c1 and c2 are acceleration constants, and r1 and r2 are random numbers between 0 and 1.

[0094] The above formula is used by the original PSO algorithm to update particles when solving continuous optimization problems. The embodiment of the present invention deals with discrete Bayesian network structure learning problems. Therefore, an algorithm that solves discrete optimization problems must be found to replace the part of updating particle parameters in the PSO algorithm. Therefore, the present invention introduces a differential evolution algorithm for discretization. However, no matter which treatment is used, the parameters required for PSO optimization: inertia weight w and acceleration coefficients c1 and c2, all need to be calculated according to the corresponding formulas. Here are the formulas for calculating these coefficients by the PSO algorithm:

[0095]

[0096] The values ​​of w, c1, and c2 can be calculated according to the parameters set during initialization and the above formula.

[0097] 2) Search for the optimal solution based on particle swarm optimization and differential evolution algorithm

[0098] In order to apply the PSO algorithm to discrete problems, the present invention introduces the mutation operator and crossover operator of the differential evolution algorithm to replace the process of updating particle parameters of the PSO algorithm.

[0099] Differential Evolution (DE) is an evolutionary algorithm that can be used for discrete optimization problems. Two key operations are mainly used in the present invention: mutation operator and crossover operator. The mutation operator is an operation used to generate new candidate solutions in differential evolution. It introduces new solutions by linearly combining existing individuals, selects the best vector as the basis vector from three randomly selected vectors, and uses the difference between the remaining two vectors as the mutation probability for the basis vector, which can be used to update the particle speed in the present invention. The crossover operator is a method of obtaining new offspring by reorganizing variable elements, which can be used to update the position of particles in the present invention.

[0100] There are currently related schemes for studying the method of processing discrete Bayesian networks using mutation operators and crossover operators. According to the strategy of the BNC-PSO method, the present invention performs one mutation operation and two crossover operations in the process of PSO updating particles. Then, the formula for PSO updating particles after introducing differential evolution is:

[0101]

[0102] X i (t) = (x i,1 (t),xo,2 (t),…,x i,d (t)) Formula 2;

[0103] S i (t)=(s i,1 (t),s i,2 (t),…,s i,d (t)) Formula 3;

[0104]

[0105] Among them, V i (t) represents the particle speed after the mutation operation, S i (t) represents the intermediate quantity after the crossover, X i (t) represents the particle position, X best (t) is the best vector among the three vectors randomly selected by the mutation operator, X r1 (t), X r2 (t) represents the remaining two vectors in the three vectors. rand is the mutation probability, which is a random number in [0,1]. CR is the crossover probability. h is a random number to ensure that the algorithm can i (t) selects at least one element, s ij (t) represents the value of the i-th particle in the j-th dimension when the crossover operation is performed in the t-th iteration, v ij (t) represents the value of the velocity of the i-th particle in the j-th dimension during the t-th iteration, x ij (t) represents the value of the position of the i-th particle in the j-th dimension during the t-th iteration, d represents the dimension of the search space, i represents the i-th particle, j represents the j-th dimension, and C i =(c i,1 (t),c i,2 (t),…,c i,d (t)) is a probability vector, ⊕ represents an XOR operation, F is a scaling parameter used to control the learning rate, and its value is between [0,1]. σ is a perturbation parameter, and its value is between [0.001,0.01].

[0106] The embodiment of the present invention combines PSO with DE to complete the search for the optimal solution of particles based on PSO-DE. After obtaining the parameters required for particle swarm optimization in the previous step, the particles in the population need to undergo one mutation operation and two crossover operations. First, the particle velocity Vi(t) is calculated according to the formula of the mutation operator, and then two crossovers are performed: the current position of the particle is crossed with the individual best solution according to the above calculation formula to obtain a new solution Si(t), and then the current solution of each particle is crossed with the global best solution Gbest to update the particle position Xi(t).

[0107] 3) Generate the next generation population based on reverse learning

[0108] In addition to using the reverse learning method to obtain the initial solution when initializing the population, the embodiment of the present invention uses reverse learning again to obtain the next generation of particles after updating the particle parameters based on PSO-DE in each iteration. That is, repeat the steps when obtaining the initial solution: calculate the reverse solution of all 50 particles updated by PSO-DE in the previous step, obtain a set of 50 current feasible solutions and 50 reverse solutions, sort them from high to low according to the BIC score, select the top 50 individuals with higher scores as the next generation population, and update the individual optimal solution and the global optimal solution of the population. In this way, reverse learning is introduced into every process of iterative learning, reducing the risk of the algorithm falling into the local optimum and increasing the diversity of solutions.

[0109] 4) Iterate learning until the optimal solution is output.

[0110] The search is continued according to the above steps until the iterative process reaches the preset number of iterations MaxIt, at which point the iterative learning ends and the algorithm outputs the final results: the global optimal solution, the global best score, and the global optimal position.

[0111] Step 4: Algorithm learning results and comparative analysis

[0112] According to the above Bayesian network structure learning scheme, the embodiment of the present invention learns the corresponding optimal Bayesian network structure on the three data sets of CANCER, ASIA, and INSURANCE with sample sizes of 500, 1000, 1500, and 2000 respectively. In order to evaluate the performance of the OP-PSO-DE algorithm, the embodiment of the present invention compares the performance of the algorithm with the commonly used Bayesian network structure learning algorithms PC-PSO, BNC-PSO, Hybrid HPC, and MMHC in the prior art solutions. All experimental results are the average values ​​of 10 experiments.

[0113] First, in order to verify the correctness of the learning results of the OP-PSO-DE algorithm, the embodiment of the present invention uses the BIC score as an evaluation index, and compares the BIC scores of the structures learned by the algorithm on various data sets with the scores of the real network structures. The final convergence results of the algorithm are as follows:

[0114] Table 1 OP-PSO-DE algorithm results

[0115]

[0116]

[0117] The brackets in Table 1 indicate the BIC scores of the real network structure on the data set of the corresponding sample size. According to the results in Table 1, it can be seen that the algorithm proposed in the embodiment of the present invention can obtain a BIC score that is very close to the real structure in the brackets.

[0118] The BIC scores of the OP-PSO-DE algorithm and the other four learning algorithms on each data set are compared, and the results are shown in Table 2, Table 3, and Table 4:

[0119] Table 2 Results of different algorithms on the CANCER dataset

[0120]

[0121] Table 3 Results of different algorithms on the ASIA dataset

[0122]

[0123] Table 4 Results of different algorithms on the INSURANCE dataset

[0124]

[0125] It can be seen from Tables 2, 3 and 4 that, compared with other existing structure learning algorithms, the OP-PSO-DE algorithm obtains the best BIC score when the sample size of the CANCER network is 500 and 1500; and when the sample size of the CANCER network is 2000, the BIC score of OP-PSO-DE is still better than that of PC-PSO and BNC-PSO. In the ASIA network, when the sample size is 500, 1000, 1500 and 2000, the BIC score obtained by OP-PSO-DE is better than that of PC-PSO, BNC-PSO, Hybrid HPC and MMHC. In addition, the OP-PSO-DE algorithm also achieves the best BIC score when the sample size is 500 on the INSURANCE network, and the gap with the BIC score of the true structure is smaller than that of the other four algorithms.

[0126] In order to evaluate the convergence ability of the OP-PSO-DE algorithm learning process, the embodiment of the present invention demonstrates the convergence process of the algorithm, and uses the number of iterations as an evaluation indicator to compare the number of iterations of the algorithm on various network data sets with PC-PSO and BNC-PSO. Since the principles of the Hybrid HPC and MMHC algorithms are different from the other three algorithms, their implementation processes cannot count the iteration time, so they are not included in the comparative experiment. The results are as follows: Figure 7 , Figure 8 , Fig. 9 As shown in Table 5:

[0127] Table 5 The number of iterations required for different heuristic algorithms to converge

[0128]

[0129] Depend on Figure 7 , Figure 8 , Fig. 9 It can be seen that the number of iterations of the algorithm proposed in the embodiment of the present invention increases with the increase of the network scale. As shown in Table 5, the convergence speed of the algorithm proposed in the embodiment of the present invention on the CANCER, ASIA and INSURANCE networks is better than that of other heuristic algorithms, which verifies the convergence ability of the OP-PSO-DE algorithm.

[0130] In summary, the embodiments of the present invention have the following beneficial effects:

[0131] 1. The present invention introduces reverse learning to increase the diversity of understanding in the process of finding the optimal network structure, which can approach the global optimal solution more quickly, and effectively avoids the problems of large search space and low efficiency in the process of learning Bayesian network structure in the prior art.

[0132] 2. In response to the problems of strong randomness and slow convergence speed of heuristic algorithm searches involved in the prior art, the present invention greatly improves the convergence speed in the learning process of the Bayesian network structure through reverse learning combined with particle swarm optimization and differential evolution strategies. The invention verifies that the convergence speed of the proposed algorithm is better than that of several existing heuristic algorithms.

[0133] 3. In view of the problem that the existing technology does not provide sufficient support for discretized Bayesian networks, the present invention introduces the mutation operator and crossover operator of the differential evolution algorithm to process the discrete Bayesian network, thereby improving the accuracy and efficiency of the discrete Bayesian network structure learning. The invention verifies that the learning ability of the proposed algorithm on partial-scale sample data sets of the three discrete networks CANCER, ASIA, and INSURANCE is superior to that of several existing advanced structure learning algorithms.

[0134] Device Example 1

[0135] According to an embodiment of the present invention, a Bayesian network structure learning device based on reverse learning is provided. Fig.10 is a schematic diagram of Bayesian network structure learning based on reverse learning in an embodiment of the present invention, such as Fig.10 As shown, the Bayesian network structure learning based on reverse learning according to an embodiment of the present invention specifically includes:

[0136] The acquisition module 100 is used to acquire training samples. The acquisition module 100 is specifically used to: determine one or more networks for generating training samples, generate data sets of different sample sizes according to the one or more networks and their respective network structures and probability distributions, and use the data sets as training samples;

[0137] The population initialization module 102 is used to generate an initial solution according to the training sample based on the PC algorithm, generate a reverse solution corresponding to the initial solution based on reverse learning, sort the initial solution and the reverse solution, determine the optimal solution truly used for optimization according to the sorting result, update the initial parameters of the population based on the optimal solution, and complete population initialization; the population initialization module 102 is specifically used to:

[0138] Taking each possible network structure in the learning process as a particle, treating each particle in the learning population, and initializing the learning parameters of the Bayesian network structure learning algorithm; based on the initialized learning parameters, randomly generating a directed acyclic graph of each particle according to the training sample, and using the PC algorithm to generate a directed subgraph based on the directed acyclic graph; combining the directed subgraph generated by the PC algorithm with its corresponding directed acyclic graph to obtain an initial solution with partial structural priors;

[0139] Based on reverse learning, a reverse solution corresponding to the initial solution is generated, and the initial solution and the reverse solution are arranged from high to low using the BIC scoring standard, and the top N solutions with the highest scores are taken as the optimal solutions for optimization, where N is the preset number of population particles;

[0140] Determine the initial position of the optimal solution, use the BIC score as the particle score of the optimal solution, update the individual best position and individual best score of each particle in the population based on the initial position and particle score of each particle, and determine the global best position and global best score of the population based on the individual best position and individual best score of each particle, wherein the global best position is the individual best position of all particles, and the global best score is the individual best score of all particles, complete the population initialization operation before Bayesian network structure learning, and obtain the first generation of individual particles and their learning parameters.

[0141] The algorithm module 104 is used to search for the optimal solution based on the PSO algorithm, introduce the differential evolution algorithm to deal with the discretization problem of the search process; repeatedly call the population initialization module and the algorithm module for iterative learning until the optimal network structure is searched. The algorithm module 104 is specifically used for:

[0142] According to formula 1-5, the optimal solution is searched based on the PSO algorithm. The differential evolution algorithm performs one mutation operation and two crossover operations in the process of updating particles in the PSO algorithm. The particle speed is updated through the mutation operation, and the particle position is updated through the crossover operation: First, the particle speed V is calculated according to formula 1 of the mutation operator. i (t), then perform two crossovers: cross the current position of the particle with the individual best solution to obtain a new solution S i (t), and then compare the current solution of each particle with the global optimal solution G best Do a cross update of the particle's position X i (t):

[0143]

[0144] X i (t) = (x i,1 (t),x i,2 (t),…,x i,d (t)) Formula 2;

[0145] S i (t)=(s i,1 (t),s i,2 (t),…,s i,d (t)) Formula 3;

[0146]

[0147] Among them, V i (t) represents the particle speed after the mutation operation, S i (t) represents the intermediate quantity after the crossover, X i (t) represents the particle position, X best (t) is the best vector among the three vectors randomly selected by the mutation operator, X r1 (t), X r2 (t) represents the remaining two vectors in the three vectors. rand is the mutation probability, which is a random number in [0,1]. CR is the crossover probability. h is a random number to ensure that the algorithm can i (t) selects at least one element, s ij (t) represents the value of the i-th particle in the j-th dimension when the crossover operation is performed in the t-th iteration, v ij (t) represents the value of the velocity of the i-th particle in the j-th dimension during the t-th iteration, x ij (t) represents the value of the position of the i-th particle in the j-th dimension during the t-th iteration, d represents the dimension of the search space, i represents the i-th particle, j represents the j-th dimension, and C i =(c i,1 (t),c i,2(t),…,c i,d (t)) is the probability vector, represents the XOR operation, and F is a scaling parameter used to control the learning rate, and its value is between [0,1].

[0148] The population initialization module and the algorithm module are called repeatedly, and the search is continuously performed until the iterative process reaches a preset number of iterations, the iterative learning ends, and the final result is output, wherein the final result specifically includes: the global optimal solution, the global best score and the global optimal position.

[0149] The embodiment of the present invention is a device embodiment corresponding to the above method embodiment. The specific operations of each module can be understood by referring to the description of the method embodiment, which will not be repeated here.

[0150] Device Example 2

[0151] An embodiment of the present invention provides an electronic device, such as Figure 5 As shown, it includes: a memory 110, a processor 112, and a computer program stored in the memory 110 and executable on the processor 112, and when the computer program is executed by the processor 112, the steps described in the method embodiment are implemented.

[0152] Device Example 3

[0153] An embodiment of the present invention provides a computer-readable storage medium, on which a program for implementing information transmission is stored. When the program is executed by the processor 112, the steps described in the method embodiment are implemented.

[0154] The computer-readable storage medium in this embodiment includes, but is not limited to, ROM, RAM, magnetic disk or optical disk, etc.

[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A Bayesian network structure learning method based on reverse learning, characterized in that: include: Step 1, obtain training samples; Step 2: Generate an initial solution based on the training sample based on the PC algorithm, generate a reverse solution corresponding to the initial solution based on reverse learning, sort the initial solution and the reverse solution, determine the optimal solution truly used for optimization based on the sorting result, update the initial parameters of the population based on the optimal solution, and complete the population initialization; Step 3: Search for the optimal solution based on the PSO algorithm, and introduce the differential evolution algorithm to deal with the discretization problem of the search process; Step 4: Repeat steps 2 to 4 for iterative learning until the optimal network structure is found.

2. The method according to claim 1, characterized in that The step 1 specifically includes: One or more networks for generating training samples are determined, and data sets with different sample sizes are generated according to the one or more networks corresponding to respective network structures and probability distributions, and the data sets are used as training samples.

3. The method according to claim 1, characterized in that The step 2 specifically includes: Taking each possible network structure in the learning process as a particle, treating each particle in the learning population, and initializing the learning parameters of the Bayesian network structure learning algorithm; based on the initialized learning parameters, randomly generating a directed acyclic graph of each particle according to the training sample, and using the PC algorithm to generate a directed subgraph based on the directed acyclic graph; combining the directed subgraph generated by the PC algorithm with its corresponding directed acyclic graph to obtain an initial solution with partial structural priors; Based on reverse learning, a reverse solution corresponding to the initial solution is generated, and the initial solution and the reverse solution are arranged from high to low using the BIC scoring standard, and the top N solutions with the highest scores are taken as the optimal solutions for optimization, where N is the preset number of population particles; Determine the initial position of the optimal solution, use the BIC score as the particle score of the optimal solution, update the individual best position and individual best score of each particle in the population based on the initial position and particle score of each particle, and determine the global best position and global best score of the population based on the individual best position and individual best score of each particle, wherein the global best position is the individual best position of all particles, and the global best score is the individual best score of all particles, complete the population initialization operation before Bayesian network structure learning, and obtain the first generation of individual particles and their learning parameters.

4. The method according to claim 1, characterized in that: The step 3 specifically includes: According to formula 1-4, the optimal solution is searched based on the PSO algorithm. The differential evolution algorithm performs one mutation operation and two crossover operations in the process of updating particles in the PSO algorithm. The particle speed is updated through the mutation operation, and the particle position is updated through the crossover operation: First, the particle speed V is calculated according to formula 1 of the mutation operator i (t), then perform two crossovers: cross the current position of the particle with the individual best solution to obtain a new solution S i (t), and then compare the current solution of each particle with the global optimal solution G best Do a cross update of the particle's position X i (t): X i (t) = (x i,1 (t),x i,2 (t),…,x i,d (t)) Formula 2; S i (t)=(s i,1 (t),s i,2 (t),…,s i,d (t)) Formula 3; Among them, V i (t) represents the particle speed after the mutation operation, S i (t) represents the intermediate quantity after the crossover, X i (t) represents the particle position, X best (t) is the best vector among the three vectors randomly selected by the mutation operator, X r1 (t), X r2 (t) represents the remaining two vectors in the three vectors. rand is the mutation probability, which is a random number in [0,1]. CR is the crossover probability. h is a random number to ensure that the algorithm can i (t) selects at least one element, s ij (t) represents the value of the i-th particle in the j-th dimension when the crossover operation is performed in the t-th iteration, v ij (t) represents the value of the velocity of the i-th particle in the j-th dimension during the t-th iteration, x ij (t) represents the value of the position of the i-th particle in the j-th dimension during the t-th iteration, d represents the dimension of the search space, i represents the i-th particle, j represents the j-th dimension, and C i =(c i,1 (t),c i,2 (t),…,c i,d (t)) is the probability vector, represents the XOR operation, F is the scaling parameter used to control the learning rate, and its value is between [0,1], and σ is the perturbation parameter, and its value is between [0.001,0.01].

5. The method according to claim 1, characterized in that Step 4 specifically includes: Repeat steps 2 to 4, and continue searching until the iterative process reaches a preset number of iterations, the iterative learning ends, and the final result is output, wherein the final result specifically includes: the global optimal solution, the global best score, and the global optimal position.

6. A Bayesian network structure learning device based on reverse learning, characterized in that: include: An acquisition module, used to acquire training samples; A population initialization module is used to generate an initial solution according to the training sample based on the PC algorithm, generate a reverse solution corresponding to the initial solution based on reverse learning, sort the initial solution and the reverse solution, determine the optimal solution truly used for optimization according to the sorting result, update the initial parameters of the population based on the optimal solution, and complete population initialization; The algorithm module is used to search for the optimal solution based on the PSO algorithm. The differential evolution algorithm is introduced to deal with the discretization problem of the search process. The population initialization module and the algorithm module are repeatedly called for iterative learning until the optimal network structure is found.

7. The device according to claim 6, characterized in that The acquisition module is specifically used to: determine one or more networks for generating training samples, generate data sets with different sample sizes according to the one or more networks and corresponding to their respective network structures and probability distributions, and use the data sets as training samples; The population initialization module is specifically used for: Taking each possible network structure in the learning process as a particle, treating each particle in the learning population, and initializing the learning parameters of the Bayesian network structure learning algorithm; based on the initialized learning parameters, randomly generating a directed acyclic graph of each particle according to the training sample, and using the PC algorithm to generate a directed subgraph based on the directed acyclic graph; combining the directed subgraph generated by the PC algorithm with its corresponding directed acyclic graph to obtain an initial solution with partial structural priors; Based on reverse learning, a reverse solution corresponding to the initial solution is generated, and the initial solution and the reverse solution are arranged from high to low using the BIC scoring standard, and the top N solutions with the highest scores are taken as the optimal solutions for optimization, where N is the preset number of population particles; Determine the initial position of the optimal solution, use the BIC score as the particle score of the optimal solution, update the individual best position and individual best score of each particle in the population based on the initial position and particle score of each particle, and determine the global best position and global best score of the population based on the individual best position and individual best score of each particle, wherein the global best position is the individual best position of all particles, and the global best score is the individual best score of all particles, complete the population initialization operation before Bayesian network structure learning, and obtain the first generation of individual particles and their learning parameters.

8. The device according to claim 6, characterized in that The algorithm module is specifically used for: According to formula 1-4, the optimal solution is searched based on the PSO algorithm. The differential evolution algorithm performs one mutation operation and two crossover operations in the process of updating particles in the PSO algorithm. The particle speed is updated through the mutation operation, and the particle position is updated through the crossover operation: First, the particle speed V is calculated according to formula 1 of the mutation operator i (t), then perform two crossovers: cross the current position of the particle with the individual best solution to obtain a new solution S i (t), and then compare the current solution of each particle with the global optimal solution G best Do a cross update of the particle's position X i (t): X i (t) = (x i,1 (t),x i,2 (t),…,x i,d (t)) Formula 2; S i (t)=(s i,1 (t),s i,2 (t),…,s i,d (t)) Formula 3; Among them, V i (t) represents the particle speed after the mutation operation, S i (t) represents the intermediate quantity after the crossover, X i (t) represents the particle position, X best (t) is the best vector among the three vectors randomly selected by the mutation operator, X r1 (t), X r2 (t) represents the remaining two vectors in the three vectors. rand is the mutation probability, which is a random number in [0,1]. CR is the crossover probability. h is a random number to ensure that the algorithm can i (t) selects at least one element, s ij (t) represents the value of the i-th particle in the j-th dimension when the crossover operation is performed in the t-th iteration, v ij (t) represents the value of the velocity of the i-th particle in the j-th dimension during the t-th iteration, x ij (t) represents the value of the position of the i-th particle in the j-th dimension during the t-th iteration, d represents the dimension of the search space, i represents the i-th particle, j represents the j-th dimension, and C i =(c i,1 (t), i,2 (t),…,c i,d (t)) is the probability vector, represents the XOR operation, F is a scaling parameter used to control the learning rate, and its value is between [0,1]; The population initialization module and the algorithm module are called repeatedly, and the search is continuously performed until the iterative process reaches a preset number of iterations, the iterative learning ends, and the final result is output, wherein the final result specifically includes: the global optimal solution, the global best score and the global optimal position.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the Bayesian network structure learning method based on reverse learning are implemented as described in any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an implementation program for information transmission, and when the program is executed by a processor, the steps of the Bayesian network structure learning method based on reverse learning as described in any one of claims 1 to 5 are implemented.