Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mtbookv2
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
NiuTrans
mtbookv2
Commits
7f946386
Commit
7f946386
authored
Dec 14, 2020
by
xiaotong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of 47.105.50.196:NiuTrans/mtbookv2
# Conflicts: # Chapter14/chapter14.tex
parents
eccdc6e6
1133f66a
全部展开
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
167 行增加
和
20 行删除
+167
-20
Chapter10/chapter10.tex
+2
-2
Chapter11/chapter11.tex
+6
-6
Chapter12/chapter12.tex
+0
-0
Chapter15/chapter15.tex
+0
-0
Chapter16/Figures/figure-bilingual-dictionary-Induction.tex
+3
-3
Chapter16/Figures/figure-shared-space-inductive-bilingual-dictionary.tex
+2
-2
Chapter16/chapter16.tex
+7
-7
Chapter18/chapter18.tex
+0
-0
bibliography.bib
+147
-0
没有找到文件。
Chapter10/chapter10.tex
查看文件 @
7f946386
...
...
@@ -698,9 +698,9 @@ $\funp{P}({y_j | \mathbi{s}_{j-1} ,y_{j-1},\mathbi{C}})$由Softmax实现,Softm
\end{figure}
%----------------------------------------------
\parinterval
显然,以上问题的根本原因在于所使用的表示模型还比较“弱”。因此需要一个更强大的表示模型,在生成目标语言单词时能够有选择地获取源语言句子中更有用的部分。更准确的说,对于要生成的目标语单词,相关性更高的源语言片段应该在源语言句子的表示中体现出来,而不是将所有的源语言单词一视同仁。在神经机器翻译中引入注意力机制正是为了达到这个目的
\upcite
{
bahdanau2014neural,DBLP:journals/corr/LuongPM15
}
。实际上,除了机器翻译,注意力机制也被成功地应用于图像处理、语音识别、自然语言处理等其他任务。也正是注意力机制的引入,使得包括机器翻译在内很多自然语言处理系统得到了飞跃发展。
\parinterval
显然,以上问题的根本原因在于所使用的表示模型还比较“弱”。因此需要一个更强大的表示模型,在生成目标语言单词时能够有选择地获取源语言句子中更有用的部分。更准确的说,对于要生成的目标语
言
单词,相关性更高的源语言片段应该在源语言句子的表示中体现出来,而不是将所有的源语言单词一视同仁。在神经机器翻译中引入注意力机制正是为了达到这个目的
\upcite
{
bahdanau2014neural,DBLP:journals/corr/LuongPM15
}
。实际上,除了机器翻译,注意力机制也被成功地应用于图像处理、语音识别、自然语言处理等其他任务。也正是注意力机制的引入,使得包括机器翻译在内很多自然语言处理系统得到了飞跃发展。
\parinterval
神经机器翻译中的注意力机制并不复杂。对于每个目标语言单词
$
y
_
j
$
,系统生成一个源语言表示向量
$
\mathbi
{
C
}_
j
$
与之对应,
$
\mathbi
{
C
}_
j
$
会包含生成
$
y
_
j
$
所需的源语言的信息,或者说
$
\mathbi
{
C
}_
j
$
是一种包含目标语言单词与源语言单词对应关系的源语言表示。相比用一个静态的表示
$
\mathbi
{
C
}$
,注意机制使用的是动态的表示
$
\mathbi
{
C
}_
j
$
。
$
\mathbi
{
C
}_
j
$
也被称作对于目标语言位置
$
j
$
的
{
\small\bfnew
{
上下文向量
}}
\index
{
上下文向量
}
(Context Vector
\index
{
Context Vector
}
)。图
\ref
{
fig:10-18
}
对比了未引入注意力机制和引入了注意力机制的编码器- 解码器结构。可以看出,在注意力模型中,对于每一个目标单词的生成,都会额外引入一个单独的上下文向量参与运算。
\parinterval
神经机器翻译中的注意力机制并不复杂。对于每个目标语言单词
$
y
_
j
$
,系统生成一个源语言表示向量
$
\mathbi
{
C
}_
j
$
与之对应,
$
\mathbi
{
C
}_
j
$
会包含生成
$
y
_
j
$
所需的源语言的信息,或者说
$
\mathbi
{
C
}_
j
$
是一种包含目标语言单词与源语言单词对应关系的源语言表示。相比用一个静态的表示
$
\mathbi
{
C
}$
,注意机制使用的是动态的表示
$
\mathbi
{
C
}_
j
$
。
$
\mathbi
{
C
}_
j
$
也被称作对于目标语言位置
$
j
$
的
{
\small\bfnew
{
上下文向量
}}
\index
{
上下文向量
}
(Context Vector
\index
{
Context Vector
}
)。图
\ref
{
fig:10-18
}
对比了未引入注意力机制和引入了注意力机制的编码器- 解码器结构。可以看出,在注意力模型中,对于每一个目标
语言
单词的生成,都会额外引入一个单独的上下文向量参与运算。
%----------------------------------------------
\begin{figure}
[htp]
...
...
Chapter11/chapter11.tex
查看文件 @
7f946386
...
...
@@ -233,14 +233,14 @@
\section
{
基于卷积神经网络的翻译建模
}
\parinterval
正如之前所讲,卷积神经网络可以用于序列建模,同时具有并行性高和易于学习的特点,一个很自然的想法就是将其用作神经机器翻译模型中的特征提取器。因此,在神经机器翻译被提出之初,研究人员就已经开始利用卷积神经网络对句子进行特征提取。比较经典的模型是使用卷积神经网络作为源语言句子的编码器,使用循环神经网络作为目标语译文生成的解码器
\upcite
{
kalchbrenner-blunsom-2013-recurrent,Gehring2017ACE
}
。之后也有研究人员提出完全基于卷积神经网络的翻译模型(ConvS2S)
\upcite
{
DBLP:journals/corr/GehringAGYD17
}
,或者针对卷积层进行改进,提出效率更高、性能更好的模型
\upcite
{
Kaiser2018DepthwiseSC,Wu2019PayLA
}
。本节将基于ConvS2S模型,阐述如何使用卷积神经网络搭建端到端神经机器翻译模型。
\parinterval
正如之前所讲,卷积神经网络可以用于序列建模,同时具有并行性高和易于学习的特点,一个很自然的想法就是将其用作神经机器翻译模型中的特征提取器。因此,在神经机器翻译被提出之初,研究人员就已经开始利用卷积神经网络对句子进行特征提取。比较经典的模型是使用卷积神经网络作为源语言句子的编码器,使用循环神经网络作为目标语
言
译文生成的解码器
\upcite
{
kalchbrenner-blunsom-2013-recurrent,Gehring2017ACE
}
。之后也有研究人员提出完全基于卷积神经网络的翻译模型(ConvS2S)
\upcite
{
DBLP:journals/corr/GehringAGYD17
}
,或者针对卷积层进行改进,提出效率更高、性能更好的模型
\upcite
{
Kaiser2018DepthwiseSC,Wu2019PayLA
}
。本节将基于ConvS2S模型,阐述如何使用卷积神经网络搭建端到端神经机器翻译模型。
\parinterval
ConvS2S模型是一种高并行的序列到序列的神经计算模型。该模型利用卷积神经网络分别对源语言端与目标语言端的序列进行特征提取,并使用注意力机制来捕获两个序列之间映射关系。相比于基于多层循环神经网络的GNMT模型
\upcite
{
Wu2016GooglesNM
}
,其主要优势在于每一层的网络计算是完全并行化的,避免了循环神经网络中计算顺序对时序的依赖。同时,利用多层卷积神经网络的层级结构可以有效地捕捉序列不同位置之间的依赖。即使是远距离依赖,也可以通过若干层卷积单元进行有效的捕捉,而且其信息传递的路径相比循环神经网络更短。除此之外,模型同时使用门控线性单元、残差网络和位置编码等技术来进一步提升模型性能,达到了和GNMT模型相媲美的翻译性能,同时大大缩短了训练时间。
\parinterval
图
\ref
{
fig:11-12
}
为ConvS2S模型的结构示意图,其内部由若干不同的模块组成,包括:
\begin{itemize}
\item
{
\small\bfnew
{
位置编码
}}
\index
{
位置编码
}
(Position Embedding)
\index
{
Position Embedding
}
:图中绿色背景框表示源语端词嵌入部分。相比于基于循环神经网络的翻译模型中的词嵌入,该模型还引入了位置编码,帮助模型获得词位置信息。位置编码具体实现在图
\ref
{
fig:11-12
}
中没有显示,详见
\ref
{
sec:11.2.1
}
节。
\item
{
\small\bfnew
{
位置编码
}}
\index
{
位置编码
}
(Position Embedding)
\index
{
Position Embedding
}
:图中绿色背景框表示源语
言
端词嵌入部分。相比于基于循环神经网络的翻译模型中的词嵌入,该模型还引入了位置编码,帮助模型获得词位置信息。位置编码具体实现在图
\ref
{
fig:11-12
}
中没有显示,详见
\ref
{
sec:11.2.1
}
节。
\item
{
\small\bfnew
{
卷积层
}}
与
{
\small\bfnew
{
门控线性单元
}}
(Gated Linear Units, GLU
\index
{
Gated Linear Units, GLU
}
):黄色背景框是卷积模块,这里使用门控线性单元作为非线性函数,之前的研究工作
\upcite
{
Dauphin2017LanguageMW
}
表明这种非线性函数更适合于序列建模任务。图中为了简化,只展示了一层卷积,但在实际中为了更好地捕获句子信息,通常使用多层卷积的叠加。
...
...
@@ -278,7 +278,7 @@
\parinterval
单层卷积神经网络的感受野受限于卷积核的大小,因此只能捕捉序列中局部的上下文信息,不能很好地进行长序列建模。为了捕捉更长的上下文信息,最简单的做法就是堆叠多个卷积层。相比于循环神经网络的链式结构,对相同的上下文跨度,多层卷积神经网络的层级结构可以通过更少的非线性计算对其进行建模,缓解了长距离建模中的梯度消失问题。因此,卷积神经网络相对更容易进行训练。
\parinterval
在ConvS2S模型中,编码端和解码端分别使用堆叠的门控卷积神经网络对源语
和目标语
序列进行建模,在传统卷积神经网络的基础上引入了门控线性单元
\upcite
{
Dauphin2017LanguageMW
}
,通过门控机制对卷积输出进行控制,它在模型中的位置如图
\ref
{
fig:11-13
}
黄色方框所示:
\parinterval
在ConvS2S模型中,编码端和解码端分别使用堆叠的门控卷积神经网络对源语
言和目标语言
序列进行建模,在传统卷积神经网络的基础上引入了门控线性单元
\upcite
{
Dauphin2017LanguageMW
}
,通过门控机制对卷积输出进行控制,它在模型中的位置如图
\ref
{
fig:11-13
}
黄色方框所示:
%----------------------------------------------
% 图13.
...
...
@@ -360,7 +360,7 @@
\subsection
{
多跳注意力机制
}
\parinterval
ConvS2S模型也采用了注意力机制来获取每个目标语位置相应的源语言上下文信息。其仍然沿用传统的点乘注意力机制
\upcite
{
DBLP:journals/corr/LuongPM15
}
,其中图
\ref
{
fig:11-16
}
蓝色框代表了多跳自注意力机制在模型中的位置。
\parinterval
ConvS2S模型也采用了注意力机制来获取每个目标语
言
位置相应的源语言上下文信息。其仍然沿用传统的点乘注意力机制
\upcite
{
DBLP:journals/corr/LuongPM15
}
,其中图
\ref
{
fig:11-16
}
蓝色框代表了多跳自注意力机制在模型中的位置。
%----------------------------------------------
% 图16.
...
...
@@ -379,7 +379,7 @@
\alpha
_{
i,j
}
&
=
&
\frac
{
\textrm
{
exp
}
(
\funp
{
a
}
(
\mathbi
{
s
}_{
j-1
}
,
\mathbi
{
h
}_
i))
}{
\sum
_{
i'
}
\textrm
{
exp
}
(
\funp
{
a
}
(
\mathbi
{
s
}_{
j-1
}
,
\mathbi
{
h
}_{
i'
}
))
}
\label
{
eq:11-9
}
\end{eqnarray}
\noindent
其中,
$
\mathbi
{
h
}_
i
$
表示源语
端第
$
i
$
个位置的隐层状态,即编码器在第
$
i
$
个位置的输出。
$
\mathbi
{
s
}_
j
$
表示目标端第
$
j
$
个位置的隐层状态。给定
$
\mathbi
{
s
}_
j
$
和
$
\mathbi
{
h
}_
i
$
,注意力机制通过函数
$
\funp
{
a
}
(
\cdot
)
$
计算目标语言表示
$
\mathbi
{
s
}_
j
$
与源语言表示
$
\mathbi
{
h
}_
i
$
之间的注意力权重
$
\alpha
_{
i,j
}$
,通过加权平均得到当前目标
端位置所需的上下文表示
$
\mathbi
{
C
}_
j
$
。其中
$
\funp
{
a
}
(
\cdot
)
$
的具体计算方式在
{
\chapterten
}
已经详细讨论。
\noindent
其中,
$
\mathbi
{
h
}_
i
$
表示源语
言端第
$
i
$
个位置的隐层状态,即编码器在第
$
i
$
个位置的输出。
$
\mathbi
{
s
}_
j
$
表示目标端第
$
j
$
个位置的隐层状态。给定
$
\mathbi
{
s
}_
j
$
和
$
\mathbi
{
h
}_
i
$
,注意力机制通过函数
$
\funp
{
a
}
(
\cdot
)
$
计算目标语言表示
$
\mathbi
{
s
}_
j
$
与源语言表示
$
\mathbi
{
h
}_
i
$
之间的注意力权重
$
\alpha
_{
i,j
}$
,通过加权平均得到当前目标语言
端位置所需的上下文表示
$
\mathbi
{
C
}_
j
$
。其中
$
\funp
{
a
}
(
\cdot
)
$
的具体计算方式在
{
\chapterten
}
已经详细讨论。
\parinterval
在ConvS2S模型中,解码器同样采用堆叠的多层门控卷积网络来对目标语言进行序列建模。区别于编码器,解码器在每一层卷积网络之后引入了注意力机制,用来参考源语言信息。ConvS2S选用了点乘注意力,并且通过类似残差连接的方式将注意力操作的输入与输出同时作用于下一层计算,称为多跳注意力。其具体计算方式如公式
\eqref
{
eq:11-10
}
所示:
\begin{eqnarray}
...
...
@@ -387,7 +387,7 @@
\label
{
eq:11-10
}
\end{eqnarray}
\noindent
不同于公式
\eqref
{
eq:11-9
}
中使用的目标语
端隐层表示
$
\mathbi
{
s
}_{
j
-
1
}$
,公式
\eqref
{
eq:11-10
}
中的
$
\mathbi
{
d
}_{
j
}^
l
$
同时结合了
$
\mathbi
{
s
}_{
j
}$
的卷积计算结果和目标语
端的词嵌入
$
\mathbi
{
g
}_
j
$
,其具体计算如公式
\eqref
{
eq:11-11
}
和
\eqref
{
eq:11-12
}
所示:
\noindent
不同于公式
\eqref
{
eq:11-9
}
中使用的目标语
言端隐层表示
$
\mathbi
{
s
}_{
j
-
1
}$
,公式
\eqref
{
eq:11-10
}
中的
$
\mathbi
{
d
}_{
j
}^
l
$
同时结合了
$
\mathbi
{
s
}_{
j
}$
的卷积计算结果和目标语言
端的词嵌入
$
\mathbi
{
g
}_
j
$
,其具体计算如公式
\eqref
{
eq:11-11
}
和
\eqref
{
eq:11-12
}
所示:
\begin{eqnarray}
\mathbi
{
d
}_{
j
}^
l
&
=
&
\mathbi
{
W
}_{
d
}^{
l
}
\mathbi
{
z
}_{
j
}^{
l
}
+
\mathbi
{
b
}_{
d
}^{
l
}
+
\mathbi
{
g
}_
j
\label
{
eq:11-11
}
\\
\mathbi
{
z
}_
j
^
l
&
=
&
\textrm
{
Conv
}
(
\mathbi
{
s
}_
j
^
l)
\label
{
eq:11-12
}
...
...
Chapter12/chapter12.tex
查看文件 @
7f946386
差异被折叠。
点击展开。
Chapter15/chapter15.tex
查看文件 @
7f946386
差异被折叠。
点击展开。
Chapter16/Figures/figure-bilingual-dictionary-Induction.tex
查看文件 @
7f946386
...
...
@@ -9,7 +9,7 @@
\draw
[-,thick] (-0.7,1.0)--(-0.7,-1.0);
\node
[anchor=center](c1) at (-0.1,0)
{
\tiny
{$
\mathbi
{
Y
}$}}
;
\node
[anchor=center](c2) at (-0.3,-0.7)
{
\tiny
{$
\mathbi
{
W
}
\cdot
\mathbi
{
X
}$}}
;
\node
[anchor=center](c2) at (-0.3,-0.7)
{
\tiny
{$
\mathbi
{
W
}
\mathbi
{
X
}$}}
;
\node
[anchor=center,red!70](cr1) at (0.65,-0.65)
{
\scriptsize
{$
\bullet
$}}
;
\node
[anchor=center,ublue](cb1) at (0.6,-0.5)
{
\scriptsize
{$
\bullet
$}}
;
\node
[anchor=center,red!70](cr2) at (1.65,-0.65)
{
\scriptsize
{$
\bullet
$}}
;
...
...
@@ -30,7 +30,7 @@
\draw
[-,thick] (-0.7,1.0)--(-0.7,-1.0);
\node
[anchor=center](c1) at (-0.1,0)
{
\tiny
{$
\mathbi
{
Y
}$}}
;
\node
[anchor=center](c2) at (-0.3,-0.7)
{
\tiny
{$
\mathbi
{
W
}
\cdot
\mathbi
{
X
}$}}
;
\node
[anchor=center](c2) at (-0.3,-0.7)
{
\tiny
{$
\mathbi
{
W
}
\mathbi
{
X
}$}}
;
\node
[anchor=center,red!70](cr1) at (0.65,-0.65)
{
\scriptsize
{$
\bullet
$}}
;
\node
[anchor=center,ublue](cb1) at (0.6,-0.5)
{
\scriptsize
{$
\bullet
$}}
;
\node
[anchor=center,red!70](cr2) at (1.65,-0.65)
{
\scriptsize
{$
\bullet
$}}
;
...
...
@@ -136,7 +136,7 @@
\draw
[-,thick] (-0.8,1.0)--(-0.8,-1.0);
\node
[anchor=center](c1) at (0.1,0.6)
{
\tiny
{$
\mathbi
{
Y
}$}}
;
\node
[anchor=center](c2) at (-0.45,-0.7)
{
\tiny
{$
\mathbi
{
W
}
\cdot
\mathbi
{
X
}$}}
;
\node
[anchor=center](c2) at (-0.45,-0.7)
{
\tiny
{$
\mathbi
{
W
}
\mathbi
{
X
}$}}
;
\node
[anchor=center,red!70](cr1) at (0.2,-0.35)
{
\scriptsize
{$
\bullet
$}}
;
\node
[anchor=center,red!70](cr2) at (1.58,-0.78)
{
\scriptsize
{$
\bullet
$}}
;
...
...
Chapter16/Figures/figure-shared-space-inductive-bilingual-dictionary.tex
查看文件 @
7f946386
...
...
@@ -88,8 +88,8 @@
\node
[anchor=north](part1) at ([yshift=0.5em]circle1.south)
{
\small
{$
\mathbi
{
X
}$}}
;
\node
[anchor=west](part2) at ([xshift=6em]part1.east)
{
\small
{$
\mathbi
{
Y
}$}}
;
\node
[anchor=west](part3) at ([xshift=8.
2em]part2.east)
{
\small
{$
\mathbi
{
X
}
\cdot
\mathbi
{
W
}$}}
;
\node
[anchor=west](part3) at ([xshift=15.0em]part2.east)
{
\small
{$
\mathbi
{
X
}
\cdot
\mathbi
{
W
}$
和
$
\mathbi
{
Y
}$
在同一空间
}}
;
\node
[anchor=west](part3) at ([xshift=8.
5em]part2.east)
{
\small
{$
\mathbi
{
X
}
\mathbi
{
W
}$}}
;
\node
[anchor=west](part3) at ([xshift=15.0em]part2.east)
{
\small
{$
\mathbi
{
X
}
\mathbi
{
W
}$
和
$
\mathbi
{
Y
}$
在同一空间
}}
;
\node
[anchor=center](c1) at (5.4,-1.0)
{
\small
{$
\mathbi
{
W
}$}}
;
...
...
Chapter16/chapter16.tex
查看文件 @
7f946386
...
...
@@ -24,7 +24,7 @@
\parinterval
神经机器翻译带来的性能提升是显著的,但随之而来的问题是对海量双语训练数据的依赖。不过,不同语言可以使用的数据规模是不同的。比如汉语、英语这种使用范围广泛的语言,存在着大量的双语平行句对,这些语言被称为
{
\small\bfnew
{
富资源语言
}}
\index
{
富资源语言
}
(High-resource Language
\index
{
High-resource Language
}
)。而对于其它一些使用范围稍小的语言,如斐济语、古吉拉特语等,相关的数据非常稀少,这些语言被称为
{
\small\bfnew
{
低资源语言
}}
\index
{
低资源语言
}
(Low-resource Language
\index
{
Low-resource Language
}
)。世界上现存语言超过5000种,仅有很少一部分为富资源语言,绝大多数均为低资源语言。即使在富资源语言中,对于一些特定的领域,双语平行语料也是十分稀缺的。有时,一些特殊的语种或者领域甚至会面临“零资源”的问题。因此,
{
\small\bfnew
{
低资源机器翻译
}}
\index
{
低资源机器翻译
}
(Low-resource Machine Translation)是当下急需解决且颇具挑战的问题。
\parinterval
本章将对低资源神经机器
机器
翻译的相关问题、模型和方法展开介绍,内容涉及数据的有效使用、双向翻译模型、多语言翻译建模、无监督机器翻译、领域适应五个方面。下面一一展开讨论。
\parinterval
本章将对低资源神经机器翻译的相关问题、模型和方法展开介绍,内容涉及数据的有效使用、双向翻译模型、多语言翻译建模、无监督机器翻译、领域适应五个方面。下面一一展开讨论。
%----------------------------------------------------------------------------------------
% NEW SECTION 16.1
...
...
@@ -181,7 +181,7 @@
\parinterval
神经机器翻译模型所使用的编码器-解码器框架天然就包含了对输入(源语言)和输出(目标语言)进行表示学习的过程。在编码端,需要学习一种分布式表示来表示源语言句子的信息,这种分布式表示可以包含序列中每个位置的表示结果(见
{
\chapternine
}
)。从结构上看,神经机器翻译所使用的编码器与神经语言模型无异,或者说神经机器翻译的编码器其实就是一个源语言的语言模型。唯一的区别在于,神经机器翻译的编码器并不直接输出源语言句子的生成概率,而传统语言模型是建立在序列生成任务上的。既然神经机器翻译的编码器可以与解码器一起在双语数据上联合训练,那为什么不使用更大规模的数据单独对编码器进行训练呢?或者说,直接使用一个预先训练好的编码器,与机器翻译的解码器配合完成翻译过程。
\parinterval
实现上述想法的一种手段是
{
\small\sffamily\bfnew
{
预训练
}}
\index
{
预训练
}
(Pre-training)
\index
{
Pre-training
,
DBLP:conf/nips/DaiL15,DBLP:journals/corr/abs-1802-05365,radford2018improving,devlin2019bert
}
。预训练的做法相当于将表示模型的学习任务从目标任务中分离出来,这样可以利用额外的更大规模的数据进行学习。常用的一种方法是使用语言建模等方式在大规模单语数据上进行训练,来得到神经机器翻译模型中的一部分(比如词嵌入和编码器等)的模型参数,作为模型的初始值。然后,神经机器翻译模型在双语数据上进行
{
\small\sffamily\bfnew
{
微调
}}
\index
{
微调
}
(Fine-tuning)
\index
{
Fine-tuning
}
,以得到最终的翻译模型。
\parinterval
实现上述想法的一种手段是
{
\small\sffamily\bfnew
{
预训练
}}
\index
{
预训练
}
(Pre-training)
\index
{
Pre-training
}
\upcite
{
DBLP:conf/nips/DaiL15,DBLP:journals/corr/abs-1802-05365,radford2018improving,devlin2019bert
}
。预训练的做法相当于将表示模型的学习任务从目标任务中分离出来,这样可以利用额外的更大规模的数据进行学习。常用的一种方法是使用语言建模等方式在大规模单语数据上进行训练,来得到神经机器翻译模型中的一部分(比如词嵌入和编码器等)的模型参数,作为模型的初始值。然后,神经机器翻译模型在双语数据上进行
{
\small\sffamily\bfnew
{
微调
}}
\index
{
微调
}
(Fine-tuning)
\index
{
Fine-tuning
}
,以得到最终的翻译模型。
\parinterval
词嵌入可以被看作是对每个独立单词进行的表示学习,在自然语言处理的众多任务中都扮演着重要角色
\upcite
{
DBLP:conf/icml/CollobertW08,2011Natural,DBLP:journals/corr/abs-1901-09069
}
。到目前为止已经有大量的词嵌入学习方法被提出(见
{
\chapternine
}
),因此可以直接应用这些方法在海量的单语数据上训练得到词嵌入,用来初始化神经机器翻译模型的词嵌入矩阵
\upcite
{
DBLP:conf/aclwat/NeishiSTIYT17,2018When
}
。
...
...
@@ -595,19 +595,19 @@
\begin{itemize}
\vspace
{
0.5em
}
\item
基于GAN的方法
\upcite
{
DBLP:conf/iclr/LampleCRDJ18,DBLP:conf/acl/ZhangLLS17,DBLP:conf/emnlp/XuYOW18,DBLP:conf/naacl/MohiuddinJ19
}
。在这个方法中,通过生成器来产生映射
$
\mathbi
{
W
}$
,鉴别器负责区分随机抽样的元素
$
\mathbi
{
W
}
\cdot
\mathbi
{
X
}$
和
$
\mathbi
{
Y
}$
,两者共同优化收敛后即可得到映射
$
\mathbi
{
W
}$
。
\item
基于GAN的方法
\upcite
{
DBLP:conf/iclr/LampleCRDJ18,DBLP:conf/acl/ZhangLLS17,DBLP:conf/emnlp/XuYOW18,DBLP:conf/naacl/MohiuddinJ19
}
。在这个方法中,通过生成器来产生映射
$
\mathbi
{
W
}$
,鉴别器负责区分随机抽样的元素
$
\mathbi
{
W
}
\mathbi
{
X
}$
和
$
\mathbi
{
Y
}$
,两者共同优化收敛后即可得到映射
$
\mathbi
{
W
}$
。
\vspace
{
0.5em
}
\item
基于Gromov-Wasserstein 的方法
\upcite
{
DBLP:conf/emnlp/Alvarez-MelisJ18,DBLP:conf/lrec/GarneauGBDL20,DBLP:journals/corr/abs-1811-01124,DBLP:conf/emnlp/XuYOW18
}
。Wasserstein距离是度量空间中定义两个概率分布之间距离的函数。在这个任务中,它用来衡量不同语言中单词对之间的相似性,利用空间近似同构的信息可以定义出一些目标函数,之后通过优化该目标函数也可以得到映射
$
\mathbi
{
W
}$
。
\vspace
{
0.5em
}
\end{itemize}
\parinterval
在得到映射
$
\mathbi
{
W
}$
之后,对于
$
\mathbi
{
X
}$
中的任意一个单词
$
x
_{
i
}$
,通过
$
\mathbi
{
W
}
\cdot
\mathbi
{
E
}
(
{
x
}_{
i
}
)
$
将其映射到空间
$
\mathbi
{
y
}$
中(
$
\mathbi
{
E
}
(
{
x
}_{
i
}
)
$
表示的是单词
$
x
_{
i
}$
的词嵌入向量),然后在
$
\mathbi
{
Y
}$
中找到该点的最近邻点
$
y
_{
j
}$
,于是
$
y
_{
j
}$
就是
$
x
_{
i
}$
的翻译词,重复该过程即可归纳出种子词典
$
D
$
,第一阶段结束。事实上,由于第一阶段缺乏监督信号,得到的种子词典
$
D
$
会包含大量的噪音,性能并不高,因此需要进行进一步的微调。
\parinterval
在得到映射
$
\mathbi
{
W
}$
之后,对于
$
\mathbi
{
X
}$
中的任意一个单词
$
x
_{
i
}$
,通过
$
\mathbi
{
W
}
\mathbi
{
E
}
(
{
x
}_{
i
}
)
$
将其映射到空间
$
\mathbi
{
y
}$
中(
$
\mathbi
{
E
}
(
{
x
}_{
i
}
)
$
表示的是单词
$
x
_{
i
}$
的词嵌入向量),然后在
$
\mathbi
{
Y
}$
中找到该点的最近邻点
$
y
_{
j
}$
,于是
$
y
_{
j
}$
就是
$
x
_{
i
}$
的翻译词,重复该过程即可归纳出种子词典
$
D
$
,第一阶段结束。事实上,由于第一阶段缺乏监督信号,得到的种子词典
$
D
$
会包含大量的噪音,性能并不高,因此需要进行进一步的微调。
\parinterval
微调的原理普遍基于普氏分析
\upcite
{
DBLP:journals/corr/MikolovLS13
}
。假设现在有一个种子词典
$
D
=
\left\{
x
_{
i
}
, y
_{
i
}
\right\}
$
其中
${
i
\in\{
1
, n
\}
}$
,和两个单语词嵌入
$
\mathbi
{
X
}$
和
$
\mathbi
{
Y
}$
,那么就可以将
$
D
$
作为
{
\small\bfnew
{
映射锚点
}}
\index
{
映射锚点
}
(Anchor
\index
{
Anchor
}
)学习一个转移矩阵
$
\mathbi
{
W
}$
,使得
$
\mathbi
{
W
}
\cdot
\mathbi
{
X
}$
与
$
\mathbi
{
Y
}$
这两个空间尽可能相近,此外通过对
$
\mathbi
{
W
}$
施加正交约束可以显著提高能
\upcite
{
DBLP:conf/naacl/XingWLL15
}
,于是这个优化问题就转变成了
{
\small\bfnew
{
普鲁克问题
}}
\index
{
普鲁克问题
}
(Procrustes Problem
\index
{
Procrustes Problem
}
)
\upcite
{
DBLP:conf/iclr/SmithTHH17
}
,可以通过
{
\small\bfnew
{
奇异值分解
}}
\index
{
奇异值分解
}
(Singular Value Decomposition,SVD
\index
{
Singular Value Decomposition,SVD
}
)来获得近似解:
\parinterval
微调的原理普遍基于普氏分析
\upcite
{
DBLP:journals/corr/MikolovLS13
}
。假设现在有一个种子词典
$
D
=
\left\{
x
_{
i
}
, y
_{
i
}
\right\}
$
其中
${
i
\in\{
1
, n
\}
}$
,和两个单语词嵌入
$
\mathbi
{
X
}$
和
$
\mathbi
{
Y
}$
,那么就可以将
$
D
$
作为
{
\small\bfnew
{
映射锚点
}}
\index
{
映射锚点
}
(Anchor
\index
{
Anchor
}
)学习一个转移矩阵
$
\mathbi
{
W
}$
,使得
$
\mathbi
{
W
}
\mathbi
{
X
}$
与
$
\mathbi
{
Y
}$
这两个空间尽可能相近,此外通过对
$
\mathbi
{
W
}$
施加正交约束可以显著提高能
\upcite
{
DBLP:conf/naacl/XingWLL15
}
,于是这个优化问题就转变成了
{
\small\bfnew
{
普鲁克问题
}}
\index
{
普鲁克问题
}
(Procrustes Problem
\index
{
Procrustes Problem
}
)
\upcite
{
DBLP:conf/iclr/SmithTHH17
}
,可以通过
{
\small\bfnew
{
奇异值分解
}}
\index
{
奇异值分解
}
(Singular Value Decomposition,SVD
\index
{
Singular Value Decomposition,SVD
}
)来获得近似解:
\begin{eqnarray}
\mathbi
{
W
}^{
\star
}
&
=
&
\underset
{
\mathbi
{
W
}
\in
O
_{
d
}
(
\mathbb
{
R
}
)
}{
\operatorname
{
argmin
}}
\|\mathbi
{
W
}
\cdot
\mathbi
{
X
}
'-
\mathbi
{
Y
}
'
\|
_{
\mathrm
{
F
}}
=
\mathbi
{
U
}
\cdot
\mathbi
{
V
}^{
\rm
{
T
}}
\\
\label
{
eq:16-9
}
\textrm
{
s.t.
\ \ \ \
}
\mathbi
{
U
}
\Sigma
\mathbi
{
V
}^{
\rm
{
T
}}
&
=
&
\operatorname
{
SVD
}
\left
(
\mathbi
{
Y
}
'
\cdot
\mathbi
{
X
}
'
^{
\rm
{
T
}}
\right
)
\mathbi
{
W
}^{
\star
}
&
=
&
\underset
{
\mathbi
{
W
}
\in
O
_{
d
}
(
\mathbb
{
R
}
)
}{
\operatorname
{
argmin
}}
\|\mathbi
{
W
}
\mathbi
{
X
}
'-
\mathbi
{
Y
}
'
\|
_{
\mathrm
{
F
}}
=
\mathbi
{
U
}
\mathbi
{
V
}^{
\rm
{
T
}}
\\
\label
{
eq:16-9
}
\textrm
{
s.t.
\ \ \ \
}
\mathbi
{
U
}
\Sigma
\mathbi
{
V
}^{
\rm
{
T
}}
&
=
&
\operatorname
{
SVD
}
\left
(
\mathbi
{
Y
}
'
\mathbi
{
X
}
'
^{
\rm
{
T
}}
\right
)
\label
{
eq:16-10
}
\end{eqnarray}
...
...
Chapter18/chapter18.tex
查看文件 @
7f946386
差异被折叠。
点击展开。
bibliography.bib
查看文件 @
7f946386
...
...
@@ -9438,6 +9438,22 @@ author = {Zhuang Liu and
year = {2020}
}
@inproceedings{Jawahar2019WhatDB,
title={What Does BERT Learn about the Structure of Language?},
author={Ganesh Jawahar and Beno{\^{\i}}t Sagot and Djam{\'e} Seddah},
publisher={Annual Meeting of the Association for Computational Linguistics},
year={2019}
}
@inproceedings{DBLP:conf/emnlp/Ethayarajh19,
author = {Kawin Ethayarajh},
title = {How Contextual are Contextualized Word Representations? Comparing
the Geometry of BERT, ELMo, and {GPT-2} Embeddings},
pages = {55--65},
publisher = {Conference on Empirical Methods in Natural Language Processing},
year = {2019}
}
%%%%% chapter 15------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
...
@@ -12499,6 +12515,137 @@ author = {Zhuang Liu and
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% chapter 18------------------------------------------------------
@inproceedings{DBLP:conf/aaai/XiaHLS19,
author = {Mengzhou Xia and
Guoping Huang and
Lemao Liu and
Shuming Shi},
title = {Graph Based Translation Memory for Neural Machine Translation},
pages = {7297--7304},
publisher = {the Association for the Advance of Artificial Intelligence},
year = {2019}
}
@inproceedings{DBLP:conf/acl/WangZS13,
author = {Kun Wang and
Chengqing Zong and
Keh-Yih Su},
title = {Integrating Translation Memory into Phrase-Based Machine Translation
during Decoding},
pages = {11--21},
publisher = {Annual Meeting of the Association for Computational Linguistics},
year = {2013}
}
@inproceedings{DBLP:conf/acl/DomingoGEBHPCH19,
author = {Miguel Domingo and
Mercedes Garc{\'{\i}}a-Mart{\'{\i}}nez and
Amando Estela and
Laurent Bi{\'{e}} and
Alexandre Helle and
{\'{A}}lvaro Peris and
Francisco Casacuberta and
Manuel Herranz},
title = {Demonstration of a Neural Machine Translation System with Online Learning
for Translators},
pages = {70--74},
publisher = {Annual Meeting of the Association for Computational Linguistics},
year = {2019}
}
@inproceedings{DBLP:conf/emnlp/NguyenDB17,
author = {Khanh Nguyen and
Hal Daum{\'{e}} III and
Jordan L. Boyd-Graber},
title = {Reinforcement Learning for Bandit Neural Machine Translation with
Simulated Human Feedback},
pages = {1464--1474},
publisher = {Empirical Methods in Natural Language Processing},
year = {2017}
}
@article{DBLP:journals/corr/abs-1805-01553,
author = {Tsz Kin Lam and
Julia Kreutzer and
Stefan Riezler},
title = {A Reinforcement Learning Approach to Interactive-Predictive Neural
Machine Translation},
journal = {CoRR},
volume = {abs/1805.01553},
year = {2018}
}
@article{DBLP:journals/mt/DomingoPC17,
author = {Miguel Domingo and
{\'{A}}lvaro Peris and
Francisco Casacuberta},
title = {Segment-based interactive-predictive machine translation},
journal = {Machine Translation},
volume = {31},
number = {4},
pages = {163--185},
year = {2017}
}
@article{Peris2017InteractiveNM,
title={Interactive neural machine translation},
author={{\'A}lvaro Peris and Miguel Domingo and F. Casacuberta},
journal={Computer Speech and Language},
year={2017},
volume={45},
pages={201-220}
}
@article{DBLP:journals/csl/PerisC19,
author = {{\'{A}}lvaro Peris and
Francisco Casacuberta},
title = {Online learning for effort reduction in interactive neural machine
translation},
journal = {Computer Speech Language},
volume = {58},
pages = {98--126},
year = {2019}
}
@article{DBLP:journals/coling/BarrachinaBCCCKLNTVV09,
author = {Sergio Barrachina and
Oliver Bender and
Francisco Casacuberta and
Jorge Civera and
Elsa Cubel and
Shahram Khadivi and
Antonio L. Lagarda and
Hermann Ney and
Jes{\'{u}}s Tom{\'{a}}s and
Enrique Vidal and
Juan Miguel Vilar},
title = {Statistical Approaches to Computer-Assisted Translation},
journal = {Computer Linguistics},
volume = {35},
number = {1},
pages = {3--28},
year = {2009}
}
@inproceedings{Zens2003EfficientSF,
title={Efficient Search for Interactive Statistical Machine Translation},
author={Franz Josef Och and Richard Zens and Hermann Ney},
booktitle={the European Chapter of the Association for Computational Linguistics},
year={2003},
pages = {387--393}
}
@inproceedings{DBLP:conf/acl/WuebkerGDHL16,
author = {Joern Wuebker and
Spence Green and
John DeNero and
Sasa Hasan and
Minh-Thang Luong},
title = {Models and Inference for Prefix-Constrained Machine Translation},
publisher = {Annual Meeting of the Association for Computational Linguistics},
year = {2016}
}
@article{DBLP:journals/corr/abs-2010-05680,
author = {Jiarui Fang and
Yang Yu and
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论