## 2 Methodology and Networks  
### Sequential Execution of Digital Rock Reconstruction  
Digital rock reconstruction provides a nuanced understanding of intricate rock structures and features. With the incorporation of Generative Adversarial Networks (GANs), we can emulate these structures with remarkable precision. The process is delineated step by step as demonstrated in Figure 1.  
1. Training Phase:  
The upper section of Figure 1 delineates the training phase, which is pivotal to our approach:Dataset Input: During this phase, actual rock samples are fed into the model. These samples serve as the foundation, providing real-world data that our model learns from. The green arrows in the figure represent the iterative process of training, where through each iteration, the model progressively refines its learning based on the input data.  
Self-Attention Enhanced Generative Adversarial Network (SAE-GAN) Training: With the real data samples as input, the model embarks on the training journey. Utilizing the self-attention mechanism, the SAE-GAN meticulously learns the intrinsic features and distributions present in carbonate rocks, focusing particularly on minerals and pores.  
Testing Phase:  
Once training is accomplished, the model transitions to the testing phase, depicted at the bottom of Figure 1:  
Input Noise: For the generation of new digital rock samples, noise is introduced. This random stimulus ensures variability and uniqueness in each generated rock sample.  
SAE-GAN-Generated Output: The previously trained SAE-GAN uses the input noise to generate digital rock samples. The red arrows signify the flow from the input noise to the generation of digital rock samples, illustrating the model's application in the testing phase without further training or modifications. The red arrows in Figure 1 symbolize the transition of the model from a state of active training to a state where it has been fully trained and is ready for deployment without further modifications. This transition is a critical phase in the model's development, marking the point where it shifts from learning and adapting to being capable of consistent performance based on its training. Specifically, the final red arrow represents the generation process, where the trained model, upon receiving input noise, produces digital rock samples. This crucial step is where the model's ability to reconstruct digital rocks is actualized. The output generated during this phase mirrors the characteristics and intricacies learned during the training phase,  
Figure 1: Sequential process of digital rock reconstruction using GAN.  
yielding realistic and accurate rock structures. It demonstrates the practical application of the SAE-GAN in generating a multitude of digital rock samples, thus achieving the objective of accurate rock reconstruction.  
The training phase of our Self-Attention Enhanced Generative Adversarial Network (SAE-GAN) specifically addresses the complex characteristics of carbonate rocks. By incorporating both traditional and fully convolutional self-attention mechanisms, the SAE-GAN is uniquely equipped to process the intricate structures of these rocks. This dual approach allows the model to effectively capture the heterogeneity and variability in pore distribution, which are critical aspects of carbonate rocks. Detailed discussions of these mechanisms and their specific roles in enhancing our model's capabilities are elaborated in Section 2.3. This strategic integration underscores our model's ability to generate digital rock samples that accurately reflect the nuanced geological features of carbonate formations, marking a significant advancement in the field of digital rock reconstruction.