{"id": "http://arxiv.org/abs/2608.16284v1", "title": "TransAnyText: Translating Arbitrary Text in E-commerce Images via Structured Visual Generation", "abstract": "Cross-border e-commerce image translation is essential for global retail, where product images, banners, and detail pages need to be produced in different languages. Existing methods struggle to achieve accurate translation, faithful visual identity preservation, and easy-to-edit outputs, simultaneously. To address these challenges, we introduce TransAnyText, a structured visual code framework that reformulates image text translation as generating renderable HTML patches from source images and target languages. Our framework decouples semantic generation from pixel rendering: a vision-language model (VLM) handles visual understanding, cross-lingual translation, and structured visual generation, while a diffusion model performs background inpainting and pixel-level refinement, followed by deterministic rendering to synthesize the final image. Based on this formulation, we develop a three-stage post-training framework, where supervised fine-tuning (SFT) establishes the image-to-code mapping, privilege-gap weighted self-distillation (PWSD) improves the learning of style and layout tokens, and reinforcement learning with verifiable rewards (RLVR) further optimizes task-level performance. We further introduce TransAnyDataset and TransAnyBench, a multilingual dataset and benchmark for e-commerce image translation. Extensive experiments demonstrate competitive performance against cascaded pipelines, open-source end-to-end models, and closed-source image editing systems, providing an effective, controllable, and editable solution for cross-border e-commerce image translation.", "published_at": "2026-08-17T08:54:14+00:00", "source_updated_at": null, "source_url": "https://arxiv.org/abs/2608.16284v1", "source_hash": "7586f0294b336856d31cf4a8d9ee8039fc9c63e3ccae9d726e65696386ce3015", "source_version": "v1", "full_text_available": true, "evidence_kind": "full_text_excerpt", "analysis_scope": "full_text_excerpt", "scope": "core", "topics": ["post-training", "controllability"], "code_url": null, "has_code": false, "indexable": true, "authors": [], "related_ids": ["http://arxiv.org/abs/2609.13060v1", "http://arxiv.org/abs/2609.13053v1", "http://arxiv.org/abs/2609.07160v1"], "related_work": {"version": "related-work-v1", "status": "not_assessed", "reason": "missing_context", "items": []}, "review": null, "explanations": {}, "full_article_summary": {"format": "research_guide_v14", "analysis_scope": "full_article_map_reduce", "source_hash": "7586f0294b336856d31cf4a8d9ee8039fc9c63e3ccae9d726e65696386ce3015", "source_url": "https://arxiv.org/abs/2608.16284v1", "source_version": "v1", "revision_id": "1f6f64e1205cc46ab8798d410091b8c25498508998bbdf91fa1aaf6ebd9c3e5f", "canonical_text_hash": "3875d8ee56e22a5c18517f394d2da6dcefa1d81ae477b0bfa96811491e99ebaf", "prompt_version": "full-article-research-guide-v14", "sections": {"verdict": {"ru": "Сильный, воспроизводимый по общей схеме метод мультиязычного перевода текста на изображениях: структурированный HTML-код, инпейтинг и детерминированный рендеринг дают лучшие агрегированные результаты среди указанных базовых методов. Однако универсальность ограничена выразительностью HTML/CSS для изогнутого и сильно стилизованного текста.", "en": "A strong, broadly reproducible approach to multilingual image-text translation: structured HTML, inpainting, and deterministic rendering achieve the best aggregate results among the listed baselines. Its generality is limited by HTML/CSS expressiveness for curved and highly stylized text."}, "main_idea": {"ru": "TransAnyText переводит изображение в целевой язык через генерируемые VLM редактируемые HTML-патчи, содержащие текст, позицию, шрифт, цвет и размер. Фон восстанавливается отдельно, после чего патчи детерминированно накладываются на него.", "en": "TransAnyText translates an image into a target language through VLM-generated, editable HTML patches containing text, position, font, color, and size. The background is restored separately, and the patches are then deterministically rendered onto it."}, "claims": {"ru": "Авторы утверждают, что структурированное представление улучшает точность текста, визуальную согласованность и редактируемость по сравнению с пиксельным редактированием. На TransAnyBench для 10 языков заявлены COMET 0.848 для Any→Zh, 0.635 для Zh→Any, 0.672 для Any→En и 0.700 для En→Any — выше указанных базовых методов во всех агрегированных направлениях. Переход от SFT к полной схеме SFT+PWSD+GRPO повышает средний COMET с 0.482 до 0.704, а точность позиции — с 0.218 до 0.697.", "en": "The authors claim that structured representation improves text accuracy, visual consistency, and editability over pixel-based editing. On the 10-language TransAnyBench, they report COMET scores of 0.848 for Any→Zh, 0.635 for Zh→Any, 0.672 for Any→En, and 0.700 for En→Any, exceeding the listed baselines in every aggregate direction. Moving from SFT to the full SFT+PWSD+GRPO pipeline raises mean COMET from 0.482 to 0.704 and position accuracy from 0.218 to 0.697."}, "mechanism": {"ru": "Представление: VLM генерирует HTML/CSS-патчи с переводом и атрибутами размещения и стиля; отдельная модель восстанавливает фон, после чего HTML рендерится детерминированно. Архитектурный порядок: (1) обучить VLM и условную flow-matching inpainting-модель через SFT; (2) обучить image-only student, используя teacher, дополнительно обусловленного HTML исходного языка; (3) взвешивать token-level reverse-KL по разрыву логарифмических вероятностей teacher и student, чтобы PWSD сильнее обучал токены с преимуществом teacher; (4) выполнять GRPO по групповым rollout-выборкам с verifiable rewards за валидность HTML, позицию, перевод и стиль; (5) ограничивать отклонение от PWSD-чекпойнта; (6) при необходимости применять diffusion refinement. Inpainting моделирует линейный probability path от чистого фона к исходному изображению и регрессирует velocity field. Данные и цели включают TransAnyDataset, а оценка — перевод, визуальную достоверность и реализм на TransAnyBench. Точные архитектуры, размеры моделей, расписание оптимизации, гиперпараметры rollout и вычислительные затраты в записях не указаны. План воспроизведения: подготовить 10-язычный набор пар изображение–перевод; обучить VLM генерировать валидные HTML-патчи и inpainting-модель; реализовать PWSD с teacher/student и gap-взвешиванием; добавить GRPO с проверяемыми наградами и KL-ограничением; сравнить SFT, PWSD, GRPO и refinement по COMET, позиции, стилю, визуальной достоверности и реализуемости HTML.", "en": "Representation: the VLM generates HTML/CSS patches containing translated text and placement/style attributes; a separate model restores the background, after which HTML is rendered deterministically. Operation order: (1) jointly train the VLM and conditional flow-matching inpainting model with SFT; (2) train an image-only student against a teacher additionally conditioned on source-language HTML; (3) weight token-level reverse-KL by the teacher–student log-probability gap so PWSD emphasizes tokens where the teacher has an advantage; (4) run GRPO over grouped rollouts with verifiable rewards for HTML validity, position, translation, and style; (5) constrain deviation from the PWSD checkpoint; (6) optionally apply diffusion refinement. Inpainting models a linear probability path from clean background to the original image and regresses the velocity field. Data and targets use TransAnyDataset, while evaluation covers translation, visual fidelity, and realism on TransAnyBench. Exact architectures, model sizes, optimization schedules, rollout hyperparameters, and compute costs are not specified in the records. Reproduction plan: prepare the 10-language image–translation data; train the VLM to produce valid HTML patches and the inpainting model; implement gap-weighted teacher–student PWSD; add GRPO with verifiable rewards and a KL constraint; compare SFT, PWSD, GRPO, and refinement on COMET, position, style, visual fidelity, and HTML renderability."}, "evidence": {"ru": "Набор и benchmark охватывают 10 языков и измеряют точность перевода, визуальную достоверность и реализм. Наблюдаемые абляционные результаты показывают последовательный прирост: SFT даёт средний COMET 0.664 против 0.482 и точность позиции 0.603 против 0.218; полная схема достигает 0.704 и 0.697. Заявленное превосходство относится к перечисленным базовым методам и агрегированным направлениям; записи не дают разбивки по языкам, доверительных интервалов, статистических тестов или доказательства превосходства на неописанных доменах.", "en": "The dataset and benchmark cover 10 languages and measure translation accuracy, visual fidelity, and realism. Observed ablation results show cumulative gains: SFT reaches mean COMET 0.664 versus 0.482 and position accuracy 0.603 versus 0.218; the full pipeline reaches 0.704 and 0.697. The superiority claim is limited to the listed baselines and aggregate directions; the records provide no per-language breakdowns, confidence intervals, statistical tests, or evidence of superiority on unspecified domains."}, "applicability": {"ru": "Метод особенно подходит для многоязычных рекламных и e-commerce изображений, где важны редактируемость, точное размещение текста и сохранение фона. HTML-представление полезно, когда текст в основном прямолинейный и описывается обычными CSS-атрибутами.", "en": "The method is especially suitable for multilingual advertising and e-commerce images where editability, precise text placement, and background preservation matter. HTML representation is most useful when text is mainly straight and describable with standard CSS attributes."}, "limitations": {"ru": "HTML/CSS хуже выражает изогнутый и сильно стилизованный текст; diffusion refinement лишь частично смягчает этот недостаток. Нельзя сделать вывод о качестве на неописанных языках, доменах или базовых методах, поскольку такие результаты отсутствуют в записях. Также не указаны ключевые детали архитектуры и вычислительной стоимости, что ограничивает точную воспроизводимость.", "en": "HTML/CSS is less expressive for curved and highly stylized text; diffusion refinement only partially mitigates this weakness. Quality on unreported languages, domains, or baselines cannot be inferred because those results are absent from the records. Key architectural details and compute costs are also unspecified, limiting exact reproducibility."}, "next_action": {"ru": "Провести контролируемую абляцию переносимости: (1) разделить TransAnyBench по языкам и типам макета; (2) сравнить SFT, PWSD, GRPO и refinement при одинаковом бюджете; (3) отдельно оценить прямой, изогнутый и сильно стилизованный текст по COMET, позиции, стилю и визуальной достоверности; (4) сообщить интервалы неопределённости и вычислительную стоимость.", "en": "Run a controlled transferability ablation: (1) stratify TransAnyBench by language and layout type; (2) compare SFT, PWSD, GRPO, and refinement under the same budget; (3) separately evaluate straight, curved, and highly stylized text on COMET, position, style, and visual fidelity; (4) report uncertainty intervals and compute cost."}}, "source_coverage": {"canonical_text_hash": "3875d8ee56e22a5c18517f394d2da6dcefa1d81ae477b0bfa96811491e99ebaf", "covered_chunks": 4, "map_input_digest": "7825cac71ea03201690c75af5505725a3150a27bb7009f1116a50bf7659c771f", "prompt_version": "full-article-research-guide-v14", "revision_id": "1f6f64e1205cc46ab8798d410091b8c25498508998bbdf91fa1aaf6ebd9c3e5f", "total_chunks": 4}}, "resources": {"version": "paper-resources-v1", "source_hash": "7586f0294b336856d31cf4a8d9ee8039fc9c63e3ccae9d726e65696386ce3015", "evidence_kind": "full_text_excerpt", "availability": "not_checked", "limited": false, "items": []}, "slug": "2608.16284-transanytext-translating-arbitrary-text-in-e-commerce-images-via-structured-visual-generation"}