Cross-theme automatic composition scoring method and system based on adversarial theme perception
By introducing adversarial topic perception and pseudo-tag generation techniques in cross-theme automatic composition scoring, learning topic sharing and topic-specific features, the problem of existing methods focusing on shared features is solved, and the accuracy and robustness of the scoring is improved.
Patent Information
- Application Number
- CN202510024090.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-01-07
AI Technical Summary
The existing cross-theme automatic composition scoring method focuses on learning topic sharing features and ignores the learning of topic-related features, resulting in poor scoring results.
Adopting an adversarial topic perception method, by obtaining a collection of essays for source and target topics, setting up topic sharing tips and specific topic hints, using pre-trained models for feature representation, and introducing adversarial training and pseudo-label generation techniques into the joint modeling framework of regression and classification to learn topic sharing and specific topic features.
By introducing adversarial topic perception and pseudo-label generation technologies, the model's robustness and prediction accuracy for feature scale changes are enhanced, the existing method focuses on shared features is solved, and the effectiveness of cross-theme automatic composition scoring is improved.
Smart Images

Figure CN119849477A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cross-topic automatic composition scoring, and in particular to a cross-topic automatic composition scoring method and system based on adversarial topic perception. Background Art
[0002] Automatic essay grading aims to automatically evaluate the quality of essays written by students on a variety of writing topics. Automatic essay grading systems can reduce the burden of manual grading for educators while providing timely and comprehensive feedback to students. Automatic essay grading is usually formulated as a regression task, and early methods mainly rely on handcrafted features. Recently, deep learning has greatly promoted the development of the field of automatic essay grading, and some works have achieved good results by leveraging the powerful feature learning ability of deep neural networks.
[0003] In general, automatic essay scoring methods based on deep learning can be divided into automatic essay scoring based on specific topics and automatic essay scoring across topics, depending on whether their training data and test data come from the same topic. Automatic essay scoring methods based on specific topics aim to train an automatic essay scoring model using training and test data from the same topic. Most existing methods are automatic essay scoring methods based on specific topics, but it is difficult to collect a large number of scored essays with specific prompts in actual scenarios. Therefore, cross-topic automatic essay scoring came into being. Cross-topic automatic essay scoring methods aim to train a model with good transferability through data from the source topic, so that it can accurately score on the target topic.
[0004] However, none of the existing cross-topic automatic essay scoring methods apply the hint fine-tuning technique to the cross-topic automatic essay problem. In addition, most of the existing methods focus on learning topic-shared features while ignoring the learning of topic-dependent features. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the present application provides a cross-topic automatic essay scoring method and system based on adversarial topic perception, so as to solve the problem that most existing methods focus on learning topic-shared features while ignoring the learning of topic-related features.
[0006] In a first aspect, the present application provides a cross-topic automatic composition scoring method based on adversarial topic perception, the method comprising: Get a collection of graded essays for a source topic and a collection of ungraded essays for a target topic; set topic-shared prompts and topic-specific prompts for each topic; Each composition in the set of scored compositions of the source topic and the set of unscored compositions of the target topic is concatenated with the theme-shared prompt and the specific theme prompt of the composition's corresponding topic to obtain the prompt-enhanced embedding x. Input into the pre-trained model, and the output of the pre-trained model Position gets feature representation ; In the joint modeling framework of regression and classification, The regression task is composed of feature attributers, and then represented by composition features , input annotation features , attention mechanism, calculate the current composition in the first The predicted scores of attributes; where j∈[1, K]; through the predicted scores of each attribute, A collection of graded essays on source topics and attributes, calculate the score loss of the current regression task ; In the joint modeling framework of regression and classification, a classifier C consisting of an MLP layer with a softmax activation function is established. The essays in the scored essay collection of the source topic are input into the classifier, and then the Classification loss for each source topic ; Based on the adversarial training and pseudo-label generation techniques of classification tasks, we learn topic-sharing cues and specific topic cues respectively to obtain adversarial loss and the classification loss of the target topic , and then combined with Classification loss for each source topic Get the total classification loss and combat loss ; According to the regression loss, total classification loss, and adversarial loss, the final loss of the joint modeling framework is determined to obtain the trained joint modeling framework.
[0007] In one implementation of the present application, obtaining A collection of graded essays on the source topic and a collection of ungraded essays on the target topic, including: Get A collection of graded essays on the source topic ;in, Indicates A collection of graded essays on source topics. represents the sth rated composition of the ith source topic, where i∈[1, ],s∈[1, ], Number of essays in the collection represents the set of essays for the ith source topic, Representation and The corresponding essay score, represents the composition score of the s-th graded composition, represents the score value of the Kth attribute of the sth scored composition of the ith source topic, where K represents the number of scoring attributes of the composition. Collection of Expressions The corresponding scoring categories, represents the classification of the s-th scored composition of the ith source topic, , C represents the total number of scoring categories; Get the set of unscored essays on the target topic ;in, represents the tth unrated composition, t∈[1, ] Indicates the number of essays in the unrated essay collection.
[0008] In one implementation of the present application, a topic sharing prompt and a specific topic prompt for each topic are set; Each composition in the set of scored compositions of the source topic and the set of unscored compositions of the target topic is concatenated with the theme-shared prompt and the specific theme prompt of the composition's corresponding topic to obtain the prompt-enhanced embedding x. Input into the pre-trained model, and the output of the pre-trained model Position gets feature representation
[0009] Set topic sharing prompt ;in, represents the nth learnable vector; for each topic, set a specific topic hint ;in, represents the mth learnable vector under the i-th topic; get the composition ,in, Indicates the length of the essay represents the Lth word in the composition; By formula: , concatenate the theme-shared prompts of the composition and the specific theme prompts of the corresponding topic to obtain the prompt-enhanced embedding x; in, and Represents the start and end identifiers, respectively. Represents the embedding operation of the pre-trained model; Input into the pre-trained model, and the output of the pre-trained model The position gets the feature representation: ;in, , Represents the dimension of the output features of the pre-trained model, Represents a pre-trained model.
[0010] In one implementation of the present application, a The regression task is composed of feature attributers, and then represented by composition features , input annotation features , attention mechanism, calculate the current composition in the first The predicted scores of attributes; where j∈[1, K]; through the predicted scores of each attribute, A collection of graded essays on source topics and attributes, calculate the score loss of the current regression task , including: Establish feature attributers; Represent the features With the input annotation features Splice and get ;Will Enter to The nonlinear feature conversion layer in the scorer obtains the Feature representation corresponding to attribute scoring tasks : ;in and represents the weight matrix and bias term of the nonlinear layer, represents a nonlinear activation function; Introduce the attention mechanism formula:
[0011]
[0012]
[0013]
[0014] Calculate the The final attribute feature representation of the attributes ;in, is the concatenation of the feature representations of each attribute scoring task, Indicates The attribute characteristics of The attention weight of each attribute; Indicates The attention features of each attribute, Indicates The final attribute feature representation of each attribute; For each attribute scoring task, use The activation function of the linear layer will be Mapped to an attribute score:
[0015] in, Indicates The predicted score of each attribute, and Represent the corresponding weight matrix and bias term respectively, Represents the sigmoid activation function; Use mean square error as the loss function for each attribute scoring task, combined with A collection of graded essays on source topics and The final score loss is calculated as follows:
[0016]
[0017] in, represents the final scoring loss, represents the set of rated essays for the i-th source topic, i∈[1,N].
[0018] In one implementation of the present application, a classifier C consisting of an MLP layer with a softmax activation function is established. The essays in the scored essay collection of the source topic are input into the classifier, and then the Classification loss for each source topic , specifically including: The overall score is divided into four levels: excellent, medium and poor; The essays in the scored essay collection of source topics are input to a classifier ; Among them, the classifier C consists of an MLP layer with a softmax activation function:
[0019] For the essays in the rated essay collection of the current source topic, the cross entropy loss between the predicted results and the true labels is calculated as the classification loss of the model:
[0020] in, represents the prediction result of the rated composition set of the i-th source topic output by the classifier, represents the true label in the set of scored essays for the i-th source topic; for The classification loss calculation process of the overall score for a source topic dataset is as follows:
[0021] in, represents the classification loss.
[0022] In one implementation of the present application, adversarial training based on classification tasks and pseudo-label generation techniques are used to learn topic-sharing cues and specific topic cues respectively, and obtain adversarial loss and the classification loss of the target topic , and then combined with Classification loss for each source topic Get the total classification loss and combat loss , specifically including: The adversarial training module for topic-sharing cues is implemented as follows: For each source topic and target topics Designing a topic discriminator , to determine whether the input composition comes from the target topic; the total number of source topics The topic discriminator is represented as ; For essays from source or target topics , input into the corresponding discriminator; By formula:
[0023] calculate Probability of belonging to the target topic ; By formula:
[0024] Calculating adversarial loss ; The pseudo-label generation module for specific topic prompts is implemented as follows: For each target topic essay , get the feature representation And the class probability prediction results ; Sharpen the class probability predictions: , in, , Indicates category The category prediction probability of all target topic essays is stored in the memory bank. , and updated at each iteration using an exponential moving average strategy: , in, is a smoothing hyperparameter, and Represents the feature representation and category probability prediction results of the current sample in the memory bank; Find the cosine similarity between the feature representation of the current sample and the feature representation of all the compositions stored in the memory bank of nearest neighbor samples; By formula:
[0025] Will come from The probability prediction aggregation of the categories of the nearest neighbor samples is Generate class probability predictions and pseudo labels ; in, Indicates the current sample of The index set of the nearest neighbors in the memory bank; Calculate the cross entropy loss of the target topic essay based on the generated pseudo-labels:
[0026] Then, the total classification loss is calculated as follows: .
[0027] In one implementation of the present application, the final loss is determined based on the regression loss, the classification loss, and the adversarial loss, specifically including: By formula: Determine the final loss ;in, and Represents a preset trade-off parameter.
[0028] In the second aspect, the present application provides a cross-topic automatic composition scoring system based on adversarial topic perception, the system comprising: Theme composition acquisition module, used to obtain A collection of graded essays on the source topic A collection of ungraded essays on the target topic
[0029] Prompt Enhanced Composition Encoder module, used to set topic-shared prompts, topic-specific prompts for each topic; Each composition in the set of scored compositions of the source topic and the set of unscored compositions of the target topic is concatenated with the theme-shared prompt and the specific theme prompt of the composition's corresponding topic to obtain the prompt-enhanced embedding x. Input into the pre-trained model, and the output of the pre-trained model Position gets feature representation ; The joint modeling module is used to build a joint modeling framework composed of regression and classification The regression task is composed of feature attributers, and then represented by composition features , input annotation features , attention mechanism, calculate the current composition in the first The predicted scores of attributes; where j∈[1, K]; through the predicted scores of each attribute, A collection of graded essays on source topics and attributes, calculate the score loss of the current regression task ; In the joint modeling framework of regression and classification, a classifier C consisting of an MLP layer with a softmax activation function is established. The essays in the scored essay collection of the source topic are input into the classifier, and then the Classification loss for each source topic ; Based on the adversarial training and pseudo-label generation techniques of classification tasks, we learn topic-sharing cues and specific topic cues respectively to obtain adversarial loss and the classification loss of the target topic , and then combined with Classification loss for each source topic Get the total classification loss and combat loss ; According to the regression loss, total classification loss, and adversarial loss, the final loss of the joint modeling framework is determined to obtain the trained joint modeling framework.
[0030] In one implementation of the present application, the theme composition acquisition module includes a source theme acquisition unit and a target theme acquisition unit. Source theme acquisition unit, used to obtain A collection of graded essays on a source topic ;in, Indicates A collection of graded essays on source topics. represents the sth rated composition of the ith source topic, where i∈[1, ],s∈[1, ], Number of essays in the collection represents the set of essays for the ith source topic, Representation and The corresponding essay score, represents the composition score of the s-th graded composition, represents the score value of the Kth attribute of the sth scored composition of the ith source topic, where K represents the number of scoring attributes of the composition. Collection of Expressions The corresponding scoring categories, represents the classification of the s-th scored composition of the ith source topic, , C represents the total number of scoring categories; the target topic acquisition unit is used to obtain the set of unrated essays on the target topic ;in, represents the tth unrated composition, t∈[1, ] Indicates the number of essays in the unrated essay collection.
[0031] In one implementation of the present application, the prompt enhancement composition encoder module includes a feature representation unit, Used to set topic sharing prompt ;in, represents the nth learnable vector; for each topic, set a specific topic hint ;in, represents the mth learnable vector under the i-th topic; get the composition ,in, Indicates the length of the essay represents the Lth word in the composition; By formula: , concatenate the theme-shared prompts of the composition and the specific theme prompts of the corresponding topic to obtain the prompt-enhanced embedding x; in, and Represents the start and end identifiers, respectively. Represents the embedding operation of the pre-trained model; Input into the pre-trained model, and the output of the pre-trained model The position gets the feature representation: ;in, , Represents the dimension of the output features of the pre-trained model, Represents a pre-trained model.
[0032] Those skilled in the art can understand that the present application has at least the following beneficial effects: The present application discloses a cross-topic automatic essay scoring method and system based on adversarial topic perception, which introduces topic-sharing prompts and specific topic prompts for each topic, guides the corresponding knowledge of the pre-trained model, and uses the pre-trained model to achieve a comprehensive improvement in performance. Adversarial training is introduced in the joint modeling framework of regression and classification to learn topic-sharing prompts, thereby enhancing the model's robustness to changes in feature scales. At the same time, pseudo-label generation technology is used to learn prompts for specific topics, further improving the model's prediction accuracy. This solves the problem that most existing methods focus on learning topic-sharing features while ignoring the learning of topic-related features. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0034] Figure 1 This is a flow chart of a cross-topic automatic composition scoring method based on adversarial topic perception provided in an embodiment of the present application.
[0035] Figure 2 It is a schematic diagram of the internal structure of a cross-topic automatic composition scoring system based on adversarial topic perception provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] It should be understood by those skilled in the art that the embodiments described below are only preferred embodiments of the present disclosure, and do not mean that the present disclosure can only be implemented through the preferred embodiments. The preferred embodiments are only used to explain the technical principles of the present disclosure, and are not used to limit the protection scope of the present disclosure. Based on the preferred embodiments provided by the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work should still fall within the protection scope of the present disclosure.
[0037] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0038] The technical solution proposed in the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0039] The embodiment provides a cross-topic automatic composition scoring method based on adversarial topic perception, such as Figure 1 As shown, the method provided in the embodiment of the present application mainly includes the following steps: Step 110: Get A collection of graded essays on a source topic and a collection of ungraded essays on a target topic.
[0040] In some embodiments, this step may specifically include: Get A collection of graded essays on a source topic ;in, Indicates A collection of graded essays on source topics. represents the sth rated composition of the ith source topic, where i∈[1, ],s∈[1, ], Number of essays in the collection represents the set of essays for the ith source topic, Representation and The corresponding essay score, represents the composition score of the s-th graded composition, represents the score value of the Kth attribute of the sth scored composition of the ith source topic, where K represents the number of scoring attributes of the composition. Collection of Expressions The corresponding scoring categories, represents the classification of the s-th scored composition of the ith source topic, , C represents the total number of scoring categories; Get the set of unscored essays on the target topic ;in, represents the tth unrated composition, t∈[1, ] Indicates the number of essays in the unrated essay collection.
[0041] Step 120: Set the topic sharing prompt and the specific topic prompt for each topic; Each composition in the set of scored compositions of the source topic and the set of unscored compositions of the target topic is concatenated with the theme-shared prompt and the specific theme prompt of the composition's corresponding topic to obtain the prompt-enhanced embedding x. Input into the pre-trained model, the output of the pre-trained model Position gets feature representation .
[0042] This step can be specifically as follows: Set topic sharing prompt ;in, represents the nth learnable vector; for each topic, set a specific topic hint ;in, represents the mth learnable vector under the i-th topic; get the composition ,in, Indicates the length of the essay represents the Lth word in the composition; By formula: , concatenate the theme-shared prompts of the composition and the specific theme prompts of the corresponding topic to obtain the prompt-enhanced embedding x; in, and Represents the start and end identifiers, respectively. Represents the embedding operation of the pre-trained model; Input into the pre-trained model, and the output of the pre-trained model The position gets the feature representation: ;in, , Indicates the dimension of the output feature of the pre-trained model, which will be used later As a characteristic of composition, Represents a pre-trained model.
[0043] Step 130: Establish a joint modeling framework of regression and classification. The regression task is composed of feature attributers, and then represented by composition features , input annotation features , attention mechanism, calculate the current composition in the first The predicted scores of each attribute; through the predicted scores of each attribute, A collection of graded essays on source topics and attributes, calculate the score loss of the current regression task .
[0044] It should be noted that j∈[1,K].
[0045] This step can be specifically as follows: Establish feature attributers; Represent the features With the input annotation features Splice and get ;Will Enter to The nonlinear feature conversion layer in the scorer obtains the Feature representation corresponding to attribute scoring tasks : ;in and represents the weight matrix and bias term of the nonlinear layer, represents a nonlinear activation function; Introduce the attention mechanism formula:
[0046]
[0047]
[0048]
[0049] Calculate the The final attribute feature representation of the attributes ;in, is the concatenation of the feature representations of each attribute scoring task, Indicates The attribute characteristics of The attention weight of each attribute; Indicates The attention features of each attribute, Indicates The final attribute feature representation of each attribute; For each attribute scoring task, use The activation function of the linear layer will be Mapped to an attribute score:
[0050] in, Indicates The predicted score of each attribute, and Represent the corresponding weight matrix and bias term respectively, Represents the sigmoid activation function; Use mean square error as the loss function for each attribute scoring task, combined with A collection of graded essays on the source topic The final score loss is calculated as follows:
[0051]
[0052] in, represents the final scoring loss, represents the set of rated essays for the i-th source topic, i∈[1,N].
[0053] Step 140: In the joint modeling framework of regression and classification, a classifier C consisting of an MLP layer with a softmax activation function is established. The essays in the scored essay collection of the source topic are input into the classifier, and then the Classification loss for each source topic .
[0054] In some embodiments, this step may specifically include: dividing the overall score into four levels: excellent, medium, and poor; Essays in the collection of graded essays for the source topic ; Among them, the classifier C consists of an MLP layer with a softmax activation function:
[0055] For the essays in the rated essay collection of the current source topic, the cross entropy loss between the predicted results and the true labels is calculated as the classification loss of the model:
[0056] in, represents the prediction result of the rated composition set of the i-th source topic output by the classifier, represents the true label in the set of scored essays for the i-th source topic; for The classification loss calculation process of the overall score for a source topic dataset is as follows:
[0057] in, represents the classification loss.
[0058] Step 150: Based on the classification task, adversarial training and pseudo-label generation techniques are used to learn topic-sharing cues and specific topic cues respectively, and obtain adversarial loss and the classification loss of the target topic , and then combined with Classification loss for each source topic Get the total classification loss and combat loss .
[0059] This step can be specifically as follows: divide the overall score into four levels: excellent, medium, and poor; Essays in the collection of graded essays for the source topic ; Among them, the classifier C consists of an MLP layer with a softmax activation function:
[0060] For the essays in the rated essay collection of the current source topic, the cross entropy loss between the predicted results and the true labels is calculated as the classification loss of the model:
[0061] in, represents the prediction result of the rated composition set of the i-th source topic output by the classifier, represents the true label in the set of scored essays for the i-th source topic; for The classification loss calculation process of the overall score for a source topic dataset is as follows:
[0062] in, represents the classification loss.
[0063] Step 160: Determine the final loss of the joint modeling framework according to the regression loss, the total classification loss, and the adversarial loss, and obtain a trained joint modeling framework.
[0064] By formula: Determine the final loss ;in, and Represents a preset trade-off parameter.
[0065] Based on the above description, in order to better learn topic-shared features and topic-related features, and to apply prompt fine-tuning technology to the field of cross-topic automatic composition scoring, this application proposes an adversarial topic-aware prompt fine-tuning method for cross-topic automatic composition scoring. First, the definition of cross-topic automatic composition scoring is explained. Then, the topic-aware prompt enhancement encoding module is described in detail, which contains topic-shared prompts and topic-specific prompts. At the same time, a joint modeling module is introduced, which models automatic composition scoring as a classification and regression task at the same time. Finally, the adversarial training module for topic-shared prompts and the pseudo-label generation module for topic-specific prompts are used to learn two types of prompts in the encoding module, respectively, to promote the learning of topic-shared features and topic-related features.
[0066] In addition, this application Figure 2 The present application provides a cross-topic automatic composition scoring system based on adversarial topic perception. Figure 2 As shown, the system provided in the embodiment of the present application mainly includes: Theme composition acquisition module 210 is used to acquire A collection of graded essays on the source topic A collection of ungraded essays on a target topic.
[0067] The theme composition acquisition module 210 includes a source theme acquisition unit and a target theme acquisition unit. Source theme acquisition unit, used to obtain A collection of graded essays on the source topic ;in, Indicates A collection of graded essays on source topics. represents the sth rated composition of the ith source topic, where i∈[1, ],s∈[1, ], Number of essays in the collection represents the set of essays for the ith source topic, Representation and The corresponding essay score, represents the composition score of the s-th graded composition, represents the score value of the Kth attribute of the sth scored composition of the ith source topic, where K represents the number of scoring attributes of the composition. Collection of Expressions The corresponding scoring categories, represents the classification of the s-th scored composition of the ith source topic, , C represents the total number of scoring categories; The target topic acquisition unit is used to obtain the unrated composition collection of the target topic. ;in, represents the tth unrated composition, t∈[1, ] Indicates the number of essays in the unrated essay collection.
[0068] The prompt enhancement composition encoder module 220 is used to set topic-shared prompts and specific topic prompts for each topic; Each composition in the set of scored compositions of the source topic and the set of unscored compositions of the target topic is concatenated with the theme-shared prompt and the specific theme prompt of the composition's corresponding topic to obtain the prompt-enhanced embedding x. Input into the pre-trained model, the output of the pre-trained model Position gets feature representation .
[0069] The prompt enhanced composition encoder module 220 includes a feature representation unit, Used to set topic sharing prompt ;in, represents the nth learnable vector; for each topic, set a specific topic hint ;in, represents the mth learnable vector under the i-th topic; get the composition ,in, Indicates the length of the essay represents the Lth word in the composition; By formula: , concatenate the theme-shared prompts of the composition and the specific theme prompts of the corresponding topic to obtain the prompt-enhanced embedding x; in, and Represents the start and end identifiers, respectively. Represents the embedding operation of the pre-trained model; Input into the pre-trained model, the output of the pre-trained model The position gets the feature representation: ;in, , Represents the dimension of the output features of the pre-trained model, Represents a pre-trained model.
[0070] The joint modeling module 230 is used to establish a joint modeling framework composed of The regression task is composed of feature attributers, and then represented by composition features , input annotation features , attention mechanism, calculate the current composition in the first The predicted scores of attributes; where j∈[1, K]; through the predicted scores of each attribute, A collection of graded essays on source topics and attributes, calculate the score loss of the current regression task ; In the joint modeling framework of regression and classification, a classifier C consisting of an MLP layer with a softmax activation function is established. The essays in the scored essay collection of the source topic are input into the classifier, and then the Classification loss for each source topic ; Based on the adversarial training and pseudo-label generation techniques of classification tasks, we learn topic-sharing cues and specific topic cues respectively to obtain adversarial loss and the classification loss of the target topic , and then combined with Classification loss for each source topic Get the total classification loss and combat loss ; According to the regression loss, total classification loss, and adversarial loss, the final loss of the joint modeling framework is determined to obtain the trained joint modeling framework.
[0071] So far, the technical solutions of the present disclosure have been described in combination with the above multiple embodiments, but it is easy for those skilled in the art to understand that the protection scope of the present disclosure is not limited to these specific embodiments. Without departing from the technical principles of the present disclosure, those skilled in the art can split and combine the technical solutions in the above-mentioned various embodiments, and can also make equivalent changes or replacements to the relevant technical features. Any changes, equivalent replacements, improvements, etc. made within the technical concept and / or technical principle of the present disclosure will fall within the protection scope of the present disclosure.
Claims
1. A cross-topic automatic essay scoring method based on adversarial topic perception, characterized in that: The method comprises: Get a collection of graded essays on the source topic and a collection of ungraded essays on the target topic; Set topic-shared prompts, topic-specific prompts for each topic; Each composition in the set of scored compositions of the source topic and the set of unscored compositions of the target topic is concatenated with the theme-shared prompt and the specific theme prompt of the composition's corresponding topic to obtain the prompt-enhanced embedding x. Input into the pre-trained model, and the output of the pre-trained model Position gets feature representation ; In the joint modeling framework of regression and classification, The regression task is composed of feature attributers, and then represented by composition features , input annotation features , attention mechanism, calculate the current composition in the first The predicted scores of attributes; where j∈[1, K]; through the predicted scores of each attribute, A collection of graded essays on source topics and attributes, calculate the score loss of the current regression task ; In the joint modeling framework of regression and classification, a classifier C consisting of an MLP layer with a softmax activation function is established. The essays in the scored essay collection of the source topic are input into the classifier, and then the Classification loss for each source topic ; Adversarial training and pseudo-label generation techniques based on classification tasks learn topic-shared cues and topic-specific cues respectively, and obtain adversarial losses and the classification loss of the target topic , and then combined with Classification loss for each source topic , and obtain the total classification loss and combat loss ; According to the regression loss, total classification loss, and adversarial loss, the final loss of the joint modeling framework is determined to obtain the trained joint modeling framework.
2. The cross-topic automatic composition scoring method based on adversarial topic perception according to claim 1 is characterized in that: Get A collection of graded essays on the source topic and a collection of ungraded essays on the target topic, including: Get A collection of graded essays on the source topic ;in, Indicates A collection of graded essays on source topics. represents the sth rated composition of the ith source topic, where i∈[1, ],s∈[1, ], express The number of essays in the collection, represents the set of essays for the ith source topic, Representation and The corresponding essay score, represents the composition score of the s-th graded composition, represents the score value of the Kth attribute of the sth scored composition of the ith source topic, where K represents the number of scoring attributes of the composition. Collection of Expressions The corresponding scoring categories, represents the classification of the s-th scored composition of the ith source topic, , C represents the total number of scoring categories; Get the set of unscored essays on the target topic ;in, represents the tth unrated composition, t∈[1, ], Indicates the number of essays in the unrated essay collection.
3. The cross-topic automatic composition scoring method based on adversarial topic perception according to claim 1 is characterized in that: Set topic-shared prompts, topic-specific prompts for each topic; Each composition in the set of scored compositions of the source topic and the set of unscored compositions of the target topic is concatenated with the theme-shared prompt and the specific theme prompt of the composition's corresponding topic to obtain the prompt-enhanced embedding x. Input into the pre-trained model, and the output of the pre-trained model Position gets feature representation , specifically including: Set topic sharing prompt ;in, represents the nth learnable vector; for each topic, set a specific topic hint ;in, represents the mth learnable vector under the i-th topic; get the composition ,in, Indicates the length of the composition. represents the Lth word in the composition; By formula: , concatenate the theme-shared prompts of the composition and the specific theme prompts of the corresponding topic to obtain the prompt-enhanced embedding x; in, and Represents the start and end identifiers, respectively. Represents the embedding operation of the pre-trained model; Input into the pre-trained model, and the output of the pre-trained model The position gets the feature representation: ;in, , Represents the dimension of the output features of the pre-trained model, Represents a pre-trained model.
4. The cross-topic automatic composition scoring method based on adversarial topic perception according to claim 1 is characterized in that: Founded by The regression task is composed of feature attributers, and then represented by composition features , input annotation features , attention mechanism, calculate the current composition in the first The predicted scores of attributes; where j∈[1, K]; through the predicted scores of each attribute, A collection of graded essays on source topics and attributes, calculate the score loss of the current regression task , specifically including: Establish feature attributers; Represent the features With the input annotation features Splice and get ;Will Enter to The nonlinear feature conversion layer in the scorer obtains the Feature representation corresponding to attribute scoring tasks : ;in and represents the weight matrix and bias term of the nonlinear layer, represents a nonlinear activation function; Introduce the attention mechanism formula: Calculate the The final attribute feature representation of the attributes ;in, is the concatenation of the feature representations of each attribute scoring task, Indicates The attribute characteristics of The attention weight of each attribute; Indicates The attention features of each attribute, Indicates The final attribute feature representation of each attribute; For each attribute scoring task, use The activation function of the linear layer will be Mapped to an attribute score: in, Indicates The predicted score of each attribute, and Represent the corresponding weight matrix and bias term respectively, Represents the sigmoid activation function; Use mean square error as the loss function for each attribute scoring task, combined with A collection of graded essays on source topics and The final score loss is calculated as follows: in, represents the final scoring loss, represents the set of rated essays for the i-th source topic, i∈[1,N].
5. The cross-topic automatic composition scoring method based on adversarial topic perception according to claim 1 is characterized in that: Create a classifier C consisting of an MLP layer with a softmax activation function. The essays in the scored essay collection of the source topic are input into the classifier, and then the Classification loss for each source topic , including: The overall score is divided into four levels: excellent, medium and poor; The essays in the scored essay collection of source topics are input to a classifier ; Among them, the classifier C consists of an MLP layer with a softmax activation function: For the essays in the rated essay collection of the current source topic, the cross entropy loss between the predicted results and the true labels is calculated as the classification loss of the model: in, represents the prediction result of the rated composition set of the i-th source topic output by the classifier, represents the true label in the set of scored essays for the i-th source topic; for The classification loss calculation process of the overall score for a source topic dataset is as follows: in, represents the classification loss.
6. The cross-topic automatic composition scoring method based on adversarial topic perception according to claim 1 is characterized in that: Adversarial training and pseudo-label generation techniques based on classification tasks learn topic-shared cues and topic-specific cues respectively, and obtain adversarial losses and the classification loss of the target topic , and then combined with Classification loss for each source topic Get the total classification loss and combat loss , specifically including: The adversarial training module for topic-sharing cues is implemented as follows: For each source topic and target topics Designing a topic discriminator , to determine whether the input composition comes from the target topic; the total number of source topics The topic discriminator is represented as ; For essays from source or target topics , input into the corresponding discriminator; By formula: calculate Probability of belonging to the target topic ; By formula: Calculating adversarial loss ; The pseudo-label generation module for specific topic prompts is implemented as follows: For each target topic essay , get the feature representation And the class probability prediction results ; Sharpen the class probability predictions: , in, , Indicates category The category prediction probability of all target topic essays is stored in the memory bank. , and updated at each iteration using an exponential moving average strategy: , in, is a smoothing hyperparameter, and Represents the feature representation and category probability prediction results of the current sample in the memory bank; Find the cosine similarity between the feature representation of the current sample and the feature representation of all the compositions stored in the memory bank of nearest neighbor samples; By formula: Will come from The probability prediction aggregation of the categories of the nearest neighbor samples is Generate class probability predictions and pseudo labels ; in, Indicates the current sample of The index set of the nearest neighbors in the memory bank; Calculate the cross entropy loss of the target topic essay based on the generated pseudo-labels: Furthermore, the total classification loss is calculated as follows: 。 7. The cross-topic automatic composition scoring method based on adversarial topic perception according to claim 1 is characterized in that: According to the regression loss, classification loss, and adversarial loss, the final loss of the joint modeling framework is determined to obtain the trained joint modeling framework, which includes: By formula: Determine the final loss ;in, and Represents a preset trade-off parameter.
8. A cross-topic automatic essay scoring system based on adversarial topic perception, characterized in that: The system comprises: Theme composition acquisition module, used to obtain A collection of graded essays on the source topic A collection of ungraded essays on the target topic Prompt Enhanced Composition Encoder module, used to set topic-shared prompts, topic-specific prompts for each topic; Each composition in the set of scored compositions of the source topic and the set of unscored compositions of the target topic is concatenated with the theme-shared prompt and the specific theme prompt of the composition's corresponding topic to obtain the prompt-enhanced embedding x. Input into the pre-trained model, and the output of the pre-trained model Position gets feature representation ; The joint modeling module is used to build a joint modeling framework composed of regression and classification The regression task is composed of feature attributers, and then represented by composition features , input annotation features , attention mechanism, calculate the current composition in the first The predicted scores of attributes; where j∈[1, K]; through the predicted scores of each attribute, A collection of graded essays on source topics and attributes, calculate the score loss of the current regression task ; In the joint modeling framework of regression and classification, a classifier C consisting of an MLP layer with a softmax activation function is established. The essays in the scored essay collection of the source topic are input into the classifier, and then the Classification loss for each source topic ; Based on the adversarial training and pseudo-label generation techniques of classification tasks, we learn topic-sharing cues and specific topic cues respectively to obtain adversarial loss and the classification loss of the target topic , and then combined with Classification loss for each source topic Get the total classification loss and combat loss ; According to the regression loss, total classification loss, and adversarial loss, the final loss of the joint modeling framework is determined to obtain the trained joint modeling framework.
9. The cross-topic automatic composition scoring system based on adversarial topic perception according to claim 8 is characterized in that: The theme composition acquisition module includes a source theme acquisition unit and a target theme acquisition unit. Source theme acquisition unit, used to obtain A collection of graded essays on the source topic ;in, Indicates A collection of graded essays on source topics. represents the sth rated composition of the ith source topic, where i∈[1, ],s∈[1, ], Number of essays in the collection represents the set of essays for the ith source topic, Representation and The corresponding essay score, represents the composition score of the s-th graded composition, represents the score value of the Kth attribute of the sth scored composition of the ith source topic, where K represents the number of scoring attributes of the composition. Collection of Expressions The corresponding scoring categories, represents the classification of the s-th scored composition of the ith source topic, , C represents the total number of scoring categories; The target topic acquisition unit is used to obtain the unrated composition collection of the target topic. ;in, represents the tth unrated composition, t∈[1, ] Indicates the number of essays in the unrated essay collection.
10. The cross-topic automatic composition scoring system based on adversarial topic perception according to claim 8, characterized in that: The prompt-enhanced composition encoder module includes a feature representation unit, Used to set topic sharing prompt ;in, represents the nth learnable vector; for each topic, set a specific topic hint ;in, represents the mth learnable vector under the i-th topic; get the composition ,in, Indicates the length of the essay represents the Lth word in the composition; By formula: , concatenate the theme-shared prompts of the composition and the specific theme prompts of the corresponding topic to obtain the prompt-enhanced embedding x; in, and Represents the start and end identifiers, respectively. Represents the embedding operation of the pre-trained model; Input into the pre-trained model, and the output of the pre-trained model The position gets the feature representation: ;in, , Represents the dimension of the output features of the pre-trained model, Represents a pre-trained model.
Citation Information
Patent Citations
Cross-theme composition automatic scoring method and system and medium
CN115455178A
Cross-theme composition automatic evaluation method and system based on paired double-layer adversarial alignment
CN117648921A
Cross-prompt automatic composition scoring method and device based on category confrontation joint learning and electronic equipment
CN118551044A
Cited By
Cross-theme composition scoring method and system based on category and sample perception prompt
CN120373287A