## 3 Proposed Method
### Overview  
In this section, we discuss the design of the proposed model, as shown in Algorithm 1. The proposed model comprises the following layers: a codeword embedding layer, a mask-gating attention layer, a bilinear interaction layer, a deep residual network layer, and an output layer. To obtain a sparse representation, the embedding layer [38] is utilized. The mask-gating [36] attention layer first learns a mask, which is a vector of weights that  
Figure 1: Framework of the proposed method. selectively emphasizes important dimensions of the feature embedding. This mask is then applied through element-wise multiplication, allowing the model to efficiently capture complex interactions at the element level. Furthermore, the mask-gating attention layer helps reduce the impact of noise in the feature embedding while highlighting valuable signals. Based on the mask-gating attention layer, the bilinear interaction [37] layer is used to capture second-order codeword interaction features in a fine-grained way. Finally, the output of the bilinear interaction layer is passed to a deep neural network with a residual structure, which returns the prediction score. ```
Input: Input sequence \(\mathbf{X}\) Output: Prediction \(\hat{y}\) V \(\leftarrow\) Codeword-Embedding-Layer(\(\mathbf{X}\)); H \(\leftarrow\) Mask-Gating-Attention-Layer(\(\mathbf{V}\)); R \(\leftarrow\) Bilinear-Interaction-Layer(\(\mathbf{H}\)); O \(\leftarrow\) Deep-Residual-Network-Layer(\(\mathbf{R}\)); \(\hat{y}\leftarrow\)Sigmoid(\(\mathbf{W}\cdot\mathbf{O}+b\)); return\(\hat{y}\)
```  
**Algorithm 1**Overview of the proposed model  
For frame-wise detection in low-bit-rate speech streams, the form of input is as follows:  
\[\boldsymbol{X}=[x_{1},x_{2},\dots,x_{k}] \tag{1}\]  
where \(k\) denotes the number of codewords in the speech frame. Then, as the values of the codewords are discrete, the embedding layer is used to transform each codeword into a feature vector and obtain the distributed representation of codewords [38]. This enables the model to capture correlations between codewords within a single speech frame by using subsequent layers that explicitly learn relationships among the embedded codeword vectors in that frame. Specifically, after the embedding layer maps discrete codewords to continuous representations, these subsequent layers jointly analyze all codeword vectors in the same frame. By computing the interactions among these vectors, the model can identify dependencies that reflect how the value of one codeword is related to others within that frame, thereby learning the internal correlation structure of the frame. The embedding layer is described as follows:  
\[\boldsymbol{E}=L_{\textit{Codeword}-Embedding-Layer}(\boldsymbol{X}) \tag{2}\]  
where \(L_{\textit{codeword}-embedding-layer}\) denotes the embedding layer. When transforming the codewords into a feature vector, the codewords should be represented using one-hot encoding. The tensor \(\boldsymbol{E}\) has dimensions \((B,k,f)\), where \(B\) is the batch size and \(f\) is the embedding dimension. Moreover, to study the importance of the elements in \(\boldsymbol{E}\), \(\boldsymbol{E}\) is reshaped as \(\boldsymbol{V}\), defined by the following equation:  
\[\boldsymbol{V}=\left[\text{flatten}(E_{b,:})\right]_{b=1}^{B}\in\mathbb{R}^{ B\times(k\times f)} \tag{3}\]  
The dimension of \(\boldsymbol{V}\) is \((B,k\times f)\), where \(\times\) denotes the flattening of the \(k\) and \(f\) dimensions into a single feature axis. Then, the mask-gating [36] attention mechanism is applied to \(\boldsymbol{V}\), and the process is as follows:  
\[\boldsymbol{V}_{out}=L_{\textit{Mask-Gating}-Attention-Layer}(\boldsymbol{V}) \tag{4}\]where \(\mathbf{V_{out}}\) denotes the output of the mask-gating attention [36] mechanism. To capture fine-grained features at the vector level, \(\mathbf{V_{out}}\) is reshaped as \(\mathbf{H}\), and the dimension of \(\mathbf{H}\) is \((b,k,f)\).