## 3 The Proposed Method
### NeuroTIS+
#### 3.3.2 Temporal Convolutional Network for CDS Prediction  
TCN [35] represents a specialized neural architecture designed for processing sequential temporal data by capturing inter-temporal dependencies through convolutional operations. Unlike traditional recurrent neural networks (RNNs) or long short-term memory (LSTM) networks, TCN uses convolutional layers to capture dependencies in sequential data in a parallel way, which makes the training process efficient. In this subsection, we employ a TCN to model codon label consistency; it is based on our intuition that the network can not only naturally perform multiple coding labels' message aggregation by using convolutional layers but can also easily implement this aggregation over a long distance by using dilated convolution. In the following parts, we first propose a fast codon usage matrix generation strategy and position encoding of a reading frame, and then the two features are fed into TCN for CDS prediction. **Fast Codon Usage Matrix Generation. ** NeuroTIS+ and NeuroTIS both use codon usage as an entity feature to predict coding and non-coding regions in mRNA sequences; hence, codon usage is calculated at each position of a reading frame. To attain this goal, a sliding window is performed with a step of 3 and window size \(m\) along a reading frame, and then the frequency of each codon (from 1 to 64) occurring in the window is calculated and summed in a 64-dimensional feature vector. Assume that scanning a codon is a basic operation and a reading frame of length \(n\) must perform \(mn/3\) times in total. In fact, the computational complexity can be reduced due to many repeated scanning operations; e.g., two sliding widows overlap with only exception of the first codon and the last codon; hence, once the feature vector of the first sliding window has been calculated, the next feature vector can be calculated directly by adding 1 for the last codon and subtracting 1 for the first codon. The detailed process is shown in Algorithm 1. ```
0: one reading frame of an mRNA sequence with length \(n\) and a sliding window. 0: CU matrix \(\mathbf{X}\) with size of \(64\times(n/3)\), in which each column is 64-dimensional codon usage statistics. 1: pad the reading frame with 'N' on two sides. 2: initialize an array of size 64, \(\mathbf{u}=\mathbf{0}\), an empty queue \(Q\),
3: calculate the index \(l_{0}\) of each codon in sliding window, \(\mathbf{u}[l_{0}]=\mathbf{u}[l_{0}]+1\), and enqueue them into \(Q\) one by one,
4: the 1 st column of \(\mathbf{X}_{0}=\mathbf{u}\), initialize a scaler variable, \(k=1\),
5: dequeue an element \(l_{1}\) from \(Q\). 6: Slide the window with step 3 (one codon), and calculate the index of the codon \(l_{2}\),
7:\(\mathbf{u}[l_{1}]=\mathbf{u}[l_{1}]-1,\mathbf{u}[l_{2}]=\mathbf{u}[l_{2}]+1\),
8:\(\mathbf{X}_{k}=\mathbf{u},k=k+1\),
9: enqueue an element \(l_{2}\) to \(Q\),
10: goto step 5 until the sliding window stops,
11: return CU matrix \(\mathbf{X}\). ```  
**Algorithm 1** Fast CU matrix generation strategy  
**Position Encoding. ** In this paper, we introduce position encoding for CDS prediction based on our observation that the CDS portion is flanked by \(5^{\prime}\) and \(3^{\prime}\) UTRs, where codon labels are zeros, and hence codon labels are dependent on position in an mRNA sequence in some way. To exploit this simple statistical dependency information, we add 1-dimensional features to codon usage measures by calculating the ratio of position and length of the reading frame, \(p_{i}=i/l\). This encoding can slightly improve the prediction results; therefore, we did not conduct this ablation study. **TCN. ** Due to the triplet structure characteristics of codons in the CDSs of mRNA sequences, there are three kinds of reading frames in mRNA sequences, and each reading frame satisfies the constraint of label consistency. Hence, without loss of generality, we consider one reading frame regarding whether it contains CDSs at a time, and the other two reading frames can be processed in the same way.