Cross-topic essay scoring methods, devices, and media based on interpretable knowledge capture
By training and clustering to optimize the scoring model, and combining it with a large language model to generate explicit shared knowledge representations, this approach addresses the insufficient feature capture in existing cross-topic essay scoring methods, achieving more accurate and interpretable essay scoring.
Patent Information
- Application Number
- CN202411821230.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-12-11
AI Technical Summary
Existing cross-topic essay automatic scoring methods rely on manual feature engineering, which makes it difficult to capture the deep-seated language and writing style features of essays, ignores the similarities of essays in specific aspects such as grammar, structure, and emotional expression, and the model output lacks explanatory power.
By acquiring source topic essays as training datasets, the scoring model is trained using the training datasets, parameters are updated, clustering and cluster optimization are performed, explicit shared knowledge representations are generated, and essay scoring results are generated in conjunction with a large language model.
The model improved the accuracy and interpretability of its scoring for essays on different topics, enhanced its ability to capture shared knowledge from multiple perspectives, and improved the transparency and consistency of the scoring.
Smart Images

Figure CN119918541B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a cross-topic essay scoring method, apparatus and medium based on interpretable knowledge capture. Background Technology
[0002] Research on automatic scoring of cross-topic essays focuses on learning the consistency of data distribution across different topics to improve the model's generalization ability across various topics. However, this research is challenging because the training and testing data for cross-topic essay scoring come from different topics with varying distributions.
[0003] While existing methods for automatic scoring of cross-topic essays have achieved good results, they still have the following shortcomings:
[0004] (1) Existing technologies mainly rely on manual feature engineering to extract topic-irrelevant surface features, such as sentence length, essay length, readability, and complexity. While these features can help assess essay quality to some extent, they are difficult to capture deeper features such as language and writing style. Some methods attempt to extract high-level features using neural networks, but these usually depend on data related to the target topic. This dependence on target topic data limits the model's ability to be applied when new topic-labeled data is lacking.
[0005] (2) Existing methods mainly focus on general features across topics, but often overlook the similarities in more specific aspects of essays, such as grammar, structure, and emotional expression. Essays on different topics may have similar features in certain specific dimensions (e.g., similarity in the frequency of grammatical errors or the intensity of emotional expression), and these similarities can constitute a shared knowledge base between topics. However, existing methods fail to fully explore these feature similarities in specific dimensions, which limits the transferability of models across different topics and prevents them from utilizing this more refined shared information to improve the performance of cross-topic applications.
[0006] (3) The scoring results output by existing methods and models lack intuitive explanatory power. Summary of the Invention
[0007] The main objective of this invention is to propose a cross-topic essay scoring method, apparatus, and medium based on interpretable knowledge capture, in order to solve at least one problem in the prior art. This invention can accurately achieve cross-topic essay scoring based on interpretable knowledge capture.
[0008] To achieve the above objectives, one aspect of this invention proposes a cross-topic essay scoring method based on interpretable knowledge capture, the method comprising:
[0009] The source topic essays are obtained as the training dataset. The pre-defined scoring model is trained using the training dataset, and the parameters of the scoring model are updated. The scoring model includes an essay encoder and a scorer. The training dataset includes essay data on multiple topics, and the essay data includes multiple essays and their corresponding essay scores.
[0010] The training dataset is encoded using the updated essay encoder, and then clustered based on the encoding results to obtain multiple clusters. Cluster optimization is performed based on the clusters, and then the parameters of the essay encoder are updated based on the cluster optimization results to obtain the target scoring model.
[0011] Based on the information of the clusters, the prompt words are organized, and based on the prompt words, the explicit shared knowledge representation of each cluster is generated using a preset semantic representation model.
[0012] By using a target scoring model and combining explicit shared knowledge representations, we can score the essays to be scored and obtain the scoring results of the essays to be scored.
[0013] In some embodiments, the essay encoder and scorer of the scoring model are preset with initial parameters; training the preset scoring model using a training dataset and updating the parameters of the scoring model includes the following steps:
[0014] A predetermined number of essays are extracted from the essay data of each topic in the training dataset as training samples;
[0015] The training samples are encoded sequentially using a pre-set essay encoder to obtain the essay feature representation corresponding to each essay in the training samples.
[0016] The final representation is obtained by combining the characteristics of the composition with the pre-set initial explicit knowledge;
[0017] The final representation is input into the scorer for scoring, and a predicted score is obtained for each essay in the training samples.
[0018] Based on the predicted score and each of the training samples as the corresponding essay score, the mean squared error is used as the loss function, and then the parameters of the essay encoder and scorer are updated through backpropagation and stochastic gradient descent.
[0019] Extract a preset number of essays from the remaining essay data for each topic in the training dataset as training samples. Then, execute the steps of encoding the training samples sequentially using a preset essay encoder until all essays in the training dataset have been traversed. Increment the training round by 1 and restore the training dataset. The initial number of training rounds is 0.
[0020] Return to the step of extracting a preset number of essay samples from the essay data of each topic in the training dataset as training samples, until the preset number of training rounds is reached, and complete the parameter update of the scoring model based on the parameters of the last updated essay encoder and scorer.
[0021] In some embodiments, the training dataset is encoded using an updated essay encoder, and then clustered based on the encoding results to obtain multiple clusters, including the following steps:
[0022] Batch samples are obtained by sampling essay data from each topic in the training dataset; each batch sample includes a predetermined number of essays drawn from each topic, and the total number of batch samples is the product of the number of topics in the training dataset and the predetermined number.
[0023] The batch samples are encoded using the updated essay encoder to obtain the essay representation for each essay in the batch samples;
[0024] Based on the essay representation, a pre-defined clustering algorithm is used to cluster the batch samples to obtain the cluster label corresponding to each essay in the batch samples, and then multiple clusters and the cluster center of each cluster are obtained.
[0025] In some embodiments, based on the composition representation, a preset clustering algorithm is used to cluster batch samples, including the following steps:
[0026] A specified number of samples are randomly selected from the batch samples as center points;
[0027] Based on the composition representation, samples in the batch are assigned to each center point by minimizing the Euclidean distance;
[0028] During the batch sample allocation process, the centroids are updated based on the mean of the composition representations of all samples in the current cluster included by each centroid, until the batch sample allocation of all samples is completed.
[0029] In some embodiments, each cluster includes multiple essays and their corresponding essay representations. The essay representations are obtained by encoding the corresponding essays using an essay encoder with updated parameters. Clustering optimization is performed based on the clusters, and then the parameters of the essay encoder are updated according to the results of the clustering optimization to obtain the target scoring model. This includes the following steps:
[0030] Based on the pre-defined clustering optimization method, the composition representations in each cluster are aligned to obtain the clustering optimization results for each cluster.
[0031] The parameters of the composition encoder are updated based on the clustering optimization results using backpropagation and gradient descent.
[0032] In some embodiments, each cluster includes multiple essays and their corresponding essay representations. The essay representations are obtained by encoding the corresponding essays using an essay encoder with updated parameters. Based on the clusters, cue word information is gathered. Then, based on the cue word information, an explicit shared knowledge representation for each cluster is generated using a pre-defined semantic representation model, including the following steps:
[0033] The number of essays in each cluster that are closest to the cluster center are used as representative samples.
[0034] The representative sample is embedded into a preset prompt word template to obtain prompt word information;
[0035] Based on prompt word information, a pre-defined large language model is used to generate feature description text for clustering;
[0036] The feature description text is input into a pre-defined semantic representation model to generate an explicit shared knowledge representation of the clusters.
[0037] In some embodiments, a target scoring model is used, combined with explicit shared knowledge representation, to score the essay to be scored, thereby obtaining the score result of the essay to be scored, including the following steps:
[0038] The essay to be scored is input into the essay encoder in the target scoring model to obtain the target essay representation;
[0039] The target essay representation is matched with the explicit shared knowledge representation corresponding to each cluster based on similarity, and the explicit shared knowledge representation with the highest similarity is taken as the target explicit knowledge representation.
[0040] The target essay representation and the target explicit knowledge representation are concatenated and input into the scorer in the target scoring model to score the essay and predict the score result of the essay to be scored.
[0041] To achieve the above objectives, another aspect of the present invention proposes a cross-topic essay scoring device based on interpretable knowledge capture, the device comprising:
[0042] The first module is used to acquire source topic essays as training datasets, use the training datasets to train a pre-defined scoring model, and update the parameters of the scoring model. The scoring model includes an essay encoder and a scorer. The training dataset includes essay data on multiple topics, and the essay data includes multiple essays and their corresponding essay scores.
[0043] The second module is used to encode the training dataset using the updated essay encoder, and then cluster the results to obtain multiple clusters; based on the clusters, cluster optimization is performed, and then the parameters of the essay encoder are updated based on the cluster optimization results to obtain the target scoring model.
[0044] The third module is used to organize the prompt word information according to the clusters, and based on the prompt word information, to generate an explicit shared knowledge representation for each cluster using a preset semantic representation model;
[0045] The fourth module is used to score the essays to be scored by using the target scoring model and combining explicit shared knowledge representations, and obtain the scoring results of the essays to be scored.
[0046] To achieve the above objectives, another aspect of the present invention provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method.
[0047] To achieve the above objectives, another aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0048] The embodiments of the present invention include at least the following beneficial effects: The present invention provides a cross-topic essay scoring method, apparatus, and medium based on interpretable knowledge capture. This scheme obtains source-topic essays as a training dataset, uses the training dataset to train a preset scoring model, and updates the parameters of the scoring model. The scoring model includes an essay encoder and a scorer. The training dataset includes essay data from multiple topics, and the essay data includes multiple essays and their corresponding essay scores. The updated essay encoder encodes the training dataset, and then clusters the results to obtain multiple clusters. Cluster optimization is performed based on the clusters, and the parameters of the essay encoder are updated based on the cluster optimization results to obtain a target scoring model. Hint word information is obtained from the clusters, and based on the hint word information, an explicit shared knowledge representation of each cluster is generated using a preset semantic representation model. The target scoring model, combined with the explicit shared knowledge representation, is used to score the essays to be scored, resulting in a score for the essays to be scored. This invention trains a scoring model using training data. Then, it clusters training data from different themes, grouping essays with similar characteristics into the same cluster. This clustering optimizes the parameters of the resulting essay encoder, enhancing the model's ability to capture shared knowledge across multiple aspects. During this process, a semantic representation model generates explicit knowledge descriptions for each cluster and integrates them into the final encoding of the essay. This improves the model's representation of multi-dimensional essay features across different themes, thereby enhancing the overall accuracy and interpretability of the model's scoring of new themes. Attached Figure Description
[0049] Figure 1 This is a schematic diagram of the principle architecture of cross-topic essay automatic scoring provided in an embodiment of the present invention;
[0050] Figure 2 This is a flowchart of a cross-topic essay scoring method based on interpretable knowledge capture provided in an embodiment of the present invention;
[0051] Figure 3 This is an overall flowchart of the cross-topic essay scoring method based on interpretable knowledge capture provided in this embodiment of the invention;
[0052] Figure 4 This is a flowchart illustrating the multi-faceted knowledge discovery and optimization method based on clustering provided in an embodiment of the present invention.
[0053] Figure 5 This is a flowchart illustrating the explicit knowledge capture and knowledge selection method provided in an embodiment of the present invention;
[0054] Figure 6 This is a schematic diagram of the cross-topic essay scoring device based on interpretable knowledge capture provided in an embodiment of the present invention;
[0055] Figure 7 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In the following description, when referring to the accompanying 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 this invention; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this invention as detailed in the appended claims.
[0057] It is understood that the terms "first," "second," etc., used in this invention may be used to describe various concepts, but unless specifically stated otherwise, 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 embodiments of this invention, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words "if" or "when" as used herein may be interpreted as "when," "in response to determination," or "in the event of a determination."
[0058] The terms “at least one,” “multiple,” “each,” “any,” etc., used in this invention, “at least one” includes one, two, or more than two; “multiple” includes two or more than two; “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 this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this invention is for descriptive purposes only and is not intended to limit the invention.
[0060] To facilitate understanding of the technical solution of this invention, the technical means and features that may appear in the technical solution of this invention are explained below:
[0061] Automatic essay scoring: Automatic essay scoring (AES) refers to the process of using scoring models 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 training a scoring model using labeled essay data on the same topic, and then automatically scoring other unlabeled essays on that topic.
[0063] Cross-prompt Automated Essay Scoring: Cross-prompt Automated Essay Scoring refers to training a scoring model using labeled essay training data from different topics, and then automatically scoring unlabeled essays from new topics. Typically, the different topics used for model training are called the source prompt, and the topic used for scoring the essays is called the target prompt.
[0064] Clustering: Clustering is the process of dividing a group of objects or data samples into different groups or clusters based on their similarity or correlation. The goal of clustering is to make objects within the same cluster as similar as possible, while objects in different clusters are as dissimilar as possible. Cluster analysis can help discover the inherent structure in data, find similar samples or objects, and provide insights and understanding of the dataset.
[0065] Text clustering is an unsupervised learning method used to group text samples with similar features into the same group or cluster. The goal of clustering is to discover the inherent similarities between texts, grouping them into sets with similar topics, semantics, or structure. Text clustering can help understand the structure of large-scale text datasets, discover hidden patterns and topics, and extract useful information.
[0066] Multi-aspect shared knowledge refers to the shared features of essays on different topics in multiple aspects such as grammar, textual coherence, and writing style. Multi-aspect shared knowledge emphasizes the rich details in essays across different topics, helping models to identify 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 transforming implicit knowledge in clusters into interpretable textual descriptions using a large language model, thus making the implicit knowledge explicit. Through explicit knowledge capture methods, the generated knowledge text can be represented by a text encoder (such as BERT), generating explicit shared knowledge representations of essays. This effectively improves the model's understanding and utilization of shared knowledge across essays on different topics.
[0068] Implicit knowledge capture refers to the process by which models automatically learn unlabeled shared features of essays from essay data, such as grammar and logical structure. Implicit knowledge capture enables models to identify common features in essays across different topics, forming the basis for cross-topic shared knowledge.
[0069] (1) Description of the task of automatic scoring of cross-topic essays:
[0070] Cross-topic essay automatic scoring is a research task that uses labeled essays from the source topic to train a scoring model to automatically score unlabeled essays from the target topic. This task requires the model to provide a comprehensive assessment of the essays and assign a corresponding score to each essay. Cross-topic essay automatic scoring is of great significance to the fields of education and language assessment, as it can provide an efficient, objective, and consistent assessment method, offering valuable reference and feedback for teachers, students, and researchers.
[0071] like Figure 1 The diagram illustrates the automatic scoring of cross-topic essays. First, it uses tagged source topic essays as input (e.g., ...). Figure 1 All scored essays from the seven themes in the dataset were used to train a cross-theme scoring model. This model was then used to score unscored essays on the target themes and output the corresponding essay scores.
[0072] (2) Text clustering techniques:
[0073] Text clustering is an unsupervised learning method that groups text data according to similarity. It can group text samples with similar content, syntax, logic, and structure into the same cluster to reveal the inherent structure and relationships between text data. Text clustering typically involves the following key techniques:
[0074] ① Feature Representation: Text samples need to be converted into vector form that computers can process. Common feature representation methods include the Bag-of-Words model, TF-IDF weights, and word embeddings (such as Word2Vec and GloVe). The Bag-of-Words model is relatively simple but struggles to capture the semantic relationships between words; the TF-IDF method can highlight the weights of feature words in the text; while word embeddings effectively capture the semantic information of words by mapping them to a vector space.
[0075] ② Similarity Measurement: Similarity measurement is used to measure the similarity between text samples. Commonly used methods include cosine similarity and Jaccard similarity. Choosing an appropriate similarity measurement method is crucial for improving the accuracy and consistency of clustering.
[0076] ③ Clustering Algorithms: The grouping of text samples mainly relies on specific clustering algorithms. Commonly used algorithms include K-Means, Gaussian Mixture Model (GMM), and hierarchical clustering. K-Means is suitable for large-scale data and fast processing speeds, while GMM can cluster data based on a probabilistic model. Hierarchical clustering displays the relationships between samples by constructing a hierarchical tree structure.
[0077] ④ Cluster evaluation and interpretation: The effectiveness of clustering is evaluated through internal indicators (such as silhouette coefficient) and external indicators (such as adjusted Land coefficient). Interpreting the characteristics and themes of each cluster helps to understand the structure of the clusters and extract potential knowledge features.
[0078] (3) Introduction to Large Language Model Technology:
[0079] Large Language Models (LLMs), such as GPT-3 and BERT, are among the technologies that have made significant progress in the field of Natural Language Processing (NLP) in recent years. By pre-training on massive amounts of text data, LLMs possess powerful language generation and understanding capabilities, enabling them to perform exceptionally well in various language tasks. LLMs are particularly outstanding in capturing, summarizing, and generating language knowledge, especially in automated tasks, where they can extract common features from large-scale, multi-dimensional texts to generate interpretable and generalizable text descriptions.
[0080] In this invention, the large language model is mainly used to generate and represent multidimensional shared knowledge in each cluster, and to provide highly relevant knowledge support for the model during the scoring stage. The technical advantages of LLM in this task are mainly reflected in the following aspects:
[0081] ① Large language models possess the ability to extract multifaceted features from complex texts, capturing commonalities in grammar, semantics, style, and structure among different types of essays. These shared features provide a knowledge base for cross-topic automatic scoring tasks, enabling the model to accurately evaluate target essays even without target topic label data.
[0082] ② Large language models make implicit features explicit by generating natural language descriptions, providing clear knowledge representations. These descriptions enhance the interpretability of the model, allowing scoring results to go beyond relying solely on implicit embeddings and incorporate intuitive summaries of cluster features. This explicit representation also facilitates further analysis and application, contributing to increased transparency and persuasiveness of the scoring results.
[0083] ③ The pre-training corpus of the large language model provides rich contextual information and extensive language comprehension capabilities, enabling the model to more effectively identify the shared features of essays on new topics.
[0084] In applications, the generation performance of LLMs is significantly influenced by input prompts, making prompt word engineering crucial for efficiently utilizing large language models. Prompt word engineering improves the output performance of LLMs by designing, optimizing, and adapting prompts, ensuring that the knowledge representations generated by the model meet task requirements. To achieve this, this invention further introduces prompt word engineering to fully explore the potential of large language models.
[0085] (4) Introduction to the engineering technology of the prompt words:
[0086] Cue word engineering refers to optimizing the output of a Large Language Model (LLM) by designing appropriate input cues. Cue words play a guiding role in LLM, and different cues have a significant impact on the model's output. Cue word engineering includes the following technical aspects:
[0087] ① Cue word design: The core of cue word design lies in clarifying the model's target output and required information. For example, when summarizing the common features of text, cue words can explicitly require the model to focus on specific text attributes (such as grammar, writing style, etc.), thereby improving the relevance and consistency of the output.
[0088] ② Cue word optimization: Cue word optimization includes adjusting the word choice, word order, and instructions of the cue words to improve the accuracy of LLM generation. Experimental adjustments are made to find the optimal cue word format for generating the desired content, which contributes to the stability of the model's generation.
[0089] ③ Cue word adaptation: Different LLMs may respond differently to cue words. Therefore, cue word engineering needs to be specifically adapted according to the selected model to ensure that ideal output results can be obtained on different model platforms.
[0090] In this invention, cue word engineering is used to guide a large language model to summarize common features across various clusters, thereby generating interpretable text descriptions. This process helps the model capture multidimensional knowledge features from different text clusters, improving the intuitiveness and interpretability of the clustering representation.
[0091] The cross-topic essay scoring method based on interpretable knowledge capture provided in this invention relates to the field of data processing technology. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or in-vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing the cross-topic essay scoring method based on interpretable knowledge capture, but is not limited to the above forms.
[0092] This invention can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This invention can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0093] Figure 2This is an optional flowchart of a cross-topic essay scoring method based on interpretable knowledge capture provided in an embodiment of the present invention. Figure 2 The method may include, but is not limited to, steps S100 to S400.
[0094] S100. Obtain source topic essays as training datasets, use the training datasets to train the preset scoring model, and update the parameters of the scoring model; the scoring model includes an essay encoder and a scorer.
[0095] The training dataset includes essay data on multiple topics, and the essay data includes multiple essays and their corresponding essay scores; the essay encoder and scorer of the scoring model have preset initial parameters;
[0096] It should be noted that in some embodiments, training a preset scoring model using a training dataset and updating the parameters of the scoring model may include the following steps: extracting a preset number of essay samples from the essay data of each topic in the training dataset as training samples; sequentially encoding the training samples using a preset essay encoder to obtain the essay feature representation corresponding to each essay in the training samples; concatenating the essay feature representation with preset initial explicit knowledge to obtain the final representation; inputting the final representation into a scorer for scoring to obtain the predicted score for each essay in the training samples; and, based on the predicted score and the corresponding essay score in the training samples, using the mean squared error as the loss function, further... The parameters of the essay encoder and scorer are updated through backpropagation and stochastic gradient descent. A predetermined number of essays are extracted from the remaining essay data of each topic in the training dataset as training samples. The process of encoding the training samples sequentially using the predetermined essay encoder is repeated until all essays in the training dataset have been traversed. The training round is incremented by 1, and the training dataset is restored. The initial training round is 0. The process of extracting a predetermined number of essays from the essay data of each topic in the training dataset as training samples is repeated until the predetermined number of training rounds is reached. The parameters of the scoring model are updated based on the parameters of the last updated essay encoder and scorer.
[0097] For example, in some specific implementations, the source topic essay training dataset D is first used as input, and explicit knowledge h is randomly initialized. x,shared The text is encoded using the text encoder E(*) to obtain the text representation h. x The two are combined to obtain the final representation of the composition. The input to the model scorer is used to train the cross-topic scoring model, and the parameters of the essay encoder E(*) are defined as θ. In some specific application scenarios, the pre-training of the scoring model can be achieved as follows:
[0098] Step 1: Encode the essay using an encoder:
[0099] Using source topic essays as the training dataset D, assume that the essay data for the m-th topic in the training data is as follows: in This represents the i-th essay. The corresponding scores are M, where 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 of each topic. Where N A This indicates the number of essay samples in this batch, with corresponding score labels y1, y2, ..., y NA .
[0101] (2) Assume that the essay sample x in the m-th topic is encoded by an essay encoder (such as CNN-LSTM-ATT or BERT) to obtain the representation vector of the essay, denoted as h. x =E(x) m ), where h x This represents the encoded feature representation of the essay, where E represents the text encoder. The encoded essay representation h x This will be used for training subsequent scoring models.
[0102] Step 2: Train the scoring model:
[0103] (1) For each essay i, encode it to obtain the essay representation. By combining initial explicit knowledge (obtained through random initialization) with the input scorer, the corresponding essay score is predicted. And based on the true label of the essay y i Calculate the score loss, assuming there are N in total in this batch. A The sample essays have a predicted score of [number] points. True score label
[0104]
[0105] (2) Calculate the mean squared error as the loss function, as shown in equation (1):
[0106]
[0107] (3) Apply backpropagation and stochastic gradient descent to update the parameters of the essay encoder and the scorer of the scoring model, where the parameters of the essay encoder E(*) are denoted as θ.
[0108] Step 3: Repeat Steps 1-2 until all essays in the training set have been traversed, completing one round of model training.
[0109] Step 4: Iterate through Steps 1 to 3 to train the scoring model multiple times. After training for τ rounds, obtain the encoder E(*) and parameters θ of the currently trained scoring model.
[0110] S200. The training dataset is encoded using the updated essay encoder, and then clustered based on the encoding results to obtain multiple clusters. Cluster optimization is performed based on the clusters, and then the parameters of the essay encoder are updated based on the cluster optimization results to obtain the target scoring model.
[0111] For example, in some specific implementations, essays from different source topics in the 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 within each cluster can be aligned using a clustering optimization method, and backpropagation 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, the training dataset is encoded using an updated essay encoder, and then clustered based on the encoding results to obtain multiple clusters. This may include the following steps: sampling essay data from each topic in the training dataset to obtain batch samples; the batch samples include a predetermined number of essays extracted from each topic, and the total number of batch samples is the product of the number of topics in the training dataset and the predetermined number; encoding the batch samples using the updated essay encoder to obtain an essay representation corresponding to each essay in the batch samples; and clustering the batch samples based on the essay representation using a preset clustering algorithm to obtain cluster labels corresponding to each essay in the batch samples, thereby obtaining multiple clusters and the cluster center of each cluster.
[0113] In some optional implementations, clustering batch samples based on essay representation using a preset clustering algorithm may include the following steps: randomly selecting a specified number of samples as centroids in the batch samples; assigning samples in the batch samples to each centroid by minimizing Euclidean distance based on essay representation; during the sample allocation process of the batch samples, updating the centroids according to the mean of the essay representations of all samples in the current cluster included by each centroid, until the batch samples have completed the allocation of all samples.
[0114] For example, in some specific application scenarios, taking the aforementioned steps as examples, the encoding clustering to obtain clusters can be achieved as follows:
[0115] Step 5: Stratify and sample essays from the training data for each topic, and use an essay encoder to encode the sampled essays:
[0116] (1) Traverse the datasets of M topics, starting from each topic D m Randomly select n essays and combine them to obtain a batch of n×M essays. The essays in this batch are denoted as x1, x2, ..., xm. n×M .
[0117] (2) Encode all the essays in the batch using the encoder E(*) (parameter θ) obtained in Step 4 to obtain their essay representations. in d x Let be the dimension of the vector.
[0118] Step 6: Cluster the sampled essays to obtain the cluster label and cluster center vector representation for each essay:
[0119] The method of this invention can be applied to different clustering algorithms, such as k-means and Gaussian mixture models (GMM), to identify and capture shared features in essays.
[0120] (1) First, select the number of clusters K and initialize K cluster centroids from the sampled n×M essays. For example, in the K-Means algorithm, K samples can be randomly selected as initial centroids.
[0121] (2) Based on the selected clustering algorithm, each essay sample is assigned to the cluster most similar to it in order to minimize the distance between the sample and the cluster center. For example, in K-Means, the sample assignment can be completed by minimizing the Euclidean distance; in GMM, the assignment is based on the probability that the sample belongs to each cluster.
[0122] (3) For each cluster center, update its position based on the vector representation of the composition samples 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 by the expectation-maximization (EM) algorithm.
[0123] (4) In each iteration, calculate the loss function for the current cluster (such as the intra-cluster sum of squares in K-Means or the log-likelihood in GMM) to evaluate the clustering quality. Repeat the above process until the loss function converges, obtaining the final cluster labels c1, c2, ..., c n×M The cluster center vectors of the K clusters are represented as μ1, μ2, ..., μ K .
[0124] It should also be noted that each cluster includes multiple essays and their corresponding essay representations. The essay representations are obtained by encoding the corresponding essays using an essay encoder with updated parameters. In some embodiments, cluster optimization is performed based on the clusters, and then the parameters of the essay encoder are updated according to the results of the cluster optimization to obtain the target scoring model. This may include the following steps: aligning the essay representations in each cluster based on a preset cluster optimization method to obtain the cluster optimization result for each cluster; and updating the parameters of the essay encoder by applying backpropagation and gradient descent based on the cluster optimization result.
[0125] For example, in some specific application scenarios, taking the aforementioned steps as examples, clustering optimization can be achieved as follows:
[0126] Step 7: Perform cluster optimization to align the composition representations in each cluster:
[0127] By aligning the composition representations in each cluster, the model can better learn and capture shared knowledge across different topics.
[0128] (1) Clustering optimization can be achieved through various methods. For example, it can be achieved by bringing the representation vectors of each essay closer together. Embedded with μ at the corresponding cluster center c Clustering optimization can be achieved by minimizing the distance between clustering distributions, or by using a distribution alignment method that minimizes KL divergence to encourage models to align representations of compositions within the same cluster.
[0129] (2) By cluster optimization, backpropagation and gradient descent are applied to update the parameters θ of the model’s composition encoder E(*).
[0130] S300. Based on the cluster information, the prompt word information is obtained. Based on the prompt word information, the explicit shared knowledge representation of each cluster is generated using a preset semantic representation model.
[0131] It should be noted that each cluster includes multiple essays and their corresponding essay representations. The essay representations are obtained by encoding the corresponding essays using an essay encoder with updated parameters. In some embodiments, step S300 may include the following steps: obtaining the target number of essays closest to the cluster center in each cluster as representative samples; embedding the representative samples into a preset prompt word template to obtain prompt word information; guiding a preset large language model to infer and generate feature description text for the clusters based on the prompt word information; and inputting the feature description text into a preset semantic representation model to generate explicit shared knowledge representations of the clusters.
[0132] For example, in some specific implementations, for the k-th cluster, the representative sample closest to the cluster center can be selected to generate the prompt word T. kGenerate shared feature descriptions r through a large language model k Using pre-trained models with strong semantic representation capabilities, such as BERT, to generate feature description text r k Encode the data to obtain the explicit shared knowledge representation of the cluster. During the scoring phase, based on the target essay representation h x The explicit knowledge representation h most relevant to the similarity selection of cluster centers x,shared .
[0133] In some specific application scenarios, using examples of the aforementioned steps, generating explicit shared knowledge representations can be achieved as follows:
[0134] Step 8: Explicit Knowledge Capture
[0135] (1) For each cluster C k Select a distance μ from the cluster center k The most recent M essays are used as representative samples:
[0136]
[0137] (2) Design prompt word T k Guide large language models (such as ChatGPT or BERT) to generate description clusters C k Shared features. The cue word design, based on keywords and structural cues, generates feature descriptions representing the samples:
[0138]
[0139] The large language model will be based on T k Generate text description T k The features contained therein, denoted by 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 yields 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., the target scoring model is used as the scoring model, the loop count is incremented by 1, and the steps of training the preset scoring model using the training dataset and updating the parameters of the scoring model are returned until the loop count reaches the preset loop count and the target scoring model obtained in the last loop is obtained, with the loop count initially being 0) to enhance the model effect. After a certain number of rounds, the final cross-topic essay scoring model is obtained.
[0142] S400. Using the target scoring model and combining explicit shared knowledge representation, we score the essays to be scored and obtain the scoring results of the essays to be scored.
[0143] It should be noted that, in some embodiments, step S400 may include the following steps: inputting the essay to be scored into the essay encoder in the target scoring model to encode it into a target essay representation; performing similarity matching between the target essay 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 essay representation and the target explicit knowledge representation and inputting them into the scorer in the target scoring model to score the essay and predict the scoring result of the essay to be scored.
[0144] For example, in some specific implementations, an unlabeled target-topic essay (i.e., the essay to be scored) is taken as input, and a trained cross-topic scoring model is used to predict the score of the target-topic essay to obtain the score of the target-topic essay.
[0145] It should be noted that during the scoring stage, the target essay x (i.e., the essay to be scored) is represented by h. x Compare with all cluster centers and select the most similar (e.g., smallest Euclidean distance) explicit knowledge representation:
[0146]
[0147] Then h x And the explicit knowledge representation of choice h x,shared The concatenation, used as input to the scorer, yields the final encoded representation (i.e., the scorer's input):
[0148]
[0149] To explain in detail the principle of the technical solution of the present invention, the overall process of the present invention will be described below with reference to some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and should not be regarded as a limitation of the present invention.
[0150] First, it should be noted that, based on the different technologies used, cross-topic essay automatic scoring technologies can be mainly categorized as follows:
[0151] ① An automatic scoring method for cross-topic essays based on manual characteristics:
[0152] Early research on automatic cross-topic essay scoring employed a method of extracting shallow, topic-irrelevant, handcrafted features from essays through a feature extraction process. These linguistic features were then used to represent the essays, and traditional machine learning methods were applied to predict essay scores. For example, Attali et al. focused on extracting content-irrelevant features from essays and trained regression models based on these handcrafted features to predict essay scores; Pradi et al. designed and used features not based on specific topic information or vocabulary to train a Bayesian linear ridge regression model for essay scoring. Existing methods use various features in automatic cross-topic essay scoring. These features can be categorized into simple and complex features: simple features include word length, essay length, etc., while complex features involve deeper aspects such as grammatical errors. Some features are topic-specific, such as bag-of-words features; while others are general and applicable to different topics, such as the number of spelling errors, grammatical errors, and vocabulary complexity. The advantage of automatic cross-topic essay scoring methods based on handcrafted features is their simplicity of implementation, but their disadvantage is that the extracted handcrafted features are mainly shallow semantic features, failing to capture better non-linear high-level semantic features. Furthermore, the extraction of handcrafted features requires more manual annotation.
[0153] ② An automatic scoring method for cross-topic essays based on multi-stage training:
[0154] Recent research on automatic cross-topic essay scoring employs a two-stage approach to train scoring models. In the first stage, a usable scoring model is trained using source-topic essay data, and this model is used to generate pseudo-labels for target-topic essays. In the second stage, the pseudo-labeled target-topic essays are used as training data to further train a scoring model that integrates the features of the target-topic essays. For example, Jin et al. trained a machine learning scoring model using hand-designed features in the first stage to obtain pseudo-labels for target-topic scoring. In the second stage, they designed a neural network model and trained a superior scoring model using pseudo-labels and target-topic data. Li et al. used adversarial networks in the first stage to enable the model to capture high-level shared semantic features between source and target topics, and used this model to obtain pseudo-labels. In the second stage, they used the pseudo-labels and target-topic data, fusing topic and sample information, to train a more effective cross-topic scoring model. The advantage of multi-stage training-based automatic cross-topic essay scoring methods is that by using the pseudo-labeled target-topic data obtained in the first stage to train the model, it can effectively improve the model's generalization ability on the target topic. However, the disadvantage is that the method cannot be effectively implemented when target-topic data is lacking.
[0155] ③ An automatic scoring method for cross-topic essays based on multi-task and adaptive learning:
[0156] Existing methods for automatic cross-topic essay scoring employ multi-task learning to enhance the model's topic adaptability. For example, Cummins et al. proposed a constrained multi-task pairwise learning method, treating essay scoring for each topic as a separate task and introducing a constrained preference ranking method to enable the model to adapt to different scoring scales and standards across topics. Cao et al. introduced two self-supervised tasks and used multi-task joint training to learn more domain-adaptive features. Ridley et al. scored multiple attributes of essays, treating the scoring of each attribute as a task, applying an attention mechanism between different attribute scoring tasks, and combining part-of-speech embeddings and a set of general features to construct a neural network-based automatic cross-topic essay scoring model. The advantages of multi-task learning-based automatic cross-topic essay scoring methods are that, through multi-task learning, the model can simultaneously learn shared features between multiple related tasks, increasing the model's adaptability to data diversity, and transferring knowledge and experience learned from one task to other related tasks, thereby effectively improving the model's generalization performance across different topics.
[0157] Recent methods have also focused on improving the adaptability and generalization ability of models across different topics, enabling them to achieve effective scoring on essay data with unseen topics. Chen et al.'s meta-learning-based cross-topic scoring method, through topic generalization and hierarchical perceptual learning, allows the model to generalize to new topics without requiring target topic data. Jiang et al. proposed a representation learning-based knowledge separation method that effectively distinguishes between topic-related and irrelevant information, thereby more accurately capturing shared features. Furthermore, Chen and Li established a shared feature mapping between source and target topics through a topic mapping strategy, achieving cross-topic knowledge transfer. These methods enhance the adaptability and generalization ability of models in different topic scoring tasks.
[0158] Research on automatic scoring of cross-topic essays focuses on learning the consistency of data distribution across different topics to improve the model's generalization ability across various topics. The task of automatic scoring of cross-topic essays is demanding, as the training and testing essay data for the models come from different topics with varying data distributions, posing significant challenges. While existing methods for automatic scoring of cross-topic essays have achieved good results, they still have many shortcomings (see the background 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, a new approach is needed to enable models to automatically discover and align multidimensional shared knowledge across 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 invention proposes an automatic essay scoring method across topics based on multifaceted interpretable knowledge capture to improve the model's generalization ability on new topics. The core of this method lies in the alternating optimization of scoring model training and cluster-based knowledge discovery and alignment strategies, enabling the model to automatically learn and capture multifaceted shared knowledge across different topics, thereby improving the model's applicability and accuracy. For example... Figure 3 As shown, the following are the flow steps of the method of the present invention:
[0161] S1: Take the source topic essay training dataset D as input and randomly initialize explicit knowledge h. x,shared The text is encoded using the text encoder E(*) to obtain the text representation h. x The two are combined to obtain the final representation of the composition. The input used for the model scorer is used to train the cross-topic scoring model, and the parameters of the essay encoder E(*) are defined as θ.
[0162] S2: Sample essays from different source topics in the training set D, and encode the sampled essays using the essay encoder E(*) trained in S1; use an unsupervised clustering method to cluster the encoded essays to obtain K clusters; align the representation of the essays within each cluster using a clustering optimization method, and apply backpropagation gradient descent to update the parameters θ of the model's essay encoder E(*).
[0163] S3: For the k-th cluster, select the representative sample closest to the cluster center to generate the prompt word T. k Generate shared feature descriptions r through a large language model k Using pre-trained models with strong semantic representation capabilities, such as BERT, to generate feature description text r k Encode the data to obtain the explicit shared knowledge representation of the cluster. During the scoring phase, based on the target essay representation h x The explicit knowledge representation h most relevant to the similarity selection of cluster centers x,shared .
[0164] S4: Alternate between S1 and S2~3, iterating a certain number of times to obtain a well-trained cross-topic essay automatic scoring model.
[0165] S5: Take the unlabeled target topic essay as input, use the trained cross-topic scoring model to predict the score of the target topic essay, and obtain the score of the target topic essay.
[0166] Among them, such as Figure 4 As shown in Figure S2, the multi-faceted knowledge discovery and optimization method based on clustering proposed in this invention can be implemented as follows:
[0167] S2-1: Sample from each topic essay to obtain batch data containing all topic essays.
[0168]
[0169] S2-2: Encode all essays in the batch data using the currently trained essay encoder E(*) to obtain their vector representations.
[0170] S2-3: Cluster the sampled essays to obtain the cluster label {c1,c2,…,c} for each essay. n×M} and the cluster center vectors of K clusters {μ1,μ2,…,μ K};
[0171] S2-4: Calculate the clustering optimization update loss and update the essay encoder parameters θ of the cross-topic scoring model.
[0172] Among them, such as Figure 5 As shown in Figure S3, the explicit knowledge capture and knowledge selection method proposed in this invention can be implemented as follows:
[0173] S3-1: Input cluster centers {μ1,μ2,…,μ K Given the representation vectors of all essays within the cluster, calculate the representation of each essay. With cluster center μ k The distance from the cluster center μ is selected. k Using the most recent M essays as representative samples, output the index set i1, i2, ..., i of the representative essays for each cluster. M .
[0174] S3-2: Define the prompt word template and generate the prompt word T k Guide the large language model to cluster C k Representative essay samples i1, i2, ..., i M By performing feature text description, we obtain shared feature descriptions r representing different aspects across 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 r. k Encode to obtain an explicit shared knowledge representation.
[0176] S3-4: Calculate the representation h of the current training sample. x With each cluster center μ k The similarity (e.g., by minimizing Euclidean distance or other similarity measures) is used to select the explicit knowledge representation corresponding to the most similar cluster. As h x,shared .
[0177] In some specific embodiments, the detailed process steps of the technical solution of the present invention can be implemented as follows:
[0178] Step 1: Encode the essay using an encoder:
[0179] Using source topic essays as the training dataset D, assume that the essay data for the m-th topic in the training data is as follows: in This represents the i-th essay. The corresponding scores are M, where 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 of each topic. Where N A This indicates the number of essay samples in this batch, and its corresponding score label is...
[0181] (2) Assume that the essay sample x in the m-th topic is encoded by an essay encoder (such as CNN-LSTM-ATT or BERT) to obtain the representation vector of the essay, denoted as h. x =E(x) m ), where h x This represents the encoded feature representation of the essay, where E represents the text encoder. The encoded essay representation h x This will be used for training subsequent scoring models.
[0182] Step 2: Train the scoring model:
[0183] (1) For each essay i, encode it to obtain the essay representation. By combining initial explicit knowledge (obtained through random initialization) with the input scorer, the corresponding essay score is predicted. And based on the true label of the essay y i Calculate the score loss, assuming there are N in total in this batch. A The sample essays have a predicted score of [number] points. The true score labels are {y1, y2, ..., y NA}
[0184] (2) Calculate the mean squared error as the loss function, as shown in equation (1):
[0185]
[0186] (3) Apply backpropagation and stochastic gradient descent to update the parameters of the essay encoder and the scorer of the scoring model, where the parameters of the essay encoder E(*) are denoted as θ.
[0187] Step 3: Repeat Steps 1-2 until all essays in the training set have been traversed, completing one round of model training.
[0188] Step 4: Iterate through Steps 1 to 3 to train the scoring model multiple times. After training for τ rounds, obtain the encoder E(*) and parameters θ of the currently trained scoring model.
[0189] Step 5: Stratify and sample essays from the training data for each topic, and use an essay encoder to encode the sampled essays:
[0190] (1) Traverse the datasets of M topics, starting from each topic D m Randomly select n essays and combine them to obtain a batch of n×M essays. The essays in this batch are denoted as x1, x2, ..., xm. n×M .
[0191] (2) Encode all the essays in the batch using the encoder E(*) (parameter θ) obtained in Step 4 to obtain their essay representations. in d x Let be the dimension of the vector.
[0192] Step 6: Cluster the sampled essays to obtain the cluster label and cluster center vector representation for each essay:
[0193] The method of this invention can be applied to different clustering algorithms, such as k-means and Gaussian mixture models (GMM), to identify and capture shared features in essays.
[0194] (1) First, select the number of clusters K and initialize K cluster centroids from the sampled n×M essays. For example, in the K-Means algorithm, K samples can be randomly selected as initial centroids.
[0195] (2) Based on the selected clustering algorithm, each essay sample is assigned to the cluster most similar to it in order to minimize the distance between the sample and the cluster center. For example, in K-Means, the sample assignment can be completed by minimizing the Euclidean distance; in GMM, the assignment is based on the probability that the sample belongs to each cluster.
[0196] (3) For each cluster center, update its position based on the vector representation of the composition samples 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 by the expectation-maximization (EM) algorithm.
[0197] (4) In each iteration, calculate the loss function for the current cluster (such as the intra-cluster sum of squares in K-Means or the log-likelihood in GMM) to evaluate the clustering quality. Repeat the above process until the loss function converges, obtaining the final cluster labels c1, c2, ..., c n×M The cluster center vectors of the K clusters are represented as μ1, μ2, ..., μ K .
[0198] Step 7: Perform cluster optimization to align the composition representations in each cluster:
[0199] By aligning the composition representations in each cluster, the model can better learn and capture shared knowledge across different topics.
[0200] (1) Clustering optimization can be achieved through various methods. For example, it can be achieved by bringing the representation vectors of each essay closer together. Embedded with μ at the corresponding cluster center c Clustering optimization can be achieved by minimizing the distance between clustering distributions, or by using a distribution alignment method that minimizes KL divergence to encourage models to align representations of compositions within the same cluster.
[0201] (2) By cluster optimization, backpropagation and gradient descent are applied to update the parameters θ of the model’s composition encoder E(*).
[0202] Step 8: Explicit Knowledge Capture
[0203] (1) For each cluster C k Select a distance μ from the cluster center k The most recent M essays are used as representative samples:
[0204]
[0205] (2) Design prompt word T k Guide large language models (such as ChatGPT or BERT) to generate description clusters C k Shared features. The cue word design, based on keywords and structural cues, generates feature descriptions representing the samples:
[0206]
[0207] The large language model will be based on T k Generate text description T kThe features contained therein, denoted by 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 yields the explicit shared knowledge representation of the cluster.
[0209] Step 9: Knowledge Selection and Updating
[0210] (1) In the scoring stage, the representation h of the target essay x (i.e., the essay to be scored) is... x Compare with all cluster centers and select the most similar (e.g., smallest Euclidean distance) explicit knowledge representation:
[0211]
[0212] (2) h x And the explicit knowledge representation of choice h x,shared The concatenation, used as input to the scorer, yields the final encoded representation (i.e., the scorer's input):
[0213]
[0214] Repeat Steps 5 through 9 until all essays in the training set have been traversed, completing one round of cluster optimization.
[0215] Step 10: Alternately perform model training in Steps 1-4 and knowledge optimization in Steps 5-9. After a certain number of rounds, obtain the final cross-topic essay scoring model.
[0216] Step 11: Input the target topic essay into the trained cross-topic scoring model to obtain the final predicted score.
[0217] In summary, addressing the shortcomings of existing technologies in cross-topic essay scoring tasks, which primarily rely on static shared features and fail to fully capture shared knowledge features such as grammar, coherence, and writing style, this invention proposes a multi-faceted interpretable knowledge capture method driven by a large language model to better support cross-topic essay scoring. The model of this invention consists of two main steps: First, a base scorer is trained using training data; then, an unsupervised clustering method is used to cluster training data from different topics, grouping essays with similar features into the same cluster. The essay encoder parameters of the obtained base scorer are optimized through clustering loss, thereby enhancing the model's ability to capture multi-faceted shared knowledge. During this process, an explicit knowledge description for each cluster is generated by the large language model and integrated into the final encoding of the essay, thereby improving the model's representation of multi-dimensional essay features across different topics, ultimately enhancing the overall accuracy and interpretability of the model's scoring of new topic essays.
[0218] Compared with the prior art, the present invention has at least the following beneficial effects:
[0219] (1) Automatic discovery of multi-faceted shared knowledge: By using unsupervised clustering algorithms to cluster essay data on different topics, the model can automatically discover and capture multi-faceted shared knowledge between topics, thereby improving the model's ability to understand the multi-faceted similarities between different topics.
[0220] (2) Explicitization and interpretation enhancement of tacit knowledge: This invention uses a large language model to generate descriptions of the tacit shared knowledge discovered during the clustering process, making these tacit knowledge explicit into interpretable textual forms, providing semantic interpretation of shared knowledge, and enabling the model to apply these shared features more transparently and understandably.
[0221] (3) Enhance representation and cross-topic generalization ability: Combine the discovered multifaceted shared knowledge with the self-representation of the training essay to enhance the overall representation of the essay, so that the model has a stronger generalization ability and accuracy in scoring essays on unknown new topics.
[0222] like Figure 6 As shown, this embodiment of the invention also provides a cross-topic essay scoring device 900 based on interpretable knowledge capture, which may include:
[0223] The first module 901 is used to acquire source topic essays as training datasets, use the training datasets to train a pre-defined scoring model, and update the parameters of the scoring model; the scoring model includes an essay encoder and a scorer; the training dataset includes essay data on multiple topics, and the essay data includes multiple essays and their corresponding essay scores;
[0224] The second module 902 is used to encode the training dataset using the updated essay encoder, and then cluster the dataset based on the encoding results to obtain multiple clusters; perform cluster optimization based on the clusters, and then update the parameters of the essay encoder based on the cluster optimization results to obtain the target scoring model.
[0225] The third module 903 is used to organize the prompt word information according to the clusters, and based on the prompt word information, to generate an explicit shared knowledge representation for each cluster using a preset semantic representation model;
[0226] Module 4, 904, is used to score the essays to be scored by using the target scoring model and combining explicit shared knowledge representations, and obtain the scoring results of the essays to be scored.
[0227] The content of the method embodiments of the present invention is applicable to the device embodiments. The specific functions 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 methods.
[0228] This invention also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned cross-topic essay scoring method based on interpretable knowledge capture. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0229] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment 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] Please see Figure 7 , Figure 7 The hardware structure of an electronic device 1000 according to another embodiment is illustrated. The electronic device 1000 includes:
[0231] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, 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 as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1002 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 to implement the cross-topic essay scoring method based on interpretable knowledge capture according to the embodiments of the present invention.
[0233] Input / output interface 1003 is used to implement information input and output;
[0234] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0235] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);
[0236] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.
[0237] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned cross-topic essay scoring method based on interpretable knowledge capture.
[0238] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0239] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0240] The present invention provides a cross-topic essay scoring method, a cross-topic essay scoring device, an electronic device, and a storage medium based on interpretable knowledge capture. It acquires source-topic essays as a training dataset, uses the training dataset to train a preset scoring model, and updates the parameters of the scoring model. The scoring model includes an essay encoder and a scorer. The training dataset includes essay data from multiple topics, and the essay data includes multiple essays and their corresponding essay scores. The updated essay encoder encodes the training dataset, and then clusters the results to obtain multiple clusters. Cluster optimization is performed based on the clusters, and the parameters of the essay encoder are updated based on the optimization results to obtain a target scoring model. Hint word information is obtained from the clusters, and an explicit shared knowledge representation for each cluster is generated using a preset semantic representation model based on the hint word information. The target scoring model, combined with the explicit shared knowledge representation, is used to score the essays to be scored, resulting in a score for the essays to be scored. This invention trains a scoring model using training data. Then, it clusters training data from different themes, grouping essays with similar characteristics into the same cluster. This clustering optimizes the parameters of the resulting essay encoder, enhancing the model's ability to capture shared knowledge across multiple aspects. During this process, a semantic representation model generates explicit knowledge descriptions for each cluster and integrates them into the final encoding of the essay. This improves the model's representation of multi-dimensional essay features across different themes, thereby enhancing the overall accuracy and interpretability of the model's scoring of new themes.
[0241] The embodiments described in this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.
[0242] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present invention, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0243] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0244] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0245] The terms "first," "second," "third," "fourth," etc. (if present) in the specification and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0246] It should be understood that in this invention, "at least one (item)" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) 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, and c can be single or multiple.
[0247] In the embodiments provided by this 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 merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.
[0248] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0249] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0250] If the integrated unit is implemented as 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. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0251] The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and spirit of the present invention should be within the scope of the claims of the present invention.
Claims
1. A cross-topic essay scoring method based on interpretable knowledge capture, characterized in that, The method includes the following steps: The source topic essays are obtained as a training dataset, and the preset scoring model is trained using the training dataset, and the parameters of the scoring model are updated; the scoring model includes an essay encoder and a scorer; the training dataset includes essay data on multiple topics, and the essay data includes multiple essays and their corresponding essay scores; The training dataset is encoded using the updated essay encoder, and then clustered based on the encoding results to obtain multiple clusters; cluster optimization is performed based on the clusters, and then the parameters of the essay encoder are updated based on the cluster optimization results to obtain the target scoring model; The step of encoding the training dataset using the updated essay encoder and then clustering the dataset based on the encoding results to obtain multiple clusters includes the following steps: Batch samples are obtained by sampling the essay data from each topic in the training dataset; the batch samples include a predetermined number of essays extracted from each topic, and the total number of batch samples is the product of the number of topics in the training dataset and the predetermined number. The batch samples are encoded using the updated parameter-encoded essay encoder to obtain the essay representation for each essay in the batch samples; Based on the essay representation, the batch samples are clustered using a preset clustering algorithm to obtain the cluster label corresponding to each essay in the batch samples, and then multiple clusters and the cluster center of each cluster are obtained. Based on the clusters, prompt word information is obtained. Based on the prompt word information, an explicit shared knowledge representation of each cluster is generated using a preset semantic representation model. Each cluster includes multiple essays and their corresponding essay representations. The essay representations are obtained by encoding the corresponding essays using the essay encoder with updated parameters. The step of organizing the prompt word information based on the clusters and generating an explicit shared knowledge representation for each cluster using a preset semantic representation model based on the prompt word information includes the following steps: The number of essays in each cluster that are closest to the cluster center are obtained as representative samples. The representative sample is embedded into a preset prompt word template to obtain the prompt word information; Based on the prompt word information, a preset large language model is used to infer and generate feature description text for the clusters. The feature description text is input into the preset semantic representation model to generate the explicit shared knowledge representation of the clusters; Using the target scoring model and the explicit shared knowledge representation, the essay to be scored is scored, and the scoring result of the essay to be scored is obtained.
2. The cross-topic essay scoring method based on interpretable knowledge capture according to claim 1, characterized in that, The essay encoder and the scorer of the scoring model are preset with initial parameters; the step of training the preset scoring model using the training dataset and updating the parameters of the scoring model includes the following steps: A predetermined number of essays are extracted from the essay data of each topic in the training dataset as training samples; The training samples are encoded sequentially by the preset essay encoder to obtain the essay feature representation corresponding to each essay in the training samples; The final representation is obtained by concatenating the composition feature representation with the preset initial explicit knowledge; The final representation is input into the scorer for scoring to obtain the predicted score for each essay in the training samples; Based on the predicted score and the essay score corresponding to each essay in the training samples, the mean squared error is used as the loss function, and then the parameters of the essay encoder and the scorer are updated through backpropagation and stochastic gradient descent. From the remaining essay data of each topic in the training dataset, a preset number of essays are extracted as training samples. Then, the step of encoding the training samples sequentially by the preset essay encoder is returned to be executed until all essays in the training dataset have been traversed. The training round is incremented by 1, and the training dataset is restored. The initial number of training rounds is 0. Return to the step of extracting a preset number of essay samples from the essay data of each topic in the training dataset as training samples, until the training round reaches the preset training round, and complete the parameter update of the scoring model based on the parameters of the last updated essay encoder and the scorer.
3. The cross-topic essay scoring method based on interpretable knowledge capture according to claim 1, characterized in that, The step of clustering the batch samples based on the essay representation using a preset clustering algorithm includes the following steps: A specified number of samples are randomly selected from the batch of samples as center points; Based on the composition representation, samples in the batch are assigned to each of the central points by minimizing the Euclidean distance; During the sample allocation process of the batch samples, the centroid is updated according to the mean of the composition representations of all samples in the current cluster included by each centroid, until the batch samples have completed the allocation of all samples.
4. The cross-topic essay scoring method based on interpretable knowledge capture according to claim 1, characterized in that, Each cluster includes multiple essays and their corresponding essay representations. The essay representations are obtained by encoding the corresponding essays using the essay encoder with updated parameters. The step of performing cluster optimization based on the clusters, and then updating the parameters of the essay encoder according to the results of the cluster optimization to obtain the target scoring model, includes the following steps: The composition representations in each cluster are aligned based on a preset clustering optimization method to obtain the clustering optimization result for each cluster. Based on the clustering optimization results, backpropagation and gradient descent are applied to update the parameters of the composition encoder.
5. The cross-topic essay scoring method based on interpretable knowledge capture according to claim 1, characterized in that, The process of using the target scoring model and combining it with the explicit shared knowledge representation to score the essay to be scored, and obtaining the score result of the essay to be scored, includes the following steps: The essay to be scored is input into the essay encoder in the target scoring model to obtain the target essay representation; The target essay representation is matched with the explicit shared knowledge representation corresponding to each cluster, and the explicit shared knowledge representation with the highest similarity is taken as the target explicit knowledge representation. The target essay representation and the target explicit knowledge representation are concatenated and input into the scorer in the target scoring model to score the essay, and the score result of the essay to be scored is predicted.
6. A cross-topic essay scoring device based on interpretable knowledge capture, characterized in that, The device includes: The first module is used to acquire source topic essays as training datasets, use the training datasets to train a preset scoring model, and update the parameters of the scoring model; the scoring model includes an essay encoder and a scorer; the training dataset includes essay data on multiple topics, and the essay data includes multiple essays and their corresponding essay scores; The second module is used to encode the training dataset using the updated essay encoder, and then cluster the dataset based on the encoding results to obtain multiple clusters; perform cluster optimization based on the clusters, and then update the parameters of the essay encoder based on the cluster optimization results to obtain the target scoring model. The step of encoding the training dataset using the updated essay encoder and then clustering the dataset based on the encoding results to obtain multiple clusters includes the following steps: Batch samples are obtained by sampling the essay data from each topic in the training dataset; the batch samples include a predetermined number of essays extracted from each topic, and the total number of batch samples is the product of the number of topics in the training dataset and the predetermined number. The batch samples are encoded using the updated parameter-encoded essay encoder to obtain the essay representation for each essay in the batch samples; Based on the essay representation, the batch samples are clustered using a preset clustering algorithm to obtain the cluster label corresponding to each essay in the batch samples, and then multiple clusters and the cluster center of each cluster are obtained. The third module is used to organize the prompt word information according to the clusters, and based on the prompt word information, to generate an explicit shared knowledge representation for each cluster using a preset semantic representation model; Each cluster includes multiple essays and their corresponding essay representations. The essay representations are obtained by encoding the corresponding essays using the essay encoder with updated parameters. The step of organizing the prompt word information based on the clusters and generating an explicit shared knowledge representation for each cluster using a preset semantic representation model based on the prompt word information includes the following steps: The number of essays in each cluster that are closest to the cluster center are obtained as representative samples. The representative sample is embedded into a preset prompt word template to obtain the prompt word information; Based on the prompt word information, a preset large language model is used to infer and generate feature description text for the clusters. The feature description text is input into the preset semantic representation model to generate the explicit shared knowledge representation of the clusters; The fourth module is used to score the essay to be scored by using the target scoring model and combining the explicit shared knowledge representation, so as to obtain the scoring result of the essay to be scored.
7. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.
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