A cognitive behavior modeling method and system based on large language model semantic enhancement
By generating structured semantic diagnostic descriptions and encoding them with student answering behaviors as vector representations, and using a kernel function alignment mechanism for fusion, this solves the problem that existing models cannot understand the semantic connotations of questions, achieving cognitive behavior modeling with high predictive performance and strong interpretability, and supporting personalized education applications.
Patent Information
- Application Number
- CN202511822460.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-17
- Estimated Expiration
- 2045-12-05
AI Technical Summary
Existing cognitive behavioral modeling methods fail to effectively integrate semantic information generated by large language models with student behavioral data, resulting in insufficient interpretability and intervention guidance capabilities of the models, and an inability to provide targeted teaching feedback.
By generating structured semantic diagnostic descriptions and encoding them with student answer behavior into vector representations, and using a kernel function alignment mechanism to fuse them, the interaction between students and questions is modeled, and knowledge state inferences and interpretability feedback are output.
The model not only predicts the probability of correct answers but also explains the reasons for errors, providing teachers with actionable teaching intervention guidelines, reducing the cost of acquiring semantic information, and supporting personalized educational interventions.
Smart Images

Figure CN121257554B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence and natural language processing technology, specifically relating to a cognitive behavior modeling method and system based on semantic enhancement of a large language model. Background Technology
[0002] In intelligent education systems, cognitive behavioral modeling aims to infer students' knowledge mastery by analyzing their historical question-answering interaction data. This technology is widely used in scenarios such as personalized learning path recommendation, adaptive practice systems, and the generation of teaching intervention strategies. In recent years, researchers have attempted to model cognitive behavior using various methods, primarily including IRT, DINA, NeuralCD, and RCD. These models effectively capture cognitive behavior by modeling the complex interaction between student ability and question difficulty.
[0003] Meanwhile, Large Language Modeling (LLM) is increasingly being applied in education. LLM possesses powerful natural language understanding capabilities, generating high-level semantic information such as question semantic descriptions, error attribution explanations, and concept association analysis, providing a new perspective for understanding students' cognitive processes. However, existing cognitive behavioral modeling methods have not effectively integrated the semantic information generated by LLM with student behavioral data, resulting in shortcomings in interpretability and intervention guidance capabilities.
[0004] Current mainstream models treat questions merely as discrete IDs or combinations of knowledge points, failing to grasp the semantic implications behind them (such as the thought process being tested, common error types, and points of conceptual confusion). This results in models only "memorizing" answer patterns but not "understanding" why students answer incorrectly, making it difficult to provide targeted instructional feedback.
[0005] Existing models typically only output "knowledge point mastery level," lacking attribution analysis of the reasons for errors. Teachers or the system cannot know whether students made mistakes due to "conceptual confusion," "careless calculation," or "knowledge gaps," making it difficult to implement personalized interventions. This "black box" characteristic restricts the practical application of models in real-world educational scenarios. Summary of the Invention
[0006] To address the problems existing in the prior art, this invention provides a cognitive behavior modeling method and system based on semantic enhancement of large language models. It aims to construct a cognitive behavior modeling method with both high predictive performance and strong interpretability by integrating the semantic information of questions generated by LLM with student answer behavior data.
[0007] To achieve the above objectives, the present invention provides the following solution:
[0008] A cognitive behavior modeling method based on semantic enhancement of a large language model, the method comprising:
[0009] Generate a structured semantic diagnostic description for each question;
[0010] The structured semantic diagnostic descriptions and students' historical answering behaviors are encoded into vector representations respectively;
[0011] By using a kernel function alignment mechanism, the vector representations of semantic diagnostic descriptions and the vector representations of answering behaviors are mapped to the same similarity space and then weighted and fused.
[0012] It receives the fused representation, models the interaction between students and questions, and outputs knowledge state inferences and interpretability feedback.
[0013] Optionally, methods for generating structured semantic diagnostic descriptions for each question include:
[0014] Retrieve the question stem text, options, related knowledge points, and preset diagnostic prompt templates;
[0015] Using the open-source large language model Qwen3-235B-A22B, we reasoned in the role of an "education expert" to generate structured semantic annotations for each practice question. ,in, For the correct reasoning process; Attributing typical errors in the options; The questions assess the level of cognitive ability. Personalized learning suggestions.
[0016] Preferably, methods for encoding structured semantic diagnostic descriptions into vector representations include:
[0017] ;
[0018] in, For semantic embedding, For semantic space dimension, This represents the Sentence-BERT model. A textual description of a concept;
[0019] Methods for encoding students' historical answer behavior into vector representations include:
[0020] ;
[0021] in, It is a one-hot vector. For the learnable parameter matrix, output For learnable students, the questions and knowledge points are embedded, and together they constitute the behavior embedding. This refers to the behavioral space dimension.
[0022] Preferably, the method of mapping the vector representation of semantic diagnostic description and the vector representation of answering behavior to the same similarity space through a kernel function alignment mechanism, and then performing weighted fusion, includes:
[0023] ;
[0024] in, To enhance the presentation, These are learnable weights.
[0025] Preferably, methods for receiving the fused representation, modeling the interaction between students and questions, and outputting knowledge state inferences and interpretability feedback include:
[0026] ;
[0027] in, This represents the Sigmoid activation function. , and This represents the weight matrix corresponding to the two linear layers and the output layer. , and This represents the corresponding bias term. Represents a non-linear activation function. For the final prediction result, For student-question interaction vectors, Representing students, Indicates the title.
[0028] This invention also provides a cognitive behavior modeling system based on semantic enhancement of a large language model. The system is used to implement the aforementioned method and includes: an LLM semantic diagnostic generator, a representation construction encoder, a kernel-aligned representation fusion module, and a cognitive behavior modeling layer.
[0029] The LLM semantic diagnostic generator is used to generate structured semantic diagnostic descriptions for each question.
[0030] This represents the construction of an encoder, which encodes the generated semantic annotations and students' historical answer behaviors into vector representations, respectively.
[0031] The kernel alignment representation fusion module is used to map the vector representation of semantic diagnosis description and the vector representation of answering behavior to the same similarity space through the kernel function alignment mechanism, and then perform weighted fusion.
[0032] The cognitive-behavioral modeling layer receives the fused representation, models the interaction between students and questions, and outputs knowledge state inferences and interpretability feedback.
[0033] Preferably, the LLM semantic diagnostic generator includes: an acquisition unit and a reasoning unit;
[0034] The acquisition unit is used to retrieve the question stem text, options, related knowledge points, and preset diagnostic prompt templates;
[0035] The reasoning unit, using the open-source large language model Qwen3-235B-A22B, acts as an "education expert" to generate structured semantic annotations for each practice question. ,in, For the correct reasoning process; Attributing typical errors in the options; The questions assess the level of cognitive ability. Personalized learning suggestions.
[0036] Preferably, the process of encoding structured semantic diagnostic descriptions into vector representations includes:
[0037] ;
[0038] in, For semantic embedding, For semantic space dimension, This represents the Sentence-BERT model. A textual description of a concept;
[0039] The process of encoding students' historical answer behavior into vector representations includes:
[0040] ;
[0041] in, It is a one-hot vector. For the learnable parameter matrix, output For learnable students, the questions and knowledge points are embedded, and together they constitute the behavior embedding. This refers to the behavioral space dimension.
[0042] Preferably, the process of mapping the vector representation of semantic diagnostic description and the vector representation of answering behavior to the same similarity space through a kernel function alignment mechanism, and then performing weighted fusion, includes:
[0043] ;
[0044] in, To enhance the presentation, These are learnable weights.
[0045] Preferably, the process of receiving the fused representation, modeling the interaction between the student and the question, and outputting knowledge state inference and interpretability feedback includes:
[0046] ;
[0047] in, This represents the Sigmoid activation function. , and This represents the weight matrix corresponding to the two linear layers and the output layer. , and This represents the corresponding bias term. Represents a non-linear activation function. For the final prediction result, For student-question interaction vectors, Representing students, Indicates the title.
[0048] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0049] 1. By automatically generating question-level semantic descriptions (such as error attribution, reasoning path, and learning suggestions) through a large language model, the model can not only predict the probability of answering correctly, but also explain "why mistakes were made", providing teachers with actionable teaching intervention basis.
[0050] 2. A kernel-aligned representation fusion mechanism is proposed, which aligns and weights the vector representation of the semantic diagnostic description generated by LLM with the vector representation of the student's answer behavior in a unified space, effectively bridging the gap between "semantic understanding" and "behavioral modeling" in traditional models.
[0051] 3. High-quality semantic information can be obtained without manual annotation. It automatically parses the question text using an open-source large language model, without relying on experts to manually annotate error types or conceptual relationships, which greatly reduces the cost of obtaining semantic information and is suitable for large-scale online education scenarios.
[0052] 4. The output includes the mastery status of knowledge points, typical error types (such as "concept confusion" and "careless calculation"), and targeted learning suggestions. It can be directly used in educational applications such as adaptive practice systems and intelligent tutoring robots, and supports personalized educational intervention. Attached Figure Description
[0053] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 This is a schematic diagram of a cognitive behavior modeling method based on semantic enhancement of a large language model, according to an embodiment of the present invention. Detailed Implementation
[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0057] Example 1
[0058] like Figure 1 As shown, this invention provides a cognitive behavior modeling method based on semantic enhancement of a large language model. It aims to construct a cognitive behavior modeling method with both high predictive performance and strong interpretability by fusing semantic information of questions generated by an LLM with student answer behavior data. The method includes:
[0059] Generate a structured semantic diagnostic description for each question;
[0060] The structured semantic diagnostic descriptions and students' historical answering behaviors are encoded into vector representations respectively;
[0061] By using a kernel function alignment mechanism, the vector representations of semantic diagnostic descriptions and the vector representations of answering behaviors are mapped to the same similarity space and then weighted and fused.
[0062] It receives the fused representation, models the interaction between students and questions, and outputs knowledge state inferences and interpretability feedback.
[0063] In this embodiment, the method for generating a structured semantic diagnostic description for each question includes:
[0064] Retrieve the question stem text, options, related knowledge points, and preset diagnostic prompt templates;
[0065] Using the open-source large language model Qwen3-235B-A22B, we reasoned in the role of an "education expert" to generate structured semantic annotations for each practice question. ,in, For the correct reasoning process; Attributing typical errors in the options; The questions assess the level of cognitive ability. Personalized learning suggestions.
[0066] In this embodiment, the method for encoding structured semantic diagnostic descriptions into vector representations includes:
[0067] ;
[0068] in, For semantic embedding, For semantic space dimension, This represents the Sentence-BERT model. A textual description of a concept;
[0069] Methods for encoding students' historical answer behavior into vector representations include:
[0070] ;
[0071] in, It is a one-hot vector. For the learnable parameter matrix, output For learnable students, the questions and knowledge points are embedded, and together they constitute the behavior embedding. This refers to the behavioral space dimension.
[0072] In this embodiment, the method of mapping the vector representation of semantic diagnosis description and the vector representation of answering behavior to the same similarity space through a kernel function alignment mechanism, and then performing weighted fusion, includes:
[0073] ;
[0074] in, To enhance the presentation, These are learnable weights.
[0075] In this embodiment, the method for receiving the fused representation, modeling the interaction between students and questions, and outputting knowledge state inference and interpretability feedback includes:
[0076] ;
[0077] in, This represents the Sigmoid activation function. , and This represents the weight matrix corresponding to the two linear layers and the output layer. , and This represents the corresponding bias term. Represents a non-linear activation function. For the final prediction result, For student-question interaction vectors, Representing students, Indicates the title.
[0078] Example 2
[0079] The present invention also discloses a cognitive behavior modeling system based on semantic enhancement of a large language model. The system is used to implement the method described in Embodiment 1. The system includes: an LLM semantic diagnostic generator, a representation construction encoder, a kernel-aligned representation fusion module, and a cognitive behavior modeling layer.
[0080] The LLM semantic diagnostic generator is used to generate structured semantic diagnostic descriptions for each question.
[0081] This represents the construction of an encoder, which encodes the generated semantic annotations and students' historical answer behaviors into vector representations, respectively.
[0082] The kernel alignment representation fusion module is used to map the vector representation of semantic diagnosis description (semantic representation) and the vector representation of answer behavior (behavioral representation) to the same similarity space through the kernel function alignment mechanism, and then perform weighted fusion.
[0083] The cognitive-behavioral modeling layer receives the fused representation, models the interaction between students and questions, and outputs knowledge state inferences and interpretability feedback.
[0084] The first module, the LLM semantic diagnostic generator, includes: an acquisition unit and an inference unit;
[0085] This module is used for each question. Generate structured semantic diagnostic descriptions, including: correct reasoning paths, common error types, knowledge point difficulty levels, and learning suggestions. Specifically, the input to the LLM semantic diagnostic generator includes the question stem text, options, and related knowledge points. The system includes a pre-defined diagnostic prompt template; then, using the open-source large language model Qwen3-235B-A22B, it performs reasoning as an "education expert"; and outputs structured semantic annotations for each practice question. This includes the correct reasoning process. Typical error attribution for options (e.g., conceptual confusion, calculation errors); the questions test the level of cognitive ability. and personalized learning suggestions This module addresses the problem that existing models rely solely on question IDs or knowledge point embeddings and cannot understand the semantic meaning of questions, providing high-quality semantic input for subsequent modeling.
[0086] The second module: represents the construction of the encoder.
[0087] This module encodes the semantic annotations generated by LLM and students' historical answer behavior into vector representations for subsequent alignment and fusion. This includes: 1) a semantic encoder, whose input is the semantic annotations. Each sub-item in (e.g.) ), by using the Sentence-BERT model ( Encode it as a dense vector:
[0088] ;
[0089] in, For semantic embedding, For semantic space dimension, A textual description of a concept.
[0090] 2) Behavior encoder, whose input includes student interaction sequences. ,in For the answer results; the three are encoded separately using a learnable embedding matrix:
[0091] ;
[0092] in, It is a one-hot vector. For the learnable parameter matrix, output For learnable students, the questions and knowledge points are embedded, and together they constitute the behavior embedding. This module represents the behavioral space dimension. It implements the initial separation and encoding of semantic information and behavioral data, laying the foundation for subsequent alignment.
[0093] The third module: kernel alignment representation fusion module
[0094] This module addresses the issue of inconsistent dimensions and spatial fragmentation between semantic and behavioral representations. It maps them to the same similarity space using a kernel function alignment mechanism and performs weighted fusion. First, four sets of kernel matrices are defined to measure the similarity between semantic and behavioral representations: 1) : The similarity between the semantic representations of the questions, where N represents the number of questions; 2) : Similarity between the behavioral representations of the questions; 3) : Semantic similarity between knowledge points, where K represents the number of knowledge points; 4) Similarity between knowledge points and behaviors. Then, a Gaussian RBF kernel is used:
[0095] ;
[0096] Where exp represents the exponential function. Controlling the width of the Gaussian kernel, ||·||² represents two vectors. and The Euclidean distance between them is minimized by the Frobenius norm loss, ensuring consistency between semantic and behavioral representations within their respective spaces.
[0097] ;
[0098] During model training, the loss function controls alignment through learnable weights. Integrating semantic and behavioral representations:
[0099] ;
[0100] Final output enhancement representation It retains semantic richness while being compatible with behavioral information, providing a unified input for subsequent modeling.
[0101] The fourth module: Cognitive Behavioral Modeling Layer
[0102] This module receives the fused representation. It models the interaction between students and questions, outputting knowledge state inferences and interpretable feedback. Using the IRT model, student performance is decomposed into three interpretable cognitive components: 1) proficiency. :student In the knowledge points 1) Level of mastery; 2) Difficulty :topic Knowledge points 3) Difficulty of the test; :topic Differentiate the levels of students with different abilities. The calculation method is as follows:
[0103] ;
[0104] ;
[0105] ;
[0106] in, This represents the Sigmoid activation function, which maps the input to the (0,1) interval and is used to normalize the probability values. Represents the proficiency weight matrix. Represents the difficulty weight matrix. Discrimination weight matrix. Then, interaction modeling and prediction are performed through the IRT layer, by constructing student-question interaction vectors. :
[0107] ;
[0108] in, On behalf of students Knowledge points l proficiency Representative topic j In the knowledge points l The difficulty of the above The first in the Q matrix Line represents the question. The set of knowledge points tested. Finally, prediction is performed using a two-layer MLP:
[0109] ;
[0110] in, This represents the Sigmoid activation function. , and This represents the weight matrix corresponding to the two linear layers and the output layer. , and This represents the corresponding bias term. Represents a non-linear activation function. The final prediction result is provided. In addition to predicting probabilities, the system further outputs the following through LLM prompts and student interaction records: a knowledge point mastery heatmap, error attribution (such as "concept confusion" or "calculation error"), and learning suggestions (such as "strengthen fraction addition practice"). This module realizes the transformation from "black box prediction" to "white box analysis," supporting teachers in developing precise intervention strategies.
[0111] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A cognitive behavior modeling method based on large language model semantic enhancement, characterized in that, The method comprises: generating a structured semantic diagnostic description for each question; encoding the structured semantic diagnostic description and the student's historical answering behavior into vector representations, respectively; mapping the vector representations of the semantic diagnostic description and the answering behavior into the same similarity space through a kernel function alignment mechanism, and performing weighted fusion; receiving the fused representation, modeling the interaction relationship between the student and the question, and outputting knowledge state inference and explainability feedback; The method for generating a structured semantic diagnostic description for each question comprises: obtaining the stem text, the options, the associated knowledge points, and the preset diagnostic prompt template; Using open-source large language model Qwen3-235B-A22B, as an "education expert" to reason and generate structured semantic annotations for each exercise question wherein, is a correct reasoning process; is a typical error attribution for the option; the question examines a cognitive level; is a personalized learning suggestion; The method for encoding the structured semantic diagnostic description into a vector representation comprises: ; wherein, is a semantic embedding, is a semantic space dimension, denotes a Sentence-BERT model, is a textual description of a concept; The method for encoding the student's historical answering behavior into a vector representation comprises: ; wherein, is a one-hot vector, is a learnable parameter matrix, output is a learnable student, question, and knowledge point embedding, the learnable student, question, and knowledge point embedding collectively constituting a behavior embedding, is a behavior space dimension; The method for receiving the fused representation, modeling the interaction relationship between the student and the question, and outputting knowledge state inference and explainability feedback comprises: ; where, denotes a Sigmoid activation function, , and represent the corresponding weight matrices of two linear layers and the output layer, , and represent the corresponding bias terms, denotes a non-linear activation function, is the final prediction result, is the student-question interaction vector, denotes a student, denotes a question.
2. The method of claim 1, wherein, The method for mapping the vector representations of the semantic diagnostic description and the answering behavior into the same similarity space through a kernel function alignment mechanism, and performing weighted fusion comprises: ; wherein, to enhance the representation, are learnable weights.
3. A cognitive behavior modeling system based on large language model semantic enhancement, the system is used to implement the method of any one of claims 1-2, characterized in that, The system comprises: an LLM semantic diagnostic generator, a representation construction encoder, a kernel alignment representation fusion module, and a cognitive behavior modeling layer. The LLM semantic diagnostic generator is configured to generate a structured semantic diagnostic description for each question. The representation construction encoder is configured to encode the generated semantic annotation and the student's historical answering behavior into vector representations, respectively. The kernel alignment representation fusion module is configured to map the vector representations of the semantic diagnostic description and the answering behavior into the same similarity space through a kernel function alignment mechanism, and perform weighted fusion. The cognitive behavior modeling layer is configured to receive the fused representation, model the interaction relationship between the student and the question, and output knowledge state inference and explainability feedback. The LLM semantic diagnostic generator comprises an obtaining unit and an inference unit. The obtaining unit is configured to obtain the stem text, the options, the associated knowledge points, and the preset diagnostic prompt template. An inference unit is configured to use an open-source large language model Qwen3-235B-A22B to generate structured semantic annotations for each exercise question in the role of an "education expert" wherein, is a correct inference process; is a typical error attribution of the option; the question examines a cognitive level; is a personalized learning suggestion; The process for encoding the structured semantic diagnostic description into a vector representation comprises: ; wherein, is a semantic embedding, is a semantic space dimension, denotes a Sentence-BERT model, is a textual description of a concept; The process for encoding the student's historical answering behavior into a vector representation comprises: ; wherein, is a one-hot vector, is a learnable parameter matrix, output is a learnable student, question, and knowledge point embedding, the learnable student, question, and knowledge point embedding collectively constituting a behavior embedding, is a behavior space dimension; The process for receiving the fused representation, modeling the interaction relationship between the student and the question, and outputting knowledge state inference and explainability feedback comprises: ; where, represents a Sigmoid activation function, , and represent the corresponding weight matrices of two linear layers and the output layer, , and represent the corresponding bias terms, represents a non-linear activation function, is the final prediction result, is the student-question interaction vector, represents a student, represents a question.
4. The system of claim 3, wherein, The process for mapping the vector representations of the semantic diagnostic description and the answering behavior into the same similarity space through a kernel function alignment mechanism, and performing weighted fusion comprises: ; wherein, to enhance the representation, are learnable weights.
Citation Information
Patent Citations
Dynamic key value memory network knowledge tracking method and system integrating graph guidance and behavior self-adaption
CN120929962A
Artificial intelligence tutoring system that support diagnosis of learning proficiency
KR102538340B1
