From Restoration to Redrawing: Revitalizing Ancient Chinese Characters by SVG Code Generation and Editing

Weiguang Zhang, Linhua Dong, Bin Dong, Shanshan Jiang, Maizhen Ning, Xiaoqiang Kang, Kun Zhang, Hao Xu, Xiaowei Huang, Wei Wang, Kaizhu Huang, Qiufeng WangarXiv 2026 · arXiv

TL;DR

ReDraw is a novel two-stage vision-language model (VLM) that revitalizes ancient Chinese characters by treating restoration as a structured SVG code generation and editing task. By predicting stroke skeletons before their contours and using reinforcement learning with structure-aware rewards, it faithfully preserves existing historical strokes while accurately redrawing severely damaged ones.

What Problem Does This Paper Address?

Ancient Chinese manuscripts, particularly those written on Han Dynasty bamboo and wooden slips (Hanjian), are invaluable historical records. However, centuries of decay have left them with "damaged ink"—faded, broken, or entirely missing strokes.

Traditional restoration methods typically rely on image-to-image (I2I) translation (like GANs or Diffusion models). While these produce visually plausible results, they suffer from two major flaws:

  1. Lack of Control: They operate on pixels, making it hard to manipulate specific stroke geometries.
  2. Over-Restoration: They often "hallucinate" or alter the geometry of strokes that are actually well-preserved, violating the archaeological principle of "minimal intervention."

The authors argue that restoration should be more like an expert's manual redrawing process: identify what's there, trace it faithfully, and then carefully fill in the gaps.

Methods

The researchers introduce ReDraw, a framework that reformulates restoration into two distinct SVG-based stages:

  • Stage 1: SVG Generation: The model takes a degraded image and generates an initial SVG. It handles two subtasks: Faithful Vectorization (capturing the exact geometry and degradation of observed strokes) and Conservative Tracing (cleaning up mild noise while leaving major gaps for the next stage).
  • Stage 2: Structure-aware SVG Editing: This stage performs Stroke Completion. Crucially, it uses a Skeleton Chain-of-Thought (CoT) approach. Instead of jumping straight to the final shape, the model first predicts the "skeleton" (the central path) of the missing stroke and then generates the "contour" (the outline). This mimics the way a calligrapher thinks about stroke structure.
Figure 3. Overview of ReDraw. A shared VLM generates SVGs for faithful vectorization or conservative tracing first, and then predicts interleaved skeleton–contour paths for stroke completion, appending only contours while preserving existing paths.

To refine the model's output, the authors employed Group Relative Policy Optimization (GRPO), a form of reinforcement learning. They designed "structure-aware rewards" that check if the predicted skeleton matches the predicted contour and if the new strokes overlap correctly with the existing ones.

Datasets

Because high-quality pairs of "degraded vs. perfect" ancient characters are rare, the authors built a massive multi-layer data synthesis pipeline:

  • Ink Layer: 1.2M clean references derived from 120k seal and clerical script vectors.
  • Degradation Layer: Simulated stroke erasure, edge perturbation, and color jitter.
  • Material Layer: Textures from 400 real character-free bamboo slip images.

For real-world evaluation, they curated an expert-verified Hanjian dataset consisting of 320 real glyphs, which they used for few-shot adaptation.

Key Insights and Ideas

  • SVG as a "Structured" Prior: By using SVG code instead of pixels, the model is forced to treat characters as a collection of discrete, editable paths. This naturally prevents the "blurry" or "mushy" artifacts common in pixel-based restoration.
  • The "Skeleton" is the Key: Predicting the skeleton first acts as a geometric constraint. It ensures that even if the ink is missing, the underlying calligraphic structure remains sound.
  • Localized Editing: Unlike I2I models that regenerate the whole image, ReDraw's second stage only appends new SVG paths. This guarantees that the original, observed strokes remain 100% unchanged at the code level.
Figure 1. Comparison on ancient Chinese character restoration paradigms. Image-to-image restoration models (a) and general- purpose VLMs (b) may alter observed strokes or fail to restore severely incomplete strokes. ReDraw (c) generates SVGs through faithful vectorization or conservative tracing, then redraws incom- plete strokes through skeleton-guided editing that appends paths while keeping existing SVG paths unchanged.

Key Results

ReDraw significantly outperformed existing state-of-the-art image restoration models (like SwinIR and DocRes) and general-purpose VLMs (like GPT-4o) across several metrics:

  • Structural Similarity (SSIM): ReDraw achieved 0.9225, compared to the next best baseline at 0.8732.
  • Perceptual Fidelity (LPIPS): It reduced error by 35.7% relative to PromptIR.
  • RL Impact: The GRPO refinement reduced Mean Squared Error (MSE) by approximately 27% compared to standard supervised fine-tuning (SFT), leading to much cleaner stroke connections.
Qualitative comparison showing how GRPO refinement leads to cleaner, more morphologically consistent strokes.

Limitations and Future Work

  • Complexity Limits: The VLM's context window (8k tokens) limits its ability to handle extremely complex characters with dozens of strokes.
  • Severe Damage: The model's reliability drops when more than 50% of a character's strokes are missing.
  • Contextual Blindness: Currently, ReDraw restores characters in isolation. Future work aims to integrate it into a full-page restoration agent that uses surrounding text as context to help "guess" missing strokes more accurately.
  • Human-in-the-loop: The authors suggest that since these are "candidate reconstructions," future versions should allow interactive expert assessment to choose between multiple completion hypotheses.

Summary updated

Abstract

Hanjian manuscripts written on Han Dynasty bamboo and wooden slips are invaluable heritage of ancient Chinese writing but suffer from damaged ink and incomplete strokes. Existing image-to-image restoration methods may alter observed strokes and offer limited control over stroke geometry. Inspired by experts' manual redrawing practices, we address these issues by introducing \textbf{ReDraw}, a two-stage vision-language model(VLM) that reformulates character restoration as Scalable Vector Graphics(SVG) code generation and editing. Stage one targets faithful vectorization of observed strokes geometry or conservative tracing of mildly degraded strokes. Guided by skeleton chain-of-thought reasoning and reinforcement learning with structure-aware rewards, stage two predicts skeletons before contours to redraw severely incomplete strokes by appending paths while keeping existing SVG paths unchanged. To support training, we develop a multi-layer data synthesis pipeline that disentangles ink, material, and degradation to generate 1.2M samples, and derive up to 6,400 adaptation pairs from 320 annotated real glyphs. Experiments demonstrate synthetic restoration performance and adaptability to real Hanjian glyphs. Code and demo will be available upon acceptance.
BibTeX
@misc{zhang2026from,
  author = {Weiguang Zhang and Linhua Dong and Bin Dong and Shanshan Jiang and Maizhen Ning and Xiaoqiang Kang and Kun Zhang and Hao Xu and Xiaowei Huang and Wei Wang and Kaizhu Huang and Qiufeng Wang},
  title = {{From Restoration to Redrawing: Revitalizing Ancient Chinese Characters by SVG Code Generation and Editing}},
  year = {2026},
  eprint = {2611.24084},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.24084},
}
Figure