# Multi-Feature Fusion Method for Chinese Pesticide Named Entity Recognition
## 4 Method
### CRF Layer  
Conditional random fields (CRF) [26] is a discriminative probabilistic model based on an undirected graphical model. CRF generally assumes that the random output variables form a Markov random field. In order to make the classifier perform better, the adjacent data information is considered when labeling the data. Linear chain CRFs are often used to solve the sequence labeling problem. The observation sequence is the input, and the output is the annotation sequence. The conditional probability model is obtained by regularized maximum likelihood estimation.  
The output vector of the IDCNN model \(C=[c_{1},c_{2},\cdots,c_{t},\cdots,c_{n}]\) is sent to CRF [27] for decoding, and the specific calculation is as shown in Formula (12):  
\[y_{i}=\text{argmax}\frac{\exp(W_{c}\cdot c_{t}+b_{c})}{\sum_{y_{i-1}y_{i}}\exp (W_{c}\cdot c_{t})+b_{c}},(y_{i}\in B) \tag{12}\]  
Figure 4: Dilated convolution IDCNN model.  
where \(y_{i}\) is the corresponding prediction tag for \(x_{i}\), \(W_{c}\) is a trainable parameter, which is obtained by random initialization at the beginning of the training procedure and is optimized in training. The bias parameter \(b_{c}\) is a bias parameter and is not involved in training.  
The feature of dependence distribution among words in the labeled sequence is conducive to CRF fitting training data and reducing the probability of illegal sequences in labeled sequence prediction. The prediction of the tag for each word can be regarded as a classification task. For classification, the contextual features and long-distance dependence of the text should be taken into account. CRF obtains the score of a labeled sequence through the state transition matrix and obtains the global optimal sequence based on the comprehensive score of the labeled sequence.  
There are many long-distance dependence and bidirectional semantic dependencies in Chinese pesticide texts, e.g., \"Pentafluorosulfochlor has 25 g/L of the content of effective elements. The dosage form is a dispersible oil suspension agent. It is used to control annual weeds in rice seedling fields. The dosage is 35-45 mL/mu. This product is sulfonamide herbicide.\" These sentences are all about the properties of pentafluorosulfochlor, which have a long-distance dependence and bidirectional semantic dependence. BiLSTM is introduced to solve the bidirectional semantic dependency problem. The two LSTMs are combined into a BiLSTM, one for forward processing input sequence and the other for reverse processing sequence. The output of the two LSTMs is combined to obtain the final output result of BiLSTM. The solution to long dependencies is to introduce gating mechanisms in LSTM that allow information to pass through selectively: The forget gate determines what information is discarded from the cell state, the input gate determines the information stored in the cell state, the output gate determines the value of the output, and the long-distance information is remembered by the cell state \(c_{t}\) and the past cell state can be maintained to the current time step. In this way, the long-span dependencies in the series can be captured, and the information that can be remembered and forgotten can be learned through training.  
On the other hand, although BiLSTM can extract forward and backward features from the whole sequence and take into account the global situation, the BiLSTM derived from a cyclic neural network cannot take into account local features well. The IDCNN model can capture longer context information than traditional CNN by increasing the receptive field through dilated convolutions and enhancing the handling of long text. While taking into account some global features, IDCNN can extract local features more accurately. Therefore, vector features output by IDCNN can supplement some local features. The model BiLSTM-IDCNN-CRF applied in this study can solve the long-distance dependency and bidirectional semantic dependency problems through BiLSTM, taking into account the global and local features through IDCNN.