A shortcut learning mitigation method of model preference guided counterfactual data augmentation

By quantifying the model's preference for different shortcuts and adjusting the utilization ratio of counterfactual data, highly targeted counterfactual data is generated, solving the problem of inconsistent shortcut learning in existing technologies and improving the model's generalization ability and performance.

CN123180307APending Publication Date: 2026-11-27SHANXI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611373684.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing counterfactual data augmentation methods do not consider the model's differentiated dependence on different shortcut features, resulting in a discrepancy between the proportional introduction of counterfactual samples and the model's true shortcut preferences, which limits the targeting and efficiency of data augmentation.

Method used

By evaluating the model's preference for different shortcut features, quantifying its prior, learnability, and usability, adjusting the utilization ratio of counterfactual data, generating targeted counterfactual data, and retraining the model to alleviate shortcut learning.

Benefits of technology

It improves the model's performance on the distribution and significantly enhances its generalization ability on out-of-distribution data, while reducing the model's over-reliance on shortcut features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180307A_ABST
    Figure CN123180307A_ABST
Patent Text Reader

Abstract

The application discloses a shortcut learning mitigation method based on model preference guided counterfactual data augmentation, and belongs to the technical field of deep learning and natural language processing. The existing counterfactual data augmentation method does not consider the differentiated dependence of the model on different shortcut features, resulting in inconsistency between the augmentation degree and the real preference of the model. The application aligns the model shortcut preference with the counterfactual augmentation data proportion to mitigate shortcut learning. The application comprises the following modules: a shortcut type representation module in a target task, which formally represents candidate shortcut types; a model shortcut preference quantification module, which quantifies the preference of the model for different shortcuts from three dimensions of model prior, learnability and usability; a counterfactual data generation module, which uses a large language model to generate counterfactual augmentation data of different shortcut types based on prompts; and a model preference guided data sampling and training module, which calculates the augmentation proportion of each shortcut according to the model shortcut preference, samples according to the proportion, and trains the model to mitigate shortcut learning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of deep learning and natural language processing technology, and specifically relates to a shortcut learning mitigation method for model preference-guided counterfactual data augmentation. Background Technology

[0002] Large Language Models (LLMs) have demonstrated powerful capabilities in natural language processing tasks, but they can take shortcuts by learning pseudo-correlation in the data, resulting in poor generalization on out-of-distribution data.

[0003] Counterfactual data augmentation methods intervene in the distribution of training data by constructing new samples that form counterfactual relationships with the original samples, thereby weakening the model's dependence on pseudo-correlation features and alleviating shortcut learning. Counterfactual data augmentation methods mainly include three categories: (1) Obtaining counterfactual data based on manual annotation. By modifying the parts that are causally related to the labels, counterfactual data with reversed labels is obtained. However, this type of method is inefficient, costly, and difficult to scale. (2) Generating counterfactual data based on heuristic rules. Counterfactual data is generated through rules such as keyword replacement and negative insertion. However, this type of method is affected by fixed rules, which limits the quality and flexibility of the generated data. (3) Generating counterfactual data based on LLM. By guiding the model to edit the relevant attributes of causal features and pseudo-correlation features through prompt words, counterfactual data is generated, which effectively solves the limitations of the above two types of methods. However, this type of method assumes that all types of shortcuts are equally important. During training, the model introduces corresponding counterfactual data in proportion, which leads to the degree of augmentation of different types of shortcuts being inconsistent with the model's true shortcut preference, thus limiting the role of augmented data in alleviating shortcut learning. Summary of the Invention

[0004] To address the problem that existing counterfactual data augmentation methods fail to consider the model's differentiated dependence on different shortcut features and introduce counterfactual samples of different types of shortcuts in an equal proportion, leading to inconsistencies between data augmentation and the model's actual shortcut preferences, this invention proposes a model preference-guided counterfactual data augmentation method to mitigate the shortcut learning problem. This method assesses the model's preference for different shortcut features and adjusts the utilization ratio of corresponding counterfactual data, ensuring that the distribution of augmented data matches the model's actual shortcut dependencies. This improves the targeting and data utilization efficiency of counterfactual data augmentation, reduces the model's over-reliance on shortcut features, and effectively alleviates the shortcut learning problem in LLM (Local Least Metrics).

[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0006] A shortcut learning mitigation method for model preference-guided counterfactual data augmentation includes the following steps:

[0007] Step 1: Determining the shortcut types in the target task. Based on the data characteristics of the target task and existing prior knowledge, determine the candidate shortcut types that affect the model's prediction results.

[0008] Step 2, Quantification of model shortcut preference. By constructing different training and test sets, the performance of different models is evaluated, and the model's preference for different shortcuts is quantified from three dimensions: model prior, shortcut learnability, and shortcut usability.

[0009] Step 2.1, Model Prior Acquisition: For each candidate shortcut type, construct a single shortcut test set containing only the features of that shortcut, input it into the untrained original model for prediction, and calculate the model's response to each shortcut feature in the initial state based on the performance difference of the model on different shortcut test sets, thereby obtaining the model's prior to the shortcut.

[0010] Step 2.2, Model Learnability Acquisition: Construct a multi-shortcut coexistence training set containing multiple shortcut features, fine-tune the original model, and evaluate it on a single shortcut test set. By comparing the model's ability to capture different shortcut features after training, quantify the ease with which different shortcut features are learned by the model, and obtain the model's learnability for each shortcut.

[0011] Step 2.3, Model Usability Acquisition: Fine-tune the model using the original dataset of the target task, construct a test set where multiple shortcuts coexist and do not interfere with each other, and calculate the model's preference for different shortcut features in the actual decision-making stage based on the number of shortcut features relied upon by the model during the prediction process, thereby obtaining the model's usability for each shortcut.

[0012] Step 3, Counterfactual Data Generation. For different shortcut types, corresponding counterfactual generation prompt templates are designed. The original samples are input into the LLM (Local Method Manager), and by controlling the changes in target shortcut features while maintaining consistency in task semantic information, counterfactual augmentation data for different shortcut types is generated.

[0013] Step 4, Model Preference-Driven Data Sampling and Training. Calculate the data sampling ratio, sample data proportionally, and retrain the model to mitigate shortcut learning.

[0014] Step 4.1, Calculate the data sampling ratio; Based on the shortcut prior, learnability and usability in shortcut preferences, calculate the model preference ratio corresponding to different shortcut types, and quantify the model's dependence on each shortcut type.

[0015] Step 4.2, Counterfactual data sampling and model training: According to the calculated data sampling ratio, counterfactual augmented data corresponding to different shortcuts are sampled and mixed with the original dataset of the target task to form an augmented training set. The model is then retrained to alleviate the model's over-utilization of shortcut features.

[0016] Furthermore, in step 1, the determination of shortcut types in the target task involves identifying typical shortcut types in the target task based on the data characteristics of the target task and existing research findings on shortcut learning, and formally describing the characteristic patterns corresponding to each type of shortcut.

[0017] Specifically, in extractive question answering tasks, models typically need to locate the corresponding answer from a given context based on question information. However, since the training data may contain statistical features that are related to the answer label but lack true semantic association, the model may use these non-causally related features to complete the prediction, thus forming a shortcut learning behavior. This invention describes three types of shortcuts in extractive question answering tasks: the first-sentence shortcut, the question similarity shortcut, and the entity matching shortcut.

[0018] (1) First sentence shortcut (position): This shortcut indicates that the answer has a pseudo-relevance to the first sentence in the context.

[0019] (2) Shortcut of question similarity (word): This shortcut refers to the spurious correlation of significant word overlap between questions and answers. We use the number of words shared between the question and the context to represent word overlap.

[0020] (3) Entity matching shortcut (type): This shortcut means that when the entity type of the answer to the question can be explicitly specified, and there is only one entity fragment in the context that matches the type, the model relies on the pseudo-correlation of entity type co-occurrence to extract the answer.

[0021] Furthermore, in step 2.1, the model prior is obtained by splitting the data into two datasets. Specifically, the definitions are as follows: given the original dataset... Define a rule-based function for each shortcut k. ,Will Examples of shortcuts that can be solved using shortcut k Examples of non-shortcuts that cannot be solved using shortcut k Define a dataset for multiple shortcuts to coexist. Contains only a single shortcut dataset In datasets containing only a single shortcut, the target shortcut and the correct label are highly co-occurring, while interference from other shortcut features is eliminated. This allows the model's performance on this dataset to be attributed to its sensitivity to a specific shortcut, rather than the mixed effect of multiple shortcut signals.

[0022] The model's prior preference for each shortcut is measured using a test set containing only a single shortcut. Specifically, this is done on the original model without task fine-tuning. For each shortcut Test set evaluation. The F1 score is used as the metric, defining the... The prior preferences for shortcuts are: ; The higher the value, the better the pre-trained model can make predictions using this shortcut, meaning the model has a stronger prior preference for this shortcut.

[0023] Furthermore, in step 2.2, model learnability is acquired; using... The training set is used to fine-tune the original model to obtain the model. And in each shortcut corresponding to Evaluation on the test set. The F1 score on the test set is used as the metric, ranking the... The learnability of a shortcut is defined as: .

[0024] Furthermore, in step 2.3, model usability is obtained; Based on the test set, construct a shortcut selection dataset where multiple shortcuts coexist without interfering with each other. This design simultaneously embeds a first-sentence shortcut and a question similarity shortcut into the context. The first-sentence shortcut is positioned in the first sentence of the context, and the question similarity shortcut in the second sentence. The original context corresponding to the entity matching shortcut is rewritten to describe an unrelated topic, event, or background. It ensures that each of the three shortcuts corresponds to one of three incorrect answers, none of which can be obtained through correct reasoning. Simultaneously, a unique correct answer obtainable through true reasoning exists within the context. This design ensures that the model's output can be explicitly attributed to a specific shortcut strategy or true reasoning ability, thus enabling the detection of shortcut usability. The model is tested on the original training set for the target task. Fine-tuning yields a usability detection model ,exist The reasoning process proceeds. For each sample, based on the answer strategy predicted by the model, it is categorized into one of four types: first-sentence shortcut, similarity shortcut, entity shortcut, or correct reasoning. The selection ratio of each category across the entire test set is calculated, and the [number]th [category] is [number]. The usability of a shortcut is defined as follows: ;in, This indicates the number of times shortcut k is used in the reasoning, where K represents the total number of shortcuts. The higher the value, the more likely the model is to prioritize activating shortcuts in a multi-shortcut competition environment. The correct reasoning category is removed from the denominator calculation, focusing instead on the relative advantages of using quantification shortcuts.

[0025] Further, in step 3, counterfactual data generation; using the Qwen3-plus prompt-based method, counterfactual data corresponding to each shortcut is generated. (1) For the first sentence shortcut, while ensuring logical consistency, the first sentence containing the answer is randomly adjusted to another position in the article. (2) For the question similarity shortcut, there are two generation methods: high overlap sentence generation. Let LLM decompose the conditions in the question, including time, action, goal, etc. Identify the entities in the question and modify their attributes. Use as many conditions decomposed from the question as possible to make it as similar to the question as possible. Use LLM for self-verification. If the newly generated sentence can answer the original question, then discard the sentence and regenerate it. Synonym replacement generation. Use synonyms to replace the words that are repeated in the question in the original sentence to reduce the similarity between the sentence and the original question, and use LLM to verify the semantic consistency between the newly generated sentence and the original sentence. If the new and old sentences are semantically consistent, then retain them. (3) For the entity matching shortcut, first determine the named entity type corresponding to the answer (e.g., person, date, place). Extract information related to the topic from the context and generate sentences. This sentence contains named entity types of the same type as the answer, but it is not the answer. Using LLM for self-validation, if the newly generated sentence answers the original question, it is discarded and a new sentence is generated. The counterfactual data generated by each shortcut is defined as follows: .

[0026] Further, in step 4.1, the data sampling ratio is calculated; the first... The overall preference for shortcuts is defined as a combination of the product of model priors, learnability, and usability, and normalized to form a probability distribution across all shortcut types: ; The higher the level, the better the model is at shortcuts. The dependence is reflected in three aspects: prior bias, training acquisition, and competitive selection. The greater the comprehensive impact of this shortcut on the robustness of downstream tasks, the greater the impact.

[0027] Furthermore, in step 4.2, counterfactual augmentation data sampling and model training; in the counterfactual data sampling stage, based on... Determine the counterfactual data sampling ratio for different shortcuts to ensure that the shortcut types preferred by the model receive more sufficient intervention. Define the counterfactual dataset obtained for each sampling method as follows: : ;

[0028] While ensuring coverage of different articles, samples are taken from the counterfactual data corresponding to each article according to the aforementioned sampling ratio, and then mixed with the articles corresponding to the original dataset to form a new training set. .

[0029] During the model training phase, the augmented training dataset is utilized. The parameters of the pre-trained model are optimized. Specifically, a low-rank adaptation module (LoRA) is introduced into the model network structure. Only the parameters of the low-rank adaptation module are updated, while the original model parameters remain fixed, in order to reduce the scale of training parameters and the consumption of computational resources.

[0030] Compared with the prior art, the present invention has the following advantages:

[0031] (1) The present invention quantifies the model’s preference for different shortcuts and aligns the model’s shortcut preference with the proportion of counterfactual augmentation data corresponding to different shortcuts, thereby better mitigating shortcut learning.

[0032] (2) This invention introduces a shortcut usability index to explore the model’s preference for different shortcuts based on the ease or difficulty of using various shortcuts.

[0033] (3) This invention can not only improve the performance on in-distribution data, but also significantly improve the generalization ability of the model on out-of-distribution data. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 The flowchart shows the shortcut learning mitigation method for model preference-guided counterfactual data augmentation proposed in this invention.

[0036] Figure 2 Flowchart for the quantization module of model shortcut preference;

[0037] Figure 3 Flowchart for generating counterfactual data;

[0038] Figure 4 Flowchart of the data sampling and training module guided by model preferences. Detailed Implementation

[0039] To gain a deeper understanding of this invention, we will provide a comprehensive and detailed description. However, this invention has various implementations and is not limited to the specific examples listed herein. These examples are presented to enhance a full understanding of the disclosure of this invention.

[0040] This invention proposes a shortcut learning mitigation method for model preference-guided counterfactual data augmentation, such as... Figure 1As shown, this invention evaluates the performance of different models by constructing different training and test sets, quantifying the model's preference for different shortcuts from three dimensions: model prior, learnability, and usability. The enhancement ratio of each shortcut is calculated based on the model's shortcut preference. Counterfactual data generated by LLM is sampled proportionally, and the model is trained to mitigate shortcut learning. Specific steps include:

[0041] Step 1: Determining the types of shortcuts in the target task; Based on the data characteristics of the target task and existing research results on shortcut learning, determine the typical types of shortcuts existing in the target task.

[0042] Specifically, in extractive question answering tasks, models typically need to locate the corresponding answer from a given context based on question information. However, since the training data may contain statistical features that are related to the answer label but lack true semantic association, the model may use these non-causally related features to complete the prediction, thus forming a shortcut learning behavior. This invention describes three types of shortcuts in extractive question answering tasks: the first-sentence shortcut, the question similarity shortcut, and the entity matching shortcut.

[0043] (1) First sentence shortcut (position): This shortcut indicates that the answer has a pseudo-relevance to the first sentence in the context.

[0044] (2) Shortcut in question similarity (word): This shortcut refers to the pseudo-relevance of significant word overlap between questions and answers. We use the number of words shared between the question and the context to represent word overlap.

[0045] (3) Entity matching shortcut (type): This shortcut means that when the entity type of the answer to the question can be explicitly specified, and there is only one entity fragment in the context that matches the type, the model relies on the pseudo-correlation of entity type co-occurrence to extract the answer.

[0046] Step 2: Quantification of model shortcut preferences. For example... Figure 2 As shown, this step includes three stages: model prior, model learnability, and model usability acquisition.

[0047] Step 2.1, model prior acquisition, involves splitting the data into two datasets. Specifically, the definitions are as follows: Given the original dataset... Define a rule-based function for each shortcut k. ,Will Examples of shortcuts that can be solved using shortcut k Examples of non-shortcuts that cannot be solved using shortcut k Define a dataset for multiple shortcuts to coexist. Contains only a single shortcut dataset In datasets containing only a single shortcut, the target shortcut and the correct label are highly co-occurring, while interference from other shortcut features is eliminated. This allows the model's performance on this dataset to be attributed to its sensitivity to a specific shortcut, rather than the mixed effect of multiple shortcut signals.

[0048] The model's prior preference for each shortcut is measured using a test set containing only a single shortcut. Specifically, this is done on the original model without task fine-tuning. For each shortcut Test set evaluation. The F1 score is used as the metric, defining the... The prior preferences for shortcuts are: ; The higher the value, the better the pre-trained model can make predictions using this shortcut, meaning the model has a stronger prior preference for this shortcut.

[0049] Step 2.2, Model Learnability Acquisition; using The training set is used to fine-tune the original model to obtain the model. And in each shortcut corresponding to Evaluation on the test set. The F1 score on the test set is used as the metric, ranking the... The learnability of a shortcut is defined as: ;

[0050] Step 2.3, Model Usability Assessment; in Based on the test set, construct a shortcut selection dataset where multiple shortcuts coexist without interfering with each other. This design simultaneously embeds a first-sentence shortcut and a question similarity shortcut into the context. The first-sentence shortcut is positioned in the first sentence of the context, and the question similarity shortcut in the second sentence. The original context corresponding to the entity matching shortcut is rewritten to describe an unrelated topic, event, or background. It ensures that each of the three shortcuts corresponds to one of three incorrect answers, none of which can be obtained through correct reasoning. Simultaneously, a unique correct answer obtainable through true reasoning exists within the context. This design ensures that the model's output can be explicitly attributed to a specific shortcut strategy or true reasoning ability, thus enabling the detection of shortcut usability. The model is tested on the original training set for the target task. Fine-tuning yields a usability detection model ,exist The reasoning process proceeds. For each sample, based on the answer strategy predicted by the model, it is categorized into one of four types: first-sentence shortcut, similarity shortcut, entity shortcut, or correct reasoning. The selection ratio of each category across the entire test set is calculated, and the [number]th [category] is [number]. The usability of a shortcut is defined as follows: ;in, This indicates the number of times shortcut k is used in the reasoning, where K represents the total number of shortcuts. The higher the value, the more likely the model is to prioritize activating shortcuts in a multi-shortcut competition environment. The correct reasoning category is removed from the denominator calculation, focusing instead on the relative advantages of using quantification shortcuts.

[0051] Step 3: Generating counterfactual data, such as Figure 3 As shown.

[0052] Using Qwen3-plus based on prompts, counterfactual data corresponding to each shortcut is generated. (1) For the first sentence shortcut, while ensuring logical consistency, the first sentence containing the answer is randomly adjusted to another position in the article. (2) For the question similarity shortcut, there are two generation methods: high overlap sentence generation. Let LLM decompose the conditions in the question, including time, action, goal, etc. Identify the entities in the question and modify their attributes. Use as many conditions decomposed from the question as possible to make it as similar to the question as possible. Use LLM for self-verification. If the newly generated sentence can answer the original question, discard the sentence and regenerate it. Synonym replacement generation. Use synonyms to replace words that are repeated in the original sentence to reduce the similarity between the sentence and the original question. Use LLM to verify the semantic consistency between the newly generated sentence and the original sentence. If the new and old sentences are semantically consistent, retain them. (3) For the entity matching shortcut, first determine the named entity type corresponding to the answer (e.g., person, date, place). Extract information related to the topic from the context and generate a sentence. This sentence contains the same named entity type as the answer, but it is not the answer. Using LLM for self-validation, if the newly generated sentence answers the original question, it is discarded and a new sentence is generated. The counterfactual data generated by each shortcut is defined as follows: .

[0053] Step 4: Model preference-guided data sampling and training. For example... Figure 4 As shown, this step includes two stages: data sampling ratio calculation and counterfactual augmentation data sampling and model training.

[0054] Step 4.1, Calculate the data sampling ratio; [The text abruptly ends here, likely due to an incomplete The overall preference for shortcuts is defined as a combination of the product of model priors, learnability, and usability, and normalized to form a probability distribution across all shortcut types: ; The higher the level, the better the model is at shortcuts. The dependence is reflected in three aspects: prior bias, training acquisition, and competitive selection. The greater the comprehensive impact of this shortcut on the robustness of downstream tasks, the greater the impact.

[0055] Step 4.2, Counterfactual Augmentation Data Sampling and Model Training; In the counterfactual data sampling stage, based on Determine the counterfactual data sampling ratio for different shortcuts to ensure that the shortcut types preferred by the model receive more sufficient intervention. Define the counterfactual dataset obtained for each sampling method as follows: : ;

[0056] While ensuring coverage of different articles, samples are drawn from the counterfactual sample sets corresponding to each article according to the aforementioned sampling ratio, and then mixed with the articles corresponding to the original dataset to form a new training set. .

[0057] During the model training phase, the augmented training dataset is utilized. The parameters of the pre-trained model are optimized. Specifically, a low-rank adaptation module (LoRA) is introduced into the model network structure. Only the parameters of the low-rank adaptation module are updated, while the original model parameters remain fixed, in order to reduce the scale of training parameters and the consumption of computational resources.

[0058] To comprehensively evaluate the shortcut learning mitigation method for model preference-guided counterfactual data augmentation proposed in this invention, experiments were conducted on the SQuAD, HOTPOTQA, and TriviaQA datasets using two models, BERT-base and Qwen3-8b. Compared with the baseline, the proposed method improved the F1 score by 1.01% and 1.51%, respectively. The evaluation results are shown in the table below:

[0059] Table 1: Comparison of downstream task performance using different methods

[0060]

[0061] The results show that, in most cases, our method can effectively alleviate shortcut learning and continuously improve the model's out-of-distribution generalization ability.

[0062] Contents not described in detail in this specification are prior art known to those skilled in the art. Although illustrative specific embodiments of the invention have been described above to facilitate understanding by those skilled in the art, it should be understood that the invention is not limited to the scope of the specific embodiments. Various modifications are readily apparent to those skilled in the art as long as they fall within the spirit and scope of the invention as defined and determined by the appended claims, and all inventions utilizing the concept of this invention are protected.

Claims

1. A shortcut learning mitigation method for model preference-guided counterfactual data augmentation, characterized in that, Includes the following steps: Step 1: Determine the types of candidate shortcuts in the target task; Step 2: Quantify the model’s preference for each shortcut type from three dimensions: model prior, shortcut learnability, and shortcut usability, to obtain model shortcut preference information; Step 3: Generate corresponding counterfactual augmentation data for different shortcut types; Step 4: Based on the model shortcut preference information, determine the sampling ratio of counterfactual augmentation data corresponding to different shortcut types, sample counterfactual augmentation data according to the sampling ratio and mix it with the original training data to train the target model to alleviate shortcut learning.

2. The method according to claim 1, characterized in that, In step 2, quantifying the model's preference for shortcuts from the model prior dimension includes: for each candidate shortcut type, constructing a single shortcut test set containing only the features of that shortcut, inputting it into the untrained original model for prediction, and calculating the model's response to each shortcut feature in the initial state based on the performance difference of the model on different shortcut test sets, thereby obtaining the model's prior to shortcuts. Quantifying the model's preference for shortcuts from the perspective of shortcut learnability includes: constructing a multi-shortcut coexistence training set containing multiple shortcut features, fine-tuning the original model, and evaluating it on a single shortcut test set. By comparing the model's ability to capture different shortcut features after training, the ease with which different shortcut features are learned by the model is quantified, and the learnability of the model for each shortcut is obtained. Quantifying the model's preference for shortcuts from the perspective of shortcut usability includes: fine-tuning the model using the original dataset of the target task, constructing a test set in which multiple shortcuts coexist without interfering with each other, calculating the model's preference for different shortcut features in the actual decision-making stage based on the number of shortcut features relied upon by the model during the prediction process, and obtaining the model's usability for each shortcut.

3. The method according to claim 1, characterized in that, In step 3, generating corresponding counterfactual augmentation data includes: designing corresponding counterfactual generation prompt templates for different shortcut types; The original samples are input into a large language model, and the target shortcut features are controlled to change while maintaining the consistency of the task semantic information, thereby generating counterfactual augmented data corresponding to different shortcut types.

4. The method according to claim 1, characterized in that, Determining the sampling ratio in step 4 includes: The model prior preference, learnability, and usability of the k-th shortcut are multiplied and combined to obtain the comprehensive preference value of the shortcut. The overall preference values ​​for all shortcut types are normalized to form a probability distribution, which serves as the sampling ratio for counterfactual augmentation data corresponding to each shortcut type.

5. The method according to claim 1, characterized in that, The target task is an extractive question-answering task, and the candidate shortcut types include at least one of the following: The "first-sentence shortcut" indicates that the answer has a false relevance to the first sentence in the context. The question similarity shortcut indicates a pseudo-relevance between questions and answers due to lexical overlap. The entity matching shortcut means that when the entity type of the answer to a question can be explicitly specified and there is only one entity fragment in the context that matches that type, the model relies on the pseudo-correlation of entity type co-occurrence to extract the answer.

6. The method according to claim 2, characterized in that, The construction of a multi-shortcut coexistence training set containing multiple shortcut features and a single-shortcut test set containing only the shortcut feature includes: Define a rule-based classification function for each shortcut to divide the original dataset into shortcut examples that can be solved using the shortcut and non-shortcut examples that cannot be solved using the shortcut; By performing an intersection operation on the shortcut examples corresponding to each shortcut, a multi-shortcut coexistence training set containing multiple shortcut features is obtained. The intersection of shortcut examples of the target shortcut and non-shortcut examples of other shortcuts is performed to obtain a single shortcut test set that contains only the features of the target shortcut and excludes the interference of features of other shortcuts.

7. The method according to claim 2, characterized in that, The test set for constructing multiple shortcuts that coexist without interfering with each other includes: Multiple shortcut features are simultaneously implanted in the same context sample. Each shortcut feature corresponds to a different incorrect answer, and the answer cannot be obtained through correct reasoning for each shortcut feature. In the context sample, a unique correct answer that can be obtained through correct reasoning is simultaneously set.

8. The method according to claim 1, characterized in that, The target model trained in step 4 includes: Introduce the low-rank adaptation module into the network structure of the target model; The parameters of the low-rank adaptation module are updated using the hybrid enhanced training set, while keeping the original parameters of the target model fixed.