A method and device for noisy named entity recognition based on debiasing

By decoupling learning and designing the named entity recognition model structure, and using auxiliary pseudo-classification layers and debiased boundary loss functions, the distribution bias and confirmation bias problems in noisy named entity recognition are solved, and the recognition accuracy and efficiency of the model are improved, especially the recognition ability of important fine-grained entity categories.

CN116227494BActive Publication Date: 2025-09-16ZHEJIANG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310351515.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-03
Publication Date
2025-09-16
Estimated Expiration
2043-04-03

AI Technical Summary

Technical Problem

Existing named entity recognition technology suffers from distribution bias and confirmation bias when faced with noisy data, resulting in the model's insufficient ability to recognize important fine-grained entity categories. In addition, the training of the semi-supervised learning framework is unstable, affecting recognition accuracy and efficiency.

Method used

A decoupled learning method is used to decompose the training data into a binary sample set of non-entity and entity and a fine-grained entity class sample set. The named entity recognition model structure is designed, and an auxiliary pseudo-classification layer and a debiased boundary loss function are used to decouple pseudo-label generation and use, alleviate confirmation bias, and screen clean fine-grained entity class samples.

Benefits of technology

It improves the accuracy and efficiency of noisy named entity recognition, effectively alleviates distribution bias and confirmation bias, and improves the model's ability to recognize important fine-grained entity categories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116227494B_ABST
    Figure CN116227494B_ABST
Patent Text Reader

Abstract

The present invention discloses a noisy named entity recognition method and device based on debiasing, comprising: performing word segmentation on a training text sequence, and then converting its label sequence to obtain a binary label sequence and a fine-grained entity class label sequence; constructing a named entity recognition model, and obtaining a clean binary sample set, an unlabeled binary sample set, a clean fine-grained entity class sample set, and an unlabeled fine-grained entity class sample set; at the same time, following a semi-supervised learning framework, training the named entity recognition model based on the clean binary sample set, the unlabeled binary sample set, the clean fine-grained entity class sample set, and the unlabeled fine-grained entity class sample set, calculating the loss function of each classification layer, and updating the parameters of the named entity recognition model based on the stochastic gradient descent method; finally, obtaining the trained named entity recognition model, and then performing noisy named entity recognition on a test text sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of noisy named entity recognition, and in particular to a noisy named entity recognition method and device based on debiasing. Background Art

[0002] Named entity recognition (NER) is a typical sequence labeling task and is fundamental to many natural language processing applications, such as information extraction, question answering, and machine translation. It aims to locate named entities in text and classify them into predefined entity categories, such as names of people, places, and organizations. In recent years, deep learning and pretrained language models (PLMs) have been applied to NER, achieving state-of-the-art performance. However, this typically requires a large amount of high-quality training data. Given the high cost of data labeling, distant supervision techniques have introduced external knowledge bases and employed simple matching strategies to automatically label entities in text, significantly reducing the time required for manual labeling. While this labeling approach is highly efficient, due to the limited coverage of the knowledge base, the generated distant labels are prone to noisy annotations. Therefore, addressing the problem of noisy named entity recognition is crucial. A typical approach, inspired by traditional noisy learning, mitigates the impact of noise by selecting the cleanest possible examples as labeled data for classification training. The remaining noisy examples are treated as unlabeled data, and pseudo-labels are regenerated based on the model's predictions. Although this semi-supervised learning framework has achieved great success in the field of noisy image classification, the following problems still exist when it is applied to the field of noisy named entity recognition:

[0003] First, named entity recognition benchmark datasets suffer from distribution bias. Even in noisy scenarios with distant supervision, the number of clean non-entity word-level samples far exceeds the number of clean entity word-level samples. Furthermore, within the entity sample set, for various fine-grained entity categories, there is still a class imbalance between entity category samples. Existing clean sample screening methods are therefore susceptible to this distribution bias, tending to select the majority of clean non-entity word-level samples while ignoring the minority of more important fine-grained entity category word-level samples, especially those entity categories that are relatively scarce in number. Therefore, ignoring the distribution bias in noisy named entity recognition datasets is detrimental to the model's ability to screen and learn more important fine-grained entity categories, thereby affecting its named entity recognition capabilities. To alleviate this problem, a method is needed that can address the impact of distribution bias and screen as many clean fine-grained entity category samples as possible from highly imbalanced data.

[0004] Second, although semi-supervised learning frameworks are generally considered efficient, their training is often unstable. In addition to the distribution bias in the source data mentioned earlier, using unreliable pseudo-labels generated by model predictions for training often leads to confirmation bias. This is because the generation and use of pseudo-labels are usually implemented through the same or dependent network modules. Therefore, potential errors in pseudo-labels are almost impossible to self-correct, and will gradually accumulate and amplify existing confirmation biases during training, thereby endangering model performance, reducing generalization ability, and may in turn affect the important sample screening step. In particular, the labeled sample set dynamically constructed based on clean sample screening will inevitably introduce some noisy samples, which will further aggravate this adverse effect. Therefore, methods based on this semi-supervised learning framework urgently need to alleviate the problem of confirmation bias. The core is to correctly handle the generation and use of pseudo-labels. Summary of the Invention

[0005] In view of the deficiencies in the prior art, the present invention aims to provide a method and device for noisy named entity recognition based on debiasing.

[0006] The present invention provides the following technical solutions:

[0007] According to a first aspect of an embodiment of the present invention, a method for noisy named entity recognition based on debiasing is provided, the method specifically comprising the following steps:

[0008] (1) Perform word segmentation on the text sequence, and then convert the label sequence corresponding to the text sequence into a binary label sequence and a fine-grained entity class label sequence;

[0009] (2) constructing a named entity recognition model, wherein the named entity recognition model includes an encoder configured based on a RoBERTa pre-trained model, a binary classification layer, and a fine-grained entity class classification layer; inputting a text sequence into the encoder configured based on the RoBERTa pre-trained model to obtain a word vector representation, and then inputting the word vector representation into the binary classification layer and the fine-grained entity class classification layer respectively to obtain a binary classification prediction probability and a fine-grained entity class classification prediction probability; and,

[0010] The sample screening is performed by judging whether the labeling is correct based on the binary classification prediction probability and the fine-grained entity class prediction probability, and obtaining a clean binary sample set, an unlabeled binary sample set, a clean fine-grained entity class sample set, and an unlabeled fine-grained entity class sample set;

[0011] (3) The named entity recognition model is trained based on a semi-supervised learning framework. The unlabeled binary sample set and the unlabeled fine-grained entity class sample set are pseudo-labeled according to the binary classification prediction probability and the fine-grained entity class classification prediction probability respectively. The binary classification layer and the fine-grained entity class classification layer are trained respectively by the clean binary sample set and the clean fine-grained entity class sample set. The auxiliary pseudo-classification layer corresponding to the binary classification layer is trained by the clean binary sample set and the unlabeled binary sample set with pseudo labels. The auxiliary pseudo-classification layer corresponding to the fine-grained entity class classification layer is trained by the clean fine-grained entity class sample set and the unlabeled fine-grained entity class sample set with pseudo labels. The loss function of each classification layer is calculated, and the parameters of the named entity recognition model are updated based on the stochastic gradient descent method.

[0012] (4) Use the named entity recognition model trained in step (3) to perform noisy named entity recognition.

[0013] According to a second aspect of an embodiment of the present invention, a noisy named entity recognition apparatus based on debiasing is provided, comprising one or more processors for implementing the above-mentioned noisy named entity recognition method based on debiasing.

[0014] According to a third aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which a program is stored. When the program is executed by a processor, it is used to implement the above-mentioned debiasing-based noisy named entity recognition method.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention proposes a noisy named entity recognition method based on debiasing, firstly, the original training data and the noisy learning task are decomposed into two parts through decoupling learning, respectively dealing with the noise label problem in the binary sample set of non-entity and entity and the fine-grained entity class sample set, and redesigning the corresponding named entity recognition model structure for this purpose, which can screen as many clean fine-grained entity class samples as possible under the influence of the distribution bias of the data. Secondly, the present invention adopts a semi-supervised learning framework. For the confirmation bias existing in such a framework, the present invention proposes to use an auxiliary pseudo-classification layer to simultaneously train clean samples and pseudo-labeled noise samples, thereby decoupling the generation and use of pseudo-labels, and introducing a debiased boundary loss function, which can alleviate the confirmation bias existing in the semi-supervised learning framework to a certain extent, thereby improving the accuracy and efficiency of noisy named entity recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 This is a flowchart of a debiased noisy named entity recognition method provided by the present invention;

[0018] Figure 2 It is a flowchart of text data disassembly in the present invention;

[0019] Figure 3 1 is an overall architecture diagram of a debiased noisy named entity recognition method according to an embodiment of the present invention;

[0020] Figure 4 is a schematic diagram of prediction using a trained named entity recognition model in an embodiment of the present invention;

[0021] Figure 5 This is a schematic diagram of a noisy named entity recognition device based on debiasing provided by the present invention. DETAILED DESCRIPTION

[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0023] It should be noted that, unless there is any conflict, the features in the following embodiments and implementations may be combined with each other.

[0024] like Figure 1 and Figure 2 As shown, the present invention provides a noisy named entity recognition method based on debiasing, the method comprising the following steps:

[0025] Step (1): Perform word segmentation on the text sequence, and then convert the label sequence corresponding to the text sequence into a binary label sequence and a fine-grained entity class label sequence.

[0026] Specifically, the step (1) includes the following sub-steps:

[0027] Step (1.1): Perform word segmentation on the text sequence to obtain the word segmented text sequence and its corresponding label sequence (X, Y), where the text sequence X is composed of multiple word-level samples, that is, X = [x1, x2, ..., x n ]; the label sequence Y gives the remote labels corresponding to each word-level sample, that is, Y = [y1, y2, ..., y n ], and y i∈{0,1,...,C}, where 0 represents non-entity and 1~C represent C types of fine-grained entity classes.

[0028] Step (1.2) converts the label sequence Y into binary labels of non-entity and entity to obtain a binary label sequence Mask the non-entity labels in the label sequence Y and transform them to obtain a fine-grained entity class label sequence Thus constructing a binary text sequence label pair (X,Y b ) and fine-grained entity class text sequence label pairs (X,Y e ).

[0029] Step (2): constructing a named entity recognition model, wherein the named entity recognition model includes an encoder configured based on the RoBERTa pre-training model, a binary classification layer, and a fine-grained entity class classification layer; inputting the text sequence into the encoder configured based on the RoBERTa pre-training model to obtain a word vector representation, and then inputting the word vector representation into the binary classification layer and the fine-grained entity class classification layer respectively to obtain a binary classification prediction probability and a fine-grained entity class classification prediction probability; and,

[0030] Sample screening is performed by judging whether the labeling is correct based on the binary classification prediction probability and the fine-grained entity class prediction probability, and obtaining a clean binary sample set, an unlabeled binary sample set, a clean fine-grained entity class sample set, and an unlabeled fine-grained entity class sample set.

[0031] Furthermore, if Figure 2 As shown, the step (2) specifically includes the following sub-steps:

[0032] Step (2.1): Construct a named entity recognition model, which includes an encoder configured based on the RoBERTa pre-training model, a binary classification layer, and a fine-grained entity class classification layer.

[0033] Step (2.2): Input the text sequence X into the named entity recognition model constructed in step (2.1), first obtain the word vector representation through the encoder φ, and then input the word vector representation into the two-classification layer h b and fine-grained entity category classification layer h e , get the binary classification prediction probability p b and fine-grained entity class classification prediction probability p e , where p b =sigmoid(h b (φ(X))), p e =softmax(h e (φ(X))); and the binary prediction label sequence and fine-grained entity category prediction label sequence in, and

[0034] Step (2.3): Sample screening is performed by judging whether the labeling is correct based on the binary classification prediction probability and the fine-grained entity class prediction probability, and obtaining a clean binary sample set, an unlabeled binary sample set, a clean fine-grained entity class sample set, and an unlabeled fine-grained entity class sample set.

[0035] For a clean binary sample set, the following screening conditions are met:

[0036]

[0037] Where II(·) represents the indicative function, and is the binary prediction probability p b The i-th item of represents the probability that the i-th word-level sample is an entity sample. Similarly, the cleaned fine-grained entity class sample set satisfies the following conditions:

[0038]

[0039] in, is the fine-grained entity class prediction probability p e The i-th item of represents the fine-grained entity class prediction probability of the i-th word-level sample.

[0040] The remaining unscreened samples constitute the unlabeled binary sample set and unlabeled fine-grained entity class sample sets

[0041] Step (3): Train the named entity recognition model based on the semi-supervised learning framework, pseudo-label the unlabeled binary sample set and the unlabeled fine-grained entity class sample set according to the binary classification prediction probability and the fine-grained entity class classification prediction probability respectively, train the binary classification layer and the fine-grained entity class classification layer respectively with the clean binary sample set and the clean fine-grained entity class sample set, train the auxiliary pseudo-classification layer corresponding to the binary classification layer with the clean binary sample set and the pseudo-labeled unlabeled binary sample set, train the auxiliary pseudo-classification layer corresponding to the fine-grained entity class classification layer with the clean fine-grained entity class sample set and the pseudo-labeled unlabeled fine-grained entity class sample set, calculate the loss function of each classification layer, and update the parameters of the named entity recognition model based on the stochastic gradient descent method.

[0042] Furthermore, the step (3) specifically includes the following sub-steps:

[0043] Step (3.1): Input the word vector representation corresponding to the original text sequence X into the binary classification layer h b and fine-grained entity category classification layer h eThe respective auxiliary pseudo-classification layers h b ' and h e ', and then output the pseudo prediction probability p of the two-class layer of the text sequence b’ and the fine-grained entity category classification layer pseudo prediction probability p e’ , where p b′ =sigmoid(h b '(φ(X))), and p e′ =softmax(h e '(φ(X))), and obtain the binary pseudo-prediction label sequence inferred from the pseudo-prediction probability and fine-grained entity class pseudo-prediction label sequence

[0044] Step (3.2): For the clean binary sample set In the binary classification layer h b The supervised loss is calculated using the binary cross entropy loss The expression is as follows:

[0045]

[0046]

[0047] In the auxiliary pseudo binary classification layer h b 'Use clean binary sample sets at the same time and unlabeled binary sample sets Calculating supervised loss And calculate the loss on the unlabeled binary sample set The expression is as follows:

[0048]

[0049] in, It is the model's predicted label for binary unlabeled samples, that is, binary pseudo label.

[0050] Step (3.3): Targeting a clean set of fine-grained entity category samples At the fine-grained entity category classification layer h e The supervised loss is calculated using the cross entropy loss The expression is as follows:

[0051]

[0052]

[0053] in, Indicates the probability that the i-th word-level sample belongs to the j-th fine-grained entity class. However, in order to learn a well-calibrated fine-grained entity class classification layer, the present invention uses a debiased boundary loss l DML Replace the classic cross entropy loss l ce , the expression is as follows:

[0054]

[0055] Among them, f e (x i ) is h e The i-th item of (φ(X)) represents the output distribution of the fine-grained entity classification layer of the i-th word-level sample, It means that the i-th word-level sample belongs to the j-th entity class of the fine-grained entity class classification layer output, α is an optimization parameter that controls the debiasing strength, and π is the estimated potential fine-grained entity class distribution.

[0056] The fine-grained entity class distribution π is composed of the clean fine-grained entity distribution π l and unlabeled fine-grained entity class distribution π u composition.

[0057] Clean set of fine-grained entity category samples in each mini-batch Calculate π l , the expression is as follows:

[0058]

[0059] Among them, m∈[0,1) is a momentum coefficient, onehot(·) means converting the label into a one-hot encoding form;

[0060] Unlabeled fine-grained entity class sample set in each mini-batch Calculate π u , the expression is as follows:

[0061]

[0062] In the auxiliary pseudo fine-grained entity classification layer h e 'Use clean and fine-grained entity class sample sets at the same time and unlabeled fine-grained entity class sample sets Monitoring losses And calculate the loss on the unlabeled fine-grained entity classification sample set The expression is as follows:

[0063]

[0064] in, It is the predicted label of the named entity recognition model for the unlabeled fine-grained entity classification sample, that is, the fine-grained entity class pseudo label.

[0065] Step (3.4): Calculate the global loss function And the stochastic gradient descent method is used to update the named entity recognition model.

[0066] Step (4): Use the named entity recognition model trained in step (3) to perform noisy named entity recognition.

[0067] Specifically, the step (4) includes the following sub-steps:

[0068] Step (4.1): For the text sequence to be tested and its corresponding label (X, Y), the text sequence X is preprocessed by word segmentation, and then the preprocessed text sequence is input into the trained named entity recognition model. The dual classification layer of the named entity recognition model outputs two prediction probabilities p for the text sequence respectively. b and p e .

[0069] Step (4.2): For any word-level sample x in the text sequence X i , calculate its final mixed prediction probability p i ,

[0070]

[0071] Its final predicted label and

[0072] Example 1:

[0073] The following is an example of a single sentence, and refer to Figure 3 and Figure 4. Given the training text sequence "EU rejectsGerman call to boycott British lamb.", the corresponding remote entity label is "B-ORG OOOOOB-ORG OO", the label "O" indicates that the word-level sample is a non-entity, while "EU" corresponds to "B-ORG", indicating that it is an organization name entity (correct label), and "rejects German call to boycott" corresponds to "OOOOO", indicating no entity (wrong label). Note that in fact the labels of "German" and "British" are noisy (incorrectly labeled as non-entities "O" and "B-ORG"), and the real labels should both be "B-MISC", that is, other types of entities. Given another test text sequence "Rugby Union-Cuttitta back for Italy after a year."

[0074] Step (1): Segment the training text sequence to obtain word-level sample vectors [“EU”, “rejects”, “German”, “call”, “to”, “boycott”, “British”, “lamb”, “.”] and label sequence [“B-ORG”, “O”, “O”, “O”, “O”, “B-ORG”, “O”, “O”], and then convert the label sequence to obtain two label sequences, binary sequence [“I”, “O ”, “O”, “O”, “O”, “I”, “O”, “O”] (where “I” represents any type of entity) and fine-grained entity class sequences [“B-ORG”, “[invalid]”, “[invalid]”, “[invalid]”, “[invalid]”, “[invalid]”, “B-ORG”, “[invalid]”, “[invalid]”], and preprocess the text and label sequences by converting them into digital sequences.

[0075] Step (2): constructing a named entity recognition model, wherein the named entity recognition model includes an encoder configured based on the RoBERTa pre-training model, a binary classification layer, and a fine-grained entity class classification layer; inputting the text sequence into the encoder configured based on the RoBERTa pre-training model to obtain a word vector representation, and then inputting the word vector representation into the binary classification layer and the fine-grained entity class classification layer respectively to obtain a binary classification prediction probability and a fine-grained entity class classification prediction probability; and,

[0076] The sample screening is performed by judging whether the labeling is correct based on the binary classification prediction probability and the fine-grained entity class prediction probability, and obtaining a clean binary sample set, an unlabeled binary sample set, a clean fine-grained entity class sample set, and an unlabeled fine-grained entity class sample set;

[0077] Specifically, the clean binary sample set screened and constructed by the binary classification layer The unscreened samples {“German”} construct an unlabeled binary sample set The fine-grained entity classification layer filters and constructs a clean set of fine-grained entity samples Unlabeled fine-grained entity class sample set Note that samples labeled “[invalid]” are not filtered and are not used to construct the unlabeled fine-grained entity class sample set.

[0078] Step (3): Train the named entity recognition model based on a semi-supervised learning framework, pseudo-label the unlabeled binary sample set and the unlabeled fine-grained entity class sample set according to the binary classification prediction probability and the fine-grained entity class classification prediction probability, respectively, train the binary classification layer and the fine-grained entity class classification layer using the clean binary sample set and the clean fine-grained entity class sample set, respectively, train the auxiliary pseudo-classification layer corresponding to the binary classification layer using the clean binary sample set and the unlabeled binary sample set with pseudo-labels, train the auxiliary pseudo-classification layer corresponding to the fine-grained entity class classification layer using the clean fine-grained entity class sample set and the unlabeled fine-grained entity class sample set with pseudo-labels, calculate the loss function of each classification layer, and update the parameters of the named entity recognition model based on the stochastic gradient descent method;

[0079] Step (4): Finally, the trained named entity recognition model is obtained, and then noisy named entity recognition is performed on the test text sequence.

[0080] Specifically, the test text sequence is segmented to obtain word-level sample vectors [“Rugby”, “Union”, “-”, “Cuttitta”, “back”, “for”, “Italy”, “after”, “a”, “year”, “.”], and the mixed prediction probability is calculated for each word-level sample, based on which the final prediction label is determined, [“B-ORG”, “I-ORG”, “O”, “B-PER”, “O”, “O”, “B-LOC”, “O”, “O”, “O”, “O”].

[0081] Corresponding to the aforementioned embodiment of the noisy named entity recognition method based on debiasing, the present invention also provides an embodiment of a noisy named entity recognition device based on debiasing.

[0082] See also Figure 5An embodiment of the present invention provides a noisy named entity recognition device based on debiasing, which includes one or more processors for implementing the noisy named entity recognition method based on debiasing in the above embodiment.

[0083] The embodiment of the debiased noisy named entity recognition device of the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capabilities in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory for execution. From the hardware level, if Figure 5 As shown in the figure, it is a hardware structure diagram of any device with data processing capability where the debiased noisy named entity recognition device of the present invention is located. Figure 5 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiment is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.

[0084] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0085] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present invention. A person of ordinary skill in the art can understand and implement the present invention without inventive work.

[0086] An embodiment of the present invention further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the noisy named entity recognition method based on debiasing in the above embodiment is implemented.

[0087] The computer-readable storage medium may be an internal storage unit of any device with data processing capabilities described in any of the aforementioned embodiments, such as a hard disk or memory. The computer-readable storage medium may also be any device with data processing capabilities, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of any device with data processing capabilities and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and may also be used to temporarily store data that has been output or is to be output.

[0088] The embodiments described above are only intended to illustrate the technical solutions of the present invention, but are not intended to limit the present invention. A person skilled in the art may modify or alter the technical solutions of the present invention without departing from the principles and scope of the present invention. The scope of protection of the present invention shall be subject to the claims.

Claims

1. A noisy named entity recognition method based on debiasing, characterized in that: The following steps are involved: (1) Perform word segmentation on the text sequence, and then convert the label sequence corresponding to the text sequence into a binary label sequence and a fine-grained entity class label sequence; (2) constructing a named entity recognition model, wherein the named entity recognition model includes an encoder configured based on a RoBERTa pre-trained model, a binary classification layer, and a fine-grained entity class classification layer; inputting a text sequence into the encoder configured based on the RoBERTa pre-trained model to obtain a word vector representation, and then inputting the word vector representation into the binary classification layer and the fine-grained entity class classification layer respectively to obtain a binary classification prediction probability and a fine-grained entity class classification prediction probability; and, The sample screening is performed by judging whether the labeling is correct based on the binary classification prediction probability and the fine-grained entity class prediction probability, and obtaining a clean binary sample set, an unlabeled binary sample set, a clean fine-grained entity class sample set, and an unlabeled fine-grained entity class sample set; (3) The named entity recognition model is trained based on a semi-supervised learning framework. The unlabeled binary sample set and the unlabeled fine-grained entity class sample set are pseudo-labeled according to the binary classification prediction probability and the fine-grained entity class classification prediction probability respectively. The binary classification layer and the fine-grained entity class classification layer are trained respectively by the clean binary sample set and the clean fine-grained entity class sample set. The auxiliary pseudo-classification layer corresponding to the binary classification layer is trained by the clean binary sample set and the unlabeled binary sample set with pseudo labels. The auxiliary pseudo-classification layer corresponding to the fine-grained entity class classification layer is trained by the clean fine-grained entity class sample set and the unlabeled fine-grained entity class sample set with pseudo labels. The loss function of each classification layer is calculated, and the parameters of the named entity recognition model are updated based on the stochastic gradient descent method. (4) Use the trained named entity recognition model to perform noisy named entity recognition.

2. A debiased noisy named entity recognition method according to claim 1, characterized in that: The step (1) includes the following sub-steps: (1.1) Perform word segmentation on the text sequence to obtain the word segmented text sequence and its corresponding label sequence (X, Y), where the text sequence X is composed of multiple word-level samples, that is, X = [x1, x2, ..., x n ]; the label sequence Y gives the remote labels corresponding to each word-level sample, that is, Y = [y1, y2, ..., y n ], and y i ∈{0,1,...,C}, where 0 represents non-entity and 1~C represent C types of fine-grained entity classes; (1.2) Convert the label sequence Y into a binary label sequence of non-entity and entity Mask the non-entity labels in the label sequence Y and transform them to obtain a fine-grained entity class label sequence 3. The method for noisy named entity recognition based on debiasing according to claim 1, characterized in that: Step (2) includes the following sub-steps: (2.1) constructing a named entity recognition model, wherein the named entity recognition model includes an encoder configured based on the RoBERTa pre-trained model, a binary classification layer, and a fine-grained entity class classification layer; (2.2) Input the text sequence X into the named entity recognition model constructed in step (2.1), first pass it through the encoder φ to obtain the word vector representation, and then input the word vector representation into the two-classification layer h b and fine-grained entity category classification layer h e , get the binary classification prediction probability p b and fine-grained entity class classification prediction probability p e , where p b =sigmoid(h b (φ(X))), p e =softmax(h e (φ(X))); and the binary prediction label sequence and fine-grained entity category prediction label sequence in, and (2.3) Sample screening is performed by judging whether the labeling is correct based on the binary classification prediction probability and the fine-grained entity class prediction probability, thereby obtaining a clean binary sample set, an unlabeled binary sample set, a clean fine-grained entity class sample set, and an unlabeled fine-grained entity class sample set; Among them, the expression of the clean binary sample set is: in, represents the indicative function, and is the binary prediction probability p b The i-th item of is the probability that the i-th word-level sample is an entity sample, and τ is a custom prediction probability threshold; The expression of the clean fine-grained entity class sample set is: in, is the fine-grained entity class prediction probability p e The i-th item is the fine-grained entity category prediction probability of the i-th word-level sample; the remaining unscreened samples constitute the unlabeled binary sample set and unlabeled fine-grained entity class sample sets 4. The method for noisy named entity recognition based on debiasing according to claim 1, characterized in that: The step (3) includes the following sub-steps: (3.1) Input the word vector representation corresponding to the original text sequence X into the binary classification layer h b and fine-grained entity category classification layer h e Respective auxiliary pseudo-classification layers h′ b and h′ e , and then output the pseudo prediction probability p of the two-class layer of the text sequence b′ and the pseudo prediction probability p of the fine-grained entity category classification layer e′ , where p b′ =sigmoid(h ′ b (φ(X))), and p e′ =softmax(h′ e (φ(X))); (3.2) For the clean binary sample set In the binary classification layer h b The supervised loss is calculated using the binary cross entropy loss The expression is as follows: In the auxiliary pseudo binary classification layer h′ b Using clean binary sample sets and unlabeled binary sample sets Calculating supervised loss And calculate the loss on the unlabeled binary sample set The expression is as follows: in It is the predicted label of the named entity recognition model for the binary unlabeled sample, that is, the binary pseudo label; (3.3) For clean fine-grained entity category sample sets At the fine-grained entity category classification layer h e The supervised loss is calculated using the cross entropy loss The expression is as follows: in, represents the probability that the i-th word-level sample belongs to the j-th fine-grained entity class; Among them, f e (x i ) is h e The i-th item of (φ(X)) is the output distribution of the fine-grained entity classification layer of the i-th word-level sample, It means that the i-th word-level sample belongs to the j-th entity class of the fine-grained entity class classification layer output, α is the optimization parameter that controls the debiasing strength, and π is the fine-grained entity class distribution; In the auxiliary pseudo fine-grained entity classification layer h′ e Using clean and fine-grained entity class sample sets and unlabeled fine-grained entity class sample sets Monitoring losses And calculate the loss on the unlabeled fine-grained entity classification sample set The expression is as follows: in, It is the predicted label of the named entity recognition model for the unlabeled fine-grained entity classification sample, that is, the fine-grained entity class pseudo label; (3.4) Calculate the global loss function And the parameters of the named entity recognition model are updated using stochastic gradient descent.

5. A debiased noisy named entity recognition method according to claim 4, characterized in that: Obtaining fine-grained entity class distribution π includes: The fine-grained entity class distribution π is composed of the clean fine-grained entity distribution π l and unlabeled fine-grained entity class distribution π u composition; In the clean fine-grained entity category sample set Calculate π l , the expression is as follows: Among them, m∈[0,1) is a momentum coefficient, onehot(·) means converting the label into a one-hot encoding form; In the unlabeled fine-grained entity class sample set Calculate π u , the expression is as follows:

6. The method for noisy named entity recognition based on debiasing according to claim 1, characterized in that: The step (4) includes the following sub-steps: (4.1) For the text sequence to be tested and its corresponding label (X, Y), the text sequence X is segmented, and then the segmented text sequence is input into the trained named entity recognition model to obtain the binary classification prediction probability p b and fine-grained entity class classification prediction probability p e ; (4.2) For any word-level sample x in the text sequence X i , calculate its final mixed prediction probability p i , Final predicted label and 7. A noisy named entity recognition device based on debiasing, characterized in that: The method comprises one or more processors for implementing the noisy named entity recognition method based on debiasing according to any one of claims 1 to 6.

8. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, it is used to implement the noisy named entity recognition method based on debiasing according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Bidding data named entity recognition method based on pre-training model

    CN113283244A

  • Named entity recognition method and device, equipment and storage medium

    CN115713082A