Cross-lingual sequence alignment is fundamental for building and exploiting parallel corpora, spanning mappings from documents and sentences down to words and subwords. Existing tools, however, typically specialize in a single granularity, so practitioners often need separate systems for word- and sentence-level alignment---especially in multilingual and long-text settings. We present OmniAlign, a unified multilingual aligner that supports both word-level and sentence-level alignment with a single lightweight model. Built on an encoder-only backbone with strong long-context modeling, OmniAlign induces word alignments from contextualized token similarity matrices, and obtains document-level m--n sentence alignments via sentence embeddings combined with dynamic programming. To balance fine-grained alignment accuracy and sentence-representation quality, we use a four-stage training pipeline: alignment-oriented continued pre-training, self-supervised learning, supervised fine-tuning on human annotations, and sentence-embedding distillation from a strong multilingual teacher. Experiments show that OmniAlign achieves highly competitive performance on both word- and sentence-alignment benchmarks and generalizes well to unseen language pairs. Surprisingly, later-stage supervised fine-tuning on short texts further improves alignment quality while retaining the long-context understanding acquired in earlier training, keeping the model robust on long-text word alignment. \normalsize {\color{blue}Code: https://github.com/MilkDargon/OmniAlign}\par {\color{blue}Model: https://huggingface.co/WPS-Qingqiu/OmniAlign}
Figures & tables
Figure 1: Sequence Alignment Diagram.
Methods
Multilingual
Long Text
Word Alignment
Sentence Alignment
FastAlign ( Dyer et al., 2013 )
✓
GIZA++ ( Och and Ney, 2003 )
✓
SimAlign ( Sabet et al., 2020 )
✓
✓
AwesomeAlign ( Dou and Neubig, 2021 )
✓
✓
AccAlign ( Wang et al., 2022 )
✓
✓
WSPAlign ( Wu et al., 2023 )
✓
✓
Table 1: This report compares OmniAlign with a range of existing state-of-the-art sequence alignment methods. The symbol “ – ” indicates that the capability is independent of the specific model choice.
Figure 2: Overall architecture of OmniAlign, including the sequence alignment model (left) and the multi-stage training pipeline (right).
Languages
ISO 639-1
Languages
ISO 639-1
Languages
ISO 639-1
Chinese
zh
Spanish
es
Italian
it
English
en
Japanese
ja
Korean
ko
French
fr
Russian
ru
German
de
Portuguese
pt
Romanian
ro
Table 2: Supported Languages Evaluated
zh-en
de-en
fr-en
ro-en
ja-en
es-en
pt-en
ru-en
it-en
Train Sents
40.7K
300
300
150
653
105
105
90
103
Test Sents
450
208
147
98
582
245
245
210
243
Avg. Tokens
37
21
16
30
27
19
19
13
19
Table 3: Statistics of the word alignment dataset, where "Avg. Tokens" denotes the statistics for the English source text in the test set.
Methods
zh-en
de-en
fr-en
ro-en
ja-en
es-en
pt-en
ru-en
it-en
FastAlign ( Dyer et al., 2013 )
38.1
27.0
10.5
27.0
51.1
-
-
-
-
GIZA++ ( Och and Ney, 2003 )
35.1
20.6
5.9
26.4
48.0
-
-
-
-
SimAlign ( Sabet et al., 2020 )
21.6
16.6
7.5
22.3
46.6
14.2
14.1
15.4
17.7
AwesomeAlign ( Dou and Neubig, 2021 )
13.3
13.3
3.8
18.7
37.4
12.0
12.7
13.5
15.7
AccAlign ( Wang et al., 2022 )
11.5
12.1
2.8
16.9
36.8
11.1
12.1
12.5
14.3
WSPAlign (Bilingual) ( Wu et al., 2023 )
13.1
11.1
2.8
10.1
19.3
-
-
-
-
Table 4: AER of the test set under different word alignment methods. Lower AER indicates better performance. For each language pair, the best result is bolded and the second-best one is underlined .
Algorithm
en-zh
en-es
en-it
en-de
en-fr
en-ru
de-fr
Gale–Church ( Gale and Church, 1993 )
0.682
0.900
0.977
0.897
0.838
0.911
0.680
BleuAlign ( Sennrich and Volk, 2011 )
0.782
0.819
0.901
0.806
0.757
0.791
0.770
VecAlign ( Thompson and Koehn, 2019 )
0.957
0.892
0.956
0.869
0.880
0.921
0.902
BertAlign ( Liu and Zhu, 2023 )
0.969
0.897
0.984
0.900
0.909
0.938
0.939
SentAlign ( Steingrímsson et al., 2023 )
0.968
0.872
0.978
0.892
0.903
0.920
0.932
CrocoAlign ( Molfese et al., 2024 )
0.660
0.696
0.864
0.804
0.788
0.783
0.714
Table 5: F1 scores of OmniAlign and sentence alignment baseline methods across language pairs. For each language pair, the best result is bolded and the second-best one is underlined .
Table 6: Ablation study on word and sentence alignment performance under different training strategies and embedding models.
Model
Layer
zh-en
de-en
fr-en
mBERT
6
20.5
19.4
6.5
7
19.0
16.6
5.6
8
18.1
15.2
5.4
mGTE-MLM-Base
6
54.8
33.7
18.0
7
43.0
28.3
14.5
8
47.5
30.1
16.0
Table 7: Word alignment AER (%) at different layers for various base models. Within each model group, the best result is bolded .
Model
zh-en-1
zh-en-3
zh-en-5
zh-en-10
zh-en-20
zh-en-50
Awesome-Align
13.3
13.9
15.1
24.8
–
–
ACC-Align
11.5
12.5
15.8
28.1
–
–
BinaryAlign (Bilingual)
4.8
9.6
22.8
–
–
–
OmniAlign (Ours)
8.5
8.6
8.6
9.2
10.5
12.6
Table 8: Word alignment performance under increasing input lengths. The zh-en- n setting denotes long-text inputs constructed by concatenating n samples from the original zh-en test set. Notably, zh–en–50 reaches 1,850 tokens.
Table 9: Alignment performance of OmniAlign and baselines on unseen language pairs
Scenario 1: Word Alignment
Example #1
He had to repeatedly traverse the inner palace’s chambers, yet each attempt ended in failure .
Testing Points
“failure”.
OmniAlign
他得不断地一再地穿过内宫里的屋子;可是他一直 没有成功 。
OmniAlign w/o S.1
他得不断地一再地穿过内宫里的屋子;可是他一直没有 成功 。
Example #2
已知 有 血液疾病及尿酸性肾结石的患者不推荐使用本品, 二岁 以下儿童不得服用。
Testing Points
有; 二岁
Table 10: Case studies of OmniAlign and other sequence alignment methods. Blue indicates correct alignments, red denotes incorrect alignments, and black marks segments with no alignment.