SGCM-Net: structure-guided mural inpainting with state space model Authors: Yiyin Qiu, Jianjun Chen, Yan Fan, Md Rakib Hossain, Fei Wang, Xibei Yang Published: 2026 ABSTRACT AbstractThe degraded regions of ancient murals often contain intricate textures and structural curves, presenting major challenges for traditional mural restoration. Although digital image inpainting offers a viable approach, Convolutional Neural Network (CNN)-based methods are commonly constrained by these complex scenarios and struggle with global consistency due to their limited receptive fields. To address these limitations, a CNN-Mamba hybrid inpainting architecture is proposed based on the two-stage task decomposition paradigm. This framework employs Structure-Guided Fusion Blocks (SGFBs) to adaptively fuse structural priors from the edge inpainting stage across multi-scale levels. To enhance holistic consistency, the proposed Multi-Way Mamba Process Blocks (MMPBs) are integrated into the bottleneck, specifically adapting State Space Models (SSMs) to capture global relations in 2D murals with linear complexity. Comprehensive evaluations on mural and landscape painting datasets show that the proposed method properly restores global styles, fills in coherent details, and achieves competitive performance compared to well-established methods.Subject terms: Engineering, Mathematics and computing Introduction Ancient murals represent one of the world’s most significant archives of art and history. Spanning many civilizations, these works have recorded a huge collection of visual data, serving as a priceless record of the past. Yet, this invaluable legacy is in peril. Natural factors such as rock erosion and disturbance of the environment, combined with the impacts of human activity, have led to inevitable degradation. Traditionally, the approach to restoring damaged murals involves manual procedures, a tricky process handled by professional conservators. Such manual restoration is usually time-consuming and demands a deep understanding of ancient art. To overcome these limitations, digital image inpainting provides a practical solution. The underlying concept of image inpainting technique is consistent with the process of manual restoration: it reconstructs the missing regions through intelligent inference based on surrounding textures and overall style. This technology is not only efficient but also offers a visual guidance for conservators. In recent years, deep learning approaches, particularly those1,3,4 based on the Convolutional Neural Network (CNN), have made substantial progress in image reconstruction. However, directly inpainting large missing regions in artworks with rich details, such as the Dunhuang murals, often lacks spatial constraints, leading to a loss of curve continuity and structural consistency, as shown in Fig. 1. Recognizing that high-fidelity murals are full of delicate lines and aiming to lower the difficulty of mural inpainting, the proposed framework follows the two-stage task decomposition paradigm13: it first restores the structural prior and then the inpainted structural prior serves as a reliable constraint for inpainting the mural with coherent textures and colors. Qualitative comparison with the state-of-the-art methods1,2 on Dunhuang murals. The proposed method aims to address curve continuity and structural consistency issues, which tend to occur in complex scenes. The choice of structural prior is critical to the success of this paradigm. State-of-the-art methods like ZITS5, for example, combine two priors: Canny edges and wireframes. Although such fusion method is effective for images with polygonal structures, its wireframe component is unsuitable for the murals because it is designed to detect straight lines. The prevalence of curves in artistic murals means that straight-line detection provides sparse and inadequate guidance, leading to suboptimal restoration. In this work, the proposed method utilizes edges generated from the recently advanced MuGE (Multiple Granularity Edge Detection)6 model. Leveraging this state-of-the-art edge detector provides a way to create a holistic structural prior and capture macroscopic structural semantics of murals. In addition, to bridge this structure-guided pipeline, a novel Structure-Guided Fusion Block (SGFB) is proposed. This block is designed to fuse the restored structural priors from the edge inpainting network (the first stage) into the mural inpainting network (the second stage) in a multi-scale way. This design preserves structural information from the preceding inpainting network and progressively incorporates it to high-fidelity murals. More than just structural prior, achieving a globally consistent restoration requires the inpainting network to understand the entire image context. This is a known shortcoming of standard CNN-based methods, whose convolutional kernels mainly focus on local receptive field3,7. This fact essentially restricts the ability of model to acquire image’s global contextual awareness. As a result, researchers start seeking solutions among Transformer architectures8,9, which are built for modeling token-wise attention and learning global relations. However, Transformer blocks have a major computational drawback: their cost grows quadratically. This becomes a critical issue for images, since their high number of pixels results in long token sequences. The Vision Transformer10 attempts to alleviate this issue by restructuring pixels into a patch-formed sequence, but this introduces a trade-off where small patch sizes lead to a high computational cost and large patch sizes result in lower accuracy. Considering these limitations, State Space Models (SSMs)11 have been investigated as a favorable alternative. Specifically, the recent Mamba12 model, notable for modeling long-range dependencies at a linear computational cost and parallel training, making it highly suitable for mural inpainting task. Inspired by benefits of CNN and Mamba models, this work proposes a Structure-Guided Conv-Mamba Network (SGCM-Net): a CNN encoder-decoder structure with intermediate Multi-way Mamba Processing Blocks (MMPBs). The proposed MMPB consists of two components: a two-directional zigzag scanning strategy to capture global information, and a feed-forward network (FFN) incorporating a gating mechanism to capture more expressive feature relationships. The primary contributions of this research are as follows: Specialized structural guidance via Muge priors and SGFBs. Following the general two-stage structure-guided paradigm, Muge priors are utilized to provide more reliable structural guidance than traditional Canny edges. These priors are integrated across multiple scales via Structure-Guided Fusion Blocks (SGFBs), with ablation studies confirming the advantages of this configuration over conventional methods. Specialized structural guidance via Muge priors and SGFBs. Following the general two-stage structure-guided paradigm, Muge priors are utilized to provide more reliable structural guidance than traditional Canny edges. These priors are integrated across multiple scales via Structure-Guided Fusion Blocks (SGFBs), with ablation studies confirming the advantages of this configuration over conventional methods. An adapted Multi-way Mamba Processing Block (MMPB). To adapt 1D sequence modeling for 2D murals, the MMPB introduces a two-directional zigzag scan coupled with a tailored feed-forward network (FFN). This design achieves improved inpainting performance relative to vanilla Mamba and standard FFN variants. An adapted Multi-way Mamba Processing Block (MMPB). To adapt 1D sequence modeling for 2D murals, the MMPB introduces a two-directional zigzag scan coupled with a tailored feed-forward network (FFN). This design achieves improved inpainting performance relative to vanilla Mamba and standard FFN variants. A CNN-Mamba hybrid architecture. A hybrid inpainting network is constructed by positioning the proposed MMPB within the bottleneck of a CNN encoder-decoder. This specific design effectively combines the strengths of convolutional operation toward regional features and Mamba for capturing global-range relations with reduced computational complexity. A CNN-Mamba hybrid architecture. A hybrid inpainting network is constructed by positioning the proposed MMPB within the bottleneck of a CNN encoder-decoder. This specific design effectively combines the strengths of convolutional operation toward regional features and Mamba for capturing global-range relations with reduced computational complexity. Related work Structure-based methods In order to obtain more realistic and high-quality details, many approaches shift attentions toward explicitly utilizing structural priors to facilitate images inpainting. For instance, Nazeri et al.13 first used Canny edge maps to guide the images restoration. Guo et al.14 proposed a two-stream network that mixes structure and texture with each other, enabling them to work in a complementary way. Yang et al.15 developed a structure embedding layer to incorporate gradient maps into image up-sample stage. Li et al.16 simultaneously processed Canny edges, grayscale maps and smoothed images and utilized the fusion module from Guo et al.14 to fully integrate them. Ren et al.17 used the smoothed image from which high-frequency details have been removed, as its structural prior. Li et al.18 reconstructed their Canny structure in a progressive approach. Wang et al.19 employed a monochrome image as a bridge for linking the external and internal learning. Cao et al.20 utilized structural priors like Canny edges and wireframes to guide image inpainting. Dong et al.5 advanced this approach by introducing a Transformer-based network for structure completion and leveraging a strong baseline LaMa1 for texture restoration, achieving state-of-the-art results. In a follow-up work, Cao et al.21 investigated various types of structural priors and analyzed their respective advantages for the inpainting task. Aside from these structural priors, other types of guidance, such as depth image22, local binary pattern23, contour24, and sketch25, have been actively explored. The proposed strategy employs salient MuGE edge to capture semantic structures, avoiding the low-level edges often captured by Canny edge detection. Furthermore, it decouples structure and texture inpainting into two sequential stages for better restoration results. Mamba-based methods: from general vision to image inpainting Having succeeded in Natural Language Processing (NLP), the Mamba architecture has recently been explored as an efficient approach for computer vision tasks. Zhu et al.26 employed a bidirectional mechanism to process sequences of image patches, integrating the patch-based representation method of Vision Transformer10 with the linear-efficiency of Mamba’s state-space modeling. Liu et al.27 expanded patches scanning strategies to four distinct ways and achieved competitive performance in image classification and segmentation. Extending the application of Mamba to cultural heritage, Xian et al.28 leveraged a Multi-scan Mamba framework to capture global spatial dependencies, successfully addressing the complex pose estimation of figures in traditional Thangka artworks. Guo et al.29 first applied Mamba to image restoration and proposed a tailored architecture that maximized the efficacy of Mamba blocks for image reconstruction. Shifting the focus to the domain of image inpainting, Chen et al.30 combined Mamba with Transformer for image inpainting task, reducing the heavy computational complexity from Transformer’s attention mechanism while leveraging its global receptive field. Within a coarse-to-fine framework, Hou et al.31 incorporated Mamba into the features encoding module and utilized Mamba’s global modeling ability to capture spatial features comprehensively. To deal with the challenge of large missing areas in image inpainting, Jiang et al.32 introduced a multi-directional spiral scanning method that enhanced the information exchange within the feature map. Following the design of MambaIR29 that introduced additional CNN layers to preserve locality coherence, this work adopts an efficient multi-way processing strategy and proposes a gating mechanism incorporated feed-forward network to bring locality and strengthen the robustness of features. Method The overall architecture of the proposed Structure-Guided Conv-Mamba Network (SGCM-Net) can be seen in Fig. 2, consisting of two networks: Edge inpainting network and Mural inpainting network. These are both adversarial network33, each consisting of a paired generator and discriminator. The fundamental architecture of the generator adopts convolution based encoder and decoder for feature manipulation. Moreover, the mural generator leverages SSMs to learn long-range dependencies of deep feature. For discriminator, the architecture is adapted from the Patch-GAN discriminator34 and its details are provided in in Table S1 of the supplementary material. Overview of the proposed SGCM-Net. In this framework, the mask and masked edge map are first sent into the Edge inpainting network, then multi-scale edge maps downsampled from the composed edge map , along with the mask and masked mural serve as the inputs for the Mural inpainting network to obtain the restored mural . State space models Before introducing SGCM-Net, this section first gives a view of SSMs and Mamba Block. The SSM-based models’ emergence stems from the traditional linear time-invariant (LTI) systems which map a 1-dimensional function or sequence to output through a hidden state . This continuous system can be formulated as the following linear ordinary differential equations (ODEs): where is the state transition matrix, and as the input/output projection parameters, . In order to be adaptive to real-world scenarios and incorporated into deep learning models, an additional discretization step must be taken to transform the continuous parameters. The frequently utilized approach for discretization is zero-order hold(ZOH), which is formulated as: with denoting the timescale parameter and denoting discrete parameters. Then the discrete form of Eq.(1) is represented as: Although the recurrent representation described in Eq.(3) is theoretically concise and efficient, SSM often suffers from computational intractability and high memory usage. Structured State Space Sequence Models (S4)11 addressed these long-range dependencies by building state transition matrix through High-Order Polynomial Projection Operator (HIPPO)35. As a result, it improves efficiency in deep sequence models and matches the global-range modeling capacity of Transformers. In recent years, Mamba further enhances state-space model by employing an input-independent selection mechanism which makes SSM be content-awareness. In addition, a hardware-aware algorithm is designed to speed up computation on modern hardware. Multi-way Mamba process block Following the successful Transformer-based network architecture, the proposed Multi-way Mamba Process Block (MMPB) uses pipeline. Instead of relying on Scaled Dot-Product Attention9, MMPB replaces attention with Mamba block to capture global dependencies of deep feature. Multi-way image sequence Due to its linear computational complexity, Mamba efficiently models long sequences, making it as a reasonable approach for capturing adjacent pixels interactions. As illustrated in Fig. 3, vanilla Mamba block flattens image feature as 1-direction token sequence. Numerous studies27,36,37 have explored various flattening strategies, such as 4-directional, sliding window, and zigzag scanning, to more comprehensively leverage spatial information. However, the contribution of over-engineered methods to overall performance may not generalize across all tasks, with Zhu et al.38 reporting only marginal gains. Therefore, this study opts to combine horizontal and vertical zigzag scanning strategies to both preserve the spatial continuity of adjacent image patches and reduce computational complexity. Fig. 4 illustrates the workflow, where is the input feature and C is the channel dimension. The process begins by flattening to size (L, C) according to the traverse direction, where : Subsequently, SSMs process these two sequences and restore the spatial structure of the sequences to (C, H, W) by inverting the zig-zag flattening operation. After that, two sequences and are added elementwisely to generate the resulting output. Moreover, the whole computation is constructed as a residual form by adding a skip connection of input feature. The above steps can be described as: Comparison between (a) the standard Mamba scan and (b) the two-directional zigzag scanning strategy. Illustration of the Multi-way Mamba Process Block (MMPB), which processes the sequence of mural patches in two zigzag directions. Feed-forward network Non-linearity in the canonical Transformer is introduced by the feed-forward network (FFN). This module typically composes of two linear transformations with an activation layer in between (see Fig. 5(a)). Let be the input value, the feed-forward layer can be expressed as follows: where are parameter matrices, are bias terms, f is a non-linearity such as ReLU or GELU. Given the special properties of SSMs, MambaIR’s architecture29 was adapted by structuring its FFN as a variant of a Squeeze-and-Excitation (SE)39 module. As shown in Fig. 5(b), their design employed a bottleneck to enhance local similarity and was utilized to compress redundant channel information. In this work, the proposed FFN architecture (Fig. 5(c)), which is inspired by Li et al.40, integrates a depth-wise convolutional layer to enhance locality. Furthermore, in line with recent advancements in gated linear unit (GLU) variants for feed-forward networks41, this module utilizes a gating mechanism for adaptive feature selection. Let be the input feature, the proposed FFN in Fig. 5(c) is given by: where Norm is a normalization layer, denotes the Hadamard product (element-wise multiplication), , , , are convolution kernels. Architecture comparison between (a) the canonical feed-forward network in Transformer, (b) the Conv-CA module in MambaIR29, (c) the feed-forward network designed for the proposed CNN-Mamba hybrid architecture, DWConv denotes depth-wise convolution. The edge inpainting network Structure priors offer powerful guidance. Unfortunately, existing methods are often constrained by using Canny edges for restoration13,14,16. Since Canny operator is highly sensitive to low-level and irrelevant structure details, this makes it difficult to represent the semantic structural information that images contain. To overcome this issue, the proposed edge inpainting network utilizes the MuGE6 edge as a robust guidance. This deep learning-based method pays more attention to semantic structure of the murals and suppresses fine-grained edge details that might misguide the restoration process. Let denote the MuGE edge of ground truth image and be the binary mask (0 for background, 1 for the missing region), the input of edge generator is defined as . The generator yields a restored MuGE edge and composes it with the uncorrupted part of ground truth: As shown in Fig. 2, the edge generator consists of an input convolution layer, three down-sample convolutional blocks, three up-sample convolutional blocks, and an output convolution layer. These convolutional blocks adopt pre-activation42 form for processing regional features. The architecture of these blocks is visualized in the bottom of Fig. 2. To make the generator’s output more realistic, the adversarial training approach is adopted. Specifically, the Patch-GAN discriminator of the edge inpainting network takes pair as real and fake samples for adversarial training. The mural inpainting network The proposed mural inpainting network leverages an encoder-decoder backbone, with several specialized fusion blocks introduced in the encoder. Specifically, all the convolutional down-sample blocks are replaced with the proposed Structure-Guided Fusion Blocks (SGFBs). This substitution is designed to leverage multi-scale structural information from the edge generator and guide the mural restoration network to generate more semantically plausible and structurally coherent murals. In addition, the proposed MMPBs are stacked between the convolutional down-sample and up-sample blocks. In this position, they can effectively model the long-rage dependencies between regional patches. As illustrated in Fig. 2, multi-scale edge maps, denoted as , are obtained by down-sampling the restored edge map . Each single-scale edge map is first processed by a 33 convolution to obtain edge feature . This edge feature is then concatenated with the corresponding input feature of convolutional down-sample block. Given generated from the input convolution layer, the pipeline of obtaining is shown in Fig. 6. Similar to the GLU in MMPB, the gating mechanism in SGFB aims to enhance image features by selectively filtering and fusing edge features. The aforementioned process is formally expressed as: where CB denotes convolutional block in Fig. 2, concat denotes channel-wise concatenation, is a convolution kernel. Given the ground truth image , the mural inpainting generator uses corrupted mural , and return the restored mural: In a similar manner, the discriminator of mural inpainting network takes pair as real and fake samples for adversarial training. The architecture of the proposed Structure-Guided Fusion Block (SGFB). Loss functions Firstly, the adversarial loss is essential to improve the perceptual fidelity of the synthesized mural, therefore the non-saturating loss33 with regularization43 is adopted. The objective function for the discriminator is formulated as: The generator objective is: Here, G denotes the generator, D represents the discriminator, x is a sample from the training dataset, m is a mask and is the regularization parameter, with being empirically set to 0.001. Secondly, the feature matching loss44 based on the discriminator is utilized to stabilize the training process. As the ground truth and predicted features derived from the discriminator’s t-th layer, denoted as , the feature matching loss is designed to match the ground truth and the recovered image at multiple scales and can be calculated as: where represents pixel-wise summation within the height and width, T is the total number of discriminator’s feature extraction layers, is the input mask M scaled to match the discriminator’s feature size at layer t, is the total count of masked pixels in . As explored in the field of image restoration, perceptual loss is widely adopted to enhance the similarity of results with human visual perception. This loss function measures the perceptual distance between the generated image features and the reference image features, which are obtained from a pre-trained neural network. Consistent with the implementation of LPIPS45, let be the reconstructed and ground truth features extracted from the p-th layer of a pre-trained AlexNet46, which are unit-normalized across the channel dimension. The perceptual loss is introduced as: where is the learned weights from the official pre-trained LPIPS model, is the summation over all spatial locations, P corresponds to the count of activation layers in AlexNet. In summary, since the default LPIPS model is mainly pre-trained on RGB images, the optimization of edge inpainting network relies on adversarial loss and feature matching loss: The loss function of the mural inpainting network is: where are the scaling parameters, which are empirically set to 2, 100, and 10, respectively. Experiments In this section, the datasets, experimental settings, competing methods and metrics are first described. Then, the presented model is evaluated and analyzed through a series of comparative evaluations and ablation analysis. Experimental settings Datasets A specialized dataset was constructed by combining two public sources: the DhMurals dataset47 and Dunhuang Challenge dataset48. The former dataset contains 1714 mural images which mainly depict Buddhist and religious themes. The latter contains 600 paintings digitized from Cave 7 of Mogao Grottoes, with a collection of various categories such as architecture, traditional dance, Buddha statues, and stylistic motifs. The composite mural dataset of 2314 images was partitioned into a training set (1920 images), a validation set (214 images), and a test set (180 images). In addition, the training set was augmented with horizontal flips to prevent overfitting and strengthen the generalization performance. This process yielded a total of 3840 training samples. To evaluate the generalization ability of the proposed network, the Chinese landscape painting dataset49 was selected. This choice is motivated by the inherent stylistic consistency between the two domains, as Chinese landscape paintings share similar patterns and textures with traditional murals. This dataset contains 2192 high-quality Chinese landscape paintings collected from open-access museum galleries. Following the similar data configuration, the Chinese landscape painting dataset was partitioned into a training set of 1920 images, a validation set of 92 images, and a test set of 180 images. The same augmentation strategy was applied to the Chinese landscape painting dataset. Implementation details Training details. The proposed model was implemented in Pytorch. Training was launched on a single NVIDIA 3090TI GPU (24GB) with the batch size of 6. To stabilize the adversarial training, the network was optimized using the Adam optimizer50 with a learning rate of , and decay rates and . Parameters of loss functions were opted empirically. All the edge inpainting network models were trained for 200 epochs using the constant learning rate mentioned above. As for the mural inpainting network models, the initial training was conducted for 200 epochs with a fixed learning rate. For the state-of-the-art comparison, the mural inpainting network model was subsequently finetuned for an additional 100 epochs and the learning rate was linearly decayed from the aforementioned value to a minimum of . MuGE edge generation. All the MuGE edge maps were generated from the images within the train, val, and test splits using the pre-trained model publicly released by the authors6. Masks settings. To simulate different damage ratios on the murals, experiments were performed on irregular mask datasets7. Irregular masks from this work were classified into four groups with masking ratios ranging from 10% to 50%, in increments of 10%. To avoid leakage of masks, 200 masks are randomly sampled from every mask group for evaluation. In the experiments, all the images were resized to 256256 pixels. Comparison methods and metrics The proposed approach is quantitatively and qualitatively compared with seven state-of-the-art image inpainting methods: CTSDG14, CoordFill51, DRFNet52, EdgeConnect13, LaMa1, MISF2, T-former53. CTSDG employs a CNN-based two-stream framework to mutually process texture and structure features. CTSDG employs a CNN-based two-stream framework to mutually process texture and structure features. CoordFill leverages a Multi-Layer Perceptron (MLP) to learn a direct mapping from spatial coordinates to reconstructed pixel values and offers an efficient alternative to conventional methods. CoordFill leverages a Multi-Layer Perceptron (MLP) to learn a direct mapping from spatial coordinates to reconstructed pixel values and offers an efficient alternative to conventional methods. DRFNet decomposes inpainting task into different receptive fields stages and incorporates Transformer’s multi-head attention to address CNN’s limitations. DRFNet decomposes inpainting task into different receptive fields stages and incorporates Transformer’s multi-head attention to address CNN’s limitations. EdgeConnect is a two-stage CNN-based framework that utilizes the predicted Canny edge maps to guide the subsequent image inpainting. EdgeConnect is a two-stage CNN-based framework that utilizes the predicted Canny edge maps to guide the subsequent image inpainting. LaMa inserts fast Fourier convolution blocks between CNN encoders and decoders to obtain image-wise receptive fields. LaMa inserts fast Fourier convolution blocks between CNN encoders and decoders to obtain image-wise receptive fields. MISF adopts a Siamese-based filtering framework that aligns both CNN structural and texture features to achieve realistic image inpainting. MISF adopts a Siamese-based filtering framework that aligns both CNN structural and texture features to achieve realistic image inpainting. T-former is a Transformer-based architecture that applies a Taylor expansion to approximate original attention mechanism, which aims to reduce quadratic computational complexity. T-former is a Transformer-based architecture that applies a Taylor expansion to approximate original attention mechanism, which aims to reduce quadratic computational complexity. To ensure a fair comparison, all baseline methods were re-trained and tested on the same murals, landscape paintings, and masks splits. The hyperparameters for each baseline were set following the authors’ recommendations or the optimized configurations provided in source code. Peak signal-to-noise ratio (PSNR), structural similarity index (SSIM)54, learned perceptual image patch similarity (LPIPS)45 and error are adopted to evaluate all methods. Results Qualitative comparison Figure 7 shows the qualitative comparison among all methods of murals restoration. It is evident that CTSDG, DRFNet, EdgeConnect and MISF produce obvious artifacts in the restored murals. In the second row of Fig. 7, the proposed method achieves seamless reconstruction around the edge of the red rectangle. Additionally, when handling complex patterns-as visualized in the third row-the proposed method generates the most natural structure and texture. Furthermore, in contrast to the seven baseline models, the proposed approach demonstrates preferable global semantic coherence. For example, the smoke-like curves shown in the last row. Fig.8 presents a qualitative comparison of seven methods for restoring Chinese landscape paintings. Given the inherent poetic imagery of these artworks, maintaining high semantic consistency during inpainting is essential for preserving their aesthetic value. As shown in the second row of Fig. 8, only CoordFill, LaMa, T-former, and the proposed method yield satisfactory results. Due to their ability to process images in the frequency domain, CoordFill and LaMa effectively replicate repetitive textures within the large masked region in the upper-left corner. However, they are limited in their ability to distinguish between background and mountain textures. In the third row of Fig. 8, compared with the seven competing methods, the proposed approach is the only one capable of reconstructing the tree branch details. Moreover, existing methods suffer from inconsistent artifacts in the central hole of the paintings(Fig. 8, bottom row). Qualitative comparison results with state-of-the-art methods on 256256 murals. Qualitative comparison results with state-of-the-art methods on 256256 Chinese landscape paintings. Quantitative comparison To objectively evaluate the performance of the proposed method, a comprehensive quantitative comparison was conducted against seven state-of-the-art image inpainting models. All quantitative metrics are reported as the mean and standard deviation (s.d.) across independent evaluation runs. For each run, a model’s performance is first averaged over the entire test dataset using a unique set of randomly sampled masks. The reported s.d. reflects the performance fluctuation across these 10 distinct mask distributions. For each individual run, all models were evaluated using the identical set of masks to ensure a fair comparison. The detailed results of the comparison are presented in Table 1. Table 1Quantitative comparison on the mural and landscape painting dataset. All metrics are reported as mean (s.d.) over independent evaluation runs, with each utilizing a unique set of randomly sampled masks. () indicates higher (lower) is better. The best average results are highlighted in bold.Mural10%−20%20%−30%MethodPSNRSSIMLPIPSPSNRSSIMLPIPSCTSDG28.16 (0.13)0.9321 (0.0006)0.0415 (0.0006)1.026 (0.013)24.51 (0.12)0.8670 (0.0007)0.0865 (0.0009)2.011 (0.018)CoordFill28.84 (0.12)0.9381 (0.0006)0.0337 (0.0005)0.951 (0.012)25.20 (0.12)0.8786 (0.0006)0.0690 (0.0009)1.857 (0.017)DRFNet28.54 (0.14)0.9368 (0.0005)0.0365 (0.0006)0.982 (0.013)24.75 (0.13)0.8739 (0.0007)0.0760 (0.0009)1.950 (0.019)EdgeConnect27.55 (0.14)0.9218 (0.0007)0.0475 (0.0009)1.160 (0.015)24.24 (0.12)0.8551 (0.0005)0.0911 (0.0009)2.182 (0.016)LaMa28.51 (0.10)0.9344 (0.0006)0.0347 (0.0006)1.006 (0.012)24.95 (0.12)0.8725 (0.0006)0.0707 (0.0009)1.952 (0.016)MISF28.50 (0.10)0.9329 (0.0005)0.0379 (0.0007)1.029 (0.011)24.89 (0.12)0.8695 (0.0006)0.0763 (0.0010)2.004 (0.018)T-former29.12 (0.11)0.9404 (0.0006)0.0305 (0.0007)0.927 (0.012)25.43 (0.14)0.8814 (0.0006)0.0643 (0.0008)1.825 (0.018)Ours29.47 (0.11)0.9392 (0.0005)0.0295 (0.0005)0.914 (0.010)25.91 (0.13)0.8822 (0.0007)0.0591 (0.0007)1.756 (0.016)Mural30%−40%40%−50%MethodPSNRSSIMLPIPSPSNRSSIMLPIPSCTSDG22.50 (0.08)0.8077 (0.0010)0.1271 (0.0010)2.946 (0.021)20.77 (0.04)0.7369 (0.0008)0.1783 (0.0011)4.077 (0.022)CoordFill23.21 (0.09)0.8242 (0.0011)0.1001 (0.0009)2.713 (0.022)21.49 (0.06)0.7594 (0.0009)0.1404 (0.0009)3.744 (0.021)DRFNet22.70 (0.10)0.8166 (0.0012)0.1108 (0.0010)2.867 (0.027)20.92 (0.05)0.7475 (0.0010)0.1569 (0.0011)3.988 (0.026)EdgeConnect22.35 (0.08)0.7946 (0.0011)0.1293 (0.0010)3.145 (0.028)20.69 (0.05)0.7247 (0.0008)0.1781 (0.0011)4.298 (0.022)LaMa23.01 (0.08)0.8164 (0.0009)0.1032 (0.0008)2.843 (0.020)21.34 (0.06)0.7500 (0.0009)0.1464 (0.0012)3.914 (0.020)MISF22.89 (0.10)0.8117 (0.0011)0.1100 (0.0009)2.933 (0.025)21.15 (0.05)0.7425 (0.0008)0.1537 (0.0010)4.053 (0.021)T-former23.41 (0.10)0.8274 (0.0011)0.0947 (0.0010)2.679 (0.022)21.62 (0.06)0.7614 (0.0010)0.1363 (0.0011)3.735 (0.020)Ours23.91 (0.09)0.8295 (0.0010)0.0854 (0.0010)2.563 (0.019)22.14 (0.06)0.7662 (0.0008)0.1197 (0.0007)3.541 (0.018)Landscape10%−20%20%−30%MethodPSNRSSIMLPIPSPSNRSSIMLPIPSCTSDG32.54 (0.08)0.9353 (0.0005)0.0481 (0.0003)0.681 (0.005)29.43 (0.07)0.8779 (0.0010)0.0927 (0.0011)1.265 (0.014)CoordFill32.83 (0.06)0.9382 (0.0005)0.0393 (0.0004)0.661 (0.004)29.76 (0.07)0.8833 (0.0010)0.0736 (0.0009)1.222 (0.013)DRFNet32.51 (0.08)0.9369 (0.0006)0.0427 (0.0005)0.689 (0.005)29.29 (0.07)0.8789 (0.0010)0.0821 (0.0010)1.293 (0.014)EdgeConnect31.55 (0.09)0.9254 (0.0006)0.0608 (0.0005)0.787 (0.006)28.69 (0.05)0.8663 (0.0010)0.1075 (0.0013)1.412 (0.010)LaMa32.61 (0.13)0.9367 (0.0005)0.0417 (0.0004)0.675 (0.005)29.61 (0.10)0.8807 (0.0011)0.0799 (0.0011)1.244 (0.014)MISF32.39 (0.07)0.9332 (0.0005)0.0458 (0.0004)0.711 (0.004)29.36 (0.07)0.8753 (0.0010)0.0847 (0.0009)1.304 (0.014)T-former32.86 (0.07)0.9384 (0.0005)0.0372 (0.0004)0.655 (0.004)29.81 (0.07)0.8836 (0.0010)0.0720 (0.0008)1.211 (0.013)Ours32.94 (0.07)0.9363 (0.0005)0.0369 (0.0003)0.667 (0.004)29.91 (0.07)0.8817 (0.0011)0.0676 (0.0007)1.220 (0.013)Landscape30%−40%40%−50%MethodPSNRSSIMLPIPSPSNRSSIMLPIPSCTSDG27.66 (0.05)0.8262 (0.0011)0.1313 (0.0009)1.811 (0.019)26.13 (0.04)0.7669 (0.0013)0.1778 (0.0012)2.447 (0.019)CoordFill28.05 (0.05)0.8343 (0.0012)0.1036 (0.0007)1.738 (0.019)26.57 (0.04)0.7782 (0.0012)0.1391 (0.0012)2.335 (0.019)DRFNet27.49 (0.04)0.8270 (0.0010)0.1169 (0.0007)1.855 (0.020)25.99 (0.05)0.7677 (0.0012)0.1588 (0.0010)2.498 (0.018)EdgeConnect27.01 (0.05)0.8130 (0.0009)0.1481 (0.0010)2.000 (0.017)25.58 (0.04)0.7545 (0.0012)0.1945 (0.0015)2.678 (0.019)LaMa27.92 (0.05)0.8309 (0.0010)0.1141 (0.0009)1.769 (0.018)26.45 (0.07)0.7743 (0.0011)0.1567 (0.0012)2.377 (0.020)MISF27.64 (0.05)0.8233 (0.0010)0.1187 (0.0009)1.852 (0.018)26.15 (0.04)0.7642 (0.0011)0.1589 (0.0012)2.485 (0.018)T-former28.08 (0.05)0.8342 (0.0010)0.1033 (0.0009)1.730 (0.018)26.57 (0.04)0.7774 (0.0011)0.1428 (0.0010)2.333 (0.019)Ours28.24 (0.06)0.8330 (0.0011)0.0941 (0.0007)1.726 (0.019)26.75 (0.04)0.7775 (0.0013)0.1257 (0.0007)2.313 (0.020) Quantitative comparison on the mural and landscape painting dataset. All metrics are reported as mean (s.d.) over independent evaluation runs, with each utilizing a unique set of randomly sampled masks. () indicates higher (lower) is better. The best average results are highlighted in bold. As the data shows, the proposed method demonstrates increasingly competitive performance across all metrics, showing particular robustness at higher mask ratios. For PSNR and SSIM, higher values indicate better results, denoting a closer pixel-level and structural resemblance to the ground truth. The presented model achieves the highest PSNR scores for both datasets at every mask ratio. Regarding SSIM, the proposed approach achieves the highest scores on the mural dataset for all mask ratios above 20%. For the landscape painting dataset, it exhibits a slight performance gap compared to T-former and CoordFill. A possible explanation for this result is that the Multi-head attention remains an effective mechanism for modeling global structure, and the continuous coordinate querying mechanism in CoordFill naturally preserves local smoothness. Meanwhile, this performance gap in SSIM indicates that there is room for optimization in the Mamba-based approach to narrow the metric margin while maintain the linear complexity. For LPIPS and error, lower scores are better. The proposed method shows encouraging robustness, with its performance advantage becoming more evident at larger mask ratios. These results indicate that the presented model generates images with improved perceptual fidelity and promising structural consistency. Model efficiency analysis To comprehensively evaluate the practicality of the proposed SGCM-Net and address the computational concerns associated with Transformer-based and diffusion-based models, an efficiency analysis was conducted. Table 2 summarizes the number of parameters (Params), GPU memory consumption (Memory), and inference time (Time) per image across different methods. All tests were performed at a image on a single NVIDIA Tesla P100 GPU. Table 2Efficiency analysis of different methods at resolution.MethodsParams(M)GPU memory(MB)Time(ms)/imgCTSDG52.1839.547.1CoordFill31.6237.917.1DRFNet183.5734.832.8EdgeConnect21.5258.334.8LaMa27.0141.124.5MISF23.1360.333.1T-Former14.8264.958.8SD-Inpainting1066.34430.92664.0Ours27.4203.327.6 Efficiency analysis of different methods at resolution. As shown in Table 2, while T-Former achieves competitive inpainting result, its Dot-Product Attention mechanism introduces noteworthy computational overhead. Consequently, T-Former exhibits the highest inference latency among the non-diffusion baselines. In contrast, the proposed SGCM-Net requires only 27.6 ms per image and 203.3 MB of memory, reducing the inference time while maintaining a lower GPU memory consumption. In addition, the proposed model exhibits efficiency closely comparable to competitive CNN-based method (e.g., LaMa) and offers adequate inpainting results. Furthermore, the official SD-Inpainting model55, fine-tuned on laion-aesthetics v2 5+, was also included as a baseline and the denoising process was set to 30 sampling steps during inference. While diffusion models have demonstrated impressive generative performance, their iterative denoising process is extremely resource-intensive. Even at a resolution, SD-Inpainting demands over 1 billion parameters, consumes 4430.9 MB of memory, and takes 2664.0 ms per image. Such computational overhead constrains the feasibility of deploying diffusion models in on-site restoration environments, especially when considering the demand for processing high-resolution mural images captured by digital cameras. Ablation study As illustrated in Table 4, these are the base models configuration that used in the ablation studies. All the baselines in ablation studies are modified from these models. Specifically, w/Edge denotes whether the edge inpainting network is incorporated or not. w/SGFBs indicates whether the mural inpainting network employs Structure-Guided Fusion Blocks or convolutional blocks. MMPBs stands for the number of Multi-Way Mamba Process Blocks in the mural inpainting network. Table 4Configuration of models used in the ablation study.Modelw/Edgew/SGFBsMMPBsA8B-8C--0D--8 Configuration of models used in the ablation study. On the structural priors Existing inpainting methods5,13,14,16 primarily employ Canny edges as a structural prior. A predominant limitation of this approach is that the Canny operator treats all image regions uniformly, often generating excessive high-frequency details. To validate the efficacy of employing the MuGE edge, various experiments are conducted across different prior inputs on the mural dataset. The base model of this ablation study uses the configuration (A) from Table 4 for all prior variants, except for the w/o edge variant, which is created from the configuration (D) in Table 4. The quantitative results are summarized in Table 3, where the reported PSNR and SSIM metrics represent the average performance computed across 0–50% mask ratios. Here, M stands for utilizing solely MuGE edge during training; C2.0 denotes the use of Canny edge priors with a Gaussian coefficient of . Table 3Quantitative comparison of different priors on the mural dataset. M stands for MuGE edge; C2.0 stands for Canny edge with Gaussian coefficient .w/o edgeC2.0C3.0C5.0MPSNR26.0926.6526.8426.7927.03SSIM0.8610.8700.8730.8720.875 Quantitative comparison of different priors on the mural dataset. M stands for MuGE edge; C2.0 stands for Canny edge with Gaussian coefficient . The quantitative results demonstrate that the model trained only with MuGE edge (M) achieves a PSNR of 27.03 dB, further outperforming the best Canny baseline (C3.0) at 26.84 dB. Compared with w/o edge variant, the higher PSNR and SSIM metrics of the variants with edge guidance indicates that the decomposed design is essential for accurate textures and structural consistency in complex context. Notably, variants with lower Gaussian coefficients () show inferior performance compared to those with higher value (). This is attributed to the fact that lower settings preserve excessive irrelevant structural details, creating high-frequency noise that may misguide the inpainting process. Moreover, as the Gaussian coefficient increases, the PSNR and SSIM metrics show a modest decrease. This performance drop can be explained by the high value, which provides insufficient Canny edge information to guide the inpainting process. These findings align with the ablation studies reported in existing works5,13,16,18. Figure 9 presents visual examples from the ablation study, comparing the structural priors generated by pure MuGE, Canny(), and w/o the edge inpainting network variants. It is evident that variants incorporating the MuGE edge facilitate the faithful reconstruction of geometric shapes, such as the circle around the person’s head. Conversely, the Canny variant struggles to distinguish between structural contours and noise. This tendency causes errors in semantically complex areas, such as the illogical edge connections formed around the person’s eye. Additionally, the missing curves and blurry artifacts of w/o edge variant indicates the necessity of the decomposition design. Overall, the visual results demonstrate that the MuGE edge is more robust than the conventional Canny edge for achieving high-fidelity inpainting. Visual results for ablation study on the structural priors. M stands for MuGE edge; C() stands for Canny edge with Gaussian coefficient ; w/o edge stands for only using the mural inpainting network. The top row shows the input of masked mural and the inpainted edge priors. The bottom row displays the corresponding restored murals and ground truth. The red color areas are restored by the edge inpainting network. On alternative fusion methods of priors The impact of the Structure-Guided Fusion Block(SGFB) is analyzed by comparing the proposed module against a vanilla(No fusion) base model and two established fusion strategies. The first method, denoted as SK, represents Selective Kernel Convolution from SKNets56. The second method, denoted as Bi-GFF, is an effective method validated by multiple models14,16 within the image inpainting domain. The configuration (B) in Table 4 serves as the baseline, which is obtained by replacing all SGFBs with the convolutional blocks shown in Fig. 2. The other two variants are constructed by incorporating the SK and Bi-GFF fusion blocks into the baseline. The quantitative results are presented in Table 5. As expected, the baseline without utilizing any prior as a guidance exhibits the lowest performance, validating the fundamental necessity of prior integration. Notably, among the fusion methods comparison, the Selective Kernel method(SK) outperforms the inpainting-specialized method Bi-GFF. A potential explanation for this effectiveness can be drawn from the hypothesis in the work of Dong et al.5, which suggests that edge features reside in a sparse tensor space. Consequently, the adaptive channel selection mechanism of SK is inherently suitable for prior fusion task in inpainting domain. This perspective also rationalizes the performance of the proposed method, which achieves the highest rank in the study. The proposed design employs a gating mechanism that shares the fundamental selection capability with SK. Meanwhile, the integration of depth-wise convolution extends this selection into the spatial dimensions. This filtering mechanism combined with multi-scale fusion approach leads to the best performance across all evaluated metrics. Table 5Quantitative comparison of three distinct fusion methods on the mural dataset. ( Higher is better; Lower is better).Maskbaselinew/SKw/Bi-GFFw/SGFBPSNR10%−20%28.0328.6928.69 28.77 20%−30%24.8225.5025.43 25.53 30%−40%22.8623.4223.37 23.45 40%−50%21.1521.6721.62 21.69 SSIM10%−20%0.9270.9310.931 0.932 20%−30%0.8630.8710.871 0.872 30%−40%0.8070.8180.817 0.819 40%−50%0.7370.7510.751 0.753 LPIPS10%−20%0.0400.0370.038 0.037 20%−30%0.0770.0710.072 0.070 30%−40%0.1090.1020.102 0.100 40%−50%0.1530.1430.143 0.140 (%)10%−20%1.091.021.02 1.01 20%−30%2.031.891.90 1.88 30%−40%2.942.752.76 2.74 40%−50%4.053.793.80 3.77 Quantitative comparison of three distinct fusion methods on the mural dataset. ( Higher is better; Lower is better). To provide a more intuitive perspective on this spatial selection capability, the internal features of the first SGFB are visualized in Fig. 10. Specifically, by visualizing a representative channel (index 41) of the gating activation and the prior-fused output, the behavior of the proposed module can be revealed. Observation indicates that the gating mechanism highlights the structural priors within the masked region. Consequently, in the fused feature map, the restored edge prior details from the previous edge inpainting stage are clearly retained and integrated. This visual representation aligns with the original design intention, suggesting that the gating mechanism assists in preserving crucial semantic structures for the inpainting process. Visualization of the internal gating activation and the fused output feature map in the SGFB (represented by channel index 41). On varying the number of stacked MMPB blocks In this ablation study, the configuration (C) from Table 4 is used for the base model and all the variants are created from adding different numbers of MMPB. As shown in Table 6, a consistent improvement is observed across all evaluated metrics as blocks are gradually added between the convolutional encoder and decoder. Specifically, increasing the model depth from 0 to 8 blocks yields an average PSNR gain of 0.22dB and an average error reduction of 0.09 across all mask ratios. Furthermore, Table 6 also reveals a consistent reduction in the LPIPS metric. This outcome is attributed to the core design of the MMPB blocks, which leverage Mamba to efficiently model global long-range dependencies. Since LPIPS is highly sensitive to the overall coherence and realism of an image, it benefits directly from the enhanced global context provided by a deeper depth of these blocks. The performance gains begin to plateau when moving toward 8 blocks, which indicates that further additions would provide only marginal benefit. Based on this observation, the depth of MMPBs is set to eight and this configuration is used for all other experiments. Table 6Quantitative ablation study on the number of stacked MMPB blocks ( Higher is better; Lower is better).Mask0 Blocks1 Blocks3 Blocks8 BlocksPSNR10%−20%27.8427.8828.01 28.03 20%−30%24.5924.6924.78 24.82 30%−40%22.6422.7222.78 22.86 40%−50%20.8920.9921.08 21.15 SSIM10%−20%0.9250.9260.927 0.927 20%−30%0.8590.8610.862 0.863 30%−40%0.8010.8040.806 0.807 40%−50%0.7300.7340.736 0.737 LPIPS10%−20%0.0420.0410.040 0.040 20%−30%0.0820.0800.078 0.077 30%−40%0.1170.1130.111 0.109 40%−50%0.1650.1590.155 0.153 (%)10%−20%1.121.111.09 1.09 20%−30%2.102.072.04 2.03 30%−40%3.043.002.96 2.94 40%−50%4.214.144.09 4.05 Quantitative ablation study on the number of stacked MMPB blocks ( Higher is better; Lower is better). On scanning directions As discussed in the Multi-way Mamba Process Block subsection, the design principle of MMPB prioritizes the model computational complexity by avoiding the excessive directional scans. To further validate the rationale of the efficient scanning strategy, this ablation study focuses on the standard left-to-right Mamba scan, independent directional zigzag scans, and their additive fusion(the employed design). The base model uses the configuration (A) in Table 4 and builds all variants by changing the scan direction and removing the horizontal or vertical branch from the MMPBs. As shown in Table 7, while both the horizontal and vertical scanning strategy show comparable performance as standalone components, integrating them leads to a measurable enhancement in overall performance. This performance gap indicates that the adopted scanning strategy properly utilizes the 2D spatial context from two distinct spatial axes and provides complementary improvements. Moreover, the zigzag strategies show slightly better results than the Original direction. This improvement can be credited to the enriched spatial locality provided by increased pixel adjacency. Table 7Quantitative comparison of different image sequence scanning directions. Original refers to the standard Mamba scan (left-to-right scan); Horizontal and Vertical denote zigzag scanning strategies along the respective directions; Composite stands for the addition combination of both horizontal and vertical scans.MaskOriginalHorizontalVerticalCompositePSNR10%−20%28.4928.5828.5228.7720%−30%25.2725.3225.2925.5330%−40%23.2423.2623.2223.4540%−50%21.5021.5221.5221.69SSIM10%−20%0.9300.9310.9300.93220%−30%0.8680.8690.8690.87230%−40%0.8130.8150.8150.81940%−50%0.7450.7480.7470.753LPIPS10%−20%0.0390.0380.0380.03720%−30%0.0750.0730.0740.07030%−40%0.1070.1050.1050.10040%−50%0.1490.1470.1470.140(%)10%−20%1.051.031.041.0120%−30%1.941.921.941.8830%−40%2.822.802.812.7440%−50%3.893.853.873.77 Quantitative comparison of different image sequence scanning directions. Original refers to the standard Mamba scan (left-to-right scan); Horizontal and Vertical denote zigzag scanning strategies along the respective directions; Composite stands for the addition combination of both horizontal and vertical scans. On different designs of FFN An ablation study is conducted comparing the proposed FFN against two alternative designs discussed in the Feed-forward Network subsection and the configuration (D) in Table 4 is utilized for the base model. In Table 8, Conv-CA and MLP denote the Conv+ChanelAttention module from MambaIR29 and the feed-forward network in Transformer, respectively. Replacing the proposed FFN module with these two modules results in two distinct variants. Additionally, to validate the effectiveness of the proposed FFN modules, the FFN modules are completely removed from the base model to yield the w/o FFN variant. As shown in Table 8, the proposed FFN module achieves noticeable refinements in performance while being the most parameter-efficient. It indicates that this module reliably model the local dependencies between nearby pixels by utilizing depth-wise convolution. Following the study of Guo et al.29, this spatial locality in FFN is crucial to address the local pixel forgetting issue of SSMs. Moreover, the gating mechanism in the proposed FFN module is analogous to the SE block in the Conv-CA module, serving to enhance feature robustness. Table 8Quantitative comparison of three FFN variants on the mural dataset. ( Higher is better; Lower is better).Maskw/o FFNw/Conv-CAw/MLPOursPSNR10%−20%27.8328.0327.9328.0320%−30%24.6624.8024.7124.8230%−40%22.7122.8422.7322.8640%−50%21.0121.1421.0521.15SSIM10%−20%0.9250.9270.9260.92720%−30%0.8600.8630.8610.86330%−40%0.8030.8060.8040.80740%−50%0.7330.7370.7350.737LPIPS10%−20%0.0420.0400.0410.04020%−30%0.0800.0780.0790.07730%−40%0.1140.1100.1120.10940%−50%0.1580.1530.1570.153(%)10%−20%1.121.091.101.0920%−30%2.082.042.062.0330%−40%3.002.952.992.9440%−50%4.144.064.114.05Params-+18.88%+36.25%+18.24% Quantitative comparison of three FFN variants on the mural dataset. ( Higher is better; Lower is better). Discussion and limitations Practical and ethical considerations in cultural heritage The integration of structure-guided pipeline and the CNN-Mamba fusion architecture into mural inpainting introduces valuable insights into the field of cultural heritage preservation. From a practical perspective, the proposed method serves as a high-quality digital completion tool. Unlike manual restoration, which cannot be readily reversed, this virtual approach provides experts with intuitive visual outputs before any hands-on work. This auxiliary capability is particularly useful for ancient mural restoration, where historical art documentation is often fragmented and original details may be partially or entirely lost. By training on extensive mural datasets, the proposed method allows conservators to leverage the artistic knowledge of thousands of examples to reduce the reliance on rare records and specialized expertise. However, the ethical usage of AI in this domain should be performed with caution. A major concern involves the misinformation of AI-generated outputs. Despite generating visually plausible murals, the synthesized pixels are predictions rather than original artistic works. Since the model may generate contents that never existed, it is essential to label these AI-generated murals with explicit digital watermarks to avoid fostering public misconceptions or introducing“artificial noise” into the verified cultural heritage archive. Limitations Although the proposed method delivers promising performance in mural inpainting, certain limitations call for further exploration. The primary challenge appears in the context of dealing with extremely large-scale missing areas. To analyze the model’s performance limit, an evaluation was conducted on masks exceeding the 50% ratio. As shown in Table 9, a continuous degradation is presented: values decrease from 20.34 dB (50%–60%) to 14.33 dB (80%–90%). It is observed that as the PSNR drops below 20 dB, the presence of blurry contents and inconsistent structures becomes prominently noticeable. As illustrated in Fig. 11, under such extreme degradation, the remaining ground truth information is insufficient. A deeper analysis indicates that this performance breakdown stems from two coupled factors. First, the edge inpainting network produces incomplete edges and generating noise-like artifact patches (Fig. 11c). Second, as evidenced by Grad-CAM57 visualizations, the MMPB fails to model sufficient global dependencies when the token sequences contain excessive missing data. For regions with relatively successful restoration, the MMPB selectively attends to visually consistent contexts across the image (Fig. 11d). However, in extensively corrupted areas where the inpainting fails, the heatmap becomes misaligned, highlighting entirely irrelevant regions(Fig. 11e). Similar limitations have been reported in established studies4,8, where even state-of-the-art models have difficulty in restoring high-fidelity details in such challenging scenarios. Table 9Quantitative results (PSNR) under high mask ratios (50%–90%).Ratio50%−60%60%−70%70%−80%80%−90%PSNR20.3418.6116.9214.33 Quantitative results (PSNR) under high mask ratios (50%–90%). Failure case analysis under extremely large-scale missing regions (>70% mask ratio). (a) Masked inputs. (b) Inpainting result. (c) Edge prediction. (d), (e) Grad-CAM visualizations of the first MMPB module, with target regions indicated by yellow bounding boxes. Warm-colored regions indicate the areas most relevant to the target. Future work To address the failing cases observed in scenarios with large-scale missing regions, future research could focus on the integration of historical style priors and semantic guidance. Given the limitations of sparse effective information, the external historical knowledge from multiple mural datasets could provide meaningful cues to enrich the details of the restored areas. Specifically, knowledge-aware fusion blocks could be developed within the CNN-Mamba backbone to align latent features with historical artistic priors. This strategy ensures that the synthesized parts in large damaged areas consistent with the original textures and artistic structures. In addition to maintaining semantic consistency, the reconstruction of fine-grained textures needs deeper investigation. By decoupling the inpainting pipeline into multiple stages, an additional refinement network can pay more attention to high-frequency detail restoration, which is a task typically fraught with difficulty in one-step frameworks. Furthermore, the incorporation of the proposed Mamba process modules into the refinement network will serve to further validate their effectiveness and adaptability. Specifically, the Mamba process blocks can be placed inside encoders and decoders to leverage preliminary inpainted results from previous stage, thus restoring the intricate patterns of murals while remaining the computational efficiency. Conclusion This paper introduces a specialized mural inpainting framework called SGCM-Net. Initially, the proposed method employs an encoder-decoder architecture to restore the structures of corrupted murals. Then, Structure-Guided Fusion Blocks are leveraged to incorporate structures into mural inpainting network in a multi-scale way. Following this, a series of novel Multi-Way Mamba Process Blocks are integrated to model global-range relations across the feature maps to attain high-level semantic consistency. Extensive experiments show that SGCM-Net delivers competitive performance compared with the existing popular counterparts. Supplementary Information Supplementary Information. Author contributions Y.Q. contributed to conceptualization, visualization and writing of the original draft. J.C. contributed to formal analysis and supervision. Y.Q. and M.H. carried out data curation. X.Y. and F.W. were responsible for funding acquisition. Y.Q. and J.C. contributed to investigation, methodology, and software. Y.F. was responsible for project administration. J.C. and Y.F. contributed to resources. X.Y. handled validation. Y.Q. and J.C. reviewed and edited the draft. All authors have read and approved the submitted manuscript. Funding This work was supported in part by National Natural Science Foundation of China (Grant No. 62202210, 62076111). Data availability Researchers can access all the datasets for this study via the following links. The DhMurals dataset is available at https://1drv.ms/u/s!AittnGm6vRKLzXorf1nkiDPRQB4D?e=Avv27i. The Dunhuang Challenge dataset can be found at https://www.kaggle.com/datasets/xuhangc/dunhuang-grottoes-painting-dataset-and-benchmark. The Chinese Landscape Painting dataset can be retrieved at https://github.com/alicex2020/Chinese-Landscape-Painting-Dataset. The Irregular Mask dataset is accessible through https://research.nvidia.com/labs/adlr/publication/partialconv-inpainting. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Contributor Information Jianjun Chen, Email: jianjunchen@just.edu.cn. Yan Fan, Email: jsjxy_fy@just.edu.cn. Supplementary Information The online version contains supplementary material available at 10.1038/s41598-026-53498-0. References Associated Data Supplementary Materials Supplementary Information. Data Availability Statement Researchers can access all the datasets for this study via the following links. The DhMurals dataset is available at https://1drv.ms/u/s!AittnGm6vRKLzXorf1nkiDPRQB4D?e=Avv27i. The Dunhuang Challenge dataset can be found at https://www.kaggle.com/datasets/xuhangc/dunhuang-grottoes-painting-dataset-and-benchmark. The Chinese Landscape Painting dataset can be retrieved at https://github.com/alicex2020/Chinese-Landscape-Painting-Dataset. The Irregular Mask dataset is accessible through https://research.nvidia.com/labs/adlr/publication/partialconv-inpainting.