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
240479cb
Commit
240479cb
authored
4 years ago
by
曹润柘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor update
parent
26b804b7
显示空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
87 行增加
和
54 行删除
+87
-54
Chapter16/Figures/figure-optimization-of-the-model-initialization-method.tex
+6
-6
Chapter16/Figures/figure-parameter-initialization-method-diagram.tex
+4
-4
Chapter16/Figures/figure-schematic-of-the-domain-discriminator.jpg
+0
-0
Chapter16/Figures/figure-schematic-of-the-domain-discriminator.tex
+17
-0
Chapter16/Figures/figure-shared-space-inductive-bilingual-dictionary.png
+0
-0
Chapter16/Figures/figure-target-side-multi-task-learning.tex
+2
-2
Chapter16/Figures/figure-unmt-idea1.jpg
+0
-0
Chapter16/Figures/figure-unmt-idea2.jpg
+0
-0
Chapter16/Figures/figure-unmt-idea3.jpg
+0
-0
Chapter16/Figures/figure-unmt-process.jpg
+0
-0
Chapter16/Figures/figure-unmt-process.tex
+9
-17
Chapter16/Figures/figure-unsupervised-dual-learning-process.png
+0
-0
Chapter16/Figures/figure-unsupervised-dual-learning-process.tex
+39
-0
Chapter16/chapter16.tex
+10
-25
没有找到文件。
Chapter16/Figures/figure-optimization-of-the-model-initialization-method.tex
查看文件 @
240479cb
...
@@ -6,15 +6,15 @@
...
@@ -6,15 +6,15 @@
\tikzstyle
{
circle
}
= [draw,black,very thick,inner sep=3.5pt,rounded corners=4pt,minimum width=2em]
\tikzstyle
{
circle
}
= [draw,black,very thick,inner sep=3.5pt,rounded corners=4pt,minimum width=2em]
\tikzstyle
{
word
}
= [inner sep=3.5pt]
\tikzstyle
{
word
}
= [inner sep=3.5pt]
\node
[circle]
(data) at (0,0)
{
数据
}
;
\node
[circle
,fill=red!20
]
(data) at (0,0)
{
数据
}
;
\node
[circle]
(model) at ([xshift=5em]data.east)
{
模型
}
;
\node
[circle
,fill=blue!20
]
(model) at ([xshift=5em]data.east)
{
模型
}
;
\node
[word]
(init) at ([xshift=-5em]data.west)
{
初始化
}
;
\node
[word]
(init) at ([xshift=-5em]data.west)
{
初始化
}
;
\draw
[->,very thick]
(init.east) -- ([xshift=-0.2em]data.west);
\draw
[->,very thick]
(init.east) -- ([xshift=-0.2em]data.west);
\draw
[->,very thick] ([yshift=1pt]data.north) .. controls +(90:2em) and +(90:2em) .. ([yshift=1pt]model.north) node[above,midway]
{
参数优化
}
;
\draw
[->,very thick] ([yshift=1pt]data.north) .. controls +(90:2em) and +(90:2em) .. ([yshift=1pt]model.north) node[above,midway]
{
参数优化
}
;
\draw
[->,very thick] ([yshift=1pt]model.south) .. controls +(-90:2em) and +(-90:2em) .. ([yshift=1pt]data.south) node[below,midway]
{
数据优化
}
;
\draw
[->,very thick] ([yshift=1pt]model.south) .. controls +(-90:2em) and +(-90:2em) .. ([yshift=1pt]data.south) node[below,midway]
{
数据优化
}
;
\node
[word]
at ([yshift=-5em]data.south)
{
(a)思路1
}
;
\node
[word]
at ([
xshift=-0.5em,
yshift=-5em]data.south)
{
(a)思路1
}
;
\end{scope}
\end{scope}
\end{tikzpicture}
\end{tikzpicture}
...
@@ -25,15 +25,15 @@
...
@@ -25,15 +25,15 @@
\tikzstyle
{
circle
}
= [draw,black,very thick,inner sep=3.5pt,rounded corners=4pt,minimum width=2em]
\tikzstyle
{
circle
}
= [draw,black,very thick,inner sep=3.5pt,rounded corners=4pt,minimum width=2em]
\tikzstyle
{
word
}
= [inner sep=3.5pt]
\tikzstyle
{
word
}
= [inner sep=3.5pt]
\node
[circle]
(data) at (0,0)
{
数据
}
;
\node
[circle
,fill=red!20
]
(data) at (0,0)
{
数据
}
;
\node
[circle]
(model) at ([xshift=5em]data.east)
{
模型
}
;
\node
[circle
,fill=blue!20
]
(model) at ([xshift=5em]data.east)
{
模型
}
;
\node
[word]
(init) at ([xshift=5em]model.east)
{
初始化
}
;
\node
[word]
(init) at ([xshift=5em]model.east)
{
初始化
}
;
\draw
[->,very thick]
(init.west) -- ([xshift=0.2em]model.east);
\draw
[->,very thick]
(init.west) -- ([xshift=0.2em]model.east);
\draw
[->,very thick] ([yshift=1pt]data.north) .. controls +(90:2em) and +(90:2em) .. ([yshift=1pt]model.north) node[above,midway]
{
参数优化
}
;
\draw
[->,very thick] ([yshift=1pt]data.north) .. controls +(90:2em) and +(90:2em) .. ([yshift=1pt]model.north) node[above,midway]
{
参数优化
}
;
\draw
[->,very thick] ([yshift=1pt]model.south) .. controls +(-90:2em) and +(-90:2em) .. ([yshift=1pt]data.south) node[below,midway]
{
数据优化
}
;
\draw
[->,very thick] ([yshift=1pt]model.south) .. controls +(-90:2em) and +(-90:2em) .. ([yshift=1pt]data.south) node[below,midway]
{
数据优化
}
;
\node
[word]
at ([yshift=-5em]model.south)
{
(b)思路2
}
;
\node
[word]
at ([
xshift=-0.5em,
yshift=-5em]model.south)
{
(b)思路2
}
;
\end{scope}
\end{scope}
\end{tikzpicture}
\end{tikzpicture}
...
...
This diff is collapsed.
Click to expand it.
Chapter16/Figures/figure-parameter-initialization-method-diagram.tex
查看文件 @
240479cb
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
\begin{tikzpicture}
\begin{tikzpicture}
\tikzstyle
{
node
}
=[rounded corners=4pt,draw,minimum height=3em,drop shadow,font=
\footnotesize
]
\tikzstyle
{
node
}
=[rounded corners=4pt,draw,minimum height=3em,drop shadow,font=
\footnotesize
]
\node
[node,minimum width=6em,minimum height=2.4em,fill=
blue
!20,line width=0.6pt]
(encoder1) at (0,0)
{
\small
编码器
}
;
\node
[node,minimum width=6em,minimum height=2.4em,fill=
red
!20,line width=0.6pt]
(encoder1) at (0,0)
{
\small
编码器
}
;
\node
[node,anchor=west,minimum width=6em,minimum height=2.4em,fill=
blue
!20,line width=0.6pt]
(encoder2) at ([xshift=4em,yshift=0em]encoder1.east)
{
\small
编码器
}
;
\node
[node,anchor=west,minimum width=6em,minimum height=2.4em,fill=
red
!20,line width=0.6pt]
(encoder2) at ([xshift=4em,yshift=0em]encoder1.east)
{
\small
编码器
}
;
\node
[node,anchor=west,minimum width=6em,minimum height=2.4em,fill=red!
2
0,line width=0.6pt]
(encoder3) at ([xshift=3em]encoder2.east)
{
\small
编码器
}
;
\node
[node,anchor=west,minimum width=6em,minimum height=2.4em,fill=red!
4
0,line width=0.6pt]
(encoder3) at ([xshift=3em]encoder2.east)
{
\small
编码器
}
;
\node
[node,anchor=north,minimum width=6em,minimum height=2.4em,fill=blue!20,line width=0.6pt]
(decoder1) at ([yshift=-3em]encoder1.south)
{
\small
解码器
}
;
\node
[node,anchor=north,minimum width=6em,minimum height=2.4em,fill=blue!20,line width=0.6pt]
(decoder1) at ([yshift=-3em]encoder1.south)
{
\small
解码器
}
;
\node
[node,anchor=west,minimum width=6em,minimum height=2.4em,fill=blue!20,line width=0.6pt]
(decoder2) at ([xshift=4em,yshift=0em]decoder1.east)
{
\small
解码器
}
;
\node
[node,anchor=west,minimum width=6em,minimum height=2.4em,fill=blue!20,line width=0.6pt]
(decoder2) at ([xshift=4em,yshift=0em]decoder1.east)
{
\small
解码器
}
;
\node
[node,anchor=west,minimum width=6em,minimum height=2.4em,fill=
red!2
0,line width=0.6pt]
(decoder3) at ([xshift=3em]decoder2.east)
{
\small
解码器
}
;
\node
[node,anchor=west,minimum width=6em,minimum height=2.4em,fill=
blue!4
0,line width=0.6pt]
(decoder3) at ([xshift=3em]decoder2.east)
{
\small
解码器
}
;
\node
[anchor=north,font=\scriptsize,fill=yellow!20]
(w1) at ([yshift=-1.6em]decoder1.south)
{
知识
\
就是
\
力量
\
。
\
<EOS>
}
;
\node
[anchor=north,font=\scriptsize,fill=yellow!20]
(w1) at ([yshift=-1.6em]decoder1.south)
{
知识
\
就是
\
力量
\
。
\
<EOS>
}
;
\node
[anchor=north,font=\scriptsize,fill=green!20]
(w3) at ([yshift=-1.6em]decoder3.south)
{
Wissen
\
ist
\
Machit
\
.
\
<EOS>
}
;
\node
[anchor=north,font=\scriptsize,fill=green!20]
(w3) at ([yshift=-1.6em]decoder3.south)
{
Wissen
\
ist
\
Machit
\
.
\
<EOS>
}
;
...
...
This diff is collapsed.
Click to expand it.
Chapter16/Figures/figure-schematic-of-the-domain-discriminator.jpg
deleted
100644 → 0
查看文件 @
26b804b7
38.1 KB
This diff is collapsed.
Click to expand it.
Chapter16/Figures/figure-schematic-of-the-domain-discriminator.tex
0 → 100644
查看文件 @
240479cb
\begin{tikzpicture}
\tikzstyle
{
rec
}
= [,line width=0.6pt,draw,rounded corners,minimum height=2.2em,minimum width=4.3em,fill=blue!20]
\node
[anchor=center](node1) at (0,0)
{
源语言
}
;
\node
[anchor=west,rec,fill=red!20](node2) at ([xshift=2.0em]node1.east)
{
编码器
}
;
\node
[anchor=west,rec](node3) at ([xshift=3.0em,yshift=2.0em]node2.east)
{
解码器
}
;
\node
[anchor=west,rec,fill=yellow!20](node4) at ([xshift=3.0em,yshift=-2.0em]node2.east)
{
鉴别器
}
;
\draw
[->,thick](node1.east)--(node2.west);
\draw
[->,thick](node2.east)--([xshift=1.5em]node2.east)--([xshift=1.5em,yshift=2.0em]node2.east)--(node3.west);
\draw
[->,thick](node2.east)--([xshift=1.5em]node2.east)--([xshift=1.5em,yshift=-2.0em]node2.east)--(node4.west);
\node
[anchor=west](node5) at ([xshift=2.0em]node3.east)
{
目标语言
}
;
\node
[anchor=west](node6) at ([xshift=2.0em]node4.east)
{
< 领域 >
}
;
\draw
[->,thick](node3.east)--(node5.west);
\draw
[->,thick](node4.east)--(node6.west);
\end{tikzpicture}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Chapter16/Figures/figure-shared-space-inductive-bilingual-dictionary.png
deleted
100644 → 0
查看文件 @
26b804b7
115 KB
This diff is collapsed.
Click to expand it.
Chapter16/Figures/figure-target-side-multi-task-learning.tex
查看文件 @
240479cb
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
\node
[anchor=center] (node1-1) at (0,0)
{
\small
{$
y'
$}}
;
\node
[anchor=center] (node1-1) at (0,0)
{
\small
{$
y'
$}}
;
\node
[anchor=south,line width=0.6pt,draw,rounded corners,minimum height=1.5em,minimum width=4.3em,fill=blue!20]
(node1-2) at ([yshift=-3em]node1-1.south)
{
\small
{
Softmax
}}
;
\node
[anchor=south,line width=0.6pt,draw,rounded corners,minimum height=1.5em,minimum width=4.3em,fill=blue!20]
(node1-2) at ([yshift=-3em]node1-1.south)
{
\small
{
Softmax
}}
;
\node
[anchor=north,line width=0.6pt,draw,rounded corners,minimum height=2.2em,minimum width=4.3em,fill=
red
!20]
(node1-3) at ([yshift=-2.0em]node1-2.south)
{
\small
{
解码器
}}
;
\node
[anchor=north,line width=0.6pt,draw,rounded corners,minimum height=2.2em,minimum width=4.3em,fill=
blue
!20]
(node1-3) at ([yshift=-2.0em]node1-2.south)
{
\small
{
解码器
}}
;
\node
[anchor=north,line width=0.6pt,draw,rounded corners,minimum height=2.2em,minimum width=4.3em,fill=yellow!20]
(node3-3) at ([yshift=-2.0em]node1-3.south)
{
\small
{
语言模型
}}
;
\node
[anchor=north,line width=0.6pt,draw,rounded corners,minimum height=2.2em,minimum width=4.3em,fill=yellow!20]
(node3-3) at ([yshift=-2.0em]node1-3.south)
{
\small
{
语言模型
}}
;
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
\node
[anchor=east] (node2-1-1) at ([xshift=-12.0em,yshift=-4.25em]node1-1.west)
{
\small
{$
y'
$}}
;
\node
[anchor=east] (node2-1-1) at ([xshift=-12.0em,yshift=-4.25em]node1-1.west)
{
\small
{$
y'
$}}
;
\node
[anchor=south,line width=0.6pt,draw,rounded corners,minimum height=1.5em,minimum width=4.3em,fill=blue!20]
(node2-1-2) at ([yshift=-3em]node2-1-1.south)
{
\small
{
Softmax
}}
;
\node
[anchor=south,line width=0.6pt,draw,rounded corners,minimum height=1.5em,minimum width=4.3em,fill=blue!20]
(node2-1-2) at ([yshift=-3em]node2-1-1.south)
{
\small
{
Softmax
}}
;
\node
[anchor=north,line width=0.6pt,draw,rounded corners,minimum height=2.2em,minimum width=4.3em,fill=
red
!20]
(node2-1-3) at ([yshift=-2.0em]node2-1-2.south)
{
\small
{
解码器
}}
;
\node
[anchor=north,line width=0.6pt,draw,rounded corners,minimum height=2.2em,minimum width=4.3em,fill=
blue
!20]
(node2-1-3) at ([yshift=-2.0em]node2-1-2.south)
{
\small
{
解码器
}}
;
\node
[anchor=east,line width=0.6pt,draw,rounded corners,minimum height=2.2em,minimum width=4.3em,fill=red!20]
(node2-2-1) at ([xshift=-2em]node2-1-3.west)
{
\small
{
编码器
}}
;
\node
[anchor=east,line width=0.6pt,draw,rounded corners,minimum height=2.2em,minimum width=4.3em,fill=red!20]
(node2-2-1) at ([xshift=-2em]node2-1-3.west)
{
\small
{
编码器
}}
;
\node
[anchor=north]
(node2-2-2) at ([yshift=-2em]node2-2-1.south)
{
\small
{$
x
$}}
;
\node
[anchor=north]
(node2-2-2) at ([yshift=-2em]node2-2-1.south)
{
\small
{$
x
$}}
;
\node
[anchor=north]
(node2-2-3) at ([yshift=-2em]node2-1-3.south)
{
\small
{$
y
$}}
;
\node
[anchor=north]
(node2-2-3) at ([yshift=-2em]node2-1-3.south)
{
\small
{$
y
$}}
;
...
...
This diff is collapsed.
Click to expand it.
Chapter16/Figures/figure-unmt-idea1.jpg
deleted
100644 → 0
查看文件 @
26b804b7
67.4 KB
This diff is collapsed.
Click to expand it.
Chapter16/Figures/figure-unmt-idea2.jpg
deleted
100644 → 0
查看文件 @
26b804b7
113 KB
This diff is collapsed.
Click to expand it.
Chapter16/Figures/figure-unmt-idea3.jpg
deleted
100644 → 0
查看文件 @
26b804b7
138 KB
This diff is collapsed.
Click to expand it.
Chapter16/Figures/figure-unmt-process.jpg
deleted
100644 → 0
查看文件 @
26b804b7
118 KB
This diff is collapsed.
Click to expand it.
Chapter16/Figures/figure-unmt-process.tex
查看文件 @
240479cb
\begin{tikzpicture}
\begin{tikzpicture}
\begin{scope}
\begin{scope}
% ,minimum height =1em,minimum width=2em
\tikzstyle
{
circle
}
= [draw,black,very thick,inner sep=3.5pt,rounded corners=4pt,minimum width=2em,align=center,fill=blue!20]
\tikzstyle
{
circle
}
= [draw,black,very thick,inner sep=3.5pt,rounded corners=4pt,minimum width=2em,align=center]
\tikzstyle
{
word
}
= [inner sep=3.5pt]
\tikzstyle
{
word
}
= [inner sep=3.5pt]
\node
[circle]
(center) at (0,0)
{
\node
[circle]
(center) at (0,0)
{
\begin{tabular}
{
c | c
}
\begin{tabular}
{
c | c
}
$
s
\rightarrow
t
$
&
$
t
\rightarrow
s
$
\\
$
x
\rightarrow
y
$
&
$
y
\rightarrow
x
$
\\
模型
&
模型
模型
&
模型
\end{tabular}
\end{tabular}
}
;
}
;
\node
[circle
]
(left) at ([xshift=-9em]center.west)
{$
s
\rightarrow
t
$
\\
数据
}
;
\node
[circle
,fill=red!20]
(left) at ([xshift=-9em]center.west)
{$
x
\rightarrow
y
$
\\
数据
}
;
\node
[circle
]
(right) at ([xshift=9em]center.east)
{$
t
\rightarrow
s
$
\\
数据
}
;
\node
[circle
,fill=red!20]
(right) at ([xshift=9em]center.east)
{$
y
\rightarrow
x
$
\\
数据
}
;
\node
[word]
(init) at ([yshift=6em]center.north)
{
初始化
}
;
\node
[word]
(init) at ([yshift=6em]center.north)
{
初始化
}
;
\node
[circle
]
(down) at ([yshift=-8em]center.south)
{$
s,t
$
\\
数据
}
;
\node
[circle
,fill=red!20]
(down) at ([yshift=-8em]center.south)
{$
x,y
$
\\
数据
}
;
\draw
[->,very thick]
(init.south) -- ([yshift=0.2em]center.north);
\draw
[->,very thick]
(init.south) -- ([yshift=0.2em]center.north);
\draw
[->,very thick]
([yshift=0.2em]down.north) -- ([yshift=-0.2em]center.south) node[pos=
.44,midway,align=center]
{
语言模型
\\
目标函数
\\
(模型优化)
}
;
\draw
[->,very thick]
([yshift=0.2em]down.north) -- ([yshift=-0.2em]center.south) node[pos=
0.6,midway,align=left,xshift=-2.5em,yshift=0.5em]
{
语言模型
\\
目标函数
}
;
\node
[anchor=center] at ([yshift=2.0em,xshift=-2.5em]down.north)
{
(模型优化)
}
;
\draw
[->,very thick]
([yshift=1pt]left.north) .. controls +(90:2em) and +(90:2em) .. ([yshift=1pt,xshift=-2.2em]center.north) node[above,midway,align=center]
{
正常MT
目标函数
\\
(模型优化)
}
;
\draw
[->,very thick]
([yshift=1pt]left.north) .. controls +(90:2em) and +(90:2em) .. ([yshift=1pt,xshift=-2.2em]center.north) node[above,midway,align=center]
{
翻译模型
目标函数
\\
(模型优化)
}
;
\draw
[->,very thick]
([yshift=1pt,xshift=-1.8em]center.north) .. controls +(90:2em) and +(90:2em) .. ([yshift=1pt]right.north) node[above,pos=0.6,align=center]
{
回译
\\
(数据优化)
}
;
\draw
[->,very thick]
([yshift=1pt,xshift=-1.8em]center.north) .. controls +(90:2em) and +(90:2em) .. ([yshift=1pt]right.north) node[above,pos=0.6,align=center]
{
回译
\\
(数据优化)
}
;
\draw
[->,very thick] ([yshift=1pt]right.south) .. controls +(-90:2em) and +(-90:2em) .. ([yshift=1pt,xshift=2.2em]center.south) node[below,midway,align=center]
{
正常MT
目标函数
\\
(模型优化)
}
;
\draw
[->,very thick] ([yshift=1pt]right.south) .. controls +(-90:2em) and +(-90:2em) .. ([yshift=1pt,xshift=2.2em]center.south) node[below,midway,align=center]
{
翻译模型
目标函数
\\
(模型优化)
}
;
\draw
[->,very thick] ([yshift=1pt,xshift=1.8em]center.south) .. controls +(-90:2em) and +(-90:2em) .. ([yshift=1pt]left.south) node[below,pos=0.6,align=center]
{
回译
\\
(数据优化)
}
;
\draw
[->,very thick] ([yshift=1pt,xshift=1.8em]center.south) .. controls +(-90:2em) and +(-90:2em) .. ([yshift=1pt]left.south) node[below,pos=0.6,align=center]
{
回译
\\
(数据优化)
}
;
%\draw[->,very thick] (init.east) -- ([xshift=-0.2em]data.west);
%\draw [->,very thick] ([yshift=1pt]data.north) .. controls +(90:2em) and +(90:2em) .. ([yshift=1pt]model.north) node[above,midway] {参数优化};
%\draw [->,very thick] ([yshift=1pt]model.south) .. controls +(-90:2em) and +(-90:2em) .. ([yshift=1pt]data.south) node[below,midway] {数据优化};
%\node[word] at ([yshift=-5em]data.south){(a)思路1};
\end{scope}
\end{scope}
\end{tikzpicture}
\end{tikzpicture}
This diff is collapsed.
Click to expand it.
Chapter16/Figures/figure-unsupervised-dual-learning-process.png
deleted
100644 → 0
查看文件 @
26b804b7
15.2 KB
This diff is collapsed.
Click to expand it.
Chapter16/Figures/figure-unsupervised-dual-learning-process.tex
0 → 100644
查看文件 @
240479cb
\begin{tikzpicture}
\tikzstyle
{
circle
}
= [draw,black,line width=0.6pt,inner sep=3.5pt,rounded corners=4pt,minimum width=2em]
\tikzstyle
{
word
}
= [inner sep=3.5pt]
\node
[anchor=center] (node1-1) at (0,0)
{
\small
{
\seq
{
x
}}}
;
\node
[anchor=west] (node1-2) at ([xshift=0.8em]node1-1.east)
{
\small
{
\seq
{
y
}}}
;
\node
[anchor=north] (node1-3) at ([xshift=1.0em]node1-1.south)
{
\small
{
翻译模型f
}}
;
\draw
[->,line width=0.6pt](node1-1.east)--(node1-2.west);
\begin{pgfonlayer}
{
background
}
{
\node
[fill=blue!20,inner sep=0.1em,draw=black,line width=0.6pt,minimum width=5em,drop shadow,rounded corners=2pt]
[fit =(node1-1)(node1-2)(node1-3)] (remark1)
{}
;
}
\end{pgfonlayer}
\node
[anchor=north,circle,fill=red!20,minimum width=6.8em]
(node2) at ([xshift=-6.0em,yshift=-2.0em]remark1.south)
{
源语言句子
$
\seq
{
x
}$}
;
\node
[anchor=north,circle,fill=red!20,minimum width=6.8em]
(node2-2) at ([yshift=-0.2em]node2.south)
{
新生成句子
$
\seq
{
x'
}$}
;
\draw
[->,thick]([yshift=0.2em]node2.north).. controls (-1.95,-1.5) and (-1.95,-0.2)..([xshift=-0.2em]remark1.west);
\node
[anchor=north,circle,fill=red!20]
(node3) at ([xshift=6.5em,yshift=-2.0em]remark1.south)
{
目标语言句子
$
\seq
{
x
}$}
;
\draw
[->,thick]([xshift=0.2em]remark1.east).. controls (2.9,-0.2) and (2.9,-0.7) ..([yshift=0.2em]node3.north);
\node
[anchor=north] (node4-1) at ([xshift=-1.0em,yshift=-7.0em]remark1.south)
{
\small
{
\seq
{
y
}}}
;
\node
[anchor=west] (node4-2) at ([xshift=0.8em]node4-1.east)
{
\small
{
\seq
{
x
}}}
;
\node
[anchor=north] (node4-3) at ([xshift=1.0em]node4-1.south)
{
\small
{
翻译模型g
}}
;
\draw
[->,line width=0.6pt](node4-1.east)--(node4-2.west);
\begin{pgfonlayer}
{
background
}
{
\node
[fill=yellow!20,inner sep=0.1em,draw=black,line width=0.6pt,minimum width=5em,drop shadow,rounded corners=2pt]
[fit =(node4-1)(node4-2)(node4-3)] (remark2)
{}
;
}
\end{pgfonlayer}
\draw
[->,thick]([xshift=-0.2em]remark2.west).. controls (-0.8,-4.12) and (-1.95,-4.12)..([yshift=-0.2em]node2-2.south);
\draw
[->,thick]([yshift=-0.2em]node3.south).. controls (2.9,-3) and (2.9,-4.1)..([xshift=0.2em]remark2.east);
\end{tikzpicture}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Chapter16/chapter16.tex
查看文件 @
240479cb
...
@@ -351,7 +351,7 @@ $\funp{P}(\seq{y}|\seq{x})$和$\funp{P}(\seq{x}|\seq{y})$是否真的没有关
...
@@ -351,7 +351,7 @@ $\funp{P}(\seq{y}|\seq{x})$和$\funp{P}(\seq{x}|\seq{y})$是否真的没有关
%----------------------------------------------
%----------------------------------------------
\begin{figure}
[htp]
\begin{figure}
[htp]
\centering
\centering
\in
cludegraphics
[scale=0.4]
{
./Chapter16/Figures/figure-unsupervised-dual-learning-process.png
}
\in
put
{
./Chapter16/Figures/figure-unsupervised-dual-learning-process
}
\caption
{
无监督对偶学习流程
}
\caption
{
无监督对偶学习流程
}
\label
{
fig:16-10-xc
}
\label
{
fig:16-10-xc
}
\end{figure}
\end{figure}
...
@@ -693,15 +693,7 @@ P(\mathbi{y}|\mathbi{x}) & = & \frac{\mathrm{cos}(\mathbi{x},\mathbi{y})/\tau}{\
...
@@ -693,15 +693,7 @@ P(\mathbi{y}|\mathbi{x}) & = & \frac{\mathrm{cos}(\mathbi{x},\mathbi{y})/\tau}{\
\subsubsection
{
1. 基于无监督统计机器翻译的方法
}
\subsubsection
{
1. 基于无监督统计机器翻译的方法
}
一个简单的方法是,借助已经成功的无监督方法来为神经机器翻译模型提供少量双语监督信号,然后在这个基础上训练模型。由于初始的监督信号可能很少或者包含大量噪声,因此需要逐步优化数据来重新训练出更好的模型。这也是目前所有无监督神经机器翻译方法的核心思路。这个方案最简单直接的实现就是借助已经成功的无监督统计机器翻译模型产生伪双语数据来训练神经机器翻译模型 ,然后模型进行迭代回译来进行数据优化,如图
\ref
{
fig:16-1
}
所示
\upcite
{
DBLP:conf/acl/ArtetxeLA19
}
。这个方法的优点是直观,并且性能稳定,容易调试(所有模块都互相独立)。缺点是复杂繁琐,涉及许多超参数调整工作,而且训练代价较大。
\parinterval
一个简单的方法是,借助已经成功的无监督方法来为神经机器翻译模型提供少量双语监督信号,然后在这个基础上训练模型。由于初始的监督信号可能很少或者包含大量噪声,因此需要逐步优化数据来重新训练出更好的模型。这也是目前所有无监督神经机器翻译方法的核心思路。这个方案最简单直接的实现就是借助已经成功的无监督统计机器翻译模型产生伪双语数据来训练神经机器翻译模型 ,然后模型进行迭代回译来进行数据优化
\upcite
{
DBLP:conf/acl/ArtetxeLA19
}
。这个方法的优点是直观,并且性能稳定,容易调试(所有模块都互相独立)。缺点是复杂繁琐,涉及许多超参数调整工作,而且训练代价较大。
%----------------------------------------------
\begin{figure}
[h]
\centering
\includegraphics
[scale=0.2,angle=90]
{
Chapter16/Figures/figure-unmt-idea1.jpg
}
\caption
{
用无监督统计机器翻译训练神经机器翻译
}
\label
{
fig:16-1
}
\end{figure}
%----------------------------------------------
%----------------------------------------------------------------------------------------
%----------------------------------------------------------------------------------------
% NEW SUB-SUB-SECTION
% NEW SUB-SUB-SECTION
...
@@ -709,7 +701,7 @@ P(\mathbi{y}|\mathbi{x}) & = & \frac{\mathrm{cos}(\mathbi{x},\mathbi{y})/\tau}{\
...
@@ -709,7 +701,7 @@ P(\mathbi{y}|\mathbi{x}) & = & \frac{\mathrm{cos}(\mathbi{x},\mathbi{y})/\tau}{\
\subsubsection
{
2. 基于无监督词典归纳的方法
}
\subsubsection
{
2. 基于无监督词典归纳的方法
}
\parinterval
既然无监督神经机器翻译问题的核心在于通过无监督方法提供初始的监督信号,另一个思路就是直接从无监督词典归纳中得到神经机器翻译模型,从而避免繁琐的无监督统计机器翻译模型训练过程,同时也避免神经机器翻译模型继承统计机器翻译模型的错误
,如图
\ref
{
fig:16-2
}
所示
。这种方法的核心就是把翻译看成一个两阶段的过程:
\parinterval
既然无监督神经机器翻译问题的核心在于通过无监督方法提供初始的监督信号,另一个思路就是直接从无监督词典归纳中得到神经机器翻译模型,从而避免繁琐的无监督统计机器翻译模型训练过程,同时也避免神经机器翻译模型继承统计机器翻译模型的错误。这种方法的核心就是把翻译看成一个两阶段的过程:
\begin{itemize}
\begin{itemize}
\vspace
{
0.5em
}
\vspace
{
0.5em
}
...
@@ -719,28 +711,21 @@ P(\mathbi{y}|\mathbi{x}) & = & \frac{\mathrm{cos}(\mathbi{x},\mathbi{y})/\tau}{\
...
@@ -719,28 +711,21 @@ P(\mathbi{y}|\mathbi{x}) & = & \frac{\mathrm{cos}(\mathbi{x},\mathbi{y})/\tau}{\
\vspace
{
0.5em
}
\vspace
{
0.5em
}
\end{itemize}
\end{itemize}
而第二阶段的改写任务其实也是一个特殊的翻译任务,只不过现在的源语言和目标语言是使用不同的方式表达的同一种语言的句子。因此可以使用神经机器翻译模型来完成这个任务,而且由于这里不涉及双语数据而只需要单语数据,模型的训练也将是无监督的。这样的方法不再需要无监督统计机器翻译,并且适应能力很强。对于新语种,不需要重新训练神经机器翻译模型,只需要训练无监督词典归纳进行词的翻译,然后使用相同的模型进行改写。但是,目前训练数据需要使用其他语种对的双语数据来进行构造(把源语言句子里每个词使用双语词典进行翻译作为输入,输出的目标语言句子不变)。虽然可以通过把单语句子根据规则或者随机进行打乱来生成训练数据,但是这些句子不符合语言学的规律,并且跟真实句子所服从的数据分布不一致,导致训练测试不一致的问题。而且这样一个两阶段的过程会产生错误传播的问题,比如无监督词典归纳对一些词进行了错误的翻译,那么这些错误的翻译会被送到神经机器翻译模型里进行改写,而因为翻译模型这时候已经无法看到源语言句子来进行修正,所以最终的结果将继承无监督词典归纳的错误
\upcite
{
DBLP:conf/acl/PourdamghaniAGK19
}
。
\parinterval
而第二阶段的改写任务其实也是一个特殊的翻译任务,只不过现在的源语言和目标语言是使用不同的方式表达的同一种语言的句子。因此可以使用神经机器翻译模型来完成这个任务,而且由于这里不涉及双语数据而只需要单语数据,模型的训练也将是无监督的。这样的方法不再需要无监督统计机器翻译,并且适应能力很强。对于新语种,不需要重新训练神经机器翻译模型,只需要训练无监督词典归纳进行词的翻译,然后使用相同的模型进行改写。但是,目前训练数据需要使用其他语种的双语数据来进行构造(把源语言句子里每个词使用双语词典进行翻译作为输入,输出的目标语言句子不变)。虽然可以通过把单语句子根据规则或者随机进行打乱来生成训练数据,但是这些句子不符合语言学的规律,并且跟真实句子所服从的数据分布不一致,导致训练测试不一致的问题。而且这样一个两阶段的过程会产生错误传播的问题,比如无监督词典归纳对一些词进行了错误的翻译,那么这些错误的翻译会被送到神经机器翻译模型里进行改写,而因为翻译模型这时候已经无法看到源语言句子来进行修正,所以最终的结果将继承无监督词典归纳的错误
\upcite
{
DBLP:conf/acl/PourdamghaniAGK19
}
。
%----------------------------------------------
\begin{figure}
[h]
\centering
\includegraphics
[scale=0.2,angle=90]
{
Chapter16/Figures/figure-unmt-idea2.jpg
}
\caption
{
基于无监督词典归纳的方法
}
\label
{
fig:16-2
}
\end{figure}
%----------------------------------------------
%----------------------------------------------------------------------------------------
%----------------------------------------------------------------------------------------
% NEW SUB-SUB-SECTION
% NEW SUB-SUB-SECTION
%----------------------------------------------------------------------------------------
%----------------------------------------------------------------------------------------
\subsubsection
{
3. 更深层的融合
}
\subsubsection
{
3. 更深层的融合
}
\parinterval
为了获得更好的神经机器翻译模型,可以对训练流程和模型做更深度的整合。
{
\chapternine
}
已经介绍,神经机器翻译模型的训练包含两个阶段:初始化和优化,而无监督神经机器翻译的核心思路也是对应的两个阶段:无监督方法提供初始的监督信号和数据优化,因此可以考虑通过在模型的初始化阶段使用无监督方法提供初始的监督信号,然后优化过程不但优化模型的参数,还优化训练使用的数据,从而避免流水线带来的错误传播。其中初始的监督信号可以通过两种方法提供给模型,一种是直接使用无监督方法提供最初的伪双语数据来训练最初的翻译模型,另一种则是借助无监督方法来初始化模型,得到最初的翻译模型后直接使用初始化好的翻译模型产生伪双语数据来训练自己,如图
\ref
{
fig:16-3
}
所示。图
\ref
{
fig:16-3
}
(a)的一个简单实现是利用无监督词典归纳得到的词典对单语数据进行逐词的翻译,得到最初的伪双语数据,然后在这些数据上训练最初的翻译模型,最后不断地交替优化数据和模型,得到更好的翻译模型和质量更好的伪数据
\upcite
{
DBLP:conf/iclr/LampleCDR18
}
。这样的做法通过不断优化训练用的双语数据,摆脱了无监督词典归纳在最初的伪双语数据中遗留下来的错误,同时也避免了使用无监督统计机器翻译模型的繁琐和代价。图
\ref
{
fig:16-3
}
(b)的实现则依赖于具体的翻译模型初始化方法,我们将在下一节讨论翻译模型的不同初始化方法。
\parinterval
为了获得更好的神经机器翻译模型,可以对训练流程和模型做更深度的整合。
{
\chapternine
}
已经介绍,神经机器翻译模型的训练包含两个阶段:初始化和优化,而无监督神经机器翻译的核心思路也是对应的两个阶段:无监督方法提供初始的监督信号和数据优化,因此可以考虑通过在模型的初始化阶段使用无监督方法提供初始的监督信号,然后优化过程不但优化模型的参数,还优化训练使用的数据,从而避免流水线带来的错误传播。其中初始的监督信号可以通过两种方法提供给模型,一种是直接使用无监督方法提供最初的伪双语数据来训练最初的翻译模型,另一种则是借助无监督方法来初始化模型,得到最初的翻译模型后直接使用初始化好的翻译模型产生伪双语数据来训练自己,如图
\ref
{
fig:16-3
-lyy
}
所示。图
\ref
{
fig:16-3-lyy
}
(a)的一个简单实现是利用无监督词典归纳得到的词典对单语数据进行逐词的翻译,得到最初的伪双语数据,然后在这些数据上训练最初的翻译模型,最后不断地交替优化数据和模型,得到更好的翻译模型和质量更好的伪数据
\upcite
{
DBLP:conf/iclr/LampleCDR18
}
。这样的做法通过不断优化训练用的双语数据,摆脱了无监督词典归纳在最初的伪双语数据中遗留下来的错误,同时也避免了使用无监督统计机器翻译模型的繁琐和代价。图
\ref
{
fig:16-3-lyy
}
(b)的实现则依赖于具体的翻译模型初始化方法,我们将在下一节讨论翻译模型的不同初始化方法。
%----------------------------------------------
%----------------------------------------------
\begin{figure}
[h]
\begin{figure}
[h]
\centering
\centering
\input
{
Chapter16/Figures/figure-optimization-of-the-model-initialization-method
}
\input
{
Chapter16/Figures/figure-optimization-of-the-model-initialization-method
}
\caption
{
模型初始化方法的优化
}
\caption
{
模型初始化方法的优化
}
\label
{
fig:16-3
}
\label
{
fig:16-3
-lyy
}
\end{figure}
\end{figure}
%----------------------------------------------
%----------------------------------------------
%----------------------------------------------------------------------------------------
%----------------------------------------------------------------------------------------
...
@@ -781,10 +766,11 @@ P(\mathbi{y}|\mathbi{x}) & = & \frac{\mathrm{cos}(\mathbi{x},\mathbi{y})/\tau}{\
...
@@ -781,10 +766,11 @@ P(\mathbi{y}|\mathbi{x}) & = & \frac{\mathrm{cos}(\mathbi{x},\mathbi{y})/\tau}{\
\vspace
{
0.5em
}
\vspace
{
0.5em
}
\item
{
\small\bfnew
{
语言模型的使用
}}
。无监督神经机器翻译的一个重要部分就是来自语言模型的目标函数。因为翻译模型本质上是在完成文本生成任务,所以只有文本生成类型的语言模型建模方法才可以应用到无监督神经机器翻译里。比如,经典的给定前文预测下一词就是一个典型的自回归生成任务(见
{
\chaptertwo
}
),因此可以运用到无监督神经机器翻译里。但是,目前在预训练里流行的BERT等模型是掩码语言模型
\upcite
{
devlin2019bert
}
,就不能直接在无监督神经翻译里使用。
\item
{
\small\bfnew
{
语言模型的使用
}}
。无监督神经机器翻译的一个重要部分就是来自语言模型的目标函数。因为翻译模型本质上是在完成文本生成任务,所以只有文本生成类型的语言模型建模方法才可以应用到无监督神经机器翻译里。比如,经典的给定前文预测下一词就是一个典型的自回归生成任务(见
{
\chaptertwo
}
),因此可以运用到无监督神经机器翻译里。但是,目前在预训练里流行的BERT等模型是掩码语言模型
\upcite
{
devlin2019bert
}
,就不能直接在无监督神经翻译里使用。
\parinterval
另外一个在无监督神经机器翻译中比较常见的语言模型目标函数则是
{
\small\bfnew
{
降噪自编码器
}}
\index
{
降噪自编码器
}
(Denoising Autoencoder
\index
{
降噪自编码器
}
)
。它也是文本生成类型的语言模型建模方法。对于一个句子
$
\seq
{
x
}$
,首先使用一个噪声函数
$
\seq
{
x
}^{
'
}
=
\mathrm
{
noise
}
(
\seq
{
x
}
)
$
来对
$
\seq
{
x
}$
注入噪声,产生一个质量较差的句子
$
\seq
{
x
}^{
'
}$
。然后,让模型学习如何从
$
\seq
{
x
}^{
'
}$
还原出
$
\seq
{
x
}$
。这样一个目标函数比预测下一词更贴近翻译任务的本质,因为它是一个序列到序列的映射,并且输入输出两个序列在语义上是等价的。我们之所以采用
$
\seq
{
x
}^{
'
}$
而不是
$
\seq
{
x
}$
自己来预测
$
\seq
{
x
}^{
'
}$
,是因为模型可以通过简单的复制输入作为输出来完成从
$
\seq
{
x
}$
预测
$
\seq
{
x
}$
的任务,并且在输入中注入噪声会让模型更加鲁棒,因为模型可以通过训练集数据学会如何利用句子中噪声以外的信息来处理其中噪声并得到正确的输出。通常来说,噪声函数
$
\mathrm
{
noise
}$
有三种形式,如表
\ref
{
tab:16-1
}
所示。
\parinterval
另外一个在无监督神经机器翻译中比较常见的语言模型目标函数则是
降噪自编码器
。它也是文本生成类型的语言模型建模方法。对于一个句子
$
\seq
{
x
}$
,首先使用一个噪声函数
$
\seq
{
x
}^{
'
}
=
\mathrm
{
noise
}
(
\seq
{
x
}
)
$
来对
$
\seq
{
x
}$
注入噪声,产生一个质量较差的句子
$
\seq
{
x
}^{
'
}$
。然后,让模型学习如何从
$
\seq
{
x
}^{
'
}$
还原出
$
\seq
{
x
}$
。这样一个目标函数比预测下一词更贴近翻译任务的本质,因为它是一个序列到序列的映射,并且输入输出两个序列在语义上是等价的。我们之所以采用
$
\seq
{
x
}^{
'
}$
而不是
$
\seq
{
x
}$
自己来预测
$
\seq
{
x
}^{
'
}$
,是因为模型可以通过简单的复制输入作为输出来完成从
$
\seq
{
x
}$
预测
$
\seq
{
x
}$
的任务,并且在输入中注入噪声会让模型更加鲁棒,因为模型可以通过训练集数据学会如何利用句子中噪声以外的信息来处理其中噪声并得到正确的输出。通常来说,噪声函数
$
\mathrm
{
noise
}$
有三种形式,如表
\ref
{
tab:16-1
}
所示。
%----------------------------------------------
%----------------------------------------------
\begin{table}
[h]
\begin{table}
[h]
\centering
\centering
\caption
{
三种噪声函数(原句为``我
\
喜欢
\
吃
\
苹果
\
。'')
}
\begin{tabular}
{
l|l|l
}
\begin{tabular}
{
l|l|l
}
\hline
\hline
\multicolumn
{
1
}{
c|
}{
噪声函数
}
&
\multicolumn
{
1
}{
c|
}{
描述
}
&
\multicolumn
{
1
}{
c
}{
例子
}
\\
\multicolumn
{
1
}{
c|
}{
噪声函数
}
&
\multicolumn
{
1
}{
c|
}{
描述
}
&
\multicolumn
{
1
}{
c
}{
例子
}
\\
...
@@ -794,7 +780,6 @@ P(\mathbi{y}|\mathbi{x}) & = & \frac{\mathrm{cos}(\mathbi{x},\mathbi{y})/\tau}{\
...
@@ -794,7 +780,6 @@ P(\mathbi{y}|\mathbi{x}) & = & \frac{\mathrm{cos}(\mathbi{x},\mathbi{y})/\tau}{\
空白
&
句子中的词按一定概率被替换成空白符
&
``我
\ \underline
{
\ \ \ \ \ \ \ \
}
\
吃
\
苹果
\
。''
\\
空白
&
句子中的词按一定概率被替换成空白符
&
``我
\ \underline
{
\ \ \ \ \ \ \ \
}
\
吃
\
苹果
\
。''
\\
\hline
\hline
\end{tabular}
\end{tabular}
\caption
{
三种噪声函数(原句为``我
\
喜欢
\
吃
\
苹果
\
。'')。
}
\label
{
tab:16-1
}
\label
{
tab:16-1
}
\end{table}
\end{table}
%----------------------------------------------
%----------------------------------------------
...
@@ -986,7 +971,7 @@ P(\mathbi{y}|\mathbi{x}) & = & \frac{\mathrm{cos}(\mathbi{x},\mathbi{y})/\tau}{\
...
@@ -986,7 +971,7 @@ P(\mathbi{y}|\mathbi{x}) & = & \frac{\mathrm{cos}(\mathbi{x},\mathbi{y})/\tau}{\
%----------------------------------------------
%----------------------------------------------
\begin{figure}
[h]
\begin{figure}
[h]
\centering
\centering
\in
cludegraphics
[scale=1]
{
Chapter16/Figures/figure-schematic-of-the-domain-discriminator.jpg
}
\in
put
{
Chapter16/Figures/figure-schematic-of-the-domain-discriminator
}
\caption
{
领域判别器示意图
}
\caption
{
领域判别器示意图
}
\label
{
fig:16-2-wbh
}
\label
{
fig:16-2-wbh
}
\end{figure}
\end{figure}
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论