Radical-Level Rewards: IDSpect Pushes Qwen-Image Chinese Text Rendering to 0.979 Structural Quality
Decompose Radicals, Then Reward: Fine-Grained Inspection for Accurate Chinese Text Rendering
Yazhen Xie, Xingsong Ye, Zhineng Chen
cs.CV
2026-09-29
IDSpect decomposes Chinese characters into radical tokens and scores token-level F1 against target IDS as GRPO reward, lifting Qwen-Image to 0.979 structure score on GenTextEval.
What problem this solves
Text-to-image models spell English well enough now; Chinese is still where they break. An ideograph is a two-dimensional composition of reusable components under explicit spatial relations, like left-right, top-bottom, and enclosing. Typical failures are local: one corrupted radical, or the right components in the wrong arrangement. The standard fix is RL post-training with an OCR reward, which transcribes the generated image back to text and scores it against the target string. That reward treats each character as an atomic symbol, so repairing half of a broken glyph moves the score not at all and the optimizer has no direction for partial fixes. It fails the other way too: an MLLM-grade OCR can recover the intended character from surrounding context and hand a malformed glyph a perfect score. In the paper's Figure 1, the same malformed character gets 0.00 from a specialist OCR, 1.00 from an MLLM OCR (a false positive), and 0.00 from TextPecker, which collapses anomalous glyphs into "#". None of these rewards can say how wrong a glyph is. IDSpect gives it 0.22.
Method
The generator stays untouched; the reward is rebuilt.
- Target representation. IDS (Ideographic Description Sequence) encodes a character as a tree whose internal nodes are spatial operators and whose leaves are reusable components, flattenable into a token sequence. Using the Unicode 16.0 BabelStone lexicon, every character covered by GB 18030-2022 is recursively decomposed, with depth capped at 10 and sequences capped at 100 tokens. The target text's IDS is computed offline and deterministically.
- Expert IDS recognizer. An SVTRv2 encoder with an NRTR-style Transformer decoder maps a cropped text region straight to an IDS token sequence, autoregressively, with no intermediate character recognition. Training data is IDSynth-1M: one million images rendered with the UnionST engine, with characters sampled near-uniformly. This is the load-bearing design choice. On natural corpora, frequent characters dominate and the model takes a shortcut, recognizing the glyph as a common character and reciting its canonical IDS without looking at the pixels. Balanced random composition cuts the linguistic prior and forces component-grounded prediction.
- Structural reward. A detector crops text regions, the recognizer predicts an IDS sequence per crop, and each prediction is aligned to candidate spans of the target IDS through semi-global edit alignment, NMS deduplication, and a global assignment in which each target token earns credit at most once. The reward is a token-level F1 and is insensitive to the order in which crops were detected.
- Fusion. The final reward is 0.5 × semantic term (edit similarity between OCR transcript and target) plus 0.5 × IDS term, driving Flow-GRPO post-training of LoRA adapters (r=64) on Qwen-Image. In Figure 2, a character that fails wholesale gets 0.0 on the semantic branch, 0.667 on the IDS branch because two thirds of its components match, and 0.334 fused. Both branches are discarded after training; inference cost is unchanged.
Results
Qua. (structural quality) and Sem. (semantic alignment) are scored under the TextPecker protocol.
| Reward | LongText Avg | LongText Qua | LongText Sem | GenTextEval Qua | GenTextEval Sem |
| Frozen base | 0.920 | 0.924 | 0.834 | 0.933 | 0.810 |
| OCR | 0.967 | 0.956 | 0.886 | 0.953 | 0.874 |
| TextPecker | 0.974 | 0.969 | 0.908 | 0.973 | 0.897 |
| IDSpect | 0.972 | 0.975 | 0.928 | 0.979 | 0.911 |
IDSpect posts the best score on all four Qua/Sem columns. On GenTextEval it clears the OCR reward by +0.026 Qua and +0.037 Sem, and TextPecker by +0.006 and +0.014. Its LongText Avg of 0.972 sits just under TextPecker's 0.974.
The most informative ablation row: using the OCR prediction's own IDS as the reference (structural self-consistency, no target anchoring) reaches 0.980 Qua but only 0.901 Sem, while target-anchored crop-wise alignment lands at 0.979 Qua and 0.911 Sem. A structural reward must be tied to the requested text, or the model learns to paint self-consistent glyphs that are still wrong.
Why it matters
This is a reward-design paper, not a new architecture. For teams already running RL post-training on text-to-image models, the finding is directly actionable: move the Chinese-rendering reward from character level to component level, change nothing else, pay nothing at inference, and gain on every structural and semantic metric. The IDSynth-1M recipe of uniform sampling to kill linguistic shortcuts transfers to any recognizer that must read pixels instead of reciting priors. Japanese and Korean share component structure and are the obvious extension; the authors list this as future work.
Honest framing: over TextPecker the margins are incremental (+0.006 to +0.014), and on GenTextEval most of the semantic gain (0.810 to 0.874) comes from doing GRPO at all. The net contribution is turning partial correctness into an optimizable signal.
Limitations
- Qua. and Sem. are TextPecker's own metrics, so one of the baselines doubles as the judge. The original benchmark score is reported alongside, but the ranking still leans on that protocol.
- The IDS recognizer is trained only on synthetic data, and its accuracy on real generated images is never reported separately, so reward noise is unquantified.
- Coverage depends on BabelStone decompositions of GB 18030-2022 with depth 10 and 100-token caps; the conclusion itself lists broader coverage plus Japanese and Korean support as future work.
- Validated on a single generator, Qwen-Image.
- LongText Avg of 0.972 trails TextPecker's 0.974; the fine-grained reward does not win every column.
Terms
- IDS (Ideographic Description Sequence): Unicode-standard tree representation of a character as spatial operators plus components, serializable as tokens.
- Radical: a reusable component of Chinese characters; "明" is "日" and "月" side by side.
- GRPO: Group Relative Policy Optimization; samples a group of outputs per prompt and updates by within-group advantage.
- TextPecker: a structure-aware visual-text evaluator that flags malformed glyphs as "#", also used as an RL reward.
- Flow-GRPO: an extension of GRPO for post-training flow-matching diffusion models.
- SVTRv2: a state-of-the-art scene-text-recognition backbone, used here as the IDS encoder.
Source
Related papers
All paper explainers