# Cross-Attention U-Net for Elastic Wavefield Decomposition in Anisotropic Media
## 2 Theoretical Framework
### Cross-Attention for Vector Decomposition  
In vector decomposition, seismic wavefields consist of multiple displacement components, each containing contributions from different wave modes. Traditional deep learning models for wave mode separation typically concatenate these components into a single input, allowing the network to process them jointly. However, in vector decomposition, each displacement component contains distinct qP and qS wave contributions. Treating all components as a single input may limit the model's ability to effectively disentangle these mixed wave modes.  
A more structured approach is to encode each displacement component separately, ensuring that the model learns distinct features for each mode. While this enhances feature extraction within individual components, it introduces a drawback: the absence of direct interaction between components during encoding. Since displacement components share underlying physical relationships, ignoring these interdependencies could reduce the model's ability to accurately decompose the wavefield.  
To address this limitation, cross-attention enables dynamic feature exchange between separately encoded components. Unlike self-attention, which captures dependencies within a single input sequence, cross-attention establishes relationships across distinct inputs [12; 13]. This mechanism allows each displacement component to selectively focus on relevant features from others, facilitating improved wave mode separation. Cross-attentionis computed by exchanging information between different displacement components. This process is bidirectional, ensuring that each component benefits from interactions with the others. The general form of cross-attention is expressed as follows:  
\[O_{i}=\frac{1}{(D-1)}\sum_{\begin{subarray}{c}j=1\\ j\
eq i\end{subarray}}^{D}\text{softmax}\left(\frac{Q_{i}K_{j}^{T}}{\sqrt{d_{k} }}\right)V_{j}, \tag{7}\]  
where \(D=3\) represents the number of spatial components (\(x,y,z\)), and \(i,j\in\{x,y,z\}\) ensure that each component attends to the others. Here, \(Q_{i}\) is the query representation obtained from the feature embeddings of displacement component \(i\), while \(K_{j}\) and \(V_{j}\) correspond to the key and value embeddings of component \(j\). The scaling factor \(d_{k}\) normalizes the attention scores to stabilize training. This formulation ensures that each displacement component retains its physical consistency while incorporating inter-component dependencies that would otherwise be lost when processing components independently.  
By integrating cross-attention, the model enhances its ability to maintain physical consistency across decomposed wave modes. This is particularly relevant in anisotropic media, where wave mode interactions vary due to differences in elastic properties. Furthermore, cross-attention has been widely used in multi-modal learning, where multiple input modalities must interact to enhance the feature extraction [13; 14]. In seismic data processing, displacement components serve as distinct yet correlated feature spaces. When processed independently, they may lose valuable interactions, which cross-attention compensates for by selectively integrating relevant information across components.