File size: 45,990 Bytes
19e67d0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
## **MASK-ALIGN: Self-Supervised Neural Word Alignment**

**Chi Chen** [1] _[,]_ [3] _[,]_ [4] **, Maosong Sun** [1] _[,]_ [3] _[,]_ [4] _[,]_ [5] **, Yang Liu** _[βˆ—]_ [1] _[,]_ [2] _[,]_ [3] _[,]_ [4] _[,]_ [5]

1Department of Computer Science and Technology, Tsinghua University, Beijing, China
2Institute for AI Industry Research, Tsinghua University, Beijing, China
3Institute for Artificial Intelligence, Tsinghua University, Beijing, China
4Beijing National Research Center for Information Science and Technology
5Beijing Academy of Artificial Intelligence



**Abstract**


Word alignment, which aims to align translationally equivalent words between source and
target sentences, plays an important role in
many natural language processing tasks. Current unsupervised neural alignment methods
focus on inducing alignments from neural machine translation models, which does not leverage the full context in the target sequence. In
this paper, we propose MASK-ALIGN, a selfsupervised word alignment model that takes
advantage of the full context on the target side.
Our model parallelly masks out each target token and predicts it conditioned on both source
and the remaining target tokens. This two-step
process is based on the assumption that the
source token contributing most to recovering
the masked target token should be aligned.
We also introduce an attention variant called
_leaky attention_, which alleviates the problem
of high cross-attention weights on specific tokens such as periods. Experiments on four language pairs show that our model outperforms
previous unsupervised neural aligners and obtains new state-of-the-art results.


**1** **Introduction**


Word alignment is an important task of finding
the correspondence between words in a sentence
pair (Brown et al., 1993) and used to be a key
component of statistical machine translation (SMT)
(Koehn et al., 2003; Dyer et al., 2013). Although
word alignment is no longer explicitly modeled in
neural machine translation (NMT) (Bahdanau et al.,
2015; Vaswani et al., 2017), it is often leveraged to
analyze NMT models (Tu et al., 2016; Ding et al.,
2017). Word alignment is also used in many other
scenarios such as imposing lexical constraints on
the decoding process (Arthur et al., 2016; Hasler
et al., 2018), improving automatic post-editing (Pal


_βˆ—_ Corresponding author



**Tokyo**


Induced alignment link: **Tokio - Tokyo**


Figure 1: An example of inducing an alignment link for
target token β€œTokyo” in MASK-ALIGN. First, we mask
out β€œTokyo” and predict it with source and other target
tokens. Then, the source token β€œTokio” that contributes
most to recovering the masked word (highlighted in
red) is chosen to be aligned to β€œTokyo”.


et al., 2017), and providing guidance for translators
in computer-aided translation (Dagan et al., 1993).

Compared with statistical methods, neural methods can learn representations end-to-end from raw
data and have been successfully applied to supervised word alignment (Yang et al., 2013; Tamura
et al., 2014). For unsupervised word alignment,
however, previous neural methods fail to significantly exceed their statistical counterparts such
as FAST-ALIGN (Dyer et al., 2013) and GIZA++
(Och and Ney, 2003). Recently, there is a surge of
interest in NMT-based alignment methods which
take alignments as a by-product of NMT systems
(Li et al., 2019; Garg et al., 2019; Zenkel et al.,
2019, 2020; Chen et al., 2020). Using attention
weights or feature importance measures to induce
alignments for to-be-predicted target tokens, these
methods outperform unsupervised statistical aligners like GIZA++ on a variety of language pairs.

Although NMT-based unsupervised aligners
have proven to be effective, they suffer from two
major limitations. First, due to the autoregressive
property of NMT systems (Sutskever et al., 2014),


Alignment Attention Weights - οΏ½οΏ½οΏ½ οΏ½οΏ½οΏ½οΏ½ οΏ½οΏ½οΏ½οΏ½









Leaky Attention


|t1|Col2|Col3|Col4|Col5|
|---|---|---|---|---|
|t**2**|||||
|t**3**|||||
|t**4**|||||





h **1** h **2** h **3** h **4**




|Col1|Col2|Col3|Col4|
|---|---|---|---|
|t|t|t|t|
|t||||
|t||||





Feed Forward



βœ• L



L βœ•













οΏ½οΏ½οΏ½ οΏ½οΏ½οΏ½οΏ½ οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½ οΏ½οΏ½οΏ½ - οΏ½οΏ½οΏ½ οΏ½οΏ½οΏ½οΏ½ οΏ½οΏ½οΏ½οΏ½


Figure 2: The architecture of MASK-ALIGN.



they only leverage part of the target context. This
inevitably brings noisy alignments when the prediction is ambiguous. Consider the target sentence
in Figure 1. When predicting β€œTokyo”, an NMT
system may generate β€œ1968” because future context is not observed, leading to a wrong alignment
link (β€œ1968”, β€œTokyo”). Second, they have to incorporate an additional guided alignment loss (Chen
et al., 2016) to outperform GIZA++. This loss requires pseudo alignments of the full training data
to guide the training of the model. Although these
pseudo alignments can be utilized to partially alleviate the problem of ignoring future context, they
are computationally expensive to obtain.


In this paper, we propose a self-supervised
model specifically designed for the word alignment
task, namely MASK-ALIGN. Our model parallelly
masks out each target token and recovers it conditioned on the source and other target tokens. Figure 1 shows an example where the target token
β€œTokyo” is masked out and re-predicted. Intuitively,
as all source tokens except β€œTokio” can find their
counterparts on the target side, β€œTokio” should be
aligned to the masked token. Based on this intuition, we assume that the source token contributing
most to recovering a masked target token should be
aligned to that target token. Compared with NMTbased methods, MASK-ALIGN is able to take full
advantage of bidirectional context on the target side
and hopefully achieves higher alignment quality.
We also introduce an attention variant called _leaky_
_attention_ to reduce the high attention weights on
specific tokens such as periods. By encouraging
agreement between two directional models both
for training and inference, our method consistently



outperforms the state-of-the-art on four language
pairs without using guided alignment loss.


**2** **Approach**


Figure 2 shows the architecture of our model. The
model predicts each target token conditioned on the
source and other target tokens and generates alignments from the attention weights between source
and target (Section 2.1). Specifically, our approach
introduces two attention variants, _static-KV atten-_
_tion_ and _leaky attention_, to efficiently obtain attention weights for word alignment. To better utilize
attention weights from two directions, we encourage agreement between two unidirectional models
during both training (Section 2.2) and inference
(Section 2.3).


**2.1** **Modeling**


Conventional unsupervised neural aligners are
based on NMT models (Peter et al., 2017; Garg
et al., 2019). Given a source sentence **x** =
_x_ 1 _, . . ., xJ_ and a target sentence **y** = _y_ 1 _, . . ., yI_,
NMT models the probability of the target sentence
conditioned on the source sentence:



where **y** _<i_ is a partial translation. One problem of

this type of approaches is that they fail to exploit the

future context on the target side, which is probably

helpful for word alignment.

To address this problem, we model the same

conditional probability but predict each target token

_yi_ conditioned on the source sentence **x** and the







_P_ ( **y** _|_ **x** ; _ΞΈ_ ) =







_I_





_P_ ( _yi|_ **y** _<i,_ **x** ; _ΞΈ_ ) (1)



_i_ =1





remaining target tokens **y** _\yi_ :







Alignment











_P_ ( **y** _|_ **x** ; _ΞΈ_ ) =







_I_





_P_ ( _yi|_ **y** _\yi,_ **x** ; _ΞΈ_ ) (2)



_i_ =1







This equals to masking out each _yi_ and then recovering it. We build our model on top of Transformer

(Vaswani et al., 2017) which is the state-of-the-art

sequence-to-sequence architecture. Next, we will

discuss in detail the implementation of our model.





**Static-KV Attention**





As self-attention is fully-connected, directly computing [οΏ½] _i_ _[I]_ =1 _[P]_ [(] _[y][i][|]_ **[y]** _[\][y][i][,]_ **[ x]** [;] _[ ΞΈ]_ [)][ with a vanilla Trans-]

former requires _I_ separate forward passes, in each

of which only one target token is masked out

and predicted. This is costly and time-consuming.

Therefore, how to parallelly mask out and predict

all target tokens in a single pass is important.

To do so, a major challenge is to avoid the representation of a masked token getting involved in

the prediction process of itself. Inspired by Kasai

et al. (2020), we modify the self-attention in the

Transformer decoder to perform the forward passes

concurrently. Given the word embedding **w** _i_ and

position embedding **p** _i_ for target token _yi_, we first

separate the query inputs **q** _i_ from key **k** _i_ and value

inputs **v** _i_ to prevent the to-be-predicted token itself

from participating in the prediction:





**q** _i_ = **p** _i_ **W** _[Q]_ (3)



**k** _i_ = ( **w** _i_ + **p** _i_ ) **W** _[K]_ (4)



**v** _i_ = ( **w** _i_ + **p** _i_ ) **W** _[V]_ (5)





where **W** _[Q]_, **W** _[K]_ and **W** _[V]_ are parameter matrices.

The hidden representation **h** _i_ for _yi_ is computed by

attending to keys and values, **K** = _i_ and **V** = _i_, that

correspond to the remaining tokens **y** _\yi_ :





**h** _i_ = Attention( **q** _i,_ **K** = _i,_ **V** = _i_ ) (6)



**K** = _i_ = Concat( _{_ **k** _m|m ΜΈ_ = _i}_ ) (7)



**V** = _i_ = Concat( _{_ **v** _m|m ΜΈ_ = _i}_ ) (8)





In this way, we ensure that **h** _i_ is isolated from the

word embedding **w** _i_ in a single decoder layer. However, there exists a problem of information leakage

if we update the key and value inputs for each position across decoder layers since they will contain

the representation of each position from previous

layers. Therefore, we keep the key and value inputs unchanged and only update the query inputs







Attention Weights





Figure 3: An example of inducing alignments from attention weights where the source token β€œ.” has high attention weights. The two β€œin”s in the target sentence

are wrongly aligned to β€œ.” because of the high attention

weights on it.





to avoid information leakage:





**h** _[l]_ _i_ [= Attention(] **[q]** _i_ _[l][,]_ **[ K]** [=] _[i][,]_ **[ V]** [=] _[i]_ [)] (9)



**q** _[l]_ _i_ [=] **[ h]** _i_ _[l][βˆ’]_ [1] **W** _[Q]_ (10)





where **q** _[l]_ _i_ [and] **[ h]** _i_ _[l]_ [denote the query inputs and hidden]

states for _yi_ in the _l_ -th layer, respectively. **h** [0] _i_ [is ini-]

tialized with **p** _i_ . We name this variant of attention

the **static-KV attention** . By static-KV, we mean

the keys and values are unchanged across different

layers in our approach. Our model replaces all selfattention in the decoder with static-KV attention.





**Leaky Attention**





Extracting alignments from vanilla cross-attention

often suffers from the high attention weights on

some specific source tokens such as periods, [EOS],

or other high frequency tokens (see Figure 3). This

is similar to the β€œgarbage collectors” effect (Moore,

2004) in statistical aligners, where a source token

is aligned to too many target tokens. Hereinafter,

we will refer to these tokens as _collectors_ . As a

result of such effect, many target tokens (e.g., the





not 1.0







**vanilla**

**attention**





**leaky**

**attention**







true







0.5 0.5





not true







true







1.0 falsch





falsch







|0.4|0.6|

|---|---|

|0.2|0.8|





falsch







falsch 0.2 0.4 0.4









[NULL]









[NULL]







not true







Figure 4: An illustrative example of the attention

weights from two directional models using vanilla and

leaky attention. Leaky attention provides a leak position β€œ[NULL]” to collect extra attention weights.





two β€œin”s in Figure 3) will be incorrectly aligned

to the collectors according to the attention weights.

This phenomenon has been studied in previous

works (Clark et al., 2019; Kobayashi et al., 2020).

Kobayashi et al. (2020) show that the norms of the

value vectors for the collectors are usually small,

making their influence on attention outputs actually

limited. We conjecture that this phenomenon is due

to the incapability of NMT-based aligners to deal

with tokens that have no counterparts on the other

side because there is no empty (NULL) token that

is widely used in statistical aligners (Brown et al.,

1993; Och and Ney, 2003).

We propose to explicitly model the NULL token with an attention variant, namely **leaky atten-**

**tion** . As shown in Figure 4, when calculating crossattention weights, leaky attention provides an extra

β€œleak” position in addition to the encoder outputs.

Acting as the NULL token, this leak position is expected to address the biased attention weight problem. To be specific, we parameterize the key and

value vectors as **k** NULL and **v** NULL for the leak position in the cross-attention, and concatenate them

with the transformed vectors of the encoder outputs.

The attention output **z** _i_ is computed as follows:





**z** _i_ = Attention( **h** _[L]_ _i_ **[W]** _[Q][,]_ **[ K]** _[,]_ **[ V]** [)] (11)



**K** = Concat( **k** NULL _,_ **H** enc **W** _[K]_ ) (12)



**V** = Concat( **v** NULL _,_ **H** enc **W** _[V]_ ) (13)





where **H** enc denotes encoder outputs. [1] We use a

normal distribution with a mean of 0 and a small





1A similar attention implementation can be found

in [https://github.com/pytorch/fairseq/blob/master/fairseq/](https://github.com/pytorch/fairseq/blob/master/fairseq/modules/multihead_attention.py)

[modules/multihead](https://github.com/pytorch/fairseq/blob/master/fairseq/modules/multihead_attention.py) ~~a~~ ttention.py.







deviation to initialize **k** NULL and **v** NULL to ensure

that their initial norms are rather small. When extracting alignments, we only consider the attention

matrix without the leak position.



Note that leaky attention is different from adding

a special token in the source sequence, which will

share the same high attention weights with the existing collector instead of calibrating it (Vig and Belinkov, 2019). Our parameterized method is more

flexible than Leaky-Softmax (Sabour et al., 2017)

which adds an extra dimension with the value of

zero to the routing logits. In Section 2.2, we will

show that leaky attention is also helpful for applying agreement-based training on two directional

models.



We remove the cross-attention in all but the last

decoder layer. This makes the interaction between

the source and target restricted in the last layer.

Our experiments demonstrate that this modification improves alignment results with fewer model

parameters.





**2.2** **Training**





To better utilize the attention weights from two directions, we apply an agreement loss in the training

process to improve the symmetry of our model,

which has proven effective in statistical alignment

models (Liang et al., 2006; Liu et al., 2015). Given

a parallel sentence pair _⟨_ **x** _,_ **y** _⟩_, we can obtain the

attention weights from two different directions, denoted as _**W**_ **x** _β†’_ **y** and _**W**_ **y** _β†’_ **x** . As alignment is bijective, _**W**_ **x** _β†’_ **y** is supposed to be equal to the transpose of _**W**_ **y** _β†’_ **x** . We encourage this kind of symmetry through an agreement loss:





_La_ = MSE    - _**W**_ **x** _β†’_ **y** _,_ _**W**_ _[⊀]_ **y** _β†’_ **x**    - (14)





where MSE represents the mean squared error.

For vanilla attention, _La_ is hardly small because

of the normalization constraint. As shown in Figure

4, due to the use of softmax activation, the minimal

value of _La_ is 0 _._ 25 for vanilla attention. Using

leaky attention, our approach can achieve a lower

agreement loss ( _La_ = 0.1) by adjusting the weights

on the leak position.



However, our model may converge to a degenerate case of zero agreement loss where attention

weights are all zero except for the leak position.

We circumvent this case by introducing an entropy





loss on the attention weights:







_J_



- _W_ ˜ **x** _[ij]_ _β†’_ **y** [log ˜] _[W][ij]_ (15)



_j_ =1







(Zenkel et al., 2019, 2020) and used the preprocessing scripts from Zenkel et al. (2019) [3] . Following

Ding et al. (2019), we take the last 1000 sentences

of the training data for these three datasets as validation sets. We used a joint source and target Byte

Pair Encoding (BPE) (Sennrich et al., 2016) with

40k merge operations. During training, we filtered

out sentences with the length of 1 to ensure the

validity of the masking process.





**3.2** **Settings**





We implemented our model based on the Transforemr architecture (Vaswani et al., 2017). The encoder consists of 6 standard Transformer encoder

layers. The decoder is composed of 6 layers, each

of which contains static-KV attention while only

the last layer is equipped with leaky attention. We

set the embedding size to 512, the hidden size to

1024, and attention heads to 4. The input and output

embeddings are shared for the decoder.



We trained the models with a batch size of 36K

tokens. We used early stopping based on the prediction accuracy on the validation sets. We tuned

the hyperparameters via grid search on the ChineseEnglish validation set as it contains gold word alignments. In all of our experiments, we set _Ξ»_ = 0 _._ 05

(Eq. (16)), _Ξ±_ = 5, _Ξ²_ = 1 (Eq. (17)) and _Ο„_ = 0 _._ 2

(Eq. (19)). The evaluation metric is Alignment Error Rate (AER) (Och and Ney, 2000).





**3.3** **Baselines**





We introduce the following unsupervised neural

baselines besides two statistical baselines FASTALIGN and GIZA++:





  - NAIVE-ATT (Garg et al., 2019): a method

that induces alignments from cross-attention

weights of the best (usually penultimate) decoder layer in a vanilla Tranformer.



  - NAIVE-ATT-LAST: same as NAIVE-ATT except that only the last decoder layer performs

cross-attention.



  - ADDSGD (Zenkel et al., 2019): a method that

adds an extra alignment layer to repredict the

to-be-aligned target token.



  - MTL-FULLC (Garg et al., 2019): a method

that supervises an attention head with symmetrized NAIVE-ATT alignments in a multitask learning framework.





[3https://github.com/lilt/alignment-scripts](https://github.com/lilt/alignment-scripts)







_Le,_ **x** _β†’_ **y** = _βˆ’_ [1]



_I_







_I_







_i_ =1







_W_ **x** _[ij]_ _β†’_ **y** [+] _[ Ξ»]_

_W_ ˜ **x** _[ij]_ _β†’_ **y** [=] ~~οΏ½~~ (16)

_j_ [(] _[W][ ij]_ **x** _β†’_ **y** [+] _[ Ξ»]_ [)]





where _W_ [˜] **x** _[ij]_ _β†’_ **y** [is the renormalized attention weights]

and _Ξ»_ is a smoothing hyperparamter. Similarly, we

have _Le,_ **y** _β†’_ **x** for the inverse direction.

We jointly train two directional models using the

following loss:





_L_ = _L_ **x** _β†’_ **y** + _L_ **y** _β†’_ **x** + _Ξ±La_ +



(17)

_Ξ²_ ( _Le,_ **x** _β†’_ **y** + _Le,_ **y** _β†’_ **x** )





where _L_ **x** _β†’_ **y** and _L_ **y** _β†’_ **x** are NLL losses, _Ξ±_ and _Ξ²_

are hyperparameters.





**2.3** **Inference**





When extracting alignments, we compute an alignment score _Sij_ for _yi_ and _xj_ as the harmonic mean

of attention weights _W_ **x** _[ij]_ _β†’_ **y** [and] _[ W][ ji]_ **y** _β†’_ **x** [from two]

directional models:





**x** _β†’_ **y** _[W][ ji]_ **y** _β†’_ **x**

_Sij_ = [2] _[ W][ ij]_ (18)

_W_ **x** _[ij]_ _β†’_ **y** [+] _[ W][ ji]_ **y** _β†’_ **x**





We use the harmonic mean because we assume a

large _Sij_ requires both _W_ **x** _[ij]_ _β†’_ **y** [and] _[ W][ ji]_ **y** _β†’_ **x** [to be]

large. Word alignments can be induced from the

alignment score matrix as follows:





     - 1 if _Sij β‰₯_ _Ο„_

_Aij_ = (19)

0 otherwise





where _Ο„_ is a threshold.





**3** **Experiments**





**3.1** **Datasets**





We conducted our experiments on four public

datasets: German-English (De-En), English-French

(En-Fr), Romanian-English (Ro-En) and ChineseEnglish (Zh-En). The Chinese-English training set

is from the LDC corpus that consists of 1.2M sentence pairs. For validation and testing, we used the

Chinese-English alignment dataset from Liu et al.

(2005) [2], which contains 450 sentence pairs for validation and 450 for testing. For other three language pairs, we followed the experimental setup in





[2http://nlp.csai.tsinghua.edu.cn/](http://nlp.csai.tsinghua.edu.cn/~ly/systems/TsinghuaAligner/TsinghuaAligner.html) _∼_ ly/systems/

[TsinghuaAligner/TsinghuaAligner.html](http://nlp.csai.tsinghua.edu.cn/~ly/systems/TsinghuaAligner/TsinghuaAligner.html)





**Method** **Guided** **De-En** **En-Fr** **Ro-En** **Zh-En**





FAST-ALIGN (Dyer et al., 2013) N 25.7 12.1 31.8     GIZA++ (Och and Ney, 2003) N 17.8 6.1 26.0 18.5





NAIVE-ATT (Garg et al., 2019) N 31.9 18.5 32.9 28.9

NAIVE-ATT-LAST N 28.4 17.7 32.4 26.4

ADDSGD (Zenkel et al., 2019) N 21.2 10.0 27.6     MTL-FULLC (Garg et al., 2019) N 20.2 7.7 26.0     BAO (Zenkel et al., 2020) N 17.9 8.4 24.1     SHIFT-ATT (Chen et al., 2020) N 17.9 6.6 23.9 20.2





MTL-FULLC-GZ (Garg et al., 2019) Y 16.0 4.6 23.1     BAO-GUIDED (Zenkel et al., 2020) Y 16.3 5.0 23.4     SHIFT-AET (Chen et al., 2020) Y 15.4 4.7 21.2 17.2





MASK-ALIGN N **14.4** **4.4** **19.5** **13.8**





Table 1: Alignment Error Rate (AER) scores on four datasets for different alignment methods. The lower AER, the

better. β€œGuided” denotes whether the guided alignment loss is used during training. All results are symmetrized.

We highlight the best results for each language pair in bold.









  - BAO (Zenkel et al., 2020): an improved version of ADDSGD that extracts alignments

with Bidirectional Attention Optimization.



  - SHIFT-ATT (Chen et al., 2020): a method that

induces alignments when the to-be-aligned

tatget token is the decoder input instead of the

output.





We also included three additional baselines with

guided training: (1) MTL-FULLC-GZ (Garg et al.,

2019) which replaces the alignment labels in MTLFULLC with GIZA++ results, (2) BAO-GUIDED

(Zenkel et al., 2020) which uses alignments from

BAO for guided alignment training, (3) SHIFTAET (Chen et al., 2020) which trains an additional alignment module with supervision from

symmetrized SHIFT-ATT alignments.





**3.4** **Main Results**





Table 1 shows the results on four datasets. Our

approach significantly outperforms all statistical

and neural baselines. Specifically, it improves over

GIZA++ by 1.7-6.5 AER points across different

language pairs without using any guided alignment

loss, making it a good substitute to this commonly

used statistical alignment tool. Compared to SHIFTATT, the best neural methods without guided training, our approach achieves a gain of 2.2-6.4 AER

points with fewer parameters (as we remove some

cross-attention sublayers in the decoder).

When compared with baselines using guided

training, we find MASK-ALIGN still achieves sub





Masked Leaky Agree AER





_Γ—_ _Γ—_ _Γ—_ 28.4

βœ“ _Γ—_ _Γ—_ 27.2

_Γ—_ βœ“ _Γ—_ 28.3

_Γ—_ _Γ—_ βœ“ 26.6

_Γ—_ βœ“ βœ“ 23.4

βœ“ _Γ—_ βœ“ 17.6

βœ“ βœ“ _Γ—_ 17.2





βœ“ βœ“ βœ“ **14.4**





Table 2: Ablation study on the German-English dataset.

We use β€œMasked” to denote the masked modeling with

static-KV attention in Section 2.1, β€œLeaky” to denote

the leaky attention in Section 2.1 and β€œAgree” to denote

the agreement-based training and inference in Sections

2.2 and 2.3.





stantial improvements over all methods. For example, on the Romanian-English dataset, it improves over SHIFT-AET by 1.7 AER points. Recall

that our method is fully end-to-end, which does

not require a time-consuming process of obtaining

pseudo alignments for full training data.





**3.5** **Ablation Study**





Table 2 shows the ablation results on the GermanEnglish dataset. As we can see, masked modeling

seems to play a critical role since removing it will

deteriorate the performance by at least 9.0 AER.

We also find that leaky attention and agreementbased training and inference are both important.

Removing any of them will significantly diminish





human





rights





throughout





the





world





in





1995





       



1996







human





rights





throughout





the





world





in





1995





       



1996







(a) Vanilla Attention







(b) Leaky Attention







Figure 5: Attention weights from vanilla and leaky attention. β€œMR” is short for β€œmenschenrechte”, which means

β€œhuman rights” in English. We use β€œ[NULL]” to denote the leak position.





source sentence [NULL] MR in der welt 1995 _\_ 1996





vanilla attention    - 21.1 11.7 **5.2** 15.0 21.2 17.7 21.8

leaky attention **1.9** 28.5 17.2 18.1 20.2 24.2 21.4 23.8





Table 3: Norms of the transformed value vectors of different source tokens in Figure 5. We mark the minimum

norm for each variant of attention with boldface.







the performance.





**3.6** **Effect of Leaky Attention**





Figure 5 shows the attention weights from vanilla

and leaky attention and Table 3 presents the norms

of the transformed value vectors of each source token for two types of attention. For vanilla attention,

we can see large weights on the high frequency

token β€œder” and the small norm of its transformed

value vector. As a result, the target token β€œin” will

be wrongly aligned to β€œder”. While for leaky attention, we observe a similar phenomenon on the leak

position β€œ[NULL]”, and β€œin” will not be aligned to

any source tokens since the weights on all source tokens are small. This example shows leaky attention

can effectively prevent the collector phenomenon.





**3.7** **Analysis**





**Removing End Punctuation** To further investigate the performance of leaky attention, we tested

an extraction method that excludes the attention

weights on the end punctuation of a source sentence.

The reason behind this is that when the source sentence contains the end punctuation, it will act as the

collector in most cases. Therefore removing it will







Method w/ punc. w/o punc.





vanilla attention 27.2 17.7

leaky attention 17.2 17.4





Table 4: Comparison of AER with and without considering the attention weights on end punctuation.





alleviate the effect of collectors to a certain extent.

Table 4 shows the comparison results. For vanilla attention, removing end punctuation obtains a gain of

7.7 AER points. For leaky attention, however, such

extraction method brings no improvement on alignment quality. This suggests that leaky attention can

effectively alleviate the problem of collectors.





**Case Study** Figure 6 shows the attention weights

from four different models for the example in Figure 1. As we have discussed in Section 1, in this

example, NMT-based methods might fail to resolve

ambiguity when predicting the target token β€œtokyo”.

From the attention weight matrices, we can see that

NMT-based methods (Figures 6(b) and 6(c)) indeed put high weights wrongly on β€œ1968” in the

source sentence. As for MASK-ALIGN, we can see





i



was





born





in





tokyo





in





1968



.







(d) MASK-ALIGN







(a) Reference







(b) NAIVE-ATT-LAST







(c) SHIFT-ATT







Figure 6: Attention weights from different models for the example in Figure 1. Gold alignment is shown in (a). For

target token β€œtokyo”, NMT-based methods NAIVE-ATT-LAST (b) and SHIFT-ATT (c) assign high weights to the

wrongly aligned source token β€œ1968”, while MASK-ALIGN (d) focuses on the correct source token β€œtokio”.













|7 cPcA<br>wPcA<br>6 cPwA<br>wPwA<br>5<br>4<br>3<br>2<br>1<br>0<br>Naive-Att Naive-Att-Last Shift-Att Mask-Align|cPcA<br>wPcA<br>cPwA<br>wPwA|Col3|Col4|

|---|---|---|---|

|Naive~~-~~Att<br>Naive~~-~~Att~~-~~Last<br>Shift~~-~~Att<br>Mask~~-~~Align<br>0<br>1<br>2<br>3<br>4<br>5<br>6<br>7<br>cPcA<br>wPcA<br>cPwA<br>wPwA|cPcA<br>wPcA<br>cPwA<br>wPwA|ift~~-~~Att<br>Ma|k~~-~~Align|







Figure 7: Relations between prediction and alignment

for different methods.





that the attention weights are highly consistent with

the gold alignment, showing that our method can

generate sparse and accurate attention weights.





**Prediction and Alignment** We analyzed the relevance between the correctness of word-level prediction and alignment. We regard a word as correctly

predicted if any of its subwords are correct and as

correctly aligned if one of its possible alignment

is matched. Figure 7 shows the results. We divide

target tokens into four categories:





1. cPcA: correct prediction & correct alignment;





2. wPcA: wrong prediction & correct alignment;





3. cPwA: correct prediction & wrong alignment;





4. wPwA: wrong prediction & wrong alignment.





Compared with other methods, MASK-ALIGN

significantly reduces the alignment errors caused by

wrong predictions (wPwA). In addition, the number of the tokens with correct prediction but wrong







alignment (cPwA) maintains at a low level, indicating that our model does not degenerate into a

target masked language model despite the use of

bidirectional target context.





**4** **Related Work**





Our work is closely related to unsupervised neural

word alignment. While early unsupervised neural

aligners (Tamura et al., 2014; Alkhouli et al., 2016;

Peter et al., 2017) failed to outperform their statistical counterparts such as FAST-ALIGN (Dyer et al.,

2013) and GIZA++ (Och and Ney, 2003), recent

studies have made significant progress by inducing

alignments from NMT models (Garg et al., 2019;

Zenkel et al., 2019, 2020; Chen et al., 2020). Our

work differs from prior studies in that we design a

novel self-supervised model that is capable of utilizing more target context than NMT-based models

to generate high quality alignments without using

guided training.



Our work is also inspired by the success of

conditional masked language models (CMLMs)

(Ghazvininejad et al., 2019), which have been applied to non-autoregressive machine translation.

The CMLM can leverage both previous and future

context on the target side for sequence-to-sequence

tasks with the masking mechanism. Kasai et al.

(2020) extend it with a disentangled context Transformer that predicts every target token conditioned

on arbitrary context. By taking the characteristics

of word alignment into consideration, we propose

to use static-KV attention to achieve masking and

aligning in parallel. To the best of our knowledge,

this is the first work that incorporates a CMLM into

alignment models.





**5** **Conclusion**





We have presented a self-supervised neural alignment model MASK-ALIGN. Our model parallelly

masks out and predicts each target token. We

propose static-KV attention and leaky attention

to achieve parallel computation and address the

β€œgarbage collectors” problem, respectively. Experiments show that MASK-ALIGN achieves new stateof-the-art results without using the guided alignment loss. In the future, we plan to extend our

method to directly generate symmetrized alignments without leveraging the agreement between

two unidirectional models.





**Acknowledgments**





This work was supported by the National Key

R&D Program of China (No. 2017YFB0202204),

National Natural Science Foundation of China

(No.61925601, No. 61772302) and Huawei Noah’s

Ark Lab. We thank all anonymous reviewers for

their valuable comments and suggestions on this

work.





**References**





Tamer Alkhouli, Gabriel Bretschner, Jan-Thorsten Peter, Mohammed Hethnawi, Andreas Guta, and Her[mann Ney. 2016. Alignment-based neural machine](https://doi.org/10.18653/v1/W16-2206)

[translation. In](https://doi.org/10.18653/v1/W16-2206) _Proceedings of the First Conference_
_on Machine Translation: Volume 1, Research Papers_,
pages 54–65, Berlin, Germany. Association for Computational Linguistics.


Philip Arthur, Graham Neubig, and Satoshi Nakamura.
2016. [Incorporating discrete translation lexicons](https://doi.org/10.18653/v1/D16-1162)
[into neural machine translation. In](https://doi.org/10.18653/v1/D16-1162) _Proceedings of_
_the 2016 Conference on Empirical Methods in Natu-_
_ral Language Processing_, pages 1557–1567, Austin,
Texas. Association for Computational Linguistics.


Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. [Neural machine translation by jointly](http://arxiv.org/abs/1409.0473)
[learning to align and translate.](http://arxiv.org/abs/1409.0473) In _3rd Inter-_
_national Conference on Learning Representations,_
_ICLR 2015, San Diego, CA, USA, May 7-9, 2015,_
_Conference Track Proceedings_ .


Peter F. Brown, Stephen A. Della Pietra, Vincent J.
[Della Pietra, and Robert L. Mercer. 1993. The math-](https://www.aclweb.org/anthology/J93-2003)
[ematics of statistical machine translation: Parameter](https://www.aclweb.org/anthology/J93-2003)
[estimation.](https://www.aclweb.org/anthology/J93-2003) _Computational Linguistics_, 19(2):263–
311.


Wenhu Chen, Evgeny Matusov, Shahram Khadivi, and
Jan-Thorsten Peter. 2016. Guided alignment training for topic-aware neural machine translation. _As-_
_sociation for Machine Translation in the Americas_,
page 121.



Yun Chen, Yang Liu, Guanhua Chen, Xin Jiang, and
[Qun Liu. 2020. Accurate word alignment induction](https://doi.org/10.18653/v1/2020.emnlp-main.42)
[from neural machine translation. In](https://doi.org/10.18653/v1/2020.emnlp-main.42) _Proceedings of_
_the 2020 Conference on Empirical Methods in Natu-_
_ral Language Processing (EMNLP)_, pages 566–576,
Online. Association for Computational Linguistics.


Kevin Clark, Urvashi Khandelwal, Omer Levy, and
[Christopher D. Manning. 2019. What does BERT](https://doi.org/10.18653/v1/W19-4828)
[look at? an analysis of BERT’s attention. In](https://doi.org/10.18653/v1/W19-4828) _Pro-_
_ceedings of the 2019 ACL Workshop BlackboxNLP:_
_Analyzing and Interpreting Neural Networks for_
_NLP_, pages 276–286, Florence, Italy. Association
for Computational Linguistics.


Ido Dagan, Kenneth Church, and Willian Gale. 1993.

[Robust bilingual word alignment for machine aided](https://www.aclweb.org/anthology/W93-0301)
[translation. In](https://www.aclweb.org/anthology/W93-0301) _Very Large Corpora: Academic and_
_Industrial Perspectives_ .


Shuoyang Ding, Hainan Xu, and Philipp Koehn. 2019.

[Saliency-driven word alignment interpretation for](https://doi.org/10.18653/v1/W19-5201)
[neural machine translation. In](https://doi.org/10.18653/v1/W19-5201) _Proceedings of the_
_Fourth Conference on Machine Translation (Volume_
_1: Research Papers)_, pages 1–12, Florence, Italy. Association for Computational Linguistics.


Yanzhuo Ding, Yang Liu, Huanbo Luan, and Maosong
Sun. 2017. [Visualizing and understanding neural](https://doi.org/10.18653/v1/P17-1106)
[machine translation. In](https://doi.org/10.18653/v1/P17-1106) _Proceedings of the 55th An-_
_nual Meeting of the Association for Computational_
_Linguistics (Volume 1: Long Papers)_, pages 1150–
1159, Vancouver, Canada. Association for Computational Linguistics.


Chris Dyer, Victor Chahuneau, and Noah A. Smith.
2013. [A simple, fast, and effective reparameter-](https://www.aclweb.org/anthology/N13-1073)
[ization of IBM model 2.](https://www.aclweb.org/anthology/N13-1073) In _Proceedings of the_
_2013 Conference of the North American Chapter of_
_the Association for Computational Linguistics: Hu-_
_man Language Technologies_, pages 644–648, Atlanta, Georgia. Association for Computational Linguistics.


Sarthak Garg, Stephan Peitz, Udhyakumar Nallasamy,
[and Matthias Paulik. 2019. Jointly learning to align](https://doi.org/10.18653/v1/D19-1453)
[and translate with transformer models. In](https://doi.org/10.18653/v1/D19-1453) _Proceed-_
_ings of the 2019 Conference on Empirical Methods_
_in Natural Language Processing and the 9th Inter-_
_national Joint Conference on Natural Language Pro-_
_cessing (EMNLP-IJCNLP)_, pages 4453–4462, Hong
Kong, China. Association for Computational Linguistics.


Marjan Ghazvininejad, Omer Levy, Yinhan Liu, and
[Luke Zettlemoyer. 2019. Mask-predict: Parallel de-](https://doi.org/10.18653/v1/D19-1633)
[coding of conditional masked language models. In](https://doi.org/10.18653/v1/D19-1633)
_Proceedings of the 2019 Conference on Empirical_
_Methods in Natural Language Processing and the_
_9th International Joint Conference on Natural Lan-_
_guage Processing (EMNLP-IJCNLP)_, pages 6112–
6121, Hong Kong, China. Association for Computational Linguistics.


Eva Hasler, Adri`a de Gispert, Gonzalo Iglesias, and
[Bill Byrne. 2018. Neural machine translation decod-](https://doi.org/10.18653/v1/N18-2081)
[ing with terminology constraints. In](https://doi.org/10.18653/v1/N18-2081) _Proceedings of_
_the 2018 Conference of the North American Chap-_
_ter of the Association for Computational Linguistics:_
_Human Language Technologies, Volume 2 (Short Pa-_
_pers)_, pages 506–512, New Orleans, Louisiana. Association for Computational Linguistics.


Jungo Kasai, James Cross, Marjan Ghazvininejad, and
[Jiatao Gu. 2020. Non-autoregressive machine trans-](http://proceedings.mlr.press/v119/kasai20a.html)
[lation with disentangled context transformer. In](http://proceedings.mlr.press/v119/kasai20a.html) _Pro-_
_ceedings of the 37th International Conference on_
_Machine Learning, ICML 2020, 13-18 July 2020,_
_Virtual Event_, volume 119 of _Proceedings of Ma-_
_chine Learning Research_, pages 5144–5155. PMLR.


Goro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, and
Kentaro Inui. 2020. Attention module is not only a
weight: Analyzing transformers with vector norms.
In _Proceedings of the 2020 Conference on Empiri-_
_cal Methods in Natural Language Processing and_
_the 10th International Joint Conference on Natural_
_Language Processing (EMNLP-IJCNLP)_ .


Philipp Koehn, Franz J. Och, and Daniel Marcu. 2003.

[Statistical phrase-based translation. In](https://www.aclweb.org/anthology/N03-1017) _Proceedings_
_of the 2003 Human Language Technology Confer-_
_ence of the North American Chapter of the Associa-_
_tion for Computational Linguistics_, pages 127–133.


Xintong Li, Guanlin Li, Lemao Liu, Max Meng, and
[Shuming Shi. 2019. On the word alignment from](https://doi.org/10.18653/v1/P19-1124)
[neural machine translation. In](https://doi.org/10.18653/v1/P19-1124) _Proceedings of the_
_57th Annual Meeting of the Association for Com-_
_putational Linguistics_, pages 1293–1303, Florence,
Italy. Association for Computational Linguistics.


[Percy Liang, Ben Taskar, and Dan Klein. 2006. Align-](https://www.aclweb.org/anthology/N06-1014)
[ment by agreement. In](https://www.aclweb.org/anthology/N06-1014) _Proceedings of the Human_
_Language Technology Conference of the NAACL,_
_Main Conference_, pages 104–111, New York City,
USA. Association for Computational Linguistics.


Chunyang Liu, Yang Liu, Maosong Sun, Huanbo Luan,
and Heng Yu. 2015. [Generalized agreement for](https://doi.org/10.18653/v1/D15-1210)
[bidirectional word alignment.](https://doi.org/10.18653/v1/D15-1210) In _Proceedings of_
_the 2015 Conference on Empirical Methods in Nat-_
_ural Language Processing_, pages 1828–1836, Lisbon, Portugal. Association for Computational Linguistics.


Yang Liu, Qun Liu, and Shouxun Lin. 2005. [Log-](https://doi.org/10.3115/1219840.1219897)
[linear models for word alignment.](https://doi.org/10.3115/1219840.1219897) In _Proceed-_
_ings of the 43rd Annual Meeting of the Association_
_for Computational Linguistics (ACL’05)_, pages 459–
466, Ann Arbor, Michigan. Association for Computational Linguistics.


[Robert C. Moore. 2004. Improving IBM word align-](https://doi.org/10.3115/1218955.1219021)
[ment model 1.](https://doi.org/10.3115/1218955.1219021) In _Proceedings of the 42nd An-_
_nual Meeting of the Association for Computational_
_Linguistics (ACL-04)_, pages 518–525, Barcelona,
Spain.



[Franz Josef Och and Hermann Ney. 2000. Improved](https://doi.org/10.3115/1075218.1075274)
[statistical alignment models. In](https://doi.org/10.3115/1075218.1075274) _Proceedings of the_
_38th Annual Meeting of the Association for Com-_
_putational Linguistics_, pages 440–447, Hong Kong.
Association for Computational Linguistics.


[Franz Josef Och and Hermann Ney. 2003. A systematic](https://doi.org/10.1162/089120103321337421)
[comparison of various statistical alignment models.](https://doi.org/10.1162/089120103321337421)
_Computational Linguistics_, 29(1):19–51.


Santanu Pal, Sudip Kumar Naskar, Mihaela Vela, Qun
Liu, and Josef van Genabith. 2017. [Neural auto-](https://www.aclweb.org/anthology/E17-2056)
[matic post-editing using prior alignment and rerank-](https://www.aclweb.org/anthology/E17-2056)
[ing. In](https://www.aclweb.org/anthology/E17-2056) _Proceedings of the 15th Conference of the_
_European Chapter of the Association for Computa-_
_tional Linguistics: Volume 2, Short Papers_, pages
349–355, Valencia, Spain. Association for Computational Linguistics.


Jan-Thorsten Peter, Arne Nix, and Hermann Ney.
2017. Generating alignments using target foresight in attention-based neural machine translation.
_The Prague Bulletin of Mathematical Linguistics_,
108(1):27–36.


Sara Sabour, Nicholas Frosst, and Geoffrey E. Hinton.
[2017. Dynamic routing between capsules. In](https://proceedings.neurips.cc/paper/2017/hash/2cad8fa47bbef282badbb8de5374b894-Abstract.html) _Ad-_
_vances in Neural Information Processing Systems_
_30: Annual Conference on Neural Information Pro-_
_cessing Systems 2017, December 4-9, 2017, Long_
_Beach, CA, USA_, pages 3856–3866.


Rico Sennrich, Barry Haddow, and Alexandra Birch.
2016. [Neural machine translation of rare words](https://doi.org/10.18653/v1/P16-1162)
[with subword units. In](https://doi.org/10.18653/v1/P16-1162) _Proceedings of the 54th An-_
_nual Meeting of the Association for Computational_
_Linguistics (Volume 1: Long Papers)_, pages 1715–
1725, Berlin, Germany. Association for Computational Linguistics.


Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014.

[Sequence to sequence learning with neural networks.](https://proceedings.neurips.cc/paper/2014/hash/a14ac55a4f27472c5d894ec1c3c743d2-Abstract.html)
In _Advances in Neural Information Processing Sys-_
_tems 27: Annual Conference on Neural Informa-_
_tion Processing Systems 2014, December 8-13 2014,_
_Montreal, Quebec, Canada_, pages 3104–3112.


Akihiro Tamura, Taro Watanabe, and Eiichiro Sumita.
2014. [Recurrent neural networks for word align-](https://doi.org/10.3115/v1/P14-1138)
[ment model.](https://doi.org/10.3115/v1/P14-1138) In _Proceedings of the 52nd An-_
_nual Meeting of the Association for Computational_
_Linguistics (Volume 1: Long Papers)_, pages 1470–
1480, Baltimore, Maryland. Association for Computational Linguistics.


Zhaopeng Tu, Zhengdong Lu, Yang Liu, Xiaohua Liu,
and Hang Li. 2016. [Modeling coverage for neu-](https://doi.org/10.18653/v1/P16-1008)
[ral machine translation. In](https://doi.org/10.18653/v1/P16-1008) _Proceedings of the 54th_
_Annual Meeting of the Association for Computa-_
_tional Linguistics (Volume 1: Long Papers)_, pages
76–85, Berlin, Germany. Association for Computational Linguistics.


Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob
Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz


[Kaiser, and Illia Polosukhin. 2017. Attention is all](https://proceedings.neurips.cc/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html)
[you need. In](https://proceedings.neurips.cc/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html) _Advances in Neural Information Pro-_
_cessing Systems 30: Annual Conference on Neural_
_Information Processing Systems 2017, December 4-_
_9, 2017, Long Beach, CA, USA_, pages 5998–6008.


Jesse Vig and Yonatan Belinkov. 2019. [Analyzing](https://doi.org/10.18653/v1/W19-4808)
[the structure of attention in a transformer language](https://doi.org/10.18653/v1/W19-4808)
[model. In](https://doi.org/10.18653/v1/W19-4808) _Proceedings of the 2019 ACL Workshop_
_BlackboxNLP: Analyzing and Interpreting Neural_
_Networks for NLP_, pages 63–76, Florence, Italy. Association for Computational Linguistics.


Nan Yang, Shujie Liu, Mu Li, Ming Zhou, and Neng[hai Yu. 2013. Word alignment modeling with con-](https://www.aclweb.org/anthology/P13-1017)
[text dependent deep neural network.](https://www.aclweb.org/anthology/P13-1017) In _Proceed-_
_ings of the 51st Annual Meeting of the Association_
_for Computational Linguistics (Volume 1: Long Pa-_
_pers)_, pages 166–175, Sofia, Bulgaria. Association
for Computational Linguistics.


Thomas Zenkel, Joern Wuebker, and John DeNero.
2019. Adding interpretable attention to neural translation models improves word alignment. _arXiv_
_preprint arXiv:1901.11359_ .


Thomas Zenkel, Joern Wuebker, and John DeNero.
2020. [End-to-end neural word alignment outper-](https://doi.org/10.18653/v1/2020.acl-main.146)
[forms GIZA++. In](https://doi.org/10.18653/v1/2020.acl-main.146) _Proceedings of the 58th Annual_
_Meeting of the Association for Computational Lin-_
_guistics_, pages 1605–1617, Online. Association for
Computational Linguistics.