## 3 Preliminary  
In this section, we introduce some key shorthand technical terms in Table 1, as well as a detailed description of the terms Focal Modulation and Exponential Moving Average SlideLoss.  
**Definition 1** (Student Behavior Detection Task).: _The task of detecting students' classroom behavior focuses on identifying the input classroom sensor data \(D_{input}\) and finding the most closely matching behavior from a set of predefined behavior categories \(\{C_{i}\mid i=1,2,3,\ldots,M\}\). Here, \(i\) denotes the index of the specific classroom behaviors recognized in this study. This problem can be mathematically described as follows:_  
\[C^{*}=\arg\max_{C_{i}}\bigl{\{}g\bigl{(}D_{input},C_{1};\theta\bigr{)},g\bigl{(} D_{input},C_{2};\theta\bigr{)},\ldots,g\bigl{(}D_{input},C_{M};\theta \bigr{)}\bigr{\}} \tag{1}\]  
_In this context, \(g(\cdot)\) is a function that measures the similarity between behaviors, and \(\theta\) represents the parameters of this function. By assessing the input classroom sensor data \(D_{input}\), we determine the similarity degree with various behavior categories, and the behavior \(C^{*}\) with the highest similarity score is identified as the recognized behavior._  
**Definition 2** (Focal Modulation).: _Focal Modulation is an advanced mechanism designed to enhance neural network efficiency by replacing traditional self-attention modules. Unlike self-attention, which computes the similarity between query tokens and their surrounding tokens  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Number** & **Notation** & **Description** \\ \hline
1 & \(\mathbb{R}^{L\times S\times C}\) & 3D tensor with dimensions of height, width, and channel \\
2 & M & Aggregation operation on attention score matrix \\
3 & T & Interaction between query and targets \\
4 & \(\mathcal{F}\) & Feature map \\
5 & \(\pi_{L}\) & Scale-aware attention \\
6 & \(\pi_{S}\) & Spatial-aware attention \\
7 & \(\pi_{C}\) & Task-aware attention \\
8 & \(f(x)\) & Sliding function operation \\
9 & EMA & Exponential Moving Average \\ \hline \hline \end{tabular}
\end{table}
Table 1: Symbols and notations.  
with high computational complexity, focal modulation aggregates contextual information at each query position and modulates based on the aggregated context. This process involves encoding visual contexts at different granularities through deep convolutional implementations, selectively aggregating these features, and fusing them into the query. In summary, Focal Modulation is a more lightweight feature aggregation mechanism that we use in the backbone module to enhance model performance._  
**Definition 3** (Exponential Moving Average Slide Loss).: _Exponential Moving Average (EMA) is a statistical measure that applies weighting factors to a time series, giving more significance to recent data points while smoothing out fluctuations and reducing the impact of outliers. The formula for EMA is_  
\[\mu_{t}=\beta\times\mu_{t-1}+(1-\beta)\times\theta_{t} \tag{2}\]  
_where \(\mu_{t}\) is the current EMA value, \(\mu_{t-1}\) is the previous EMA value, \(\theta_{t}\) is the current data point, and \(\beta\) is the smoothing factor between 0 and 1._  
_In this study, we apply the concept of EMA to the Slide Loss function to address sample imbalance in student classroom behavior datasets. The threshold parameter \(\mu\), which differentiates between simple and difficult samples based on the Intersection over Union (IoU) between predicted and ground truth boxes, is optimized using EMA. This moving average approach helps smooth out \(\mu\) over time, reducing jitter and avoiding significant fluctuations caused by outliers.The improved Slide Loss function, termed ESLoss, categorizes samples with IoU values below the EMA threshold as negative and those above as positive. This weighted approach emphasizes difficult-to-detect samples, enhancing the model's performance and robustness in behavior detection tasks._