UniTranslator: A Unified Multi-modal Framework for End-to-end In-Image Machine Translation

Jiahao Lyu, Pei Fu, Zhenhang Li, Shaojie Zhang, Jiahui Yang, Yu Zhou, Can Ma, Zhenbo Luo, Jian LuanarXiv 2026

TL;DR

UniTranslator is a unified, end-to-end multimodal framework designed for In-Image Machine Translation (IIMT) that translates text embedded within images while seamlessly preserving the original visual background and layout. By introducing an Understand-Generation Alignment Module (UGAM) and a Spatial Mask Decoder (SMD), it successfully resolves the semantic conflicts and spatial misalignments that typically plague general large multimodal models.

What Problem Does This Paper Address?

In-Image Machine Translation (IIMT) goes beyond standard text translation: it requires detecting text in an image, translating it into a target language, erasing the old text, and rendering the new text back into the exact same region while maintaining the original font style, background texture, and overall layout.

Traditional approaches rely on a cascaded pipeline (OCR $\rightarrow$ Machine Translation $\rightarrow$ Image Editing), which is highly prone to error accumulation across stages. While recent Unified Multimodal Models (UMMs) offer a promising alternative by handling both understanding and generation in a single network, they suffer from two major bottlenecks:

  1. Understanding-Generation Conflicts: A source phrase can have multiple valid translations. If the model's text-understanding branch predicts one valid translation, but the image-generation branch is supervised to produce a slightly different ground-truth translation, the model receives conflicting training signals.
  2. Spatial Position Misalignment: Standard diffusion models excel at global image coherence but lack fine-grained, pixel-level control. As a result, they often render translated text in the wrong position or alter the surrounding background textures.
Fig. 1: (a) Performance comparison of unified multimodal models and specialized image-to-image translation models on the Translatotron-V(ision) benchmark. (b) Illus- tration of the semantic conflict between the understanding and generation objectives in unified multimodal models for the IIMT task, which could cause the generated out- put to deviate from the target translation semantics. (c) Illustration of the positional inaccuracy issue in existing image editing models for text editing, where the edited text is often placed at an incorrect relative position.

Methods

UniTranslator addresses these challenges by tightly coupling translation understanding and visual text editing within a single framework built on top of a Qwen2.5VL-3B backbone and a Diffusion Transformer (MMDiT) generator.

The framework introduces two novel components:

  • Understand-Generation Alignment Module (UGAM): Instead of forcing the generation branch to strictly follow a rigid text string, UGAM uses a cross-attention mechanism to map the discrete text-understanding representations into a continuous, generation-compatible condition embedding. This mitigates the semantic-to-visual penalty clash.
  • Spatial Mask Decoder (SMD): To enforce precise text placement, SMD predicts a pixel-level binary mask of the target text regions. Supervised by a combination of binary cross-entropy and Dice loss, it injects explicit spatial cues into the generation process, ensuring layout preservation and accurate geometric alignment.
Fig. 2: Overview of UniTranslator, a unified multimodal framework for in-image ma- chine translation. It introduces UGAM for understand-generation alignment and SMD for spatially grounded text editing.

The authors also utilize a Two-Stage Training Strategy:

  1. Module Warm-up: The main backbones are frozen while only the newly introduced UGAM and SMD modules are optimized to establish a stable cross-modal interface.
  2. Joint Fine-tuning: The entire pipeline is jointly fine-tuned using LoRA adapters to optimize end-to-end instruction following and image generation fidelity.

Datasets

The model was evaluated across several diverse benchmarks:

  • Translatotron-V(ision): A synthetic IIMT benchmark covering four languages (German, English, French, Romanian) with relatively simple backgrounds but oriented text layouts.
  • IIMT30k: A realistic benchmark featuring synthetic text rendered onto complex, real-world photographs with cluttered scenes and varied illumination.
  • PRIM: A large-scale multilingual IIMT benchmark containing 7 million training samples and 3,000 test samples paired with real-world TED imagery.
  • TextEditBench: Used specifically to test the model's task generalization capabilities on localized scene text editing.

Key Insights and Ideas

  • Bidirectional Synergy: One of the paper's most compelling findings is that translation understanding and image generation are not competing tasks; they mutually reinforce each other. Adding language-side supervision improves visual consistency and text rendering, while optimizing for image generation enhances the model's translation comprehension by encouraging context-faithful representations.
  • Soft Alignment over Rigid Constraints: Bridging the gap between discrete text tokens and continuous image pixels requires a "soft" representation bridge (like UGAM) rather than rigid text conditioning, which allows the diffusion model to better handle stylistic and contextual variations.

Key Results

UniTranslator achieved state-of-the-art performance across all evaluated benchmarks, outperforming both general-purpose open-source UMMs and specialized specialist models.

On the Translatotron-V benchmark (German $\leftrightarrow$ English), UniTranslator achieved a BLEU score of 25.03 and a Structure-BLEU score of 24.86, significantly outperforming specialized models like Translatotron-V (15.39 BLEU) and proprietary models like GPT-Image-1 (20.75 BLEU). It also maintained superior image fidelity, achieving an SSIM of 0.8184.

Quantitative results on German-English image translation comparing UniTranslator against proprietary, open-source, and specialist models.

Limitations and Future Work

Despite its strong performance, the authors note a few remaining challenges:

  • Highly Stylized Typography: The model occasionally struggles to perfectly preserve fine-grained font attributes under extreme styling, such as eroded graffiti or neon-glowing cursive text.
  • Complex Backgrounds: In highly cluttered real-world scenes, the model can still introduce minor, unintended visual artifacts outside the target text regions.
  • Low-Resource Languages: Performance drops slightly in low-resource language settings, occasionally leading to missing words or inaccurate character rendering due to the underlying foundation model's limitations.

Future work will focus on improving fine-grained style preservation and strengthening background fidelity.

Summary updated

BibTeX
@misc{lyu2026unitranslator,
  author = {Jiahao Lyu and Pei Fu and Zhenhang Li and Shaojie Zhang and Jiahui Yang and Yu Zhou and Can Ma and Zhenbo Luo and Jian Luan},
  title = {{UniTranslator: A Unified Multi-modal Framework for End-to-end In-Image Machine Translation}},
  year = {2026},
  eprint = {2606.24333},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.24333},
}
Figure