Cross-theme composition scoring method and device based on interpretable knowledge capture and medium
By using the essay encoder and scorer to train the scoring model and generate explicit shared knowledge representations, the problem of difficulty in capturing deep-level features and lack of explanatory nature in the prior art is solved, and the more efficient and transparent effect of cross-themed composition scoring is achieved.
Patent Information
- Application Number
- CN202411821230.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-12-11
AI Technical Summary
The existing automatic scoring method of cross-theme composition relies on manual feature engineering, making it difficult to capture the deep language and writing style characteristics in the composition, and the model has limited application capabilities when it lacks new theme tag data, and the scoring results lack explanatory.
A cross-themed composition scoring method based on interpretable knowledge capture is proposed. By obtaining the source theme composition as training data, using the composition encoder and scorer to train the scoring model, clustering and clustering optimization are performed, and explicit shared knowledge representations are generated, and composition scoring is combined with these representations.
The transfer ability between different topics is realized, the model's ability to capture multi-faceted shared knowledge is improved, and the interpretation and accuracy of the scoring results are enhanced.
Smart Images

Figure CN119918541A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a cross-topic composition scoring method, device and medium based on interpretable knowledge capture. Background Art
[0002] The research on automatic scoring of cross-topic essays focuses on learning the consistency of data distribution of different topics to improve the generalization ability of the model on different topics. In the research on automatic scoring of cross-topic essays, the task is heavy. The training and test essay data of the model come from different topics and have different data distributions, which brings challenges to the research on automatic scoring of cross-topic essays.
[0003] Although the existing cross-topic essay automatic scoring research methods have achieved good results, they still have the following shortcomings:
[0004] (1) Existing technologies mainly rely on manual feature engineering to extract topic-independent surface features, such as sentence length, composition length, readability, and complexity. Although these features are helpful for composition quality assessment to a certain extent, they are difficult to capture deep-level features such as language and writing style in the composition. Some methods try to use neural networks to extract high-level features, but they usually rely on data on the target topic. This reliance on target topic data limits the model's ability to be applied when new topic label data is lacking.
[0005] (2) Existing methods mainly focus on the common features between topics, but often ignore the similarities in more specific aspects of composition, such as grammar, structure, and emotional expression. Compositions on different topics may have similar features in certain specific dimensions (for example, similar performance in terms of grammatical error frequency or emotional expression intensity), and these similarities can form a shared knowledge base between topics. However, existing methods fail to fully explore the feature similarities in these specific dimensions, which limits the model's ability to transfer between different topics and makes it impossible to use this more detailed shared information to improve the performance of cross-topic applications.
[0006] (3) The scoring results output by the existing model lack intuitive explanations. Summary of the invention
[0007] The main purpose of the embodiments of the present invention is to propose a cross-topic composition scoring method, device and medium based on explainable knowledge capture, in order to solve at least one problem of the prior art. The present invention can accurately implement cross-topic composition scoring based on explainable knowledge capture.
[0008] To achieve the above purpose, an embodiment of the present invention proposes a cross-topic composition scoring method based on interpretable knowledge capture, the method comprising:
[0009] The source subject composition is obtained as a training data set, and a preset scoring model is trained using the training data set to update the parameters of the scoring model; the scoring model includes a composition encoder and a scorer; the training data set includes composition data of multiple subjects, and the composition data includes multiple compositions and their corresponding composition scores;
[0010] The training data set is encoded using the composition encoder with updated parameters, and then clustering is performed based on the encoding results to obtain multiple clusters; clustering optimization is performed based on the clusters, and then the parameters of the composition encoder are updated based on the results of clustering optimization to obtain a target scoring model;
[0011] Obtain prompt word information according to the clustering clusters, and generate explicit shared knowledge representation of each clustering cluster using a preset semantic representation model based on the prompt word information;
[0012] The target scoring model is used in combination with explicit shared knowledge representation to score the essay to be scored and obtain the scoring result of the essay to be scored.
[0013] In some embodiments, the composition encoder and the scorer of the scoring model are preset with initial parameters; training the preset scoring model using the training data set and updating the parameters of the scoring model include the following steps:
[0014] Extract a preset number of essay samples from the essay data of each topic in the training data set as training samples;
[0015] The training samples are encoded in sequence by a preset composition encoder to obtain a composition feature representation corresponding to each composition in the training sample;
[0016] The composition feature representation is concatenated with the preset initial explicit knowledge to obtain the final representation;
[0017] The final representation is input into the scorer for scoring, and the predicted score of each composition in the training sample is obtained;
[0018] According to the predicted score and the corresponding essay score of each training sample, the mean square error is used as the loss function, and then the parameters of the essay encoder and scorer are updated through back propagation and stochastic gradient descent;
[0019] Extract a preset number of essay samples from the remaining essay data of each topic in the training data set as training samples, return to execute the step of encoding the training samples in sequence through the preset essay encoder, until all essays in the training data set are traversed, add 1 to the training round, and restore the training data set; the initial training round is 0;
[0020] Return to execute the step of extracting a preset number of essay samples from the essay data of each topic in the training data set as training samples, until the training rounds reach the preset training rounds, and complete the parameter update of the scoring model according to the parameters of the essay encoder and scorer updated for the last time.
[0021] In some embodiments, encoding the training data set using the composition encoder with updated parameters, and then clustering according to the encoding results to obtain multiple clusters, including the following steps:
[0022] Sampling the composition data of each topic in the training data set to obtain batch samples; the batch samples include a predetermined number of compositions extracted from each topic, and the total number of batch samples is the product of the number of topics in the training data set and the predetermined number;
[0023] Encode the batch samples using the composition encoder with updated parameters to obtain the composition representation corresponding to each composition in the batch samples;
[0024] Based on the composition representation, the batch samples are clustered using a preset clustering algorithm to obtain the cluster label corresponding to each composition in the batch samples, and then multiple clusters and the cluster center of each cluster are obtained.
[0025] In some embodiments, clustering batch samples using a preset clustering algorithm based on the composition representation includes the following steps:
[0026] Randomly select a specified number of samples from the batch samples as center points;
[0027] Based on the composition representation, the samples in the batch samples are assigned to each center point by minimizing the Euclidean distance;
[0028] In the process of sample allocation for batch samples, the center point is updated according to the mean of the composition representation corresponding to all samples included in the current cluster clustered by each center point until the batch sample completes the allocation of all samples.
[0029] In some embodiments, each cluster includes multiple compositions and corresponding composition representations thereof, and the composition representations are obtained by encoding the corresponding compositions by a composition encoder after updating parameters; cluster optimization is performed based on the cluster clusters, and then the parameters of the composition encoder are updated according to the results of the cluster optimization to obtain a target scoring model, including the following steps:
[0030] Align the composition representations in each cluster based on a preset clustering optimization method to obtain a clustering optimization result for each cluster;
[0031] Back-propagation and gradient descent are applied to update the parameters of the composition encoder based on the clustering optimization results.
[0032] In some embodiments, each cluster includes multiple compositions and corresponding composition representations, and the composition representations are obtained by encoding the corresponding compositions by a composition encoder after updating parameters; prompt word information is obtained according to the clusters, and based on the prompt word information, an explicit shared knowledge representation of each cluster is generated using a preset semantic representation model, including the following steps:
[0033] Obtain the target number of essays in each cluster that are closest to the cluster center of the cluster as representative samples;
[0034] Embed the representative sample into a preset prompt word template to obtain prompt word information;
[0035] Based on the prompt word information, the preset large language model is guided to infer and generate the feature description text of the cluster;
[0036] The feature description text is input into the preset semantic representation model to generate the explicit shared knowledge representation of the clustering clusters.
[0037] In some embodiments, using the target scoring model and combining the explicit shared knowledge representation to score the composition to be scored, and obtaining the scoring result of the composition to be scored, includes the following steps:
[0038] Input the composition to be graded into the composition encoder of the target scoring model and encode it to obtain the target composition representation;
[0039] The target composition representation is matched with the explicit shared knowledge representation corresponding to each cluster by similarity, and the explicit shared knowledge representation with the highest similarity is used as the target explicit knowledge representation;
[0040] The target composition representation and the target explicit knowledge representation are concatenated and input into the scorer in the target scoring model to score the composition, and the scoring result of the composition to be scored is predicted.
[0041] To achieve the above-mentioned purpose, another aspect of an embodiment of the present invention provides a cross-topic composition scoring device based on interpretable knowledge capture, the device comprising:
[0042] The first module is used to obtain source theme compositions as training data sets, use the training data sets to train a preset scoring model, and update the parameters of the scoring model; the scoring model includes a composition encoder and a scorer; the training data sets include composition data of multiple themes, and the composition data include multiple compositions and their corresponding composition scores;
[0043] The second module is used to encode the training data set using the composition encoder with updated parameters, and then cluster the encoding results to obtain multiple clusters; perform clustering optimization based on the clusters, and then update the parameters of the composition encoder according to the results of clustering optimization to obtain a target scoring model;
[0044] The third module is used to obtain prompt word information according to the clustering clusters, and based on the prompt word information, generate the explicit shared knowledge representation of each cluster cluster using a preset semantic representation model;
[0045] The fourth module is used to score the composition to be scored by using the target scoring model in combination with explicit shared knowledge representation to obtain the scoring result of the composition to be scored.
[0046] To achieve the above objective, another aspect of an embodiment of the present invention provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above method when executing the computer program.
[0047] To achieve the above objective, another aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0048] The embodiments of the present invention include at least the following beneficial effects: the present invention provides a cross-topic composition scoring method, device and medium based on explainable knowledge capture, the scheme obtains source topic compositions as training data sets, uses the training data sets to train a preset scoring model, and updates the parameters of the scoring model; the scoring model includes a composition encoder and a scorer; the training data set includes composition data of multiple topics, and the composition data includes multiple compositions and their corresponding composition scores; the training data set is encoded using the composition encoder after updating the parameters, and then clustering is performed according to the encoding results to obtain multiple clustering clusters; clustering optimization is performed based on the clustering clusters, and then the parameters of the composition encoder are updated according to the results of the clustering optimization to obtain a target scoring model; prompt word information is obtained according to the clustering clusters, and based on the prompt word information, an explicit shared knowledge representation of each clustering cluster is generated using a preset semantic representation model; the composition to be scored is scored using the target scoring model in combination with the explicit shared knowledge representation to obtain a scoring result for the composition to be scored. The present invention uses training data to train the scoring model; then, the training data of essays of different themes are clustered so that essays with similar features are aggregated into the same cluster, and the parameters of the essay encoder obtained by clustering are optimized, thereby enhancing the model's ability to capture multi-faceted shared knowledge. In this process, the explicit knowledge description of each cluster is generated by the semantic representation model and integrated into the final encoding of the essay, thereby improving the model's representation of different themes in terms of multi-dimensional essay features, thereby overall improving the model's scoring accuracy and interpretability for new theme essays. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is a schematic diagram of the principle architecture of automatic scoring of cross-topic essays provided by an embodiment of the present invention;
[0050] Figure 2 is a flow chart of a cross-topic composition scoring method based on interpretable knowledge capture provided by an embodiment of the present invention;
[0051] Figure 3 It is an overall flow chart of a cross-topic composition scoring method based on interpretable knowledge capture provided by an embodiment of the present invention;
[0052] Figure 4 It is a flow chart of a multi-faceted knowledge discovery and optimization method based on clustering provided by an embodiment of the present invention;
[0053] Figure 5 is a flow chart of a method for capturing and selecting explicit knowledge provided by an embodiment of the present invention;
[0054] Figure 6 It is a structural schematic diagram of a cross-topic composition scoring device based on interpretable knowledge capture provided by an embodiment of the present invention;
[0055] Figure 7 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present invention. They are only examples of devices and methods consistent with some aspects of the embodiments of the present invention as detailed in the attached claims.
[0057] It is understood that the terms "first", "second", etc. used in the present invention can be used to describe various concepts in the present invention, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determination".
[0058] The terms "at least one", "multiple", "each", "any", etc. used in the present invention, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0059] Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the present invention are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.
[0060] To facilitate the understanding of the technical solution of the present invention, the technical means and features that may appear in the technical solution of the present invention are explained below:
[0061] Automatic Essay Scoring: Automatic Essay Scoring (AES) refers to the process of using a scoring model to score the overall quality or certain attributes of an essay. Automatic essay scoring is widely used in the field of educational assessment, which can effectively reduce labor costs and improve the fairness and consistency of scoring.
[0062] Prompt-dependent Automated Essay Scoring: Prompt-dependent Automated Essay Scoring refers to using labeled essay data on the same topic to train a scoring model and automatically score other unlabeled essays on the topic.
[0063] Cross-prompt Automated Essay Scoring: Cross-prompt Automated Essay Scoring refers to using labeled essay training data from different topics to train a scoring model and automatically score unlabeled essays from new topics. Usually, the different topics used for model training are called source prompts, and the topic used for the scored essay is called the target prompt.
[0064] Clustering: Clustering refers to the process of dividing a set of objects or data samples into different groups or clusters based on their similarities or correlations. The goal of clustering is to make objects within the same cluster as similar as possible, while objects between different clusters are as dissimilar as possible. Cluster analysis can help discover the inherent structure in the data, find similar samples or objects, and provide insights and understanding of the data set.
[0065] Text clustering: Text clustering is an unsupervised learning method used to classify text samples with similar features into the same group or cluster. The goal of clustering is to group texts into sets with similar themes, semantics, or structures by discovering the intrinsic similarities between them. Text clustering can help understand the structure of large-scale text datasets, discover hidden patterns and themes, and extract useful information.
[0066] Multi-aspect shared knowledge: Multi-aspect shared knowledge refers to the shared features of papers on different topics in terms of grammar, text coherence, writing style, etc. Multi-aspect shared knowledge emphasizes the rich details in essays on different topics, which helps the model recognize and learn common language features, thereby improving the accuracy and generalization ability of automatic scoring of cross-topic essays.
[0067] Explicit knowledge capture: Explicit knowledge capture refers to converting implicit knowledge in clusters into interpretable text descriptions through large language models, making implicit knowledge explicit. Through the explicit knowledge capture method, the generated knowledge text can be represented by a text encoder (such as BERT) to generate explicit shared knowledge representations of the composition, thereby effectively improving the model's understanding and utilization of shared knowledge between compositions on different topics.
[0068] Implicit knowledge capture: Implicit knowledge capture refers to the unannotated shared features of essays that are automatically learned from essay data by the model, such as the grammar and logical structure of the essays. Implicit knowledge capture enables the model to identify the common features of essays on different topics, forming the basis for cross-topic shared knowledge.
[0069] (1) Description of the cross-topic essay automatic scoring task:
[0070] The cross-topic essay automatic scoring task refers to the research task of automatically scoring the unlabeled essays of the target topic by training the scoring model with labeled essays of the source topic. This task requires the model to be able to comprehensively evaluate the essays and assign a corresponding score to each essay. The cross-topic essay automatic scoring task is of great significance to the fields of education and language assessment. It can provide an efficient, objective and consistent evaluation method, and provide valuable reference and feedback for teachers, students and researchers.
[0071] like Figure 1 As shown in Figure 1, a schematic diagram of automatic scoring of cross-topic essays is shown. First, we use the source topic essays with labels as input (e.g. Figure 1 All scored essays on the seven topics in ) are used to train a cross-topic scoring model. Then, the scoring model is used to score the unscored target topic essays and output the corresponding essay scores.
[0072] (2) Text clustering technology:
[0073] Text clustering is an unsupervised learning method that groups text data according to similarity. It can group text samples with similar content, grammar, logic, and structure into the same cluster to reveal the internal structure and correlation between text data. Text clustering usually involves the following key technologies:
[0074] ① Feature representation: Text samples need to be converted into vector form that can be processed by computers. Common feature representation methods include Bag-of-Words, TF-IDF weights, and word embeddings (such as Word2Vec and GloVe). The Bag-of-Words model is relatively simple but difficult to capture the semantic associations between words; the TF-IDF method can highlight the weights of feature words in the text; and word embeddings effectively capture the semantic information of words by mapping words into vector space.
[0075] ②Similarity measurement: Similarity measurement is used to measure the similarity between text samples. Common methods include cosine similarity, Jaccard similarity, etc. Choosing a suitable similarity measurement method is crucial to improving the accuracy and consistency of clustering.
[0076] ③ Clustering algorithm: The grouping of text samples mainly depends on a specific clustering algorithm. Common algorithms include K-Means, Gaussian Mixture Model (GMM) and hierarchical clustering. The K-Means algorithm is suitable for large data scale and fast processing speed, while GMM can cluster data based on a probability model. Hierarchical clustering shows the relationship between samples by building a hierarchical tree structure.
[0077] ④ Cluster evaluation and interpretation: Evaluate the effect of clustering through internal indicators (such as silhouette coefficient) and external indicators (such as adjusted Rand coefficient). Explain the characteristics and topics of each cluster to help understand the structure of the cluster and extract potential knowledge features.
[0078] (3) Introduction to Large Language Model Technology:
[0079] Large Language Model (LLM), such as GPT-3 and BERT, is one of the technologies that has made important progress in the field of natural language processing (NLP) in recent years. Large language models have powerful language generation and understanding capabilities through pre-training on massive text data, enabling them to perform well in a variety of language tasks. LLM is particularly outstanding in capturing, summarizing and generating language knowledge, especially in automated tasks. It can extract common features from large-scale multi-dimensional texts and generate text descriptions with explanatory and generalizable capabilities.
[0080] In this invention, the large language model is mainly used to generate and represent the multi-dimensional shared knowledge in each cluster, and provide highly relevant knowledge support for the model in the scoring stage. The technical advantages of LLM in this task are mainly reflected in the following aspects:
[0081] ① Large language models have the ability to extract multifaceted features from complex texts and can capture the commonalities in grammar, semantics, style, and structure between different types of essays. These shared features provide a knowledge basis for cross-topic automatic scoring tasks, enabling the model to accurately evaluate the target essay without target topic label data.
[0082] ② The large language model makes implicit features explicit by generating natural language descriptions, providing clear knowledge representation. These descriptions can improve the interpretability of the model, so that the scoring results no longer rely solely on implicit embeddings, but are combined with intuitive summaries of cluster features. This explicit representation also facilitates further analysis and application, helping to improve the transparency and persuasiveness of the scoring results.
[0083] ③The pre-trained corpus of the large language model provides rich context and extensive language understanding capabilities, enabling the model to more effectively identify shared features of essays on new topics.
[0084] In applications, the generation effect of LLM is largely affected by the input prompt words, which makes prompt word engineering the key to the efficient use of large language models. Prompt word engineering improves the output effect of LLM by designing, optimizing and adapting prompt words, ensuring that the knowledge representation generated by the model meets the task requirements. To achieve this, the present invention further introduces prompt word engineering to fully tap the potential of large language models.
[0085] (4) Introduction to the prompt word engineering technology:
[0086] Prompt word engineering refers to optimizing the output of the model by designing reasonable input prompt words when applying a large language model (LLM). Prompt words play a guiding role in LLM, and different prompt words have a significant impact on the model generation results. Prompt word engineering includes the following technical contents:
[0087] ① Prompt word design: The core of designing prompt words is to clarify the target output and required information of the model. For example, when summarizing the common features of the text, prompt words can clearly require the model to focus on specific text attributes (such as grammar, writing style, etc.), thereby improving the pertinence and consistency of the output.
[0088] ② Prompt word optimization: Prompt word optimization includes adjusting the wording, word order and instructions of the prompt word to improve the accuracy of LLM generation. Through experimental adjustment, the optimal prompt word form for generating the required content is found, which helps to stabilize the model generation.
[0089] ③ Prompt word adaptability: Different LLMs may respond differently to prompt words, so the prompt word engineering needs to be specifically adapted according to the selected model to ensure that ideal output effects can be obtained on different model platforms.
[0090] In the present invention, the prompt word engineering is used to guide the large language model to summarize the common features in various clusters to generate explanatory text descriptions. This process helps the model capture the multidimensional knowledge features in different text clusters and improves the intuitiveness and interpretability of cluster representation.
[0091] The cross-topic composition scoring method based on interpretable knowledge capture provided by the embodiment of the present invention relates to the field of data processing technology. The cross-topic composition scoring method based on interpretable knowledge capture provided by the embodiment of the present invention can be applied to a terminal, can also be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms and other basic cloud computing services. The server can also be a node server in a blockchain network; the software can be an application that implements a cross-topic composition scoring method based on interpretable knowledge capture, etc., but is not limited to the above forms.
[0092] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0093] Figure 2is an optional flowchart of a cross-topic composition scoring method based on explainable knowledge capture provided by an embodiment of the present invention. Figure 2 The method may include but is not limited to steps S100 to S400.
[0094] S100, obtaining source theme compositions as training data sets, using the training data sets to train a preset scoring model, and updating parameters of the scoring model; the scoring model includes a composition encoder and a scorer;
[0095] The training data set includes composition data of multiple topics, and the composition data includes multiple compositions and their corresponding composition scores; the composition encoder and scorer of the scoring model are preset with initial parameters;
[0096] It should be noted that in some embodiments, using the training data set to train the preset scoring model and update the parameters of the scoring model can include the following steps: extracting a preset number of essay samples from the essay data of each topic in the training data set as training samples; encoding the training samples in turn through a preset essay encoder to obtain a composition feature representation corresponding to each essay in the training sample; concatenating the composition feature representation with the preset initial explicit knowledge to obtain a final representation; inputting the final representation into the scorer for scoring processing to obtain a predicted score for each essay in the training sample; and performing a weighted average based on the predicted score and the corresponding essay score of each essay in the training sample, using the mean square error as the loss function. The parameters of the composition encoder and the scorer are updated through back propagation and stochastic gradient descent; a preset number of composition samples are extracted from the remaining composition data of each subject in the training data set as training samples, and the step of encoding the training samples in sequence through the preset composition encoder is returned until all the compositions in the training data set are traversed, the training round is increased by 1, and the training data set is restored; the initial training round is 0; the step of extracting a preset number of composition samples from the composition data of each subject in the training data set as training samples is returned until the training round reaches the preset training round, and the parameter update of the scoring model is completed according to the parameters of the composition encoder and the scorer updated for the last time.
[0097] For example, in some specific implementations, the source topic composition training dataset D is first used as input, and the explicit knowledge h is randomly initialized. x,shared , encoded by composition encoder E(*) to obtain composition representation h x , the two are spliced together to get the final representation of the composition The input of the model scorer is used to train the cross-topic scoring model, and the parameter of the composition encoder E(*) is defined as θ. In some specific application scenarios, the pre-training of the scoring model can be implemented as follows:
[0098] Step 1: Use the encoder to encode the composition:
[0099] Take the source topic composition as the training data set D, assuming that the composition data of the mth topic in the training data is in represents the i-th essay, is the corresponding score, M represents the total number of topics, and N represents the number of essays in topic m.
[0100] (1) Extract a batch of essays from the training dataset for each topic Where N A Indicates the number of essay samples in this batch, and its corresponding score label is y 1 ,y 2 ,…,y NA .
[0101] (2) Assume that the composition sample x in the mth topic is encoded by a composition encoder (such as CNN-LSTM-Att or BERT) to obtain the representation vector of the composition, denoted as h x =E(x m ), where h x represents the feature representation of the composition after encoding, and E represents the text encoder. The encoded composition representation h x It will be used for subsequent scoring model training.
[0102] Step 2: Training scoring model:
[0103] (1) For each composition i, the composition obtained by encoding it is represented as Combine the initial explicit knowledge (randomly initialized) into the scorer to predict the corresponding essay score And based on the real label y of the composition i Calculate the scoring loss, assuming that the batch has a total of N A The predicted score of the essay sample is The true score label is
[0104]
[0105] (2) Calculate the mean square error as the loss function, as shown in formula (1):
[0106]
[0107] (3) Apply back propagation and stochastic gradient descent to update the parameters of the composition encoder and scorer of the scoring model, where the parameters of the composition encoder E(*) are denoted as θ.
[0108] Step 3: Repeat Step 1 to 2 until all the essays in the training set are traversed, completing a round of model training.
[0109] Step 4: Iterate Steps 1 to 3 to train the scoring model for multiple rounds. After τ rounds of training, the encoder E(*) and parameters θ of the currently trained scoring model are obtained.
[0110] S200, encoding the training data set using the composition encoder with updated parameters, and then clustering according to the encoding results to obtain multiple clusters; performing cluster optimization based on the cluster clusters, and then updating the parameters of the composition encoder according to the results of the cluster optimization to obtain a target scoring model;
[0111] Exemplarily, in some specific implementations, essays of different source topics in a training set D can be sampled, and the sampled essays can be encoded using a trained essay encoder E(*); the encoded essays can be clustered using an unsupervised clustering method to obtain K clusters; the representations of the essays in each cluster can be aligned using a clustering optimization method, and back-propagation gradient descent can be applied to update the parameters θ of the model's essay encoder E(*).
[0112] It should be noted that, in some embodiments, encoding the training data set using the composition encoder with updated parameters, and then clustering according to the encoding results to obtain multiple cluster clusters, may include the following steps: sampling the composition data of each topic in the training data set to obtain batch samples; the batch samples include a predetermined number of compositions extracted from each topic, and the total number of batch samples is the product of the number of topics in the training data set and the predetermined number; encoding the batch samples using the composition encoder with updated parameters to obtain a composition representation corresponding to each composition in the batch samples; based on the composition representation, clustering the batch samples using a preset clustering algorithm to obtain a cluster label corresponding to each composition in the batch samples, and then sorting to obtain multiple cluster clusters and the cluster center of each cluster cluster.
[0113] In some optional implementations, clustering batch samples based on composition representation using a preset clustering algorithm may include the following steps: randomly selecting a specified number of samples from the batch samples as center points; based on the composition representation, allocating the samples in the batch samples to each center point by minimizing the Euclidean distance; in the process of allocating samples for the batch samples, updating the center point according to the mean of the composition representation corresponding to all samples included in the current cluster clustered by each center point, until all samples in the batch sample are allocated.
[0114] For example, in some specific application scenarios, the specific application scenario examples of the above steps are used to continue the description, and the encoding clustering to obtain the clustering clusters can be implemented as follows:
[0115] Step 5: Sample essays from the training data of each topic in a stratified manner, and encode the sampled essays using the essay encoder:
[0116] (1) Traverse the dataset of M topics and start from each topic D m Randomly select n essays from the , and combine them to get a batch of n×M essays in total. The essays in this batch are recorded as x 1 ,x 2 ,…,x n×M .
[0117] (2) Use the encoder E(*) (with parameter θ) obtained in Step 4 to encode all the essays in the batch and obtain their essay representation in d x is the vector dimension represented by .
[0118] Step 6: Cluster the sampled essays to obtain the cluster label and cluster centroid vector representation of each essay:
[0119] The method of the present invention can be applied to different clustering algorithms, such as k-means and Gaussian mixture model (GMM), to identify and capture shared features in compositions.
[0120] (1) First, select the number of clusters K and initialize K cluster centers from the sampled n×M essays. For example, in the K-Means algorithm, K samples can be randomly selected as the initial center points.
[0121] (2) According to the selected clustering algorithm, each essay sample is assigned to the cluster that is most similar to it, so as to minimize the distance between the sample and the cluster center. For example, in K-Means, sample assignment can be completed by minimizing the Euclidean distance; in GMM, the probability of the sample belonging to each cluster is calculated and the assignment is made according to the maximum probability.
[0122] (3) For each cluster center, update its position based on the composition sample vector representation in the current cluster and calculate the new center point. For example, in K-Means, the mean of the samples in the cluster can be calculated as the new cluster center; in GMM, the cluster parameters are updated through the expectation maximization (EM) algorithm.
[0123] (4) In each iteration, the loss function of the current clustering (such as the intra-cluster sum of squares in K-Means or the log-likelihood in GMM) is calculated to evaluate the clustering quality. The above process is repeated until the loss function converges and the final cluster label c is obtained. 1 ,c 2 ,…,c n×M and the cluster center vectors of K clusters represent μ 1 ,μ2 ,…,μ K .
[0124] It should also be noted that each clustering cluster includes multiple compositions and their corresponding composition representations, and the composition representations are obtained by encoding the corresponding compositions through the composition encoder after updating the parameters; in some embodiments, clustering optimization is performed based on the clustering clusters, and then the parameters of the composition encoder are updated according to the results of the clustering optimization to obtain the target scoring model, which may include the following steps: aligning the composition representations in each clustering cluster based on a preset clustering optimization method to obtain the clustering optimization results for each clustering cluster; and applying back propagation and gradient descent to update the parameters of the composition encoder based on the clustering optimization results.
[0125] For example, in some specific application scenarios, the clustering optimization can be implemented as follows, using the specific application scenario examples of the above steps as a further example:
[0126] Step 7: Perform clustering optimization and align the composition representations in each cluster:
[0127] By aligning the composition representations in each cluster, it helps the model better learn and capture the shared knowledge between different topics.
[0128] (1) Cluster optimization can be achieved through a variety of methods. For example, by bringing the representation vector of each essay closer and the corresponding cluster center embedding μ c The distance between them can be used to achieve clustering optimization, or the distribution alignment method with KL divergence minimization can be used to encourage the model to align the representations of compositions in the same cluster by minimizing the KL divergence between the cluster distribution and the enhanced distribution.
[0129] (2) Update the parameters θ of the model’s composition encoder E(*) through cluster optimization, applying back-propagation and gradient descent.
[0130] S300, obtaining prompt word information according to the clustering clusters, and generating explicit shared knowledge representation of each clustering cluster using a preset semantic representation model based on the prompt word information;
[0131] It should be noted that each cluster includes multiple compositions and their corresponding composition representations, and the composition representations are obtained by encoding the corresponding compositions through a composition encoder after updating parameters; in some embodiments, step S300 may include the following steps: obtaining a target number of compositions in each cluster that are closest to the cluster center of the cluster as representative samples; embedding the representative samples into a preset prompt word template to obtain prompt word information; guiding the preset large language model to infer and generate feature description text of the cluster based on the prompt word information; and inputting the feature description text into a preset semantic representation model to generate an explicit shared knowledge representation of the cluster.
[0132] For example, in some specific implementations, for the kth cluster, a representative sample closest to the cluster center may be selected to generate a prompt word T k , generating shared feature descriptions through a large language model k , use BERT and other pre-trained models with strong semantic representation capabilities to generate feature description text r k Encode to obtain the explicit shared knowledge representation of the cluster In the scoring stage, according to the target essay representation h x The most relevant explicit knowledge representation h is selected based on the similarity with the cluster center. x,shared .
[0133] In some specific application scenarios, the generation of explicit shared knowledge representation can be achieved as follows, using the specific application scenario examples of the above steps as a further example:
[0134] Step 8: Explicit knowledge capture:
[0135] (1) For each cluster C k , choose the distance from the cluster center μ k The most recent M essays are representative samples:
[0136]
[0137] (2) Design prompt word T k Guide the large language model (such as ChatGPT or BERT) to generate description clusters C k The hint word design is based on keywords and structural hints to generate feature descriptions representing samples:
[0138]
[0139] The large language model will be based on T k Generate text description T k The features contained in r k express.
[0140] (3) Use pre-trained models with strong semantic representation capabilities such as BERT to generate feature description text r k Encoding, obtaining the explicit shared knowledge representation of the cluster
[0141] It should also be noted that in some optional implementations, steps S100 to S300 can be looped multiple times (i.e., taking the target scoring model as the scoring model, adding 1 to the number of loops, returning to execute the steps of training the preset scoring model using the training data set, and updating the parameters of the scoring model until the number of loops reaches the preset number of loops, and obtaining the target scoring model obtained by the last loop, and the number of loops is initially 0) to enhance the model effect, and after a certain number of rounds, the final cross-topic composition scoring model is obtained.
[0142] S400, using the target scoring model and combining it with explicit shared knowledge representation to score the composition to be scored, and obtaining the scoring result of the composition to be scored.
[0143] It should be noted that, in some embodiments, step S400 may include the following steps: inputting the composition to be scored into the composition encoder in the target scoring model to encode the target composition representation; performing similarity matching between the target composition representation and the explicit shared knowledge representation corresponding to each cluster, and taking the explicit shared knowledge representation with the highest similarity as the target explicit knowledge representation; concatenating the target composition representation and the target explicit knowledge representation and inputting them into the scorer in the target scoring model to score the composition, and predicting the scoring result of the composition to be scored.
[0144] Exemplarily, in some specific implementations, an unlabeled target topic composition (i.e., a composition to be scored) is used as input, and a trained cross-topic scoring model is used to predict and score the target topic composition to obtain the score of the target topic composition.
[0145] It should be noted that in the scoring stage, the representation h of the target composition x (i.e. the composition to be scored) is x Compare with all cluster centers and select the most similar (such as the smallest Euclidean distance) explicit knowledge representation:
[0146]
[0147] Then h x and the selected explicit knowledge representation h x,shared Concatenated, as the input of the scorer, the final encoding representation (i.e. the input of the scorer) is:
[0148]
[0149] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.
[0150] First of all, it should be noted that based on the different technologies used, cross-topic essay automatic scoring technologies can be mainly summarized into the following categories:
[0151] ① Automatic scoring method for cross-topic essays based on manual features:
[0152] The method used in the early research on automatic scoring of cross-topic essays was to extract shallow hand-crafted features that were irrelevant to the topic of the essay through a feature process, use these language features to represent the essay, and apply traditional machine learning methods to predict the essay score. For example, Attali et al. focused on extracting content-independent features of the essay and trained a regression model based on these hand-crafted features to predict the essay score; Phandi et al. designed and used some features that were not based on specific topic information or vocabulary to train a Bayesian linear ridge regression model to score the essay. The existing methods use different features in the automatic scoring of cross-topic essays. These features can be divided into simple features and complex features: simple features include word length, essay length, etc., while complex features involve deeper grammatical errors and other content. Among them, some features are specific to a specific topic, such as bag-of-words features; while other features are general and can be applied to different topics, such as the number of spelling errors, grammatical errors, and vocabulary complexity. The advantage of the automatic scoring method of cross-topic essays based on hand-crafted features is that it is simple to implement, but its disadvantage is that the extracted hand-crafted features are mainly shallow semantic features, and better nonlinear high-level semantic features cannot be obtained. In addition, the extraction of hand-crafted features requires more manual annotation costs.
[0153] ② Automatic scoring method for cross-topic essays based on multi-stage training:
[0154] Recent research on automatic scoring of cross-topic essays uses a two-stage approach to train scoring models. In the first stage, a usable scoring model is trained using source topic essay data, and the scoring model is used to generate pseudo labels for target topic essays. In the second stage, the target topic essays with pseudo labels are used as training data to continue training a scoring model that integrates the features of the target topic essays. For example, Jin et al. used hand-crafted features to train a machine learning scoring model in the first stage to score the target topic and obtain pseudo labels. Then, in the second stage, a neural network model was designed to train a better scoring model using pseudo labels and target topic data. Li et al. used an adversarial network in the first stage to enable the model to capture high-level shared semantic features between the source topic and the target topic, and used the model to obtain pseudo labels. In the second stage, pseudo labels and target topic data were used to integrate topic and sample information to train a more effective cross-topic scoring model. The advantage of the automatic scoring method for cross-topic essays based on multi-stage training is that the model can be effectively improved in the target topic by training the model with the target topic data with pseudo labels obtained in the first stage. However, the disadvantage is that the method cannot be effectively implemented when the target topic data is missing.
[0155] ③ Automatic scoring method for cross-topic essays based on multi-task and adaptive learning:
[0156] Some existing methods for automatic scoring of cross-topic essays use multi-task learning to improve the subject adaptability of the model. For example, Cummins et al. proposed a constrained multi-task pairwise learning method, which regards the scoring of essays on each topic as a task, and introduces a constrained preference ranking method so that the model can adapt to the scoring scales and standards under different topics. Cao et al. introduced two self-supervised tasks and adopted a multi-task joint training method to learn more domain-adaptive features. Ridley et al. scored multiple attributes of the essay, regarded the scoring of each attribute as a task, applied the attention mechanism between different attribute scoring tasks, and combined part-of-speech embedding and a set of common features to build a cross-topic automatic scoring model based on a neural network. The advantage of the cross-topic essay automatic scoring method based on multi-task learning is that through multi-task learning, the model can simultaneously learn shared features between multiple related tasks, increase the model's adaptability to data diversity, and transfer the knowledge and experience learned from one task to other related tasks, thereby effectively improving the generalization performance of the model on different topics.
[0157] Recent methods have also focused on improving the adaptability and generalization of models across different topics, enabling them to effectively score essay data on unseen topics. Chen et al. proposed a cross-topic scoring method based on meta-learning, which enables the model to generalize to new topics without target topic data through topic generalization and hierarchical perceptual learning. Jiang et al. proposed a knowledge separation method based on representation learning to effectively distinguish between topic-related and irrelevant information, thereby capturing shared features more accurately. In addition, Chen and Li established a shared feature map of source and target topics through a topic mapping strategy, achieving cross-topic knowledge transfer. These methods enhance the adaptability and generalization of models in different topic scoring tasks.
[0158] The research on automatic scoring of cross-topic essays focuses on learning the consistency of data distribution of different topics to improve the generalization ability of the model on different topics. In the research on automatic scoring of cross-topic essays, the task is heavy. The training and test essay data of the model come from different topics with different data distributions, which brings challenges to the research on automatic scoring of cross-topic essays. Although the existing research methods on automatic scoring of cross-topic essays have achieved good results, there are still many shortcomings (refer to the background technology section).
[0159] In summary, existing cross-topic essay scoring methods have limitations in capturing multidimensional shared knowledge and generating explicit knowledge representations. To address these issues, it is necessary to develop a new method that enables the model to automatically discover and align multidimensional shared knowledge between different topics without relying on target topic data, thereby improving the generalization ability and interpretability of cross-topic scoring.
[0160] In view of this, this paper proposes a cross-topic essay automatic scoring method based on multi-faceted interpretable knowledge capture to improve the generalization ability of the model on new topics. The core of this method is to enable the model to automatically learn and capture multi-faceted shared knowledge between different topics through the alternating optimization of scoring model training and clustering-based knowledge discovery and alignment strategy, thereby improving the applicability and accuracy of the model. Figure 3 As shown, the following are the process steps of the method of the present invention:
[0161] S1: Take the source topic composition training dataset D as input and randomly initialize the explicit knowledge h x,shared , encoded by composition encoder E(*) to obtain composition representation h x , the two are spliced together to get the final representation of the composition The input of the model scorer is used to train the cross-topic scoring model, and the parameters of the composition encoder E(*) are defined as θ.
[0162] S2: Sample essays of different source topics in the training set D, and encode the sampled essays using the essay encoder E(*) trained in S1; cluster the encoded essays using an unsupervised clustering method to obtain K clusters; align the representations of the essays in each cluster through a clustering optimization method, apply back-propagation gradient descent, and update the parameters θ of the model's essay encoder E(*).
[0163] S3: For the kth cluster, select the representative sample closest to the cluster center to generate the prompt word T k , generating shared feature descriptions through a large language model k , use BERT and other pre-trained models with strong semantic representation capabilities to generate feature description text r k Encode to obtain the explicit shared knowledge representation of the cluster In the scoring stage, according to the target essay representation h x The most relevant explicit knowledge representation h is selected based on the similarity with the cluster center. x,shared .
[0164] S4: Alternate S1 and S2-3. After a certain number of iterations, a trained cross-topic composition automatic scoring model is obtained.
[0165] S5: Take the unlabeled target topic composition as input, use the trained cross-topic scoring model to predict and score the target topic composition, and obtain the score of the target topic composition.
[0166] Among them, Figure 4 As shown, the multi-faceted knowledge discovery and optimization method process based on clustering proposed by the present invention described in S2 can be implemented as follows:
[0167] S2-1: Sampling from each theme essay to obtain batch data containing all theme essays
[0168]
[0169] S2-2: Use the currently trained composition encoder E(*) to encode all the compositions in the batch data to obtain their vector representation
[0170] S2-3: Cluster the sampled essays to obtain the cluster label {c 1 ,c 2 ,…,c n×M} and the cluster center vectors of the K clusters represent {μ 1 ,μ 2 ,…,μ K};
[0171] S2-4: Calculate the clustering optimization update loss and update the composition encoder parameters θ of the cross-topic scoring model.
[0172] Among them, Figure 5 As shown, the explicit knowledge capture and knowledge selection method process described in S3 proposed by the present invention can be implemented as follows:
[0173] S3-1: Input cluster center {μ 1 ,μ 2 ,…,μ K} and the representation vectors of all essays in the cluster, and calculate the representation vector of each essay With cluster center μ k The distance from the cluster center μ is selected k The most recent M essays are used as representative samples, and the index set i of the representative essays of each cluster is output. 1 ,i 2 ,…,i M .
[0174] S3-2: Define prompt word template and generate prompt word T k , guiding the large language model to cluster C k Representative essay samples 1 ,i 2 ,…,i M Perform feature text description to obtain shared feature descriptions r representing different aspects of different topics k ,(k=1,2,…K).
[0175] S3-3: Use pre-trained language models with strong semantic representation capabilities such as BERT to describe features k Encode to obtain explicit shared knowledge representation
[0176] S3-4: Calculate the representation h of the current training sample x With each cluster center μ k similarity (e.g. by minimizing the Euclidean distance or other similarity measure), and select the explicit knowledge representation corresponding to the most similar cluster As h x,shared .
[0177] In some specific implementations, the detailed process steps of the technical solution of the present invention can be implemented as follows:
[0178] Step 1: Use the encoder to encode the composition:
[0179] Take the source topic composition as the training data set D, assuming that the composition data of the mth topic in the training data is in represents the i-th essay, is the corresponding score, M represents the total number of topics, and N represents the number of essays in topic m.
[0180] (1) Extract a batch of essays from the training dataset for each topic Where N A Represents the number of essay samples in this batch, and its corresponding score label is
[0181] (2) Assume that the composition sample x in the mth topic is encoded by a composition encoder (such as CNN-LSTM-Att or BERT) to obtain the representation vector of the composition, denoted as h x =E(x m ), where h x represents the feature representation of the composition after encoding, and E represents the text encoder. The encoded composition representation h x It will be used for subsequent scoring model training.
[0182] Step 2: Training scoring model:
[0183] (1) For each composition i, the composition obtained by encoding it is represented as Combine the initial explicit knowledge (randomly initialized) into the scorer to predict the corresponding essay score And based on the real label y of the composition i Calculate the scoring loss, assuming that the batch has a total of N A The predicted score of the essay sample is The true score label is {y 1 ,y 2 ,…,y NA}
[0184] (2) Calculate the mean square error as the loss function, as shown in formula (1):
[0185]
[0186] (3) Apply back propagation and stochastic gradient descent to update the parameters of the composition encoder and scorer of the scoring model, where the parameters of the composition encoder E(*) are denoted as θ.
[0187] Step 3: Repeat Step 1 to 2 until all the essays in the training set are traversed, completing a round of model training.
[0188] Step 4: Iterate Steps 1 to 3 to train the scoring model for multiple rounds. After τ rounds of training, the encoder E(*) and parameters θ of the currently trained scoring model are obtained.
[0189] Step 5: Sample essays from the training data of each topic in a stratified manner, and encode the sampled essays using the essay encoder:
[0190] (1) Traverse the dataset of M topics and start from each topic D m Randomly select n essays from the , and combine them to get a batch of n×M essays in total. The essays in this batch are recorded as x 1 ,x 2 ,…,x n×M .
[0191] (2) Use the encoder E(*) (with parameter θ) obtained in Step 4 to encode all the essays in the batch and obtain their essay representation in d x is the vector dimension represented by .
[0192] Step 6: Cluster the sampled essays to obtain the cluster label and cluster centroid vector representation of each essay:
[0193] The method of the present invention can be applied to different clustering algorithms, such as k-means and Gaussian mixture model (GMM), to identify and capture shared features in compositions.
[0194] (1) First, select the number of clusters K and initialize K cluster centers from the sampled n×M essays. For example, in the K-Means algorithm, K samples can be randomly selected as the initial center points.
[0195] (2) According to the selected clustering algorithm, each essay sample is assigned to the cluster that is most similar to it, so as to minimize the distance between the sample and the cluster center. For example, in K-Means, sample assignment can be completed by minimizing the Euclidean distance; in GMM, the probability of the sample belonging to each cluster is calculated and the assignment is made according to the maximum probability.
[0196] (3) For each cluster center, update its position based on the composition sample vector representation in the current cluster and calculate the new center point. For example, in K-Means, the mean of the samples in the cluster can be calculated as the new cluster center; in GMM, the cluster parameters are updated through the expectation maximization (EM) algorithm.
[0197] (4) In each iteration, the loss function of the current clustering (such as the intra-cluster sum of squares in K-Means or the log-likelihood in GMM) is calculated to evaluate the clustering quality. The above process is repeated until the loss function converges and the final cluster label c is obtained. 1 ,c 2 ,…,c n×M and the cluster center vectors of K clusters represent μ 1 ,μ2 ,…,μ K .
[0198] Step 7: Perform clustering optimization and align the composition representations in each cluster:
[0199] By aligning the composition representations in each cluster, it helps the model better learn and capture the shared knowledge between different topics.
[0200] (1) Cluster optimization can be achieved through a variety of methods. For example, by bringing the representation vector of each essay closer and the corresponding cluster center embedding μ c The distance between them can be used to achieve clustering optimization, or the distribution alignment method with KL divergence minimization can be used to encourage the model to align the representations of compositions in the same cluster by minimizing the KL divergence between the cluster distribution and the enhanced distribution.
[0201] (2) Update the parameters θ of the model’s composition encoder E(*) through cluster optimization, applying back-propagation and gradient descent.
[0202] Step 8: Explicit knowledge capture:
[0203] (1) For each cluster C k , choose the distance from the cluster center μ k The most recent M essays are representative samples:
[0204]
[0205] (2) Design prompt word T k Guide the large language model (such as ChatGPT or BERT) to generate description clusters C k The hint word design is based on keywords and structural hints to generate feature descriptions representing samples:
[0206]
[0207] The large language model will be based on T k Generate text description T k The features contained in r k express.
[0208] (3) Use pre-trained models with strong semantic representation capabilities such as BERT to generate feature description text r k Encoding, obtaining the explicit shared knowledge representation of the cluster
[0209] Step 9: Knowledge selection and update:
[0210] (1) In the scoring stage, the representation h of the target composition x (i.e., the composition to be scored) is xCompare with all cluster centers and select the most similar (such as the smallest Euclidean distance) explicit knowledge representation:
[0211]
[0212] (2) h x and the selected explicit knowledge representation h x,shared Concatenated, as the input of the scorer, the final encoding representation (i.e. the input of the scorer) is:
[0213]
[0214] Repeat Steps 5 to 9 until all the essays in the training set are traversed, completing a round of clustering optimization.
[0215] Step 10: Alternately perform model training of Steps 1 to 4 and knowledge optimization of Steps 5 to 9. After a certain number of rounds, the final cross-topic composition scoring model is obtained.
[0216] Step 11: Input the target topic essay into the trained cross-topic scoring model to obtain the final predicted score.
[0217] In summary, in view of the shortcomings of the existing technology in the cross-topic composition automatic scoring task, which mainly relies on static shared features and fails to fully capture the multi-faceted shared knowledge features such as grammar, coherence, and writing style, the present invention proposes a multi-faceted interpretable knowledge capture method driven by a large language model to better support cross-topic composition scoring. The model of the present invention is generally divided into two main steps: first, a basic scorer is trained using training data; then, the training data of different topic compositions are clustered using an unsupervised clustering method, so that compositions with similar features are aggregated into the same cluster, and the composition encoder parameters of the obtained basic scorer are optimized by clustering loss, thereby enhancing the model's ability to capture multi-faceted shared knowledge. In this process, the explicit knowledge description of each cluster cluster is generated by the large language model and integrated into the final encoding of the composition, thereby improving the model's representation of different topic compositions in multi-dimensional composition features, thereby improving the overall accuracy and interpretability of the model's scoring of new topic compositions.
[0218] Compared with the prior art, the present invention has at least the following beneficial effects:
[0219] (1) Automatic discovery of multifaceted shared knowledge: The composition data of different topics are clustered through an unsupervised clustering algorithm, so that the model can automatically discover and capture multifaceted shared knowledge between topics, and improve the model's ability to understand the multifaceted similarities between different topics.
[0220] (2) Explicit knowledge and enhanced interpretability: The present invention uses a large language model to generatively describe the implicit shared knowledge discovered during the clustering process, making this implicit knowledge explicit in an interpretable text form, providing a semantic interpretation of the shared knowledge, and enabling the model to apply these shared features in a more transparent and understandable way.
[0221] (3) Enhanced representation and cross-topic generalization capabilities: The discovered multifaceted shared knowledge is combined with the training essay’s own representation to enhance the essay’s overall representation, giving the model greater generalization and accuracy in scoring essays on unknown new topics.
[0222] like Figure 6 As shown, the embodiment of the present invention further provides a cross-topic composition scoring device 900 based on interpretable knowledge capture, which may include:
[0223] The first module 901 is used to obtain source theme compositions as training data sets, train a preset scoring model using the training data sets, and update the parameters of the scoring model; the scoring model includes a composition encoder and a scorer; the training data sets include composition data of multiple themes, and the composition data includes multiple compositions and their corresponding composition scores;
[0224] The second module 902 is used to encode the training data set using the composition encoder with updated parameters, and then cluster according to the encoding results to obtain multiple clusters; perform cluster optimization based on the cluster clusters, and then update the parameters of the composition encoder according to the results of the cluster optimization to obtain a target scoring model;
[0225] The third module 903 is used to obtain prompt word information according to the clustering clusters, and generate explicit shared knowledge representation of each cluster cluster based on the prompt word information using a preset semantic representation model;
[0226] The fourth module 904 is used to score the composition to be scored by using the target scoring model in combination with the explicit shared knowledge representation to obtain the scoring result of the composition to be scored.
[0227] The contents of the method embodiments of the present invention are all applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0228] The embodiment of the present invention further provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above-mentioned cross-topic composition scoring method based on interpretable knowledge capture when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0229] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0230] See also Figure 7 , Figure 7 The hardware structure of an electronic device 1000 of another embodiment is illustrated. The electronic device 1000 includes:
[0231] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0232] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the cross-topic composition scoring method based on interpretable knowledge capture of the embodiment of the present invention;
[0233] Input / output interface 1003, used to implement information input and output;
[0234] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0235] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );
[0236] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0237] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned cross-topic composition scoring method based on interpretable knowledge capture.
[0238] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0239] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0240] The cross-topic composition scoring method based on explainable knowledge capture, the cross-topic composition scoring device based on explainable knowledge capture, the electronic device and the storage medium provided by the embodiments of the present invention obtain source topic compositions as training data sets, use the training data sets to train a preset scoring model, and update the parameters of the scoring model; the scoring model includes a composition encoder and a scorer; the training data set includes composition data of multiple topics, and the composition data includes multiple compositions and their corresponding composition scores; the training data set is encoded using the composition encoder after the parameters are updated, and then clustering is performed according to the encoding results to obtain multiple cluster clusters; clustering optimization is performed based on the cluster clusters, and then the parameters of the composition encoder are updated according to the results of the cluster optimization to obtain a target scoring model; prompt word information is obtained according to the cluster clusters, and based on the prompt word information, an explicit shared knowledge representation of each cluster cluster is generated using a preset semantic representation model; the composition to be scored is scored using the target scoring model in combination with the explicit shared knowledge representation to obtain a scoring result for the composition to be scored. The present invention uses training data to train the scoring model; then, the training data of essays of different themes are clustered so that essays with similar features are aggregated into the same cluster, and the parameters of the essay encoder obtained by clustering are optimized, thereby enhancing the model's ability to capture multi-faceted shared knowledge. In this process, the explicit knowledge description of each cluster is generated by the semantic representation model and integrated into the final encoding of the essay, thereby improving the model's representation of different themes in terms of multi-dimensional essay features, thereby overall improving the model's scoring accuracy and interpretability for new theme essays.
[0241] The embodiments described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art can appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.
[0242] Those skilled in the art will appreciate that the technical solutions shown in the figures do not limit the embodiments of the present invention and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0243] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0244] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0245] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0246] It should be understood that in the present invention, "at least one (item)" refers to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can represent: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0247] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0248] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0249] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0250] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including multiple instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store programs.
[0251] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the embodiments of the present invention is not limited thereby. Any modification, equivalent substitution and improvement made by those skilled in the art without departing from the scope and essence of the embodiments of the present invention shall be within the scope of the rights of the embodiments of the present invention.
Claims
1. A cross-topic essay scoring method based on interpretable knowledge capture, characterized in that: The method comprises the following steps: Acquire source theme compositions as training data sets, use the training data sets to train a preset scoring model, and update parameters of the scoring model; the scoring model includes a composition encoder and a scorer; the training data sets include composition data of multiple themes, and the composition data include multiple compositions and their corresponding composition scores; Encoding the training data set using the composition encoder after updating parameters, and then clustering according to the encoding results to obtain multiple clusters; performing cluster optimization based on the clusters, and then updating the parameters of the composition encoder according to the results of the cluster optimization to obtain a target scoring model; Obtaining prompt word information according to the clustering clusters, and generating an explicit shared knowledge representation of each of the clustering clusters based on the prompt word information using a preset semantic representation model; The target scoring model is used in combination with the explicit shared knowledge representation to score the composition to be scored, and a scoring result of the composition to be scored is obtained.
2. The cross-topic composition scoring method based on interpretable knowledge capture according to claim 1 is characterized in that: The composition encoder and the scorer of the scoring model are preset with initial parameters; the method of training the preset scoring model using the training data set and updating the parameters of the scoring model comprises the following steps: Extracting a preset number of composition samples from the composition data of each subject in the training data set as training samples; The training samples are encoded in sequence by the preset composition encoder to obtain a composition feature representation corresponding to each composition in the training sample; The composition feature representation is concatenated with the preset initial explicit knowledge to obtain a final representation; Inputting the final representation into the scorer for scoring to obtain a predicted score for each composition in the training sample; According to the predicted score and the composition score corresponding to each of the training samples, the mean square error is used as a loss function, and then the parameters of the composition encoder and the scorer are updated through back propagation and stochastic gradient descent; Extracting a preset number of composition samples from the remaining composition data of each subject in the training data set as the training samples, returning to the step of sequentially encoding the training samples by the preset composition encoder until all the compositions in the training data set are traversed, adding 1 to the training round, and restoring the training data set; the training round is initially 0; Return to the step of extracting a preset number of composition samples from the composition data of each topic in the training data set as training samples, until the training round reaches the preset training round, and complete the parameter update of the scoring model according to the parameters of the composition encoder and the scorer updated for the last time.
3. The cross-topic composition scoring method based on interpretable knowledge capture according to claim 1 is characterized in that: The method of encoding the training data set by using the composition encoder after updating the parameters, and then clustering the encoding results to obtain multiple clusters, includes the following steps: Sampling the composition data of each theme of the training data set to obtain batch samples; the batch samples include a predetermined number of compositions extracted from each theme, and the total number of the batch samples is the product of the number of themes in the training data set and the predetermined number; Encoding the batch samples using the composition encoder with updated parameters to obtain a composition representation corresponding to each composition in the batch samples; Based on the composition representation, the batch samples are clustered using a preset clustering algorithm to obtain a cluster label corresponding to each composition in the batch samples, and then a plurality of clusters and a cluster center of each cluster are obtained.
4. The cross-topic composition scoring method based on interpretable knowledge capture according to claim 3 is characterized in that: The step of clustering the batch samples based on the composition representation using a preset clustering algorithm comprises the following steps: Randomly selecting a specified number of samples from the batch of samples as center points; Based on the composition representation, assigning samples in the batch of samples to each of the center points by minimizing the Euclidean distance; In the process of allocating samples of the batch, the center point is updated according to the mean of the composition representation corresponding to all samples included in the current cluster clustered by each center point until the allocation of all samples of the batch is completed.
5. The cross-topic composition scoring method based on interpretable knowledge capture according to claim 1 is characterized in that: Each of the clusters includes a plurality of compositions and corresponding composition representations thereof, wherein the composition representations are obtained by encoding the corresponding compositions by the composition encoder after updating parameters; performing cluster optimization based on the clusters, and then updating the parameters of the composition encoder according to the results of the cluster optimization to obtain a target scoring model, comprises the following steps: Aligning the composition representations in each of the clusters based on a preset clustering optimization method to obtain a clustering optimization result for each of the clusters; Back propagation and gradient descent are applied based on the clustering optimization results to update the parameters of the composition encoder.
6. The cross-topic composition scoring method based on interpretable knowledge capture according to claim 1 is characterized in that: Each of the clusters includes a plurality of compositions and corresponding composition representations thereof, wherein the composition representations are obtained by encoding the corresponding compositions by the composition encoder after updating parameters; the prompt word information is obtained by sorting the clusters, and based on the prompt word information, an explicit shared knowledge representation of each of the clusters is generated using a preset semantic representation model, including the following steps: Obtaining a target number of compositions in each cluster that are closest to the cluster center of the cluster as representative samples; Embedding the representative sample into a preset prompt word template to obtain the prompt word information; Based on the prompt word information, a preset large language model is guided to infer and generate a feature description text of the cluster; The feature description text is input into the preset semantic representation model to generate the explicit shared knowledge representation of the cluster.
7. The cross-topic composition scoring method based on interpretable knowledge capture according to claim 1 is characterized in that: The method of using the target scoring model and combining the explicit shared knowledge representation to score the composition to be scored to obtain the scoring result of the composition to be scored includes the following steps: Input the composition to be scored into the composition encoder in the target scoring model and encode it to obtain a target composition representation; Performing similarity matching between the target composition representation and the explicit shared knowledge representation corresponding to each cluster, and taking the explicit shared knowledge representation with the highest similarity as the target explicit knowledge representation; The target composition representation and the target explicit knowledge representation are spliced and input into the scorer in the target scoring model to score the composition, and the scoring result of the composition to be scored is predicted.
8. A cross-topic essay scoring device based on interpretable knowledge capture, characterized in that: The device comprises: The first module is used to obtain source theme compositions as training data sets, use the training data sets to train a preset scoring model, and update the parameters of the scoring model; the scoring model includes a composition encoder and a scorer; the training data sets include composition data of multiple themes, and the composition data includes multiple compositions and their corresponding composition scores; The second module is used to encode the training data set using the composition encoder after updating the parameters, and then cluster according to the encoding results to obtain multiple clusters; perform cluster optimization based on the cluster clusters, and then update the parameters of the composition encoder according to the results of the cluster optimization to obtain a target scoring model; The third module is used to obtain prompt word information according to the clustering clusters, and generate an explicit shared knowledge representation of each clustering cluster based on the prompt word information using a preset semantic representation model; The fourth module is used to use the target scoring model in combination with the explicit shared knowledge representation to score the composition to be scored, and obtain the scoring result of the composition to be scored.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Composition scoring method and device, electronic equipment and storage medium
CN112686020A
Cross-theme composition automatic scoring method and system and medium
CN115455178A
Cited By
Large model training data synthesis method, system and device and storage medium
CN120409710A