## 3 The Proposed Method
### Information Difficulty Extraction Module
#### 3.1.5 Task-Specific Layer  
The information was input to different task-specific layers after sharing the underlying parameters through the shared layer, which consisted of a feedforward layer and a linear layer. In this paper, we predicted the question difficulty and the skill difficulty to obtain the information difficulty representation vector of the prediction question. First, we preprocessed the original data and eliminated the questions and skills whose interactive records were less than 10 times. Then, we took the difficulty of the question \(d_{q}\) and difficulty of the skill \(d_{s}\) as the label of a task. The error \(L_{dq}\) between \(\widetilde{d}_{q}\) and \(d_{q}\) and the error \(L_{ds}\) between \(\widetilde{d}_{s}\) and \(d_{s}\) were calculated by the mean square loss function MSEloss, and the parameters of the model were continuously optimized by backpropagation.  
\[L_{dq}=\
icefrac{{1}}{{t}}\sum_{i=1}^{t}\Big{(}d_{q}-\widetilde{d}_{q}\Big{)} ^{2} \tag{12}\]  
\[L_{dq}=\
icefrac{{1}}{{t}}\sum_{i=1}^{t}\Big{(}d_{s}-\widetilde{d}_{s}\Big{)} ^{2} \tag{13}\]  
Usually, the easiest way to calculate the total loss of multi-task learning is to add up the losses of multiple tasks or manually set the weight parameter \(w_{i}\):  
\[\text{loss}(t)=\sum_{i}w_{i}L_{i}(t) \tag{14}\]  
However, this method is not only time-consuming but also cannot solve the problem effectively. For example, if the gradient of task A is large with a small weight \(w_{A}\), \(w_{A}\) continues limiting the model from better learning task A until the end of the training, so the weight \(w_{i}\) needs to be continuously changed during the training process:  
\[\text{loss}(t)=\sum_{i}w_{i}(t)L_{i}(t) \tag{15}\]  
During the training process, the different convergence rates of different tasks lead to an inability to achieve the best results when training together at the same time, and this imbalance caused by different convergence rates is mainly manifested as the gradient imbalance during backpropagation. Therefore, we used the optimization method of GradNorm [28] to improve the above problem. GradNorm enables different tasks to be trained at similar rates by dynamically adjusting the magnitude of the backpropagation gradients of different tasks. Table 2 illustrates some of the symbolic concepts in the GradNorm method.  
To dynamically adjust the weight \(w_{i}(t)\), we needed to put the gradient norms of different tasks under the same metric to obtain their relative gradient size. \(\overline{G}_{\text{W}}(t)\) was used to measure the norm of the average gradient at time t and, thus, determine the relative gradient, and \(\mathbf{r}_{i}(t)\) was used to balance the gradient. If \(\mathbf{r}_{i}(t)\) was larger, the gradient of task i was larger to speed up task training. Therefore, the gradient norm objective of task i was \(\overline{G}_{\text{W}}(\mathbf{t})\times\mathbf{r}_{i}(\mathbf{t})\), and the loss function _Grad Loss_ of the weight function \(w_{i}(t)\) was further obtained:  
\[\text{Grad Loss}=\sum_{i}\left|\text{G}_{\text{W}}^{\text{i}}(\text{t})- \overline{G}_{\text{W}}(\text{t})\times\text{r}_{\text{i}}(\text{t})\right| \tag{16}\]  
\[\widetilde{\text{L}}_{\text{i}}(\text{t})=\frac{\widetilde{\text{L}}_{\text{ i}}(\text{t})}{\text{AVG}\left[\widetilde{\text{L}}_{\text{i}}(\text{t})\right]} \tag{17}\]  
\[\text{Grad Loss}=\sum_{i}\left|\text{G}_{\text{W}}^{\text{i}}(\text{t})- \overline{G}_{\text{W}}(\text{t})\times\text{r}_{\text{i}}(\text{t})\right| \tag{18}\]  
Therefore, there were two kinds of losses in the multi-task learning module: 1. The loss of tags was used to update the predicted results. 2. The loss of weight gradient was used to update the weight of each task.