A bayesian network-based intelligent diagnosis method for learners
By constructing a learner intelligent diagnostic method using Bayesian networks and triple-encoded Transformers, this method addresses the shortcomings of existing methods in representing complex dependencies between knowledge points, achieving high-precision, interpretable, and efficient learner diagnosis, and supporting real-time and high-frequency diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YUNNAN UNIV
- Filing Date
- 2026-05-07
- Publication Date
- 2026-06-05
AI Technical Summary
Existing intelligent diagnostic methods for learners struggle to accurately represent the nonlinear and noncompensatory dependencies between knowledge points when dealing with high-dimensional knowledge attributes. Furthermore, the diagnostic results lack interpretability and are computationally inefficient, making it difficult to meet the needs of real-time or high-frequency diagnostics.
We adopt a learner-based intelligent diagnostic method based on Bayesian networks. By constructing directed acyclic graphs and bidirectional weighted graphs, and combining them with triple-encoding Transformers for knowledge point embedding, we transform the problem into a path search problem with the maximum decoding information content. We then utilize offline KNN graph indexing and greedy search to achieve efficient diagnosis.
It achieves high-precision modeling of complex hierarchical and dependency relationships of knowledge points, provides interpretable diagnostic conclusions, and significantly improves diagnostic efficiency, supporting high-frequency diagnostic needs in real-time interaction with learners.
Smart Images

Figure CN122153347A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent education technology, specifically to a learner intelligent diagnostic method based on Bayesian networks, which is used to perform refined, interpretable, and efficient quantitative assessment and inference of learners' knowledge mastery status. Background Technology
[0002] In intelligent education systems, accurate diagnosis of learners' knowledge status is a core prerequisite for personalized teaching recommendations and interventions. Unlike traditional education's simple right / wrong binary evaluation of test results, intelligent learner diagnosis aims to analyze learners' answer data to uncover the inherent logic and hierarchical dependencies between knowledge points, thereby achieving a multi-dimensional and fine-grained detection of learners' knowledge status.
[0003] Currently, mainstream learner intelligent diagnostic methods can be mainly divided into the following three categories: Classical psychometric methods treat learners' abilities as potential continuous variables, exemplified by Multidimensional Item Response Theory (MIRT). These methods construct a "question-knowledge point" correlation matrix (Q-matrix) and use multidimensional probability functions to estimate learners' abilities across various cognitive attributes. For example, Lin Zizhi et al. used MIRT to analyze mathematical literacy tests, while Zhan Peida et al. used a confirmatory compensated multidimensional IRT model for cognitive diagnostic assessment. However, these methods have numerous model parameters, high computational complexity, and require extremely large sample sizes. They are prone to parameter estimation non-convergence when dealing with high-dimensional knowledge attributes and struggle to effectively characterize the nonlinear and non-compensatory dependencies between knowledge points.
[0004] Logical diagnostic methods based on rules and expert systems are a typical application of symbolic artificial intelligence. These methods rely on experts manually compiling expert knowledge bases containing numerous "if-then" rules, and then using logical reasoning to diagnose learners' knowledge mastery. For example, Li Shanbin et al. proposed a cognitive diagnostic method based on relation enhancement and causal reasoning, while Tang Jiuyang et al. used large language models to construct heterogeneous concept graphs and perform reasoning. Although these methods are highly interpretable, their development costs are extremely high, requiring significant human investment in rule writing and maintenance, resulting in low diagnostic efficiency, poor scalability, and difficulty in adapting to dynamically changing knowledge systems and large-scale educational applications.
[0005] Knowledge tracking methods based on deep learning and sequence modeling treat learners' historical interaction records (such as question numbers, knowledge point tags, and correctness of answers) as time series. They implicitly capture the dynamic changes in learners' knowledge states using deep learning models such as Recurrent Neural Networks (RNNs), Long Short-Term Memory Networks (LSTMs), and Transformers, and predict future answer performance. For example, Huang Tao et al. proposed a high-order cognitive diagnosis method based on multi-layer attention networks, while Guo Longjiang et al. used multi-layer attention neural networks for cognitive diagnosis. Although these methods have certain advantages in prediction accuracy, their models are essentially "black boxes." The generation process of diagnostic results lacks interpretability, and teachers and learners cannot clearly understand the knowledge attribution and reasoning paths behind the diagnostic conclusions, making it difficult to directly translate them into effective teaching intervention strategies.
[0006] Therefore, how to achieve quantitative modeling of complex dependencies between knowledge points, provide interpretable diagnostic conclusions, and significantly improve computational efficiency in multiple diagnostic scenarios while ensuring diagnostic accuracy is a technical problem that urgently needs to be solved in the field of intelligent education technology. Summary of the Invention
[0007] The purpose of this invention is to provide a learner intelligent diagnosis method based on Bayesian networks to address the aforementioned problems.
[0008] The technical solution of the present invention is as follows: A learner intelligent diagnosis method based on Bayesian networks includes the following steps: The knowledge points are modeled as binary random variable nodes. A directed acyclic graph is constructed based on the pre-requirement dependencies between knowledge points, and a conditional probability table is constructed for each directed edge to form a Bayesian network of the learner's knowledge state. Based on Bayesian networks, simulated samples are generated using a forward sampling method, and mutual information between knowledge points is calculated based on the simulated samples. A bidirectional weighted graph is constructed using mutual information as edge weights. Based on bidirectional weighted graphs and Bayesian networks, a triple encoding system is implemented, which includes node centrality encoding, shortest weighted path encoding, and edge encoding. The triple encoding Transformer is used to embed knowledge point nodes. The problem of intelligent diagnosis of learners is transformed into the problem of finding the path with the maximum amount of decoding information. The optimal diagnostic path from the evidence node to the query node is found based on node embedding and bidirectional weighted graph search. The learner's diagnostic probability for the queried knowledge point is calculated based on the optimal diagnostic path, and the diagnostic result is output.
[0009] A further technical solution is that the Bayesian network that forms the learner's knowledge state specifically includes: Factorize the joint probability of the Bayesian network according to the following formula: , in This represents the joint probability distribution of the states of all knowledge points; express The set of parent nodes, Indicates the state of mastery of given predecessor knowledge points Conditional probability that has been acquired; multiplication symbol For all knowledge points Traversal, when When there is no parent node Degenerate into prior probability The parameters of the conditional probability table are obtained through maximum likelihood estimation of historical learning data. , in, This indicates the number of learner samples in historical learning data that meet the conditions in parentheses. This indicates that when the set of parent nodes takes the value At that time, learners master the knowledge points The conditional probability; Assign values to a specific set of states of the parent node set; thereby quantifying the impact of the previous knowledge mastery state on the subsequent knowledge learning.
[0010] Furthermore, the step of generating simulated samples and calculating mutual information through forward sampling based on Bayesian networks includes: Sample each knowledge point according to the following formula, in topological order. The possible values of: , in For the number of samples, The parent node has already sampled the value; when When the sample size is large enough, the statistical distribution of the simulated sample approaches the true joint probability distribution of the Bayesian network; Then calculate the mutual information according to the following formula: , in, Representing knowledge points and Mutual information between them The sample estimate representing the joint probability. , These represent the sample estimates of the marginal probabilities of each knowledge point; The mutual information is used as the edge weights of the bidirectional weighted graph, where both forward and reverse edges in the bidirectional weighted graph are assigned the same mutual information weights.
[0011] Furthermore, the node centrality encoding includes: Get each knowledge point node Attribute feature vector In-degree in Bayesian networks and out-degree The initial embedding vector is calculated according to the following formula. : , in For linear transformation layer, Represents the node attribute feature vector. , These are the projection parameter matrices for the in-degree and out-degree, respectively. Representing knowledge points The initial embedding vector; when the in-degree of a knowledge point is large, its initial embedding vector incorporates stronger predecessor dependency signals.
[0012] Furthermore, the shortest weighted path encoding includes: Calculate any two nodes in a bidirectional weighted graph and Shortest path distance between Add it as a bias term to the Transformer self-attention matrix: , in Embed the matrix for the node. For projection parameters, For the projection dimension, These are learnable bias parameters indexed by path distance. The offset is the transpose of the matrix; the smaller the shortest path distance between two knowledge points, the smaller the bias. The larger the value, the higher the attention weight.
[0013] Furthermore, the edge encoding specifically includes: Obtain directed edges in a Bayesian network conditional probability and directional signs Among them, the positive edges reverse edge ; Calculate the edge encoding bias according to the following formula : , in The parameters are learnable scalars; and the edge encoding bias is used as an additional term in the attention matrix; when Approaching 1 and hour, Taking a larger positive value makes the model prioritize modeling strong dependencies that are passed along the knowledge-first-learning direction.
[0014] Furthermore, when using the triple-encoded Transformer for node embedding, the fused attention matrix is as follows: , in For standard self-attention dot product terms, For learnable scaling parameters, The edge encoding bias is used; then the multi-head attention output is calculated according to the following formula: , in , indicating the first The output of each attention head, For the number of attention heads, The projection matrix is the output of multiple heads; then it is processed through residual connections and layer normalization: , , in, Presentation layer normalization operation, This represents the intermediate embedding matrix after residual connection and normalization. This represents a feedforward network consisting of two linear transformations and activation functions. Embed the matrix for the final node. For knowledge points The low-dimensional embedding vector; Output the final node embedding matrix .
[0015] Furthermore, the transformation of the learner intelligent diagnosis problem into a path search problem with the maximum decoding information content specifically includes: Calculate from the evidence node according to the following formula. To the query node Decoding information content ,in Mutual information between the two knowledge points; The diagnostic objective is equivalent to finding the diagnostic path that maximizes the sum of the total mutual information of the paths. : , in Edges in a bidirectional weighted graph Mutual information weights, Indicates all from the set of evidence nodes Starting from a certain node and arriving at the query node Among the feasible paths, the path with the largest sum of mutual information is selected. According to Shannon's information theory, this maximization is equivalent to minimizing the path conditional entropy, thus transforming the NP-hard exact probability inference problem into the maximum weighted path problem.
[0016] Furthermore, it also includes offline graph index construction and online greedy search, specifically including: Based on the obtained node embedding matrix The similarity between the embedding vectors of any two nodes is calculated using the following formula: , in, Represents the embedding vector and Similarity between them Let Euclidean distance represent the distance between two embedding vectors. The reciprocal of the Euclidean distance is taken so that the similarity is inversely proportional to the distance. Select the node with the highest similarity The nodes form the K-nearest neighbor graph index; the candidate edges in the K-nearest neighbor graph are filtered by information content threshold, and the edges with mutual information weights greater than a preset threshold are retained according to the following formula. The edge: , in, An indicator function that indicates whether an edge is preserved; During online diagnosis, a greedy best-first search is used to search for the optimal diagnostic path in the filtered graph index, and the next-hop node is selected according to the following formula: , in This represents the next node chosen greedily. This represents the set of valid candidate neighbors after filtering by the information content threshold. This is the set of valid candidate neighbors after threshold filtering.
[0017] Furthermore, the diagnostic probability of the computational learner for the queried knowledge point includes: Obtain the optimal diagnostic path Each node Marginal probability of control and query node embedding Embedded with path nodes similarity The weighted estimate is calculated according to the following formula: , , in, and The weighted estimates for query node values of 1 and 0, respectively; The final diagnosis probability is obtained by normalization according to the following formula: .
[0018] Compared with existing technologies, the advantages of this invention are: 1. This invention achieves high-precision modeling of complex hierarchical and quantitative dependencies among knowledge points, significantly improving diagnostic accuracy and generalization ability. Addressing the deficiency pointed out in the background art that "existing methods cannot accurately represent the complex hierarchical structure and probabilistic dependencies between knowledge points," this invention achieves the following results through a joint modeling method of "Bayesian network construction" and "bidirectional weighted graph construction": A unified qualitative and quantitative modeling mechanism: First, a directed acyclic graph (DAG) is used to intuitively and accurately describe the prerequisite dependencies between knowledge points qualitatively; then, by constructing a conditional probability table (CPT) for each directed edge and using mutual information (MI) as the edge weights of the bidirectional weighted graph, the strength of dependencies between knowledge points is accurately quantitatively characterized. This successfully overcomes the drawbacks of static and nonlinear classical psychometric methods and the reliance on subjective experience in expert system methods. Verification of accurate diagnostic ability: Through the above modeling, this invention can express learners' mastery status in different knowledge dimensions in a refined manner. The data from the examples show that the present invention achieves an AUC of 0.854 on the public dataset ASSISTments 2009-2010, which is comparable to the complex deep learning method DKT (0.860) and significantly outperforms the traditional BKT method (0.730), demonstrating its high accuracy and good generalization ability in modeling complex knowledge dependencies. 2. This invention provides interpretable diagnostic conclusions with information-theoretic semantics and causal attribution capabilities, overcoming the "black box" drawbacks of deep learning methods. Addressing the shortcomings of "poor interpretability of diagnostic results and opaque reasoning processes" pointed out in the background, this invention achieves the following effects through an innovative framework combining "triple encoding Transformer" and "information-theoretic equivalent transformation": Transparent diagnostic path: This invention, for the first time, transforms the learner's diagnostic inference goal from traditional precise probability inference into an equivalent "maximum decoding information content path search" problem. This makes each diagnostic conclusion no longer an isolated probability value, but rather a concrete, information-theoretic semantic knowledge-dependent path (e.g., from "fraction addition and subtraction" to "fraction conversion" and then to "percentage calculation"). Operable causal attribution: This path clearly demonstrates the information transmission process from known evidence nodes to target query nodes, allowing teachers and learners to intuitively understand the knowledge attribution and reasoning logic behind the diagnostic conclusions (e.g., clearly knowing that a student's poor understanding of "cylinder volume" is due to a lack of understanding of "cubic prism volume"). This provides teachers with diagnostic evidence that can directly guide teaching interventions, significantly improving the credibility and practicality of diagnostic results; 3. A highly efficient multi-stage diagnostic framework of "train once, infer multiple times" was constructed, achieving an order-of-magnitude improvement in diagnostic efficiency. Addressing the shortcomings of the background technology, namely the high computational complexity of precise probability inference methods, which makes it difficult to meet the needs of real-time or high-frequency diagnosis, this invention achieves the following results through a mechanism combining "offline KNN graph index construction" and "online greedy best-priority search": Significant reduction in complexity: This invention reduces the complexity of online single-stage diagnosis from an exponential level (O(2^3)) to that of traditional precise variable elimination (VE) methods. n The computational speed is reduced to near linear. Example data shows that in a Bayesian network containing 10 knowledge points, traditional exact inference takes 1.24 seconds per iteration, while the greedy search based on graph indexing in this invention takes only 0.008 seconds, achieving an acceleration of approximately 155 times. Efficient reuse mode: Node embedding training and KNN graph index construction are completed offline in one step, and all subsequent diagnostic requests can directly reuse this index without repeatedly performing complex probabilistic inference or model training. This fundamentally solves the efficiency bottleneck of traditional methods requiring recalculation for each diagnosis, enabling this invention to perfectly support the high-frequency, dynamic knowledge diagnosis needs during real-time interaction with learners, and possessing significant practical application value. Attached Figure Description
[0019] Figure 1 This is a flowchart of a learner intelligent diagnosis method based on Bayesian networks. Detailed Implementation
[0020] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0021] The features and performance of the present invention will be further described in detail below with reference to embodiments.
[0022] Please see Figure 1 A learner intelligent diagnosis method based on Bayesian networks includes the following steps: Constructing a Bayesian network based on learner knowledge states: Knowledge points are modeled as random variable nodes: To describe learners' knowledge mastery status in a knowledge domain, this application models knowledge points as random variable nodes in a Bayesian Network (BN) and represents the probabilistic dependencies between knowledge points using a Directed Acyclic Graph (DAG).
[0023] Get a collection of knowledge points and the dependencies between knowledge points, among which It is a binary random variable. This indicates that the learner has mastered the knowledge. Indicates not yet known; directed edge express yes Precursor dependencies; express The set of parent nodes in a DAG.
[0024] Factoring the joint probability of BN yields the joint probability distribution of the knowledge states: , in, This represents the joint probability distribution of the states of all knowledge points; express The set of parent nodes, Indicates the state of mastery of given predecessor knowledge points Conditional probability that has been acquired; multiplication symbol For all knowledge points Traversal.
[0025] when When there is no parent node, Degenerate into prior probability This indicates that the learner's mastery of this knowledge point is independent of other knowledge points and is determined solely by their prior knowledge of that knowledge.
[0026] Parameterization of conditional probability tables: To accurately characterize the dependency strength between knowledge points, this invention provides a method for each directed edge in Batch Normalization (BN). We construct a Condition Probability Table (CPT) to quantify the impact of prior knowledge mastery on subsequent knowledge learning.
[0027] Get directed edges Assignment to the corresponding set of parent nodes ,in set of parent nodes A set of specific values; This will be a subsequent knowledge point.
[0028] Set the CPT parameters according to the following formula to obtain the conditional probability of each knowledge point under different prior knowledge states: , in, This indicates that when the set of parent nodes takes the value At that time, learners master the knowledge points The conditional probability; Assign values to a specific set of states for the parent node set; CPT parameters are obtained through maximum likelihood estimation of historical learning data.
[0029] when When the value approaches 1, it indicates that a thorough grasp of the preceding knowledge points has a strong decisive effect on the learning of the subsequent knowledge points, reflecting the strong dependency between knowledge points; the CPT parameter is the core input for subsequent graph embedding and intelligent diagnosis.
[0030] Construct a bidirectional weighted graph: Forward sampling generates simulated samples: Because complete observation samples are scarce in actual educational data, it is difficult to directly calculate the joint probability required for mutual information. This application uses forward sampling (FS) to generate simulated samples from the constructed BN to approximate the mutual information between knowledge points.
[0031] Obtain the constructed BN structure and CPT parameters, and set the sampling number. ,in This represents the total number of simulated samples. Based on the formula, samples are taken node by node in topological order to obtain the [number of samples]. Knowledge points in the simulated sample The possible values of: , in, Indicates the first In the sample The sampled values, Indicating the same sample The specific values sampled by the parent node are determined by the topological order, which ensures that the parent node completes sampling before the child nodes.
[0032] When the number of samples When the sample size is large enough, the statistical distribution of the simulated sample approaches the true joint probability distribution of BN, indicating that the sampling scheme can effectively approximate the implicit probability dependencies in BN, providing a reliable data basis for subsequent mutual information estimation.
[0033] Edge weight calculation based on mutual information: After obtaining the simulated samples, this application measures the information correlation strength between knowledge points through mutual information and uses this to construct a bidirectional weighted graph (BWG) as input for subsequent graph embedding.
[0034] Given generated A simulated sample can be used to statistically analyze any two knowledge points. and The probability estimate is calculated using the following formula. and The mutual information between them allows us to calculate the edge weights: , in, Representing knowledge points and Mutual information between them The sample estimate representing the joint probability. , These represent the sample estimates of the marginal probabilities of each knowledge point.
[0035] Then, based on the following formula, identify the knowledge points with dependencies in the BWG. Assign edge weights: , in, Represents nodes in BWG and In BWG, both forward and reverse edges are assigned the same mutual information weights.
[0036] When two knowledge points have mutual information When the value is large, it indicates a strong knowledge dependency between the two, with higher edge weights in the BWG and more similar node vectors corresponding to the edges in subsequent node embeddings. By simultaneously retaining both forward and reverse edges, the BWG allows path search to propagate in any direction along the BWG, unrestricted by the causal direction of the BN, providing complete graph structure support for subsequent diagnostic inference.
[0037] Node embedding based on Triple Encoding Transformer: Node attributes and centrality encoding: To map knowledge points into low-dimensional embedding vectors and support efficient embedding inference, this application constructs an initial node embedding vector containing node attributes and centrality information, which serves as input to Transformer encoding.
[0038] Obtain the original Bayesian network and extract each knowledge point. Attribute feature vector , penetration and out-degree ,in The semantic attribute features (such as category, difficulty level, etc.) of knowledge points. express In-degree (number of predecessor knowledge points) in Batch Normalization (BN) Indicates the degree (number of subsequent knowledge points).
[0039] The following formula is used to combine node attributes and centrality information to obtain knowledge points. initial embedding vector : , in, Represents a linear transformation layer. Represents the node attribute feature vector. , These are the projection parameter matrices for the in-degree and out-degree, respectively. Representing knowledge points The initial embedding vector.
[0040] When a knowledge point has a large in-degree, it indicates that it depends on many predecessor knowledge points, making it a core knowledge point. Its initial embedding vector will incorporate stronger predecessor dependency signals.
[0041] Shortest weighted path encoding: Relying solely on the features of directly adjacent nodes cannot capture long-term dependencies between knowledge points. This application introduces the path distance between nodes in BWG into the Transformer self-attention matrix as a spatial awareness bias, enabling the model to distinguish the degree of correlation between node pairs with different distances.
[0042] Initialize the embedding matrix for the computed nodes. and any two nodes in the constructed BWG. and Path distance between , This represents the shortest path distance based on the edge weights of the BWG mutual information.
[0043] Adding the shortest path distance as a bias term to the self-attention matrix yields the path-aware attention matrix: , in, , Query matrix Bond matrix The projection parameters, For the projection dimension, Path distance Learnable bias parameters for indexing.
[0044] When the shortest path distance between two knowledge points The smaller the value, the greater the bias. The larger the value, the higher the attention weight, indicating that the encoding mechanism enables the Transformer to prioritize the aggregation of information directly related to knowledge points, effectively modeling the long-term dependency structure between knowledge points.
[0045] Edge encoding: Shortest path encoding only utilizes distance information between nodes, ignoring the conditional probability and direction information carried by edges in Batch Normalization (BN), causing the attention mechanism to be unable to distinguish between strong and weak dependencies and causal directions. This application proposes an edge encoding mechanism that uses both conditional probability and direction information as additional biases for attention, representing the core innovation of the Triple Encoding Transformer.
[0046] Obtain each directed edge in the constructed CPT Corresponding conditional probability value and the direction of the edge ,in Represents the edges extracted by CPT → The accompanying conditional probability; This represents the direction encoding of the edge; for forward edges, take... Take the reverse edge For reverse edges in BWG (The original BN directed edge is) ) Its conditional probability value is still taken from the CPT entries of the original directed edge. Directional signs .
[0047] The edge encoding bias is obtained by fusing conditional probability and direction information according to the following formula. : , in, This represents the conditional probability extracted by CPT, reflecting the strength of knowledge dependence; The direction encoding of the edge is used to distinguish the directionality of knowledge prior relations in the embedding space; These are learnable scalar parameters that control the relative weights of the two types of information.
[0048] when Approaching and hour, A larger positive value indicates that the positive strong dependency edge receives a higher weight in the attention matrix, prompting the model to prioritize modeling strong dependencies that propagate along the knowledge-pre-learning direction. hour, Take the negative value; The larger the negative value, the greater the negative value, indicating that the reverse edge obtains a negative bias in the attention matrix, enabling the model to perceive the causal direction structure of BN during the embedding stage, effectively encoding the directionality of knowledge pre-relationships into node embedding, and supporting unified modeling of diagnostic inference tasks.
[0049] Constructing the attention matrix: After obtaining the shortest path bias and edge encoding bias, this application integrates the two into the self-attention matrix to form a triple encoding Transformer, which is a complete attention mechanism of triple encoding of node centrality, shortest path, and edge encoding.
[0050] Calculate the path bias term and the calculated edge encoding bias and the current layer node embedding matrix and learnable scaling factor , The three types of biases are fused according to the following formula to obtain the triple-encoding fusion attention matrix. : , in, For standard self-attention dot product terms, This is the shortest path bias, reflecting the information-theoretic distance between node pairs; The edge encoding bias reflects the direct dependency strength and direction; , These are learnable scalar parameters that control the relative impact weights of path bias and edge encoding on attention scores.
[0051] Based on the attention matrix, calculate the output of Multi-Head Attention (MHA): , in, , indicating the first k The output of each attention head, For the projection parameters of the value matrix, For the number of attention heads, This is the projection matrix for multi-head output.
[0052] When edge encoding and path bias work together, attention weights can simultaneously perceive the distance between nodes and the strength and direction of their dependencies. 、 As an independent learnable parameter, the model can adaptively adjust the relative contribution of path structure information and edge semantic information to the attention score during training, avoiding the dominance of a single bias. This shows that the triple encoding fusion bias can more accurately and flexibly characterize the complex dependency structure between knowledge points compared with a single path bias.
[0053] Residual connectivity and node embedding output: To prevent gradient vanishing during training of multi-layer Transformers and to enhance nonlinear expressive power, this application adds residual connections and layer normalization after MHA, and completes the final output of node embedding through a feedforward network.
[0054] Get the calculation Output and current layer node embedding matrix The MHA output is subjected to residual connection and layer normalization according to the following formula to obtain the intermediate embedding. : , The final node embedding matrix is obtained by further transformation using a feed-forward network (FFN). : , in, Presentation layer normalization operation, This represents the intermediate embedding matrix after residual connection and normalization. This represents a feedforward network consisting of two linear transformations and activation functions. Embed the matrix for the final node. For knowledge points The low-dimensional embedding vector.
[0055] When Transformers are stacked in multiple layers By gradually integrating the triple-encoded information from all knowledge points, it is shown that the final embedded vector simultaneously captures three types of structural information: node centrality, shortest path distance, and edge conditional probability, providing an accurate vector representation foundation for subsequent efficient inference.
[0056] Learner Intelligent Diagnosis: Equivalent transformation of diagnostic objectives from an information theory perspective: In learner diagnostic scenarios, a student's performance on a set of learning tasks or test questions constitutes a multidimensional observation signal, formally defined as a set of evidence nodes. Each of the evidence nodes This refers to the known mastery status (mastery or lack thereof) of a specific knowledge point. The diagnostic goal is to identify the key knowledge point that is most strongly correlated with the learner's current evidence status by synthesizing multiple performance evidences. This involves identifying the core knowledge points that best explain or predict student performance, thus providing teachers with precise intervention guidelines. Traditional probabilistic inference methods require exponential computation for each diagnosis, resulting in low efficiency. This application redefines the diagnostic objective from an information theory perspective as a path search problem for maximizing decoded information, achieving an equivalent transformation of the inference objective and providing a theoretical foundation for efficient multiple inferences.
[0057] Obtain the constructed BWG and mutual information edge weights Obtain the set of evidence nodes. , representing the set of knowledge points corresponding to the student's known mastery status; Indicates from the evidence node Search for knowledge points The amount of information decoded; This represents a diagnostic path in BWG.
[0058] The following formula is used to set the decoding information between knowledge points, and the measurement of single-step information transmission volume is obtained: , in, This indicates the knowledge points of evidence. Search for knowledge points The amount of information decoded reflects the student's understanding. The known state of knowledge on the surface helps inferring its position. To grasp the information that probability can contribute; This represents the mutual information between two knowledge points, i.e., the calculated edge weights. .
[0059] The total decoding information for the path is set according to the following formula, which measures the total amount of information transmitted throughout the entire diagnostic path: , in, This represents the total amount of decoded information for path P; This represents the sum of the marginal entropies of all nodes in the path; This represents the sum of the conditional entropy of each node in the path.
[0060] The inference objective of maximizing decoded information is equivalent to a path search for the maximum amount of decoded information, according to the following formula, to obtain the optimal diagnostic path: , in, Indicates the optimal diagnostic path; Indicates all from the set of evidence nodes Starting from a certain node and arriving at the query node Among the feasible paths, the path with the largest sum of mutual information is selected; according to Shannon's information theory, this is equivalent to minimizing the path conditional entropy. This represents the sum of the mutual information weights of all edges along the path.
[0061] When the total conditional entropy of the path is minimized, it is equivalent to maximizing the decoded information of the path. This indicates that the equivalent transformation converts the NP-hard problem of precise probability inference into a path search problem with the maximum decoded information, i.e., the maximum weighted path problem. Simultaneously, by maximizing the path search from multiple evidence nodes to the query node... Based on the decoded information, the system can automatically identify the key knowledge points that have the greatest impact on students' current performance. This is the theoretical basis for achieving efficient and interpretable diagnostic inferences in this application.
[0062] Standardized format for diagnostic tasks: Based on the established information theory framework, this application uniformly defines the learner diagnostic inference task as: given a set of evidence nodes and query nodes, searching in the BWG (Browser-Wide Object Framework) for the path that maximizes the total decoded information. This uniform definition does not require pre-specifying the inference direction; the bidirectional edge structure of the BWG naturally supports various educational diagnostic scenarios such as knowledge mastery inference and tracing the root causes of weaknesses, covering all diagnostic needs in educational practice.
[0063] Obtain the set of evidence nodes in the constructed BN. and query node ,in It represents the set of knowledge points that students have already mastered, that is, it consists of multiple knowledge points corresponding to performance observations, reflecting the students' current observable knowledge status; This represents the target knowledge point to be diagnosed, that is, the knowledge point whose mastery probability needs to be inferred.
[0064] The unified path form for the diagnostic inference task is set according to the following formula, and the objective of solving the optimal diagnostic path is obtained: , in, Indicates the optimal diagnostic path; Represents the set of evidence nodes The optimal starting node selected from the options; Indicates the target query node; path Extending from BWG, the bidirectional edge structure of BWG allows the path to propagate in any direction, naturally covering various diagnostic scenarios such as inferring unknown knowledge from known knowledge and tracing the root causes of weak performance. When there are multiple evidence nodes, the system selects the starting evidence node and its corresponding path that maximizes the total amount of decoded information.
[0065] Once the optimal path is determined, the starting point of the path... This refers to the key evidence node that is most strongly associated with the knowledge point information being queried. It indicates that the unified formal definition of this application summarizes different diagnostic scenarios into the same objective function. The system automatically determines the optimal inference path based on the BWG structure and outputs a diagnostic conclusion with information theory interpretability. Teachers do not need to specify the inference direction, which significantly reduces the threshold for using the system.
[0066] Efficient multiple inference based on graph index: Offline construction of nearest neighbor graph index: After completing the node embedding training, if we directly compute any node pair... Inference is performed based on the embedding similarity, with a complexity of O(n log n) for each inference. When the BN knowledge graph is large, The node-by-node traversal overhead is significant and cannot meet the needs of high-concurrency real-time diagnostic scenarios. Therefore, this application constructs a k-Nearest Neighbor (KNN) approximate graph index based on the obtained node embeddings in the offline stage, reducing the search complexity of online inference to [missing information]. It supports a diagnostic mode that allows for one-time training and efficient inference multiple times.
[0067] Obtain the final node embedding matrix calculated Set the number of nearest neighbors parameter ,in Representing knowledge points Embedded vector, This represents the number of nearest neighbors retained by each node, and is set to an appropriate value based on expert experience. This represents the similarity between two embedding vectors.
[0068] The similarity between any two knowledge point embeddings is calculated using the following formula to obtain the metric required for graph indexing: , in, Represents the embedding vector and Similarity between them Let Euclidean distance represent the distance between two embedding vectors. The inverse of the Euclidean distance is taken so that the similarity is inversely proportional to the distance.
[0069] Select each knowledge point according to the following formula. The nearest neighbor set is formed by the most similar nodes, resulting in the adjacency structure of the KNN graph: , in, Representing knowledge points of Nearest neighbor set Indicates exclusion After itself, select the one with the highest similarity. With a number of nodes, the KNN graph is efficiently constructed using the nearest neighbor descent algorithm (NN-Descent).
[0070] when When the value is appropriate, China retains the same The most closely related information These key points demonstrate that the KNN graph index can significantly reduce the online search space while preserving key structural information, providing a foundation for efficient diagnostic inference.
[0071] Side filtering based on information content threshold: Standard KNN graphs contain a large number of candidate edges with low mutual information weights. When used directly for diagnostic inference, these edges introduce redundant paths with low information content, reducing search accuracy and increasing computational overhead. This application proposes a candidate edge filtering strategy based on an information content threshold. During the search process, only candidate edges with mutual information weights exceeding the threshold are retained, achieving lightweight graph index pruning.
[0072] Obtain the calculated BWG mutual information edge weights and preset information filtering thresholds ,in Representing knowledge points and Mutual information weights between them; To filter out weakly correlated edges with low information content, a lower bound threshold is set based on the overall mutual information distribution of BWG.
[0073] The following formula is used to perform information content threshold filtering on the candidate edges in the KNN graph to obtain the set of valid candidate edges: , in, An indicator function that indicates whether an edge is preserved; when hour =1, keep the candidate edge; otherwise Cut off that side; It can be adaptively adjusted according to the size of the knowledge graph and the required diagnostic accuracy.
[0074] When the number of valid candidate edges decreases after information threshold filtering, it indicates that the information threshold strategy has successfully pruned redundant search branches with low relevance, further improving search efficiency while ensuring the accuracy of diagnostic inference semantics, and achieving effective graph index pruning.
[0075] Greedy best-priority path search: Based on the constructed KNN graph index and information threshold filtering strategy, this application adopts a greedy best-first search to efficiently perform shortest path search in the embedding space and complete online diagnostic inference.
[0076] Obtain the constructed KNN nearest neighbor set, the filtered set of valid candidate edges, and the set BWG edge weights. ,in This represents the distance from the starting node to the current node. The cumulative information content score of the path; This indicates the node currently found in the search.
[0077] Update the path cumulative information score according to the following formula to obtain the node Cost of the new path after adding it to the path: , The following formula is used to select the node with the largest information increment from the effective candidate neighbors as the next hop, thus obtaining the path extension decision for greedy search: , in, This represents the score of the new information content after adding the node to the path; This represents the mutual information weights of the edges in the BWG (i.e., the weights set). ); This represents the next node chosen greedily. This represents the set of valid candidate neighbors after filtering by the information content threshold.
[0078] When the search path reaches the query node, the obtained path This represents the approximate shortest diagnostic path in the embedding space, indicating that compared to the exponential complexity of traditional precise inference, the greedy graph index search reduces the complexity of a single diagnosis to near linear levels, significantly improving the system response speed in scenarios involving multiple diagnoses.
[0079] Diagnostic probability calculation and reuse of multiple inferences: Embedding similarity calculation: Obtain the optimal diagnostic path Subsequently, this application calculates the embedding similarity between the evidence node and the query node based on the obtained node embedding vector, which serves as the metric for subsequent diagnostic probability estimation.
[0080] The obtained node embedding matrix and the list of nodes in the obtained optimal diagnostic path, where Represents the embedding vector of the query node; This represents the embedding vector of a node in the path; based on the set embedding similarity... Measure the strength of the information association between the two.
[0081] Calculate the similarity between the query node embedding and the embeddings of each node in the path to obtain the information association strength between nodes: , in, This represents the embedding similarity between the query node and the path node, i.e., the reciprocal of the Euclidean distance. Represents the embedding vector of the query node; This represents the embedding vector of a path node.
[0082] When the embedding vectors of two knowledge points are close... The large difference indicates that the information structures of the two knowledge points are highly similar in BN, and the learner's mastery of one knowledge point has a strong reference value for estimating the mastery probability of the other.
[0083] Diagnostic probability estimation and normalization: Based on computational embedding similarity, this application calculates the learner's diagnostic probability estimate of the queried knowledge point through weighted aggregation of all nodes on the path, and performs normalization processing to obtain the final output. Since the embedding training has encoded the conditional dependency relationship between the evidence node and the query node into the embedding vector, the weighted aggregation with embedding similarity as the weight approximately realizes the evidence-based conditional probability estimation.
[0084] Obtain the calculated embedding similarity and the marginal mastery probability of each path node in the constructed BN, where It represents the embedding similarity between the query node and the path node, reflecting the information contribution weight of the evidence node to the query node; Represents path nodes The marginal probability of being mastered is obtained by marginalizing the CPT parameters and serves as a basic probability reference value for diagnosis. The product of embedding similarity and marginal probability approximately characterizes the contribution of path nodes to the mastery probability of query nodes under the condition of known evidence nodes.
[0085] The approximate conditional probability estimate of the mastery status of the queried knowledge point is obtained by weighting the marginal mastery probabilities of the path nodes using the following formula with embedding similarity as the weight: , The diagnostic probability is normalized using the following formula to obtain the final diagnostic result: , in, and The weighted estimates correspond to the query node values of 1 (understand) and 0 (not understand), respectively. and All are provided by the CPT parameter of BN; normalization ensures that the final output is a valid probability value.
[0086] When the embedding similarity between nodes on the diagnostic path and the query node is high, the final diagnostic probability is... A relatively large value indicates that the learner's known knowledge in BN is highly consistent with their mastery of the queried knowledge points, and the diagnostic conclusion has a high degree of confidence.
[0087] Efficient reuse of multiple diagnostic results: This application achieves an efficient diagnostic mode of training once and inferring multiple times by separating offline training and online inference, fundamentally solving the efficiency bottleneck of traditional methods that require recalculation for each diagnosis.
[0088] Obtain the node embedding matrix after training. and the constructed KNN graph index , where Y represents the fixed node embedding after offline training; This indicates an offline graph index structure built on embeddings, with both computations completed in one step during the offline phase.
[0089] When a new diagnostic request is received, the system directly invokes the online greedy search without re-executing the training process. This indicates that the multiple diagnostic reuse mechanism of this application reduces the time complexity of each online inference from exponential (precise VE inference) to near-linear, which can support the high-frequency and dynamic knowledge diagnosis needs of learners in real-time interaction. This is the fundamental reason why this invention achieves an order-of-magnitude improvement in efficiency compared to traditional precise inference methods.
[0090] This application proposes a learner knowledge state modeling method based on Bayesian networks. Knowledge points are modeled as binary random variable nodes. A directed acyclic graph is used to qualitatively describe the precondition dependencies between knowledge points, and a conditional probability table is constructed for each directed edge to quantitatively characterize the dependency strength. Based on this, forward sampling is used to approximate the mutual information between knowledge points, and a bidirectional weighted graph is constructed using the mutual information as edge weights. This comprehensively and accurately represents the hierarchical probabilistic dependencies between knowledge points, solving the problem that existing methods cannot quantitatively describe complex knowledge dependencies.
[0091] This application proposes a triple-encoding Transformer node embedding method, which injects three types of structural signals—node centrality encoding, shortest weighted path encoding, and edge encoding (integrating conditional probability and directional information)—into the Transformer self-attention matrix. This allows the node embedding vector to simultaneously capture the topological position, structural distance, and conditional dependency strength and direction of knowledge points, thus achieving a full expression of the structural information of the knowledge graph. Among these, edge encoding is the core innovation of the triple-encoding Transformer.
[0092] This application transforms the learner diagnostic inference goal into the maximum decoding information path search problem from an information theory perspective, transforms the NP-hard precise probability inference into the maximum weighted path problem that can be solved efficiently, and provides interpretable diagnostic conclusions with information theory semantics based on the optimal diagnostic path, naturally covering all types of educational diagnostic scenarios such as knowledge mastery inference and weak root cause tracing.
[0093] This application proposes an efficient multi-inference framework based on KNN graph indexing. By combining an information threshold edge filtering strategy and a greedy optimal priority path search, the complexity of online inference is reduced from exponential to near linear, achieving an efficient diagnostic mode of training once and inferring multiple times. The key technologies of this application are: Bayesian network and conditional probability table construction, forward sampling and mutual information edge weights, bidirectional weighted graphs, triple-encoding Transformer node embedding, information-theoretic equivalent transformation of diagnostic targets, KNN graph indexing, and greedy path search. These technologies should be protected.
[0094] Compared to traditional learner diagnostic technologies that often require large-scale retesting with question banks, the technical solution presented in this application utilizes Bayesian networks. Leveraging its incremental inference mechanism, Bayesian networks achieve dynamic tracking through small, rapid steps. They can capture subtle fluctuations in a learner's state in real time using prior probabilities, requiring only a few highly discriminative interactions to quickly update the learner profile. This efficiency directly translates into extremely low user fatigue and a higher level of learning immersion, making it a driving force for scalable personalized education. Regarding interpretability, Bayesian networks, through their transparent causal topology, can clearly tell parents and teachers that "a student's lack of knowledge point A leads to their inability to master skill B." This causal attribution capability gives the product strong persuasiveness and significantly reduces the cost of manual intervention. In terms of accuracy, Bayesian networks excel at handling uncertainty and noise in the learning process. By capturing quantitative relationships between knowledge points through multi-dimensional conditional probabilities, their diagnostic accuracy far surpasses traditional single-dimensional solutions in complex knowledge systems, providing the most accurate intelligent diagnostic technology solution for adaptive learning engines.
[0095] The specific embodiments of the present invention are described below with reference to the appendix, so that those skilled in the art can better understand the present invention.
[0096] Another example: Based on the ASSISTments 2009-2010 Skill Builder Dataset, 10 junior high school math knowledge points with prerequisite relationships were selected (involving 493 learners and 163,521 valid answer records) to conduct intelligent diagnosis of learners' knowledge status.
[0097] Construction of Bayesian Network for Learner Knowledge State: The 10 knowledge points are modeled as binary random variable nodes. ~ (Value 1 indicates mastery, 0 indicates non-mastery) Based on the prerequisite relationships of junior high school mathematics courses, domain experts constructed a directed acyclic graph with 11 directed edges as the topology of the Bayesian network. and As the root node (without a parent node), its marginal mastery probabilities are respectively (Covering 467 learners) and (Covering 110 learners). Basic information about the experimental dataset is shown in Table 1, the definitions of each knowledge point node are shown in Table 2, and the 11 prerequisite relationships are shown in Table 3.
[0098] Table 1. Basic Information of Experimental Dataset project numerical values Dataset Name ASSISTments 2009-2010 Skill Builder Dataset Number of answer records after filtering 163,521 entries (original=1, limited to 10 skills) Number of effective learners 493 people (covering at least 5 knowledge points) Number of knowledge points (number of BN nodes) 10 Number of directed edges in BN 11 items Number of edges in a BWG (bidirectional) 22 (11 positive, 11 negative) Overall accuracy 69.8% Training / Test Split 80% / 20% Table 2. Definitions of 10 Knowledge Point Nodes
[0099] Table 3. BN Directed Edges (Pre-process Relations, 11 in total)
[0100] Based on the answer records of 493 learners, the average accuracy rate of each learner for each knowledge point was binarized (accuracy rate ≥ 0.5 was recorded as mastery, otherwise as non-mastery), and a learner-knowledge point mastery matrix was constructed. A conditional probability table was built for each node using maximum likelihood estimation to quantify the conditional probability of each knowledge point under different prior mastery states. Key parameters of CPT for each node are shown in Table 4. For example, That is, the volume of all unknown cuboids ( Those who studied the volume of a cylinder failed to grasp its meaning. This effectively verifies the rationality of the BN prior structure design; when the conditional probability approaches 1, it indicates that a thorough grasp of the predecessor knowledge points has a strong decisive effect on the learning of the successor knowledge points.
[0101] Table 4. CPT Parameters for Each Node
[0102] Bidirectional weighted graph construction: Due to the scarcity of complete observation samples in actual educational data, this application employs forward sampling (FS) to generate weighted graphs from the constructed BN. The simulated samples are sampled node by node in topological order. The mastery status of each knowledge point is sampled from CPT according to the current value of the parent node. When the number of samples is large enough, the statistical distribution of the simulated samples approaches the true joint probability distribution of BN, providing a reliable data foundation for subsequent mutual information estimation.
[0103] Based on 50,000 generated simulated samples, the mutual information between knowledge points is estimated. A bidirectional weighted graph (BWG) is constructed using this mutual information as edge weights. Forward and reverse edges are added between each pair of knowledge points corresponding to the 11 directed edges, resulting in a total of 22 weighted edges. The bidirectional edge structure of the BWG allows subsequent path search to transmit information in any direction. The mutual information of each edge is shown in Table 5. For example, =0.0800 bits is the strongest connection among all edges, which is intuitive; =0.0059 bits is relatively weak, and compared with the information content threshold, when the mutual information between two knowledge points is large, it indicates that the knowledge dependency between the two is strong and the corresponding edge weight is high.
[0104] Table 5. BWG directed edge mutual information edge weights (sorted in descending order of strength)
[0105] Node embedding based on triple-encoded Transformer: The constructed Batch Normalization (BN) is obtained, and the attribute feature vectors, in-degree, and out-degree of each knowledge point are extracted. Node attribute and centrality information are fused to obtain the initial embedding vector of the knowledge point, which is then mapped to a d=64-dimensional embedding space. The graph structure degree information of each node is shown in Table 6. For example, As a key hub node in BN, with an in-degree of 2 (parent node) , ), out-degree = 2 (child nodes) , Its initial embedding vector will incorporate strong predecessor dependency signals, which will help the subsequent Transformer to accurately model its hub status.
[0106] Table 6. Graph Structure Information for Each Node
[0107] This application incorporates the path distance between nodes in the BWG into the Transformer self-attention matrix as a spatial awareness bias, using path distance as the basis for the bias. Learnable scalar bias parameters for index Injecting an attention matrix enables the model to prioritize the aggregation of information directly related to knowledge points, effectively capturing long-range dependencies between knowledge points.
[0108] Obtain the conditional probability value and direction identifier of each directed edge in the constructed CPT, and fuse the conditional probability and direction information to obtain the edge encoding bias. Examples of edge encoding calculations are shown in Table 7. Among them, when the conditional probability approaches 1 and the direction label is... When the edge encoding takes a larger positive value, it prompts the model to prioritize modeling strong dependencies that are propagated along the knowledge-pre-learning direction; when the direction identifier is... When the edge is encoded as a negative value, it effectively distinguishes the semantic direction of the reverse edge.
[0109] Table 7. Example of BN directed edge encoding calculation (partial)
[0110] Obtain the shortest path bias and edge encoding bias Then, with learnable scaling parameters (Based on expert experience method) ), (Based on expert experience method) The relative weights of path structure and edge semantics are controlled separately to form a triple-encoding fusion attention matrix; the number of attention heads is set to 8. The multi-head attention output is calculated so that the attention weights simultaneously perceive the distance between nodes, the strength of dependency, and the causal direction.
[0111] The MHA output undergoes residual connection and layer normalization, and is further transformed through a feedforward network. The final node embedding matrix is obtained after stacking the Transformer layers. The dimension is 10×64. The training hyperparameters are shown in Table 8. The final embedding matrix... Each row vector It has integrated three types of structural signals: node centrality, shortest weighted path distance, and edge conditional probability, providing a high-quality embedding foundation for subsequent graph index construction and diagnostic inference.
[0112] Table 8. Transformer Training Hyperparameters
[0113] Learner intelligent diagnosis: In learner diagnosis scenarios, a student's performance on a set of learning tasks constitutes a set of evidence nodes. Each of the evidence nodes The known and mastered status of a specific knowledge point; Query the knowledge points for the target to be diagnosed. Obtain the constructed BWG and the set mutual information edge weights, and set the decoding information between knowledge points. Set the total amount of decoded information for the path. The inference objective of maximizing decoded information is equivalent to a path search with the maximum amount of decoded information, thus obtaining the optimal diagnostic path. For example, with (Fraction addition and subtraction) is an evidence node. (Percentage calculation) represents the query node and candidate paths. Total decoded information:
[0114] Superior to other paths, therefore Confirmed as the optimal diagnostic pathway .
[0115] Obtain the set of evidence nodes in the constructed BN. and query node The system sets a unified path format for diagnostic inference tasks and obtains the solution objective of the optimal diagnostic path. The bidirectional edge structure of the BWG allows information to be transmitted along the path in any direction. The system automatically selects the optimal starting node based on the BWG structure, so that diagnostic inference can naturally cover multiple diagnostic needs such as forward and reverse directions, without the need to design separate path search strategies for different tasks.
[0116] Efficient multiple inference based on graph index: Obtaining the final node embedding matrix of computation The parameter for the number of nearest neighbors is set based on expert experience. The reciprocal of the Euclidean distance between the embedding vectors of any two nodes is used as a similarity metric, and the node with the highest similarity is selected for each knowledge point. The KNN graph index is constructed offline using the nearest neighbor descent algorithm (NN-Descent) with each neighbor, taking approximately 0.3 seconds (one-time). Once trained, the index structure is fixed and can be reused for all subsequent diagnostic requests.
[0117] Obtain the calculated BWG mutual information edge weights and the preset information content filtering threshold. Perform information threshold filtering on candidate edges in the KNN graph: when hour Keep the candidate edge, otherwise Trim that edge. In this embodiment, based on the mutual information distribution in Table 5, Set to 0.005 bits. For example, the edge ( )correspond , Reserved; if the mutual information of a candidate edge is less than 0.005 bits, then... The algorithm successfully removed redundant search branches with low relevance, improving search efficiency and accuracy.
[0118] Based on the constructed KNN graph index and the information threshold filtering strategy, the cumulative information score of the path is updated. From the effective candidate neighbors filtered by the information threshold, the node with the highest mutual information weight is selected as the next hop until the query node is reached, thus obtaining an approximately optimal diagnostic path. For example, from the evidence node... Search query node The first step is to select and The largest effective neighbor in mutual information ( (Keep); the second step from Select ( The path search has ended, and the optimal path has been obtained. The total decoded information is 0.1198 bits. The inference efficiency comparison is shown in Table 9, and the embedding matrix... The KNN graph index remains unchanged after training, enabling training once and inference multiple times.
[0119] Table 9. Comparison of inference efficiency (in this embodiment, the number of nodes n=10)
[0120] Diagnostic probability calculation and multiple inference reuse: obtaining the node embedding matrix And the list of nodes in the obtained optimal diagnostic path, calculate the query node embedding. Similarity between the embeddings of each node in the path. (From...) diagnosis For example, the optimal path The embedding similarity of each path node is shown in Table 10. and The similarity was higher (0.84 > 0.76), reflecting... In terms of knowledge structure and The information is more interconnected, and learners have a stronger understanding of it. The extent of knowledge is crucial for inference. It has greater reference value.
[0121] Table 10. Embedding similarity of each node in the path (evidence) Query )
[0122] Based on the calculated embedding similarity and the marginal mastery probability of each path node in the constructed BN, the marginal mastery probabilities of the path nodes are weighted and summed using embedding similarity as the weight. After normalization, the final diagnostic result is output. The probability estimation process is shown in Table 11. For example, a learner has already mastered... (Fraction addition and subtraction), then That is, the probability of mastering it is 86.4%.
[0123] Table 11. Calculation process of diagnostic probability (evidence) Query )
[0124] Node embedding matrix after training The constructed KNN graph index remains fixed after training. When a new diagnostic request is received, the system directly calls the online greedy search without re-executing the training process, achieving an efficient diagnostic mode of "train once, infer multiple times". The quantitative evaluation results of this embodiment on the test set (84,263 records, accounting for 20% of the total number of valid records) are shown in Table 12. Among them, the higher the AUC↑, the better, and the lower the RMSE↓ / MR↓, the better. The AUC (0.854) of this application is comparable to that of DKT (0.860), but it additionally supports an interpretable unified diagnostic framework, achieving a significant improvement in single inference time, indicating that the present invention can effectively support efficient multiple inferences.
[0125] Table 12. Performance comparison of the present invention and the comparison method on the ASSISTments 2009-2010 dataset. method AUC↑ RMSE↓ MR↓ Single inference time ↓ This invention 0.854 0.191 0.162 0.008s DKT 0.860 0.197 — — Traditional BKT 0.730 0.231 — 1.24s The embodiments described above merely illustrate specific implementation methods of this application, and while the descriptions are detailed and specific, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the technical solution of this application, and these modifications and improvements all fall within the scope of protection of this application.
Claims
1. A learner intelligent diagnosis method based on Bayesian networks, characterized in that, Includes the following steps: The knowledge points are modeled as binary random variable nodes. A directed acyclic graph is constructed based on the pre-requirement dependencies between knowledge points, and a conditional probability table is constructed for each directed edge to form a Bayesian network of the learner's knowledge state. Based on Bayesian networks, simulated samples are generated using a forward sampling method. Mutual information between knowledge points is calculated based on the simulated samples, and a bidirectional weighted graph is constructed using mutual information as edge weights. Based on bidirectional weighted graphs and Bayesian networks, a triple encoding system is implemented, which includes node centrality encoding, shortest weighted path encoding, and edge encoding. The triple encoding Transformer is used to embed knowledge point nodes. The problem of intelligent diagnosis of learners is transformed into the problem of finding the path with the maximum decoding information. The optimal diagnostic path from evidence nodes to query nodes is searched based on node embedding and bidirectional weighted graphs. The learner's diagnostic probability for the queried knowledge point is calculated based on the optimal diagnostic path, and the diagnostic result is output.
2. The learner intelligent diagnosis method based on Bayesian networks according to claim 1, characterized in that, The Bayesian network that forms the learner's knowledge state specifically includes: Factorize the joint probability of the Bayesian network according to the following formula: , in This represents the joint probability distribution of the states of all knowledge points; express The set of parent nodes, Indicates the state of mastery of given predecessor knowledge points Conditional probability that has been acquired; multiplication symbol For all knowledge points Traversal, when When there is no parent node Degenerate into prior probability The parameters of the conditional probability table are obtained through maximum likelihood estimation of historical learning data. , in, This indicates the number of learner samples in historical learning data that meet the conditions in parentheses. This indicates that when the set of parent nodes has a value of At that time, learners master the knowledge points The conditional probability; Assign values to a specific set of states of the parent node set; This allows us to quantify the impact of prior knowledge mastery on subsequent knowledge learning.
3. The learner intelligent diagnosis method based on Bayesian networks according to claim 1, characterized in that, The process of generating simulated samples and calculating mutual information based on Bayesian networks through forward sampling includes: Sample each knowledge point according to the following formula, in topological order. The possible values of: , in Indicates the first In the sample The sampled values, Indicating the same sample The specific values sampled by the parent node are determined by the topological order, ensuring that the parent node completes sampling before the child nodes. For the number of samples, The parent node has already sampled the value; when When the sample size is large enough, the statistical distribution of the simulated sample approaches the true joint probability distribution of the Bayesian network; Then calculate the mutual information according to the following formula: , in, Representing knowledge points and Mutual information between them The sample estimate representing the joint probability. , These represent the sample estimates of the marginal probabilities of each knowledge point; The mutual information is used as the edge weights of the bidirectional weighted graph, where both forward and reverse edges in the bidirectional weighted graph are assigned the same mutual information weights.
4. The learner intelligent diagnosis method based on Bayesian networks according to claim 1, characterized in that, The node centrality encoding includes: Get each knowledge point node Attribute feature vector In-degree in Bayesian networks and out-degree The initial embedding vector is calculated according to the following formula. : , in For linear transformation layer, Represents the node attribute feature vector. , These are the projection parameter matrices for the in-degree and out-degree, respectively. Representing knowledge points The initial embedding vector.
5. The learner intelligent diagnosis method based on Bayesian networks according to claim 1, characterized in that, The shortest weighted path encoding includes: Calculate any two nodes in a bidirectional weighted graph and Shortest path distance between Add it as a bias term to the Transformer self-attention matrix: , in Embed the matrix for the node. For projection parameters, For the projection dimension, These are learnable bias parameters indexed by path distance. The offset is the transpose of the matrix; the smaller the shortest path distance between two knowledge points, the smaller the bias. The larger the value, the higher the attention weight.
6. The learner intelligent diagnosis method based on Bayesian networks according to claim 1, characterized in that, The edge encoding specifically includes: Obtain directed edges in a Bayesian network conditional probability and directional signs Among them, the positive edges reverse edge The edge coding bias is calculated according to the following formula. : , in The parameters are learnable scalars; and the edge encoding bias is used as an additional term in the attention matrix; when Approaching 1 and hour, Taking a larger positive value makes the model prioritize modeling strong dependencies that are passed along the knowledge-first-learning direction.
7. The learner intelligent diagnosis method based on Bayesian networks according to claim 1, characterized in that, When using the Triple Encoding Transformer for node embedding, the fused attention matrix is: , in For standard self-attention dot product terms, For learnable scaling parameters, The edge encoding bias is used; then the multi-head attention output is calculated according to the following formula: , in , indicating the first The output of each attention head, For the number of attention heads, The projection matrix is the output of multiple heads; then it is processed through residual connections and layer normalization: , , in, Presentation layer normalization operation, This represents the intermediate embedding matrix after residual connection and normalization. This represents a feedforward network consisting of two linear transformations and activation functions. Embed the matrix for the final node. For knowledge points The low-dimensional embedding vector; Output the final node embedding matrix .
8. The learner intelligent diagnosis method based on Bayesian networks according to claim 1, characterized in that, The process of transforming the learner's intelligent diagnostic problem into a path search problem with the maximum decoding information specifically includes: Calculate from the evidence node according to the following formula. To the query node Decoding information content ,in Mutual information between the two knowledge points; The diagnostic objective is equivalent to finding the diagnostic path that maximizes the sum of the total mutual information of the paths. : , in Edges in a bidirectional weighted graph Mutual information weights Indicates all from the set of evidence nodes Starting from a certain node and arriving at the query node Among the feasible paths, the path with the largest sum of mutual information is selected. According to Shannon's information theory, this maximization is equivalent to minimizing the path conditional entropy, thus transforming the NP-hard exact probability inference problem into the maximum weighted path problem.
9. The learner intelligent diagnosis method based on Bayesian networks according to claim 1, characterized in that, It also includes offline graph index building and online greedy search, specifically including: Based on the obtained node embedding matrix The similarity between the embedding vectors of any two nodes is calculated using the following formula: , in, Represents the embedding vector and Similarity between them Let Euclidean distance represent the distance between two embedding vectors. The reciprocal of the Euclidean distance is taken so that the similarity is inversely proportional to the distance. Select the node with the highest similarity The nodes form the K-nearest neighbor graph index; the candidate edges in the K-nearest neighbor graph are filtered by information content threshold, and the edges with mutual information weights greater than a preset threshold are retained according to the following formula. The edge: ,in, An indicator function that indicates whether an edge is preserved; During online diagnosis, a greedy best-first search is used to search for the optimal diagnostic path in the filtered graph index, and the next-hop node is selected according to the following formula: , in This represents the next node chosen greedily. This represents the set of valid candidate neighbors after filtering by the information content threshold. This is the set of valid candidate neighbors after threshold filtering.
10. The learner intelligent diagnosis method based on Bayesian networks according to claim 1, characterized in that, The diagnostic probability of the computational learner for the queried knowledge point includes: Obtain the optimal diagnostic path Each node Marginal probability of control and query node embedding Embedded with path nodes similarity The weighted estimate is calculated according to the following formula: , , in, and The weighted estimates for query node values of 1 and 0, respectively; The final diagnosis probability is obtained by normalization according to the following formula: 。