Clear Sky Science · en
A gated-attention multi-prior injection diffusion model for Huashan rock art image restoration
Bringing Ancient Cliff Paintings Back to Life
The Zuojiang Huashan rock art in southern China is a vast cliffside gallery painted more than two thousand years ago. Today, many of these ochre figures and symbols are badly faded, cracked, or missing altogether. This paper presents a digital method that uses advanced image-generation techniques to virtually repair these fragile artworks, aiming to support careful conservation, research, and public appreciation without touching the rock itself.

Why These Cliff Paintings Matter
The Huashan rock art stretches along steep river cliffs and depicts squatting human figures, ritual scenes, and other symbolic forms in striking red tones. It is one of the largest and richest rock art complexes in southern China and Southeast Asia, and a key part of Zhuang cultural heritage. But the pigments, made from iron-rich minerals, are highly vulnerable to rain, wind, biological growth, and human contact. Over centuries, this has led to faded colors, broken outlines, peeling patches, and noisy, weathered textures that can be hard to distinguish from the actual painted motifs. Traditional manual restoration is slow, subjective, and difficult to reproduce, making it challenging to protect such a large, fragile site at scale.
How Intelligent Restoration Can Help
Digital image restoration offers a way to “fill in the gaps” virtually, following the conservation principle of minimal intervention. Instead of repainting the cliff, computers infer likely shapes and textures in missing areas, producing consistent, reversible results that can be stored in high-resolution archives, used for study, and shared with the public through exhibitions and immersive experiences. Previous artificial intelligence work on cultural heritage has focused mainly on detecting damage or segmenting motifs, or on restoring murals where shapes and textures are more regular. Rock art poses a tougher challenge: its meaning lies in subtle contours and symbolic poses, while its surfaces are heavily weathered and irregular. A restoration method must respect the original shapes while still completing rough, broken textures in a believable but not over-invented way.
A New Data Set for Weathered Rock Surfaces
The authors first build a dedicated image dataset for Huashan rock art restoration. They collect 528 candidate images from printed atlases and public online sources, then carefully screen them to retain 177 that clearly show rock art motifs along with visible degradation such as fading, peeling, and blurred boundaries. All selected images are converted to a common color format and resized to 512×512 pixels, with the main painted region centered. To train and test restoration methods in a controlled way, they generate triplets for each sample: (1) a clean reference image, (2) an input image where 30–65% of the area is masked out with black patches to mimic damage, and (3) a mask indicating the missing regions. This setup allows objective, pixel-level evaluation of how well different methods can reconstruct the underlying artwork.

Teaching a Model to Respect Shape and Surface
The core of the paper is a restoration framework built on diffusion models, a recent class of generative methods that gradually turn noise into images through many small denoising steps. Rather than treating all visual cues as one bundle, the authors split guidance into two separate “priors”: one that emphasizes structure (edges and stroke-like contours), and one that emphasizes texture (fine grain and surface roughness). These priors are computed from the still-visible parts of a damaged image using deterministic filters and then encoded into feature maps. A gated attention fusion module decides, at each denoising step, how much to trust structural versus texture guidance and how strongly to inject them into the diffusion process. Early on, the system leans more on stable outlines; later, as noise is reduced, it pays more attention to reconstructing texture details that match the surrounding rock surface.
How Well the Digital Restorer Performs
The team trains and tests their method on the Huashan dataset, comparing it with a wide range of existing image-restoration models, from classic encoder–decoder networks to advanced generative and state-space approaches. Using standard measures of error, sharpness, and structural similarity, their model achieves lower pixel-level errors and higher structural agreement than all baselines on the rock art test set. Ablation studies show that each added component—the dual-branch prior extraction and the gated attention fusion—contributes clear gains. Visual comparisons reveal smoother continuation of human and symbolic contours and more natural integration of restored areas with weathered backgrounds. Attention maps further indicate that the model focuses on missing boundaries, key symbol outlines, and texture transition zones, rather than blindly repainting large areas.
What This Means for Protecting the Past
For non-specialists, the main takeaway is that this method offers a more cautious and interpretable way to digitally repair ancient rock paintings. By separating shape and surface cues and adjusting their influence over time, the model can reconnect broken figures and fill missing patches while keeping the look and material feel of the original cliff. The authors stress that their system is a tool to aid, not replace, expert judgment, and that more diverse data and expert evaluation are needed. Still, the work points toward a future where endangered rock art can be documented, studied, and shared in digitally restored form, preserving both visual impact and cultural meaning without physical intervention.
Citation: Zhao, T., Huang, L., Qi, X. et al. A gated-attention multi-prior injection diffusion model for Huashan rock art image restoration. Sci Rep 16, 10414 (2026). https://doi.org/10.1038/s41598-026-41226-7
Keywords: rock art restoration, cultural heritage, diffusion models, image inpainting, Huashan paintings