## 2 Methodology  
### Auxiliary Model  
The guided diffusion model with transformer can predict the FEMR signal data in deep future. To achieve effective early warning of rock bursts, it is essential that we identify precursor characteristics within FEMR time-frequency data. Transformers, which rely on self-attention mechanisms, have gained widespread popularity in natural language processing tasks. Recently, there has been a rising focus in adapting transformer-based methods to a variety of computer vision applications [67; 68; 69; 70]. In our study, we employ a transformer-based architecture as the core model for identifying precursor characteristics of rock bursts. Figure 2 illustrates the schematic of the auxiliary model designed to identify precursor characteristics of rock bursts in FEMR time-frequency data. The input data, which consist of summarized FEMR time-frequency data predicted by the guided diffusion model with transformer, is initially processed using a non-overlapping convolution to generate patch embeddings, followed by a normalization layer. The auxiliary model comprises four stages: The first two stages focus on learning local characteristics through attention mechanisms. In the third and fourth stages, the FEMR time-frequency characteristic maps are first processed by a window local attention mechanism to aggregate local information, and then passed through a deformable attention block to model global relationships between the locally enhanced tokens. The output of the auxiliary model provides the recognized precursor characteristics of rock bursts, with \"Dangerous\" indicators marked by red boxes. Deformable attention block, as illustrated in Figure 2d, is the key to recognizing the precursor characteristics of rock burst. Given the input characteristics map \(x\) of FEMR time-frequency data, a uniform grid of points is generated as the references. To determine the displacement for each reference location, as shown in Equation (1), the feature maps are linearly mapped to the query tokens \(q=xW_{q}\), as shown in Equation (2), and then directed into a compact sub-network \(\theta_{offset}(\cdot)\) to output the offsets \(\Delta p=\theta_{offset}(q)\). Subsequently, the features are extracted at the positions of the deformed points to serve as keys and values, followed by the application of projection matrices:  
\[q=xW_{q},\ \overset{\sim}{k}=\overset{\sim}{x}W_{k},\ \overset{\sim}{v}= \overset{\sim}{x}W_{\varphi}, \tag{1}\]  
\[\Delta p=\theta_{offset}(q),\ \overset{\sim}{x}=\varnothing(x;p+\Delta p). \tag{2}\]  
where \(q\), \(\overset{\sim}{k}\), and \(\overset{\sim}{v}\) denote query, deformed key, and deformed value embeddings, respectively. \(W_{q}\), \(W_{k}\), \(W_{\varphi}\) are matrices. Specifically, as shown in Equation (3), we set the sampling function \(\mathcal{O}(\cdot;\cdot)\) to a bilinear interpolation process to ensure differentiability:  
\[\varnothing\big{(}z;\big{(}p_{x},p_{y}\big{)}\big{)}=\sum_{(r_{x},r_{y})}g(p_{ x},r_{x})g\big{(}p_{y},r_{y})z\big{[}r_{y},r_{x},:\big{]} \tag{3}\]  
where \(g(a,b)=max(0,\ 1-|a-b|)\) and \(\big{(}r_{x},r_{y}\big{)}\) indexes all the locations on \(z\). Since it is non-zero exclusively at the four nearest integral points to \(g\), it reduces Equation (3) to a weighted average across these four positions. Following established methodologies, as shown in Equation (4), we apply multi-head attention to \(q,k,v\) and incorporate relative positional offsets \(R\). The output of a single attention head is expressed as follows:  
\[z^{(m)}=\sigma\Bigg{(}q^{(m)}\overset{\sim}{k}^{(m)^{\intercal}}/\sqrt{d}+ \phi\big{(}\hat{B};R\big{)}\Bigg{)}\overset{\sim}{v}^{(m)} \tag{4}\]where \(\sigma(\cdot)\) represents the softmax function, and \(d=C/M\) indicates the dimensionality of each head. \(z^{(m)}\) refers to the embedding output generated by the m-th attention head. \(\phi\big{(}\hat{B};R\big{)}\) are derived from the position embedding, following established methodologies but with specific modifications.