## 2 Materials and Methods
### Description of the Task to Be Carried Out
The obtained results are transmitted to module C, and based on them, the therapist decides whether to initiate therapy or refer the subject to additional sessions. In contrast to previous works, which mainly focused on the use of neural networks during the reading and writing process [7, 40, 41, 42, 43, 44], this study utilizes an LSTM network in the process of diagnosing dyslexia in elementary school-aged children. For implementation purposes, the Matlab environment and dedicated libraries for modeling DNNs were utilized. From the literature, it is known that attention trajectories, which possess a time-series nature, are effectively processed by LSTM networks. Therefore, the authors adopted a 5-layer model of the network, the structure of which is included in Table 6.  
Figure 8: The attention plot of the observer during the reproduction of the shape (square) from memory using the BeGaze Analysis Software (Version 2.4). Figure 9: Attention -tracking system to support therapy for people with neurodevelopmentalment disorders for dyslexia diagnosis. Within the LSTM layer, the input gates \(x\) and \(y\) were adopted, respectively, which process successive fixations in the attention trajectory that occur during the measurement process. In the diagram below, \(h_{t}\) denotes the output, also referred to as the hidden state, while \(c_{t}\) denotes its state at time step \(t\) (see Figure 10). At the time step \(t\), the consecutive net layer cells use the current state of the RNN \((c_{t-1},h_{t-1})\) and the next time step of the sequence to compute the output and the updated cell state \(c_{t}\). The hidden state at time step \(t\) contains the output of the LSTM layer for this time step. The cell state contains information learned from the previous time steps. Each cell controls updates using gates (see Figure 11). \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Name** & **Type** & **Activations** & **Learables** & \\ \hline Trajectory series & Sequence input & 5 & & – \\ \hline Attention analyser & LSTM & 16 & \begin{tabular}{c} InputWeights \\ RecurrentWeights \\ In Bias \\ \end{tabular} & \begin{tabular}{c} 64 \(\times\) 12 \\ 64 \(\times\) 16 \\ 64 \(\times\) 1 \\ \end{tabular} \\ \hline Encoder & Fully Connected & 6 & \begin{tabular}{c} Weights \\ Bias \\ \end{tabular} & \begin{tabular}{c} 6 \(\times\) 16 \\ 6 \(\times\) 1 \\ \end{tabular} \\ \hline \
\begin{tabular}{c} Softmax \\ normalizer \\ \end{tabular} & Softmax & 6 & – \\ \hline Dyslexia classifier &
\begin{tabular}{c} Classification \\ Output \\ \end{tabular} & 6 & – \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Net structure from the deep learning network analyzer. Figure 11: LSTM cell diagram. Figure 10: LSTM Layer Diagram. The diagram shows how the gates forget, update, and output generate the cell signal and its hidden states, respectively. The learnable weights of an LSTM layer are  
\[W=\left[W_{i}\ W_{f}\ W_{g}\ W_{o}\right]^{T} \tag{1}\]  
\[R=\left[R_{i}\ R_{f}\ R_{g}\ R_{o}\right]^{T} \tag{2}\]  
\[b=\left[b_{i}\ b_{f}\ b_{g}\ b_{o}\right]^{T} \tag{3}\]  
where \(W\) denotes input weights, \(R\) represents recurrent weights, and \(b\) indicates bias, respectively. The flow of signal through the net implies that matrices \(W\), \(R\), and \(b\) are concatenations of the input weights, the recurrent weights, and the bias of each component, respectively. Additionally \(i\), \(f\), \(g\), and \(o\) denote the input gate, forget gate, cell candidate, and output gate, respectively. The cell state at time step \(t\) is given by  
\[c_{t}=f_{t}\odot c_{t-1}+i_{t}\odot g_{t} \tag{4}\]  
where \(\odot\) denotes the Hadamard product. The hidden state at time step \(t\) is given by  
\[h_{t}=o_{t}\odot\sigma_{c}(c_{t}) \tag{5}\]  
where \(\sigma_{g}\) denotes the state activation function. We assumed default transfer function as the hyperbolic tangent function to compute the net state at consecutive states [45]. One of the key stages in preparing data for analysis was standardizing the duration of fixations.