Organizations: School of Computer Science and Technology, Soochow University, Suzhou, China · School of Computer Science and Artificial Intelligence, Zhengzhou University, Zhengzhou, China · Jiangsu Key Lab of Language Computing, China · Huawei Translation Services Center, Beijing, China
Context-aware machine translation (MT) leverages document-level information, yet it does not consistently outperform sentence-level MT, as contextual signals are unevenly beneficial across sentences. Existing training objectives do not explicitly model this variability, limiting a model's ability to adaptively exploit context. In this paper, we propose Cross-Preference Learning (CPL), a preference-based training framework that explicitly captures the complementary benefits of sentence-level and context-aware MT. CPL achieves this by integrating both intra- and cross-condition preferences into the preference optimization objective, providing explicit supervision to exploit informative context while remaining robust to uninformative context. We validate the proposed approach on several public context-aware MT tasks using multiple models, including Qwen3-4B, Qwen3-8B, and Llama-3-8B-Instruct. Experimental results demonstrate consistent improvements in translation quality and robustness across both input conditions, achieved without any architectural modifications.
Figures & tables
Figure 1: Distribution of COMET differences between sentence-level (Sent) and context-aware (Ctx) English–German translations produced by Qwen3-8B.
Model
BLEU
COMET
Sentence-level
31.72
86.12
Context-aware
31.60
86.13
\hdashedline Oracle
33.91
87.17
Table 1: Overall English-to-German translation quality of sentence-level and context-aware translation. Oracle means we always select the better translation from the two systems for each sentence.
Figure 2: Illustration of our approach.
\Block [l]2-1 #
\Block [l]2-1 Model
\Block [c]1-2 En ⇒ De
\Block [c]1-2 En ⇒ Es
\Block [c]1-2 En ⇒ Fr
\Block [c]1-2 En ⇒ It
\Block [c]1-2 En ⇒ Nl
\Block [c]1-2 En ⇒ Ru
\Block [c]1-2 Average
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
\Block [c]1-16 Qwen3-4B
1
Sent-Level
82.51
-
84.91
-
83.13
-
86.94
-
82.71
-
83.12
-
83.89
-
2
Sent-Level tuned
84.41
-
86.88
-
84.62
-
87.97
-
84.88
-
84.58
-
85.56
-
3
Sent-Level CPO
85.14
-
87.43
-
85.18
-
88.66
-
85.88
-
86.19
-
86.41
-
4
Ctx-Aware
-
83.25
-
86.98
-
84.47
-
87.81
-
83.47
-
83.86
-
84.97
Table 2: Performance comparison on COMET. Best and second-best scores are highlighted in dark red and light red . Sent and CTX denote sentence-level input ( x ) and context-aware input ( x and context c ) during inference.
Dataset
Sent
Ctx-gold
Ctx-random
NewsCommentary
82.50
82.71
82.52
IWSLT
78.06
78.70
78.02
Table 3: Performance (document-level COMET) on sentences with useful context. Ctx-random replaces the original context with randomly sampled one.
Model
Coh. ↑
ALTI+ ↑
Fluency ↑
Qwen3-8B
73.28
54.49
3.81
Sent+Ctx tuned
74.78
54.67
3.90
CPL (ours)
75.24
54.90
4.04
Table 4: Additional quality analysis using coherence (Coh.), ALTI+, and GPT-based fluency.
Model
Entity
Tense
Pronoun
DM
BlonD-D
Qwen3-8B
61.71
65.44
74.41
58.01
64.66
Sent+Ctx tuned
77.46
77.10
82.24
76.76
78.35
CPL (ours)
78.22
77.24
82.38
76.99
78.67
Table 5: Average BlonD-D scores on News Commentary X ⇒ En tasks with context-aware translation.
Model
Sent
CTX
Sent+Ctx tuned
85.74
86.31
CPL
87.73
87.89
Table 6: Evaluation results of GPT-as-Judge.
Metric Used
Sent
CTX
BLEU
86.96
87.16
d-COMET
87.97
87.98
s-COMET
87.97
88.03
(d- + s-COMET)/2
87.99
88.06
Table 7: CPL performance (in COMET) using different metrics for selecting intra- and cross-condition preference pairs.
Model
Sent
CTX
CPL
87.99
88.06
CPL w/o (yw+,yl+)
87.98
88.01
CPL w/o (yw+,yl−)
87.88
87.91
Table 8: Effect of removing individual cross-condition preference constraints.
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
Data
Task
Test
CPL
#Doc
#Sent
#Doc
#Sent
News (En ⇒ X)
En ⇒ De
150
5,967
150
5,628
En ⇒ Es
150
5,819
150
5,782
En ⇒ Fr
150
5,795
150
5,890
En ⇒ It
150
5,749
150
5,948
En ⇒ Nl
151
5,992
151
5,925
Appendix
Table 9: Statistics of the test sets and of the data used for CPL preference selection, across the fifteen translation tasks in the News and IWSLT domains. #Doc and #Sent denote the numbers of documents and sentences.
Data
Task
Ps
Pc
Pcr
News (En ⇒ X)
En ⇒ De
4,143
4,277
8,086
En ⇒ Es
4,963
5,051
8,736
En ⇒ Fr
4,768
4,877
8,829
En ⇒ It
4,923
5,024
8,877
En ⇒ Nl
3,904
4,072
8,056
En ⇒ Ru
4,016
4,116
7,841
Appendix
Table 10: Statistics of the preference pairs in cross-condition preference learning, across the fifteen translation tasks. Ps , Pc , and Pcr denote the numbers of intra-condition sentence-level, intra-condition context-level, and cross-condition preference pairs, respectively.
\Block [l]2-1 #
\Block [l]2-1 Model
\Block [c]1-2 En ⇒ De
\Block [c]1-2 En ⇒ Es
\Block [c]1-2 En ⇒ Fr
\Block [c]1-2 En ⇒ It
\Block [c]1-2 En ⇒ Nl
\Block [c]1-2 En ⇒ Ru
\Block [c]1-2 Average
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
\Block [c]1-16 Qwen3-4B
1
Sent-Level
79.00
-
81.29
-
79.50
-
83.26
-
79.35
-
79.23
-
80.27
-
2
Sent-Level tuned
81.55
-
84.25
-
81.74
-
84.81
-
81.94
-
81.02
-
82.55
-
3
Sent-Level CPO
82.40
-
84.90
-
82.37
-
85.57
-
82.98
-
82.73
-
83.49
-
4
Ctx-Aware
-
80.26
-
84.46
-
81.59
-
84.38
-
80.29
-
80.22
-
81.87
Appendix
Table 11: Results of different systems on document-level COMET metric. Best scores are shown in dark red and second-best scores are in light red . Sent and CTX denote sentence-level and context-aware inputs, respectively.
\Block [l]2-1 #
\Block [l]2-1 Model
\Block [c]1-2 En ⇒ De
\Block [c]1-2 En ⇒ Es
\Block [c]1-2 En ⇒ Fr
\Block [c]1-2 En ⇒ It
\Block [c]1-2 En ⇒ Nl
\Block [c]1-2 En ⇒ Ru
\Block [c]1-2 Average
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
\Block [c]1-16 Qwen3-4B
1
Sent-Level
12.64
-
28.95
-
22.16
-
22.75
-
14.78
-
14.38
-
19.28
-
2
Sent-Level tuned
24.92
-
40.05
-
31.94
-
35.38
-
24.38
-
22.20
-
29.81
-
3
Sent-Level CPO
28.99
-
41.73
-
35.16
-
36.25
-
28.61
-
26.49
-
32.87
-
4
Ctx-Aware
-
11.09
-
28.98
-
21.21
-
21.35
-
12.72
-
13.05
-
18.07
Appendix
Table 12: Results of different systems on sentence-level BLEU metric. Best scores are shown in dark red and second-best scores are in light red . Sent and CTX denote sentence-level and context-aware inputs, respectively.
\Block [l]2-1 #
\Block [l]2-1 Model
\Block [c]1-2 Es ⇒ En
\Block [c]1-2 Fr ⇒ En
\Block [c]1-2 Nl ⇒ En
\Block [c]1-2 Ru ⇒ En
\Block [c]1-2 Zh ⇒ En
\Block [c]1-2 Average
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
\Block [c]1-14 Qwen3-8B
1
Sent-Level tuned
89.13
-
87.64
-
89.85
-
84.76
-
86.61
-
87.60
-
2
Ctx-Aware tuned
-
89.29
-
87.79
-
90.08
-
84.94
-
86.85
-
87.79
3
Sent+Ctx tuned
89.20
89.39
87.72
87.89
90.01
90.18
84.85
85.00
86.55
86.93
87.67
87.88
4
CPL (Ours)
89.58
89.73
88.20
88.32
90.33
90.49
85.34
85.50
87.23
87.44
88.14
88.30
Appendix
Table 13: Results of X-to-English translations on sentence-level COMET using Qwen3-8B. Best scores are shown in dark red and second-best scores in light red . Sent and CTX denote sentence-level and context-aware inputs, respectively.
\Block [l]2-1 #
\Block [l]2-1 Model
\Block [c]1-2 Es ⇒ En
\Block [c]1-2 Fr ⇒ En
\Block [c]1-2 Nl ⇒ En
\Block [c]1-2 Ru ⇒ En
\Block [c]1-2 Zh ⇒ En
\Block [c]1-2 Average
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
\Block [c]1-14 Qwen3-8B
1
Sent-Level tuned
87.36
-
85.81
-
88.43
-
82.69
-
84.30
-
85.72
-
2
Ctx-Aware tuned
-
87.66
-
86.10
-
88.74
-
82.98
-
84.62
-
86.02
3
Sent+Ctx tuned
87.45
87.74
85.89
86.17
88.59
88.84
82.75
83.00
84.24
84.68
85.78
86.09
4
CPL (Ours)
87.84
88.10
86.41
86.62
88.91
89.13
83.31
83.57
84.96
85.27
86.29
86.54
Appendix
Table 14: Results of X-to-English translations on document-level COMET using Qwen3-8B. Best scores are shown in dark red and second-best scores in light red . Sent and CTX denote sentence-level and context-aware inputs, respectively.
\Block [l]2-1 #
\Block [l]2-1 Model
\Block [c]1-2 En ⇒ De
\Block [c]1-2 En ⇒ Zh
\Block [c]1-2 Zh ⇒ En
\Block [c]1-2 En ⇒ Fr
\Block [c]1-2 Average
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
\Block [c]1-12 Qwen3-8B
1
Sent-Level tuned
83.37
-
82.67
-
82.18
-
84.37
-
83.15
-
2
Ctx-Aware tuned
-
83.65
-
83.16
-
82.56
-
84.52
-
83.47
3
Sent+Ctx tuned
83.71
83.80
82.81
83.10
82.19
82.67
84.56
84.70
83.32
83.57
4
CPL (Ours)
83.75
84.14
83.83
84.20
83.12
83.56
85.24
85.47
83.98
84.34
Appendix
Table 15: Results of IWSLT2017 translations on sentence-level COMET using Qwen3-8B (up to 256 context tokens). Best scores are in dark red and second-best in light red . Sent and CTX denote sentence-level and context-aware inputs, respectively.
\Block [l]2-1 #
\Block [l]2-1 Model
\Block [c]1-2 En ⇒ De
\Block [c]1-2 En ⇒ Zh
\Block [c]1-2 Zh ⇒ En
\Block [c]1-2 En ⇒ Fr
\Block [c]1-2 Average
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
Sent
CTX
\Block [c]1-12 Qwen3-8B
1
Sent-Level tuned
78.27
-
76.48
-
77.57
-
80.45
-
78.19
-
2
Ctx-Aware tuned
-
78.69
-
77.12
-
78.23
-
80.72
-
78.69
3
Sent+Ctx tuned
78.68
78.91
76.77
77.25
77.61
78.38
80.63
80.92
78.42
78.87
4
CPL (Ours)
78.95
79.39
77.64
78.19
78.62
79.22
81.45
81.73
79.17
79.63
Appendix
Table 16: Results of IWSLT2017 translations on document-level COMET using Qwen3-8B (up to 256 context tokens). Best scores are in dark red and second-best in light red . Sent and CTX denote sentence-level and context-aware inputs, respectively.
Figure 3: COMET under different context lengths (256/512/1024 tokens) on En ⇒ De and En ⇒ Es, for sentence-level ( Sent , solid) and context-aware ( CTX , dashed) inputs. CPL is shown in green and the Sent+Ctx tuned baseline in blue.
Model
Avg. Score
Sent+Ctx tuned (Sent)
73.83
Sent+Ctx tuned (CTX)
73.44
CPL (Sent)
73.89
CPL (CTX)
74.34
Appendix
Table 17: Human evaluation (average total score out of 100) on En ⇒ Es.
Figure 4: Distribution (%) of sentences by COMET differences between context-aware and sentence-level translations. CB/B/P/W/CW = Clearly Better , Better , On Par , Worse , Clearly Worse .
Model
BLEU
COMET
Sent-Level
36.61
87.99
Ctx-Aware
36.80
88.06
+ Prob.
37.14
88.19
+ COMETKiwi
37.13
88.42
+ Oracle
38.63
88.73
Appendix
Table 18: Performance of reranking sentence-level and context-aware translations produced by CPL.
Figure 5: Case studies illustrating that CPL benefits from informative context.
Figure 6: Prompt used for context-dependency evaluation of sentence-level translation.
Figure 7: Strict JSON schema used to constrain model outputs in batched API inference.
Figure 8: Prompt used for Sentence-level translation (Sent-Level).
Figure 9: Prompt used for Context-Aware translation (Ctx-Aware).
Effective document-level machine translation (DocMT) requires capturing long-range discourse dependencies. Recent work has explored retrieval-based and discourse-aware context selection. However, these approaches often lack an explicit mechanism for modeling structured discourse dependencies between distant paragraphs in a document. In this paper, we propose G^2C-MT (Graph-Guided Context for Machine Translation), which views DocMT context selection as a structured path discovery problem on a lightweight discourse graph, rather than retrieving unstructured context sets or relying on expensive LLM-based discourse modeling. In detail, we represent each paragraph as a node and model the relationship between each pair of nodes, considering their semantic similarity, adjacency, and keyword overlap. Furthermore, we propose a depth-biased random walk over the graph to sample a backward context path for each target paragraph. The context path will be used to prompt a large language model (LLM) for translation. This framework naturally supports multi-path context sampling, which can improve robustness by aggregating diverse translation candidates for discourse-ambiguous inputs. Experiments conducted across various domains show that G^2C-MT outperforms strong baselines on multiple LLMs, including DeepSeek-V3, Gemini-2.5-Flash-lite, and the Qwen-2.5/3 series.
Baijun Ji, Zixuan Zhou, Xiangyu Duan +4
School of Computer Science and Technology, Soochow University
In this paper, we introduce a gradient-based head attribution strategy where the Token-level Max-Margin loss is backpropagated to the attention maps. This framework enables a large-scale causal analysis of attention heads, making it suitable for LLMs. We evaluate our method on the task of disambiguation in Context-aware Machine Translation, where we analyze 50 phenomena across 4 models and 4 language directions. We empirically show the alignment of our method with the effects of increasing the attention scores of token-to-token relations on three models and two language directions, ensuring the robustness of our method. Our analysis reveals the presence of the "general-purpose" attention heads that improve the model's performance when attending to different relations. We find that the average attention a head assigns to a relation does not necessarily relate to the model's performance, which suggests that the models developed redundancies during training in terms of the head functions.
Paweł Mąka, Yusuf Can Semerci, Jan Scholtes +1
Department of Advanced Computing Sciences Maastricht University
Document-level translation remains one of the most challenging tasks for large language models, which are constrained by limited context windows that impede global cohesion, while simultaneously suffering from redundant contextual information that degrades translation quality. To address this, we propose a human-like long document translation agent called Loong, which leverages a 3E memory module (Essence-Exemplar-Entity) to store summaries, sentence pairs, and entity records as historical context. Instead of passively attending to all history, Loong performs deep reasoning to adaptively identify the optimal context for translation guidance. Loong optimizes its context policy through reinforcement learning, utilizing preference data derived from its own sampled observe-and-act reasoning trajectories. Empirical evaluations demonstrate that Loong achieves substantial translation quality improvements in English ⇔ Chinese, German, and French directions, with average gains of up to 13.0 points across the three evaluation metrics. Furthermore, Loong exhibits strong generalization across domains and robustness against contextual noise, while maintaining remarkable stability in ultra-long document translation. Our code is released at https://github.com/YutongWang1216/LoongDocMT.
Yutong Wang, Xuebo Liu, Derek F. Wong +6
Institute of Computing and Intelligence, Harbin Institute of Technology, Shenzhen · 2NLP2CT Lab, Department of Computer and Information Science, University of Macau · 3Huawei Translation Services Center