# Research on Named Entity Recognition Based on Gated Interaction Mechanisms
## 2 Materials and Methods
### Feature Extraction Layer  
To overcome the issues caused by the trial-and-error selection of hyperparameters in the traditional Mogrifier gating mechanism, and to better mine the features in textual information data, this study proposes an improved Mogrifier GRU network model. This model utilizes Bayesian optimization to adaptively select hyperparameters and introduces richer hyperparameters for the traditional structure, allowing for more effective modeling of Chinese-named entity recognition tasks. Through this improvement, we aim to enhance the model's performance, making it more accurate and robust in the field of Chinese named entity recognition. The network structure of the improved Mogrifier GRU network model is shown in Figure 2.  
The following design for the improved Mogrifier GRU network model was proposed in this study:  
An iterative round i was defined to describe the number of interactions the model undergoes during each update process. By adjusting the value of i, the results of information interaction under different rounds can be explored, allowing for the identification of the optimal number of iterations. The improved gating mechanism is calculated as shown in the formula. \[ \begin{split}\text{x}^{i}=\text{k}\sigma\Big{(}Q^{i}h^{i-1}_{prev} \Big{)}\otimes x^{i-2}\\ \text{h}^{i}_{\text{prev}}=\text{k}\sigma\Big{(}R^{i}x^{i-1} \Big{)}\otimes h^{i-2}_{prev}\end{split}  \tag{1}\]  
Q and R are represented as randomly initialized matrices. By utilizing the weight matrices Q and R, the input x and the hidden state hprev are integrated to form new vector representations xi and hiprev, respectively. The sigmoid function is employed due to its smooth and differentiable nature within its interval, facilitating better convergence of the model during training. Additionally, the sigmoid function's property of approaching 1 or 0 when the input is large or small, respectively, helps to prevent the vanishing gradient problem during computation. This, in turn, enhances the training stability of the model. Since the output of the sigmoid function ranges between 0 and 1, it can be used as a probability value to represent the probability of retaining or discarding the input information. An optimization algorithm is used to set k as a hyperparameter, serving as a pre-coefficient  
Figure 2: Mogrifier GRU structure. in the formula, to avoid the situation where the value becomes smaller and eventually approaches zero after multiple sigmoid calculations. This ensures relative stability in the numerical values. The GRU computation process is depicted in the formula as follows:  
\[\mathrm{h_{t}}=(1-\sigma(W_{z}\cdot[h_{t-1},x_{t}]))\otimes h_{t-1}+\sigma(W_{z} \cdot[h_{t-1},x_{t}])\otimes\tanh(W\cdot[\sigma(W_{r}\cdot[h_{t-1},x_{t}])*h_{ t-1},x_{t}]) \tag{2}\]  
In the improved GRU model, we use the sigmoid function as the activation function, with its mathematical expression being: \(\sigma(x)=\frac{1}{1+\sigma^{-x}}\). By employing the sigmoid function, input data can be mapped to a numerical range between 0 and 1, thereby generating gating signals. Gating signals are critical in the GRU model, as they determine the extent to which past state information is retained in the current state. When the gating signal is close to 1, it signifies that more of the past memory information is retained; conversely, when the gating signal is close to 0, it indicates that less of the past memory information is retained. Through this mechanism, the GRU model is capable of flexibly handling dependencies across different time steps, effectively capturing features within sequence data. To address the issue of random errors caused by the trial-and-error selection of hyperparameters in traditional deep learning, this study incorporates the Bayesian optimization method [30] to adaptively optimize the selection of hyperparameters within the network model. The core idea of Bayesian optimization is to utilize existing experimental data to guide the design of subsequent experiments.