## 2 Materials and Methods
### Multitask Mechanism  
After the model obtains the representations from the Att-biLSTM, it separates the NER task into a primary task and a secondary task. The primary task is a sequential inference task, and the secondary task is an entity discovery task. The two tasks are conducted simultaneously. In the sequential inference task, the representation vectors are sent to a CRF model to decide which label should be assigned on each token. The reason that we do not use a dense layer and softmax function to estimate the class of each token is that the label of each token has sequential dependence, and the softmax function can capture the dependence information. For instance, it is impossible that a label representing the beginning of an entity follows another beginning label in one entity in the real data, but it may happen in the prediction if we use a dense layer and a softmax function. The CRF model can infer the dependence of token \(t\) with token \(t-1\) and token \(t+1\) in a sequence by its state transition algorithm [13]. Thus, a CRF layer is used to infer the sequence in our model. Specifically, giving a sequence \(x=\{x_{0},\ldots,x_{t},\ldots,x_{n}\}\) and its label sequence \(y_{task}=\ \{y_{0},\ldots,y_{t},\ldots,y_{n}\}\), it complies with the following Markov property:  
\[\text{P}\Big{(}y_{t}|x,y_{0},\ldots y_{t-1},y_{t+1},\ldots,y_{n} \Big{)}=\text{P}\Big{(}y_{t}|x,y_{t-1},y_{t+1}\Big{)}. \tag{13}\]  
Then, \(\text{P}(y_{task}|x)\) is a chain conditional random field, and the conditional probability of \(y_{task}\) is  
\[\text{P}(y_{task1}|x)=\frac{\textit{exp}\Big{(}\sum_{i,k}^{n,K_{ 1}}\lambda_{k}t_{k}(y_{i-1},y_{i},x,i)+\sum_{i,l}^{n,K_{2}}\mu_{l}g_{l}(y_{i},x,i)\Big{)}}{Z(x)}, \tag{14}\]  
where \(t_{k}\) is a transition eigenfunction, \(s_{l}\) is a state feature function, \(\lambda_{k}\) and \(\mu_{l}\) are weight parameters, \(K_{1}\) is the number of transition features, and \(K_{2}\) is the number of state features. \(Z(x)\) is a normalization function to normalize the probability. \(t_{k}\) and \(\lambda_{k}\) can be united into one feature function: \(f_{k}(y,x)=\sum\limits_{i=1}^{n}f_{k}(y_{i-1},y_{i},x,i)\). Then, the probability of given sequence \(x\) with label sequences \(y_{task1}\) is expressed by the following equation:  
\[\text{P}(y_{task1}|x;w)=\frac{\textit{exp}\Big{(}\sum_{k=1}^{m} \sum_{i=1}^{n}w_{k}f_{k}(y_{i-1},y_{i},x,i)\Big{)}}{\sum_{y^{\prime}=0}^{z} \textit{exp}\Big{(}\sum_{k=1}^{m}\sum_{i=1}^{n}w_{k}f_{k}\Big{(}y^{\prime}_{i- 1},y^{\prime}_{i},x,i\Big{)}\Big{)}}, \tag{15}\]  
where \(\mathbf{w}\) is the weight matrix of \(f_{k}\), and \(\mathbf{z}\) is the set of labels in the label sequence. To maximize \(\text{P}(y_{task1}|x;w)\), we optimize \(\mathbf{w}\) by the log-likelihood estimation algorithm. To obtain the label sequence \(y_{task1}\), we use the Viterbi algorithm to decode the label sequence solved by the CRF layer. Before the representations enter the CRF layer, they go through a dense layer first, and this dense layer has 13 output neural cells which represent all 13 labels. In the entity discovery task, the representations generated from the Att-biLSTM are sent into a binary classifier; this classifier classifies a token as being an entity or not. A dense layer with two output neural cells is used to represent the two classes, and a softmax function is used to normalize the probability. The following equation expresses the probability of given sequence \(x\) with label sequences \(y_{task2}\):  
\[\text{P}(y_{task2}|x;w)=\frac{\sum_{i=1}^{n}\textit{exp}\Big{(}x^{T}w_{i}\Big{)} }{\sum_{k}^{K}\sum_{i=1}^{n}\textit{exp}\Big{(}x^{T}w_{i}^{k}\Big{)}}. \tag{16}\]In the backpropagation process, the loss values of two tasks are combined by a linear process, which is  
\[loss_{total}=\gamma_{1}loss_{11}+\gamma_{2}loss_{2}, \tag{17}\]  
where \(\gamma_{1}\) and \(\gamma_{2}\) are factors of two loss values, and they represent the priority of the two tasks. In every backpropagation process, the model computes the total loss and conducts gradient descent.