Page 297 - 《软件学报》2026年第2期
P. 297
776 软件学报 2026 年第 37 卷第 2 期
1.0 1.0
sie 1.0 0.2 0.3 0.1 0.1 0.1 0.3 sie 0.9 0.3 0.3 0.1 0 0 0.2
tat 0.2 1.0 0.1 0.1 0 0.1 0.2 0.8 tat 0.3 0.8 0.2 0.1 0 0.2 0.1 0.8
es 0.3 0.1 0.9 0.1 0 0.1 0.1 es 0.3 0.2 0.9 0.1 0 0.1 0.1
0.6 0.6
drei 0.1 0.1 0.1 0.9 0.3 0.3 0.1 drei 0.1 0.1 0.1 0.9 0.2 0.2 0.1
0.4 0.4
jahre 0.1 0 0 0.3 0.9 0.3 0.3 jahre 0 0 0 0.2 0.9 0.3 0
lang 0.1 0.1 0.1 0.3 0.3 1.0 0.2 0.2 lang 0 0.2 0.1 0.2 0.3 1.0 0 0.2
· 0.3 0.2 0.1 0.1 0.3 0.2 1.0 · 0.2 0.1 0.1 0.1 0 0 0.5
0 0
sie tat es drei jahre lang · sie tat es drei jahre lang ·
(c) GLAT encoder 对表9中的 (d) SynNAT encoder 对表9中的
ൕ২ 2 编码后的词元之间的内积 ൕ২ 2 编码后的词元之间的内积
图 9 译文不同情况下不同编码器输出的词元之间的内积案例分析 (续)
the only country country · she did for three years ·
3
GALT 1.27 1.24 1.25 3.68 1.25 3 GALT 1.02 0.96 3.50 1.15 2.17 1.77
2 2
SynNAT 1.45 0.63 0.31 1.08 1.08 1.08 1.08 SynNAT 0.99 0.69 1.82 0.53 0.75 0.63 0.30 1
1
the only countey in the world · she did it for three years ·
(a) ؓႋ9 a a b ֥ၲ໓Ս߸ყҩྐ༏᧦ (b) ؓႋ9 c a d ֥ၲ໓Ս߸ყҩྐ༏᧦
图 10 词汇预测熵值对比案例分析
此外, 我们给出了 GLAT 和 SynNAT 翻译结果均正确的 2 个例子, 见表 10, 图 11 为其对应的依存句法树, 图 12
为这两个句子分别对应 GLAT 和 SynNAT 生成的相关性矩阵. 图 13 为这两个句子的使用 GLAT 和 SynNAT 生成
的目标句子的信息熵图. 图 12(a) 中 passierte→es 没有图 12(b) 中相关程度高. 在图 13(a) 中显示, GLAT 虽然将 es
正确的翻译得到了 it, 但是具有较高的信息熵, 表示模型翻译成 it 时的不确定性较高. 图 12(c) 中 halten→wollte 没
有图 12(d) 中相关程度高. 在图 13(b) 中显示, GLAT 虽然将 wollte 正确的翻译得到了 wanted. 但是具有较高的信
息熵, 表示模型翻译成 wanted 是更不确定的. 而 SynNAT 模型在翻译 it 和 wanted 的时候信息熵虽然比周围的词
元更高, 但相比 GLAT 在此位置上的信息熵相比已经降低. 此外从结果可以看出, 尽管两个模型最终生成的译文
完全相同且正确, 我们的方法在大多数单词上的熵值更低 (颜色整体更浅), 表明其在词汇预测上的置信度更高. 因
此, 我们认为, 对源端句法结构的建模能够提升存在句法依存关系下的词元表示之间的相关性, 而这种增强的相关
性在翻译过程中有助于提高目标端中相应词元生成的准确性, 从而进一步提升目标端句法结构的正确性.
表 10 蒸馏的 IWSLT14 DE→EN 测试样本研究 (两个模型的译文结果与金标结果一致)
模型 示例 1 示例 2
source und dann passierte es wieder. ich wollte uns gesund halten.
reference and then it happened again. i wanted to keep us healthy.
root root
punct
nsubj
cc advmod aux obj punct
xcomp
nsubj
advmod
und dann passierte es wieder · ich wollte uns gesund halten ·
(a) 表10中ൕ২1的源句子对应依存句法树 (b) 表10中ൕ২2的源句子对应依存句法树
图 11 表 10 中源句子对应依存句法树

