# Label-Guided Data Augmentation for Chinese Named Entity Recognition
## 3 Primary Definition and Model Architecture  
To formalize the problem under study, we provide a mathematical description following the conventions of prior research [26; 27; 28]. NER is treated as a sequence-labeling task. Given an input sentence \(X=\{x_{1},x_{2},\ldots,x_{n}\}\), the model predicts a label sequence \(Y=\{y_{1},y_{2},\ldots,y_{n}\}\), where each label \(y_{i}\) corresponds to the characters \(x_{i}\) and \(y_{i}\in\mathbb{R}\). The predefined set of label types is denoted by \(S=\{s_{1},s_{2},\ldots,s_{t}\}\), where \(t\) is the total number of label types. The label types vary depending on the domain; for instance, general domains may include entities such as person names, locations, and organizations, whereas medical domains might use categories like diseases, symptoms, and medications. In low-resource settings, each label category contains only a limited number of annotated samples, poschallenges for effective supervised training. In addition, we employ the BIO (Beginning, Inside, Outside) tagging scheme to predict the label of each token. Specifically, each token is classified as \"B-entity_type\" to denote the beginning of an entity, \"I-entity_type\" to indicate the inside of an entity, or \"O\" to signify that the token is outside any entity. The NER process is mathematically expressed in Equation (1):  
\[\hat{y}=\arg\max_{j}(\text{softmax}(f(x_{i}))), \tag{1}\]  
where \(f(\cdot)\) denotes the model, \(x_{i}\) represents the input character, and \(\hat{y}\) is the predicted output. It is worth noting that if the probabilities of multiple categories output by softmax are equal, the model will randomly select one.  
Existing Chinese NER models that incorporate data augmentation methods encounter several challenges, including entity label misalignment in the augmented samples, insufficient utilization of label semantic information, and neglect of long-tail distribution issues in low-resource scenarios. To address these limitations, we propose LGDA, a novel Chinese NER model based on Label-Guided Data Augmentation. The overall framework of LGDA is illustrated in Figure 1. The model comprises three core components: a data augmentation module, a label semantic fusion module, and an optimized loss function.  
Specifically, the LGDA model operates in two stages. In the first stage, a masked entity generation language model is used to enhance sample data, and label annotations guide the model to learn improved sample representations for NER. Data augmentation is achieved by embedding entity labels linearly in the original samples to sharpen the boundaries of Chinese entities (see Section 4.1.1). The masked identifiers are then applied to cover the original entities, replacing them with newly generated ones, thereby expanding the training set (see Section 4.1.2). In the second stage, label annotations are introduced as additional domain-specific prior knowledge and incorporated into the model alongside the augmented and original samples. To integrate label semantics, two parameter-sharing twin encoders encode the samples and label annotations (see Section 4.2.1), with a cross-attention mechanism for fusion (see Section 4.2.2). This approach guides the model to learn sample representations enriched with the semantic information of the labels. To address the long-tail distribution problem in low-resource scenarios, the training loss function is optimized to adaptively assign higher weights to samples from less distinguishable classes (see Section 4.3).  
Figure 1: The framework of proposed LGDA model.