Source-linked AI summary
Tag-Aware Structured Text Translation: Towards a Systematic Understanding
Zhanglin Wu, Hengchao Shang, Daimeng Wei, Jiaxin Guo, Zongyao Li, Tengfei Song, Ning Xie, Weidong Zhang
TL;DR
Tag-aware translation requires balancing translation fluency with tag fidelity, but existing approaches lack a systematic account of what the task requires. The paper addresses this through hybrid data synthesis, multi-task capability training, and multi-objective alignment, reporting consistent gains over strong baselines across its evaluated settings.
Problem
Existing approaches lack a systematic understanding of the requirements of tag-aware translation.
Source: §1 · p. 2Method
The framework combines Hy-LST data synthesis, four increasingly difficult multi-task SFT tasks, and joint GRPO rewards for fluency, tag fidelity, and tag-scoped translation quality.
Source: §1 · p. 2, §2.2.1 · p. 3Results
The framework achieves consistent gains over strong baselines and validates its approach across six language directions, two base models, and real-world data.
Source: §6 · p. 8Takeaways & Limitations
Across the evaluated settings, the framework progressively reduces tag omission, tag misplacement, and tag-scoped translation quality degradation.
Source: §6 · p. 8Hy-LST’s generated-data quality and diversity depend on DeepSeek-V3’s capability, and replacing it with a weaker model could yield substantially lower gains.
Source: Limitations · p. 9
Abstract
from arXiv · showhide
Internet texts are replete with format tags that carry structural, semantic, and functional meaning. Current large language model (LLM)-based translation systems struggle to balance translation fluency with tag fidelity when processing tagged text. We argue that resolving this tension requires a systematic approach at three interconnected levels: data synthesis, capability building, and multi-objective alignment. At the data level, we identify and formalize a fundamental trade-off between structural tag diversity and translation naturalness in synthetic data generation; existing methods optimize for one at the expense of the other. We propose a hybrid synthesis strategy (Hy-LST) combining LLM-based synthesis tag method and Two-Stage LLM-based synthesis tag method to produce both diverse and natural tagged data. At the capability level, we decompose tag-aware translation into four sub-tasks of increasing difficulty in a multi-task supervised fine-tuning framework, enabling targeted capability acquisition and knowledge transfer. At the alignment level, we design three complementary reward functions under a group relative policy optimization framework, each targeting a distinct objective (fluency, tag fidelity, and tag-scoped translation quality), and show that joint optimization consistently outperforms single-reward alternatives. Experiments on six language directions (en2zh, en2ja, en2de, en2fr, en2ru, de2fr) demonstrate that each level contributes measurable improvements, and the complete system significantly outperforms existing methods. Qualitative analysis reveals specific error patterns and their mitigation after training with our method.
1 Introduction
LLMs struggle to preserve tag fidelity and translation quality on tagged text, and the paper frames this as a need for a systematic approach across data, capability, and alignment.
1 Introduction
- When tags are mishandled in translation, formatting can become chaotic and semantic or functional failures may follow.Tags carry structural, semantic, and functional meaning in formats such as HTML.Source: §1 · p. 1
- The paper identifies three linked gaps: synthetic-data diversity versus naturalness, competing translation capabilities, and fluency versus tag-fidelity objectives.These gaps motivate addressing data synthesis, task decomposition, and multi-objective alignment together.Source: §1 · p. 2
- Hy-LST combines LST’s high naturalness with LST-2S’s high diversity to address the synthetic-data trade-off.The paper identifies this diversity–naturalness trade-off as a data-level gap in tag-aware translation.Source: §1 · p. 2
- A multi-task SFT framework orders four tasks by increasing difficulty to support knowledge transfer across skills.The tasks address fluent semantic mapping, tag recognition and fidelity, tag-scope understanding, and sentence restructuring.Source: §1 · p. 2
- Three complementary GRPO rewards target fluency, tag fidelity, and tag-scoped translation quality; joint optimization outperforms single-reward and no-RL baselines.The objectives address the stated tension between preserving tag structure and producing fluent translation.Source: §1 · p. 2
2 Method
The method addresses tag-aware translation through a systematic framework spanning synthetic-data generation, capability building, and multi-objective alignment. It combines diverse and natural training data, progressively harder supervised tasks, and complementary reinforcement rewards.
2 Method
- The framework addresses the identified gaps through a systematic multi-level approach to tag-aware translation.The supplied method overview identifies it as addressing three gaps.Source: §2 · p. 2
2.1 Hybrid Synthetic Tag
- Hy-LST mixes LST and LST-2S data equally, balancing LST’s naturalness with LST-2S’s structural diversity.LST-2S decouples source tag insertion from target translation, allowing arbitrary source placements but potentially reducing fluency.Source: §2.1 · p. 3
2.2 Two-Stage Tag-Aware Training
- Training has two complementary stages: SFT builds tag comprehension, while GRPO tunes the balance among competing objectives.The SFT tasks are jointly trained before multi-reward alignment.Source: §2.2 · p. 3
2.2.1 Stage 1: Multi-Task SFT
- Four increasingly difficult SFT tasks progress from untagged translation to producing a tagged translation from only the tagged source.Tasks 1–3 provide progressively different auxiliary information; joint training is intended to transfer fluency and contextual reasoning to Task 4.Source: §2.2.1 · pp. 3–4
2.2.2 Stage 2: Multi-Reward GRPO
- GRPO combines rewards for overall fluency, exact tag-set fidelity, and quality within tag-scoped segments.The weighted sum uses α, β, and γ to control the relative importance of the three objectives; each defaults to 1.Source: §2.2.2 · p. 4
3 Experiment
The experiments use six translation directions, expanded and real-world test sets, and metrics for translation quality, tag fidelity, and tag-scoped quality. Baselines and progressive ablations are specified alongside SFT and GRPO training details.
3.1.1 Open-source Dataset
- The dataset covers six directions: en2zh, en2ja, en2de, en2fr, en2ru, and de2fr.Each English-centric direction has about 100K training and 2K development instances; the de2fr set has approximately 90K training pairs.Source: §3.1.1 · p. 4
3.1.2 Extended Testset
- The expanded test set raises tagged samples from 27% to 97%, while samples with only 1–2 tag pairs fall from 82% to 44%.Training examples are synthesized with DeepSeek-v3, whereas the test-set expansion uses three different LLMs to avoid overlap between generating model families.Source: §3.1.2 · p. 5
3.1.3 Real-World Testset
- A real-world test set contains 2,000 naturally tagged English web-page samples for en2zh evaluation.Its naturally occurring tag structures complement the expanded test set.Source: §3.1.3 · p. 5
3.2 Evaluation Metrics
- Evaluation covers translation quality, tag fidelity, and tag-scoped translation quality using BLEU/COMET, XML-ACC/XML-MATCH, and XML-IN-* metrics.XML-IN-BLEU scores text between tag pairs; XML-IN-COMET uses COMET for that tag-scoped evaluation.Source: §3.2 · p. 5
3.3 Baselines
- The baselines include prompting, detag-and-project, masked SFT, AST SFT, LST SFT, and closed-source LLMs.The proposed-method ablation progresses from Hy-LST SFT to multi-task Hy-LST SFT and then multi-reward GRPO.Source: Do our proposed methods provide… · p. 5, §3.3 · p. 5
Do our proposed methods provide additional
- Table 2 reports evaluation results for the en2zh extended test set, and the ablation is designed to quantify each component’s contribution.The supplied passages identify the table’s scope but do not provide its result values.Source: Do our proposed methods provide… · p. 5, Table 2 · p. 6
3.4 Training Details
- SFT uses Qwen2.5-7B with LoRA for up to three epochs; GRPO uses Task4, one-tenth as much data, and early stopping after five non-improving evaluations.SFT selects the checkpoint with the lowest validation loss; GRPO checkpoints are saved every 100 steps.Source: §3.4 · p. 5
4 Results
On the en2zh extended test set, the proposed system improves through hybrid synthesis, multi-task training, and multi-reward alignment, and it outperforms four closed-source LLMs on real-world tagged translation.
4.1 Vanilla LLM Performance
- Prompt scores 60.16 avg., few-shot prompting 68.46 avg., and detag-and-project 76.89 avg., with the latter reaching only 73.65 XML-Match.The reported results characterize prompting and separate translation-then-projection as insufficient for tag-aware translation.Source: §4.1 · p. 6
4.2 Existing SFT-Based Methods
- LST SFT leads existing SFT baselines at 84.37 avg. and XML-Match 85.10, while all three remain short of the proposed method.Masked SFT reaches 82.84 avg. (XML-Match 79.30), and AST SFT reaches 82.61 avg. (XML-Match 80.70).Source: §4.2 · p. 6
4.3 Proposed Method Gains
- Hy-LST SFT reaches 84.55 avg., improving on LST SFT by +0.18 through XML-Match (85.21 vs. 85.10) and XML-IN-COMET (94.64 vs. 94.48).The passage presents this as evidence that the hybrid synthesis strategy balances tag diversity and translation naturalness.Source: §4.3 · p. 6
- Multi-Task Hy-LST SFT reaches 85.21 avg., adding +0.66 over Hy-LST SFT, with BLEU (+2.26) and COMET (+0.35) showing the largest gains.The passage attributes the fluency gains to knowledge transfer without sacrificing tag fidelity.Source: §4.3 · p. 6
- Multi-Reward GRPO reaches 85.62 avg., adding +0.41 and concentrating its gain in XML-Match (+1.25).The three complementary rewards jointly target fluency, tag fidelity, and tag-scoped translation quality.Source: §4.3 · p. 6
4.4 Comparison with Closed-Source LLMs
- On the real-world en2zh test set, the proposed method outperforms all four closed-source LLMs despite using a smaller base model.DeepSeek-V3 has the best translation quality among those models (KIWI 80.45) but lower tag fidelity (55.10).Source: Table 3 · p. 6, §4.4 · p. 6
5 Analysis
The analyses find consistent gains across five translation directions and another base model, alongside progressive reductions in tag errors. Ablations examine synthesis, task decomposition, and reward configuration, including the training cost of GRPO.
5.1 Hy-LST vs. Other Synthesis Methods
- The hybrid LST+LST-2S reaches 84.55, above LST (84.37), AST (82.61), and LST-2S (83.63), while adding AST data yields no further gains.The authors report that LST-2S increases diversity but degrades translation quality in second-stage re-translation; the hybrid balances the trade-off.Source: §5.1 · pp. 6–7
5.2 Multi-Task vs. Single-Task Training
- Multi-task training raises Task4 mode from 84.55 to 85.21 (+0.66) and narrows the gap between inference modes from 0.68 to 0.31.Among single-task modes, Task1 scores 65.86, Task4 84.55, Task3 84.77, and Task2 85.23.Source: §5.2 · p. 7
5.3.1 SFT Necessity for GRPO
- Direct GRPO without SFT scores 62.18, while Multi-Task SFT initialization yields 85.62 versus 84.80 for Task4-only SFT initialization.The authors conclude that GRPO alone cannot acquire tag-structured translation from scratch and that SFT is necessary for basic tag understanding.Source: §5.3.1 · p. 7
5.3.2 Reward Configuration
- The equal-weight multi-reward setting reaches the highest average, 85.62, while skewing rewards trades BLEU against XML-Match and variant averages remain close (85.54–85.62).Single rewards improve only their targeted metrics and do not achieve a meaningful average gain over the SFT baseline.Source: §5.3.2 · pp. 7–8
5.3.3 Cost-Benefit of GRPO
- Multi-Reward GRPO adds +0.41 avg. (85.21→85.62), concentrated in XML-Match (+1.25), using 6% of SFT data but 1.2× training time (44 vs. 38 GPU hours).The paper presents the added cost as potentially justified when precise tag preservation is critical.Source: §5.3.3 · p. 8
5.4 Generalization
- Across all five translation directions, the method achieves the highest average score, and on LLaMA-3.1-8B it reaches 84.03 avg. versus LST SFT’s 82.24 on en2zh.The paper reports that component gains also replicate on LLaMA-3.1-8B.Source: §5.4 · p. 8
5.5 Error Analysis
- Without tag training, omission is the dominant error at 48.00%; the framework reduces omission to 0.10% and scope misplacement to 0.45%.LST SFT reduces omission to 0.25% and scope misplacement to 1.61%; later stages further lower scope misplacement to 1.34% and 0.89%.Source: Table 8 · p. 8, §5.5 · p. 8
6 Conclusion
The conclusion presents tag-aware translation as a fluency–fidelity tension addressed at the data, capability, and alignment levels.
6 Conclusion
- Hy-LST balances structural diversity with naturalness, multi-task SFT transfers knowledge across increasingly difficult sub-tasks, and multi-reward GRPO jointly optimizes fluency, tag fidelity, and tag-scoped quality.Experiments across six language directions, two base models, and real-world data show consistent gains over strong baselines and progressive reductions in tag omission, misplacement, and tag-scoped quality degradation.Source: §6 · p. 8
Limitations
The paper identifies limits in tag-format scope, dependence on synthesis-model quality, and computational overhead.
Tag type scope
- Experiments cover paired HTML/XML tags; extending the framework to hierarchical formats such as LaTeX, especially with cross-document references, remains open.Source: Limitations · p. 9
Dependence on synthesis LLM quality
- Hy-LST depends on DeepSeek-V3 for synthesis, so generated-data quality and diversity—and potentially downstream gains—are bounded by that model’s capability.Unnatural placements or translation errors during LST-2S may propagate into downstream training.Source: Limitations · p. 9
Computational overhead
- Multi-task SFT requires preparing and jointly training four task formats; GRPO adds 1.2× training time (44 vs. 38 hours), which may concern resource-constrained settings.Source: Limitations · p. 9
A Detailed Comparison of LST and LST-2S
On the en2zh extended test set, LST-2S trades higher tag diversity for lower translation quality than LST. This comparison motivates Hy-LST’s goal of balancing both.
A Detailed Comparison of LST and LST-2S
- The comparison is a controlled experiment on the en2zh extended test set, generating ten tagged pairs per sentence with each method.Source: A Detailed Comparison of LST and LST-2S · p. 10
- 4.5 versus 3.7 tag-diversity scores favor LST-2S, while translation quality scores of 77.17 versus 78.89 favor LST.The controlled comparison used ten generated tagged pairs per test sentence and evaluated diversity with an LLM judge and translation quality with COMET22-KIWI.Source: A Detailed Comparison of LST and LST-2S · p. 10, Table 9 · p. 11
- The results show an inverse relationship between tag diversity and translation naturalness, motivating a hybrid strategy aimed at balancing both.Source: A Detailed Comparison of LST and LST-2S · pp. 10–11
B XML-IN-BLEU vs. XML-BLEU
This section compares XML-IN-BLEU with XML-BLEU and includes a tagged search-query example.
B XML-IN-BLEU vs. XML-BLEU
- The section compares XML-IN-BLEU and XML-BLEU; its example tags “Search” as a uicontrol, “list view” as a varname, and “fly” as a term.Source: B XML-IN-BLEU vs. XML-BLEU · p. 11
C Error Case Study
The case study illustrates omission, over-translation, mistranslation, and scope misplacement, contrasting intermediate-baseline errors with the full system’s translations. The examples show that these error types are mitigated in the full system.
C Error Case Study
- The full system resolves all four illustrated error cases, which represent the error distribution quantified in Table 8.Source: C Error Case Study · p. 11
- Omission falls from 48.00% to 0.10%; the Prompt baseline drops the bold tag while retaining its content.Source: C Error Case Study · pp. 11–12
- Over-translation falls from 0.45% to 0.10%; Masked SFT extends a bold tag beyond its intended boundary.Source: C Error Case Study · pp. 11–12
- Mistranslation falls from 0.20% to 0.05%; AST SFT renders varname as warname, a tag-name hallucination attributed to noisy label patterns.Source: C Error Case Study · pp. 11–12
- Scope misplacement falls from 1.61% to 0.45%; LST SFT preserves the tag set but swaps content between ph and varname.Source: C Error Case Study · pp. 11–12
D Per-Direction Evaluation Results
Across five additional language directions, the full method consistently outperforms all baselines, with multi-task SFT and multi-reward GRPO providing complementary gains.
D Per-Direction Evaluation Results
- Across en2ja, en2de, en2fr, en2ru, and de2fr, the full method consistently outperforms all baselines, with multi-task SFT and multi-reward GRPO providing complementary gains.Source: D Per-Direction Evaluation Results · p. 12, Table 11 · p. 13, Table 12 · p. 13